]>
vaikene.ee Git - evaf/blob - src/plugins/SdiWindow/sdiwindow.h
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>
32 #include <QWeakPointer>
41 * Main window widget implementing the iSdiWindow interface
43 class MainWindow
: public QWidget
, public iSdiWindow
46 Q_INTERFACES(eVaf::SdiWindow::iSdiWindow
)
50 MainWindow(QWidget
* parent
= 0, Qt::WindowFlags flags
= 0);
52 virtual ~MainWindow();
54 virtual bool init(QString
const & args
);
58 virtual bool isReady() { return mReady
; }
60 virtual void addWindow(Gui::Window
* window
);
69 void restoreSettings();
77 /// The layout of the main window
78 QVBoxLayout
* mLayout
;
80 /// eVaf GUI window implementing the main window
81 QWeakPointer
<Gui::Window
> mWindow
;
86 * SdiWindow module's implementation
88 class SdiWindowPlugin
: public Plugins::iPlugin
91 Q_INTERFACES(eVaf::Plugins::iPlugin
)
97 virtual ~SdiWindowPlugin();
99 virtual bool init(const QString
& args
);
103 virtual bool isReady() const { return mWindow
!= 0 && mWindow
->isReady(); }
108 /// iSdiWindow interface implementation
109 MainWindow
* mWindow
;
112 } // namespace eVaf::SdiWindow::Internal
113 } // namespace eVaf::SdiWindow
116 #endif // sdiwindow.h