/** * @file SdiWindow/isdiwindow.h * @brief eVaf SDI window interface * @author Enar Vaikene * * Copyright (c) 2011-2019 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 Gui { class Panel; } // namespace eVaf::Gui namespace SdiWindow { /** * Single Document Interface window manager for eVaf applications. * * The iSdiWindow interface implements an SDI window manager. */ 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(); /** * Empty virtual destructor */ virtual ~iSdiWindow() {} /** * Adds a panel to the SDI window manager * @param name Name of the panel * @param panel The panel * * This function adds a panel to the SDI window manager. The ownership of the panel * is transferred to the window manager and it is the responsibility of the window * manager to delete it. */ virtual void addPanel(QString const & name, Gui::Panel * panel) = 0; /** * Returns a panel by the name * @param name Name of the panel * @return Pointer to the panel or 0 if failed * * This function returns a panel identified by the name. */ virtual Gui::Panel * panel(QString const & name) const = 0; /** * Shows a panel * @param name Name of the panel * @return True if succeeded; false if not * * This function shows the panel. */ virtual bool showPanel(QString const & name) = 0; }; } // namespace eVaf::SdiWindow } // namespace eVaf Q_DECLARE_INTERFACE(eVaf::SdiWindow::iSdiWindow, "eVaf.SdiWindow.iSdiWindow/1.1") #endif // isdiwindow.h