| Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/gui/kernel/qplatformtheme.cpp |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||
|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||
| 2 | - | |||||||
| 3 | - | |||||||
| 4 | - | |||||||
| 5 | - | |||||||
| 6 | - | |||||||
| 7 | enum KeyPlatform { | - | ||||||
| 8 | KB_Win = (1 << QPlatformTheme::WindowsKeyboardScheme), | - | ||||||
| 9 | KB_Mac = (1 << QPlatformTheme::MacKeyboardScheme), | - | ||||||
| 10 | KB_X11 = (1 << QPlatformTheme::X11KeyboardScheme), | - | ||||||
| 11 | KB_KDE = (1 << QPlatformTheme::KdeKeyboardScheme), | - | ||||||
| 12 | KB_Gnome = (1 << QPlatformTheme::GnomeKeyboardScheme), | - | ||||||
| 13 | KB_CDE = (1 << QPlatformTheme::CdeKeyboardScheme), | - | ||||||
| 14 | KB_All = 0xffff | - | ||||||
| 15 | }; | - | ||||||
| 16 | - | |||||||
| 17 | const QKeyBinding QPlatformThemePrivate::keyBindings[] = { | - | ||||||
| 18 | - | |||||||
| 19 | {QKeySequence::HelpContents, 1, Qt::CTRL | Qt::Key_Question, KB_Mac}, | - | ||||||
| 20 | {QKeySequence::HelpContents, 0, Qt::Key_F1, KB_Win | KB_X11}, | - | ||||||
| 21 | {QKeySequence::WhatsThis, 1, Qt::SHIFT | Qt::Key_F1, KB_All}, | - | ||||||
| 22 | {QKeySequence::Open, 1, Qt::CTRL | Qt::Key_O, KB_All}, | - | ||||||
| 23 | {QKeySequence::Close, 0, Qt::CTRL | Qt::Key_F4, KB_Mac}, | - | ||||||
| 24 | {QKeySequence::Close, 1, Qt::CTRL | Qt::Key_F4, KB_Win}, | - | ||||||
| 25 | {QKeySequence::Close, 1, Qt::CTRL | Qt::Key_W, KB_Mac}, | - | ||||||
| 26 | {QKeySequence::Close, 0, Qt::CTRL | Qt::Key_W, KB_Win | KB_X11}, | - | ||||||
| 27 | {QKeySequence::Save, 1, Qt::CTRL | Qt::Key_S, KB_All}, | - | ||||||
| 28 | {QKeySequence::New, 1, Qt::CTRL | Qt::Key_N, KB_All}, | - | ||||||
| 29 | {QKeySequence::Delete, 0, Qt::CTRL | Qt::Key_D, KB_X11}, | - | ||||||
| 30 | {QKeySequence::Delete, 1, Qt::Key_Delete, KB_All}, | - | ||||||
| 31 | {QKeySequence::Delete, 0, Qt::META | Qt::Key_D, KB_Mac}, | - | ||||||
| 32 | {QKeySequence::Cut, 1, Qt::CTRL | Qt::Key_X, KB_All}, | - | ||||||
| 33 | {QKeySequence::Cut, 0, Qt::SHIFT | Qt::Key_Delete, KB_Win | KB_X11}, | - | ||||||
| 34 | {QKeySequence::Cut, 0, Qt::Key_F20, KB_X11}, | - | ||||||
| 35 | {QKeySequence::Cut, 0, Qt::META | Qt::Key_K, KB_Mac}, | - | ||||||
| 36 | {QKeySequence::Copy, 0, Qt::CTRL | Qt::Key_Insert, KB_X11 | KB_Win}, | - | ||||||
| 37 | {QKeySequence::Copy, 1, Qt::CTRL | Qt::Key_C, KB_All}, | - | ||||||
| 38 | {QKeySequence::Copy, 0, Qt::Key_F16, KB_X11}, | - | ||||||
| 39 | {QKeySequence::Paste, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_Insert, KB_X11}, | - | ||||||
| 40 | {QKeySequence::Paste, 1, Qt::CTRL | Qt::Key_V, KB_All}, | - | ||||||
| 41 | {QKeySequence::Paste, 0, Qt::SHIFT | Qt::Key_Insert, KB_Win | KB_X11}, | - | ||||||
| 42 | {QKeySequence::Paste, 0, Qt::Key_F18, KB_X11}, | - | ||||||
| 43 | {QKeySequence::Paste, 0, Qt::META | Qt::Key_Y, KB_Mac}, | - | ||||||
| 44 | {QKeySequence::Undo, 0, Qt::ALT | Qt::Key_Backspace, KB_Win}, | - | ||||||
| 45 | {QKeySequence::Undo, 1, Qt::CTRL | Qt::Key_Z, KB_All}, | - | ||||||
| 46 | {QKeySequence::Undo, 0, Qt::Key_F14, KB_X11}, | - | ||||||
| 47 | {QKeySequence::Redo, 0, Qt::ALT | Qt::SHIFT | Qt::Key_Backspace,KB_Win}, | - | ||||||
| 48 | {QKeySequence::Redo, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_Z, KB_Mac}, | - | ||||||
| 49 | {QKeySequence::Redo, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_Z, KB_Win | KB_X11}, | - | ||||||
| 50 | {QKeySequence::Redo, 1, Qt::CTRL | Qt::Key_Y, KB_Win}, | - | ||||||
| 51 | {QKeySequence::Back, 1, Qt::ALT | Qt::Key_Left, KB_Win | KB_X11}, | - | ||||||
| 52 | {QKeySequence::Back, 0, Qt::CTRL | Qt::Key_Left, KB_Mac}, | - | ||||||
| 53 | {QKeySequence::Back, 1, Qt::CTRL | Qt::Key_BracketLeft, KB_Mac}, | - | ||||||
| 54 | {QKeySequence::Back, 0, Qt::Key_Backspace, KB_Win}, | - | ||||||
| 55 | {QKeySequence::Forward, 1, Qt::ALT | Qt::Key_Right, KB_Win | KB_X11}, | - | ||||||
| 56 | {QKeySequence::Forward, 0, Qt::CTRL | Qt::Key_Right, KB_Mac}, | - | ||||||
| 57 | {QKeySequence::Forward, 1, Qt::CTRL | Qt::Key_BracketRight, KB_Mac}, | - | ||||||
| 58 | {QKeySequence::Forward, 0, Qt::SHIFT | Qt::Key_Backspace, KB_Win}, | - | ||||||
| 59 | {QKeySequence::Refresh, 1, Qt::CTRL | Qt::Key_R, KB_Gnome | KB_Mac}, | - | ||||||
| 60 | {QKeySequence::Refresh, 0, Qt::Key_F5, KB_Win | KB_X11}, | - | ||||||
| 61 | {QKeySequence::ZoomIn, 1, Qt::CTRL | Qt::Key_Plus, KB_All}, | - | ||||||
| 62 | {QKeySequence::ZoomOut, 1, Qt::CTRL | Qt::Key_Minus, KB_All}, | - | ||||||
| 63 | {QKeySequence::Print, 1, Qt::CTRL | Qt::Key_P, KB_All}, | - | ||||||
| 64 | {QKeySequence::AddTab, 1, Qt::CTRL | Qt::SHIFT | Qt::Key_N, KB_KDE}, | - | ||||||
| 65 | {QKeySequence::AddTab, 0, Qt::CTRL | Qt::Key_T, KB_All}, | - | ||||||
| 66 | {QKeySequence::NextChild, 0, Qt::CTRL | Qt::Key_F6, KB_Win}, | - | ||||||
| 67 | {QKeySequence::NextChild, 0, Qt::CTRL | Qt::Key_Tab, KB_Mac}, | - | ||||||
| 68 | {QKeySequence::NextChild, 1, Qt::CTRL | Qt::Key_Tab, KB_Win | KB_X11}, | - | ||||||
| 69 | {QKeySequence::NextChild, 1, Qt::CTRL | Qt::Key_BraceRight, KB_Mac}, | - | ||||||
| 70 | {QKeySequence::NextChild, 0, Qt::CTRL | Qt::Key_Comma, KB_KDE}, | - | ||||||
| 71 | {QKeySequence::NextChild, 0, Qt::Key_Forward, KB_All}, | - | ||||||
| 72 | {QKeySequence::PreviousChild, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_F6, KB_Win}, | - | ||||||
| 73 | {QKeySequence::PreviousChild, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_Backtab, KB_Mac }, | - | ||||||
| 74 | {QKeySequence::PreviousChild, 1, Qt::CTRL | Qt::SHIFT | Qt::Key_Backtab, KB_Win | KB_X11}, | - | ||||||
| 75 | {QKeySequence::PreviousChild, 1, Qt::CTRL | Qt::Key_BraceLeft, KB_Mac}, | - | ||||||
| 76 | {QKeySequence::PreviousChild, 0, Qt::CTRL | Qt::Key_Period, KB_KDE}, | - | ||||||
| 77 | {QKeySequence::PreviousChild, 0, Qt::Key_Back, KB_All}, | - | ||||||
| 78 | {QKeySequence::Find, 0, Qt::CTRL | Qt::Key_F, KB_All}, | - | ||||||
| 79 | {QKeySequence::FindNext, 0, Qt::CTRL | Qt::Key_G, KB_Win}, | - | ||||||
| 80 | {QKeySequence::FindNext, 1, Qt::CTRL | Qt::Key_G, KB_Gnome | KB_Mac}, | - | ||||||
| 81 | {QKeySequence::FindNext, 1, Qt::Key_F3, KB_Win}, | - | ||||||
| 82 | {QKeySequence::FindNext, 0, Qt::Key_F3, KB_X11}, | - | ||||||
| 83 | {QKeySequence::FindPrevious, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_G, KB_Win}, | - | ||||||
| 84 | {QKeySequence::FindPrevious, 1, Qt::CTRL | Qt::SHIFT | Qt::Key_G, KB_Gnome | KB_Mac}, | - | ||||||
| 85 | {QKeySequence::FindPrevious, 1, Qt::SHIFT | Qt::Key_F3, KB_Win}, | - | ||||||
| 86 | {QKeySequence::FindPrevious, 0, Qt::SHIFT | Qt::Key_F3, KB_X11}, | - | ||||||
| 87 | {QKeySequence::Replace, 0, Qt::CTRL | Qt::Key_R, KB_KDE}, | - | ||||||
| 88 | {QKeySequence::Replace, 0, Qt::CTRL | Qt::Key_H, KB_Gnome}, | - | ||||||
| 89 | {QKeySequence::Replace, 0, Qt::CTRL | Qt::Key_H, KB_Win}, | - | ||||||
| 90 | {QKeySequence::SelectAll, 1, Qt::CTRL | Qt::Key_A, KB_All}, | - | ||||||
| 91 | {QKeySequence::Bold, 1, Qt::CTRL | Qt::Key_B, KB_All}, | - | ||||||
| 92 | {QKeySequence::Italic, 0, Qt::CTRL | Qt::Key_I, KB_All}, | - | ||||||
| 93 | {QKeySequence::Underline, 1, Qt::CTRL | Qt::Key_U, KB_All}, | - | ||||||
| 94 | {QKeySequence::MoveToNextChar, 1, Qt::Key_Right, KB_All}, | - | ||||||
| 95 | {QKeySequence::MoveToNextChar, 0, Qt::META | Qt::Key_F, KB_Mac}, | - | ||||||
| 96 | {QKeySequence::MoveToPreviousChar, 1, Qt::Key_Left, KB_All}, | - | ||||||
| 97 | {QKeySequence::MoveToPreviousChar, 0, Qt::META | Qt::Key_B, KB_Mac}, | - | ||||||
| 98 | {QKeySequence::MoveToNextWord, 0, Qt::ALT | Qt::Key_Right, KB_Mac}, | - | ||||||
| 99 | {QKeySequence::MoveToNextWord, 0, Qt::CTRL | Qt::Key_Right, KB_Win | KB_X11}, | - | ||||||
| 100 | {QKeySequence::MoveToPreviousWord, 0, Qt::ALT | Qt::Key_Left, KB_Mac}, | - | ||||||
| 101 | {QKeySequence::MoveToPreviousWord, 0, Qt::CTRL | Qt::Key_Left, KB_Win | KB_X11}, | - | ||||||
| 102 | {QKeySequence::MoveToNextLine, 1, Qt::Key_Down, KB_All}, | - | ||||||
| 103 | {QKeySequence::MoveToNextLine, 0, Qt::META | Qt::Key_N, KB_Mac}, | - | ||||||
| 104 | {QKeySequence::MoveToPreviousLine, 1, Qt::Key_Up, KB_All}, | - | ||||||
| 105 | {QKeySequence::MoveToPreviousLine, 0, Qt::META | Qt::Key_P, KB_Mac}, | - | ||||||
| 106 | {QKeySequence::MoveToNextPage, 0, Qt::META | Qt::Key_PageDown, KB_Mac}, | - | ||||||
| 107 | {QKeySequence::MoveToNextPage, 0, Qt::META | Qt::Key_Down, KB_Mac}, | - | ||||||
| 108 | {QKeySequence::MoveToNextPage, 0, Qt::META | Qt::Key_V, KB_Mac}, | - | ||||||
| 109 | {QKeySequence::MoveToNextPage, 0, Qt::ALT | Qt::Key_PageDown, KB_Mac }, | - | ||||||
| 110 | {QKeySequence::MoveToNextPage, 1, Qt::Key_PageDown, KB_All}, | - | ||||||
| 111 | {QKeySequence::MoveToPreviousPage, 0, Qt::META | Qt::Key_PageUp, KB_Mac}, | - | ||||||
| 112 | {QKeySequence::MoveToPreviousPage, 0, Qt::META | Qt::Key_Up, KB_Mac}, | - | ||||||
| 113 | {QKeySequence::MoveToPreviousPage, 0, Qt::ALT | Qt::Key_PageUp, KB_Mac }, | - | ||||||
| 114 | {QKeySequence::MoveToPreviousPage, 1, Qt::Key_PageUp, KB_All}, | - | ||||||
| 115 | {QKeySequence::MoveToStartOfLine, 0, Qt::META | Qt::Key_Left, KB_Mac}, | - | ||||||
| 116 | {QKeySequence::MoveToStartOfLine, 0, Qt::CTRL | Qt::Key_Left, KB_Mac }, | - | ||||||
| 117 | {QKeySequence::MoveToStartOfLine, 0, Qt::Key_Home, KB_Win | KB_X11}, | - | ||||||
| 118 | {QKeySequence::MoveToEndOfLine, 0, Qt::META | Qt::Key_Right, KB_Mac}, | - | ||||||
| 119 | {QKeySequence::MoveToEndOfLine, 0, Qt::CTRL | Qt::Key_Right, KB_Mac }, | - | ||||||
| 120 | {QKeySequence::MoveToEndOfLine, 0, Qt::Key_End, KB_Win | KB_X11}, | - | ||||||
| 121 | {QKeySequence::MoveToEndOfLine, 0, Qt::CTRL + Qt::Key_E, KB_X11}, | - | ||||||
| 122 | {QKeySequence::MoveToStartOfBlock, 0, Qt::META | Qt::Key_A, KB_Mac}, | - | ||||||
| 123 | {QKeySequence::MoveToStartOfBlock, 1, Qt::ALT | Qt::Key_Up, KB_Mac}, | - | ||||||
| 124 | {QKeySequence::MoveToEndOfBlock, 0, Qt::META | Qt::Key_E, KB_Mac}, | - | ||||||
| 125 | {QKeySequence::MoveToEndOfBlock, 1, Qt::ALT | Qt::Key_Down, KB_Mac}, | - | ||||||
| 126 | {QKeySequence::MoveToStartOfDocument, 1, Qt::CTRL | Qt::Key_Up, KB_Mac}, | - | ||||||
| 127 | {QKeySequence::MoveToStartOfDocument, 0, Qt::CTRL | Qt::Key_Home, KB_Win | KB_X11}, | - | ||||||
| 128 | {QKeySequence::MoveToStartOfDocument, 0, Qt::Key_Home, KB_Mac}, | - | ||||||
| 129 | {QKeySequence::MoveToEndOfDocument, 1, Qt::CTRL | Qt::Key_Down, KB_Mac}, | - | ||||||
| 130 | {QKeySequence::MoveToEndOfDocument, 0, Qt::CTRL | Qt::Key_End, KB_Win | KB_X11}, | - | ||||||
| 131 | {QKeySequence::MoveToEndOfDocument, 0, Qt::Key_End, KB_Mac}, | - | ||||||
| 132 | {QKeySequence::SelectNextChar, 0, Qt::SHIFT | Qt::Key_Right, KB_All}, | - | ||||||
| 133 | {QKeySequence::SelectPreviousChar, 0, Qt::SHIFT | Qt::Key_Left, KB_All}, | - | ||||||
| 134 | {QKeySequence::SelectNextWord, 0, Qt::ALT | Qt::SHIFT | Qt::Key_Right, KB_Mac}, | - | ||||||
| 135 | {QKeySequence::SelectNextWord, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_Right, KB_Win | KB_X11}, | - | ||||||
| 136 | {QKeySequence::SelectPreviousWord, 0, Qt::ALT | Qt::SHIFT | Qt::Key_Left, KB_Mac}, | - | ||||||
| 137 | {QKeySequence::SelectPreviousWord, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_Left, KB_Win | KB_X11}, | - | ||||||
| 138 | {QKeySequence::SelectNextLine, 0, Qt::SHIFT | Qt::Key_Down, KB_All}, | - | ||||||
| 139 | {QKeySequence::SelectPreviousLine, 0, Qt::SHIFT | Qt::Key_Up, KB_All}, | - | ||||||
| 140 | {QKeySequence::SelectNextPage, 0, Qt::SHIFT | Qt::Key_PageDown, KB_All}, | - | ||||||
| 141 | {QKeySequence::SelectPreviousPage, 0, Qt::SHIFT | Qt::Key_PageUp, KB_All}, | - | ||||||
| 142 | {QKeySequence::SelectStartOfLine, 0, Qt::META | Qt::SHIFT | Qt::Key_Left, KB_Mac}, | - | ||||||
| 143 | {QKeySequence::SelectStartOfLine, 1, Qt::CTRL | Qt::SHIFT | Qt::Key_Left, KB_Mac }, | - | ||||||
| 144 | {QKeySequence::SelectStartOfLine, 0, Qt::SHIFT | Qt::Key_Home, KB_Win | KB_X11}, | - | ||||||
| 145 | {QKeySequence::SelectEndOfLine, 0, Qt::META | Qt::SHIFT | Qt::Key_Right, KB_Mac}, | - | ||||||
| 146 | {QKeySequence::SelectEndOfLine, 1, Qt::CTRL | Qt::SHIFT | Qt::Key_Right, KB_Mac }, | - | ||||||
| 147 | {QKeySequence::SelectEndOfLine, 0, Qt::SHIFT | Qt::Key_End, KB_Win | KB_X11}, | - | ||||||
| 148 | {QKeySequence::SelectStartOfBlock, 1, Qt::ALT | Qt::SHIFT | Qt::Key_Up, KB_Mac}, | - | ||||||
| 149 | {QKeySequence::SelectStartOfBlock, 0, Qt::META | Qt::SHIFT | Qt::Key_A, KB_Mac}, | - | ||||||
| 150 | {QKeySequence::SelectEndOfBlock, 1, Qt::ALT | Qt::SHIFT | Qt::Key_Down, KB_Mac}, | - | ||||||
| 151 | {QKeySequence::SelectEndOfBlock, 0, Qt::META | Qt::SHIFT | Qt::Key_E, KB_Mac}, | - | ||||||
| 152 | {QKeySequence::SelectStartOfDocument, 1, Qt::CTRL | Qt::SHIFT | Qt::Key_Up, KB_Mac}, | - | ||||||
| 153 | {QKeySequence::SelectStartOfDocument, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_Home, KB_Win | KB_X11}, | - | ||||||
| 154 | {QKeySequence::SelectStartOfDocument, 0, Qt::SHIFT | Qt::Key_Home, KB_Mac}, | - | ||||||
| 155 | {QKeySequence::SelectEndOfDocument, 1, Qt::CTRL | Qt::SHIFT | Qt::Key_Down, KB_Mac}, | - | ||||||
| 156 | {QKeySequence::SelectEndOfDocument, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_End, KB_Win | KB_X11}, | - | ||||||
| 157 | {QKeySequence::SelectEndOfDocument, 0, Qt::SHIFT | Qt::Key_End, KB_Mac}, | - | ||||||
| 158 | {QKeySequence::DeleteStartOfWord, 0, Qt::ALT | Qt::Key_Backspace, KB_Mac}, | - | ||||||
| 159 | {QKeySequence::DeleteStartOfWord, 0, Qt::CTRL | Qt::Key_Backspace, KB_X11 | KB_Win}, | - | ||||||
| 160 | {QKeySequence::DeleteEndOfWord, 0, Qt::ALT | Qt::Key_Delete, KB_Mac}, | - | ||||||
| 161 | {QKeySequence::DeleteEndOfWord, 0, Qt::CTRL | Qt::Key_Delete, KB_X11 | KB_Win}, | - | ||||||
| 162 | {QKeySequence::DeleteEndOfLine, 0, Qt::CTRL | Qt::Key_K, KB_X11}, | - | ||||||
| 163 | {QKeySequence::InsertParagraphSeparator,0, Qt::Key_Enter, KB_All}, | - | ||||||
| 164 | {QKeySequence::InsertParagraphSeparator,0, Qt::Key_Return, KB_All}, | - | ||||||
| 165 | {QKeySequence::InsertLineSeparator, 0, Qt::META | Qt::Key_Enter, KB_Mac}, | - | ||||||
| 166 | {QKeySequence::InsertLineSeparator, 0, Qt::META | Qt::Key_Return, KB_Mac}, | - | ||||||
| 167 | {QKeySequence::InsertLineSeparator, 0, Qt::SHIFT | Qt::Key_Enter, KB_All}, | - | ||||||
| 168 | {QKeySequence::InsertLineSeparator, 0, Qt::SHIFT | Qt::Key_Return, KB_All}, | - | ||||||
| 169 | {QKeySequence::InsertLineSeparator, 0, Qt::META | Qt::Key_O, KB_Mac}, | - | ||||||
| 170 | {QKeySequence::SaveAs, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_S, KB_Gnome | KB_Mac}, | - | ||||||
| 171 | {QKeySequence::Preferences, 0, Qt::CTRL | Qt::Key_Comma, KB_Mac}, | - | ||||||
| 172 | {QKeySequence::Quit, 0, Qt::CTRL | Qt::Key_Q, KB_X11 | KB_Gnome | KB_KDE | KB_Mac}, | - | ||||||
| 173 | {QKeySequence::FullScreen, 1, Qt::META | Qt::CTRL | Qt::Key_F, KB_Mac}, | - | ||||||
| 174 | {QKeySequence::FullScreen, 0, Qt::ALT | Qt::Key_Enter, KB_Win}, | - | ||||||
| 175 | {QKeySequence::FullScreen, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_F, KB_KDE}, | - | ||||||
| 176 | {QKeySequence::FullScreen, 1, Qt::CTRL | Qt::Key_F11, KB_Gnome}, | - | ||||||
| 177 | {QKeySequence::FullScreen, 1, Qt::Key_F11, KB_Win | KB_KDE}, | - | ||||||
| 178 | {QKeySequence::Deselect, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_A, KB_X11}, | - | ||||||
| 179 | {QKeySequence::DeleteCompleteLine, 0, Qt::CTRL | Qt::Key_U, KB_X11}, | - | ||||||
| 180 | {QKeySequence::Backspace, 0, Qt::META | Qt::Key_H, KB_Mac}, | - | ||||||
| 181 | {QKeySequence::Cancel, 0, Qt::Key_Escape, KB_All}, | - | ||||||
| 182 | {QKeySequence::Cancel, 0, Qt::CTRL | Qt::Key_Period, KB_Mac} | - | ||||||
| 183 | }; | - | ||||||
| 184 | - | |||||||
| 185 | const uint QPlatformThemePrivate::numberOfKeyBindings = sizeof(QPlatformThemePrivate::keyBindings)/(sizeof(QKeyBinding)); | - | ||||||
| 186 | - | |||||||
| 187 | QPlatformThemePrivate::QPlatformThemePrivate() | - | ||||||
| 188 | : systemPalette(0) | - | ||||||
| 189 | { } never executed: end of block | 0 | ||||||
| 190 | - | |||||||
| 191 | QPlatformThemePrivate::~QPlatformThemePrivate() | - | ||||||
| 192 | { | - | ||||||
| 193 | delete systemPalette; | - | ||||||
| 194 | } never executed: end of block | 0 | ||||||
| 195 | - | |||||||
| 196 | __attribute__((visibility("default"))) QPalette qt_fusionPalette(); | - | ||||||
| 197 | - | |||||||
| 198 | void QPlatformThemePrivate::initializeSystemPalette() | - | ||||||
| 199 | { | - | ||||||
| 200 | ((!(!systemPalette)) ? qt_assert("!systemPalette",__FILE__,353) : qt_noop()); | - | ||||||
| 201 | systemPalette = new QPalette(qt_fusionPalette()); | - | ||||||
| 202 | } never executed: end of block | 0 | ||||||
| 203 | - | |||||||
| 204 | QPlatformTheme::QPlatformTheme() | - | ||||||
| 205 | : d_ptr(new QPlatformThemePrivate) | - | ||||||
| 206 | { | - | ||||||
| 207 | - | |||||||
| 208 | } never executed: end of block | 0 | ||||||
| 209 | - | |||||||
| 210 | QPlatformTheme::QPlatformTheme(QPlatformThemePrivate *priv) | - | ||||||
| 211 | : d_ptr(priv) | - | ||||||
| 212 | { } never executed: end of block | 0 | ||||||
| 213 | - | |||||||
| 214 | QPlatformTheme::~QPlatformTheme() | - | ||||||
| 215 | { | - | ||||||
| 216 | - | |||||||
| 217 | } | - | ||||||
| 218 | - | |||||||
| 219 | bool QPlatformTheme::usePlatformNativeDialog(DialogType type) const | - | ||||||
| 220 | { | - | ||||||
| 221 | (void)type;; | - | ||||||
| 222 | return never executed: false;return false;never executed: return false; | 0 | ||||||
| 223 | } | - | ||||||
| 224 | - | |||||||
| 225 | QPlatformDialogHelper *QPlatformTheme::createPlatformDialogHelper(DialogType type) const | - | ||||||
| 226 | { | - | ||||||
| 227 | (void)type;; | - | ||||||
| 228 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||
| 229 | } | - | ||||||
| 230 | - | |||||||
| 231 | const QPalette *QPlatformTheme::palette(Palette type) const | - | ||||||
| 232 | { | - | ||||||
| 233 | const QPlatformThemePrivate * const d = d_func(); | - | ||||||
| 234 | if (type == QPlatformTheme::SystemPalette
| 0 | ||||||
| 235 | if (!d->systemPalette
| 0 | ||||||
| 236 | const_cast< never executed: QPlatformTheme *>(this)->d_ptr->initializeSystemPalette();const_cast<QPlatformTheme *>(this)->d_ptr->initializeSystemPalette();never executed: const_cast<QPlatformTheme *>(this)->d_ptr->initializeSystemPalette(); | 0 | ||||||
| 237 | return never executed: d->systemPalette;return d->systemPalette;never executed: return d->systemPalette; | 0 | ||||||
| 238 | } | - | ||||||
| 239 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||
| 240 | } | - | ||||||
| 241 | - | |||||||
| 242 | const QFont *QPlatformTheme::font(Font type) const | - | ||||||
| 243 | { | - | ||||||
| 244 | (void)type; | - | ||||||
| 245 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||
| 246 | } | - | ||||||
| 247 | - | |||||||
| 248 | QPixmap QPlatformTheme::standardPixmap(StandardPixmap sp, const QSizeF &size) const | - | ||||||
| 249 | { | - | ||||||
| 250 | (void)sp;; | - | ||||||
| 251 | (void)size;; | - | ||||||
| 252 | - | |||||||
| 253 | return never executed: QPixmap();return QPixmap();never executed: return QPixmap(); | 0 | ||||||
| 254 | } | - | ||||||
| 255 | - | |||||||
| 256 | QPixmap QPlatformTheme::fileIconPixmap(const QFileInfo &fileInfo, const QSizeF &size, | - | ||||||
| 257 | QPlatformTheme::IconOptions iconOptions) const | - | ||||||
| 258 | { | - | ||||||
| 259 | (void)fileInfo;; | - | ||||||
| 260 | (void)size;; | - | ||||||
| 261 | (void)iconOptions;; | - | ||||||
| 262 | - | |||||||
| 263 | return never executed: QPixmap();return QPixmap();never executed: return QPixmap(); | 0 | ||||||
| 264 | } | - | ||||||
| 265 | - | |||||||
| 266 | QVariant QPlatformTheme::themeHint(ThemeHint hint) const | - | ||||||
| 267 | { | - | ||||||
| 268 | - | |||||||
| 269 | - | |||||||
| 270 | - | |||||||
| 271 | - | |||||||
| 272 | switch (hint) { | - | ||||||
| 273 | case never executed: QPlatformTheme::CursorFlashTime:case QPlatformTheme::CursorFlashTime:never executed: case QPlatformTheme::CursorFlashTime: | 0 | ||||||
| 274 | return never executed: QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::CursorFlashTime);return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::CursorFlashTime);never executed: return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::CursorFlashTime); | 0 | ||||||
| 275 | case never executed: QPlatformTheme::KeyboardInputInterval:case QPlatformTheme::KeyboardInputInterval:never executed: case QPlatformTheme::KeyboardInputInterval: | 0 | ||||||
| 276 | return never executed: QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::KeyboardInputInterval);return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::KeyboardInputInterval);never executed: return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::KeyboardInputInterval); | 0 | ||||||
| 277 | case never executed: QPlatformTheme::KeyboardAutoRepeatRate:case QPlatformTheme::KeyboardAutoRepeatRate:never executed: case QPlatformTheme::KeyboardAutoRepeatRate: | 0 | ||||||
| 278 | return never executed: QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::KeyboardAutoRepeatRate);return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::KeyboardAutoRepeatRate);never executed: return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::KeyboardAutoRepeatRate); | 0 | ||||||
| 279 | case never executed: QPlatformTheme::MouseDoubleClickInterval:case QPlatformTheme::MouseDoubleClickInterval:never executed: case QPlatformTheme::MouseDoubleClickInterval: | 0 | ||||||
| 280 | return never executed: QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::MouseDoubleClickInterval);return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::MouseDoubleClickInterval);never executed: return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::MouseDoubleClickInterval); | 0 | ||||||
| 281 | case never executed: QPlatformTheme::StartDragDistance:case QPlatformTheme::StartDragDistance:never executed: case QPlatformTheme::StartDragDistance: | 0 | ||||||
| 282 | return never executed: QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::StartDragDistance);return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::StartDragDistance);never executed: return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::StartDragDistance); | 0 | ||||||
| 283 | case never executed: QPlatformTheme::StartDragTime:case QPlatformTheme::StartDragTime:never executed: case QPlatformTheme::StartDragTime: | 0 | ||||||
| 284 | return never executed: QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::StartDragTime);return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::StartDragTime);never executed: return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::StartDragTime); | 0 | ||||||
| 285 | case never executed: QPlatformTheme::StartDragVelocity:case QPlatformTheme::StartDragVelocity:never executed: case QPlatformTheme::StartDragVelocity: | 0 | ||||||
| 286 | return never executed: QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::StartDragVelocity);return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::StartDragVelocity);never executed: return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::StartDragVelocity); | 0 | ||||||
| 287 | case never executed: QPlatformTheme::PasswordMaskDelay:case QPlatformTheme::PasswordMaskDelay:never executed: case QPlatformTheme::PasswordMaskDelay: | 0 | ||||||
| 288 | return never executed: QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::PasswordMaskDelay);return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::PasswordMaskDelay);never executed: return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::PasswordMaskDelay); | 0 | ||||||
| 289 | case never executed: QPlatformTheme::PasswordMaskCharacter:case QPlatformTheme::PasswordMaskCharacter:never executed: case QPlatformTheme::PasswordMaskCharacter: | 0 | ||||||
| 290 | return never executed: QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::PasswordMaskCharacter);return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::PasswordMaskCharacter);never executed: return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::PasswordMaskCharacter); | 0 | ||||||
| 291 | case never executed: QPlatformTheme::MousePressAndHoldInterval:case QPlatformTheme::MousePressAndHoldInterval:never executed: case QPlatformTheme::MousePressAndHoldInterval: | 0 | ||||||
| 292 | return never executed: QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::MousePressAndHoldInterval);return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::MousePressAndHoldInterval);never executed: return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::MousePressAndHoldInterval); | 0 | ||||||
| 293 | case never executed: QPlatformTheme::ItemViewActivateItemOnSingleClick:case QPlatformTheme::ItemViewActivateItemOnSingleClick:never executed: case QPlatformTheme::ItemViewActivateItemOnSingleClick: | 0 | ||||||
| 294 | return never executed: QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::ItemViewActivateItemOnSingleClick);return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::ItemViewActivateItemOnSingleClick);never executed: return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::ItemViewActivateItemOnSingleClick); | 0 | ||||||
| 295 | default never executed: :default:never executed: default: | 0 | ||||||
| 296 | return never executed: QPlatformTheme::defaultThemeHint(hint);return QPlatformTheme::defaultThemeHint(hint);never executed: return QPlatformTheme::defaultThemeHint(hint); | 0 | ||||||
| 297 | } | - | ||||||
| 298 | } | - | ||||||
| 299 | - | |||||||
| 300 | QVariant QPlatformTheme::defaultThemeHint(ThemeHint hint) | - | ||||||
| 301 | { | - | ||||||
| 302 | switch (hint) { | - | ||||||
| 303 | case never executed: QPlatformTheme::CursorFlashTime:case QPlatformTheme::CursorFlashTime:never executed: case QPlatformTheme::CursorFlashTime: | 0 | ||||||
| 304 | return never executed: QVariant(1000);return QVariant(1000);never executed: return QVariant(1000); | 0 | ||||||
| 305 | case never executed: QPlatformTheme::KeyboardInputInterval:case QPlatformTheme::KeyboardInputInterval:never executed: case QPlatformTheme::KeyboardInputInterval: | 0 | ||||||
| 306 | return never executed: QVariant(400);return QVariant(400);never executed: return QVariant(400); | 0 | ||||||
| 307 | case never executed: QPlatformTheme::KeyboardAutoRepeatRate:case QPlatformTheme::KeyboardAutoRepeatRate:never executed: case QPlatformTheme::KeyboardAutoRepeatRate: | 0 | ||||||
| 308 | return never executed: QVariant(30);return QVariant(30);never executed: return QVariant(30); | 0 | ||||||
| 309 | case never executed: QPlatformTheme::MouseDoubleClickInterval:case QPlatformTheme::MouseDoubleClickInterval:never executed: case QPlatformTheme::MouseDoubleClickInterval: | 0 | ||||||
| 310 | return never executed: QVariant(400);return QVariant(400);never executed: return QVariant(400); | 0 | ||||||
| 311 | case never executed: QPlatformTheme::StartDragDistance:case QPlatformTheme::StartDragDistance:never executed: case QPlatformTheme::StartDragDistance: | 0 | ||||||
| 312 | return never executed: QVariant(10);return QVariant(10);never executed: return QVariant(10); | 0 | ||||||
| 313 | case never executed: QPlatformTheme::StartDragTime:case QPlatformTheme::StartDragTime:never executed: case QPlatformTheme::StartDragTime: | 0 | ||||||
| 314 | return never executed: QVariant(500);return QVariant(500);never executed: return QVariant(500); | 0 | ||||||
| 315 | case never executed: QPlatformTheme::PasswordMaskDelay:case QPlatformTheme::PasswordMaskDelay:never executed: case QPlatformTheme::PasswordMaskDelay: | 0 | ||||||
| 316 | return never executed: QVariant(int(0));return QVariant(int(0));never executed: return QVariant(int(0)); | 0 | ||||||
| 317 | case never executed: QPlatformTheme::PasswordMaskCharacter:case QPlatformTheme::PasswordMaskCharacter:never executed: case QPlatformTheme::PasswordMaskCharacter: | 0 | ||||||
| 318 | return never executed: QVariant(QChar(0x25CF));return QVariant(QChar(0x25CF));never executed: return QVariant(QChar(0x25CF)); | 0 | ||||||
| 319 | case never executed: QPlatformTheme::StartDragVelocity:case QPlatformTheme::StartDragVelocity:never executed: case QPlatformTheme::StartDragVelocity: | 0 | ||||||
| 320 | return never executed: QVariant(int(0));return QVariant(int(0));never executed: return QVariant(int(0)); | 0 | ||||||
| 321 | case never executed: QPlatformTheme::UseFullScreenForPopupMenu:case QPlatformTheme::UseFullScreenForPopupMenu:never executed: case QPlatformTheme::UseFullScreenForPopupMenu: | 0 | ||||||
| 322 | return never executed: QVariant(false);return QVariant(false);never executed: return QVariant(false); | 0 | ||||||
| 323 | case never executed: QPlatformTheme::WindowAutoPlacement:case QPlatformTheme::WindowAutoPlacement:never executed: case QPlatformTheme::WindowAutoPlacement: | 0 | ||||||
| 324 | return never executed: QVariant(false);return QVariant(false);never executed: return QVariant(false); | 0 | ||||||
| 325 | case never executed: QPlatformTheme::DialogButtonBoxLayout:case QPlatformTheme::DialogButtonBoxLayout:never executed: case QPlatformTheme::DialogButtonBoxLayout: | 0 | ||||||
| 326 | return never executed: QVariant(int(0));return QVariant(int(0));never executed: return QVariant(int(0)); | 0 | ||||||
| 327 | case never executed: QPlatformTheme::DialogButtonBoxButtonsHaveIcons:case QPlatformTheme::DialogButtonBoxButtonsHaveIcons:never executed: case QPlatformTheme::DialogButtonBoxButtonsHaveIcons: | 0 | ||||||
| 328 | return never executed: QVariant(false);return QVariant(false);never executed: return QVariant(false); | 0 | ||||||
| 329 | case never executed: QPlatformTheme::ItemViewActivateItemOnSingleClick:case QPlatformTheme::ItemViewActivateItemOnSingleClick:never executed: case QPlatformTheme::ItemViewActivateItemOnSingleClick: | 0 | ||||||
| 330 | return never executed: QVariant(false);return QVariant(false);never executed: return QVariant(false); | 0 | ||||||
| 331 | case never executed: QPlatformTheme::ToolButtonStyle:case QPlatformTheme::ToolButtonStyle:never executed: case QPlatformTheme::ToolButtonStyle: | 0 | ||||||
| 332 | return never executed: QVariant(int(Qt::ToolButtonIconOnly));return QVariant(int(Qt::ToolButtonIconOnly));never executed: return QVariant(int(Qt::ToolButtonIconOnly)); | 0 | ||||||
| 333 | case never executed: QPlatformTheme::ToolBarIconSize:case QPlatformTheme::ToolBarIconSize:never executed: case QPlatformTheme::ToolBarIconSize: | 0 | ||||||
| 334 | return never executed: QVariant(int(0));return QVariant(int(0));never executed: return QVariant(int(0)); | 0 | ||||||
| 335 | case never executed: QPlatformTheme::SystemIconThemeName:case QPlatformTheme::SystemIconThemeName:never executed: case QPlatformTheme::SystemIconThemeName: | 0 | ||||||
| 336 | case never executed: QPlatformTheme::SystemIconFallbackThemeName:case QPlatformTheme::SystemIconFallbackThemeName:never executed: case QPlatformTheme::SystemIconFallbackThemeName: | 0 | ||||||
| 337 | return never executed: QVariant(QString());return QVariant(QString());never executed: return QVariant(QString()); | 0 | ||||||
| 338 | case never executed: QPlatformTheme::IconThemeSearchPaths:case QPlatformTheme::IconThemeSearchPaths:never executed: case QPlatformTheme::IconThemeSearchPaths: | 0 | ||||||
| 339 | return never executed: QVariant(QStringList());return QVariant(QStringList());never executed: return QVariant(QStringList()); | 0 | ||||||
| 340 | case never executed: QPlatformTheme::StyleNames:case QPlatformTheme::StyleNames:never executed: case QPlatformTheme::StyleNames: | 0 | ||||||
| 341 | return never executed: QVariant(QStringList());return QVariant(QStringList());never executed: return QVariant(QStringList()); | 0 | ||||||
| 342 | case never executed: TextCursorWidth:case TextCursorWidth:never executed: case TextCursorWidth: | 0 | ||||||
| 343 | return never executed: QVariant(1);return QVariant(1);never executed: return QVariant(1); | 0 | ||||||
| 344 | case never executed: DropShadow:case DropShadow:never executed: case DropShadow: | 0 | ||||||
| 345 | return never executed: QVariant(false);return QVariant(false);never executed: return QVariant(false); | 0 | ||||||
| 346 | case never executed: MaximumScrollBarDragDistance:case MaximumScrollBarDragDistance:never executed: case MaximumScrollBarDragDistance: | 0 | ||||||
| 347 | return never executed: QVariant(-1);return QVariant(-1);never executed: return QVariant(-1); | 0 | ||||||
| 348 | case never executed: KeyboardScheme:case KeyboardScheme:never executed: case KeyboardScheme: | 0 | ||||||
| 349 | return never executed: QVariant(int(WindowsKeyboardScheme));return QVariant(int(WindowsKeyboardScheme));never executed: return QVariant(int(WindowsKeyboardScheme)); | 0 | ||||||
| 350 | case never executed: UiEffects:case UiEffects:never executed: case UiEffects: | 0 | ||||||
| 351 | return never executed: QVariant(int(0));return QVariant(int(0));never executed: return QVariant(int(0)); | 0 | ||||||
| 352 | case never executed: SpellCheckUnderlineStyle:case SpellCheckUnderlineStyle:never executed: case SpellCheckUnderlineStyle: | 0 | ||||||
| 353 | return never executed: QVariant(int(QTextCharFormat::SpellCheckUnderline));return QVariant(int(QTextCharFormat::SpellCheckUnderline));never executed: return QVariant(int(QTextCharFormat::SpellCheckUnderline)); | 0 | ||||||
| 354 | case never executed: TabFocusBehavior:case TabFocusBehavior:never executed: case TabFocusBehavior: | 0 | ||||||
| 355 | return never executed: QVariant(int(Qt::TabFocusAllControls));return QVariant(int(Qt::TabFocusAllControls));never executed: return QVariant(int(Qt::TabFocusAllControls)); | 0 | ||||||
| 356 | case never executed: IconPixmapSizes:case IconPixmapSizes:never executed: case IconPixmapSizes: | 0 | ||||||
| 357 | return never executed: QVariant::fromValue(QList<int>());return QVariant::fromValue(QList<int>());never executed: return QVariant::fromValue(QList<int>()); | 0 | ||||||
| 358 | case never executed: DialogSnapToDefaultButton:case DialogSnapToDefaultButton:never executed: case DialogSnapToDefaultButton: | 0 | ||||||
| 359 | case never executed: ContextMenuOnMouseRelease:case ContextMenuOnMouseRelease:never executed: case ContextMenuOnMouseRelease: | 0 | ||||||
| 360 | return never executed: QVariant(false);return QVariant(false);never executed: return QVariant(false); | 0 | ||||||
| 361 | case never executed: MousePressAndHoldInterval:case MousePressAndHoldInterval:never executed: case MousePressAndHoldInterval: | 0 | ||||||
| 362 | return never executed: QVariant(800);return QVariant(800);never executed: return QVariant(800); | 0 | ||||||
| 363 | case never executed: MouseDoubleClickDistance:case MouseDoubleClickDistance:never executed: case MouseDoubleClickDistance: | 0 | ||||||
| 364 | { | - | ||||||
| 365 | bool ok = false; | - | ||||||
| 366 | const int dist = qEnvironmentVariableIntValue("QT_DBL_CLICK_DIST", &ok); | - | ||||||
| 367 | return never executed: QVariant(ok ? dist : 5);return QVariant(ok ? dist : 5);never executed: return QVariant(ok ? dist : 5); | 0 | ||||||
| 368 | } | - | ||||||
| 369 | case never executed: WheelScrollLines:case WheelScrollLines:never executed: case WheelScrollLines: | 0 | ||||||
| 370 | return never executed: QVariant(3);return QVariant(3);never executed: return QVariant(3); | 0 | ||||||
| 371 | } | - | ||||||
| 372 | return never executed: QVariant();return QVariant();never executed: return QVariant(); | 0 | ||||||
| 373 | } | - | ||||||
| 374 | - | |||||||
| 375 | QPlatformMenuItem *QPlatformTheme::createPlatformMenuItem() const | - | ||||||
| 376 | { | - | ||||||
| 377 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||
| 378 | } | - | ||||||
| 379 | - | |||||||
| 380 | QPlatformMenu *QPlatformTheme::createPlatformMenu() const | - | ||||||
| 381 | { | - | ||||||
| 382 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||
| 383 | } | - | ||||||
| 384 | - | |||||||
| 385 | QPlatformMenuBar *QPlatformTheme::createPlatformMenuBar() const | - | ||||||
| 386 | { | - | ||||||
| 387 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||
| 388 | } | - | ||||||
| 389 | - | |||||||
| 390 | - | |||||||
| 391 | - | |||||||
| 392 | - | |||||||
| 393 | - | |||||||
| 394 | - | |||||||
| 395 | QPlatformSystemTrayIcon *QPlatformTheme::createPlatformSystemTrayIcon() const | - | ||||||
| 396 | { | - | ||||||
| 397 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||
| 398 | } | - | ||||||
| 399 | QIconEngine *QPlatformTheme::createIconEngine(const QString &iconName) const | - | ||||||
| 400 | { | - | ||||||
| 401 | return never executed: new QIconLoaderEngine(iconName);return new QIconLoaderEngine(iconName);never executed: return new QIconLoaderEngine(iconName); | 0 | ||||||
| 402 | } | - | ||||||
| 403 | struct ByStandardKey { | - | ||||||
| 404 | typedef bool result_type; | - | ||||||
| 405 | - | |||||||
| 406 | bool operator()(QKeySequence::StandardKey lhs, QKeySequence::StandardKey rhs) const | - | ||||||
| 407 | { return never executed: lhs < rhs;return lhs < rhs;never executed: }return lhs < rhs; | 0 | ||||||
| 408 | - | |||||||
| 409 | bool operator()(const QKeyBinding& lhs, const QKeyBinding& rhs) const | - | ||||||
| 410 | { return never executed: operator()(lhs.standardKey, rhs.standardKey);return operator()(lhs.standardKey, rhs.standardKey);never executed: }return operator()(lhs.standardKey, rhs.standardKey); | 0 | ||||||
| 411 | - | |||||||
| 412 | bool operator()(QKeySequence::StandardKey lhs, const QKeyBinding& rhs) const | - | ||||||
| 413 | { return never executed: operator()(lhs, rhs.standardKey);return operator()(lhs, rhs.standardKey);never executed: }return operator()(lhs, rhs.standardKey); | 0 | ||||||
| 414 | - | |||||||
| 415 | bool operator()(const QKeyBinding& lhs, QKeySequence::StandardKey rhs) const | - | ||||||
| 416 | { return never executed: operator()(lhs.standardKey, rhs);return operator()(lhs.standardKey, rhs);never executed: }return operator()(lhs.standardKey, rhs); | 0 | ||||||
| 417 | }; | - | ||||||
| 418 | - | |||||||
| 419 | - | |||||||
| 420 | - | |||||||
| 421 | - | |||||||
| 422 | - | |||||||
| 423 | - | |||||||
| 424 | QList<QKeySequence> QPlatformTheme::keyBindings(QKeySequence::StandardKey key) const | - | ||||||
| 425 | { | - | ||||||
| 426 | const uint platform = QPlatformThemePrivate::currentKeyPlatforms(); | - | ||||||
| 427 | QList <QKeySequence> list; | - | ||||||
| 428 | - | |||||||
| 429 | std::pair<const QKeyBinding *, const QKeyBinding *> range = | - | ||||||
| 430 | std::equal_range(QPlatformThemePrivate::keyBindings, | - | ||||||
| 431 | QPlatformThemePrivate::keyBindings + QPlatformThemePrivate::numberOfKeyBindings, | - | ||||||
| 432 | key, ByStandardKey()); | - | ||||||
| 433 | - | |||||||
| 434 | for (const QKeyBinding *it = range.first; it < range.second
| 0 | ||||||
| 435 | if (!(it->platform & platform)
| 0 | ||||||
| 436 | continue; never executed: continue; | 0 | ||||||
| 437 | - | |||||||
| 438 | uint shortcut = | - | ||||||
| 439 | - | |||||||
| 440 | - | |||||||
| 441 | - | |||||||
| 442 | it->shortcut; | - | ||||||
| 443 | - | |||||||
| 444 | if (it->priority > 0
| 0 | ||||||
| 445 | list.prepend(QKeySequence(shortcut)); never executed: list.prepend(QKeySequence(shortcut)); | 0 | ||||||
| 446 | else | - | ||||||
| 447 | list.append(QKeySequence(shortcut)); never executed: list.append(QKeySequence(shortcut)); | 0 | ||||||
| 448 | } | - | ||||||
| 449 | - | |||||||
| 450 | return never executed: list;return list;never executed: return list; | 0 | ||||||
| 451 | } | - | ||||||
| 452 | QString QPlatformTheme::standardButtonText(int button) const | - | ||||||
| 453 | { | - | ||||||
| 454 | return never executed: QPlatformTheme::defaultStandardButtonText(button);return QPlatformTheme::defaultStandardButtonText(button);never executed: return QPlatformTheme::defaultStandardButtonText(button); | 0 | ||||||
| 455 | } | - | ||||||
| 456 | - | |||||||
| 457 | QString QPlatformTheme::defaultStandardButtonText(int button) | - | ||||||
| 458 | { | - | ||||||
| 459 | switch (button) { | - | ||||||
| 460 | case never executed: QPlatformDialogHelper::Ok:case QPlatformDialogHelper::Ok:never executed: case QPlatformDialogHelper::Ok: | 0 | ||||||
| 461 | return never executed: QCoreApplication::translate("QPlatformTheme", "OK");return QCoreApplication::translate("QPlatformTheme", "OK");never executed: return QCoreApplication::translate("QPlatformTheme", "OK"); | 0 | ||||||
| 462 | case never executed: QPlatformDialogHelper::Save:case QPlatformDialogHelper::Save:never executed: case QPlatformDialogHelper::Save: | 0 | ||||||
| 463 | return never executed: QCoreApplication::translate("QPlatformTheme", "Save");return QCoreApplication::translate("QPlatformTheme", "Save");never executed: return QCoreApplication::translate("QPlatformTheme", "Save"); | 0 | ||||||
| 464 | case never executed: QPlatformDialogHelper::SaveAll:case QPlatformDialogHelper::SaveAll:never executed: case QPlatformDialogHelper::SaveAll: | 0 | ||||||
| 465 | return never executed: QCoreApplication::translate("QPlatformTheme", "Save All");return QCoreApplication::translate("QPlatformTheme", "Save All");never executed: return QCoreApplication::translate("QPlatformTheme", "Save All"); | 0 | ||||||
| 466 | case never executed: QPlatformDialogHelper::Open:case QPlatformDialogHelper::Open:never executed: case QPlatformDialogHelper::Open: | 0 | ||||||
| 467 | return never executed: QCoreApplication::translate("QPlatformTheme", "Open");return QCoreApplication::translate("QPlatformTheme", "Open");never executed: return QCoreApplication::translate("QPlatformTheme", "Open"); | 0 | ||||||
| 468 | case never executed: QPlatformDialogHelper::Yes:case QPlatformDialogHelper::Yes:never executed: case QPlatformDialogHelper::Yes: | 0 | ||||||
| 469 | return never executed: QCoreApplication::translate("QPlatformTheme", "&Yes");return QCoreApplication::translate("QPlatformTheme", "&Yes");never executed: return QCoreApplication::translate("QPlatformTheme", "&Yes"); | 0 | ||||||
| 470 | case never executed: QPlatformDialogHelper::YesToAll:case QPlatformDialogHelper::YesToAll:never executed: case QPlatformDialogHelper::YesToAll: | 0 | ||||||
| 471 | return never executed: QCoreApplication::translate("QPlatformTheme", "Yes to &All");return QCoreApplication::translate("QPlatformTheme", "Yes to &All");never executed: return QCoreApplication::translate("QPlatformTheme", "Yes to &All"); | 0 | ||||||
| 472 | case never executed: QPlatformDialogHelper::No:case QPlatformDialogHelper::No:never executed: case QPlatformDialogHelper::No: | 0 | ||||||
| 473 | return never executed: QCoreApplication::translate("QPlatformTheme", "&No");return QCoreApplication::translate("QPlatformTheme", "&No");never executed: return QCoreApplication::translate("QPlatformTheme", "&No"); | 0 | ||||||
| 474 | case never executed: QPlatformDialogHelper::NoToAll:case QPlatformDialogHelper::NoToAll:never executed: case QPlatformDialogHelper::NoToAll: | 0 | ||||||
| 475 | return never executed: QCoreApplication::translate("QPlatformTheme", "N&o to All");return QCoreApplication::translate("QPlatformTheme", "N&o to All");never executed: return QCoreApplication::translate("QPlatformTheme", "N&o to All"); | 0 | ||||||
| 476 | case never executed: QPlatformDialogHelper::Abort:case QPlatformDialogHelper::Abort:never executed: case QPlatformDialogHelper::Abort: | 0 | ||||||
| 477 | return never executed: QCoreApplication::translate("QPlatformTheme", "Abort");return QCoreApplication::translate("QPlatformTheme", "Abort");never executed: return QCoreApplication::translate("QPlatformTheme", "Abort"); | 0 | ||||||
| 478 | case never executed: QPlatformDialogHelper::Retry:case QPlatformDialogHelper::Retry:never executed: case QPlatformDialogHelper::Retry: | 0 | ||||||
| 479 | return never executed: QCoreApplication::translate("QPlatformTheme", "Retry");return QCoreApplication::translate("QPlatformTheme", "Retry");never executed: return QCoreApplication::translate("QPlatformTheme", "Retry"); | 0 | ||||||
| 480 | case never executed: QPlatformDialogHelper::Ignore:case QPlatformDialogHelper::Ignore:never executed: case QPlatformDialogHelper::Ignore: | 0 | ||||||
| 481 | return never executed: QCoreApplication::translate("QPlatformTheme", "Ignore");return QCoreApplication::translate("QPlatformTheme", "Ignore");never executed: return QCoreApplication::translate("QPlatformTheme", "Ignore"); | 0 | ||||||
| 482 | case never executed: QPlatformDialogHelper::Close:case QPlatformDialogHelper::Close:never executed: case QPlatformDialogHelper::Close: | 0 | ||||||
| 483 | return never executed: QCoreApplication::translate("QPlatformTheme", "Close");return QCoreApplication::translate("QPlatformTheme", "Close");never executed: return QCoreApplication::translate("QPlatformTheme", "Close"); | 0 | ||||||
| 484 | case never executed: QPlatformDialogHelper::Cancel:case QPlatformDialogHelper::Cancel:never executed: case QPlatformDialogHelper::Cancel: | 0 | ||||||
| 485 | return never executed: QCoreApplication::translate("QPlatformTheme", "Cancel");return QCoreApplication::translate("QPlatformTheme", "Cancel");never executed: return QCoreApplication::translate("QPlatformTheme", "Cancel"); | 0 | ||||||
| 486 | case never executed: QPlatformDialogHelper::Discard:case QPlatformDialogHelper::Discard:never executed: case QPlatformDialogHelper::Discard: | 0 | ||||||
| 487 | return never executed: QCoreApplication::translate("QPlatformTheme", "Discard");return QCoreApplication::translate("QPlatformTheme", "Discard");never executed: return QCoreApplication::translate("QPlatformTheme", "Discard"); | 0 | ||||||
| 488 | case never executed: QPlatformDialogHelper::Help:case QPlatformDialogHelper::Help:never executed: case QPlatformDialogHelper::Help: | 0 | ||||||
| 489 | return never executed: QCoreApplication::translate("QPlatformTheme", "Help");return QCoreApplication::translate("QPlatformTheme", "Help");never executed: return QCoreApplication::translate("QPlatformTheme", "Help"); | 0 | ||||||
| 490 | case never executed: QPlatformDialogHelper::Apply:case QPlatformDialogHelper::Apply:never executed: case QPlatformDialogHelper::Apply: | 0 | ||||||
| 491 | return never executed: QCoreApplication::translate("QPlatformTheme", "Apply");return QCoreApplication::translate("QPlatformTheme", "Apply");never executed: return QCoreApplication::translate("QPlatformTheme", "Apply"); | 0 | ||||||
| 492 | case never executed: QPlatformDialogHelper::Reset:case QPlatformDialogHelper::Reset:never executed: case QPlatformDialogHelper::Reset: | 0 | ||||||
| 493 | return never executed: QCoreApplication::translate("QPlatformTheme", "Reset");return QCoreApplication::translate("QPlatformTheme", "Reset");never executed: return QCoreApplication::translate("QPlatformTheme", "Reset"); | 0 | ||||||
| 494 | case never executed: QPlatformDialogHelper::RestoreDefaults:case QPlatformDialogHelper::RestoreDefaults:never executed: case QPlatformDialogHelper::RestoreDefaults: | 0 | ||||||
| 495 | return never executed: QCoreApplication::translate("QPlatformTheme", "Restore Defaults");return QCoreApplication::translate("QPlatformTheme", "Restore Defaults");never executed: return QCoreApplication::translate("QPlatformTheme", "Restore Defaults"); | 0 | ||||||
| 496 | default never executed: :default:never executed: default: | 0 | ||||||
| 497 | break; never executed: break; | 0 | ||||||
| 498 | } | - | ||||||
| 499 | return never executed: QString();return QString();never executed: return QString(); | 0 | ||||||
| 500 | } | - | ||||||
| 501 | - | |||||||
| 502 | unsigned QPlatformThemePrivate::currentKeyPlatforms() | - | ||||||
| 503 | { | - | ||||||
| 504 | const uint keyboardScheme = QGuiApplicationPrivate::platformTheme()->themeHint(QPlatformTheme::KeyboardScheme).toInt(); | - | ||||||
| 505 | unsigned result = 1u << keyboardScheme; | - | ||||||
| 506 | if (keyboardScheme == QPlatformTheme::KdeKeyboardScheme
| 0 | ||||||
| 507 | || keyboardScheme == QPlatformTheme::GnomeKeyboardScheme
| 0 | ||||||
| 508 | || keyboardScheme == QPlatformTheme::CdeKeyboardScheme
| 0 | ||||||
| 509 | result |= KB_X11; never executed: result |= KB_X11; | 0 | ||||||
| 510 | return never executed: result;return result;never executed: return result; | 0 | ||||||
| 511 | } | - | ||||||
| 512 | - | |||||||
| 513 | - | |||||||
| Switch to Source code | Preprocessed file |