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 66 of file KisWidgetConnectionUtils.cpp.

Constructor & Destructor Documentation

◆ ConnectComboBoxStateHelper()

ConnectComboBoxStateHelper::ConnectComboBoxStateHelper ( QComboBox * parent)
inline

Definition at line 71 of file KisWidgetConnectionUtils.cpp.

72 : QObject(parent),
73 m_comboBox(parent)
74 {
75 }

Member Function Documentation

◆ updateState

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

Definition at line 77 of file KisWidgetConnectionUtils.cpp.

77 {
78 QSignalBlocker b(m_comboBox);
79
80 while (m_comboBox->count() > 0) {
81 m_comboBox->removeItem(0);
82 }
83
84 m_comboBox->addItems(state.items);
85 m_comboBox->setCurrentIndex(state.currentIndex);
86 m_comboBox->setEnabled(state.enabled);
87
88 // TODO: verify if the two properties are equal or the control is disabled
89 }

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 92 of file KisWidgetConnectionUtils.cpp.


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