diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2012-02-21 15:36:01 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-22 17:28:51 +0100 |
commit | 541949aed23ea14a71a7d4391bac244b623add0a (patch) | |
tree | f123b0cfb7d4c42f7b83a378ae670c8b51003057 /src/gui | |
parent | 53bb87d1d274a80b94595f6cd31bfa7a8ae81dc3 (diff) |
Add further theme hints to QPlatformTheme.
- Add hints for QDialog/QDialogButtonBox.
- Add hint for available popup-menu area.
- Add keyboard scheme hint replacing
QGuiApplicationPrivate::currentKeyPlatform()
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Task-number: QTBUG-24204
Task-number: QTBUG-24315
Change-Id: I6653786b0dcb49a6fc264d3b9891dbfee502bd3e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/kernel/qevent.cpp | 2 | ||||
-rw-r--r-- | src/gui/kernel/qguiapplication.cpp | 21 | ||||
-rw-r--r-- | src/gui/kernel/qguiapplication_p.h | 13 | ||||
-rw-r--r-- | src/gui/kernel/qkeysequence.cpp | 316 | ||||
-rw-r--r-- | src/gui/kernel/qkeysequence_p.h | 1 | ||||
-rw-r--r-- | src/gui/kernel/qplatformtheme_qpa.cpp | 24 | ||||
-rw-r--r-- | src/gui/kernel/qplatformtheme_qpa.h | 17 |
7 files changed, 212 insertions, 182 deletions
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index c3a6be692b..ce4594c7ab 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -833,7 +833,7 @@ Qt::KeyboardModifiers QKeyEvent::modifiers() const bool QKeyEvent::matches(QKeySequence::StandardKey matchKey) const { uint searchkey = (modifiers() | key()) & ~(Qt::KeypadModifier); //The keypad modifier should not make a difference - uint platform = QGuiApplicationPrivate::currentKeyPlatform(); + const uint platform = QKeySequencePrivate::currentKeyPlatforms(); uint N = QKeySequencePrivate::numberOfKeyBindings; diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 17208643ef..4b309096c9 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -1911,27 +1911,6 @@ QInputPanel *QGuiApplication::inputPanel() const return inputMethod(); } - -// Returns the current platform used by keyBindings -uint QGuiApplicationPrivate::currentKeyPlatform() -{ - uint platform = KB_Win; -#ifdef Q_OS_MAC - platform = KB_Mac; -#elif defined Q_WS_X11 // ## TODO: detect these - platform = KB_X11; -#if 0 - if (X11->desktopEnvironment == DE_KDE) - platform |= KB_KDE; - if (X11->desktopEnvironment == DE_GNOME) - platform |= KB_Gnome; - if (X11->desktopEnvironment == DE_CDE) - platform |= KB_CDE; -#endif -#endif - return platform; -} - /*! \since 4.5 \fn void QGuiApplication::fontDatabaseChanged() diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h index 7e6e0aa8c7..66670e8e25 100644 --- a/src/gui/kernel/qguiapplication_p.h +++ b/src/gui/kernel/qguiapplication_p.h @@ -89,19 +89,6 @@ public: static QPlatformTheme *platformTheme() { return platform_theme; } - - enum KeyPlatform { - KB_Win = 1, - KB_Mac = 2, - KB_X11 = 4, - KB_KDE = 8, - KB_Gnome = 16, - KB_CDE = 32, - KB_All = 0xffff - }; - - static uint currentKeyPlatform(); - static QAbstractEventDispatcher *qt_qpa_core_dispatcher() { return QCoreApplication::instance()->d_func()->threadData->eventDispatcher; } diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp index 021135b6fe..bd0f220ae8 100644 --- a/src/gui/kernel/qkeysequence.cpp +++ b/src/gui/kernel/qkeysequence.cpp @@ -41,6 +41,7 @@ #include "qkeysequence.h" #include "qkeysequence_p.h" +#include "qplatformtheme_qpa.h" #include "private/qguiapplication_p.h" #ifndef QT_NO_SHORTCUT @@ -640,153 +641,163 @@ static const struct { //Table of key bindings. It must be sorted on key sequence. //A priority of 1 indicates that this is the primary key binding when multiple are defined. +enum KeyPlatform { + KB_Win = (1 << QPlatformTheme::WindowsKeyboardScheme), + KB_Mac = (1 << QPlatformTheme::MacKeyboardScheme), + KB_X11 = (1 << QPlatformTheme::X11KeyboardScheme), + KB_KDE = (1 << QPlatformTheme::KdeKeyboardScheme), + KB_Gnome = (1 << QPlatformTheme::GnomeKeyboardScheme), + KB_CDE = (1 << QPlatformTheme::CdeKeyboardScheme), + KB_All = 0xffff +}; + const QKeyBinding QKeySequencePrivate::keyBindings[] = { // StandardKey Priority Key Sequence Platforms - {QKeySequence::Back, 0, Qt::Key_Backspace, QGuiApplicationPrivate::KB_Win}, - {QKeySequence::InsertParagraphSeparator,0, Qt::Key_Return, QGuiApplicationPrivate::KB_All}, - {QKeySequence::InsertParagraphSeparator,0, Qt::Key_Enter, QGuiApplicationPrivate::KB_All}, - {QKeySequence::Delete, 1, Qt::Key_Delete, QGuiApplicationPrivate::KB_All}, - {QKeySequence::MoveToStartOfLine, 0, Qt::Key_Home, QGuiApplicationPrivate::KB_Win | QGuiApplicationPrivate::KB_X11}, - {QKeySequence::MoveToStartOfDocument, 0, Qt::Key_Home, QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::MoveToEndOfLine, 0, Qt::Key_End, QGuiApplicationPrivate::KB_Win | QGuiApplicationPrivate::KB_X11}, - {QKeySequence::MoveToEndOfDocument, 0, Qt::Key_End, QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::MoveToPreviousChar, 0, Qt::Key_Left, QGuiApplicationPrivate::KB_All}, - {QKeySequence::MoveToPreviousLine, 0, Qt::Key_Up, QGuiApplicationPrivate::KB_All}, - {QKeySequence::MoveToNextChar, 0, Qt::Key_Right, QGuiApplicationPrivate::KB_All}, - {QKeySequence::MoveToNextLine, 0, Qt::Key_Down, QGuiApplicationPrivate::KB_All}, - {QKeySequence::MoveToPreviousPage, 1, Qt::Key_PageUp, QGuiApplicationPrivate::KB_All}, - {QKeySequence::MoveToNextPage, 1, Qt::Key_PageDown, QGuiApplicationPrivate::KB_All}, - {QKeySequence::HelpContents, 0, Qt::Key_F1, QGuiApplicationPrivate::KB_Win | QGuiApplicationPrivate::KB_X11}, - {QKeySequence::FindNext, 0, Qt::Key_F3, QGuiApplicationPrivate::KB_X11}, - {QKeySequence::FindNext, 1, Qt::Key_F3, QGuiApplicationPrivate::KB_Win}, - {QKeySequence::Refresh, 0, Qt::Key_F5, QGuiApplicationPrivate::KB_Win | QGuiApplicationPrivate::KB_X11}, - {QKeySequence::Undo, 0, Qt::Key_F14, QGuiApplicationPrivate::KB_X11}, //Undo on sun keyboards - {QKeySequence::Copy, 0, Qt::Key_F16, QGuiApplicationPrivate::KB_X11}, //Copy on sun keyboards - {QKeySequence::Paste, 0, Qt::Key_F18, QGuiApplicationPrivate::KB_X11}, //Paste on sun keyboards - {QKeySequence::Cut, 0, Qt::Key_F20, QGuiApplicationPrivate::KB_X11}, //Cut on sun keyboards - {QKeySequence::PreviousChild, 0, Qt::Key_Back, QGuiApplicationPrivate::KB_All}, - {QKeySequence::NextChild, 0, Qt::Key_Forward, QGuiApplicationPrivate::KB_All}, - {QKeySequence::Forward, 0, Qt::SHIFT | Qt::Key_Backspace, QGuiApplicationPrivate::KB_Win}, - {QKeySequence::InsertLineSeparator, 0, Qt::SHIFT | Qt::Key_Return, QGuiApplicationPrivate::KB_All}, - {QKeySequence::InsertLineSeparator, 0, Qt::SHIFT | Qt::Key_Enter, QGuiApplicationPrivate::KB_All}, - {QKeySequence::Paste, 0, Qt::SHIFT | Qt::Key_Insert, QGuiApplicationPrivate::KB_Win | QGuiApplicationPrivate::KB_X11}, - {QKeySequence::Cut, 0, Qt::SHIFT | Qt::Key_Delete, QGuiApplicationPrivate::KB_Win | QGuiApplicationPrivate::KB_X11}, //## Check if this should work on mac - {QKeySequence::SelectStartOfLine, 0, Qt::SHIFT | Qt::Key_Home, QGuiApplicationPrivate::KB_Win | QGuiApplicationPrivate::KB_X11}, - {QKeySequence::SelectStartOfDocument, 0, Qt::SHIFT | Qt::Key_Home, QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::SelectEndOfLine, 0, Qt::SHIFT | Qt::Key_End, QGuiApplicationPrivate::KB_Win | QGuiApplicationPrivate::KB_X11}, - {QKeySequence::SelectEndOfDocument, 0, Qt::SHIFT | Qt::Key_End, QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::SelectPreviousChar, 0, Qt::SHIFT | Qt::Key_Left, QGuiApplicationPrivate::KB_All}, - {QKeySequence::SelectPreviousLine, 0, Qt::SHIFT | Qt::Key_Up, QGuiApplicationPrivate::KB_All}, - {QKeySequence::SelectNextChar, 0, Qt::SHIFT | Qt::Key_Right, QGuiApplicationPrivate::KB_All}, - {QKeySequence::SelectNextLine, 0, Qt::SHIFT | Qt::Key_Down, QGuiApplicationPrivate::KB_All}, - {QKeySequence::SelectPreviousPage, 0, Qt::SHIFT | Qt::Key_PageUp, QGuiApplicationPrivate::KB_All}, - {QKeySequence::SelectNextPage, 0, Qt::SHIFT | Qt::Key_PageDown, QGuiApplicationPrivate::KB_All}, - {QKeySequence::WhatsThis, 1, Qt::SHIFT | Qt::Key_F1, QGuiApplicationPrivate::KB_All}, - {QKeySequence::FindPrevious, 0, Qt::SHIFT | Qt::Key_F3, QGuiApplicationPrivate::KB_X11}, - {QKeySequence::FindPrevious, 1, Qt::SHIFT | Qt::Key_F3, QGuiApplicationPrivate::KB_Win}, - {QKeySequence::ZoomIn, 1, Qt::CTRL | Qt::Key_Plus, QGuiApplicationPrivate::KB_All}, - {QKeySequence::NextChild, 0, Qt::CTRL | Qt::Key_Comma, QGuiApplicationPrivate::KB_KDE}, - {QKeySequence::Preferences, 0, Qt::CTRL | Qt::Key_Comma, QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::ZoomOut, 1, Qt::CTRL | Qt::Key_Minus, QGuiApplicationPrivate::KB_All}, - {QKeySequence::PreviousChild, 0, Qt::CTRL | Qt::Key_Period, QGuiApplicationPrivate::KB_KDE}, - {QKeySequence::HelpContents, 1, Qt::CTRL | Qt::Key_Question, QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::SelectAll, 1, Qt::CTRL | Qt::Key_A, QGuiApplicationPrivate::KB_All}, - {QKeySequence::Bold, 1, Qt::CTRL | Qt::Key_B, QGuiApplicationPrivate::KB_All}, - {QKeySequence::Copy, 1, Qt::CTRL | Qt::Key_C, QGuiApplicationPrivate::KB_All}, - {QKeySequence::Delete, 0, Qt::CTRL | Qt::Key_D, QGuiApplicationPrivate::KB_X11}, //emacs (line edit only) - {QKeySequence::Find, 0, Qt::CTRL | Qt::Key_F, QGuiApplicationPrivate::KB_All}, - {QKeySequence::FindNext, 1, Qt::CTRL | Qt::Key_G, QGuiApplicationPrivate::KB_Gnome | QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::FindNext, 0, Qt::CTRL | Qt::Key_G, QGuiApplicationPrivate::KB_Win}, - {QKeySequence::Replace, 0, Qt::CTRL | Qt::Key_H, QGuiApplicationPrivate::KB_Win}, - {QKeySequence::Replace, 0, Qt::CTRL | Qt::Key_H, QGuiApplicationPrivate::KB_Gnome}, - {QKeySequence::Italic, 0, Qt::CTRL | Qt::Key_I, QGuiApplicationPrivate::KB_All}, - {QKeySequence::DeleteEndOfLine, 0, Qt::CTRL | Qt::Key_K, QGuiApplicationPrivate::KB_X11}, //emacs (line edit only) - {QKeySequence::New, 1, Qt::CTRL | Qt::Key_N, QGuiApplicationPrivate::KB_All}, - {QKeySequence::Open, 1, Qt::CTRL | Qt::Key_O, QGuiApplicationPrivate::KB_All}, - {QKeySequence::Print, 1, Qt::CTRL | Qt::Key_P, QGuiApplicationPrivate::KB_All}, - {QKeySequence::Quit, 0, Qt::CTRL | Qt::Key_Q, QGuiApplicationPrivate::KB_Gnome | QGuiApplicationPrivate::KB_KDE | QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::Refresh, 1, Qt::CTRL | Qt::Key_R, QGuiApplicationPrivate::KB_Gnome | QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::Replace, 0, Qt::CTRL | Qt::Key_R, QGuiApplicationPrivate::KB_KDE}, - {QKeySequence::Save, 1, Qt::CTRL | Qt::Key_S, QGuiApplicationPrivate::KB_All}, - {QKeySequence::AddTab, 0, Qt::CTRL | Qt::Key_T, QGuiApplicationPrivate::KB_All}, - {QKeySequence::Underline, 1, Qt::CTRL | Qt::Key_U, QGuiApplicationPrivate::KB_All}, - {QKeySequence::Paste, 1, Qt::CTRL | Qt::Key_V, QGuiApplicationPrivate::KB_All}, - {QKeySequence::Close, 0, Qt::CTRL | Qt::Key_W, QGuiApplicationPrivate::KB_Win | QGuiApplicationPrivate::KB_X11}, - {QKeySequence::Close, 1, Qt::CTRL | Qt::Key_W, QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::Cut, 1, Qt::CTRL | Qt::Key_X, QGuiApplicationPrivate::KB_All}, - {QKeySequence::Redo, 1, Qt::CTRL | Qt::Key_Y, QGuiApplicationPrivate::KB_Win}, - {QKeySequence::Undo, 1, Qt::CTRL | Qt::Key_Z, QGuiApplicationPrivate::KB_All}, - {QKeySequence::Back, 1, Qt::CTRL | Qt::Key_BracketLeft, QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::Forward, 1, Qt::CTRL | Qt::Key_BracketRight, QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::PreviousChild, 1, Qt::CTRL | Qt::Key_BraceLeft, QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::NextChild, 1, Qt::CTRL | Qt::Key_BraceRight, QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::NextChild, 1, Qt::CTRL | Qt::Key_Tab, QGuiApplicationPrivate::KB_Win | QGuiApplicationPrivate::KB_X11}, - {QKeySequence::NextChild, 0, Qt::CTRL | Qt::Key_Tab, QGuiApplicationPrivate::KB_Mac}, //different priority from above - {QKeySequence::DeleteStartOfWord, 0, Qt::CTRL | Qt::Key_Backspace, QGuiApplicationPrivate::KB_X11 | QGuiApplicationPrivate::KB_Win}, - {QKeySequence::Copy, 0, Qt::CTRL | Qt::Key_Insert, QGuiApplicationPrivate::KB_X11 | QGuiApplicationPrivate::KB_Win}, - {QKeySequence::DeleteEndOfWord, 0, Qt::CTRL | Qt::Key_Delete, QGuiApplicationPrivate::KB_X11 | QGuiApplicationPrivate::KB_Win}, - {QKeySequence::MoveToStartOfDocument, 0, Qt::CTRL | Qt::Key_Home, QGuiApplicationPrivate::KB_Win | QGuiApplicationPrivate::KB_X11}, - {QKeySequence::MoveToEndOfDocument, 0, Qt::CTRL | Qt::Key_End, QGuiApplicationPrivate::KB_Win | QGuiApplicationPrivate::KB_X11}, - {QKeySequence::Back, 0, Qt::CTRL | Qt::Key_Left, QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::MoveToPreviousWord, 0, Qt::CTRL | Qt::Key_Left, QGuiApplicationPrivate::KB_Win | QGuiApplicationPrivate::KB_X11}, - {QKeySequence::MoveToStartOfLine, 0, Qt::CTRL | Qt::Key_Left, QGuiApplicationPrivate::KB_Mac }, - {QKeySequence::MoveToStartOfDocument, 1, Qt::CTRL | Qt::Key_Up, QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::Forward, 0, Qt::CTRL | Qt::Key_Right, QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::MoveToEndOfLine, 0, Qt::CTRL | Qt::Key_Right, QGuiApplicationPrivate::KB_Mac }, - {QKeySequence::MoveToNextWord, 0, Qt::CTRL | Qt::Key_Right, QGuiApplicationPrivate::KB_Win | QGuiApplicationPrivate::KB_X11}, - {QKeySequence::MoveToEndOfDocument, 1, Qt::CTRL | Qt::Key_Down, QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::Close, 1, Qt::CTRL | Qt::Key_F4, QGuiApplicationPrivate::KB_Win}, - {QKeySequence::Close, 0, Qt::CTRL | Qt::Key_F4, QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::NextChild, 0, Qt::CTRL | Qt::Key_F6, QGuiApplicationPrivate::KB_Win}, - {QKeySequence::FindPrevious, 1, Qt::CTRL | Qt::SHIFT | Qt::Key_G, QGuiApplicationPrivate::KB_Gnome | QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::FindPrevious, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_G, QGuiApplicationPrivate::KB_Win}, - {QKeySequence::AddTab, 1, Qt::CTRL | Qt::SHIFT | Qt::Key_N, QGuiApplicationPrivate::KB_KDE}, - {QKeySequence::SaveAs, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_S, QGuiApplicationPrivate::KB_Gnome | QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::Redo, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_Z, QGuiApplicationPrivate::KB_Win | QGuiApplicationPrivate::KB_X11}, - {QKeySequence::Redo, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_Z, QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::PreviousChild, 1, Qt::CTRL | Qt::SHIFT | Qt::Key_Backtab, QGuiApplicationPrivate::KB_Win | QGuiApplicationPrivate::KB_X11}, - {QKeySequence::PreviousChild, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_Backtab, QGuiApplicationPrivate::KB_Mac },//different priority from above - {QKeySequence::Paste, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_Insert, QGuiApplicationPrivate::KB_X11}, - {QKeySequence::SelectStartOfDocument, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_Home, QGuiApplicationPrivate::KB_Win | QGuiApplicationPrivate::KB_X11}, - {QKeySequence::SelectEndOfDocument, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_End, QGuiApplicationPrivate::KB_Win | QGuiApplicationPrivate::KB_X11}, - {QKeySequence::SelectPreviousWord, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_Left, QGuiApplicationPrivate::KB_Win | QGuiApplicationPrivate::KB_X11}, - {QKeySequence::SelectStartOfLine, 1, Qt::CTRL | Qt::SHIFT | Qt::Key_Left, QGuiApplicationPrivate::KB_Mac }, - {QKeySequence::SelectStartOfDocument, 1, Qt::CTRL | Qt::SHIFT | Qt::Key_Up, QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::SelectNextWord, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_Right, QGuiApplicationPrivate::KB_Win | QGuiApplicationPrivate::KB_X11}, - {QKeySequence::SelectEndOfLine, 1, Qt::CTRL | Qt::SHIFT | Qt::Key_Right, QGuiApplicationPrivate::KB_Mac }, - {QKeySequence::SelectEndOfDocument, 1, Qt::CTRL | Qt::SHIFT | Qt::Key_Down, QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::PreviousChild, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_F6, QGuiApplicationPrivate::KB_Win}, - {QKeySequence::Undo, 0, Qt::ALT | Qt::Key_Backspace, QGuiApplicationPrivate::KB_Win}, - {QKeySequence::DeleteStartOfWord, 0, Qt::ALT | Qt::Key_Backspace, QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::DeleteEndOfWord, 0, Qt::ALT | Qt::Key_Delete, QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::Back, 1, Qt::ALT | Qt::Key_Left, QGuiApplicationPrivate::KB_Win | QGuiApplicationPrivate::KB_X11}, - {QKeySequence::MoveToPreviousWord, 0, Qt::ALT | Qt::Key_Left, QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::MoveToStartOfBlock, 0, Qt::ALT | Qt::Key_Up, QGuiApplicationPrivate::KB_Mac}, //mac only - {QKeySequence::MoveToNextWord, 0, Qt::ALT | Qt::Key_Right, QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::Forward, 1, Qt::ALT | Qt::Key_Right, QGuiApplicationPrivate::KB_Win | QGuiApplicationPrivate::KB_X11}, - {QKeySequence::MoveToEndOfBlock, 0, Qt::ALT | Qt::Key_Down, QGuiApplicationPrivate::KB_Mac}, //mac only - {QKeySequence::MoveToPreviousPage, 0, Qt::ALT | Qt::Key_PageUp, QGuiApplicationPrivate::KB_Mac }, - {QKeySequence::MoveToNextPage, 0, Qt::ALT | Qt::Key_PageDown, QGuiApplicationPrivate::KB_Mac }, - {QKeySequence::Redo, 0, Qt::ALT | Qt::SHIFT | Qt::Key_Backspace,QGuiApplicationPrivate::KB_Win}, - {QKeySequence::SelectPreviousWord, 0, Qt::ALT | Qt::SHIFT | Qt::Key_Left, QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::SelectStartOfBlock, 0, Qt::ALT | Qt::SHIFT | Qt::Key_Up, QGuiApplicationPrivate::KB_Mac}, //mac only - {QKeySequence::SelectNextWord, 0, Qt::ALT | Qt::SHIFT | Qt::Key_Right, QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::SelectEndOfBlock, 0, Qt::ALT | Qt::SHIFT | Qt::Key_Down, QGuiApplicationPrivate::KB_Mac}, //mac only - {QKeySequence::MoveToStartOfBlock, 0, Qt::META | Qt::Key_A, QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::Delete, 0, Qt::META | Qt::Key_D, QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::MoveToEndOfBlock, 0, Qt::META | Qt::Key_E, QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::InsertLineSeparator, 0, Qt::META | Qt::Key_Return, QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::InsertLineSeparator, 0, Qt::META | Qt::Key_Enter, QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::MoveToStartOfLine, 0, Qt::META | Qt::Key_Left, QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::MoveToPreviousPage, 0, Qt::META | Qt::Key_Up, QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::MoveToEndOfLine, 0, Qt::META | Qt::Key_Right, QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::MoveToNextPage, 0, Qt::META | Qt::Key_Down, QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::MoveToPreviousPage, 0, Qt::META | Qt::Key_PageUp, QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::MoveToNextPage, 0, Qt::META | Qt::Key_PageDown, QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::SelectStartOfBlock, 0, Qt::META | Qt::SHIFT | Qt::Key_A, QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::SelectEndOfBlock, 0, Qt::META | Qt::SHIFT | Qt::Key_E, QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::SelectStartOfLine, 0, Qt::META | Qt::SHIFT | Qt::Key_Left, QGuiApplicationPrivate::KB_Mac}, - {QKeySequence::SelectEndOfLine, 0, Qt::META | Qt::SHIFT | Qt::Key_Right, QGuiApplicationPrivate::KB_Mac} + {QKeySequence::Back, 0, Qt::Key_Backspace, KB_Win}, + {QKeySequence::InsertParagraphSeparator,0, Qt::Key_Return, KB_All}, + {QKeySequence::InsertParagraphSeparator,0, Qt::Key_Enter, KB_All}, + {QKeySequence::Delete, 1, Qt::Key_Delete, KB_All}, + {QKeySequence::MoveToStartOfLine, 0, Qt::Key_Home, KB_Win | KB_X11}, + {QKeySequence::MoveToStartOfDocument, 0, Qt::Key_Home, KB_Mac}, + {QKeySequence::MoveToEndOfLine, 0, Qt::Key_End, KB_Win | KB_X11}, + {QKeySequence::MoveToEndOfDocument, 0, Qt::Key_End, KB_Mac}, + {QKeySequence::MoveToPreviousChar, 0, Qt::Key_Left, KB_All}, + {QKeySequence::MoveToPreviousLine, 0, Qt::Key_Up, KB_All}, + {QKeySequence::MoveToNextChar, 0, Qt::Key_Right, KB_All}, + {QKeySequence::MoveToNextLine, 0, Qt::Key_Down, KB_All}, + {QKeySequence::MoveToPreviousPage, 1, Qt::Key_PageUp, KB_All}, + {QKeySequence::MoveToNextPage, 1, Qt::Key_PageDown, KB_All}, + {QKeySequence::HelpContents, 0, Qt::Key_F1, KB_Win | KB_X11}, + {QKeySequence::FindNext, 0, Qt::Key_F3, KB_X11}, + {QKeySequence::FindNext, 1, Qt::Key_F3, KB_Win}, + {QKeySequence::Refresh, 0, Qt::Key_F5, KB_Win | KB_X11}, + {QKeySequence::Undo, 0, Qt::Key_F14, KB_X11}, //Undo on sun keyboards + {QKeySequence::Copy, 0, Qt::Key_F16, KB_X11}, //Copy on sun keyboards + {QKeySequence::Paste, 0, Qt::Key_F18, KB_X11}, //Paste on sun keyboards + {QKeySequence::Cut, 0, Qt::Key_F20, KB_X11}, //Cut on sun keyboards + {QKeySequence::PreviousChild, 0, Qt::Key_Back, KB_All}, + {QKeySequence::NextChild, 0, Qt::Key_Forward, KB_All}, + {QKeySequence::Forward, 0, Qt::SHIFT | Qt::Key_Backspace, KB_Win}, + {QKeySequence::InsertLineSeparator, 0, Qt::SHIFT | Qt::Key_Return, KB_All}, + {QKeySequence::InsertLineSeparator, 0, Qt::SHIFT | Qt::Key_Enter, KB_All}, + {QKeySequence::Paste, 0, Qt::SHIFT | Qt::Key_Insert, KB_Win | KB_X11}, + {QKeySequence::Cut, 0, Qt::SHIFT | Qt::Key_Delete, KB_Win | KB_X11}, //## Check if this should work on mac + {QKeySequence::SelectStartOfLine, 0, Qt::SHIFT | Qt::Key_Home, KB_Win | KB_X11}, + {QKeySequence::SelectStartOfDocument, 0, Qt::SHIFT | Qt::Key_Home, KB_Mac}, + {QKeySequence::SelectEndOfLine, 0, Qt::SHIFT | Qt::Key_End, KB_Win | KB_X11}, + {QKeySequence::SelectEndOfDocument, 0, Qt::SHIFT | Qt::Key_End, KB_Mac}, + {QKeySequence::SelectPreviousChar, 0, Qt::SHIFT | Qt::Key_Left, KB_All}, + {QKeySequence::SelectPreviousLine, 0, Qt::SHIFT | Qt::Key_Up, KB_All}, + {QKeySequence::SelectNextChar, 0, Qt::SHIFT | Qt::Key_Right, KB_All}, + {QKeySequence::SelectNextLine, 0, Qt::SHIFT | Qt::Key_Down, KB_All}, + {QKeySequence::SelectPreviousPage, 0, Qt::SHIFT | Qt::Key_PageUp, KB_All}, + {QKeySequence::SelectNextPage, 0, Qt::SHIFT | Qt::Key_PageDown, KB_All}, + {QKeySequence::WhatsThis, 1, Qt::SHIFT | Qt::Key_F1, KB_All}, + {QKeySequence::FindPrevious, 0, Qt::SHIFT | Qt::Key_F3, KB_X11}, + {QKeySequence::FindPrevious, 1, Qt::SHIFT | Qt::Key_F3, KB_Win}, + {QKeySequence::ZoomIn, 1, Qt::CTRL | Qt::Key_Plus, KB_All}, + {QKeySequence::NextChild, 0, Qt::CTRL | Qt::Key_Comma, KB_KDE}, + {QKeySequence::Preferences, 0, Qt::CTRL | Qt::Key_Comma, KB_Mac}, + {QKeySequence::ZoomOut, 1, Qt::CTRL | Qt::Key_Minus, KB_All}, + {QKeySequence::PreviousChild, 0, Qt::CTRL | Qt::Key_Period, KB_KDE}, + {QKeySequence::HelpContents, 1, Qt::CTRL | Qt::Key_Question, KB_Mac}, + {QKeySequence::SelectAll, 1, Qt::CTRL | Qt::Key_A, KB_All}, + {QKeySequence::Bold, 1, Qt::CTRL | Qt::Key_B, KB_All}, + {QKeySequence::Copy, 1, Qt::CTRL | Qt::Key_C, KB_All}, + {QKeySequence::Delete, 0, Qt::CTRL | Qt::Key_D, KB_X11}, //emacs (line edit only) + {QKeySequence::Find, 0, Qt::CTRL | Qt::Key_F, KB_All}, + {QKeySequence::FindNext, 1, Qt::CTRL | Qt::Key_G, KB_Gnome | KB_Mac}, + {QKeySequence::FindNext, 0, Qt::CTRL | Qt::Key_G, KB_Win}, + {QKeySequence::Replace, 0, Qt::CTRL | Qt::Key_H, KB_Win}, + {QKeySequence::Replace, 0, Qt::CTRL | Qt::Key_H, KB_Gnome}, + {QKeySequence::Italic, 0, Qt::CTRL | Qt::Key_I, KB_All}, + {QKeySequence::DeleteEndOfLine, 0, Qt::CTRL | Qt::Key_K, KB_X11}, //emacs (line edit only) + {QKeySequence::New, 1, Qt::CTRL | Qt::Key_N, KB_All}, + {QKeySequence::Open, 1, Qt::CTRL | Qt::Key_O, KB_All}, + {QKeySequence::Print, 1, Qt::CTRL | Qt::Key_P, KB_All}, + {QKeySequence::Quit, 0, Qt::CTRL | Qt::Key_Q, KB_Gnome | KB_KDE | KB_Mac}, + {QKeySequence::Refresh, 1, Qt::CTRL | Qt::Key_R, KB_Gnome | KB_Mac}, + {QKeySequence::Replace, 0, Qt::CTRL | Qt::Key_R, KB_KDE}, + {QKeySequence::Save, 1, Qt::CTRL | Qt::Key_S, KB_All}, + {QKeySequence::AddTab, 0, Qt::CTRL | Qt::Key_T, KB_All}, + {QKeySequence::Underline, 1, Qt::CTRL | Qt::Key_U, KB_All}, + {QKeySequence::Paste, 1, Qt::CTRL | Qt::Key_V, KB_All}, + {QKeySequence::Close, 0, Qt::CTRL | Qt::Key_W, KB_Win | KB_X11}, + {QKeySequence::Close, 1, Qt::CTRL | Qt::Key_W, KB_Mac}, + {QKeySequence::Cut, 1, Qt::CTRL | Qt::Key_X, KB_All}, + {QKeySequence::Redo, 1, Qt::CTRL | Qt::Key_Y, KB_Win}, + {QKeySequence::Undo, 1, Qt::CTRL | Qt::Key_Z, KB_All}, + {QKeySequence::Back, 1, Qt::CTRL | Qt::Key_BracketLeft, KB_Mac}, + {QKeySequence::Forward, 1, Qt::CTRL | Qt::Key_BracketRight, KB_Mac}, + {QKeySequence::PreviousChild, 1, Qt::CTRL | Qt::Key_BraceLeft, KB_Mac}, + {QKeySequence::NextChild, 1, Qt::CTRL | Qt::Key_BraceRight, KB_Mac}, + {QKeySequence::NextChild, 1, Qt::CTRL | Qt::Key_Tab, KB_Win | KB_X11}, + {QKeySequence::NextChild, 0, Qt::CTRL | Qt::Key_Tab, KB_Mac}, //different priority from above + {QKeySequence::DeleteStartOfWord, 0, Qt::CTRL | Qt::Key_Backspace, KB_X11 | KB_Win}, + {QKeySequence::Copy, 0, Qt::CTRL | Qt::Key_Insert, KB_X11 | KB_Win}, + {QKeySequence::DeleteEndOfWord, 0, Qt::CTRL | Qt::Key_Delete, KB_X11 | KB_Win}, + {QKeySequence::MoveToStartOfDocument, 0, Qt::CTRL | Qt::Key_Home, KB_Win | KB_X11}, + {QKeySequence::MoveToEndOfDocument, 0, Qt::CTRL | Qt::Key_End, KB_Win | KB_X11}, + {QKeySequence::Back, 0, Qt::CTRL | Qt::Key_Left, KB_Mac}, + {QKeySequence::MoveToPreviousWord, 0, Qt::CTRL | Qt::Key_Left, KB_Win | KB_X11}, + {QKeySequence::MoveToStartOfLine, 0, Qt::CTRL | Qt::Key_Left, KB_Mac }, + {QKeySequence::MoveToStartOfDocument, 1, Qt::CTRL | Qt::Key_Up, KB_Mac}, + {QKeySequence::Forward, 0, Qt::CTRL | Qt::Key_Right, KB_Mac}, + {QKeySequence::MoveToEndOfLine, 0, Qt::CTRL | Qt::Key_Right, KB_Mac }, + {QKeySequence::MoveToNextWord, 0, Qt::CTRL | Qt::Key_Right, KB_Win | KB_X11}, + {QKeySequence::MoveToEndOfDocument, 1, Qt::CTRL | Qt::Key_Down, KB_Mac}, + {QKeySequence::Close, 1, Qt::CTRL | Qt::Key_F4, KB_Win}, + {QKeySequence::Close, 0, Qt::CTRL | Qt::Key_F4, KB_Mac}, + {QKeySequence::NextChild, 0, Qt::CTRL | Qt::Key_F6, KB_Win}, + {QKeySequence::FindPrevious, 1, Qt::CTRL | Qt::SHIFT | Qt::Key_G, KB_Gnome | KB_Mac}, + {QKeySequence::FindPrevious, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_G, KB_Win}, + {QKeySequence::AddTab, 1, Qt::CTRL | Qt::SHIFT | Qt::Key_N, KB_KDE}, + {QKeySequence::SaveAs, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_S, KB_Gnome | KB_Mac}, + {QKeySequence::Redo, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_Z, KB_Win | KB_X11}, + {QKeySequence::Redo, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_Z, KB_Mac}, + {QKeySequence::PreviousChild, 1, Qt::CTRL | Qt::SHIFT | Qt::Key_Backtab, KB_Win | KB_X11}, + {QKeySequence::PreviousChild, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_Backtab, KB_Mac },//different priority from above + {QKeySequence::Paste, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_Insert, KB_X11}, + {QKeySequence::SelectStartOfDocument, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_Home, KB_Win | KB_X11}, + {QKeySequence::SelectEndOfDocument, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_End, KB_Win | KB_X11}, + {QKeySequence::SelectPreviousWord, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_Left, KB_Win | KB_X11}, + {QKeySequence::SelectStartOfLine, 1, Qt::CTRL | Qt::SHIFT | Qt::Key_Left, KB_Mac }, + {QKeySequence::SelectStartOfDocument, 1, Qt::CTRL | Qt::SHIFT | Qt::Key_Up, KB_Mac}, + {QKeySequence::SelectNextWord, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_Right, KB_Win | KB_X11}, + {QKeySequence::SelectEndOfLine, 1, Qt::CTRL | Qt::SHIFT | Qt::Key_Right, KB_Mac }, + {QKeySequence::SelectEndOfDocument, 1, Qt::CTRL | Qt::SHIFT | Qt::Key_Down, KB_Mac}, + {QKeySequence::PreviousChild, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_F6, KB_Win}, + {QKeySequence::Undo, 0, Qt::ALT | Qt::Key_Backspace, KB_Win}, + {QKeySequence::DeleteStartOfWord, 0, Qt::ALT | Qt::Key_Backspace, KB_Mac}, + {QKeySequence::DeleteEndOfWord, 0, Qt::ALT | Qt::Key_Delete, KB_Mac}, + {QKeySequence::Back, 1, Qt::ALT | Qt::Key_Left, KB_Win | KB_X11}, + {QKeySequence::MoveToPreviousWord, 0, Qt::ALT | Qt::Key_Left, KB_Mac}, + {QKeySequence::MoveToStartOfBlock, 0, Qt::ALT | Qt::Key_Up, KB_Mac}, //mac only + {QKeySequence::MoveToNextWord, 0, Qt::ALT | Qt::Key_Right, KB_Mac}, + {QKeySequence::Forward, 1, Qt::ALT | Qt::Key_Right, KB_Win | KB_X11}, + {QKeySequence::MoveToEndOfBlock, 0, Qt::ALT | Qt::Key_Down, KB_Mac}, //mac only + {QKeySequence::MoveToPreviousPage, 0, Qt::ALT | Qt::Key_PageUp, KB_Mac }, + {QKeySequence::MoveToNextPage, 0, Qt::ALT | Qt::Key_PageDown, KB_Mac }, + {QKeySequence::Redo, 0, Qt::ALT | Qt::SHIFT | Qt::Key_Backspace,KB_Win}, + {QKeySequence::SelectPreviousWord, 0, Qt::ALT | Qt::SHIFT | Qt::Key_Left, KB_Mac}, + {QKeySequence::SelectStartOfBlock, 0, Qt::ALT | Qt::SHIFT | Qt::Key_Up, KB_Mac}, //mac only + {QKeySequence::SelectNextWord, 0, Qt::ALT | Qt::SHIFT | Qt::Key_Right, KB_Mac}, + {QKeySequence::SelectEndOfBlock, 0, Qt::ALT | Qt::SHIFT | Qt::Key_Down, KB_Mac}, //mac only + {QKeySequence::MoveToStartOfBlock, 0, Qt::META | Qt::Key_A, KB_Mac}, + {QKeySequence::Delete, 0, Qt::META | Qt::Key_D, KB_Mac}, + {QKeySequence::MoveToEndOfBlock, 0, Qt::META | Qt::Key_E, KB_Mac}, + {QKeySequence::InsertLineSeparator, 0, Qt::META | Qt::Key_Return, KB_Mac}, + {QKeySequence::InsertLineSeparator, 0, Qt::META | Qt::Key_Enter, KB_Mac}, + {QKeySequence::MoveToStartOfLine, 0, Qt::META | Qt::Key_Left, KB_Mac}, + {QKeySequence::MoveToPreviousPage, 0, Qt::META | Qt::Key_Up, KB_Mac}, + {QKeySequence::MoveToEndOfLine, 0, Qt::META | Qt::Key_Right, KB_Mac}, + {QKeySequence::MoveToNextPage, 0, Qt::META | Qt::Key_Down, KB_Mac}, + {QKeySequence::MoveToPreviousPage, 0, Qt::META | Qt::Key_PageUp, KB_Mac}, + {QKeySequence::MoveToNextPage, 0, Qt::META | Qt::Key_PageDown, KB_Mac}, + {QKeySequence::SelectStartOfBlock, 0, Qt::META | Qt::SHIFT | Qt::Key_A, KB_Mac}, + {QKeySequence::SelectEndOfBlock, 0, Qt::META | Qt::SHIFT | Qt::Key_E, KB_Mac}, + {QKeySequence::SelectStartOfLine, 0, Qt::META | Qt::SHIFT | Qt::Key_Left, KB_Mac}, + {QKeySequence::SelectEndOfLine, 0, Qt::META | Qt::SHIFT | Qt::Key_Right, KB_Mac} }; const uint QKeySequencePrivate::numberOfKeyBindings = sizeof(QKeySequencePrivate::keyBindings)/(sizeof(QKeyBinding)); @@ -991,7 +1002,7 @@ static inline int maybeSwapShortcut(int shortcut) */ QList<QKeySequence> QKeySequence::keyBindings(StandardKey key) { - uint platform = QGuiApplicationPrivate::currentKeyPlatform(); + const uint platform = QKeySequencePrivate::currentKeyPlatforms(); QList <QKeySequence> list; for (uint i = 0; i < QKeySequencePrivate::numberOfKeyBindings ; ++i) { QKeyBinding keyBinding = QKeySequencePrivate::keyBindings[i]; @@ -1330,6 +1341,19 @@ int QKeySequencePrivate::decodeString(const QString &str, QKeySequence::Sequence return ret; } +unsigned QKeySequencePrivate::currentKeyPlatforms() +{ + int keyboardScheme = QPlatformTheme::WindowsKeyboardScheme; + if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()) + keyboardScheme = theme->themeHint(QPlatformTheme::KeyboardScheme).toInt(); + unsigned result = 1u << keyboardScheme; + if (keyboardScheme == QPlatformTheme::KdeKeyboardScheme + || keyboardScheme == QPlatformTheme::GnomeKeyboardScheme + || keyboardScheme == QPlatformTheme::CdeKeyboardScheme) + result |= KB_X11; + return result; +} + /*! Creates a shortcut string for \a key. For example, Qt::CTRL+Qt::Key_O gives "Ctrl+O". The strings, "Ctrl", "Shift", etc. are diff --git a/src/gui/kernel/qkeysequence_p.h b/src/gui/kernel/qkeysequence_p.h index 68cbb8778b..4481557121 100644 --- a/src/gui/kernel/qkeysequence_p.h +++ b/src/gui/kernel/qkeysequence_p.h @@ -88,6 +88,7 @@ public: static const QKeyBinding keyBindings[]; static const uint numberOfKeyBindings; + static unsigned currentKeyPlatforms(); }; #endif // QT_NO_SHORTCUT diff --git a/src/gui/kernel/qplatformtheme_qpa.cpp b/src/gui/kernel/qplatformtheme_qpa.cpp index aec465f0ff..3f6b69b902 100644 --- a/src/gui/kernel/qplatformtheme_qpa.cpp +++ b/src/gui/kernel/qplatformtheme_qpa.cpp @@ -84,6 +84,20 @@ QT_BEGIN_NAMESPACE \value StyleNames (QStringList) A list of preferred style names. + \value WindowAutoPlacement (bool) A boolean value indicating whether Windows + (particularly dialogs) are placed by the system + (see _NET_WM_FULL_PLACEMENT in X11). + + \value DialogButtonBoxLayout (int) An integer representing a + QDialogButtonBox::ButtonLayout value. + + \value DialogButtonBoxButtonsHaveIcons (bool) A boolean value indicating whether + the buttons of a QDialogButtonBox should have icons. + + \value UseFullScreenForPopupMenu (bool) Pop menus can cover the full screen including task bar. + + \value KeyboardScheme (int) An integer value (enum KeyboardSchemes) specifying the + keyboard scheme. \sa themeHint(), QStyle::pixelMetric() */ @@ -121,6 +135,14 @@ const QPalette *QPlatformTheme::palette(Palette type) const QVariant QPlatformTheme::themeHint(ThemeHint hint) const { switch (hint) { + case QPlatformTheme::UseFullScreenForPopupMenu: + return QVariant(false); + case QPlatformTheme::WindowAutoPlacement: + return QVariant(false); + case QPlatformTheme::DialogButtonBoxLayout: + return QVariant(int(0)); + case QPlatformTheme::DialogButtonBoxButtonsHaveIcons: + return QVariant(false); case QPlatformTheme::ItemViewActivateItemOnSingleClick: return QVariant(false); case QPlatformTheme::ToolButtonStyle: @@ -140,6 +162,8 @@ QVariant QPlatformTheme::themeHint(ThemeHint hint) const return QVariant(false); case MaximumScrollBarDragDistance: return QVariant(-1); + case KeyboardScheme: + return QVariant(int(WindowsKeyboardScheme)); } return QVariant(); } diff --git a/src/gui/kernel/qplatformtheme_qpa.h b/src/gui/kernel/qplatformtheme_qpa.h index 036432054e..31a52a9391 100644 --- a/src/gui/kernel/qplatformtheme_qpa.h +++ b/src/gui/kernel/qplatformtheme_qpa.h @@ -69,7 +69,12 @@ public: SystemIconThemeName, SystemIconFallbackThemeName, IconThemeSearchPaths, - StyleNames + StyleNames, + WindowAutoPlacement, + DialogButtonBoxLayout, + DialogButtonBoxButtonsHaveIcons, + UseFullScreenForPopupMenu, + KeyboardScheme }; enum DialogType { @@ -84,6 +89,16 @@ public: NPalettes }; + enum KeyboardSchemes + { + WindowsKeyboardScheme, + MacKeyboardScheme, + X11KeyboardScheme, + KdeKeyboardScheme, + GnomeKeyboardScheme, + CdeKeyboardScheme + }; + virtual QPlatformMenu *createPlatformMenu(QMenu *menu = 0) const; virtual QPlatformMenuBar *createPlatformMenuBar(QMenuBar *menuBar = 0) const; |