Changeset View
Changeset View
Standalone View
Standalone View
options.cpp
Show First 20 Lines • Show All 782 Lines • ▼ Show 20 Line(s) | 776 | { | |||
---|---|---|---|---|---|
783 | OpTitlebarDblClick = windowOperation(config.readEntry("TitlebarDoubleClickCommand", "Maximize"), true); | 783 | OpTitlebarDblClick = windowOperation(config.readEntry("TitlebarDoubleClickCommand", "Maximize"), true); | ||
784 | setOperationMaxButtonLeftClick(windowOperation(config.readEntry("MaximizeButtonLeftClickCommand", "Maximize"), true)); | 784 | setOperationMaxButtonLeftClick(windowOperation(config.readEntry("MaximizeButtonLeftClickCommand", "Maximize"), true)); | ||
785 | setOperationMaxButtonMiddleClick(windowOperation(config.readEntry("MaximizeButtonMiddleClickCommand", "Maximize (vertical only)"), true)); | 785 | setOperationMaxButtonMiddleClick(windowOperation(config.readEntry("MaximizeButtonMiddleClickCommand", "Maximize (vertical only)"), true)); | ||
786 | setOperationMaxButtonRightClick(windowOperation(config.readEntry("MaximizeButtonRightClickCommand", "Maximize (horizontal only)"), true)); | 786 | setOperationMaxButtonRightClick(windowOperation(config.readEntry("MaximizeButtonRightClickCommand", "Maximize (horizontal only)"), true)); | ||
787 | 787 | | |||
788 | // Mouse bindings | 788 | // Mouse bindings | ||
789 | config = KConfigGroup(m_settings->config(), "MouseBindings"); | 789 | config = KConfigGroup(m_settings->config(), "MouseBindings"); | ||
790 | // TODO: add properties for missing options | 790 | // TODO: add properties for missing options | ||
791 | CmdTitlebarWheel = mouseWheelCommand(config.readEntry("CommandTitlebarWheel", "Switch to Window Tab to the Left/Right")); | 791 | CmdTitlebarWheel = mouseWheelCommand(config.readEntry("CommandTitlebarWheel", "Nothing")); | ||
792 | CmdAllModKey = (config.readEntry("CommandAllKey", "Alt") == QStringLiteral("Meta")) ? Qt::Key_Meta : Qt::Key_Alt; | 792 | CmdAllModKey = (config.readEntry("CommandAllKey", "Alt") == QStringLiteral("Meta")) ? Qt::Key_Meta : Qt::Key_Alt; | ||
793 | CmdAllWheel = mouseWheelCommand(config.readEntry("CommandAllWheel", "Nothing")); | 793 | CmdAllWheel = mouseWheelCommand(config.readEntry("CommandAllWheel", "Nothing")); | ||
794 | setCommandActiveTitlebar1(mouseCommand(config.readEntry("CommandActiveTitlebar1", "Raise"), true)); | 794 | setCommandActiveTitlebar1(mouseCommand(config.readEntry("CommandActiveTitlebar1", "Raise"), true)); | ||
795 | setCommandActiveTitlebar2(mouseCommand(config.readEntry("CommandActiveTitlebar2", "Start Window Tab Drag"), true)); | 795 | setCommandActiveTitlebar2(mouseCommand(config.readEntry("CommandActiveTitlebar2", "Nothing"), true)); | ||
796 | setCommandActiveTitlebar3(mouseCommand(config.readEntry("CommandActiveTitlebar3", "Operations menu"), true)); | 796 | setCommandActiveTitlebar3(mouseCommand(config.readEntry("CommandActiveTitlebar3", "Operations menu"), true)); | ||
797 | setCommandInactiveTitlebar1(mouseCommand(config.readEntry("CommandInactiveTitlebar1", "Activate and raise"), true)); | 797 | setCommandInactiveTitlebar1(mouseCommand(config.readEntry("CommandInactiveTitlebar1", "Activate and raise"), true)); | ||
798 | setCommandInactiveTitlebar2(mouseCommand(config.readEntry("CommandInactiveTitlebar2", "Start Window Tab Drag"), true)); | 798 | setCommandInactiveTitlebar2(mouseCommand(config.readEntry("CommandInactiveTitlebar2", "Nothing"), true)); | ||
799 | setCommandInactiveTitlebar3(mouseCommand(config.readEntry("CommandInactiveTitlebar3", "Operations menu"), true)); | 799 | setCommandInactiveTitlebar3(mouseCommand(config.readEntry("CommandInactiveTitlebar3", "Operations menu"), true)); | ||
800 | setCommandWindow1(mouseCommand(config.readEntry("CommandWindow1", "Activate, raise and pass click"), false)); | 800 | setCommandWindow1(mouseCommand(config.readEntry("CommandWindow1", "Activate, raise and pass click"), false)); | ||
801 | setCommandWindow2(mouseCommand(config.readEntry("CommandWindow2", "Activate and pass click"), false)); | 801 | setCommandWindow2(mouseCommand(config.readEntry("CommandWindow2", "Activate and pass click"), false)); | ||
802 | setCommandWindow3(mouseCommand(config.readEntry("CommandWindow3", "Activate and pass click"), false)); | 802 | setCommandWindow3(mouseCommand(config.readEntry("CommandWindow3", "Activate and pass click"), false)); | ||
803 | setCommandWindowWheel(mouseCommand(config.readEntry("CommandWindowWheel", "Scroll"), false)); | 803 | setCommandWindowWheel(mouseCommand(config.readEntry("CommandWindowWheel", "Scroll"), false)); | ||
804 | setCommandAll1(mouseCommand(config.readEntry("CommandAll1", "Move"), false)); | 804 | setCommandAll1(mouseCommand(config.readEntry("CommandAll1", "Move"), false)); | ||
805 | setCommandAll2(mouseCommand(config.readEntry("CommandAll2", "Toggle raise and lower"), false)); | 805 | setCommandAll2(mouseCommand(config.readEntry("CommandAll2", "Toggle raise and lower"), false)); | ||
806 | setCommandAll3(mouseCommand(config.readEntry("CommandAll3", "Resize"), false)); | 806 | setCommandAll3(mouseCommand(config.readEntry("CommandAll3", "Resize"), false)); | ||
▲ Show 20 Lines • Show All 230 Lines • ▼ Show 20 Line(s) | 1025 | { | |||
1037 | if (lowerName == QStringLiteral("activate and scroll")) return MouseActivateAndPassClick; | 1037 | if (lowerName == QStringLiteral("activate and scroll")) return MouseActivateAndPassClick; | ||
1038 | if (lowerName == QStringLiteral("activate, raise and scroll")) return MouseActivateRaiseAndPassClick; | 1038 | if (lowerName == QStringLiteral("activate, raise and scroll")) return MouseActivateRaiseAndPassClick; | ||
1039 | if (lowerName == QStringLiteral("activate, raise and move")) | 1039 | if (lowerName == QStringLiteral("activate, raise and move")) | ||
1040 | return restricted ? MouseActivateRaiseAndMove : MouseActivateRaiseAndUnrestrictedMove; | 1040 | return restricted ? MouseActivateRaiseAndMove : MouseActivateRaiseAndUnrestrictedMove; | ||
1041 | if (lowerName == QStringLiteral("move")) return restricted ? MouseMove : MouseUnrestrictedMove; | 1041 | if (lowerName == QStringLiteral("move")) return restricted ? MouseMove : MouseUnrestrictedMove; | ||
1042 | if (lowerName == QStringLiteral("resize")) return restricted ? MouseResize : MouseUnrestrictedResize; | 1042 | if (lowerName == QStringLiteral("resize")) return restricted ? MouseResize : MouseUnrestrictedResize; | ||
1043 | if (lowerName == QStringLiteral("shade")) return MouseShade; | 1043 | if (lowerName == QStringLiteral("shade")) return MouseShade; | ||
1044 | if (lowerName == QStringLiteral("minimize")) return MouseMinimize; | 1044 | if (lowerName == QStringLiteral("minimize")) return MouseMinimize; | ||
1045 | if (lowerName == QStringLiteral("start window tab drag")) return MouseDragTab; | | |||
1046 | if (lowerName == QStringLiteral("close")) return MouseClose; | 1045 | if (lowerName == QStringLiteral("close")) return MouseClose; | ||
1047 | if (lowerName == QStringLiteral("increase opacity")) return MouseOpacityMore; | 1046 | if (lowerName == QStringLiteral("increase opacity")) return MouseOpacityMore; | ||
1048 | if (lowerName == QStringLiteral("decrease opacity")) return MouseOpacityLess; | 1047 | if (lowerName == QStringLiteral("decrease opacity")) return MouseOpacityLess; | ||
1049 | if (lowerName == QStringLiteral("nothing")) return MouseNothing; | 1048 | if (lowerName == QStringLiteral("nothing")) return MouseNothing; | ||
1050 | return MouseNothing; | 1049 | return MouseNothing; | ||
1051 | } | 1050 | } | ||
1052 | 1051 | | |||
1053 | Options::MouseWheelCommand Options::mouseWheelCommand(const QString &name) | 1052 | Options::MouseWheelCommand Options::mouseWheelCommand(const QString &name) | ||
1054 | { | 1053 | { | ||
1055 | QString lowerName = name.toLower(); | 1054 | QString lowerName = name.toLower(); | ||
1056 | if (lowerName == QStringLiteral("raise/lower")) return MouseWheelRaiseLower; | 1055 | if (lowerName == QStringLiteral("raise/lower")) return MouseWheelRaiseLower; | ||
1057 | if (lowerName == QStringLiteral("shade/unshade")) return MouseWheelShadeUnshade; | 1056 | if (lowerName == QStringLiteral("shade/unshade")) return MouseWheelShadeUnshade; | ||
1058 | if (lowerName == QStringLiteral("maximize/restore")) return MouseWheelMaximizeRestore; | 1057 | if (lowerName == QStringLiteral("maximize/restore")) return MouseWheelMaximizeRestore; | ||
1059 | if (lowerName == QStringLiteral("above/below")) return MouseWheelAboveBelow; | 1058 | if (lowerName == QStringLiteral("above/below")) return MouseWheelAboveBelow; | ||
1060 | if (lowerName == QStringLiteral("previous/next desktop")) return MouseWheelPreviousNextDesktop; | 1059 | if (lowerName == QStringLiteral("previous/next desktop")) return MouseWheelPreviousNextDesktop; | ||
1061 | if (lowerName == QStringLiteral("change opacity")) return MouseWheelChangeOpacity; | 1060 | if (lowerName == QStringLiteral("change opacity")) return MouseWheelChangeOpacity; | ||
1062 | if (lowerName == QStringLiteral("switch to window tab to the left/right")) return MouseWheelChangeCurrentTab; | | |||
1063 | if (lowerName == QStringLiteral("nothing")) return MouseWheelNothing; | 1061 | if (lowerName == QStringLiteral("nothing")) return MouseWheelNothing; | ||
1064 | return MouseWheelChangeCurrentTab; | 1062 | return MouseWheelNothing; | ||
1065 | } | 1063 | } | ||
1066 | 1064 | | |||
1067 | bool Options::showGeometryTip() const | 1065 | bool Options::showGeometryTip() const | ||
1068 | { | 1066 | { | ||
1069 | return show_geometry_tip; | 1067 | return show_geometry_tip; | ||
1070 | } | 1068 | } | ||
1071 | 1069 | | |||
1072 | bool Options::condensedTitle() const | 1070 | bool Options::condensedTitle() const | ||
Show All 11 Lines | 1076 | { | |||
1084 | case MouseWheelMaximizeRestore: | 1082 | case MouseWheelMaximizeRestore: | ||
1085 | return delta > 0 ? MouseMaximize : MouseRestore; | 1083 | return delta > 0 ? MouseMaximize : MouseRestore; | ||
1086 | case MouseWheelAboveBelow: | 1084 | case MouseWheelAboveBelow: | ||
1087 | return delta > 0 ? MouseAbove : MouseBelow; | 1085 | return delta > 0 ? MouseAbove : MouseBelow; | ||
1088 | case MouseWheelPreviousNextDesktop: | 1086 | case MouseWheelPreviousNextDesktop: | ||
1089 | return delta > 0 ? MousePreviousDesktop : MouseNextDesktop; | 1087 | return delta > 0 ? MousePreviousDesktop : MouseNextDesktop; | ||
1090 | case MouseWheelChangeOpacity: | 1088 | case MouseWheelChangeOpacity: | ||
1091 | return delta > 0 ? MouseOpacityMore : MouseOpacityLess; | 1089 | return delta > 0 ? MouseOpacityMore : MouseOpacityLess; | ||
1092 | case MouseWheelChangeCurrentTab: | | |||
1093 | return delta > 0 ? MousePreviousTab : MouseNextTab; | | |||
1094 | default: | 1090 | default: | ||
1095 | return MouseNothing; | 1091 | return MouseNothing; | ||
1096 | } | 1092 | } | ||
1097 | } | 1093 | } | ||
1098 | #endif | 1094 | #endif | ||
1099 | 1095 | | |||
1100 | double Options::animationTimeFactor() const | 1096 | double Options::animationTimeFactor() const | ||
1101 | { | 1097 | { | ||
Show All 22 Lines |