Make it possible to set user interface language from options dialog

This commit is contained in:
Wladimir J. van der Laan
2012-05-08 23:03:41 +02:00
parent 6ddf861078
commit 5ac114c756
5 changed files with 58 additions and 8 deletions

View File

@@ -6,12 +6,12 @@ QValueComboBox::QValueComboBox(QWidget *parent) :
connect(this, SIGNAL(currentIndexChanged(int)), this, SLOT(handleSelectionChanged(int)));
}
int QValueComboBox::value() const
QVariant QValueComboBox::value() const
{
return itemData(currentIndex(), role).toInt();
return itemData(currentIndex(), role);
}
void QValueComboBox::setValue(int value)
void QValueComboBox::setValue(const QVariant &value)
{
setCurrentIndex(findData(value, role));
}