-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathpicturesframe.h
55 lines (45 loc) · 1.24 KB
/
picturesframe.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
/** @file picturesframe.h
* Hlavickovy soubor tridy PicturesFrame dedici ze tridy QFrame,
* implementuje ram pro pro umisteni widgetu s fotografiemi
*/
#ifndef PICTURESFRAME_H
#define PICTURESFRAME_H
#include "imageinfo.h"
#include "imagewidgetslist.h"
#include <QAction>
#include <QBasicTimer>
#include <QCursor>
#include <QFrame>
#include <QMouseEvent>
#include <QRubberBand>
#include <QScrollArea>
class PicturesFrame : public QFrame {
Q_OBJECT
bool dragEventInProgress;
int countColCount();
QGridLayout* layout;
int imageSize;
int maxImageSize;
int minImageSize;
QBasicTimer timer;
void timerEvent(QTimerEvent* event);
public:
explicit PicturesFrame(QWidget* parent = 0);
void mousePressEvent(QMouseEvent* event);
void mouseMoveEvent(QMouseEvent* event);
void mouseReleaseEvent(QMouseEvent* event);
void addImage(ImageInfo* imageWidget);
ImageWidgetsList* imageWidgetsList;
QPoint origin;
QRubberBand* rubberBand;
int i;
signals:
void rubberBandRect(QRect r, bool apply);
void shiftScrollBar(int dy);
void mousePress(QMouseEvent* e);
void rightClick(QPoint p);
public slots:
void showImages();
void changeImageSize(int s);
};
#endif // PICTURESFRAME_H