Chris@126: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ Chris@126: Chris@126: /* Chris@126: Sonic Visualiser Chris@126: An audio file viewer and annotation editor. Chris@126: Centre for Digital Music, Queen Mary, University of London. Chris@229: This file copyright 2006 Chris Cannam. Chris@126: Chris@126: This program is free software; you can redistribute it and/or Chris@126: modify it under the terms of the GNU General Public License as Chris@126: published by the Free Software Foundation; either version 2 of the Chris@126: License, or (at your option) any later version. See the file Chris@126: COPYING included with this distribution for more information. Chris@126: */ Chris@126: Chris@1407: #ifndef SV_LIST_INPUT_DIALOG_H Chris@1407: #define SV_LIST_INPUT_DIALOG_H Chris@126: Chris@126: #include Chris@126: #include Chris@126: #include Chris@126: Chris@126: #include Chris@126: Chris@126: class QRadioButton; Chris@231: class QLabel; Chris@126: Chris@126: /** Chris@126: * Like QInputDialog::getItem(), except that it offers the items as a Chris@126: * set of radio buttons instead of in a single combo box. Chris@126: */ Chris@126: Chris@126: class ListInputDialog : public QDialog Chris@126: { Chris@222: Q_OBJECT Chris@222: Chris@126: public: Chris@231: ListInputDialog(QWidget *parent, const QString &title, Chris@231: const QString &label, const QStringList &list, Chris@616: int current = 0); Chris@126: virtual ~ListInputDialog(); Chris@126: Chris@231: void setItemAvailability(int item, bool available); Chris@231: void setFootnote(QString footnote); Chris@231: Chris@231: QString getCurrentString() const; Chris@231: Chris@126: static QString getItem(QWidget *parent, const QString &title, Chris@126: const QString &label, const QStringList &list, Chris@616: int current = 0, bool *ok = 0); Chris@126: Chris@126: protected: Chris@126: QStringList m_strings; Chris@126: std::vector m_radioButtons; Chris@231: QLabel *m_footnote; Chris@126: }; Chris@126: Chris@126: #endif