Chris@285: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
Chris@285: 
Chris@285: /*
Chris@285:     Sonic Visualiser
Chris@285:     An audio file viewer and annotation editor.
Chris@285:     Centre for Digital Music, Queen Mary, University of London.
Chris@285:     This file copyright 2007 QMUL.
Chris@285:     
Chris@285:     This program is free software; you can redistribute it and/or
Chris@285:     modify it under the terms of the GNU General Public License as
Chris@285:     published by the Free Software Foundation; either version 2 of the
Chris@285:     License, or (at your option) any later version.  See the file
Chris@285:     COPYING included with this distribution for more information.
Chris@285: */
Chris@285: 
Chris@285: #ifndef _COLOUR_NAME_DIALOG_H_
Chris@285: #define _COLOUR_NAME_DIALOG_H_
Chris@285: 
Chris@285: #include <QDialog>
Chris@285: #include <QColor>
Chris@285: #include <QString>
Chris@285: 
Chris@285: class QLabel;
Chris@285: class QLineEdit;
Chris@285: class QCheckBox;
Chris@285: class QPushButton;
Chris@285: 
Chris@285: class ColourNameDialog : public QDialog
Chris@285: {
Chris@285:     Q_OBJECT
Chris@285: 
Chris@285: public:
Chris@285:     ColourNameDialog(QString title, QString message, QColor colour,
Chris@285: 		     QString defaultName,
Chris@285: 		     QWidget *parent = 0);
Chris@285: 
Chris@285:     void showDarkBackgroundCheckbox(QString text);
Chris@285: 
Chris@285:     QString getColourName() const;
Chris@285:     bool isDarkBackgroundChecked() const;
Chris@285: 
Chris@285: protected slots:
Chris@285:     void darkBackgroundChanged(int);
Chris@285:     void textChanged(const QString &);
Chris@285: 
Chris@285: protected:
Chris@285:     QColor m_colour;
Chris@285:     QLabel *m_colourLabel;
Chris@285:     QLineEdit *m_textField;
Chris@285:     QPushButton *m_okButton;
Chris@285:     QCheckBox *m_darkBackground;
Chris@285: 
Chris@285:     void fillColourLabel();
Chris@285: };
Chris@285: 
Chris@285: #endif