File indexing completed on 2024-04-28 05:26:20
0001 /* 0002 * SPDX-FileCopyrightText: 2014 Hugo Pereira Da Costa <hugo.pereira@free.fr> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include <QFlags> 0010 #include <QPointer> 0011 #include <QScopedPointer> 0012 #include <QWeakPointer> 0013 0014 namespace Breeze 0015 { 0016 //*@name convenience typedef 0017 //@{ 0018 0019 //* scoped pointer convenience typedef 0020 template<typename T> 0021 using WeakPointer = QPointer<T>; 0022 0023 //* scoped pointer convenience typedef 0024 template<typename T> 0025 using ScopedPointer = QScopedPointer<T, QScopedPointerPodDeleter>; 0026 0027 //@} 0028 0029 //* animation mode 0030 enum AnimationMode { 0031 AnimationNone = 0, 0032 AnimationHover = 0x1, 0033 AnimationFocus = 0x2, 0034 AnimationEnable = 0x4, 0035 AnimationPressed = 0x8, 0036 }; 0037 0038 Q_DECLARE_FLAGS(AnimationModes, AnimationMode) 0039 0040 //* corners 0041 enum Corner { 0042 CornerTopLeft = 0x1, 0043 CornerTopRight = 0x2, 0044 CornerBottomLeft = 0x4, 0045 CornerBottomRight = 0x8, 0046 CornersTop = CornerTopLeft | CornerTopRight, 0047 CornersBottom = CornerBottomLeft | CornerBottomRight, 0048 CornersLeft = CornerTopLeft | CornerBottomLeft, 0049 CornersRight = CornerTopRight | CornerBottomRight, 0050 AllCorners = CornerTopLeft | CornerTopRight | CornerBottomLeft | CornerBottomRight, 0051 }; 0052 0053 Q_DECLARE_FLAGS(Corners, Corner) 0054 0055 //* sides 0056 enum Side { 0057 SideLeft = 0x1, 0058 SideTop = 0x2, 0059 SideRight = 0x4, 0060 SideBottom = 0x8, 0061 AllSides = SideLeft | SideTop | SideRight | SideBottom, 0062 }; 0063 0064 Q_DECLARE_FLAGS(Sides, Side) 0065 0066 //* checkbox state 0067 enum CheckBoxState { 0068 CheckOff, 0069 CheckPartial, 0070 CheckOn, 0071 CheckAnimated, 0072 }; 0073 0074 //* radio button state 0075 enum RadioButtonState { 0076 RadioOff, 0077 RadioOn, 0078 RadioAnimated, 0079 }; 0080 0081 //* arrow orientation 0082 enum ArrowOrientation { 0083 ArrowNone, 0084 ArrowUp, 0085 ArrowDown, 0086 ArrowLeft, 0087 ArrowRight, 0088 }; 0089 0090 //* button type 0091 enum ButtonType { 0092 ButtonClose, 0093 ButtonMaximize, 0094 ButtonMinimize, 0095 ButtonRestore, 0096 }; 0097 0098 } 0099 0100 Q_DECLARE_OPERATORS_FOR_FLAGS(Breeze::AnimationModes) 0101 Q_DECLARE_OPERATORS_FOR_FLAGS(Breeze::Corners) 0102 Q_DECLARE_OPERATORS_FOR_FLAGS(Breeze::Sides)