X-Git-Url: https://vaikene.ee/gitweb/highlight.css?a=blobdiff_plain;f=src%2Fplugins%2FSdiWindow%2Fisdiwindow.h;h=28e774d1b5be7c262aaabbc761aa78b96b23e05c;hb=ad70660919cd7b0e821e35548b6d1f5efa181c4c;hp=a5794db626de520b49cb2c54fb5aadc9ff31da4a;hpb=06f9c5336ba8a2200b68f636520707693eb5ada7;p=evaf diff --git a/src/plugins/SdiWindow/isdiwindow.h b/src/plugins/SdiWindow/isdiwindow.h index a5794db..28e774d 100644 --- a/src/plugins/SdiWindow/isdiwindow.h +++ b/src/plugins/SdiWindow/isdiwindow.h @@ -22,8 +22,11 @@ #include "libsdiwindow.h" -#include #include +#include + +class QWidget; +class QLayout; namespace eVaf { namespace SdiWindow { @@ -32,20 +35,10 @@ 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 needs to fill with widgets. + * an empty window that the application can fill with widgets. */ -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 +50,26 @@ public: static iSdiWindow * instance(); /** - * Returns the main window widget - * @return The main window widget + * Adds the widget to the end of the main window layout + * @param widget The widget * - * 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 the widget to the end of the main window layout. */ - virtual QWidget * widget() const = 0; + 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