39 lines
652 B
C
39 lines
652 B
C
![]() |
// 颜色预览区域
|
||
|
|
||
|
|
||
|
#ifndef PREVIEWCOLORAREA_H
|
||
|
#define PREVIEWCOLORAREA_H
|
||
|
|
||
|
#include <QWidget>
|
||
|
|
||
|
class PreviewColorArea : public QWidget
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
public:
|
||
|
PreviewColorArea(QWidget *parent);
|
||
|
~PreviewColorArea();
|
||
|
|
||
|
void setCurColor(const QColor &);
|
||
|
void setNewColor(const QColor &);
|
||
|
QColor getNewColor(){ return m_newColor;}
|
||
|
protected:
|
||
|
void paintEvent(QPaintEvent *);
|
||
|
void resizeEvent(QResizeEvent *);
|
||
|
|
||
|
private:
|
||
|
void paint(QPainter &painter, QRect) const;
|
||
|
|
||
|
public slots:
|
||
|
void svChangedSlot(int, int, int);
|
||
|
|
||
|
signals:
|
||
|
void svChangedSignal(int, int, int);
|
||
|
|
||
|
private:
|
||
|
QColor m_curColor;
|
||
|
QColor m_newColor;
|
||
|
};
|
||
|
|
||
|
#endif // PREVIEWCOLORAREA_H
|