2 * @file SdiWindow/isdiwindow.h
3 * @brief eVaf SDI window interface
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_ISDIWINDOW_H
21 # define __SDIWINDOW_ISDIWINDOW_H
23 #include "libsdiwindow.h"
35 * Main window interface for eVaf applications implementing the Single Document Interface.
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.
40 struct SDIWINDOW_EXPORT iSdiWindow
43 * Returns the iSdiWindow interface instance
44 * @return The iSdiWindow interface or zero if not available
46 * This function returns the global iSdiWindow interface instance. Using this function
47 * is not mandatory and modules can use the iRegistry interface instead. Using the iRegistry
48 * interface has the advantage that modules do not need to link against this library.
50 static iSdiWindow
* instance();
53 * Adds the widget to the end of the main window layout
54 * @param widget The widget
56 * This function adds the widget to the end of the main window layout.
58 virtual void addWidget(QWidget
* widget
) = 0;
61 * Adds the layout to the end of the main window layout
62 * @param layout The layout
64 * This function adds the new layout to the end of the main window layout.
66 virtual void addLayout(QLayout
* layout
) = 0;
70 } // namespace eVaf::SdiWindow
73 Q_DECLARE_INTERFACE(eVaf::SdiWindow::iSdiWindow
, "eVaf.SdiWindow.iSdiWindow/1.0")
75 #endif // isdiwindow.h