-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrndtableview.h
61 lines (47 loc) · 1.45 KB
/
rndtableview.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#ifndef RNDTABLEVIEW_H
#define RNDTABLEVIEW_H
#include <QDialog>
#include "table.h"
#include <QSound>
#include <QStringList>
namespace Ui {
class rndTableView;
}
class rndTableView : public QDialog
{
Q_OBJECT
public:
explicit rndTableView(QWidget *parent = 0);
~rndTableView();
void setTable(table tb);
private:
Ui::rndTableView *ui;
table tableData; // the images data
table rndTableData; // random selected images
QPoint pt; // the eyetracker point
QTimer *ticTac;
QRectF posSel; // the selected image position
double sizeSel; // size of the animation selection procsess
int rowSelOld; // the last image index selected
float wi,hi; // size of images in the grid
bool selected;
void setSize();
bool rndSelimages(); // method to select images from tableData to rndTableData
QSound selectedSound; // sound of selected image
QStringList excPair1; // Exclusion Pairs of images
QStringList excPair2;
int actualItem;
void openExcludedPairs(const QString &name);
bool filterOK(int id);
protected:
void paintEvent(QPaintEvent *);
void showEvent(QShowEvent *);
void closeEvent(QCloseEvent *);
void hideEvent(QHideEvent *);
void keyPressEvent(QKeyEvent *key);
public slots:
inline void setPt(const QPoint &p) { pt = p; }
private slots:
void on_ticTacTimeOver();
};
#endif // TABLEVIEW_H