summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qaction.h
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2009-06-17 14:38:41 (GMT)
committerJason Barron <jbarron@trolltech.com>2009-06-17 14:38:41 (GMT)
commit30525b802f17c2c815f02d81a1c771b8cee71458 (patch)
treeb9556de913f0915da07066253f5865d41e5214a6 /src/gui/kernel/qaction.h
parent87ac26f0c489911d9a43bab04aef03cadbe8bbe6 (diff)
downloadQt-30525b802f17c2c815f02d81a1c771b8cee71458.zip
Qt-30525b802f17c2c815f02d81a1c771b8cee71458.tar.gz
Qt-30525b802f17c2c815f02d81a1c771b8cee71458.tar.bz2
Improve softkey implementation and add a default 'Exit' button to RSK.
The previous implementation had some problems where the actual position of the softkey was determined by it's position in the list. This is suboptimal since the position should be tied to the role. Actions that have "negative" conotation should be located on the right soft key (RSK) while "positive" actions go on the left soft key (LSK). This is according to the S60 User Interface Guide. It is also standard practice in S60 to have an 'Exit' button on the RSK so we add one of those if there is not already a key present there. Task-number: 256365 Reviewed-by: Markku Luukkainen
Diffstat (limited to 'src/gui/kernel/qaction.h')
-rw-r--r--src/gui/kernel/qaction.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gui/kernel/qaction.h b/src/gui/kernel/qaction.h
index dfa4933..3449acf 100644
--- a/src/gui/kernel/qaction.h
+++ b/src/gui/kernel/qaction.h
@@ -91,11 +91,10 @@ class Q_GUI_EXPORT QAction : public QObject
public:
enum MenuRole { NoRole, TextHeuristicRole, ApplicationSpecificRole, AboutQtRole,
AboutRole, PreferencesRole, QuitRole };
- enum SoftKeyRole { OptionsSoftKey, SelectSoftKey, BackSoftKey, NextSoftKey, PreviousSoftKey,
- OkSoftKey, CancelSoftKey, EditSoftKey, ViewSoftKey, BackSpaceSoftKey,
- EndEditSoftKey, RevertEditSoftKey, DeselectSoftKey, FinishSoftKey,
- MenuSoftKey, ContextMenuSoftKey, ExitSoftKey, Key1SoftKey, Key2SoftKey,
- Key3SoftKey, Key4SoftKey, CustomSoftKey };
+ enum SoftKeyRole { OptionsSoftKey, SelectSoftKey, BackSoftKey, NextSoftKey, PreviousSoftKey,
+ OkSoftKey, CancelSoftKey, EditSoftKey, ViewSoftKey, BackSpaceSoftKey,
+ EndEditSoftKey, RevertEditSoftKey, DeselectSoftKey, FinishSoftKey,
+ MenuSoftKey, ContextMenuSoftKey, ExitSoftKey };
explicit QAction(QObject* parent);
QAction(const QString &text, QObject* parent);
QAction(const QIcon &icon, const QString &text, QObject* parent);