/** * @file SdiWindow/isdiwindow.h * @brief eVaf SDI window interface * @author Enar Vaikene * * Copyright (c) 2011 Enar Vaikene * * This file is part of the eVaf C++ cross-platform application development framework. * * This file can be used under the terms of the GNU General Public License * version 3.0 as published by the Free Software Foundation and appearing in * the file LICENSE included in the packaging of this file. Please review the * the following information to ensure the GNU General Public License version * 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html. * * Alternatively, this file may be used in accordance with the Commercial License * Agreement provided with the Software. */ #ifndef __SDIWINDOW_ISDIWINDOW_H # define __SDIWINDOW_ISDIWINDOW_H #include "libsdiwindow.h" #include #include class QWidget; class QLayout; namespace eVaf { namespace SdiWindow { /** * Main window interface for eVaf applications implementing the Single Document Interface. * * The iSdiWindow interface provides access to the SDI main window. The SDI main window is * an empty window that the application can fill with widgets. */ struct SDIWINDOW_EXPORT iSdiWindow { /** * Returns the iSdiWindow interface instance * @return The iSdiWindow interface or zero if not available * * This function returns the global iSdiWindow interface instance. Using this function * is not mandatory and modules can use the iRegistry interface instead. Using the iRegistry * interface has the advantage that modules do not need to link against this library. */ static iSdiWindow * instance(); /** * Adds the widget to the end of the main window layout * @param widget The widget * * This function adds the widget to the end of the main window layout. */ virtual void addWidget(QWidget * widget) = 0; /** * Adds the layout to the end of the main window layout * @param layout The layout * * This function adds the new layout to the end of the main window layout. */ virtual void addLayout(QLayout * layout) = 0; }; } // namespace eVaf::SdiWindow } // namespace eVaf Q_DECLARE_INTERFACE(eVaf::SdiWindow::iSdiWindow, "eVaf.SdiWindow.iSdiWindow/1.0") #endif // isdiwindow.h