|
Krita Source Code Documentation
|
This is a generic gradient editor widget. More...
#include <KisGenericGradientEditor.h>
Inheritance diagram for KisGenericGradientEditor:Public Slots | |
| void | setAddGradientButtonVisible (bool visible) |
| Set if the add gradient button must be shown. | |
| void | setCanvasResourcesInterface (KoCanvasResourcesInterfaceSP newCanvasResourcesInterface) |
| Set the canvas resources interface. | |
| void | setCompactGradientEditorMode (bool compact) |
| Set if the internal gradient editor must use the compact mode. | |
| void | setCompactGradientPresetChooserMode (bool compact) |
| Set if the gradient preset chooser must be shown without any controls other than the list view. | |
| void | setCompactMode (bool compact) |
| Set if the editor must show a reduced ui. | |
| void | setConvertGradientButtonVisible (bool visible) |
| Set if the convert gradient button must be shown. | |
| void | setGradient (KoAbstractGradientSP newGradient) |
| Set the gradient. | |
| void | setGradientPresetChooserOptionsButtonVisible (bool visible) |
| Set if the button for the gradient preset chooser options must be shown. | |
| void | setGradientPresetChooserVisible (bool visible) |
| Set if the gradient preset chooser must be shown. | |
| void | setUpdateGradientButtonVisible (bool visible) |
| Set if the update gradient button must be shown. | |
| void | setUseGradientPresetChooserPopUp (bool use) |
| Set if the gradient preset chooser must be shown as a pop-up clicking a button or embedded in the widget ui. | |
Signals | |
| void | sigGradientChanged () |
| signal emitted when the gradient changes | |
Public Member Functions | |
| KoCanvasResourcesInterfaceSP | canvasResourcesInterface () const |
| Get the current Canvas Resources Interface. | |
| bool | compactGradientEditorMode () const |
| Tell if the internal gradient editor is using the compact mode. | |
| bool | compactGradientPresetChooserMode () const |
| Tell if the gradient preset chooser is being shown without any controls other than the list view. | |
| bool | compactMode () const |
| Tell if the compact mode is being used. | |
| bool | event (QEvent *e) override |
| KoAbstractGradientSP | gradient () const |
| Get the current gradient. | |
| bool | isAddGradientButtonVisible () const |
| Tell if the add gradient button is being shown. | |
| bool | isConvertGradientButtonVisible () const |
| Tell if the convert gradient button is being shown. | |
| bool | isGradientPresetChooserOptionsButtonVisible () const |
| Tell if the button for the gradient preset chooser options is being shown. | |
| bool | isGradientPresetChooserVisible () const |
| Tell if the gradient preset chooser is being shown. | |
| bool | isUpdateGradientButtonVisible () const |
| Tell if the update gradient button is being shown. | |
| KisGenericGradientEditor (QWidget *parent=0) | |
| Construct a new KisGenericGradientEditor widget. | |
| void | loadUISettings (const QString &prefix=QString()) |
| Load the ui settings from the configuration. | |
| QSize | minimumSizeHint () const override |
| void | saveUISettings (const QString &prefix=QString()) |
| Save the ui settings to the configuration. | |
| QSize | sizeHint () const override |
| void | updateCachedSizeHint () |
| bool | useGradientPresetChooserPopUp () const |
| Tell if the gradient preset chooser is being shown as a pop-up clicking a button or embedded in the widget ui. | |
| ~KisGenericGradientEditor () override | |
Public Attributes | |
| QAction * | actionCompactGradientPresetChooserMode |
| QAction * | actionUseGradientPresetChooserPopUp |
| QPushButton * | buttonAddGradient |
| QPushButton * | buttonConvertGradient |
| QPushButton * | buttonUpdateGradient |
| QSize | cachedMinimumSizeHint |
| QSize | cachedSizeHint |
| KoCanvasResourcesInterfaceSP | canvasResourcesInterface |
| bool | compactGradientEditorMode |
| bool | compactGradientPresetChooserMode |
| bool | compactMode |
| KoAbstractGradientSP | gradient |
| bool | isAddGradientButtonVisible |
| bool | isConvertGradientButtonVisible |
| bool | isGradientPresetChooserOptionsButtonVisible |
| bool | isGradientPresetChooserVisible |
| bool | isUpdateGradientButtonVisible |
| QLabel * | labelConvertGradientWarning |
| KisGenericGradientEditor * | q |
| QToolButton * | toolButtonGradientPresetChooser |
| KisPopupButton * | toolButtonGradientPresetChooserOptions |
| bool | useGradientPresetChooserPopUp |
| QWidget * | widgetGradientEditor |
| KisGradientChooser * | widgetGradientPresetChooser |
| QWidget * | widgetToolButtonGradientPresetChooser |
Private Member Functions | |
| void | updateAddGradientButton () |
| void | updateConvertGradientButton () |
| void | updateGradientEditor () |
| void | updateGradientPresetChooser () |
| void | updateUpdateGradientButton () |
Private Member Functions inherited from Private | |
| Private (KisCanvas2 *c) | |
Private Attributes | |
| QScopedPointer< Private > | m_d |
Private Attributes inherited from Private | |
| KisCanvas2 * | canvas |
| int | displayedFrame |
| int | intendedFrame |
This is a generic gradient editor widget.
This widget makes use of other gradient related widgets and puts them together in one place to ease the edition of gradients.
It supports loading/saving from/to resources and conversion between the different types of gradients
Definition at line 36 of file KisGenericGradientEditor.cpp.
| KisGenericGradientEditor::KisGenericGradientEditor | ( | QWidget * | parent = 0 | ) |
Construct a new KisGenericGradientEditor widget.
| parent | the parent widget |
Definition at line 102 of file KisGenericGradientEditor.cpp.
References connect(), KisIconUtils::loadIcon(), m_d, on_buttonAddGradient_clicked(), on_buttonConvertGradient_clicked(), on_buttonUpdateGradient_clicked(), on_widgetGradientPresetChooser_resourceClicked(), setCompactGradientPresetChooserMode(), setUseGradientPresetChooserPopUp(), updateAddGradientButton(), updateConvertGradientButton(), updateGradientEditor(), updateGradientPresetChooser(), and updateUpdateGradientButton().
|
override |
Definition at line 266 of file KisGenericGradientEditor.cpp.
| KoCanvasResourcesInterfaceSP KisGenericGradientEditor::canvasResourcesInterface | ( | ) | const |
| bool KisGenericGradientEditor::compactGradientEditorMode | ( | ) | const |
Tell if the internal gradient editor is using the compact mode.
| bool KisGenericGradientEditor::compactGradientPresetChooserMode | ( | ) | const |
Tell if the gradient preset chooser is being shown without any controls other than the list view.
| bool KisGenericGradientEditor::compactMode | ( | ) | const |
Tell if the compact mode is being used.
|
override |
Definition at line 511 of file KisGenericGradientEditor.cpp.
References m_d.
| KoAbstractGradientSP KisGenericGradientEditor::gradient | ( | ) | const |
Get the current gradient.
A clone is returned so that any changes in the returned gradient won't change the editor gradient and vice-versa
| bool KisGenericGradientEditor::isAddGradientButtonVisible | ( | ) | const |
Tell if the add gradient button is being shown.
| bool KisGenericGradientEditor::isConvertGradientButtonVisible | ( | ) | const |
Tell if the convert gradient button is being shown.
| bool KisGenericGradientEditor::isGradientPresetChooserOptionsButtonVisible | ( | ) | const |
Tell if the button for the gradient preset chooser options is being shown.
| bool KisGenericGradientEditor::isGradientPresetChooserVisible | ( | ) | const |
Tell if the gradient preset chooser is being shown.
| bool KisGenericGradientEditor::isUpdateGradientButtonVisible | ( | ) | const |
Tell if the update gradient button is being shown.
| void KisGenericGradientEditor::loadUISettings | ( | const QString & | prefix = QString() | ) |
Load the ui settings from the configuration.
| prefix | string prepended to the settings names |
Definition at line 269 of file KisGenericGradientEditor.cpp.
References m_d, and updateGradientPresetChooser().
|
override |
Definition at line 506 of file KisGenericGradientEditor.cpp.
References m_d.
|
privateslot |
Definition at line 639 of file KisGenericGradientEditor.cpp.
References KisResourceUserOperations::addResourceWithUserInput(), ResourceType::Gradients, and m_d.
|
privateslot |
Definition at line 612 of file KisGenericGradientEditor.cpp.
References m_d, setGradient(), KisGradientConversion::toSegmentGradient(), and KisGradientConversion::toStopGradient().
|
privateslot |
Definition at line 622 of file KisGenericGradientEditor.cpp.
References m_d, and KisResourceUserOperations::updateResourceWithUserInput().
|
privateslot |
Definition at line 657 of file KisGenericGradientEditor.cpp.
References sigGradientChanged(), updateAddGradientButton(), and updateUpdateGradientButton().
|
privateslot |
Definition at line 652 of file KisGenericGradientEditor.cpp.
References setGradient().
| void KisGenericGradientEditor::saveUISettings | ( | const QString & | prefix = QString() | ) |
Save the ui settings to the configuration.
| prefix | string prepended to the settings names |
Definition at line 280 of file KisGenericGradientEditor.cpp.
References m_d.
|
slot |
Set if the add gradient button must be shown.
| visible | true if the add gradient button must be shown, false otherwise |
Definition at line 460 of file KisGenericGradientEditor.cpp.
References m_d, and updateAddGradientButton().
|
slot |
Set the canvas resources interface.
the canvas resources interface is used to get the current foreground and background colors
| newCanvasResourcesInterface | the new canvas resources interface |
Definition at line 425 of file KisGenericGradientEditor.cpp.
References m_d, KisSegmentGradientEditor::setCanvasResourcesInterface(), and setCanvasResourcesInterface().
|
slot |
Set if the internal gradient editor must use the compact mode.
| compact | true if the internal gradient editor must use the compact mode, false otherwise |
Definition at line 493 of file KisGenericGradientEditor.cpp.
References m_d, and updateGradientEditor().
|
slot |
Set if the gradient preset chooser must be shown without any controls other than the list view.
| compact | true if the gradient preset chooser must be shown without any controls other than the list view, false otherwise |
Definition at line 486 of file KisGenericGradientEditor.cpp.
References m_d, and updateGradientPresetChooser().
|
slot |
Set if the editor must show a reduced ui.
If the compact mode is set, only the gradient editors will be visible
| compact | true if the compact mode must be used, false otherwise |
Definition at line 438 of file KisGenericGradientEditor.cpp.
References m_d, updateAddGradientButton(), updateConvertGradientButton(), updateGradientPresetChooser(), and updateUpdateGradientButton().
|
slot |
Set if the convert gradient button must be shown.
| visible | true if the convert gradient button must be shown, false otherwise |
Definition at line 448 of file KisGenericGradientEditor.cpp.
References m_d, and updateConvertGradientButton().
|
slot |
Set the gradient.
This editor makes a clone os the gradient passed so that any changes made in the editor won't change the passed gradient and vice-versa
| newGradient | The new gradient |
Definition at line 347 of file KisGenericGradientEditor.cpp.
References connect(), m_d, on_widgetGradientEditor_sigGradientChanged(), setCompactMode(), setGradient(), sigGradientChanged(), updateAddGradientButton(), updateConvertGradientButton(), updateGradientEditor(), updateUpdateGradientButton(), and KoAbstractGradient::updateVariableColors().
|
slot |
Set if the button for the gradient preset chooser options must be shown.
| visible | true if the button for the gradient preset chooser options must be shown, false otherwise |
Definition at line 473 of file KisGenericGradientEditor.cpp.
References m_d, and updateGradientPresetChooser().
|
slot |
Set if the gradient preset chooser must be shown.
| visible | true if the gradient preset chooser must be shown, false otherwise |
Definition at line 466 of file KisGenericGradientEditor.cpp.
References m_d, and updateGradientPresetChooser().
|
slot |
Set if the update gradient button must be shown.
| visible | true if the update gradient button must be shown, false otherwise |
Definition at line 454 of file KisGenericGradientEditor.cpp.
References m_d, and updateUpdateGradientButton().
|
slot |
Set if the gradient preset chooser must be shown as a pop-up clicking a button or embedded in the widget ui.
| use | true if the gradient preset chooser must be shown as a pop-up, false otherwise |
Definition at line 479 of file KisGenericGradientEditor.cpp.
References m_d, and updateGradientPresetChooser().
|
signal |
signal emitted when the gradient changes
|
override |
Definition at line 501 of file KisGenericGradientEditor.cpp.
References m_d.
|
private |
|
inline |
Definition at line 67 of file KisGenericGradientEditor.cpp.
|
private |
Definition at line 519 of file KisGenericGradientEditor.cpp.
References m_d.
|
private |
Definition at line 602 of file KisGenericGradientEditor.cpp.
References m_d, and setCompactMode().
|
private |
Definition at line 554 of file KisGenericGradientEditor.cpp.
References m_d.
|
private |
| bool KisGenericGradientEditor::useGradientPresetChooserPopUp | ( | ) | const |
Tell if the gradient preset chooser is being shown as a pop-up clicking a button or embedded in the widget ui.
| QAction* KisGenericGradientEditor::actionCompactGradientPresetChooserMode |
Definition at line 52 of file KisGenericGradientEditor.cpp.
| QAction* KisGenericGradientEditor::actionUseGradientPresetChooserPopUp |
Definition at line 51 of file KisGenericGradientEditor.cpp.
| QPushButton* KisGenericGradientEditor::buttonAddGradient |
Definition at line 45 of file KisGenericGradientEditor.cpp.
| QPushButton* KisGenericGradientEditor::buttonConvertGradient |
Definition at line 43 of file KisGenericGradientEditor.cpp.
| QPushButton* KisGenericGradientEditor::buttonUpdateGradient |
Definition at line 44 of file KisGenericGradientEditor.cpp.
| QSize KisGenericGradientEditor::cachedMinimumSizeHint |
Definition at line 65 of file KisGenericGradientEditor.cpp.
| QSize KisGenericGradientEditor::cachedSizeHint |
Definition at line 65 of file KisGenericGradientEditor.cpp.
| KoCanvasResourcesInterfaceSP KisGenericGradientEditor::canvasResourcesInterface |
Definition at line 40 of file KisGenericGradientEditor.cpp.
| bool KisGenericGradientEditor::compactGradientEditorMode |
Definition at line 63 of file KisGenericGradientEditor.cpp.
| bool KisGenericGradientEditor::compactGradientPresetChooserMode |
Definition at line 62 of file KisGenericGradientEditor.cpp.
| bool KisGenericGradientEditor::compactMode |
Definition at line 55 of file KisGenericGradientEditor.cpp.
| KoAbstractGradientSP KisGenericGradientEditor::gradient |
Definition at line 39 of file KisGenericGradientEditor.cpp.
| bool KisGenericGradientEditor::isAddGradientButtonVisible |
Definition at line 58 of file KisGenericGradientEditor.cpp.
| bool KisGenericGradientEditor::isConvertGradientButtonVisible |
Definition at line 56 of file KisGenericGradientEditor.cpp.
| bool KisGenericGradientEditor::isGradientPresetChooserOptionsButtonVisible |
Definition at line 60 of file KisGenericGradientEditor.cpp.
| bool KisGenericGradientEditor::isGradientPresetChooserVisible |
Definition at line 59 of file KisGenericGradientEditor.cpp.
| bool KisGenericGradientEditor::isUpdateGradientButtonVisible |
Definition at line 57 of file KisGenericGradientEditor.cpp.
| QLabel* KisGenericGradientEditor::labelConvertGradientWarning |
Definition at line 46 of file KisGenericGradientEditor.cpp.
|
private |
Definition at line 219 of file KisGenericGradientEditor.h.
| KisGenericGradientEditor* KisGenericGradientEditor::q |
Definition at line 42 of file KisGenericGradientEditor.cpp.
| QToolButton* KisGenericGradientEditor::toolButtonGradientPresetChooser |
Definition at line 48 of file KisGenericGradientEditor.cpp.
| KisPopupButton* KisGenericGradientEditor::toolButtonGradientPresetChooserOptions |
Definition at line 50 of file KisGenericGradientEditor.cpp.
| bool KisGenericGradientEditor::useGradientPresetChooserPopUp |
Definition at line 61 of file KisGenericGradientEditor.cpp.
| QWidget* KisGenericGradientEditor::widgetGradientEditor |
Definition at line 53 of file KisGenericGradientEditor.cpp.
| KisGradientChooser* KisGenericGradientEditor::widgetGradientPresetChooser |
Definition at line 47 of file KisGenericGradientEditor.cpp.
| QWidget* KisGenericGradientEditor::widgetToolButtonGradientPresetChooser |
Definition at line 49 of file KisGenericGradientEditor.cpp.