comparison view/Pane.h @ 1216:dc2af6616c83

Merge from branch 3.0-integration
author Chris Cannam
date Fri, 13 Jan 2017 10:29:50 +0000
parents 67f437277069
children a34a2a25907c
comparison
equal deleted inserted replaced
1048:e8102ff5573b 1216:dc2af6616c83
35 { 35 {
36 Q_OBJECT 36 Q_OBJECT
37 37
38 public: 38 public:
39 Pane(QWidget *parent = 0); 39 Pane(QWidget *parent = 0);
40 virtual QString getPropertyContainerIconName() const { return "pane"; } 40 virtual QString getPropertyContainerIconName() const override { return "pane"; }
41 41
42 virtual bool shouldIlluminateLocalFeatures(const Layer *layer, 42 virtual bool shouldIlluminateLocalFeatures(const Layer *layer,
43 QPoint &pos) const; 43 QPoint &pos) const override;
44 virtual bool shouldIlluminateLocalSelection(QPoint &pos, 44 virtual bool shouldIlluminateLocalSelection(QPoint &pos,
45 bool &closeToLeft, 45 bool &closeToLeft,
46 bool &closeToRight) const; 46 bool &closeToRight) const override;
47 47
48 void setCentreLineVisible(bool visible); 48 void setCentreLineVisible(bool visible);
49 bool getCentreLineVisible() const { return m_centreLineVisible; } 49 bool getCentreLineVisible() const { return m_centreLineVisible; }
50 50
51 virtual sv_frame_t getFirstVisibleFrame() const; 51 virtual sv_frame_t getFirstVisibleFrame() const override;
52 52
53 virtual int getVerticalScaleWidth() const; 53 int getVerticalScaleWidth() const;
54 54
55 virtual QImage *toNewImage(sv_frame_t f0, sv_frame_t f1); 55 virtual QImage *renderToNewImage() override {
56 virtual QImage *toNewImage() { return View::toNewImage(); } 56 return View::renderToNewImage();
57 virtual QSize getImageSize(sv_frame_t f0, sv_frame_t f1); 57 }
58 virtual QSize getImageSize() { return View::getImageSize(); } 58
59 virtual QImage *renderPartToNewImage(sv_frame_t f0, sv_frame_t f1) override;
60
61 virtual QSize getRenderedImageSize() override {
62 return View::getRenderedImageSize();
63 }
64
65 virtual QSize getRenderedPartImageSize(sv_frame_t f0, sv_frame_t f1) override;
59 66
60 virtual void toXml(QTextStream &stream, QString indent = "", 67 virtual void toXml(QTextStream &stream, QString indent = "",
61 QString extraAttributes = "") const; 68 QString extraAttributes = "") const override;
62 69
63 static void registerShortcuts(KeyReference &kr); 70 static void registerShortcuts(KeyReference &kr);
64 71
65 enum PaneType { 72 enum PaneType {
66 Normal = 0, 73 Normal = 0,
75 void dropAccepted(QString text); 82 void dropAccepted(QString text);
76 void doubleClickSelectInvoked(sv_frame_t frame); 83 void doubleClickSelectInvoked(sv_frame_t frame);
77 void regionOutlined(QRect rect); 84 void regionOutlined(QRect rect);
78 85
79 public slots: 86 public slots:
80 virtual void toolModeChanged(); 87 // view slots
81 virtual void zoomWheelsEnabledChanged(); 88 virtual void toolModeChanged() override;
82 virtual void viewZoomLevelChanged(View *v, int z, bool locked); 89 virtual void zoomWheelsEnabledChanged() override;
83 virtual void modelAlignmentCompletionChanged(); 90 virtual void viewZoomLevelChanged(View *v, int z, bool locked) override;
84 91 virtual void modelAlignmentCompletionChanged() override;
92
93 // local slots, not overrides
85 virtual void horizontalThumbwheelMoved(int value); 94 virtual void horizontalThumbwheelMoved(int value);
86 virtual void verticalThumbwheelMoved(int value); 95 virtual void verticalThumbwheelMoved(int value);
87 virtual void verticalZoomChanged(); 96 virtual void verticalZoomChanged();
88 virtual void verticalPannerMoved(float x, float y, float w, float h); 97 virtual void verticalPannerMoved(float x, float y, float w, float h);
89 virtual void editVerticalPannerExtents(); 98 virtual void editVerticalPannerExtents();
90 99
91 virtual void layerParametersChanged(); 100 virtual void layerParametersChanged() override;
92 101
93 virtual void propertyContainerSelected(View *, PropertyContainer *pc); 102 virtual void propertyContainerSelected(View *, PropertyContainer *pc) override;
94 103
95 void zoomToRegion(QRect r); 104 void zoomToRegion(QRect r);
96 105
97 void mouseEnteredWidget(); 106 void mouseEnteredWidget();
98 void mouseLeftWidget(); 107 void mouseLeftWidget();
99 108
100 protected slots: 109 protected slots:
101 void playbackScheduleTimerElapsed(); 110 void playbackScheduleTimerElapsed();
102 111
103 protected: 112 protected:
104 virtual void paintEvent(QPaintEvent *e); 113 virtual void paintEvent(QPaintEvent *e) override;
105 virtual void mousePressEvent(QMouseEvent *e); 114 virtual void mousePressEvent(QMouseEvent *e) override;
106 virtual void mouseReleaseEvent(QMouseEvent *e); 115 virtual void mouseReleaseEvent(QMouseEvent *e) override;
107 virtual void mouseMoveEvent(QMouseEvent *e); 116 virtual void mouseMoveEvent(QMouseEvent *e) override;
108 virtual void mouseDoubleClickEvent(QMouseEvent *e); 117 virtual void mouseDoubleClickEvent(QMouseEvent *e) override;
109 virtual void enterEvent(QEvent *e); 118 virtual void enterEvent(QEvent *e) override;
110 virtual void leaveEvent(QEvent *e); 119 virtual void leaveEvent(QEvent *e) override;
111 virtual void wheelEvent(QWheelEvent *e); 120 virtual void wheelEvent(QWheelEvent *e) override;
112 virtual void resizeEvent(QResizeEvent *e); 121 virtual void resizeEvent(QResizeEvent *e) override;
113 virtual void dragEnterEvent(QDragEnterEvent *e); 122 virtual void dragEnterEvent(QDragEnterEvent *e) override;
114 virtual void dropEvent(QDropEvent *e); 123 virtual void dropEvent(QDropEvent *e) override;
115 124
116 void wheelVertical(int sign, Qt::KeyboardModifiers); 125 void wheelVertical(int sign, Qt::KeyboardModifiers);
117 void wheelHorizontal(int sign, Qt::KeyboardModifiers); 126 void wheelHorizontal(int sign, Qt::KeyboardModifiers);
118 void wheelHorizontalFine(int pixels, Qt::KeyboardModifiers); 127 void wheelHorizontalFine(int pixels, Qt::KeyboardModifiers);
119 128
125 void drawWorkTitle(QRect, QPainter &, const Model *); 134 void drawWorkTitle(QRect, QPainter &, const Model *);
126 void drawLayerNames(QRect, QPainter &); 135 void drawLayerNames(QRect, QPainter &);
127 void drawEditingSelection(QPainter &); 136 void drawEditingSelection(QPainter &);
128 void drawAlignmentStatus(QRect, QPainter &, const Model *, bool down); 137 void drawAlignmentStatus(QRect, QPainter &, const Model *, bool down);
129 138
130 virtual bool render(QPainter &paint, int x0, sv_frame_t f0, sv_frame_t f1); 139 virtual bool render(QPainter &paint, int x0, sv_frame_t f0, sv_frame_t f1) override;
131 140
132 Selection getSelectionAt(int x, bool &closeToLeft, bool &closeToRight) const; 141 Selection getSelectionAt(int x, bool &closeToLeft, bool &closeToRight) const;
133 142
134 bool editSelectionStart(QMouseEvent *e); 143 bool editSelectionStart(QMouseEvent *e);
135 bool editSelectionDrag(QMouseEvent *e); 144 bool editSelectionDrag(QMouseEvent *e);