comparison widgets/ColourNameDialog.h @ 285:9dd432665059

* Add a colour database, and Add New Colour function to the colour combo in property box. The colour property is only correctly handled in the waveform layer so far. * Add en_GB translation, to translate those annoying Color texts in the Qt colour picker dialog.
author Chris Cannam
date Wed, 11 Jul 2007 17:21:37 +0000
parents
children a34a2a25907c
comparison
equal deleted inserted replaced
284:1284955856ab 285:9dd432665059
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 _COLOUR_NAME_DIALOG_H_
17 #define _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