|
Krita Source Code Documentation
|
#include <kis_preset_chooser.h>
Inheritance diagram for KisPresetChooser:Public Types | |
| enum | ViewMode { THUMBNAIL , STROKE_THUMBNAIL , STROKE } |
Public Slots | |
| void | saveIconSize () |
| saves the icon size for the presets. called by the horizontal slider release event. | |
| void | setIconSize (int newSize) |
| sets the icon size. Used by slider in view menu | |
| void | showHideBrushNames (ListViewMode newViewMode) |
| void | updateViewSettings () |
Signals | |
| void | resourceClicked (KoResourceSP resource) |
| void | resourceSelected (KoResourceSP resource) |
Public Member Functions | |
| KoResourceSP | currentResource () const |
| int | iconSize () |
| get the base size for the icons. Used by the slider in the view options | |
| KisResourceItemChooser * | itemChooser () |
| KisPresetChooser (QWidget *parent=0) | |
| void | setCurrentResource (KoResourceSP resource) |
| void | setPresetFilter (const QString &paintOpId) |
| void | setViewMode (ViewMode mode) |
| Sets a list of resources in the paintop list, when ever user press enter in the lineedit of paintop_presets_popup Class. | |
| void | setViewModeToDetail () |
| void | setViewModeToStroke () |
| void | setViewModeToStrokeThumbnail () |
| void | setViewModeToThumbnail () |
| void | showTaggingBar (bool show) |
| Sets the visibility of tagging klineEdits. | |
| ~KisPresetChooser () override | |
Protected Member Functions | |
| void | changeEvent (QEvent *event) override |
Private Slots | |
| void | notifyConfigChanged () |
| void | slotBaseLengthChanged (int length) |
| void | slotStrokePreviewReady (int presetId) |
Private Attributes | |
| KisResourceItemChooser * | m_chooser {nullptr} |
| KisPresetDelegate * | m_delegate {nullptr} |
| ViewMode | m_mode |
A special type of item chooser that can contain extra widgets that show more information about the currently selected item. Reimplement update() to extract that information and fill the appropriate widgets.
Definition at line 30 of file kis_preset_chooser.h.
| Enumerator | |
|---|---|
| THUMBNAIL | |
| STROKE_THUMBNAIL | Shows thumbnails. |
| STROKE | Shows stroke previews with text and thumbnail. |
Definition at line 39 of file kis_preset_chooser.h.
| KisPresetChooser::KisPresetChooser | ( | QWidget * | parent = 0 | ) |
Definition at line 294 of file kis_preset_chooser.cpp.
References KisConfigNotifier::instance(), KisResourceItemChooserSync::instance(), KisBrushStrokePreviewCache::instance(), m_chooser, m_delegate, m_mode, notifyConfigChanged(), ResourceType::PaintOpPresets, resourceClicked(), resourceSelected(), KisResourceItemChooser::setItemDelegate(), KisResourceItemChooser::setRowHeight(), KisResourceItemChooser::setSynced(), showHideBrushNames(), KisResourceItemChooser::showImportExportBtns(), slotBaseLengthChanged(), slotStrokePreviewReady(), and THUMBNAIL.
|
override |
Definition at line 331 of file kis_preset_chooser.cpp.
|
overrideprotected |
Definition at line 461 of file kis_preset_chooser.cpp.
References KisResourceItemChooser::itemView(), m_chooser, m_mode, STROKE, and STROKE_THUMBNAIL.
| KoResourceSP KisPresetChooser::currentResource | ( | ) | const |
Definition at line 408 of file kis_preset_chooser.cpp.
References KisResourceItemChooser::currentResource, and m_chooser.
| int KisPresetChooser::iconSize | ( | ) |
get the base size for the icons. Used by the slider in the view options
Definition at line 448 of file kis_preset_chooser.cpp.
References KisResourceItemChooserSync::baseLength, and KisResourceItemChooserSync::instance().
| KisResourceItemChooser * KisPresetChooser::itemChooser | ( | ) |
Definition at line 418 of file kis_preset_chooser.cpp.
References m_chooser.
|
privateslot |
Definition at line 356 of file kis_preset_chooser.cpp.
References m_delegate, KisConfig::presetIconSize(), setIconSize(), KisPresetDelegate::setIconSize(), KisPresetDelegate::setUseDirtyPresets(), and KisConfig::useDirtyPresets().
|
signal |
|
signal |
|
slot |
saves the icon size for the presets. called by the horizontal slider release event.
Definition at line 454 of file kis_preset_chooser.cpp.
References iconSize(), and KisConfig::setPresetIconSize().
| void KisPresetChooser::setCurrentResource | ( | KoResourceSP | resource | ) |
Definition at line 403 of file kis_preset_chooser.cpp.
References m_chooser, and KisResourceItemChooser::setCurrentResource().
|
slot |
sets the icon size. Used by slider in view menu
Definition at line 433 of file kis_preset_chooser.cpp.
References KisPresetDelegate::calculateStrokeThumbnailSize(), KisResourceItemChooserSync::instance(), KisResourceItemChooser::itemView(), m_chooser, m_delegate, m_mode, KisResourceItemChooserSync::setBaseLength(), KisPresetDelegate::setIconSize(), STROKE, and STROKE_THUMBNAIL.
| void KisPresetChooser::setPresetFilter | ( | const QString & | paintOpId | ) |
Definition at line 423 of file kis_preset_chooser.cpp.
References m_chooser, KisTagFilterResourceProxyModel::setMetaDataFilter(), KisResourceItemChooser::tagFilterModel(), and updateViewSettings().
| void KisPresetChooser::setViewMode | ( | KisPresetChooser::ViewMode | mode | ) |
Sets a list of resources in the paintop list, when ever user press enter in the lineedit of paintop_presets_popup Class.
Definition at line 335 of file kis_preset_chooser.cpp.
References m_mode, and updateViewSettings().
| void KisPresetChooser::setViewModeToDetail | ( | ) |
| void KisPresetChooser::setViewModeToStroke | ( | ) |
Definition at line 346 of file kis_preset_chooser.cpp.
References setViewMode(), and STROKE.
| void KisPresetChooser::setViewModeToStrokeThumbnail | ( | ) |
Definition at line 351 of file kis_preset_chooser.cpp.
References setViewMode(), and STROKE_THUMBNAIL.
| void KisPresetChooser::setViewModeToThumbnail | ( | ) |
Definition at line 341 of file kis_preset_chooser.cpp.
References setViewMode(), and THUMBNAIL.
|
slot |
Shows/hides brush names when KisResourceItemListView used by KisResourceItemChooser changes it's ListViewMode. If this method is removed then the Details view brush names will still be displayed when KisResourceItemChooser is in horizontal layout.
Definition at line 471 of file kis_preset_chooser.cpp.
References KisPresetDelegate::calculateStrokeThumbnailSize(), iconSize(), KisResourceItemChooser::itemView(), m_chooser, m_mode, STROKE, and STROKE_THUMBNAIL.
| void KisPresetChooser::showTaggingBar | ( | bool | show | ) |
Sets the visibility of tagging klineEdits.
Definition at line 413 of file kis_preset_chooser.cpp.
References m_chooser, and KisResourceItemChooser::showTaggingBar().
|
privateslot |
Definition at line 497 of file kis_preset_chooser.cpp.
References KisPresetDelegate::calculateStrokeThumbnailSize(), KisResourceItemChooser::itemView(), length(), m_chooser, m_delegate, m_mode, KisPresetDelegate::setIconSize(), STROKE, and STROKE_THUMBNAIL.
|
privateslot |
Definition at line 486 of file kis_preset_chooser.cpp.
References KisResourceItemChooser::itemView(), m_chooser, m_mode, STROKE, and STROKE_THUMBNAIL.
|
slot |
Definition at line 365 of file kis_preset_chooser.cpp.
References KisPresetDelegate::calculateStrokeThumbnailSize(), IconGrid, iconSize(), KisResourceItemChooser::itemView(), m_chooser, m_delegate, m_mode, KisPresetDelegate::setIconSize(), KisResourceItemChooser::setListViewMode(), KisPresetDelegate::setViewMode(), STROKE, STROKE_THUMBNAIL, and THUMBNAIL.
|
private |
Definition at line 94 of file kis_preset_chooser.h.
|
private |
Definition at line 95 of file kis_preset_chooser.h.
|
private |
Definition at line 96 of file kis_preset_chooser.h.