X-Git-Url: https://vaikene.ee/gitweb/pswgen09.html?a=blobdiff_plain;f=src%2Fplugins%2FSdiWindow%2Fisdiwindow.h;h=4e0e43d88d6ebb2daac904a4f2502eb76e46fbf1;hb=13dedf19c628b9967e4c4106ab0fd967f1df0b90;hp=a5794db626de520b49cb2c54fb5aadc9ff31da4a;hpb=06f9c5336ba8a2200b68f636520707693eb5ada7;p=evaf
diff --git a/src/plugins/SdiWindow/isdiwindow.h b/src/plugins/SdiWindow/isdiwindow.h
index a5794db..4e0e43d 100644
--- a/src/plugins/SdiWindow/isdiwindow.h
+++ b/src/plugins/SdiWindow/isdiwindow.h
@@ -22,30 +22,27 @@
#include "libsdiwindow.h"
-#include
#include
+#include
+
+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 needs to fill with widgets.
+ * The iSdiWindow interface implements an SDI window manager.
*/
-class SDIWINDOW_EXPORT iSdiWindow : public QObject
+struct SDIWINDOW_EXPORT iSdiWindow
{
- Q_OBJECT
-
-public:
-
- /// Interface constructor
- iSdiWindow() : QObject() {}
-
- /// Empty virtual destructor
- virtual ~iSdiWindow() {}
-
/**
* Returns the iSdiWindow interface instance
* @return The iSdiWindow interface or zero if not available
@@ -57,17 +54,39 @@ public:
static iSdiWindow * instance();
/**
- * Returns the main window widget
- * @return The main window widget
+ * 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 provides access to the main window widget. The main window is an empty QWidget and
- * needs to be filled with additional widgets in order to provide some functionality.
+ * This function shows the panel.
*/
- virtual QWidget * widget() const = 0;
+ 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