svgui
1.9
|
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ 00002 00003 /* 00004 Sonic Visualiser 00005 An audio file viewer and annotation editor. 00006 Centre for Digital Music, Queen Mary, University of London. 00007 This file copyright 2007 QMUL. 00008 00009 This program is free software; you can redistribute it and/or 00010 modify it under the terms of the GNU General Public License as 00011 published by the Free Software Foundation; either version 2 of the 00012 License, or (at your option) any later version. See the file 00013 COPYING included with this distribution for more information. 00014 */ 00015 00016 #ifndef _COLOUR_NAME_DIALOG_H_ 00017 #define _COLOUR_NAME_DIALOG_H_ 00018 00019 #include <QDialog> 00020 #include <QColor> 00021 #include <QString> 00022 00023 class QLabel; 00024 class QLineEdit; 00025 class QCheckBox; 00026 class QPushButton; 00027 00028 class ColourNameDialog : public QDialog 00029 { 00030 Q_OBJECT 00031 00032 public: 00033 ColourNameDialog(QString title, QString message, QColor colour, 00034 QString defaultName, 00035 QWidget *parent = 0); 00036 00037 void showDarkBackgroundCheckbox(QString text); 00038 00039 QString getColourName() const; 00040 bool isDarkBackgroundChecked() const; 00041 00042 protected slots: 00043 void darkBackgroundChanged(int); 00044 void textChanged(const QString &); 00045 00046 protected: 00047 QColor m_colour; 00048 QLabel *m_colourLabel; 00049 QLineEdit *m_textField; 00050 QPushButton *m_okButton; 00051 QCheckBox *m_darkBackground; 00052 00053 void fillColourLabel(); 00054 }; 00055 00056 #endif