Commit 73302c88 authored by FPoupon's avatar FPoupon
Browse files

add method to select an item from its name

parent 845ea7e9
......@@ -90,6 +90,15 @@ void gkg::LabelledComboBox::setCurrentIndex( uint32_t index )
}
void gkg::LabelledComboBox::setCurrentText( const QString& text )
{
_combobox->setCurrentText( text );
emit activated( text );
}
QComboBox* gkg::LabelledComboBox::getComboBox() const
{
......
......@@ -30,16 +30,17 @@ class LabelledComboBox : public QWidget
int32_t currentIndex() const;
void setCurrentIndex( uint32_t index );
void setCurrentText( const QString& text );
QComboBox* getComboBox() const;
public slots:
void activate( const QString& );
void activate( const QString& text );
signals:
void activated( const QString& );
void activated( const QString& text );
private:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment