colorComboBox.h 579 Bytes
Newer Older
Pierre Kraemer's avatar
Pierre Kraemer committed
1 2 3 4 5
#ifndef _COLORCOMBOBOX_H
#define _COLORCOMBOBOX_H

#include <QComboBox>

Sylvain Thery's avatar
Sylvain Thery committed
6 7 8 9 10 11 12 13 14
#ifdef WIN32
#if defined SCHNAPPSLIB_DLL_EXPORT
#define SCHNAPPS_API __declspec(dllexport)
#else
#define SCHNAPPS_API __declspec(dllimport)
#endif
#endif


Pierre Kraemer's avatar
Pierre Kraemer committed
15 16 17
class QColor;
class QWidget;

Sylvain Thery's avatar
Sylvain Thery committed
18
class SCHNAPPS_API ColorComboBox : public QComboBox
Pierre Kraemer's avatar
Pierre Kraemer committed
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
{
	Q_OBJECT
	Q_PROPERTY(QColor color READ color WRITE setColor USER true)

public:
	QColor color() const;
	void setColor(QColor c);

public:
	ColorComboBox(QWidget *widget = 0);

private:
	void populateList();

public slots:
	void slotHighlight(int index);
};

#endif