File indexing completed on 2024-05-12 16:58:26

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