X-Git-Url: https://vaikene.ee/gitweb/pswgen11.html?a=blobdiff_plain;ds=inline;f=src%2Fplugins%2FSdiWindow%2Fisdiwindow.h;h=825961ebaf533118367f4ac8ee66016c23d8c087;hb=HEAD;hp=28e774d1b5be7c262aaabbc761aa78b96b23e05c;hpb=0957525838e501a4609a15b8d7a765da43362025;p=evaf
diff --git a/src/plugins/SdiWindow/isdiwindow.h b/src/plugins/SdiWindow/isdiwindow.h
index 28e774d..825961e 100644
--- a/src/plugins/SdiWindow/isdiwindow.h
+++ b/src/plugins/SdiWindow/isdiwindow.h
@@ -3,7 +3,7 @@
* @brief eVaf SDI window interface
* @author Enar Vaikene
*
- * Copyright (c) 2011 Enar Vaikene
+ * Copyright (c) 2011-2019 Enar Vaikene
*
* This file is part of the eVaf C++ cross-platform application development framework.
*
@@ -29,13 +29,17 @@ class QWidget;
class QLayout;
namespace eVaf {
+
+namespace Gui {
+ class Panel;
+} // namespace eVaf::Gui
+
namespace SdiWindow {
/**
- * Main window interface for eVaf applications implementing the Single Document Interface.
+ * Single Document Interface window manager for eVaf applications.
*
- * 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.
+ * The iSdiWindow interface implements an SDI window manager.
*/
struct SDIWINDOW_EXPORT iSdiWindow
{
@@ -50,26 +54,44 @@ struct SDIWINDOW_EXPORT iSdiWindow
static iSdiWindow * instance();
/**
- * Adds the widget to the end of the main window layout
- * @param widget The widget
+ * 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 adds the widget to the end of the main window layout.
+ * This function returns a panel identified by the name.
*/
- virtual void addWidget(QWidget * widget) = 0;
+ virtual Gui::Panel * panel(QString const & name) const = 0;
/**
- * Adds the layout to the end of the main window layout
- * @param layout The layout
+ * Shows a panel
+ * @param name Name of the panel
+ * @return True if succeeded; false if not
*
- * This function adds the new layout to the end of the main window layout.
+ * This function shows the panel.
*/
- virtual void addLayout(QLayout * layout) = 0;
+ virtual bool showPanel(QString const & name) = 0;
};
} // namespace eVaf::SdiWindow
} // namespace eVaf
-Q_DECLARE_INTERFACE(eVaf::SdiWindow::iSdiWindow, "eVaf.SdiWindow.iSdiWindow/1.0")
+Q_DECLARE_INTERFACE(eVaf::SdiWindow::iSdiWindow, "eVaf.SdiWindow.iSdiWindow/1.1")
#endif // isdiwindow.h