annotate widgets/ColourNameDialog.h @ 378:22b72f0f6a4e

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