27 lines
424 B
C++
27 lines
424 B
C++
#ifndef COLORACTION_H
|
|
#define COLORACTION_H
|
|
|
|
#include <QAction>
|
|
#include <QColor>
|
|
|
|
class ColorAction : public QAction
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
ColorAction(QObject *parent);
|
|
|
|
const QColor& color() const { return m_color; }
|
|
void setColor(const QColor &color);
|
|
|
|
Q_SIGNALS:
|
|
void colorChanged(const QColor &color);
|
|
|
|
private Q_SLOTS:
|
|
void chooseColor();
|
|
|
|
private:
|
|
QColor m_color;
|
|
};
|
|
#endif // COLORACTION_H
|