-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwidgetimage.h
56 lines (44 loc) · 1.2 KB
/
widgetimage.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
#ifndef WIDGETIMAGE_H
#define WIDGETIMAGE_H
#include <QtGui>
#include <QToolButton>
#include <QScrollArea>
#include <QStatusBar>
#include <QTabWidget>
#include <QLabel>
class WidgetImage : public QWidget
{
Q_OBJECT
public:
WidgetImage(QWidget* parent = 0);
void SetImage(QString fileImageName, QFileInfoList list, QStatusBar* statusBar, QTabWidget *tabWidget, int index_tab);
void UpdateStatusBar();
protected:
void resizeEvent(QResizeEvent *event);
void keyPressEvent(QKeyEvent *event);
private:
void ShowImageEx(bool bRealSize = false);
void SetPixmap(QString fileName);
void SetEnabledButtons();
void ReplaceImage();
QString GetInfoAboutImage(QString fileImage);
private slots:
void btNext_Clicked();
void btPrevious_Clicked();
void btRealSizeFitImage_Clicked();
private:
QScrollArea *scrollArea_;
QPixmap pixmap_;
QFileInfoList list_;
QLabel *imageLabel_;
QToolButton *btNext_;
QToolButton *btRealSizeFitImage_;
QToolButton *btPrevious_;
QStatusBar* statusBar_;
QTabWidget *tabWidget_;
int index_tab_;
int current_index_;
QRect btNext_Rect_;
QRect btPrevious_Rect_;
};
#endif // WIDGETIMAGE_H