comparison widgets/ListInputDialog.cpp @ 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 e6d0b097d102
comparison
equal deleted inserted replaced
230:e52ed907cc42 231:512ead25e842
44 vbox->addWidget(radio); 44 vbox->addWidget(radio);
45 } 45 }
46 46
47 vbox->addStretch(1); 47 vbox->addStretch(1);
48 48
49 m_footnote = new QLabel;
50 vbox->addWidget(m_footnote);
51 m_footnote->hide();
52
49 QHBoxLayout *hbox = new QHBoxLayout; 53 QHBoxLayout *hbox = new QHBoxLayout;
50 vbox->addLayout(hbox, Qt::AlignRight); 54 vbox->addLayout(hbox, Qt::AlignRight);
51 55
52 QPushButton *ok = new QPushButton(tr("OK"), this); 56 QPushButton *ok = new QPushButton(tr("OK"), this);
53 ok->setDefault(true); 57 ok->setDefault(true);
79 } 83 }
80 } 84 }
81 return ""; 85 return "";
82 } 86 }
83 87
88 void
89 ListInputDialog::setItemAvailability(int item, bool available)
90 {
91 m_radioButtons[item]->setEnabled(available);
92 }
93
94 void
95 ListInputDialog::setFootnote(QString footnote)
96 {
97 m_footnote->setText(footnote);
98 m_footnote->show();
99 }
100
84 QString 101 QString
85 ListInputDialog::getItem(QWidget *parent, const QString &title, 102 ListInputDialog::getItem(QWidget *parent, const QString &title,
86 const QString &label, const QStringList &list, 103 const QString &label, const QStringList &list,
87 int current, bool *ok, Qt::WFlags f) 104 int current, bool *ok, Qt::WFlags f)
88 { 105 {