annotate widgets/ListInputDialog.h @ 146:a1f7d265ac79

* More to do with passing around step/blocksize etc from plugin dialog to plugins. Still some puzzling unresolved details.
author Chris Cannam
date Tue, 19 Sep 2006 14:37:06 +0000
parents 0e95c127bb53
children cd81066ac7ad
rev   line source
Chris@126 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@126 2
Chris@126 3 /*
Chris@126 4 Sonic Visualiser
Chris@126 5 An audio file viewer and annotation editor.
Chris@126 6 Centre for Digital Music, Queen Mary, University of London.
Chris@126 7
Chris@126 8 This program is free software; you can redistribute it and/or
Chris@126 9 modify it under the terms of the GNU General Public License as
Chris@126 10 published by the Free Software Foundation; either version 2 of the
Chris@126 11 License, or (at your option) any later version. See the file
Chris@126 12 COPYING included with this distribution for more information.
Chris@126 13 */
Chris@126 14
Chris@126 15 #ifndef _LIST_INPUT_DIALOG_H_
Chris@126 16 #define _LIST_INPUT_DIALOG_H_
Chris@126 17
Chris@126 18 #include <QDialog>
Chris@126 19 #include <QString>
Chris@126 20 #include <QStringList>
Chris@126 21
Chris@126 22 #include <vector>
Chris@126 23
Chris@126 24 class QRadioButton;
Chris@126 25
Chris@126 26 /**
Chris@126 27 * Like QInputDialog::getItem(), except that it offers the items as a
Chris@126 28 * set of radio buttons instead of in a single combo box.
Chris@126 29 */
Chris@126 30
Chris@126 31 class ListInputDialog : public QDialog
Chris@126 32 {
Chris@126 33 public:
Chris@126 34 virtual ~ListInputDialog();
Chris@126 35
Chris@126 36 static QString getItem(QWidget *parent, const QString &title,
Chris@126 37 const QString &label, const QStringList &list,
Chris@126 38 int current = 0, bool *ok = 0, Qt::WFlags f = 0);
Chris@126 39
Chris@126 40 protected:
Chris@126 41 ListInputDialog(QWidget *parent, const QString &title,
Chris@126 42 const QString &label, const QStringList &list,
Chris@126 43 int current = 0, Qt::WFlags f = 0);
Chris@126 44
Chris@126 45 QString getCurrentString() const;
Chris@126 46
Chris@126 47 QStringList m_strings;
Chris@126 48 std::vector<QRadioButton *> m_radioButtons;
Chris@126 49 };
Chris@126 50
Chris@126 51 #endif