]> vaikene.ee Git - evaf/blob - src/plugins/SdiWindow/isdiwindow.h
Added main window plugin implementing Single Document Interface.
[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 namespace eVaf {
29 namespace SdiWindow {
30
31 /**
32 * Main window interface for eVaf applications implementing the Single Document Interface.
33 *
34 * The iSdiWindow interface provides access to the SDI main window. The SDI main window is
35 * an empty window that the application needs to fill with widgets.
36 */
37 class SDIWINDOW_EXPORT iSdiWindow : public QObject
38 {
39 Q_OBJECT
40
41 public:
42
43 /// Interface constructor
44 iSdiWindow() : QObject() {}
45
46 /// Empty virtual destructor
47 virtual ~iSdiWindow() {}
48
49 /**
50 * Returns the iSdiWindow interface instance
51 * @return The iSdiWindow interface or zero if not available
52 *
53 * This function returns the global iSdiWindow interface instance. Using this function
54 * is not mandatory and modules can use the iRegistry interface instead. Using the iRegistry
55 * interface has the advantage that modules do not need to link against this library.
56 */
57 static iSdiWindow * instance();
58
59 /**
60 * Returns the main window widget
61 * @return The main window widget
62 *
63 * This function provides access to the main window widget. The main window is an empty QWidget and
64 * needs to be filled with additional widgets in order to provide some functionality.
65 */
66 virtual QWidget * widget() const = 0;
67
68 };
69
70 } // namespace eVaf::SdiWindow
71 } // namespace eVaf
72
73 #endif // isdiwindow.h