-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwidget.h
More file actions
78 lines (61 loc) · 1.58 KB
/
widget.h
File metadata and controls
78 lines (61 loc) · 1.58 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#ifndef WIDGET_H
#define WIDGET_H
#include <QWidget>
#include <QLabel>
#include <QVBoxLayout>
#include <QSize>
#include <QMenu>
#include <QAction>
#include <QMenuBar>
#include <QTableWidget>
#include <QTableWidgetItem>
#ifdef _DEBUG
#include <QDebug>
#endif
struct FloatTableWidgetItem : public QTableWidgetItem
{
explicit FloatTableWidgetItem(const QString &text) : QTableWidgetItem(text) { }
bool operator <(const QTableWidgetItem &other) const
{
return text().toFloat() < other.text().toFloat();
}
};
struct ImagesNotFoundExcp
{
ImagesNotFoundExcp(const QString &a_what) : what(a_what) { }
QString getWhat() const { return what; }
private:
const QString what;
};
class Widget : public QWidget
{
Q_OBJECT
QSize img_size;
uint image_c;
double time;
QVBoxLayout *mainLayout;
QTableWidget *tableWidget;
QMenuBar *menuBar;
QMenu *fileMenu;
QMenu *helpMenu;
QAction *quitAction;
QAction *refreshAction;
QAction *aboutAction;
QAction *aboutQtAction;
bool createTableGrid(const QString &path);
quint64 __rdtsc(void);
QLabel *createImageLabel(const QString &fileName);
QTableWidgetItem *createTypeLabel(const QString &fileType, bool qInit);
FloatTableWidgetItem *getTimeLabel();
void createWidgets();
void createActions();
void createMenus();
void setWidgetSettings();
private slots:
void aboutDialog();
void refreshSlot();
public:
Widget(QWidget *parent = 0);
~Widget();
};
#endif // WIDGET_H