1 /* 2 For general Scribus (>=1.3.2) copyright and licensing information please refer 3 to the COPYING file provided with the program. Following this notice may exist 4 a copyright and/or license notice that predates the release of Scribus 1.3.2 5 for which a new license (GPL+exception) is in place. 6 */ 7 /* 8 * colorcombo.h 9 * ScribusCVS 10 * 11 * Created by Jean Ghali on 18.02.06. 12 * Copyright 2006 under GPL2. All rights reserved. 13 * 14 */ 15 16 #ifndef COLORCOMBO_H 17 #define COLORCOMBO_H 18 19 #include <QComboBox> 20 21 /* 22 *#ifdef Q_OS_MAC 23 #include <QMacStyle> 24 #endif 25 */ 26 #include "scribusapi.h" 27 #include "colorlistbox.h" 28 29 /*! 30 \class ColorCombo colorcombo.h 31 \brief The ColorCombo widget is a combo box for displaying list of colors. 32 */ 33 class SCRIBUS_API ColorCombo : public QComboBox 34 { 35 Q_OBJECT 36 37 public: 38 39 enum PixmapType 40 { 41 smallPixmaps, 42 widePixmaps, 43 fancyPixmaps 44 }; 45 46 ColorCombo( QWidget* parent=nullptr ); 47 ColorCombo( ColorCombo::PixmapType type, QWidget* parent=nullptr ); 48 ColorCombo( bool rw, QWidget* parent=nullptr ); 49 50 QString currentColor() const; 51 52 void setColors(ColorList& list, bool insertNone = true); 53 void setCurrentColor(QString colorName); 54 void setPixmapType(ColorCombo::PixmapType type); 55 56 void initColorList(ColorList* colorList, ScribusDoc* doc, const QString& colorValue); 57 }; 58 59 #endif 60