comparison framework/MainWindowBase.h @ 113:0c1ea5ff6518

* Speed up spectrogram painting by releasing mutex in FFTDataServer while calculating data prior to writing it, and by adding whole-column value query methods to FFT objects * Add paint cache to Thumbwheel -- repaints of this widget were slowing down the whole spectrogram repaint * More uses of MutexLocker (named and with debug) and more profile points * Make startup much quicker some of the time, with OSC server in place
author Chris Cannam
date Thu, 08 May 2008 14:46:22 +0000
parents 2dd30a7cd21a
children 74dd55646f52
comparison
equal deleted inserted replaced
112:e54dff673096 113:0c1ea5ff6518
19 #include <QFrame> 19 #include <QFrame>
20 #include <QString> 20 #include <QString>
21 #include <QUrl> 21 #include <QUrl>
22 #include <QMainWindow> 22 #include <QMainWindow>
23 #include <QPointer> 23 #include <QPointer>
24 #include <QThread>
24 25
25 #include "base/Command.h" 26 #include "base/Command.h"
26 #include "view/ViewManager.h" 27 #include "view/ViewManager.h"
27 #include "base/PropertyContainer.h" 28 #include "base/PropertyContainer.h"
28 #include "base/RecentFiles.h" 29 #include "base/RecentFiles.h"
29 #include "layer/LayerFactory.h" 30 #include "layer/LayerFactory.h"
30 #include "transform/Transform.h" 31 #include "transform/Transform.h"
31 #include "SVFileReader.h" 32 #include "SVFileReader.h"
32 #include "widgets/FileFinder.h" 33 #include "widgets/FileFinder.h"
33 #include "data/fileio/FileSource.h" 34 #include "data/fileio/FileSource.h"
35 #include "data/osc/OSCQueue.h"
34 #include <map> 36 #include <map>
35 37
36 class Document; 38 class Document;
37 class PaneStack; 39 class PaneStack;
38 class Pane; 40 class Pane;
50 class QLabel; 52 class QLabel;
51 class QCheckBox; 53 class QCheckBox;
52 class PreferencesDialog; 54 class PreferencesDialog;
53 class QTreeView; 55 class QTreeView;
54 class QPushButton; 56 class QPushButton;
55 class OSCQueue;
56 class OSCMessage; 57 class OSCMessage;
57 class KeyReference; 58 class KeyReference;
58 class Labeller; 59 class Labeller;
59 60
60 /** 61 /**
236 virtual void paneAboutToBeDeleted(Pane *) = 0; 237 virtual void paneAboutToBeDeleted(Pane *) = 0;
237 virtual void paneDropAccepted(Pane *, QStringList) = 0; 238 virtual void paneDropAccepted(Pane *, QStringList) = 0;
238 virtual void paneDropAccepted(Pane *, QString) = 0; 239 virtual void paneDropAccepted(Pane *, QString) = 0;
239 virtual void paneDeleteButtonClicked(Pane *); 240 virtual void paneDeleteButtonClicked(Pane *);
240 241
242 virtual void oscReady();
241 virtual void pollOSC(); 243 virtual void pollOSC();
242 virtual void handleOSCMessage(const OSCMessage &) = 0; 244 virtual void handleOSCMessage(const OSCMessage &) = 0;
243 245
244 virtual void contextHelpChanged(const QString &); 246 virtual void contextHelpChanged(const QString &);
245 virtual void inProgressSelectionChanged(); 247 virtual void inProgressSelectionChanged();
258 260
259 bool m_audioOutput; 261 bool m_audioOutput;
260 AudioCallbackPlaySource *m_playSource; 262 AudioCallbackPlaySource *m_playSource;
261 AudioCallbackPlayTarget *m_playTarget; 263 AudioCallbackPlayTarget *m_playTarget;
262 264
265 class OSCQueueStarter : public QThread
266 {
267 public:
268 OSCQueueStarter(MainWindowBase *mwb) : QThread(mwb), m_mwb(mwb) { }
269 virtual void run() {
270 OSCQueue *queue = new OSCQueue(); // can take a long time
271 m_mwb->m_oscQueue = queue;
272 }
273 private:
274 MainWindowBase *m_mwb;
275 };
276
263 OSCQueue *m_oscQueue; 277 OSCQueue *m_oscQueue;
278 OSCQueueStarter *m_oscQueueStarter;
264 279
265 RecentFiles m_recentFiles; 280 RecentFiles m_recentFiles;
266 RecentFiles m_recentTransforms; 281 RecentFiles m_recentTransforms;
267 282
268 bool m_documentModified; 283 bool m_documentModified;