comparison main/MainWindow.h @ 2300:eb7f4579e5cc by-id

Updates throughout for ModelById logic
author Chris Cannam
date Thu, 04 Jul 2019 14:32:08 +0100
parents b0e8217719ed
children 6df78d2b1b5e
comparison
equal deleted inserted replaced
2299:bb0f5a8f93fe 2300:eb7f4579e5cc
11 published by the Free Software Foundation; either version 2 of the 11 published by the Free Software Foundation; either version 2 of the
12 License, or (at your option) any later version. See the file 12 License, or (at your option) any later version. See the file
13 COPYING included with this distribution for more information. 13 COPYING included with this distribution for more information.
14 */ 14 */
15 15
16 #ifndef _MAIN_WINDOW_H_ 16 #ifndef SV_MAIN_WINDOW_H
17 #define _MAIN_WINDOW_H_ 17 #define SV_MAIN_WINDOW_H
18 18
19 #include "framework/MainWindowBase.h" 19 #include "framework/MainWindowBase.h"
20 20
21 class VersionTester; 21 class VersionTester;
22 class Surveyer; 22 class Surveyer;
135 void monitoringLevelsChanged(float, float) override; 135 void monitoringLevelsChanged(float, float) override;
136 136
137 void layerRemoved(Layer *) override; 137 void layerRemoved(Layer *) override;
138 void layerInAView(Layer *, bool) override; 138 void layerInAView(Layer *, bool) override;
139 139
140 void mainModelChanged(WaveFileModel *) override; 140 void mainModelChanged(ModelId) override;
141 virtual void mainModelGainChanged(float); 141 virtual void mainModelGainChanged(float);
142 virtual void mainModelPanChanged(float); 142 virtual void mainModelPanChanged(float);
143 void modelAdded(Model *) override; 143 void modelAdded(ModelId) override;
144 void modelAboutToBeDeleted(Model *) override;
145 144
146 virtual void showLayerTree(); 145 virtual void showLayerTree();
147 virtual void showActivityLog(); 146 virtual void showActivityLog();
148 virtual void showUnitConverter(); 147 virtual void showUnitConverter();
149 148
235 QString m_newerVersionIs; 234 QString m_newerVersionIs;
236 235
237 struct LayerConfiguration { 236 struct LayerConfiguration {
238 LayerConfiguration(LayerFactory::LayerType _layer 237 LayerConfiguration(LayerFactory::LayerType _layer
239 = LayerFactory::TimeRuler, 238 = LayerFactory::TimeRuler,
240 Model *_source = 0, 239 ModelId _source = ModelId(),
241 int _channel = -1) : 240 int _channel = -1) :
242 layer(_layer), sourceModel(_source), channel(_channel) { } 241 layer(_layer), sourceModel(_source), channel(_channel) { }
243 LayerFactory::LayerType layer; 242 LayerFactory::LayerType layer;
244 Model *sourceModel; 243 ModelId sourceModel;
245 int channel; 244 int channel;
246 }; 245 };
247 246
248 QString shortcutFor(LayerFactory::LayerType, bool isPaneMenu); 247 QString shortcutFor(LayerFactory::LayerType, bool isPaneMenu);
249 void updateLayerShortcutsFor(Model *); 248 void updateLayerShortcutsFor(ModelId);
250 249
251 // Map from menu action to the resulting layer configurations 250 // Map from menu action to the resulting layer configurations
252 // etc. These all used to be std::maps, but we sometimes want to 251 // etc. These all used to be std::maps, but we sometimes want to
253 // iterate through actions in order of creation, not in order of 252 // iterate through actions in order of creation, not in order of
254 // arbitrary QAction pointer. And speed of random lookup is not 253 // arbitrary QAction pointer. And speed of random lookup is not