qt_demoe/colorwidget/colorwidget.h

50 lines
880 B
C
Raw Normal View History

2019-10-15 08:11:03 +00:00
#ifndef COLORWIDGET_H
#define COLORWIDGET_H
#include <QWidget>
class QGridLayout;
class QVBoxLayout;
class QLabel;
class QLineEdit;
#ifdef quc
2020-12-24 10:00:09 +00:00
class Q_DECL_EXPORT ColorWidget : public QWidget
2019-10-15 08:11:03 +00:00
#else
class ColorWidget : public QWidget
#endif
{
Q_OBJECT
public:
static ColorWidget *Instance();
explicit ColorWidget(QWidget *parent = 0);
2021-03-08 01:04:13 +00:00
~ColorWidget();
2019-10-15 08:11:03 +00:00
protected:
void mousePressEvent(QMouseEvent *);
void mouseReleaseEvent(QMouseEvent *);
private:
static ColorWidget *instance;
QClipboard *cp;
bool pressed;
QTimer *timer;
QGridLayout *gridLayout;
QVBoxLayout *verticalLayout;
QLabel *labColor;
QLabel *label;
QLabel *labWeb;
QLineEdit *txtWeb;
QLabel *labRgb;
QLineEdit *txtRgb;
QLabel *labPoint;
QLineEdit *txtPoint;
private Q_SLOTS:
void showColorValue();
};
#endif // COLORWIDGET_H