Mercurial > hg > svgui
comparison view/View.h @ 952:b1aa74ce697e osx-retina
Always render to a buffer, then from that to the widget
author | Chris Cannam |
---|---|
date | Mon, 27 Apr 2015 11:38:01 +0100 |
parents | a5488775f880 |
children | 092de22db207 |
comparison
equal
deleted
inserted
replaced
951:53e039d99b5d | 952:b1aa74ce697e |
---|---|
387 virtual void paintEvent(QPaintEvent *e); | 387 virtual void paintEvent(QPaintEvent *e); |
388 virtual void drawSelections(QPainter &); | 388 virtual void drawSelections(QPainter &); |
389 virtual bool shouldLabelSelections() const { return true; } | 389 virtual bool shouldLabelSelections() const { return true; } |
390 virtual bool render(QPainter &paint, int x0, sv_frame_t f0, sv_frame_t f1); | 390 virtual bool render(QPainter &paint, int x0, sv_frame_t f0, sv_frame_t f1); |
391 virtual void setPaintFont(QPainter &paint); | 391 virtual void setPaintFont(QPainter &paint); |
392 | |
393 QSize scaledSize(const QSize &s, int factor) { | |
394 return QSize(s.width() * factor, s.height() * factor); | |
395 } | |
396 QRect scaledRect(const QRect &r, int factor) { | |
397 return QRect(r.x() * factor, r.y() * factor, | |
398 r.width() * factor, r.height() * factor); | |
399 } | |
392 | 400 |
393 typedef std::vector<Layer *> LayerList; | 401 typedef std::vector<Layer *> LayerList; |
394 | 402 |
395 sv_samplerate_t getModelsSampleRate() const; | 403 sv_samplerate_t getModelsSampleRate() const; |
396 bool areLayersScrollable() const; | 404 bool areLayersScrollable() const; |
427 sv_frame_t m_playPointerFrame; | 435 sv_frame_t m_playPointerFrame; |
428 bool m_lightBackground; | 436 bool m_lightBackground; |
429 bool m_showProgress; | 437 bool m_showProgress; |
430 | 438 |
431 QPixmap *m_cache; | 439 QPixmap *m_cache; |
440 QPixmap *m_buffer; | |
432 sv_frame_t m_cacheCentreFrame; | 441 sv_frame_t m_cacheCentreFrame; |
433 int m_cacheZoomLevel; | 442 int m_cacheZoomLevel; |
434 bool m_selectionCached; | 443 bool m_selectionCached; |
435 | 444 |
436 bool m_deleting; | 445 bool m_deleting; |