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@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@126: #ifndef _LIST_INPUT_DIALOG_H_ Chris@126: #define _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@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@126: public: Chris@126: virtual ~ListInputDialog(); Chris@126: Chris@126: static QString getItem(QWidget *parent, const QString &title, Chris@126: const QString &label, const QStringList &list, Chris@126: int current = 0, bool *ok = 0, Qt::WFlags f = 0); Chris@126: Chris@126: protected: Chris@126: ListInputDialog(QWidget *parent, const QString &title, Chris@126: const QString &label, const QStringList &list, Chris@126: int current = 0, Qt::WFlags f = 0); Chris@126: Chris@126: QString getCurrentString() const; Chris@126: Chris@126: QStringList m_strings; Chris@126: std::vector m_radioButtons; Chris@126: }; Chris@126: Chris@126: #endif