Chris@1196: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
Chris@1196: 
Chris@1196: /*
Chris@1196:     Sonic Visualiser
Chris@1196:     An audio file viewer and annotation editor.
Chris@1196:     Centre for Digital Music, Queen Mary, University of London.
Chris@1196:     This file copyright 2007-2016 QMUL.
Chris@1196:     
Chris@1196:     This program is free software; you can redistribute it and/or
Chris@1196:     modify it under the terms of the GNU General Public License as
Chris@1196:     published by the Free Software Foundation; either version 2 of the
Chris@1196:     License, or (at your option) any later version.  See the file
Chris@1196:     COPYING included with this distribution for more information.
Chris@1196: */
Chris@1196: 
Chris@1196: #ifndef SV_COLOUR_COMBO_BOX_H
Chris@1196: #define SV_COLOUR_COMBO_BOX_H
Chris@1196: 
Chris@1196: #include "NotifyingComboBox.h"
Chris@1196: 
Chris@1196: /**
Chris@1196:  * Colour-picker combo box with swatches, optionally including "Add
Chris@1196:  * New Colour..." entry to invoke a QColorDialog/ColourNameDialog
Chris@1196:  */
Chris@1196: class ColourComboBox : public NotifyingComboBox
Chris@1196: {
Chris@1196:     Q_OBJECT
Chris@1196: 
Chris@1196: public:
Chris@1196:     ColourComboBox(bool withAddNewColourEntry, QWidget *parent = 0);
Chris@1196: 
Chris@1196: signals:
Chris@1196:     void colourChanged(int colourIndex);
Chris@1196: 
Chris@1196: private slots:
Chris@1196:     void rebuild();
Chris@1196:     void comboActivated(int);
Chris@1196:     
Chris@1196: private:
Chris@1196:     bool m_withAddNewColourEntry;
Chris@1196: };
Chris@1196: 
Chris@1196: #endif
Chris@1196: