Changeset View
Changeset View
Standalone View
Standalone View
options.h
Show First 20 Lines • Show All 152 Lines • ▼ Show 20 Line(s) | 49 | { | |||
---|---|---|---|---|---|
153 | /** | 153 | /** | ||
154 | * timeout before non-responding application will be killed after attempt to close. | 154 | * timeout before non-responding application will be killed after attempt to close. | ||
155 | */ | 155 | */ | ||
156 | Q_PROPERTY(int killPingTimeout READ killPingTimeout WRITE setKillPingTimeout NOTIFY killPingTimeoutChanged) | 156 | Q_PROPERTY(int killPingTimeout READ killPingTimeout WRITE setKillPingTimeout NOTIFY killPingTimeoutChanged) | ||
157 | /** | 157 | /** | ||
158 | * Whether to hide utility windows for inactive applications. | 158 | * Whether to hide utility windows for inactive applications. | ||
159 | */ | 159 | */ | ||
160 | Q_PROPERTY(bool hideUtilityWindowsForInactive READ isHideUtilityWindowsForInactive WRITE setHideUtilityWindowsForInactive NOTIFY hideUtilityWindowsForInactiveChanged) | 160 | Q_PROPERTY(bool hideUtilityWindowsForInactive READ isHideUtilityWindowsForInactive WRITE setHideUtilityWindowsForInactive NOTIFY hideUtilityWindowsForInactiveChanged) | ||
161 | Q_PROPERTY(bool inactiveTabsSkipTaskbar READ isInactiveTabsSkipTaskbar WRITE setInactiveTabsSkipTaskbar NOTIFY inactiveTabsSkipTaskbarChanged) | | |||
162 | Q_PROPERTY(bool autogroupSimilarWindows READ isAutogroupSimilarWindows WRITE setAutogroupSimilarWindows NOTIFY autogroupSimilarWindowsChanged) | | |||
163 | Q_PROPERTY(bool autogroupInForeground READ isAutogroupInForeground WRITE setAutogroupInForeground NOTIFY autogroupInForegroundChanged) | | |||
164 | Q_PROPERTY(int compositingMode READ compositingMode WRITE setCompositingMode NOTIFY compositingModeChanged) | 161 | Q_PROPERTY(int compositingMode READ compositingMode WRITE setCompositingMode NOTIFY compositingModeChanged) | ||
165 | Q_PROPERTY(bool useCompositing READ isUseCompositing WRITE setUseCompositing NOTIFY useCompositingChanged) | 162 | Q_PROPERTY(bool useCompositing READ isUseCompositing WRITE setUseCompositing NOTIFY useCompositingChanged) | ||
166 | Q_PROPERTY(int hiddenPreviews READ hiddenPreviews WRITE setHiddenPreviews NOTIFY hiddenPreviewsChanged) | 163 | Q_PROPERTY(int hiddenPreviews READ hiddenPreviews WRITE setHiddenPreviews NOTIFY hiddenPreviewsChanged) | ||
167 | /** | 164 | /** | ||
168 | * 0 = no, 1 = yes when transformed, | 165 | * 0 = no, 1 = yes when transformed, | ||
169 | * 2 = try trilinear when transformed; else 1, | 166 | * 2 = try trilinear when transformed; else 1, | ||
170 | * -1 = auto | 167 | * -1 = auto | ||
171 | */ | 168 | */ | ||
▲ Show 20 Lines • Show All 185 Lines • ▼ Show 20 Line(s) | 338 | enum WindowOperation { | |||
357 | HMaximizeOp, | 354 | HMaximizeOp, | ||
358 | VMaximizeOp, | 355 | VMaximizeOp, | ||
359 | LowerOp, | 356 | LowerOp, | ||
360 | FullScreenOp, | 357 | FullScreenOp, | ||
361 | NoBorderOp, | 358 | NoBorderOp, | ||
362 | NoOp, | 359 | NoOp, | ||
363 | SetupWindowShortcutOp, | 360 | SetupWindowShortcutOp, | ||
364 | ApplicationRulesOp, | 361 | ApplicationRulesOp, | ||
365 | RemoveTabFromGroupOp, // Remove from group | | |||
366 | CloseTabGroupOp, // Close the group | | |||
367 | ActivateNextTabOp, // Move left in the group | | |||
368 | ActivatePreviousTabOp, // Move right in the group | | |||
369 | TabDragOp, | | |||
370 | }; | 362 | }; | ||
371 | 363 | | |||
372 | WindowOperation operationTitlebarDblClick() const { | 364 | WindowOperation operationTitlebarDblClick() const { | ||
373 | return OpTitlebarDblClick; | 365 | return OpTitlebarDblClick; | ||
374 | } | 366 | } | ||
375 | WindowOperation operationMaxButtonLeftClick() const { | 367 | WindowOperation operationMaxButtonLeftClick() const { | ||
376 | return opMaxButtonLeftClick; | 368 | return opMaxButtonLeftClick; | ||
377 | } | 369 | } | ||
Show All 13 Lines | 379 | enum MouseCommand { | |||
391 | MouseMove, MouseUnrestrictedMove, | 383 | MouseMove, MouseUnrestrictedMove, | ||
392 | MouseActivateRaiseAndMove, MouseActivateRaiseAndUnrestrictedMove, | 384 | MouseActivateRaiseAndMove, MouseActivateRaiseAndUnrestrictedMove, | ||
393 | MouseResize, MouseUnrestrictedResize, | 385 | MouseResize, MouseUnrestrictedResize, | ||
394 | MouseShade, MouseSetShade, MouseUnsetShade, | 386 | MouseShade, MouseSetShade, MouseUnsetShade, | ||
395 | MouseMaximize, MouseRestore, MouseMinimize, | 387 | MouseMaximize, MouseRestore, MouseMinimize, | ||
396 | MouseNextDesktop, MousePreviousDesktop, | 388 | MouseNextDesktop, MousePreviousDesktop, | ||
397 | MouseAbove, MouseBelow, | 389 | MouseAbove, MouseBelow, | ||
398 | MouseOpacityMore, MouseOpacityLess, | 390 | MouseOpacityMore, MouseOpacityLess, | ||
399 | MouseClose, MousePreviousTab, MouseNextTab, MouseDragTab, | 391 | MouseClose, | ||
400 | MouseNothing | 392 | MouseNothing | ||
401 | }; | 393 | }; | ||
402 | 394 | | |||
403 | enum MouseWheelCommand { | 395 | enum MouseWheelCommand { | ||
404 | MouseWheelRaiseLower, MouseWheelShadeUnshade, MouseWheelMaximizeRestore, | 396 | MouseWheelRaiseLower, MouseWheelShadeUnshade, MouseWheelMaximizeRestore, | ||
405 | MouseWheelAboveBelow, MouseWheelPreviousNextDesktop, | 397 | MouseWheelAboveBelow, MouseWheelPreviousNextDesktop, | ||
406 | MouseWheelChangeOpacity, MouseWheelChangeCurrentTab, | 398 | MouseWheelChangeOpacity, | ||
407 | MouseWheelNothing | 399 | MouseWheelNothing | ||
408 | }; | 400 | }; | ||
409 | 401 | | |||
410 | MouseCommand operationTitlebarMouseWheel(int delta) const { | 402 | MouseCommand operationTitlebarMouseWheel(int delta) const { | ||
411 | return wheelToMouseCommand(CmdTitlebarWheel, delta); | 403 | return wheelToMouseCommand(CmdTitlebarWheel, delta); | ||
412 | } | 404 | } | ||
413 | MouseCommand operationWindowMouseWheel(int delta) const { | 405 | MouseCommand operationWindowMouseWheel(int delta) const { | ||
414 | return wheelToMouseCommand(CmdAllWheel, delta); | 406 | return wheelToMouseCommand(CmdAllWheel, delta); | ||
▲ Show 20 Lines • Show All 100 Lines • ▼ Show 20 Line(s) | |||||
515 | 507 | | |||
516 | /** | 508 | /** | ||
517 | * Whether to hide utility windows for inactive applications. | 509 | * Whether to hide utility windows for inactive applications. | ||
518 | */ | 510 | */ | ||
519 | bool isHideUtilityWindowsForInactive() const { | 511 | bool isHideUtilityWindowsForInactive() const { | ||
520 | return m_hideUtilityWindowsForInactive; | 512 | return m_hideUtilityWindowsForInactive; | ||
521 | } | 513 | } | ||
522 | 514 | | |||
523 | bool isInactiveTabsSkipTaskbar() const { | | |||
524 | return m_inactiveTabsSkipTaskbar; | | |||
525 | } | | |||
526 | bool isAutogroupSimilarWindows() const { | | |||
527 | return m_autogroupSimilarWindows; | | |||
528 | } | | |||
529 | bool isAutogroupInForeground() const { | | |||
530 | return m_autogroupInForeground; | | |||
531 | } | | |||
532 | | ||||
533 | /** | 515 | /** | ||
534 | * Returns the animation time factor for desktop effects. | 516 | * Returns the animation time factor for desktop effects. | ||
535 | */ | 517 | */ | ||
536 | double animationTimeFactor() const; | 518 | double animationTimeFactor() const; | ||
537 | 519 | | |||
538 | //---------------------- | 520 | //---------------------- | ||
539 | // Compositing settings | 521 | // Compositing settings | ||
540 | void reloadCompositingSettings(bool force = false); | 522 | void reloadCompositingSettings(bool force = false); | ||
▲ Show 20 Lines • Show All 95 Lines • ▼ Show 20 Line(s) | |||||
636 | void setShowGeometryTip(bool showGeometryTip); | 618 | void setShowGeometryTip(bool showGeometryTip); | ||
637 | void setCondensedTitle(bool condensedTitle); | 619 | void setCondensedTitle(bool condensedTitle); | ||
638 | void setElectricBorderMaximize(bool electricBorderMaximize); | 620 | void setElectricBorderMaximize(bool electricBorderMaximize); | ||
639 | void setElectricBorderTiling(bool electricBorderTiling); | 621 | void setElectricBorderTiling(bool electricBorderTiling); | ||
640 | void setElectricBorderCornerRatio(float electricBorderCornerRatio); | 622 | void setElectricBorderCornerRatio(float electricBorderCornerRatio); | ||
641 | void setBorderlessMaximizedWindows(bool borderlessMaximizedWindows); | 623 | void setBorderlessMaximizedWindows(bool borderlessMaximizedWindows); | ||
642 | void setKillPingTimeout(int killPingTimeout); | 624 | void setKillPingTimeout(int killPingTimeout); | ||
643 | void setHideUtilityWindowsForInactive(bool hideUtilityWindowsForInactive); | 625 | void setHideUtilityWindowsForInactive(bool hideUtilityWindowsForInactive); | ||
644 | void setInactiveTabsSkipTaskbar(bool inactiveTabsSkipTaskbar); | | |||
645 | void setAutogroupSimilarWindows(bool autogroupSimilarWindows); | | |||
646 | void setAutogroupInForeground(bool autogroupInForeground); | | |||
647 | void setCompositingMode(int compositingMode); | 626 | void setCompositingMode(int compositingMode); | ||
648 | void setUseCompositing(bool useCompositing); | 627 | void setUseCompositing(bool useCompositing); | ||
649 | void setHiddenPreviews(int hiddenPreviews); | 628 | void setHiddenPreviews(int hiddenPreviews); | ||
650 | void setGlSmoothScale(int glSmoothScale); | 629 | void setGlSmoothScale(int glSmoothScale); | ||
651 | void setXrenderSmoothScale(bool xrenderSmoothScale); | 630 | void setXrenderSmoothScale(bool xrenderSmoothScale); | ||
652 | void setMaxFpsInterval(qint64 maxFpsInterval); | 631 | void setMaxFpsInterval(qint64 maxFpsInterval); | ||
653 | void setRefreshRate(uint refreshRate); | 632 | void setRefreshRate(uint refreshRate); | ||
654 | void setVBlankTime(qint64 vBlankTime); | 633 | void setVBlankTime(qint64 vBlankTime); | ||
Show All 16 Lines | |||||
671 | } | 650 | } | ||
672 | static WindowOperation defaultOperationMaxButtonMiddleClick() { | 651 | static WindowOperation defaultOperationMaxButtonMiddleClick() { | ||
673 | return VMaximizeOp; | 652 | return VMaximizeOp; | ||
674 | } | 653 | } | ||
675 | static MouseCommand defaultCommandActiveTitlebar1() { | 654 | static MouseCommand defaultCommandActiveTitlebar1() { | ||
676 | return MouseRaise; | 655 | return MouseRaise; | ||
677 | } | 656 | } | ||
678 | static MouseCommand defaultCommandActiveTitlebar2() { | 657 | static MouseCommand defaultCommandActiveTitlebar2() { | ||
679 | return MouseDragTab; | 658 | return MouseNothing; | ||
680 | } | 659 | } | ||
681 | static MouseCommand defaultCommandActiveTitlebar3() { | 660 | static MouseCommand defaultCommandActiveTitlebar3() { | ||
682 | return MouseOperationsMenu; | 661 | return MouseOperationsMenu; | ||
683 | } | 662 | } | ||
684 | static MouseCommand defaultCommandInactiveTitlebar1() { | 663 | static MouseCommand defaultCommandInactiveTitlebar1() { | ||
685 | return MouseActivateAndRaise; | 664 | return MouseActivateAndRaise; | ||
686 | } | 665 | } | ||
687 | static MouseCommand defaultCommandInactiveTitlebar2() { | 666 | static MouseCommand defaultCommandInactiveTitlebar2() { | ||
688 | return MouseDragTab; | 667 | return MouseNothing; | ||
689 | } | 668 | } | ||
690 | static MouseCommand defaultCommandInactiveTitlebar3() { | 669 | static MouseCommand defaultCommandInactiveTitlebar3() { | ||
691 | return MouseOperationsMenu; | 670 | return MouseOperationsMenu; | ||
692 | } | 671 | } | ||
693 | static MouseCommand defaultCommandWindow1() { | 672 | static MouseCommand defaultCommandWindow1() { | ||
694 | return MouseActivateRaiseAndPassClick; | 673 | return MouseActivateRaiseAndPassClick; | ||
695 | } | 674 | } | ||
696 | static MouseCommand defaultCommandWindow2() { | 675 | static MouseCommand defaultCommandWindow2() { | ||
Show All 10 Lines | |||||
707 | } | 686 | } | ||
708 | static MouseCommand defaultCommandAll2() { | 687 | static MouseCommand defaultCommandAll2() { | ||
709 | return MouseToggleRaiseAndLower; | 688 | return MouseToggleRaiseAndLower; | ||
710 | } | 689 | } | ||
711 | static MouseCommand defaultCommandAll3() { | 690 | static MouseCommand defaultCommandAll3() { | ||
712 | return MouseUnrestrictedResize; | 691 | return MouseUnrestrictedResize; | ||
713 | } | 692 | } | ||
714 | static MouseWheelCommand defaultCommandTitlebarWheel() { | 693 | static MouseWheelCommand defaultCommandTitlebarWheel() { | ||
715 | return MouseWheelChangeCurrentTab; | 694 | return MouseWheelNothing; | ||
716 | } | 695 | } | ||
717 | static MouseWheelCommand defaultCommandAllWheel() { | 696 | static MouseWheelCommand defaultCommandAllWheel() { | ||
718 | return MouseWheelNothing; | 697 | return MouseWheelNothing; | ||
719 | } | 698 | } | ||
720 | static uint defaultKeyCmdAllModKey() { | 699 | static uint defaultKeyCmdAllModKey() { | ||
721 | return Qt::Key_Alt; | 700 | return Qt::Key_Alt; | ||
722 | } | 701 | } | ||
723 | static bool defaultAutogroupInForeground() { | | |||
724 | return true; | | |||
725 | } | | |||
726 | static CompositingType defaultCompositingMode() { | 702 | static CompositingType defaultCompositingMode() { | ||
727 | return OpenGLCompositing; | 703 | return OpenGLCompositing; | ||
728 | } | 704 | } | ||
729 | static bool defaultUseCompositing() { | 705 | static bool defaultUseCompositing() { | ||
730 | return true; | 706 | return true; | ||
731 | } | 707 | } | ||
732 | static HiddenPreviews defaultHiddenPreviews() { | 708 | static HiddenPreviews defaultHiddenPreviews() { | ||
733 | return HiddenPreviewsShown; | 709 | return HiddenPreviewsShown; | ||
▲ Show 20 Lines • Show All 88 Lines • ▼ Show 20 Line(s) | 761 | Q_SIGNALS: | |||
822 | void showGeometryTipChanged(); | 798 | void showGeometryTipChanged(); | ||
823 | void condensedTitleChanged(); | 799 | void condensedTitleChanged(); | ||
824 | void electricBorderMaximizeChanged(); | 800 | void electricBorderMaximizeChanged(); | ||
825 | void electricBorderTilingChanged(); | 801 | void electricBorderTilingChanged(); | ||
826 | void electricBorderCornerRatioChanged(); | 802 | void electricBorderCornerRatioChanged(); | ||
827 | void borderlessMaximizedWindowsChanged(); | 803 | void borderlessMaximizedWindowsChanged(); | ||
828 | void killPingTimeoutChanged(); | 804 | void killPingTimeoutChanged(); | ||
829 | void hideUtilityWindowsForInactiveChanged(); | 805 | void hideUtilityWindowsForInactiveChanged(); | ||
830 | void inactiveTabsSkipTaskbarChanged(); | | |||
831 | void autogroupSimilarWindowsChanged(); | | |||
832 | void autogroupInForegroundChanged(); | | |||
833 | void compositingModeChanged(); | 806 | void compositingModeChanged(); | ||
834 | void useCompositingChanged(); | 807 | void useCompositingChanged(); | ||
835 | void hiddenPreviewsChanged(); | 808 | void hiddenPreviewsChanged(); | ||
836 | void glSmoothScaleChanged(); | 809 | void glSmoothScaleChanged(); | ||
837 | void xrenderSmoothScaleChanged(); | 810 | void xrenderSmoothScaleChanged(); | ||
838 | void maxFpsIntervalChanged(); | 811 | void maxFpsIntervalChanged(); | ||
839 | void refreshRateChanged(); | 812 | void refreshRateChanged(); | ||
840 | void vBlankTimeChanged(); | 813 | void vBlankTimeChanged(); | ||
Show All 23 Lines | 823 | private: | |||
864 | int m_borderSnapZone; | 837 | int m_borderSnapZone; | ||
865 | int m_windowSnapZone; | 838 | int m_windowSnapZone; | ||
866 | int m_centerSnapZone; | 839 | int m_centerSnapZone; | ||
867 | bool m_snapOnlyWhenOverlapping; | 840 | bool m_snapOnlyWhenOverlapping; | ||
868 | bool m_rollOverDesktops; | 841 | bool m_rollOverDesktops; | ||
869 | int m_focusStealingPreventionLevel; | 842 | int m_focusStealingPreventionLevel; | ||
870 | int m_killPingTimeout; | 843 | int m_killPingTimeout; | ||
871 | bool m_hideUtilityWindowsForInactive; | 844 | bool m_hideUtilityWindowsForInactive; | ||
872 | bool m_inactiveTabsSkipTaskbar; | | |||
873 | bool m_autogroupSimilarWindows; | | |||
874 | bool m_autogroupInForeground; | | |||
875 | 845 | | |||
876 | CompositingType m_compositingMode; | 846 | CompositingType m_compositingMode; | ||
877 | bool m_useCompositing; | 847 | bool m_useCompositing; | ||
878 | HiddenPreviews m_hiddenPreviews; | 848 | HiddenPreviews m_hiddenPreviews; | ||
879 | int m_glSmoothScale; | 849 | int m_glSmoothScale; | ||
880 | bool m_xrenderSmoothScale; | 850 | bool m_xrenderSmoothScale; | ||
881 | qint64 m_maxFpsInterval; | 851 | qint64 m_maxFpsInterval; | ||
882 | // Settings that should be auto-detected | 852 | // Settings that should be auto-detected | ||
▲ Show 20 Lines • Show All 53 Lines • Show Last 20 Lines |