summaryrefslogtreecommitdiff
path: root/src/plugins/projectexplorer/customwizard/customwizardpage.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2010-07-08 11:46:05 +0200
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2010-07-08 11:46:11 +0200
commit280541aec9f438a42e1321f536445a29e71417f5 (patch)
treec53b79fb8dd66b91968d2876e2735bea6161cc38 /src/plugins/projectexplorer/customwizard/customwizardpage.h
parentcdf7dbeada9008aceeb83fe070430bed66c625f0 (diff)
downloadqt-creator-280541aec9f438a42e1321f536445a29e71417f5.tar.gz
Template-CustomWizard: Make QComboBox parameters more flexible.
Separate value and display text for the entries, use in ListModel example. Rubber-stamped-by: aportale <alessandro.portale@trolltech.com>
Diffstat (limited to 'src/plugins/projectexplorer/customwizard/customwizardpage.h')
-rw-r--r--src/plugins/projectexplorer/customwizard/customwizardpage.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/plugins/projectexplorer/customwizard/customwizardpage.h b/src/plugins/projectexplorer/customwizard/customwizardpage.h
index ccf27ae198..741ee99989 100644
--- a/src/plugins/projectexplorer/customwizard/customwizardpage.h
+++ b/src/plugins/projectexplorer/customwizard/customwizardpage.h
@@ -54,17 +54,27 @@ struct CustomWizardContext;
// A non-editable combo for text editing purposes that plays
// with QWizard::registerField (providing a settable 'text' property).
+// Allows for a separation of values to be used for wizard fields replacement
+// and display texts.
class TextFieldComboBox : public QComboBox {
Q_PROPERTY(QString text READ text WRITE setText)
Q_OBJECT
public:
explicit TextFieldComboBox(QWidget *parent = 0);
- QString text() const { return currentText(); }
+ QString text() const;
void setText(const QString &s);
+ void setItems(const QStringList &displayTexts, const QStringList &values);
+
signals:
void text4Changed(const QString &); // Do not conflict with Qt 3 compat signal.
+
+private slots:
+ void slotCurrentIndexChanged(int);
+
+private:
+ inline QString valueAt(int) const;
};
// A Checkbox that plays with QWizard::registerField (providing a settable