Krita Source Code Documentation
Loading...
Searching...
No Matches
ConnectComboBoxStateHelper Class Reference
+ Inheritance diagram for ConnectComboBoxStateHelper:

Public Slots

void updateState (const ComboBoxState &state)
 

Public Member Functions

 ConnectComboBoxStateHelper (QComboBox *parent)
 

Private Attributes

QComboBox * m_comboBox
 

Detailed Description

Definition at line 90 of file KisWidgetConnectionUtils.cpp.

Constructor & Destructor Documentation

◆ ConnectComboBoxStateHelper()

ConnectComboBoxStateHelper::ConnectComboBoxStateHelper ( QComboBox * parent)
inline

Definition at line 95 of file KisWidgetConnectionUtils.cpp.

96 : QObject(parent),
97 m_comboBox(parent)
98 {
99 }

Member Function Documentation

◆ updateState

void ConnectComboBoxStateHelper::updateState ( const ComboBoxState & state)
inlineslot

Definition at line 101 of file KisWidgetConnectionUtils.cpp.

101 {
102 QSignalBlocker b(m_comboBox);
103
104 while (m_comboBox->count() > 0) {
105 m_comboBox->removeItem(0);
106 }
107
108 m_comboBox->addItems(state.items);
109 m_comboBox->setCurrentIndex(state.currentIndex);
110 m_comboBox->setEnabled(state.enabled);
111
112 // TODO: verify if the two properties are equal or the control is disabled
113 }

References KisWidgetConnectionUtils::ComboBoxState::currentIndex, KisWidgetConnectionUtils::ComboBoxState::enabled, KisWidgetConnectionUtils::ComboBoxState::items, and m_comboBox.

Member Data Documentation

◆ m_comboBox

QComboBox* ConnectComboBoxStateHelper::m_comboBox
private

Definition at line 116 of file KisWidgetConnectionUtils.cpp.


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