Olive
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
viewercontainer.h
Go to the documentation of this file.
1 /***
2 
3  Olive - Non-Linear Video Editor
4  Copyright (C) 2019 Olive Team
5 
6  This program is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program. If not, see <http://www.gnu.org/licenses/>.
18 
19 ***/
20 
21 #ifndef VIEWERCONTAINER_H
22 #define VIEWERCONTAINER_H
23 
24 #include <QWidget>
25 class Viewer;
26 class ViewerWidget;
27 class QScrollBar;
28 
29 class ViewerContainer : public QWidget
30 {
31  Q_OBJECT
32 public:
33  explicit ViewerContainer(QWidget *parent = 0);
35 
36  bool fit;
37  double zoom;
38 
39  void dragScrollPress(const QPoint&);
40  void dragScrollMove(const QPoint&);
41  void parseWheelEvent(QWheelEvent* event);
42 
45  void adjust();
46 
47  // manually moves scrollbars into the correct position
48  void adjust_scrollbars();
49 
50 protected:
51  void resizeEvent(QResizeEvent *event);
52 
53 signals:
54 
55 public slots:
56 
57 private slots:
58  void scroll_changed();
59 
60 private:
65  QScrollBar* horizontal_scrollbar;
66  QScrollBar* vertical_scrollbar;
67 };
68 
69 #endif // VIEWERCONTAINER_H
QScrollBar * horizontal_scrollbar
Definition: viewercontainer.h:65
void adjust()
Definition: viewercontainer.cpp:82
bool fit
Definition: viewercontainer.h:36
void resizeEvent(QResizeEvent *event)
Definition: viewercontainer.cpp:164
Definition: viewer.h:44
int drag_start_x
Definition: viewercontainer.h:61
QScrollBar * vertical_scrollbar
Definition: viewercontainer.h:66
Definition: viewerwidget.h:44
Viewer * viewer
Definition: viewercontainer.h:43
void scroll_changed()
Definition: viewercontainer.cpp:169
int drag_start_y
Definition: viewercontainer.h:62
double zoom
Definition: viewercontainer.h:37
ViewerContainer(QWidget *parent=0)
Definition: viewercontainer.cpp:35
void dragScrollPress(const QPoint &)
Definition: viewercontainer.cpp:58
~ViewerContainer()
Definition: viewercontainer.cpp:56
int horiz_start
Definition: viewercontainer.h:63
void parseWheelEvent(QWheelEvent *event)
Definition: viewercontainer.cpp:74
void dragScrollMove(const QPoint &)
Definition: viewercontainer.cpp:66
Definition: viewercontainer.h:29
int vert_start
Definition: viewercontainer.h:64
ViewerWidget * child
Definition: viewercontainer.h:44
void adjust_scrollbars()
Definition: viewercontainer.cpp:154