swift
Public Member Functions | List of all members
swift::gui::CDockWidgetInfoArea Class Reference

Specialized class for dock widgets serving as info area. More...

Inheritance diagram for swift::gui::CDockWidgetInfoArea:
[legend]

Public Member Functions

 CDockWidgetInfoArea (QWidget *parent=nullptr)
 Constructor.
 
const CInfoAreagetParentInfoArea () const
 The parent info area.
 
CInfoAreagetParentInfoArea ()
 The parent info area.
 
bool isSelectedDockWidget () const
 Is this the selected widget, means it is not floating, and it is the one selected.
 
bool isVisibleWidget () const
 Visible widget.
 
virtual void addToContextMenu (QMenu *contextMenu) const
 Contribute to menu. More...
 
virtual void initialFloating ()
 Widget is initialized by being a floating window for a shot period. More...
 
- Public Member Functions inherited from swift::gui::CDockWidget
void setOriginalTitleBar ()
 Set original title bar.
 
void setEmptyTitleBar ()
 Set empty title bar (empty widget as title bar)
 
void setNullTitleBarWidget ()
 Set null (nullptr) title bar.
 
const QString & windowTitleBackup () const
 Window title backup.
 
QString windowTitleOrBackup () const
 If current window title is empty, use backup.
 
bool showTitleWhenDocked () const
 Window title when window is docked.
 
bool isSelected () const
 Selected when tabbed.
 
bool isWidgetVisible () const
 Is widget visible? Not to be confused with. More...
 
void allowStatusBar (bool allow)
 Allow a status bar to be displayed.
 
void showTitleWhenDocked (bool show)
 Show the window title when docked.
 
void resetWasAlreadyFloating ()
 Reset first time floating, marked as never floated before.
 
bool wasAlreadyFloating () const
 Was widget already floating?
 
void setPreferredSizeWhenFloating (const QSize &size)
 Size when floating first time.
 
void setOffsetWhenFloating (const QPoint &point, bool frameless)
 Position offset when floating first time.
 
virtual void setFrameless (bool frameless)
 Framless. More...
 
void toggleFloating ()
 Toggle floating.
 
void toggleVisibility ()
 Toggle visibility.
 
void toggleFrameless ()
 Toggle frameless mode.
 
void windowAlwaysOnTop ()
 Toggle frameless deferred. More...
 
void windowNotAlwaysOnTop ()
 Window not on top.
 
void setAlwaysOnTop (bool onTop)
 Set always on top.
 
bool restoreFromSettings ()
 Restore from settings.
 
void saveCurrentStateToSettings ()
 Remember widget state.
 
void resetSettings ()
 Reset margin settings.
 
void resetPosition ()
 Reset window position.
 
void setWindowTitle (const QString &title)
 Set title and internally keep a backup.
 
void displayStatusMessage (const swift::misc::CStatusMessage &statusMessage)
 Display status message.
 
void displayStatusMessages (const swift::misc::CStatusMessageList &statusMessages)
 Display status messages.
 
- Public Member Functions inherited from swift::gui::COverlayMessagesDockWidget
 COverlayMessagesDockWidget (QWidget *parent=nullptr)
 Constructor.
 
- Public Member Functions inherited from swift::gui::COverlayMessagesBase< QDockWidget >
virtual ~COverlayMessagesBase ()
 Destructor.
 
void initOverlayMessages (QSize inner={})
 Init, normally we use lazy init, but by calling init explicitly we can force initalization. More...
 
void activateTextMessages (bool activate)
 Active send/receive of text messages. More...
 
void showStatusMessagesFrame ()
 Show the inner frame.
 
void setOverlaySizeFactors (double widthFactor, double heightFactor, double middleFactor=2)
 Set the size factors.
 
void setForceSmall (bool force)
 Force small (smaller layout) More...
 
void setReducedInfo (bool reduced)
 Display reduced information. More...
 
void showOverlayMessagesWithConfirmation (const swift::misc::CStatusMessageList &messages, bool appendOldMessages, const QString &confirmationMessage, std::function< void()> okLambda, QMessageBox::StandardButton defaultButton=QMessageBox::Cancel, std::chrono::milliseconds timeout=std::chrono::milliseconds(0))
 Show multiple messages with confirmation bar. More...
 
void clearOverlayMessages ()
 Clear the overlay messages. More...
 
void closeOverlay ()
 Close button clicked. More...
 
void showOverlayMessages (const swift::misc::CStatusMessageList &messages, bool appendOldMessages=false, std::chrono::milliseconds timeout=std::chrono::milliseconds(0))
 Show multiple messages. More...
 
void showOverlayMessagesOrSingleMessage (const swift::misc::CStatusMessageList &messages, bool appendOldMessages=false, std::chrono::milliseconds timeout=std::chrono::milliseconds(0))
 Show multiple messages or a single message. More...
 
void showOverlayMessagesOrHTMLMessage (const swift::misc::CStatusMessageList &messages, bool appendOldMessages=false, std::chrono::milliseconds timeout=std::chrono::milliseconds(0))
 Show multiple messages or a single message (HTML) More...
 
void sortOverlayMessages (const swift::misc::CPropertyIndex &property, Qt::SortOrder order)
 Sort of overlay messages. More...
 
void setOverlayMessagesSorting (const swift::misc::CPropertyIndex &property, Qt::SortOrder order)
 Set sorting of overlay messages. More...
 
bool showOverlayMessage (const swift::misc::CStatusMessage &message, std::chrono::milliseconds timeout=std::chrono::milliseconds(0))
 Show single message. More...
 
bool showOverlayTextMessage (const swift::misc::network::CTextMessage &textMessage, std::chrono::milliseconds timeout=std::chrono::milliseconds(0))
 Info message, based on text message. More...
 
void showOverlayVariant (const swift::misc::CVariant &variant, std::chrono::milliseconds timeout=std::chrono::milliseconds(0))
 Display one of the supported types. More...
 
void showOverlayImage (const swift::misc::CPixmap &pixmap, std::chrono::milliseconds timeout=std::chrono::milliseconds(0))
 Image. More...
 
bool showOverlayHTMLMessage (const QString &htmlMessage, std::chrono::milliseconds timeout=std::chrono::milliseconds(0))
 HTML message. More...
 
bool showOverlayHTMLMessage (const swift::misc::CStatusMessage &message, std::chrono::milliseconds timeout=std::chrono::milliseconds(0))
 HTML message. More...
 
void showDownloadProgress (int progress, qint64 current, qint64 max, const QUrl &url, std::chrono::milliseconds timeout=std::chrono::milliseconds(0))
 Download progress. More...
 
void showOverlayInlineTextMessage (components::TextMessageTab tab)
 Image. More...
 
void showOverlayInlineTextMessage (const swift::misc::aviation::CCallsign &callsign)
 Image. More...
 
- Public Member Functions inherited from swift::gui::CEnableForFramelessWindow
 CEnableForFramelessWindow (WindowMode mode, bool isMainApplicationWindow, const char *framelessPropertyname, QWidget *correspondingWidget)
 Constructor. More...
 
virtual ~CEnableForFramelessWindow ()
 Destructor.
 
 CEnableForFramelessWindow (const CEnableForFramelessWindow &)=delete
 Copy constructor.
 
CEnableForFramelessWindowoperator= (const CEnableForFramelessWindow &)=delete
 Copy assignment operator.
 
void setMode (WindowMode mode)
 Window mode.
 
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.
 

Additional Inherited Members

- Public Types inherited from swift::gui::CEnableForFramelessWindow
enum  WindowMode { WindowNormal , WindowFrameless , WindowTool }
 Window modes.
 
- Signals inherited from swift::gui::CDockWidget
void widgetTopLevelChanged (CDockWidget *, bool topLevel)
 Top level has changed for given widget.
 
void fontSizePlus ()
 Font size signals.
 
void fontSizeMinus ()
 Font size signals.
 
- Static Public Member Functions inherited from swift::gui::CDockWidget
static const QString & propertyOuterWidget ()
 Value for dynamic property "dockwidget".
 
static const QString & propertyInnerWidget ()
 Value for dynamic property "dockwidget".
 
- Static Public Member Functions inherited from swift::gui::CEnableForFramelessWindow
static WindowMode stringToWindowMode (const QString &s)
 String to window mode.
 
static const QString & windowModeToString (WindowMode m)
 String to window mode.
 
- Protected Member Functions inherited from swift::gui::CDockWidget
 CDockWidget (QWidget *parent=nullptr)
 Constructor.
 
 CDockWidget (bool allowStatusBar, QWidget *parent=nullptr)
 Constructor.
 
void setMargins ()
 Set margins from settings.
 
void setMarginsWhenFloating (const QMargins &margins)
 Margins when window is floating.
 
void setMarginsWhenFloating (int left, int top, int right, int bottom)
 Margins when window is floating.
 
QMargins getMarginsWhenFloating () const
 Margins when floating.
 
void setMarginsWhenFramelessFloating (const QMargins &margins)
 Margins when window is floating (frameless)
 
void setMarginsWhenFramelessFloating (int left, int top, int right, int bottom)
 Margins when window is floating (frameless)
 
QMargins getMarginsWhenFramelessFloating () const
 Margins when floating and frameless.
 
void setMarginsWhenDocked (const QMargins &margins)
 Margins when widget is floating.
 
void setMarginsWhenDocked (int left, int top, int right, int bottom)
 Margins when widget is floating.
 
QMargins getMarginsWhenDocked () const
 Margins when docked.
 
void setAlwaysOnTopFlag (bool onTop)
 Set the on top flag.
 
virtual void closeEvent (QCloseEvent *event)
 
virtual void paintEvent (QPaintEvent *event)
 
virtual void mouseMoveEvent (QMouseEvent *event)
 
virtual void keyPressEvent (QKeyEvent *event)
 
virtual void mousePressEvent (QMouseEvent *event)
 
virtual void onStyleSheetsChanged ()
 Style sheet has changed.
 
- Protected Member Functions inherited from swift::gui::COverlayMessagesBase< QDockWidget >
 COverlayMessagesBase (QWidget *parent, Qt::WindowFlags f=Qt::WindowFlags())
 Constructor.
 
void initInnerFrame (double widthFactor=-1, double heightFactor=-1)
 Init the inner frame (if not yet initialized)
 
void initMinimalFrame (int lines=4)
 Init a minimal frame (smaller as the normal one)
 
bool hasMinimumSize (int w, int h) const
 Check minimum height/width.
 
virtual void resizeEvent (QResizeEvent *event)
 
- Protected Member Functions inherited from swift::gui::CEnableForFramelessWindow
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 inherited from swift::gui::CEnableForFramelessWindow
static Qt::WindowFlags modeToWindowFlags (WindowMode mode)
 Translate mode.
 
- Protected Attributes inherited from swift::gui::COverlayMessagesBase< QDockWidget >
COverlayMessagesm_overlayMessages
 embedded QFrame with status messages
 
- Protected Attributes inherited from swift::gui::CEnableForFramelessWindow
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
 

Detailed Description

Specialized class for dock widgets serving as info area.

See also
CDockWidgetInfoBar
CInfoArea

Definition at line 26 of file dockwidgetinfoarea.h.

Member Function Documentation

◆ addToContextMenu()

void swift::gui::CDockWidgetInfoArea::addToContextMenu ( QMenu *  contextMenu) const
virtual

Contribute to menu.

Remarks
made public so other classes can nest this submenu

Reimplemented from swift::gui::CDockWidget.

Definition at line 59 of file dockwidgetinfoarea.cpp.

◆ initialFloating()

void swift::gui::CDockWidgetInfoArea::initialFloating ( )
virtual

Widget is initialized by being a floating window for a shot period.

Place where - when overidden - post initializations can take place. The GUI is already initialized, so all widget data are available.

Reimplemented from swift::gui::CDockWidget.

Definition at line 86 of file dockwidgetinfoarea.cpp.


The documentation for this class was generated from the following files: