OpenStructure
Public Member Functions
MainArea Class Reference

#include <main_area.hh>

Inherits QMdiArea.

Public Member Functions

 MainArea (QWidget *parent=NULL)
 
void EnableTabbedMode (bool tabbed_mode=true)
 
void AddWidget (const QString &title, QWidget *widget)
 
void AddPersistentWidget (const QString &title, const QString &name, QWidget *widget, int width, int height, int x, int y)
 
void AddPersistentWidget (const QString &title, const QString &name, QWidget *widget, Qt::WindowStates window_state=Qt::WindowStates())
 
void ShowSubWindow (QWidget *widget)
 
void HideSubWindow (QWidget *widget)
 

Detailed Description

main window area It is implemented as a MDI (multi document interface). This allows you to add custom widgets to it.

Definition at line 34 of file main_area.hh.

Constructor & Destructor Documentation

◆ MainArea()

MainArea ( QWidget *  parent = NULL)

Member Function Documentation

◆ AddPersistentWidget() [1/2]

void AddPersistentWidget ( const QString &  title,
const QString &  name,
QWidget *  widget,
int  width,
int  height,
int  x,
int  y 
)

add a widget whose geometry is preserved across application relaunches

For widgets that are volatile, use AddWidget()

If tabbed mode is enabled, the widget geometry is ignored.

Parameters
titlestring that is displayed in the gui
nameis the unique name (within the scope of the main area) for the widget that is used to restore and save the widget geometry.
widgetis the widget to be added to the main area.
widthwidth of the widget inside the mdi
heightheight of the widget inside the mdi
xx position of the widget inside the mdi
yy position of the widget inside the mdi
See also
AddWidget

◆ AddPersistentWidget() [2/2]

void AddPersistentWidget ( const QString &  title,
const QString &  name,
QWidget *  widget,
Qt::WindowStates  window_state = Qt::WindowStates() 
)

add a widget with custom window states to the ui. The Geometry is preserved across application relaunches

See also
AddPersistentWidget(const QString& title, const QString& name, QWidget* widget, int width, int height, int x, int y)
Parameters
titlestring that is displayed in the gui
nameis the unique name (within the scope of the main area) for the widget that is used to restore and save the widget geometry.
widgetis the widget to be added to the main area.
window_statecustom window_state for the widget. See Qt Documentation to learn more about WindowStates.

◆ AddWidget()

void AddWidget ( const QString &  title,
QWidget *  widget 
)

add volatile widget

Parameters
titlestring that is displayed in the gui
widgetis the widget to be added to the main area.

◆ EnableTabbedMode()

void EnableTabbedMode ( bool  tabbed_mode = true)

switch between free window and tabbed window mode

◆ HideSubWindow()

void HideSubWindow ( QWidget *  widget)

hides the given widget inside the main area This method can be used to hide a widget that has been added to this mdi area. This method should only be called if you are sure, that the widget has been added to the main area. Otherwise, there might be an unexpected behaviour!

Parameters
widgetwhich you want to hide

◆ ShowSubWindow()

void ShowSubWindow ( QWidget *  widget)

display the given widget inside the main area This method can be used to make a widget visible that has been added to the mdi area. This method should only be called if you are sure, that the widget has been added to the main area. Otherwise, there might be an unexpected behaviour!

Parameters
widgetwhich you want to make visible

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