彻底改版2.0
This commit is contained in:
34
netfriend/slidepuzzlewidget/puzzlewidget.h
Normal file
34
netfriend/slidepuzzlewidget/puzzlewidget.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#ifndef PUZZLEWIDGET_H
|
||||
#define PUZZLEWIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
class PuzzleWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(QString pixmap READ getPixmap WRITE setPixmap)
|
||||
|
||||
public:
|
||||
PuzzleWidget(QWidget *parent);
|
||||
~PuzzleWidget();
|
||||
|
||||
public:
|
||||
QString getPixmap() const { return m_pixmap; };
|
||||
void setPixmap(const QString& pixmap);
|
||||
|
||||
void setValue(int value);
|
||||
bool isOverlap();
|
||||
|
||||
private slots:
|
||||
void onUpdatePixmap();
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event);
|
||||
|
||||
private:
|
||||
int m_value;
|
||||
QString m_pixmap;
|
||||
QPoint m_offsetPoint;
|
||||
};
|
||||
|
||||
#endif // PUZZLEWIDGET_H
|
||||
Reference in New Issue
Block a user