|
Krita Source Code Documentation
|
Classes | |
| struct | ComboBoxState |
| class | ConnectButtonGroupHelper |
| class | ConnectCompositeOpListWidgetHelper |
| class | ConnectDoubleSpinBoxStateHelper |
| class | ConnectIntSpinBoxStateHelper |
| class | ConnectSpacingWidgetHelper |
| struct | ControlState |
| struct | FromSpacingState |
| struct | SpacingState |
| struct | SpinBoxState |
| struct | ToControlState |
| struct | ToSpacingState |
| struct | ToSpinBoxState |
Typedefs | |
| using | ButtonGroupState = ControlState<int> |
| using | CheckBoxState = ControlState<bool> |
| using | DoubleSpinBoxState = SpinBoxState<qreal> |
| using | IntSpinBoxState = SpinBoxState<int> |
Functions | |
| template<typename Button > | |
| void | connectButtonLikeControl (Button *button, QObject *source, const char *property) |
| void | connectControl (KisAngleSelector *widget, QObject *source, const char *property) |
| void | connectControl (KisColorButton *widget, QObject *source, const char *property) |
| void | connectControl (KisCompositeOpListWidget *widget, QObject *source, const char *property) |
| void | connectControl (KisCurveWidget *widget, QObject *source, const char *property) |
| void | connectControl (KisFileNameRequester *widget, QObject *source, const char *property) |
| void | connectControl (KisMultipliersDoubleSliderSpinBox *spinBox, QObject *source, const char *property) |
| void | connectControl (KisSpacingSelectionWidget *widget, QObject *source, const char *property) |
| void | connectControl (QAbstractButton *button, QObject *source, const char *property) |
| void | connectControl (QAction *button, QObject *source, const char *property) |
| void | connectControl (QButtonGroup *group, QObject *source, const char *property) |
| void | connectControl (QCheckBox *button, QObject *source, const char *property) |
| void | connectControl (QComboBox *button, QObject *source, const char *property) |
| void | connectControl (QDoubleSpinBox *spinBox, QObject *source, const char *property) |
| void | connectControl (QLineEdit *widget, QObject *source, const char *property) |
| void | connectControl (QSlider *slider, QObject *source, const char *property) |
| void | connectControl (QSpinBox *spinBox, QObject *source, const char *property) |
| void | connectControlState (QAbstractButton *button, QObject *source, const char *readStatePropertyName, const char *writePropertyName) |
| void | connectControlState (QButtonGroup *group, QObject *source, const char *readStateProperty, const char *writeProperty) |
| void | connectControlState (QComboBox *button, QObject *source, const char *readStatePropertyName, const char *writePropertyName) |
| void | connectControlState (QDoubleSpinBox *spinBox, QObject *source, const char *readStateProperty, const char *writeProperty) |
| void | connectControlState (QSpinBox *spinBox, QObject *source, const char *readStateProperty, const char *writeProperty) |
| void | connectWidgetEnabledToProperty (QWidget *widget, QObject *source, const char *property) |
| void | connectWidgetVisibleToProperty (QWidget *widget, QObject *source, const char *property) |
A collection of utility functions and classes that allow connecting normal QWidget-based UI-controls to lager-based structures.
| using KisWidgetConnectionUtils::ButtonGroupState = ControlState<int> |
Definition at line 71 of file KisWidgetConnectionUtils.h.
| using KisWidgetConnectionUtils::CheckBoxState = ControlState<bool> |
Definition at line 70 of file KisWidgetConnectionUtils.h.
| using KisWidgetConnectionUtils::DoubleSpinBoxState = SpinBoxState<qreal> |
Definition at line 114 of file KisWidgetConnectionUtils.h.
| using KisWidgetConnectionUtils::IntSpinBoxState = SpinBoxState<int> |
Definition at line 113 of file KisWidgetConnectionUtils.h.
| void KisWidgetConnectionUtils::connectButtonLikeControl | ( | Button * | button, |
| QObject * | source, | ||
| const char * | property ) |
Definition at line 99 of file KisWidgetConnectionUtils.cpp.
References button(), KIS_SAFE_ASSERT_RECOVER_RETURN, SANITY_CHECK_PROPERTY_EXISTS, source(), and value().
| void KRITAWIDGETS_EXPORT KisWidgetConnectionUtils::connectControl | ( | KisAngleSelector * | widget, |
| QObject * | source, | ||
| const char * | property ) |
Definition at line 624 of file KisWidgetConnectionUtils.cpp.
References KisAngleSelector::angleChanged(), KIS_SAFE_ASSERT_RECOVER_RETURN, SANITY_CHECK_PROPERTY_EXISTS, KisAngleSelector::setAngle(), source(), and value().
| void KRITAWIDGETS_EXPORT KisWidgetConnectionUtils::connectControl | ( | KisColorButton * | widget, |
| QObject * | source, | ||
| const char * | property ) |
Definition at line 706 of file KisWidgetConnectionUtils.cpp.
References KisColorButton::changed(), KIS_SAFE_ASSERT_RECOVER_RETURN, SANITY_CHECK_PROPERTY_EXISTS, KisColorButton::setColor(), source(), and value().
| void KRITAUI_EXPORT KisWidgetConnectionUtils::connectControl | ( | KisCompositeOpListWidget * | widget, |
| QObject * | source, | ||
| const char * | property ) |
Definition at line 44 of file KisCompositeOpListConnectionHelper.cpp.
References KIS_SAFE_ASSERT_RECOVER_RETURN, KisWidgetConnectionUtils::ConnectCompositeOpListWidgetHelper::sigWidgetChanged(), KisWidgetConnectionUtils::ConnectCompositeOpListWidgetHelper::slotPropertyChanged(), source(), and value().
| void KRITAUI_EXPORT KisWidgetConnectionUtils::connectControl | ( | KisCurveWidget * | widget, |
| QObject * | source, | ||
| const char * | property ) |
Definition at line 48 of file KisCurveWidgetConnectionHelper.cpp.
References KIS_SAFE_ASSERT_RECOVER_RETURN, source(), and value().
| void KRITAWIDGETS_EXPORT KisWidgetConnectionUtils::connectControl | ( | KisFileNameRequester * | widget, |
| QObject * | source, | ||
| const char * | property ) |
Definition at line 678 of file KisWidgetConnectionUtils.cpp.
References KIS_SAFE_ASSERT_RECOVER_RETURN, SANITY_CHECK_PROPERTY_EXISTS, KisFileNameRequester::setFileName(), source(), KisFileNameRequester::textChanged(), and value().
| void KRITAWIDGETS_EXPORT KisWidgetConnectionUtils::connectControl | ( | KisMultipliersDoubleSliderSpinBox * | spinBox, |
| QObject * | source, | ||
| const char * | property ) |
Definition at line 333 of file KisWidgetConnectionUtils.cpp.
References KIS_SAFE_ASSERT_RECOVER_RETURN, SANITY_CHECK_PROPERTY_EXISTS, KisMultipliersDoubleSliderSpinBox::setValue(), source(), value(), and KisMultipliersDoubleSliderSpinBox::valueChanged().
| void KRITAWIDGETS_EXPORT KisWidgetConnectionUtils::connectControl | ( | KisSpacingSelectionWidget * | widget, |
| QObject * | source, | ||
| const char * | property ) |
Definition at line 595 of file KisWidgetConnectionUtils.cpp.
References KIS_SAFE_ASSERT_RECOVER_RETURN, SANITY_CHECK_PROPERTY_EXISTS, KisWidgetConnectionUtils::ConnectSpacingWidgetHelper::sigWidgetChanged(), KisWidgetConnectionUtils::ConnectSpacingWidgetHelper::slotPropertyChanged(), source(), and value().
| void KRITAWIDGETS_EXPORT KisWidgetConnectionUtils::connectControl | ( | QAbstractButton * | button, |
| QObject * | source, | ||
| const char * | property ) |
A set of functions connecting a QWidget-based control to a lager-based model.
connectControl - connects only the value of the control to the model
| widget | a widget that we connect to the model |
| source | the model we are connecting to |
| property | the qt-property of the model that will be connected to the widget; the type of the property should coincide with the value type of the widget, e.g. bool for QCheckBox |
connectControlState - connects the entire state of the control to the model
| widget | a widget that we connect to the model |
| source | the model we are connecting to |
| readStateProperty | the qt-property of the model that provides the state of the control (via lager::reader); the type of the property should be a "state", e.g. CheckBoxState. |
| writeProperty | the qt-property of the model where the user-selected value will be written to (should be either lager::cursor or lager::writer); the type of the property should coincide with the value type of the widget, e.g. bool for QCheckBox |
Definition at line 126 of file KisWidgetConnectionUtils.cpp.
References button(), connectButtonLikeControl(), and source().
| void KRITAWIDGETS_EXPORT KisWidgetConnectionUtils::connectControl | ( | QAction * | button, |
| QObject * | source, | ||
| const char * | property ) |
Definition at line 131 of file KisWidgetConnectionUtils.cpp.
References button(), connectButtonLikeControl(), and source().
| void KRITAWIDGETS_EXPORT KisWidgetConnectionUtils::connectControl | ( | QButtonGroup * | group, |
| QObject * | source, | ||
| const char * | property ) |
Definition at line 404 of file KisWidgetConnectionUtils.cpp.
References KisWidgetConnectionUtils::ConnectButtonGroupHelper::idClicked(), KIS_SAFE_ASSERT_RECOVER_RETURN, SANITY_CHECK_PROPERTY_EXISTS, source(), KisWidgetConnectionUtils::ConnectButtonGroupHelper::updateState(), and value().
| void KRITAWIDGETS_EXPORT KisWidgetConnectionUtils::connectControl | ( | QCheckBox * | button, |
| QObject * | source, | ||
| const char * | property ) |
Definition at line 136 of file KisWidgetConnectionUtils.cpp.
References button(), connectButtonLikeControl(), and source().
| void KRITAWIDGETS_EXPORT KisWidgetConnectionUtils::connectControl | ( | QComboBox * | button, |
| QObject * | source, | ||
| const char * | property ) |
Definition at line 537 of file KisWidgetConnectionUtils.cpp.
References button(), KIS_SAFE_ASSERT_RECOVER_RETURN, SANITY_CHECK_PROPERTY_EXISTS, SANITY_CHECK_PROPERTY_METATYPE_REGISTERED, source(), and value().
| void KRITAWIDGETS_EXPORT KisWidgetConnectionUtils::connectControl | ( | QDoubleSpinBox * | spinBox, |
| QObject * | source, | ||
| const char * | property ) |
Definition at line 195 of file KisWidgetConnectionUtils.cpp.
References KIS_SAFE_ASSERT_RECOVER_RETURN, SANITY_CHECK_PROPERTY_EXISTS, source(), and value().
| void KRITAWIDGETS_EXPORT KisWidgetConnectionUtils::connectControl | ( | QLineEdit * | widget, |
| QObject * | source, | ||
| const char * | property ) |
Definition at line 651 of file KisWidgetConnectionUtils.cpp.
References KIS_SAFE_ASSERT_RECOVER_RETURN, SANITY_CHECK_PROPERTY_EXISTS, source(), and value().
| void KRITAWIDGETS_EXPORT KisWidgetConnectionUtils::connectControl | ( | QSlider * | slider, |
| QObject * | source, | ||
| const char * | property ) |
Definition at line 168 of file KisWidgetConnectionUtils.cpp.
References KIS_SAFE_ASSERT_RECOVER_RETURN, SANITY_CHECK_PROPERTY_EXISTS, source(), and value().
| void KRITAWIDGETS_EXPORT KisWidgetConnectionUtils::connectControl | ( | QSpinBox * | spinBox, |
| QObject * | source, | ||
| const char * | property ) |
Definition at line 141 of file KisWidgetConnectionUtils.cpp.
References KIS_SAFE_ASSERT_RECOVER_RETURN, SANITY_CHECK_PROPERTY_EXISTS, source(), and value().
| void KRITAWIDGETS_EXPORT KisWidgetConnectionUtils::connectControlState | ( | QAbstractButton * | button, |
| QObject * | source, | ||
| const char * | readStatePropertyName, | ||
| const char * | writePropertyName ) |
Definition at line 466 of file KisWidgetConnectionUtils.cpp.
References button(), KIS_SAFE_ASSERT_RECOVER_RETURN, SANITY_CHECK_PROPERTY_EXISTS, SANITY_CHECK_PROPERTY_EXISTS_AND_WRITABLE, source(), ConnectButtonStateHelper::updateState(), and value().
| void KRITAWIDGETS_EXPORT KisWidgetConnectionUtils::connectControlState | ( | QButtonGroup * | group, |
| QObject * | source, | ||
| const char * | readStateProperty, | ||
| const char * | writeProperty ) |
Definition at line 434 of file KisWidgetConnectionUtils.cpp.
References KisWidgetConnectionUtils::ConnectButtonGroupHelper::idClicked(), KIS_SAFE_ASSERT_RECOVER_RETURN, SANITY_CHECK_PROPERTY_EXISTS, SANITY_CHECK_PROPERTY_EXISTS_AND_WRITABLE, source(), KisWidgetConnectionUtils::ConnectButtonGroupHelper::updateState(), and value().
| void KRITAWIDGETS_EXPORT KisWidgetConnectionUtils::connectControlState | ( | QComboBox * | button, |
| QObject * | source, | ||
| const char * | readStatePropertyName, | ||
| const char * | writePropertyName ) |
On Qt5 to perform conversion from int to enum, the enum should be registered as a metatype, so we should manually verify that. For some reason, on Qt6 it is not necessary.
Definition at line 498 of file KisWidgetConnectionUtils.cpp.
References button(), KIS_SAFE_ASSERT_RECOVER_RETURN, SANITY_CHECK_PROPERTY_EXISTS, SANITY_CHECK_PROPERTY_EXISTS_AND_WRITABLE, SANITY_CHECK_PROPERTY_METATYPE_REGISTERED, source(), ConnectComboBoxStateHelper::updateState(), and value().
| void KRITAWIDGETS_EXPORT KisWidgetConnectionUtils::connectControlState | ( | QDoubleSpinBox * | spinBox, |
| QObject * | source, | ||
| const char * | readStateProperty, | ||
| const char * | writeProperty ) |
Definition at line 301 of file KisWidgetConnectionUtils.cpp.
References KIS_SAFE_ASSERT_RECOVER_RETURN, SANITY_CHECK_PROPERTY_EXISTS, SANITY_CHECK_PROPERTY_EXISTS_AND_WRITABLE, KisWidgetConnectionUtils::ConnectDoubleSpinBoxStateHelper::setState(), source(), and value().
| void KRITAWIDGETS_EXPORT KisWidgetConnectionUtils::connectControlState | ( | QSpinBox * | spinBox, |
| QObject * | source, | ||
| const char * | readStateProperty, | ||
| const char * | writeProperty ) |
Definition at line 246 of file KisWidgetConnectionUtils.cpp.
References KIS_SAFE_ASSERT_RECOVER_RETURN, SANITY_CHECK_PROPERTY_EXISTS, SANITY_CHECK_PROPERTY_EXISTS_AND_WRITABLE, KisWidgetConnectionUtils::ConnectIntSpinBoxStateHelper::setState(), source(), and value().
| void KRITAWIDGETS_EXPORT KisWidgetConnectionUtils::connectWidgetEnabledToProperty | ( | QWidget * | widget, |
| QObject * | source, | ||
| const char * | property ) |
Definition at line 753 of file KisWidgetConnectionUtils.cpp.
References KIS_SAFE_ASSERT_RECOVER_RETURN, SANITY_CHECK_PROPERTY_EXISTS, and source().
| void KRITAWIDGETS_EXPORT KisWidgetConnectionUtils::connectWidgetVisibleToProperty | ( | QWidget * | widget, |
| QObject * | source, | ||
| const char * | property ) |
Definition at line 734 of file KisWidgetConnectionUtils.cpp.
References KIS_SAFE_ASSERT_RECOVER_RETURN, SANITY_CHECK_PROPERTY_EXISTS, and source().