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:
commit
acc98b9b36
@ -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")
|
||||
|
||||
|
@ -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()
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user