]>
vaikene.ee Git - evaf/blob - src/plugins/SdiWindow/sdiwindow.h
b2c3bc6c2fbdd69a1120d997091dd1bd586e489c
2 * @file SdiWindow/sdiwindow.h
3 * @brief SdiWindow module's implementation
6 * Copyright (c) 2011 Enar Vaikene
8 * This file is part of the eVaf C++ cross-platform application development framework.
10 * This file can be used under the terms of the GNU General Public License
11 * version 3.0 as published by the Free Software Foundation and appearing in
12 * the file LICENSE included in the packaging of this file. Please review the
13 * the following information to ensure the GNU General Public License version
14 * 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
16 * Alternatively, this file may be used in accordance with the Commercial License
17 * Agreement provided with the Software.
20 #ifndef __SDIWINDOW_SDIWINDOW_H
21 # define __SDIWINDOW_SDIWINDOW_H
23 #include "isdiwindow.h"
25 #include <Plugins/iPlugin>
41 class MainWindow
: public QWidget
47 MainWindow(QWidget
* parent
= 0, Qt::WindowFlags flags
= 0);
49 virtual ~MainWindow();
55 void addWidget(QWidget
* widget
);
57 void addLayout(QLayout
* layout
);
66 void restoreSettings();
71 /// The layout of the window
72 QVBoxLayout
* mLayout
;
74 /// Widgets and layouts added to the main window
75 QList
<QObject
*> mItemsAdded
;
80 * iSdiWindow interface implementation
82 class SdiWindowImpl
: public iSdiWindow
90 virtual ~SdiWindowImpl();
92 bool init(const QString
& args
);
96 bool isReady() const { return mReady
; }
98 virtual void addWidget(QWidget
* widget
) { wWindow
->addWidget(widget
); }
100 virtual void addLayout(QLayout
* layout
) { wWindow
->addLayout(layout
); }
108 /// The main window widget
109 MainWindow
* wWindow
;
113 * SdiWindow module's implementation
115 class SdiWindowPlugin
: public Plugins::iPlugin
123 virtual ~SdiWindowPlugin();
125 virtual bool init(const QString
& args
);
129 virtual bool isReady() const { return mWindow
!= 0 && mWindow
->isReady(); }
134 /// iSdiWindow interface implementation
135 SdiWindowImpl
* mWindow
;
138 } // namespace eVaf::SdiWindow::Internal
139 } // namespace eVaf::SdiWindow
142 #endif // sdiwindow.h