-
Notifications
You must be signed in to change notification settings - Fork 0
/
dragwidget.h
44 lines (34 loc) · 864 Bytes
/
dragwidget.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef DRAGWIDGET_H
#define DRAGWIDGET_H
#include <QWidget>
#include <QFrame>
#include "draglabel.h"
#include "sudoku.h"
QT_BEGIN_NAMESPACE
class QDragEnterEvent;
class QDropEvent;
QT_END_NAMESPACE
class DragWidget : public QWidget
{
Q_OBJECT
public:
DragWidget(Sudoku *sudoku, QString name, QWidget *parent = 0, bool init = false);
public slots:
void majValeurs();
void fixerGrille();
void defixerGrille();
signals:
void clicked();
protected:
void dragEnterEvent(QDragEnterEvent *event) Q_DECL_OVERRIDE;
void dropEvent(QDropEvent *event) Q_DECL_OVERRIDE;
void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
private:
Sudoku *sudoku;
DragLabel* lbl[9];
QFrame *frm[9];
QPoint depart;
void ajouteValeur(QString dst, int valeur);
void supprimeValeur(QString src);
};
#endif // DRAGWIDGET_H