|
swift
|
Main window which can be frameless. More...
Public Types | |
| enum | WindowMode { WindowNormal , WindowFrameless , WindowTool } |
| Window modes. | |
Public Member Functions | |
| CEnableForFramelessWindow (WindowMode mode, bool isMainApplicationWindow, const char *framelessPropertyname, QWidget *correspondingWidget) | |
| Constructor. More... | |
| virtual | ~CEnableForFramelessWindow ()=default |
| Destructor. | |
| CEnableForFramelessWindow (const CEnableForFramelessWindow &)=delete | |
| Copy constructor. | |
| CEnableForFramelessWindow & | operator= (const CEnableForFramelessWindow &)=delete |
| Copy assignment operator. | |
| void | setMode (WindowMode mode) |
| Window mode. | |
| virtual void | setFrameless (bool frameless) |
| Framless. | |
| bool | isFrameless () const |
| Frameless? | |
| bool | isMainApplicationWindow () const |
| Is main application, explicitly set. | |
| void | alwaysOnTop (bool onTop) |
| Always on top? | |
| void | activate () |
| Activates the window. | |
| QWidget * | getWidget () const |
| Corresponding QMainWindow. | |
Static Public Member Functions | |
| static WindowMode | stringToWindowMode (const QString &s) |
| String to window mode. | |
| static const QString & | windowModeToString (WindowMode m) |
| String to window mode. | |
Protected Member Functions | |
| virtual void | windowFlagsChanged () |
| Can be used as notification if window mode changes. | |
| void | addFramelessSizeGripToStatusBar (QStatusBar *statusBar) |
| Resize grip handle. | |
| void | hideFramelessSizeGripInStatusBar () |
| Resize grip handle. | |
| void | setWindowAttributes (WindowMode mode) |
| Attributes. More... | |
| void | setDynamicProperties (bool frameless) |
| Set dynamic properties such as frameless. | |
| QHBoxLayout * | addFramelessCloseButton (QMenuBar *menuBar) |
| Close button for frameless windows. | |
| void | toolToNormalWindow () |
| Remove tool and add desktop window. | |
| void | normalToToolWindow () |
| Remove desktop and add tool window. | |
| bool | isToolWindow () const |
| Tool window. | |
| bool | handleMousePressEvent (QMouseEvent *event) |
| Mouse press, required for frameless window. | |
| bool | handleMouseMoveEvent (QMouseEvent *event) |
| Mouse moving, required for frameless window. | |
| bool | handleChangeEvent (QEvent *event) |
| Mouse window change event. | |
| void | showMinimizedModeChecked () |
| Check mode and then show minimized. | |
| void | showNormalModeChecked () |
| Check mode and then show normal. | |
Static Protected Member Functions | |
| static Qt::WindowFlags | modeToWindowFlags (WindowMode mode) |
| Translate mode. | |
Protected Attributes | |
| QPoint | m_framelessDragPosition |
| position, if moving is handled with frameless window | |
| QSize | m_moveSize |
| size when moved (in frameless window) | |
| QPushButton * | m_framelessCloseButton = nullptr |
| close button | |
| WindowMode | m_windowMode = WindowNormal |
| Window mode,. More... | |
| WindowMode | m_originalWindowMode = WindowNormal |
| mode when initialized | |
| bool | m_isMainApplicationWindow = false |
| is this the main application window (only 1)? | |
| QWidget * | m_widget = nullptr |
| corresponding window or dock widget | |
| QSizeGrip * | m_framelessSizeGrip = nullptr |
| size grip object | |
| QByteArray | m_framelessPropertyName |
| property name for frameless widgets | |
| int | m_windowFrameSizeW = -1 |
| window frame width | |
| int | m_windowFrameSizeH = -1 |
| window frame height | |
Main window which can be frameless.
QMainWindows cannot be promoted. Hence a derived class does not work properly here. Furthermore frameless functionality is also required for CDockWidgets as well.
Definition at line 31 of file enableforframelesswindow.h.
| swift::gui::CEnableForFramelessWindow::CEnableForFramelessWindow | ( | CEnableForFramelessWindow::WindowMode | mode, |
| bool | isMainApplicationWindow, | ||
| const char * | framelessPropertyname, | ||
| QWidget * | correspondingWidget | ||
| ) |
Constructor.
| mode | window mode as defined in WindowMode |
| isMainApplicationWindow | is this the main (there should be only one) application window |
| framelessPropertyname | qss property indication frameless |
| correspondingWidget | the widget representing the window |
Definition at line 33 of file enableforframelesswindow.cpp.
|
protected |
Attributes.
Definition at line 139 of file enableforframelesswindow.cpp.
|
protected |