]> vaikene.ee Git - evaf/blob - src/plugins/SdiWindow/isdiwindow.h
Changed the way how the main window is used.
[evaf] / src / plugins / SdiWindow / isdiwindow.h
1 /**
2 * @file SdiWindow/isdiwindow.h
3 * @brief eVaf SDI window interface
4 * @author Enar Vaikene
5 *
6 * Copyright (c) 2011 Enar Vaikene
7 *
8 * This file is part of the eVaf C++ cross-platform application development framework.
9 *
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.
15 *
16 * Alternatively, this file may be used in accordance with the Commercial License
17 * Agreement provided with the Software.
18 */
19
20 #ifndef __SDIWINDOW_ISDIWINDOW_H
21 # define __SDIWINDOW_ISDIWINDOW_H
22
23 #include "libsdiwindow.h"
24
25 #include <QObject>
26 #include <QString>
27
28 class QWidget;
29 class QLayout;
30
31 namespace eVaf {
32 namespace SdiWindow {
33
34 /**
35 * Main window interface for eVaf applications implementing the Single Document Interface.
36 *
37 * The iSdiWindow interface provides access to the SDI main window. The SDI main window is
38 * an empty window that the application can fill with widgets.
39 */
40 class SDIWINDOW_EXPORT iSdiWindow : public QObject
41 {
42 Q_OBJECT
43
44 public:
45
46 /// Interface constructor
47 iSdiWindow() : QObject() {}
48
49 /// Empty virtual destructor
50 virtual ~iSdiWindow() {}
51
52 /**
53 * Returns the iSdiWindow interface instance
54 * @return The iSdiWindow interface or zero if not available
55 *
56 * This function returns the global iSdiWindow interface instance. Using this function
57 * is not mandatory and modules can use the iRegistry interface instead. Using the iRegistry
58 * interface has the advantage that modules do not need to link against this library.
59 */
60 static iSdiWindow * instance();
61
62 /**
63 * Adds the widget to the end of the main window layout
64 * @param widget The widget
65 *
66 * This function adds the widget to the end of the main window layout.
67 */
68 virtual void addWidget(QWidget * widget) = 0;
69
70 /**
71 * Adds the layout to the end of the main window layout
72 * @param layout The layout
73 *
74 * This function adds the new layout to the end of the main window layout.
75 */
76 virtual void addLayout(QLayout * layout) = 0;
77
78 };
79
80 } // namespace eVaf::SdiWindow
81 } // namespace eVaf
82
83 #endif // isdiwindow.h