ColourNameDialog.h
Go to the documentation of this file.
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
2 
3 /*
4  Sonic Visualiser
5  An audio file viewer and annotation editor.
6  Centre for Digital Music, Queen Mary, University of London.
7  This file copyright 2007 QMUL.
8 
9  This program is free software; you can redistribute it and/or
10  modify it under the terms of the GNU General Public License as
11  published by the Free Software Foundation; either version 2 of the
12  License, or (at your option) any later version. See the file
13  COPYING included with this distribution for more information.
14 */
15 
16 #ifndef SV_COLOUR_NAME_DIALOG_H
17 #define SV_COLOUR_NAME_DIALOG_H
18 
19 #include <QDialog>
20 #include <QColor>
21 #include <QString>
22 
23 class QLabel;
24 class QLineEdit;
25 class QCheckBox;
26 class QPushButton;
27 
28 class ColourNameDialog : public QDialog
29 {
30  Q_OBJECT
31 
32 public:
33  ColourNameDialog(QString title, QString message, QColor colour,
34  QString defaultName,
35  QWidget *parent = 0);
36 
37  void showDarkBackgroundCheckbox(QString text);
38 
39  QString getColourName() const;
40  bool isDarkBackgroundChecked() const;
41 
42 protected slots:
43  void darkBackgroundChanged(int);
44  void textChanged(const QString &);
45 
46 protected:
47  QColor m_colour;
48  QLabel *m_colourLabel;
49  QLineEdit *m_textField;
50  QPushButton *m_okButton;
51  QCheckBox *m_darkBackground;
52 
53  void fillColourLabel();
54 };
55 
56 #endif
QLineEdit * m_textField
bool isDarkBackgroundChecked() const
ColourNameDialog(QString title, QString message, QColor colour, QString defaultName, QWidget *parent=0)
QPushButton * m_okButton
QCheckBox * m_darkBackground
void showDarkBackgroundCheckbox(QString text)
void darkBackgroundChanged(int)
QString getColourName() const
void textChanged(const QString &)