]> vaikene.ee Git - evaf/blobdiff - src/plugins/SdiWindow/isdiwindow.h
Changed the SdiWindow::iSdiWindow interface.
[evaf] / src / plugins / SdiWindow / isdiwindow.h
index a5794db626de520b49cb2c54fb5aadc9ff31da4a..13b99037471a499f02ab2d85f02a3ab08952c94e 100644 (file)
 
 #include "libsdiwindow.h"
 
-#include <QObject>
 #include <QString>
+#include <QtPlugin>
+
+class QWidget;
+class QLayout;
 
 namespace eVaf {
+
+namespace Gui {
+    class Window;
+} // 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,18 @@ public:
     static iSdiWindow * instance();
 
     /**
-     * Returns the main window widget
-     * @return The main window widget
+     * Adds the window to the main SDI window
+     * @param window The window
      *
-     * 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 adds a window to the main SDI layout.
      */
-    virtual QWidget * widget() const = 0;
+    virtual void addWindow(Gui::Window * window) = 0;
 
 };
 
 } // namespace eVaf::SdiWindow
 } // namespace eVaf
 
+Q_DECLARE_INTERFACE(eVaf::SdiWindow::iSdiWindow, "eVaf.SdiWindow.iSdiWindow/1.1")
+
 #endif // isdiwindow.h