comparison widgets/ListInputDialog.h @ 231:512ead25e842

* Grey out exporting entire pane as image if it will be too wide for QImage
author Chris Cannam
date Thu, 15 Mar 2007 11:34:39 +0000
parents 387f2f6fc333
children d632a1e87018
comparison
equal deleted inserted replaced
230:e52ed907cc42 231:512ead25e842
21 #include <QStringList> 21 #include <QStringList>
22 22
23 #include <vector> 23 #include <vector>
24 24
25 class QRadioButton; 25 class QRadioButton;
26 class QLabel;
26 27
27 /** 28 /**
28 * Like QInputDialog::getItem(), except that it offers the items as a 29 * Like QInputDialog::getItem(), except that it offers the items as a
29 * set of radio buttons instead of in a single combo box. 30 * set of radio buttons instead of in a single combo box.
30 */ 31 */
32 class ListInputDialog : public QDialog 33 class ListInputDialog : public QDialog
33 { 34 {
34 Q_OBJECT 35 Q_OBJECT
35 36
36 public: 37 public:
38 ListInputDialog(QWidget *parent, const QString &title,
39 const QString &label, const QStringList &list,
40 int current = 0, Qt::WFlags f = 0);
37 virtual ~ListInputDialog(); 41 virtual ~ListInputDialog();
38 42
43 void setItemAvailability(int item, bool available);
44 void setFootnote(QString footnote);
45
46 QString getCurrentString() const;
47
39 static QString getItem(QWidget *parent, const QString &title, 48 static QString getItem(QWidget *parent, const QString &title,
40 const QString &label, const QStringList &list, 49 const QString &label, const QStringList &list,
41 int current = 0, bool *ok = 0, Qt::WFlags f = 0); 50 int current = 0, bool *ok = 0, Qt::WFlags f = 0);
42 51
43 protected: 52 protected:
44 ListInputDialog(QWidget *parent, const QString &title,
45 const QString &label, const QStringList &list,
46 int current = 0, Qt::WFlags f = 0);
47
48 QString getCurrentString() const;
49
50 QStringList m_strings; 53 QStringList m_strings;
51 std::vector<QRadioButton *> m_radioButtons; 54 std::vector<QRadioButton *> m_radioButtons;
55 QLabel *m_footnote;
52 }; 56 };
53 57
54 #endif 58 #endif