OpenStructure
Loading...
Searching...
No Matches
main_area.hh
Go to the documentation of this file.
1//------------------------------------------------------------------------------
2// This file is part of the OpenStructure project <www.openstructure.org>
3//
4// Copyright (C) 2008-2020 by the OpenStructure authors
5//
6// This library is free software; you can redistribute it and/or modify it under
7// the terms of the GNU Lesser General Public License as published by the Free
8// Software Foundation; either version 3.0 of the License, or (at your option)
9// any later version.
10// This library is distributed in the hope that it will be useful, but WITHOUT
11// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13// details.
14//
15// You should have received a copy of the GNU Lesser General Public License
16// along with this library; if not, write to the Free Software Foundation, Inc.,
17// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18//------------------------------------------------------------------------------
19#ifndef OST_GUI_MAIN_AREA_HH
20#define OST_GUI_MAIN_AREA_HH
21
22
24
25#include <QMdiArea>
26/*
27 Author: Marco Biasini
28 */
29
30namespace ost { namespace gui {
31
34class DLLEXPORT_OST_GUI MainArea: public QMdiArea {
35public:
36 Q_OBJECT
37public:
38 MainArea(QWidget* parent=NULL);
39
41 void EnableTabbedMode(bool tabbed_mode=true);
42
46 void AddWidget(const QString& title, QWidget* widget);
47
63 void AddPersistentWidget(const QString& title, const QString& name,
64 QWidget* widget, int width, int height, int x, int y);
72 void AddPersistentWidget(const QString& title, const QString& name,
73 QWidget* widget, Qt::WindowStates window_state = Qt::WindowStates());
74
80 void ShowSubWindow(QWidget* widget);
81
87 void HideSubWindow(QWidget* widget);
88
89};
90
94
95}}
96
97#endif
main window area It is implemented as a MDI (multi document interface). This allows you to add custom...
Definition main_area.hh:34
void HideSubWindow(QWidget *widget)
hides the given widget inside the main area This method can be used to hide a widget that has been ad...
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
void AddWidget(const QString &title, QWidget *widget)
add volatile widget
void ShowSubWindow(QWidget *widget)
display the given widget inside the main area This method can be used to make a widget visible that h...
MainArea(QWidget *parent=NULL)
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 relaun...
void EnableTabbedMode(bool tabbed_mode=true)
switch between free window and tabbed window mode
#define DLLEXPORT_OST_GUI
Definition base.dox:1