Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging

* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
  Designer: Extend container extension.
This commit is contained in:
Qt Continuous Integration System 2011-05-20 18:21:33 +10:00
commit acc98b9b36
2 changed files with 34 additions and 0 deletions

View File

@ -65,6 +65,13 @@ public:
virtual void addWidget(QWidget *widget) = 0;
virtual void insertWidget(int index, QWidget *widget) = 0;
virtual void remove(int index) = 0;
virtual bool canAddWidget() const
// ### Qt6 remove body, provided in Qt5 for source compatibility to Qt4.
{ return true; }
virtual bool canRemove(int index) const
// ### Qt6 remove body, provided in Qt5 for source compatibility to Qt4.
{ Q_UNUSED(index); return true; }
};
Q_DECLARE_EXTENSION_INTERFACE(QDesignerContainerExtension, "com.trolltech.Qt.Designer.Container")

View File

@ -170,3 +170,30 @@
\sa addWidget(), insertWidget()
*/
/*!
\fn bool QDesignerContainerExtension::canAddWidget() const
Returns whether a widget can be added. This determines whether
the context menu options to add or insert pages are enabled.
This should return false for containers that have a single, fixed
page, for example QScrollArea or QDockWidget.
\since 5.0
\sa addWidget(), canRemove()
*/
/*!
\fn bool QDesignerContainerExtension::canRemove(int index) const
Returns whether the widget at the given \a index can be removed.
This determines whether the context menu option to remove the current
page is enabled.
This should return false for containers that have a single, fixed
page, for example QScrollArea or QDockWidget.
\since 5.0
\sa remove(), canAddWidget()
*/