comparison base/View.h @ 9:73d85d19919f

* Add play-selection and looping modes. Looping seems to work OK, but the plain play-selection is miscalculating current frame number to feed back to the GUI. * Cache selection rectanges wherever possible in View::paintEvent.
author Chris Cannam
date Tue, 24 Jan 2006 16:20:58 +0000
parents 214054a0d8b8
children ec6886f0e673
comparison
equal deleted inserted replaced
8:214054a0d8b8 9:73d85d19919f
183 virtual void viewManagerPlaybackFrameChanged(unsigned long); 183 virtual void viewManagerPlaybackFrameChanged(unsigned long);
184 virtual void viewManagerZoomLevelChanged(void *, unsigned long, bool); 184 virtual void viewManagerZoomLevelChanged(void *, unsigned long, bool);
185 185
186 virtual void propertyContainerSelected(PropertyContainer *pc); 186 virtual void propertyContainerSelected(PropertyContainer *pc);
187 187
188 virtual void selectionChanged();
188 virtual void toolModeChanged(); 189 virtual void toolModeChanged();
189 190
190 protected: 191 protected:
191 View(QWidget *, bool showProgress); 192 View(QWidget *, bool showProgress);
192 virtual void paintEvent(QPaintEvent *e); 193 virtual void paintEvent(QPaintEvent *e);
194 virtual void drawSelections(QPainter &);
193 195
194 typedef std::vector<Layer *> LayerList; 196 typedef std::vector<Layer *> LayerList;
195 197
196 size_t getModelsStartFrame() const; 198 size_t getModelsStartFrame() const;
197 size_t getModelsEndFrame() const; 199 size_t getModelsEndFrame() const;
218 bool m_showProgress; 220 bool m_showProgress;
219 221
220 QPixmap *m_cache; 222 QPixmap *m_cache;
221 size_t m_cacheCentreFrame; 223 size_t m_cacheCentreFrame;
222 int m_cacheZoomLevel; 224 int m_cacheZoomLevel;
225 bool m_selectionCached;
223 226
224 bool m_deleting; 227 bool m_deleting;
225 228
226 LayerList m_layers; // I don't own these, but see dtor note above 229 LayerList m_layers; // I don't own these, but see dtor note above
227 bool m_haveSelectedLayer; 230 bool m_haveSelectedLayer;