6 #ifndef SWIFT_GUI_ENABLEFORFRAMLESSWINDOW_H
7 #define SWIFT_GUI_ENABLEFORFRAMLESSWINDOW_H
48 QWidget *correspondingWidget);
63 virtual void setFrameless(
bool frameless);
66 bool isFrameless()
const {
return m_windowMode == WindowFrameless; }
72 void alwaysOnTop(
bool onTop);
81 static WindowMode stringToWindowMode(
const QString &s);
84 static const QString &windowModeToString(WindowMode m);
89 QPushButton *m_framelessCloseButton =
nullptr;
92 bool m_isMainApplicationWindow =
false;
93 QWidget *m_widget =
nullptr;
94 QSizeGrip *m_framelessSizeGrip =
nullptr;
96 int m_windowFrameSizeW = -1;
97 int m_windowFrameSizeH = -1;
100 virtual void windowFlagsChanged();
103 void addFramelessSizeGripToStatusBar(QStatusBar *statusBar);
106 void hideFramelessSizeGripInStatusBar();
112 void setDynamicProperties(
bool frameless);
115 QHBoxLayout *addFramelessCloseButton(QMenuBar *menuBar);
118 void toolToNormalWindow();
121 void normalToToolWindow();
124 bool isToolWindow()
const;
127 bool handleMousePressEvent(QMouseEvent *event);
130 bool handleMouseMoveEvent(QMouseEvent *event);
133 bool handleChangeEvent(QEvent *event);
136 void showMinimizedModeChecked();
139 void showNormalModeChecked();
142 static Qt::WindowFlags modeToWindowFlags(
WindowMode mode);
Main window which can be frameless.
bool isMainApplicationWindow() const
Is main application, explicitly set.
QWidget * getWidget() const
Corresponding QMainWindow.
QPoint m_framelessDragPosition
position, if moving is handled with frameless window
QByteArray m_framelessPropertyName
property name for frameless widgets
virtual ~CEnableForFramelessWindow()
Destructor.
CEnableForFramelessWindow & operator=(const CEnableForFramelessWindow &)=delete
Copy assignment operator.
QSize m_moveSize
size when moved (in frameless window)
bool isFrameless() const
Frameless?
CEnableForFramelessWindow(const CEnableForFramelessWindow &)=delete
Copy constructor.
#define SWIFT_GUI_EXPORT
Export a class or function from the library.