Olive
viewercontainer.h
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);
34  ~ViewerContainer();
35 
36  bool fit;
37  double zoom;
38 
39  void dragScrollPress(const QPoint&);
40  void dragScrollMove(const QPoint&);
41  void parseWheelEvent(QWheelEvent* event);
42 
43  Viewer* viewer;
44  ViewerWidget* child;
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:
61  int drag_start_x;
62  int drag_start_y;
63  int horiz_start;
64  int vert_start;
65  QScrollBar* horizontal_scrollbar;
66  QScrollBar* vertical_scrollbar;
67 };
68 
69 #endif // VIEWERCONTAINER_H
Definition: viewercontainer.h:29
Definition: viewerwidget.h:44
Definition: viewer.h:45