Mercurial > hg > svgui
comparison layer/LayerGeometryProvider.h @ 1090:c8c747783110 spectrogram-minor-refactor
Cut over to using the renderer (though it's very incomplete) and fix some cache problems and pointer lifetime misunderstandings
| author | Chris Cannam |
|---|---|
| date | Tue, 05 Jul 2016 17:48:26 +0100 |
| parents | 179ea8a2f650 |
| children | 57d192e26331 |
comparison
equal
deleted
inserted
replaced
| 1089:c8683d94442a | 1090:c8c747783110 |
|---|---|
| 23 | 23 |
| 24 class ViewManager; | 24 class ViewManager; |
| 25 class View; | 25 class View; |
| 26 class Layer; | 26 class Layer; |
| 27 | 27 |
| 28 /** | |
| 29 * Interface for classes that provide geometry information (such as | |
| 30 * size, start frame, and a large number of other properties) about | |
| 31 * the disposition of a layer. The main implementor of this interface | |
| 32 * is the View class, but other implementations may be used in | |
| 33 * different circumstances, e.g. as a proxy to handle hi-dpi | |
| 34 * coordinate mapping. | |
| 35 * | |
| 36 * Note it is expected that some implementations of this may be | |
| 37 * disposable, created on-the-fly for a single use. Code that receives | |
| 38 * a LayerGeometryProvider pointer as an argument to something should | |
| 39 * not, in general, store that pointer as it may be invalidated before | |
| 40 * the next use. Use getId() to instead obtain a persistent identifier | |
| 41 * for a LayerGeometryProvider, for example to establish whether the | |
| 42 * same one is being provided in two separate calls. | |
| 43 */ | |
| 28 class LayerGeometryProvider | 44 class LayerGeometryProvider |
| 29 { | 45 { |
| 30 protected: | 46 protected: |
| 31 static int getNextId() { | 47 static int getNextId() { |
| 32 static QMutex idMutex; | 48 static QMutex idMutex; |
