Mercurial > hg > svgui
comparison layer/Layer.cpp @ 131:eaae73b6bd28
* Suspend/resume fft data server write activity while reading from a server
to repaint the spectrogram display. Makes a significant improvement to
the otherwise dreadful responsiveness of spectrogram display.
author | Chris Cannam |
---|---|
date | Thu, 03 Aug 2006 12:42:15 +0000 |
parents | 33929e0c3c6b |
children | 42118892f428 |
comparison
equal
deleted
inserted
replaced
130:10eec0da9efe | 131:eaae73b6bd28 |
---|---|
17 #include "view/View.h" | 17 #include "view/View.h" |
18 #include "data/model/Model.h" | 18 #include "data/model/Model.h" |
19 | 19 |
20 #include <iostream> | 20 #include <iostream> |
21 | 21 |
22 #include "LayerFactory.h" //!!! shouldn't be including this here -- does that suggest we need to move this into layer/ ? | 22 #include <QMutexLocker> |
23 | |
24 #include "LayerFactory.h" | |
23 #include "base/PlayParameterRepository.h" | 25 #include "base/PlayParameterRepository.h" |
24 | 26 |
25 Layer::Layer() | 27 Layer::Layer() |
26 { | 28 { |
27 } | 29 } |
90 } | 92 } |
91 return 0; | 93 return 0; |
92 } | 94 } |
93 | 95 |
94 void | 96 void |
97 Layer::setLayerDormant(const View *v, bool dormant) | |
98 { | |
99 const void *vv = (const void *)v; | |
100 QMutexLocker locker(&m_dormancyMutex); | |
101 m_dormancy[vv] = dormant; | |
102 } | |
103 | |
104 bool | |
105 Layer::isLayerDormant(const View *v) const | |
106 { | |
107 const void *vv = (const void *)v; | |
108 QMutexLocker locker(&m_dormancyMutex); | |
109 if (m_dormancy.find(vv) == m_dormancy.end()) return false; | |
110 return m_dormancy.find(vv)->second; | |
111 } | |
112 | |
113 void | |
95 Layer::showLayer(View *view, bool show) | 114 Layer::showLayer(View *view, bool show) |
96 { | 115 { |
97 setLayerDormant(view, !show); | 116 setLayerDormant(view, !show); |
98 emit layerParametersChanged(); | 117 emit layerParametersChanged(); |
99 } | 118 } |