Krita Source Code Documentation
Loading...
Searching...
No Matches
WdgStrokeSelection Class Reference

#include <kis_dlg_stroke_selection_properties.h>

+ Inheritance diagram for WdgStrokeSelection:

Signals

void colorFillSelectorChanged ()
 
void colorSelectorChanged ()
 

Public Member Functions

void enableControls ()
 
 WdgStrokeSelection (QWidget *parent)
 

Public Attributes

KisPropertiesConfigurationSP m_cfg
 
bool m_isVectorLayer {false}
 
StrokeSelectionOptions m_options
 

Private Slots

void on_fillBox_currentIndexChanged (int index)
 
void on_lineColorBox_currentIndexChanged (int index)
 
void on_typeBox_currentIndexChanged (int index)
 

Detailed Description

Definition at line 56 of file kis_dlg_stroke_selection_properties.h.

Constructor & Destructor Documentation

◆ WdgStrokeSelection()

WdgStrokeSelection::WdgStrokeSelection ( QWidget * parent)

Definition at line 276 of file kis_dlg_stroke_selection_properties.cpp.

276 : QWidget(parent)
277{
278 setupUi(this);
279}

Member Function Documentation

◆ colorFillSelectorChanged

void WdgStrokeSelection::colorFillSelectorChanged ( )
signal

◆ colorSelectorChanged

void WdgStrokeSelection::colorSelectorChanged ( )
signal

◆ enableControls()

void WdgStrokeSelection::enableControls ( )

Definition at line 281 of file kis_dlg_stroke_selection_properties.cpp.

282{
283 m_options.fillColor = m_cfg->getColor("fillColor");
285 colorFillSelector->setEnabled(false);
286 }
287 else {
288 colorFillSelector->setEnabled(true);
289 }
290
291 if (m_isVectorLayer) {
292 typeBox->setCurrentIndex(1);
293 typeBox->setEnabled(false);
294 }
295 else {
296 typeBox->setEnabled(true);
297 }
298
299 on_typeBox_currentIndexChanged(typeBox->currentIndex());
300}
KisPropertiesConfigurationSP m_cfg

References StrokeSelectionOptions::colorFillSource, StrokeSelectionOptions::fillColor, m_cfg, m_isVectorLayer, m_options, None, and on_typeBox_currentIndexChanged().

◆ on_fillBox_currentIndexChanged

void WdgStrokeSelection::on_fillBox_currentIndexChanged ( int index)
privateslot

Definition at line 302 of file kis_dlg_stroke_selection_properties.cpp.

303{
304 if (index == static_cast<int>(ColorFillSource::None)) {
305 colorFillSelector->setDisabled(true);
306 }
307 else {
308 colorFillSelector->setDisabled(false);
310 }
311 m_options.colorFillSource = static_cast<ColorFillSource>(index);
312}
void colorFillSelectorChanged()

References colorFillSelectorChanged(), StrokeSelectionOptions::colorFillSource, m_options, and None.

◆ on_lineColorBox_currentIndexChanged

void WdgStrokeSelection::on_lineColorBox_currentIndexChanged ( int index)
privateslot

Definition at line 332 of file kis_dlg_stroke_selection_properties.cpp.

333{
334 Q_EMIT colorSelectorChanged();
335}
void colorSelectorChanged()

References colorSelectorChanged().

◆ on_typeBox_currentIndexChanged

void WdgStrokeSelection::on_typeBox_currentIndexChanged ( int index)
privateslot

Definition at line 314 of file kis_dlg_stroke_selection_properties.cpp.

315{
316 if (arg1 == 0) {
318 lineSize->setEnabled(false);
319 fillBox->setEnabled(false);
320 colorFillSelector->setEnabled(false);
321 sizeBox->setEnabled(false);
322 }
323 else {
324 m_options.brushSelected = false;
325 lineSize->setEnabled(true);
326 fillBox->setEnabled(true);
327 colorFillSelector->setEnabled(true);
328 sizeBox->setEnabled(true);
329 }
330}

References StrokeSelectionOptions::brushSelected, and m_options.

Member Data Documentation

◆ m_cfg

KisPropertiesConfigurationSP WdgStrokeSelection::m_cfg

Definition at line 66 of file kis_dlg_stroke_selection_properties.h.

◆ m_isVectorLayer

bool WdgStrokeSelection::m_isVectorLayer {false}

Definition at line 65 of file kis_dlg_stroke_selection_properties.h.

65{false};

◆ m_options

StrokeSelectionOptions WdgStrokeSelection::m_options

Definition at line 63 of file kis_dlg_stroke_selection_properties.h.


The documentation for this class was generated from the following files: