summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2013-11-25 10:54:03 (GMT)
committerKevin Smith <git@kismith.co.uk>2013-11-25 10:54:03 (GMT)
commit78df31e45cf9f6c90a82c2a9265b2e3bb509570d (patch)
tree1a6311d09f90e6674533028de6f3c6cd401a7478 /Swift/QtUI/Roster/RosterModel.h
parent58da4ae2358b90a9a178ecebf7f33b7e9e0636ee (diff)
downloadswift-78df31e45cf9f6c90a82c2a9265b2e3bb509570d.zip
swift-78df31e45cf9f6c90a82c2a9265b2e3bb509570d.tar.bz2
When in screen-reader mode, change the text used in rosters to include more information.
Change-Id: I8807b2ce6d36dbce510a185f0e4e2c549c623225
Diffstat (limited to 'Swift/QtUI/Roster/RosterModel.h')
-rw-r--r--Swift/QtUI/Roster/RosterModel.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/Swift/QtUI/Roster/RosterModel.h b/Swift/QtUI/Roster/RosterModel.h
index 5397054..7f6cdd2 100644
--- a/Swift/QtUI/Roster/RosterModel.h
+++ b/Swift/QtUI/Roster/RosterModel.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Kevin Smith
+ * Copyright (c) 2010-2013 Kevin Smith
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -28,7 +28,7 @@ namespace Swift {
class RosterModel : public QAbstractItemModel {
Q_OBJECT
public:
- RosterModel(QtTreeWidget* view);
+ RosterModel(QtTreeWidget* view, bool screenReaderMode);
~RosterModel();
void setRoster(Roster* swiftRoster);
Qt::ItemFlags flags(const QModelIndex& index) const;
@@ -56,8 +56,12 @@ namespace Swift {
int getChildCount(RosterItem* item) const;
bool getIsIdle(RosterItem* item) const;
void reLayout();
+ /** calculates screenreader-friendly text if in screenreader mode, otherwise uses alternative text */
+ QString getScreenReaderTextOr(RosterItem* item, const QString& alternative) const;
+ private:
Roster* roster_;
QtTreeWidget* view_;
QtScaledAvatarCache* cachedImageScaler_;
+ bool screenReader_;
};
}