|
Krita Source Code Documentation
|
Wrapper class around a KisOptionCollectionWidget that also provide a header with a title label and an optional primary widget. More...
#include <KisOptionCollectionWidget.h>
Inheritance diagram for KisOptionCollectionWidgetWithHeader:Classes | |
| struct | Private |
Public Member Functions | |
| void | appendWidget (const QString &id, QWidget *widget) |
| Insert the given widget with the given id at the end of the list. The list widget takes ownership of the inserted widget. | |
| bool | containsWidget (const QString &id) const |
| Get if the list contains a widget with the given id. | |
| QWidget * | findWidget (const QString &path) const |
| Get the widget that is at the given path. The path must be a forward slash separated list of ids. If the list contains some other KisOptionCollectionWidget or KisOptionCollectionWidgetWithHeader, and they do as well, then they form a hierarchy tree, so the path is searched recursively through all those child widgets. | |
| template<typename T > | |
| T | findWidgetAs (const QString &path) const |
| Get the widget that is at the given path casted to some other class. | |
| void | insertWidget (int index, const QString &id, QWidget *widget) |
| Insert the given widget with the given id at the given position. The list widget takes ownership of the inserted widget. | |
| KisOptionCollectionWidgetWithHeader (const QString &title, QWidget *parent=nullptr) | |
| QSize | minimumSizeHint () const override |
| int | numberOfVisibleWidgets () const |
| Get the number of visible widgets in the list. | |
| QWidget * | primaryWidget () const |
| Get the primary widget. | |
| template<typename T > | |
| T | primaryWidgetAs () const |
| Get the primary widget casted to some other class. | |
| void | removePrimaryWidget () |
| Remove the primary widget. This also destroys it. | |
| void | removeWidget (const QString &id) |
| Remove the widget that has the given id from the list. This also destroys the widget. | |
| void | removeWidget (int index) |
| Remove the widget that is at the given position from the list. This also destroys the widget. | |
| void | setOrientation (Qt::Orientation orientation, bool recursive=false) |
| Set the orientation of the list of widgets. | |
| void | setPrimaryWidget (QWidget *widget) |
| Set the primary widget. The list widget takes ownership of it. | |
| void | setPrimaryWidgetVisible (bool visible) |
| Set the visibility of the primary widget. Use this function instead of the widget one directly to get better visual results. | |
| void | setSeparatorsVisible (bool visible) |
| Set the visibility of the separators. | |
| void | setWidgetsMargin (int margin) |
| Set the margins of the widgets. This allows to indent the widgets with respect to the separators. The separators themselves are not changed. | |
| void | setWidgetVisible (const QString &id, bool visible) |
| Set the visibility of the widget that has the given id. | |
| void | setWidgetVisible (int index, bool visible) |
| Set the visibility of the widget that is at the given position. | |
| int | size () const |
| Get the number of widgets in the list. | |
| QWidget * | takePrimaryWidget () |
| Remove the primary widget. The widget is returned instead of being destroyed. | |
| QWidget * | takeWidget (const QString &id) |
| Remove the widget that has the given id from the list. The widget is returned instead of being destroyed. | |
| QWidget * | takeWidget (int index) |
| Remove the widget that is at the given position from the list. The widget is returned instead of being destroyed. | |
| QWidget * | widget (const QString &id) const |
| Get the widget with the given id. | |
| QWidget * | widget (int index) const |
| Get the widget that is at the given position. | |
| template<typename T > | |
| T | widgetAs (const QString &id) const |
| Get the widget with the given id casted to some other class. | |
| template<typename T > | |
| T | widgetAs (int index) const |
| Get the widget that is at the given position casted to some other class. | |
| int | widgetIndexFromId (const QString &id) const |
| Get the index of the widget that has the given id. | |
| ~KisOptionCollectionWidgetWithHeader () override | |
Protected Member Functions | |
| void | resizeEvent (QResizeEvent *) override |
Private Attributes | |
| QScopedPointer< Private > | m_d |
Friends | |
| class | KisOptionCollectionWidget |
Wrapper class around a KisOptionCollectionWidget that also provide a header with a title label and an optional primary widget.
Definition at line 164 of file KisOptionCollectionWidget.h.
| KisOptionCollectionWidgetWithHeader::KisOptionCollectionWidgetWithHeader | ( | const QString & | title, |
| QWidget * | parent = nullptr ) |
Definition at line 474 of file KisOptionCollectionWidget.cpp.
References KisOptionCollectionWidget, and m_d.
|
override |
Definition at line 507 of file KisOptionCollectionWidget.cpp.
| void KisOptionCollectionWidgetWithHeader::appendWidget | ( | const QString & | id, |
| QWidget * | widget ) |
Insert the given widget with the given id at the end of the list. The list widget takes ownership of the inserted widget.
Definition at line 648 of file KisOptionCollectionWidget.cpp.
| bool KisOptionCollectionWidgetWithHeader::containsWidget | ( | const QString & | id | ) | const |
Get if the list contains a widget with the given id.
Definition at line 622 of file KisOptionCollectionWidget.cpp.
References m_d.
| QWidget * KisOptionCollectionWidgetWithHeader::findWidget | ( | const QString & | path | ) | const |
Get the widget that is at the given path. The path must be a forward slash separated list of ids. If the list contains some other KisOptionCollectionWidget or KisOptionCollectionWidgetWithHeader, and they do as well, then they form a hierarchy tree, so the path is searched recursively through all those child widgets.
Definition at line 637 of file KisOptionCollectionWidget.cpp.
References m_d.
|
inline |
Get the widget that is at the given path casted to some other class.
Definition at line 253 of file KisOptionCollectionWidget.h.
| void KisOptionCollectionWidgetWithHeader::insertWidget | ( | int | index, |
| const QString & | id, | ||
| QWidget * | widget ) |
Insert the given widget with the given id at the given position. The list widget takes ownership of the inserted widget.
Definition at line 642 of file KisOptionCollectionWidget.cpp.
|
override |
Definition at line 510 of file KisOptionCollectionWidget.cpp.
References m_d.
| int KisOptionCollectionWidgetWithHeader::numberOfVisibleWidgets | ( | ) | const |
Get the number of visible widgets in the list.
Definition at line 720 of file KisOptionCollectionWidget.cpp.
References m_d.
| QWidget * KisOptionCollectionWidgetWithHeader::primaryWidget | ( | ) | const |
Get the primary widget.
Definition at line 545 of file KisOptionCollectionWidget.cpp.
References m_d.
|
inline |
Get the primary widget casted to some other class.
Definition at line 181 of file KisOptionCollectionWidget.h.
| void KisOptionCollectionWidgetWithHeader::removePrimaryWidget | ( | ) |
Remove the primary widget. This also destroys it.
Definition at line 575 of file KisOptionCollectionWidget.cpp.
References m_d, and takePrimaryWidget().
| void KisOptionCollectionWidgetWithHeader::removeWidget | ( | const QString & | id | ) |
Remove the widget that has the given id from the list. This also destroys the widget.
Definition at line 660 of file KisOptionCollectionWidget.cpp.
References m_d.
| void KisOptionCollectionWidgetWithHeader::removeWidget | ( | int | index | ) |
Remove the widget that is at the given position from the list. This also destroys the widget.
Definition at line 654 of file KisOptionCollectionWidget.cpp.
References m_d.
|
overrideprotected |
Definition at line 725 of file KisOptionCollectionWidget.cpp.
References m_d.
| void KisOptionCollectionWidgetWithHeader::setOrientation | ( | Qt::Orientation | orientation, |
| bool | recursive = false ) |
Set the orientation of the list of widgets.
| recursive | If set to true and the list contains some KisOptionCollectionWidget or KisOptionCollectionWidgetWithHeader, then the orientation of those child widgets is also set, with the same recursive value |
Definition at line 702 of file KisOptionCollectionWidget.cpp.
References m_d.
| void KisOptionCollectionWidgetWithHeader::setPrimaryWidget | ( | QWidget * | widget | ) |
Set the primary widget. The list widget takes ownership of it.
Definition at line 550 of file KisOptionCollectionWidget.cpp.
References m_d, removePrimaryWidget(), and widget().
| void KisOptionCollectionWidgetWithHeader::setPrimaryWidgetVisible | ( | bool | visible | ) |
Set the visibility of the primary widget. Use this function instead of the widget one directly to get better visual results.
Definition at line 597 of file KisOptionCollectionWidget.cpp.
References KIS_ASSERT_RECOVER_RETURN, and m_d.
| void KisOptionCollectionWidgetWithHeader::setSeparatorsVisible | ( | bool | visible | ) |
Set the visibility of the separators.
Definition at line 697 of file KisOptionCollectionWidget.cpp.
References m_d.
| void KisOptionCollectionWidgetWithHeader::setWidgetsMargin | ( | int | margin | ) |
Set the margins of the widgets. This allows to indent the widgets with respect to the separators. The separators themselves are not changed.
Definition at line 692 of file KisOptionCollectionWidget.cpp.
References m_d.
| void KisOptionCollectionWidgetWithHeader::setWidgetVisible | ( | const QString & | id, |
| bool | visible ) |
Set the visibility of the widget that has the given id.
Definition at line 686 of file KisOptionCollectionWidget.cpp.
References m_d.
| void KisOptionCollectionWidgetWithHeader::setWidgetVisible | ( | int | index, |
| bool | visible ) |
Set the visibility of the widget that is at the given position.
Definition at line 680 of file KisOptionCollectionWidget.cpp.
References m_d.
| int KisOptionCollectionWidgetWithHeader::size | ( | ) | const |
Get the number of widgets in the list.
Definition at line 715 of file KisOptionCollectionWidget.cpp.
References m_d.
| QWidget * KisOptionCollectionWidgetWithHeader::takePrimaryWidget | ( | ) |
Remove the primary widget. The widget is returned instead of being destroyed.
Definition at line 583 of file KisOptionCollectionWidget.cpp.
| QWidget * KisOptionCollectionWidgetWithHeader::takeWidget | ( | const QString & | id | ) |
Remove the widget that has the given id from the list. The widget is returned instead of being destroyed.
Definition at line 673 of file KisOptionCollectionWidget.cpp.
References m_d.
| QWidget * KisOptionCollectionWidgetWithHeader::takeWidget | ( | int | index | ) |
Remove the widget that is at the given position from the list. The widget is returned instead of being destroyed.
Definition at line 666 of file KisOptionCollectionWidget.cpp.
References m_d.
| QWidget * KisOptionCollectionWidgetWithHeader::widget | ( | const QString & | id | ) | const |
Get the widget with the given id.
Definition at line 632 of file KisOptionCollectionWidget.cpp.
References m_d.
| QWidget * KisOptionCollectionWidgetWithHeader::widget | ( | int | index | ) | const |
Get the widget that is at the given position.
Definition at line 627 of file KisOptionCollectionWidget.cpp.
References m_d.
|
inline |
Get the widget with the given id casted to some other class.
Definition at line 234 of file KisOptionCollectionWidget.h.
|
inline |
Get the widget that is at the given position casted to some other class.
Definition at line 221 of file KisOptionCollectionWidget.h.
| int KisOptionCollectionWidgetWithHeader::widgetIndexFromId | ( | const QString & | id | ) | const |
Get the index of the widget that has the given id.
Definition at line 617 of file KisOptionCollectionWidget.cpp.
References m_d.
|
friend |
Definition at line 334 of file KisOptionCollectionWidget.h.
|
private |
Definition at line 333 of file KisOptionCollectionWidget.h.