-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathpicturesscrollarea.h
38 lines (31 loc) · 959 Bytes
/
picturesscrollarea.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
/** @file picturesscrollarea.h
* Hlavickovy soubor tridy PicturesScrollArea dedici ze tridy QScrollArea,
* implementuje skrolovaci plochu do ktere bude umisten ram s fotkami
*/
#ifndef PICTURESSCROLLAREA_H
#define PICTURESSCROLLAREA_H
#include "keyeventhandler.h"
#include <QGridLayout>
#include <QMainWindow>
#include <QResizeEvent>
#include <QScrollArea>
#include <QScrollBar>
class PicturesScrollArea : public QScrollArea {
Q_OBJECT
virtual QSize sizeHint() const;
public:
PicturesScrollArea(QWidget* parent = 0);
void resizeEvent(QResizeEvent* event);
void setMw(QMainWindow* MW);
QMainWindow* mainWindow;
void keyPressEvent(QKeyEvent* event);
void wheelEvent(QWheelEvent* event);
signals:
void showImages();
void changeSize(int s);
void processEvent(QKeyEvent* event);
public slots:
void setImageFocus(int dy, int widgetHeight);
void shiftScrollBar(int dy);
};
#endif // PICTURESSCROLLAREA_H