| 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 | { } | - |
| 190 | | - |
| 191 | QPlatformThemePrivate::~QPlatformThemePrivate() | - |
| 192 | { | - |
| 193 | delete systemPalette; | - |
| 194 | } | - |
| 195 | | - |
| 196 | __attribute__((visibility("default"))) QPalette qt_fusionPalette(); | - |
| 197 | | - |
| 198 | void QPlatformThemePrivate::initializeSystemPalette() | - |
| 199 | { | - |
| 200 | ((!(!systemPalette)) ? qt_assert("!systemPalette",__FILE__,353359) : qt_noop()); | - |
| 201 | systemPalette = new QPalette(qt_fusionPalette()); | - |
| 202 | } | - |
| 203 | | - |
| 204 | QPlatformTheme::QPlatformTheme() | - |
| 205 | : d_ptr(new QPlatformThemePrivate) | - |
| 206 | { | - |
| 207 | | - |
| 208 | } | - |
| 209 | | - |
| 210 | QPlatformTheme::QPlatformTheme(QPlatformThemePrivate *priv) | - |
| 211 | : d_ptr(priv) | - |
| 212 | { } | - |
| 213 | | - |
| 214 | QPlatformTheme::~QPlatformTheme() | - |
| 215 | { | - |
| 216 | | - |
| 217 | } | - |
| 218 | | - |
| 219 | bool QPlatformTheme::usePlatformNativeDialog(DialogType type) const | - |
| 220 | { | - |
| 221 | (void)type;; | - |
| 222 | return false; | - |
| 223 | } | - |
| 224 | | - |
| 225 | QPlatformDialogHelper *QPlatformTheme::createPlatformDialogHelper(DialogType type) const | - |
| 226 | { | - |
| 227 | (void)type;; | - |
| 228 | return 0; | - |
| 229 | } | - |
| 230 | | - |
| 231 | const QPalette *QPlatformTheme::palette(Palette type) const | - |
| 232 | { | - |
| 233 | const QPlatformThemePrivate * const d = d_func(); | - |
| 234 | if (type == QPlatformTheme::SystemPalette) { | - |
| 235 | if (!d->systemPalette) | - |
| 236 | const_cast<QPlatformTheme *>(this)->d_ptr->initializeSystemPalette(); | - |
| 237 | return d->systemPalette; | - |
| 238 | } | - |
| 239 | return 0; | - |
| 240 | } | - |
| 241 | | - |
| 242 | const QFont *QPlatformTheme::font(Font type) const | - |
| 243 | { | - |
| 244 | (void)type; | - |
| 245 | return 0; | - |
| 246 | } | - |
| 247 | | - |
| 248 | QPixmap QPlatformTheme::standardPixmap(StandardPixmap sp, const QSizeF &size) const | - |
| 249 | { | - |
| 250 | (void)sp;; | - |
| 251 | (void)size;; | - |
| 252 | | - |
| 253 | return QPixmap(); | - |
| 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 QPixmap(); | - |
| 264 | } | - |
| 265 | | - |
| 266 | QVariant QPlatformTheme::themeHint(ThemeHint hint) const | - |
| 267 | { | - |
| 268 | | - |
| 269 | | - |
| 270 | | - |
| 271 | | - |
| 272 | switch (hint) { | - |
| 273 | case QPlatformTheme::CursorFlashTime: | - |
| 274 | return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::CursorFlashTime); | - |
| 275 | case QPlatformTheme::KeyboardInputInterval: | - |
| 276 | return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::KeyboardInputInterval); | - |
| 277 | case QPlatformTheme::KeyboardAutoRepeatRate: | - |
| 278 | return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::KeyboardAutoRepeatRate); | - |
| 279 | case QPlatformTheme::MouseDoubleClickInterval: | - |
| 280 | return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::MouseDoubleClickInterval); | - |
| 281 | case QPlatformTheme::StartDragDistance: | - |
| 282 | return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::StartDragDistance); | - |
| 283 | case QPlatformTheme::StartDragTime: | - |
| 284 | return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::StartDragTime); | - |
| 285 | case QPlatformTheme::StartDragVelocity: | - |
| 286 | return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::StartDragVelocity); | - |
| 287 | case QPlatformTheme::PasswordMaskDelay: | - |
| 288 | return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::PasswordMaskDelay); | - |
| 289 | case QPlatformTheme::PasswordMaskCharacter: | - |
| 290 | return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::PasswordMaskCharacter); | - |
| 291 | case QPlatformTheme::MousePressAndHoldInterval: | - |
| 292 | return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::MousePressAndHoldInterval); | - |
| 293 | case QPlatformTheme::ItemViewActivateItemOnSingleClick: | - |
| 294 | return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::ItemViewActivateItemOnSingleClick); | - |
| 295 | default: | - |
| 296 | return QPlatformTheme::defaultThemeHint(hint); | - |
| 297 | } | - |
| 298 | } | - |
| 299 | | - |
| 300 | QVariant QPlatformTheme::defaultThemeHint(ThemeHint hint) | - |
| 301 | { | - |
| 302 | switch (hint) { | - |
| 303 | case QPlatformTheme::CursorFlashTime: | - |
| 304 | return QVariant(1000); | - |
| 305 | case QPlatformTheme::KeyboardInputInterval: | - |
| 306 | return QVariant(400); | - |
| 307 | case QPlatformTheme::KeyboardAutoRepeatRate: | - |
| 308 | return QVariant(30); | - |
| 309 | case QPlatformTheme::MouseDoubleClickInterval: | - |
| 310 | return QVariant(400); | - |
| 311 | case QPlatformTheme::StartDragDistance: | - |
| 312 | return QVariant(10); | - |
| 313 | case QPlatformTheme::StartDragTime: | - |
| 314 | return QVariant(500); | - |
| 315 | case QPlatformTheme::PasswordMaskDelay: | - |
| 316 | return QVariant(int(0)); | - |
| 317 | case QPlatformTheme::PasswordMaskCharacter: | - |
| 318 | return QVariant(QChar(0x25CF)); | - |
| 319 | case QPlatformTheme::StartDragVelocity: | - |
| 320 | return QVariant(int(0)); | - |
| 321 | case QPlatformTheme::UseFullScreenForPopupMenu: | - |
| 322 | return QVariant(false); | - |
| 323 | case QPlatformTheme::WindowAutoPlacement: | - |
| 324 | return QVariant(false); | - |
| 325 | case QPlatformTheme::DialogButtonBoxLayout: | - |
| 326 | return QVariant(int(0)); | - |
| 327 | case QPlatformTheme::DialogButtonBoxButtonsHaveIcons: | - |
| 328 | return QVariant(false); | - |
| 329 | case QPlatformTheme::ItemViewActivateItemOnSingleClick: | - |
| 330 | return QVariant(false); | - |
| 331 | case QPlatformTheme::ToolButtonStyle: | - |
| 332 | return QVariant(int(Qt::ToolButtonIconOnly)); | - |
| 333 | case QPlatformTheme::ToolBarIconSize: | - |
| 334 | return QVariant(int(0)); | - |
| 335 | case QPlatformTheme::SystemIconThemeName: | - |
| 336 | case QPlatformTheme::SystemIconFallbackThemeName: | - |
| 337 | return QVariant(QString()); | - |
| 338 | case QPlatformTheme::IconThemeSearchPaths: | - |
| 339 | return QVariant(QStringList()); | - |
| 340 | case QPlatformTheme::StyleNames: | - |
| 341 | return QVariant(QStringList()); | - |
| 342 | case TextCursorWidth: | - |
| 343 | return QVariant(1); | - |
| 344 | case DropShadow: | - |
| 345 | return QVariant(false); | - |
| 346 | case MaximumScrollBarDragDistance: | - |
| 347 | return QVariant(-1); | - |
| 348 | case KeyboardScheme: | - |
| 349 | return QVariant(int(WindowsKeyboardScheme)); | - |
| 350 | case UiEffects: | - |
| 351 | return QVariant(int(0)); | - |
| 352 | case SpellCheckUnderlineStyle: | - |
| 353 | return QVariant(int(QTextCharFormat::SpellCheckUnderline)); | - |
| 354 | case TabFocusBehavior: | - |
| 355 | return QVariant(int(Qt::TabFocusAllControls)); | - |
| 356 | case IconPixmapSizes: | - |
| 357 | return QVariant::fromValue(QList<int>()); | - |
| 358 | case DialogSnapToDefaultButton: | - |
| 359 | case ContextMenuOnMouseRelease: | - |
| 360 | return QVariant(false); | - |
| 361 | case MousePressAndHoldInterval: | - |
| 362 | return QVariant(800); | - |
| 363 | case MouseDoubleClickDistance: | - |
| 364 | { | - |
| 365 | bool ok = false; | - |
| 366 | const int dist = qEnvironmentVariableIntValue("QT_DBL_CLICK_DIST", &ok); | - |
| 367 | return QVariant(ok ? dist : 5); | - |
| 368 | } | - |
| 369 | case WheelScrollLines: | - |
| 370 | return QVariant(3); | - |
| 371 | } | - |
| 372 | return QVariant(); | - |
| 373 | } | - |
| 374 | | - |
| 375 | QPlatformMenuItem *QPlatformTheme::createPlatformMenuItem() const | - |
| 376 | { | - |
| 377 | return 0; | - |
| 378 | } | - |
| 379 | | - |
| 380 | QPlatformMenu *QPlatformTheme::createPlatformMenu() const | - |
| 381 | { | - |
| 382 | return 0; | - |
| 383 | } | - |
| 384 | | - |
| 385 | QPlatformMenuBar *QPlatformTheme::createPlatformMenuBar() const | - |
| 386 | { | - |
| 387 | return 0; | - |
| 388 | } | - |
| 389 | | - |
| 390 | | - |
| 391 | | - |
| 392 | | - |
| 393 | | - |
| 394 | | - |
| 395 | QPlatformSystemTrayIcon *QPlatformTheme::createPlatformSystemTrayIcon() const | - |
| 396 | { | - |
| 397 | return 0; | - |
| 398 | } | - |
| 399 | QIconEngine *QPlatformTheme::createIconEngine(const QString &iconName) const | - |
| 400 | { | - |
| 401 | return new QIconLoaderEngine(iconName); | - |
| 402 | } | - |
| 403 | struct ByStandardKey { | - |
| 404 | typedef bool result_type; | - |
| 405 | | - |
| 406 | bool operator()(QKeySequence::StandardKey lhs, QKeySequence::StandardKey rhs) const | - |
| 407 | { return lhs < rhs; } | - |
| 408 | | - |
| 409 | bool operator()(const QKeyBinding& lhs, const QKeyBinding& rhs) const | - |
| 410 | { return operator()(lhs.standardKey, rhs.standardKey); } | - |
| 411 | | - |
| 412 | bool operator()(QKeySequence::StandardKey lhs, const QKeyBinding& rhs) const | - |
| 413 | { return operator()(lhs, rhs.standardKey); } | - |
| 414 | | - |
| 415 | bool operator()(const QKeyBinding& lhs, QKeySequence::StandardKey rhs) const | - |
| 416 | { return operator()(lhs.standardKey, rhs); } | - |
| 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; ++it) { | - |
| 435 | if (!(it->platform & platform)) | - |
| 436 | continue; | - |
| 437 | | - |
| 438 | uint shortcut = | - |
| 439 | | - |
| 440 | | - |
| 441 | | - |
| 442 | it->shortcut; | - |
| 443 | | - |
| 444 | if (it->priority > 0) | - |
| 445 | list.prepend(QKeySequence(shortcut)); | - |
| 446 | else | - |
| 447 | list.append(QKeySequence(shortcut)); | - |
| 448 | } | - |
| 449 | | - |
| 450 | return list; | - |
| 451 | } | - |
| 452 | QString QPlatformTheme::standardButtonText(int button) const | - |
| 453 | { | - |
| 454 | return QPlatformTheme::defaultStandardButtonText(button); | - |
| 455 | } | - |
| 456 | | - |
| 457 | QString QPlatformTheme::defaultStandardButtonText(int button) | - |
| 458 | { | - |
| 459 | switch (button) { | - |
| 460 | case QPlatformDialogHelper::Ok: | - |
| 461 | return QCoreApplication::translate("QPlatformTheme", "OK"); | - |
| 462 | case QPlatformDialogHelper::Save: | - |
| 463 | return QCoreApplication::translate("QPlatformTheme", "Save"); | - |
| 464 | case QPlatformDialogHelper::SaveAll: | - |
| 465 | return QCoreApplication::translate("QPlatformTheme", "Save All"); | - |
| 466 | case QPlatformDialogHelper::Open: | - |
| 467 | return QCoreApplication::translate("QPlatformTheme", "Open"); | - |
| 468 | case QPlatformDialogHelper::Yes: | - |
| 469 | return QCoreApplication::translate("QPlatformTheme", "&Yes"); | - |
| 470 | case QPlatformDialogHelper::YesToAll: | - |
| 471 | return QCoreApplication::translate("QPlatformTheme", "Yes to &All"); | - |
| 472 | case QPlatformDialogHelper::No: | - |
| 473 | return QCoreApplication::translate("QPlatformTheme", "&No"); | - |
| 474 | case QPlatformDialogHelper::NoToAll: | - |
| 475 | return QCoreApplication::translate("QPlatformTheme", "N&o to All"); | - |
| 476 | case QPlatformDialogHelper::Abort: | - |
| 477 | return QCoreApplication::translate("QPlatformTheme", "Abort"); | - |
| 478 | case QPlatformDialogHelper::Retry: | - |
| 479 | return QCoreApplication::translate("QPlatformTheme", "Retry"); | - |
| 480 | case QPlatformDialogHelper::Ignore: | - |
| 481 | return QCoreApplication::translate("QPlatformTheme", "Ignore"); | - |
| 482 | case QPlatformDialogHelper::Close: | - |
| 483 | return QCoreApplication::translate("QPlatformTheme", "Close"); | - |
| 484 | case QPlatformDialogHelper::Cancel: | - |
| 485 | return QCoreApplication::translate("QPlatformTheme", "Cancel"); | - |
| 486 | case QPlatformDialogHelper::Discard: | - |
| 487 | return QCoreApplication::translate("QPlatformTheme", "Discard"); | - |
| 488 | case QPlatformDialogHelper::Help: | - |
| 489 | return QCoreApplication::translate("QPlatformTheme", "Help"); | - |
| 490 | case QPlatformDialogHelper::Apply: | - |
| 491 | return QCoreApplication::translate("QPlatformTheme", "Apply"); | - |
| 492 | case QPlatformDialogHelper::Reset: | - |
| 493 | return QCoreApplication::translate("QPlatformTheme", "Reset"); | - |
| 494 | case QPlatformDialogHelper::RestoreDefaults: | - |
| 495 | return QCoreApplication::translate("QPlatformTheme", "Restore Defaults"); | - |
| 496 | default: | - |
| 497 | break; | - |
| 498 | } | - |
| 499 | return QString(); | - |
| 500 | } | - |
| 501 | | - |
| 502 | QString QPlatformTheme::removeMnemonics(const QString &original) | - |
| 503 | { | - |
| 504 | QString returnText(original.size(), 0); | - |
| 505 | int finalDest = 0; | - |
| 506 | int currPos = 0; | - |
| 507 | int l = original.length(); | - |
| 508 | while (l| TRUE | never evaluated | | FALSE | never evaluated |
) { | 0 |
| 509 | if (original.at(currPos) == QLatin1Char('&')| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 510 | && (l == 1| TRUE | never evaluated | | FALSE | never evaluated |
|| original.at(currPos + 1) != QLatin1Char('&')| TRUE | never evaluated | | FALSE | never evaluated |
)) { | 0 |
| 511 | ++currPos; | - |
| 512 | --l; | - |
| 513 | if (l == 0| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 514 | break; never executed: break; | 0 |
| 515 | } never executed: end of block else if (original.at(currPos) == QLatin1Char('(')| TRUE | never evaluated | | FALSE | never evaluated |
&& l >= 4| TRUE | never evaluated | | FALSE | never evaluated |
&& | 0 |
| 516 | original.at(currPos + 1) == QLatin1Char('&')| TRUE | never evaluated | | FALSE | never evaluated |
&& | 0 |
| 517 | original.at(currPos + 2) != QLatin1Char('&')| TRUE | never evaluated | | FALSE | never evaluated |
&& | 0 |
| 518 | original.at(currPos + 3) == QLatin1Char(')')| TRUE | never evaluated | | FALSE | never evaluated |
) { | 0 |
| 519 | | - |
| 520 | int n = 0; | - |
| 521 | while (finalDest > n| TRUE | never evaluated | | FALSE | never evaluated |
&& returnText.at(finalDest - n - 1).isSpace()| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 522 | ++ never executed: ++n; n;never executed: ++n; | 0 |
| 523 | finalDest -= n; | - |
| 524 | currPos += 4; | - |
| 525 | l -= 4; | - |
| 526 | continue; never executed: continue; | 0 |
| 527 | } | - |
| 528 | returnText[finalDest] = original.at(currPos); | - |
| 529 | ++currPos; | - |
| 530 | ++finalDest; | - |
| 531 | --l; | - |
| 532 | } never executed: end of block | 0 |
| 533 | returnText.truncate(finalDest); | - |
| 534 | return never executed: return returnText; returnText;never executed: return returnText; | 0 |
| 535 | } | - |
| 536 | | - |
| 537 | unsigned QPlatformThemePrivate::currentKeyPlatforms() | - |
| 538 | { | - |
| 539 | const uint keyboardScheme = QGuiApplicationPrivate::platformTheme()->themeHint(QPlatformTheme::KeyboardScheme).toInt(); | - |
| 540 | unsigned result = 1u << keyboardScheme; | - |
| 541 | if (keyboardScheme == QPlatformTheme::KdeKeyboardScheme | - |
| 542 | || keyboardScheme == QPlatformTheme::GnomeKeyboardScheme | - |
| 543 | || keyboardScheme == QPlatformTheme::CdeKeyboardScheme) | - |
| 544 | result |= KB_X11; | - |
| 545 | return result; | - |
| 546 | } | - |
| 547 | | - |
| 548 | | - |
| | |