Mercurial > hg > sonic-visualiser
comparison main/MainWindow.h @ 232:99e0dfd3ea75
* Various fixes to object lifetime management, particularly in the spectrum
layer and for notification of main model deletion.
The main purpose of this is to improve the behaviour of the spectrum, but I
think it may also help with #1840922 Various crashes in Layer Summary window.
author | Chris Cannam |
---|---|
date | Wed, 23 Jan 2008 15:43:27 +0000 |
parents | 718aaac046e7 |
children | 5544593dd850 |
comparison
equal
deleted
inserted
replaced
231:e8a7a935128e | 232:99e0dfd3ea75 |
---|---|
200 QPointer<PreferencesDialog> m_preferencesDialog; | 200 QPointer<PreferencesDialog> m_preferencesDialog; |
201 QPointer<LayerTreeDialog> m_layerTreeDialog; | 201 QPointer<LayerTreeDialog> m_layerTreeDialog; |
202 | 202 |
203 KeyReference *m_keyReference; | 203 KeyReference *m_keyReference; |
204 | 204 |
205 struct PaneConfiguration { | 205 struct LayerConfiguration { |
206 PaneConfiguration(LayerFactory::LayerType _layer | 206 LayerConfiguration(LayerFactory::LayerType _layer |
207 = LayerFactory::TimeRuler, | 207 = LayerFactory::TimeRuler, |
208 Model *_source = 0, | 208 Model *_source = 0, |
209 int _channel = -1) : | 209 int _channel = -1) : |
210 layer(_layer), sourceModel(_source), channel(_channel) { } | 210 layer(_layer), sourceModel(_source), channel(_channel) { } |
211 LayerFactory::LayerType layer; | 211 LayerFactory::LayerType layer; |
212 Model *sourceModel; | 212 Model *sourceModel; |
213 int channel; | 213 int channel; |
214 }; | 214 }; |
215 | 215 |
216 typedef std::map<QAction *, PaneConfiguration> PaneActionMap; | 216 typedef std::map<QAction *, LayerConfiguration> PaneActionMap; |
217 PaneActionMap m_paneActions; | 217 PaneActionMap m_paneActions; |
218 | |
219 typedef std::map<QAction *, LayerConfiguration> LayerActionMap; | |
220 LayerActionMap m_layerActions; | |
218 | 221 |
219 typedef std::map<QAction *, TransformId> TransformActionMap; | 222 typedef std::map<QAction *, TransformId> TransformActionMap; |
220 TransformActionMap m_transformActions; | 223 TransformActionMap m_transformActions; |
221 | 224 |
222 typedef std::map<TransformId, QAction *> TransformActionReverseMap; | 225 typedef std::map<TransformId, QAction *> TransformActionReverseMap; |
223 TransformActionReverseMap m_transformActionsReverse; | 226 TransformActionReverseMap m_transformActionsReverse; |
224 | |
225 typedef std::map<QAction *, LayerFactory::LayerType> LayerActionMap; | |
226 LayerActionMap m_layerActions; | |
227 | 227 |
228 typedef std::map<QAction *, Layer *> ExistingLayerActionMap; | 228 typedef std::map<QAction *, Layer *> ExistingLayerActionMap; |
229 ExistingLayerActionMap m_existingLayerActions; | 229 ExistingLayerActionMap m_existingLayerActions; |
230 ExistingLayerActionMap m_sliceActions; | 230 ExistingLayerActionMap m_sliceActions; |
231 | 231 |
243 virtual void setupTransformsMenu(); | 243 virtual void setupTransformsMenu(); |
244 virtual void setupHelpMenu(); | 244 virtual void setupHelpMenu(); |
245 virtual void setupExistingLayersMenus(); | 245 virtual void setupExistingLayersMenus(); |
246 virtual void setupToolbars(); | 246 virtual void setupToolbars(); |
247 | 247 |
248 virtual void addPane(const PaneConfiguration &configuration, QString text); | 248 virtual void addPane(const LayerConfiguration &configuration, QString text); |
249 | 249 |
250 virtual void closeEvent(QCloseEvent *e); | 250 virtual void closeEvent(QCloseEvent *e); |
251 virtual bool checkSaveModified(); | 251 virtual bool checkSaveModified(); |
252 | 252 |
253 virtual void updateVisibleRangeDisplay(Pane *p) const; | 253 virtual void updateVisibleRangeDisplay(Pane *p) const; |