comparison widgets/ListInputDialog.cpp @ 663:1a0fdad4af4d tonioni

Merge from the default branch
author Chris Cannam
date Fri, 12 Jul 2013 13:25:22 +0100
parents d632a1e87018
children 4a578a360011
comparison
equal deleted inserted replaced
660:8663a831838f 663:1a0fdad4af4d
23 #include <QPushButton> 23 #include <QPushButton>
24 #include <QDialogButtonBox> 24 #include <QDialogButtonBox>
25 25
26 ListInputDialog::ListInputDialog(QWidget *parent, const QString &title, 26 ListInputDialog::ListInputDialog(QWidget *parent, const QString &title,
27 const QString &labelText, const QStringList &list, 27 const QString &labelText, const QStringList &list,
28 int current, Qt::WFlags f) : 28 int current) :
29 QDialog(parent, f), 29 QDialog(parent),
30 m_strings(list) 30 m_strings(list)
31 { 31 {
32 setWindowTitle(title); 32 setWindowTitle(title);
33 33
34 QVBoxLayout *vbox = new QVBoxLayout(this); 34 QVBoxLayout *vbox = new QVBoxLayout(this);
87 } 87 }
88 88
89 QString 89 QString
90 ListInputDialog::getItem(QWidget *parent, const QString &title, 90 ListInputDialog::getItem(QWidget *parent, const QString &title,
91 const QString &label, const QStringList &list, 91 const QString &label, const QStringList &list,
92 int current, bool *ok, Qt::WFlags f) 92 int current, bool *ok)
93 { 93 {
94 ListInputDialog dialog(parent, title, label, list, current, f); 94 ListInputDialog dialog(parent, title, label, list, current);
95 95
96 bool accepted = (dialog.exec() == QDialog::Accepted); 96 bool accepted = (dialog.exec() == QDialog::Accepted);
97 if (ok) *ok = accepted; 97 if (ok) *ok = accepted;
98 98
99 return dialog.getCurrentString(); 99 return dialog.getCurrentString();