Mercurial > hg > svapp
comparison framework/MainWindowBase.h @ 634:163573a73ebe fix-static-analysis
Use override throughout
author | Chris Cannam |
---|---|
date | Mon, 26 Nov 2018 13:53:26 +0000 |
parents | 15a566f26114 |
children | 4f53620962d9 |
comparison
equal
deleted
inserted
replaced
633:4612d44ae753 | 634:163573a73ebe |
---|---|
134 | 134 |
135 virtual bool saveSessionFile(QString path); | 135 virtual bool saveSessionFile(QString path); |
136 virtual bool saveSessionTemplate(QString path); | 136 virtual bool saveSessionTemplate(QString path); |
137 | 137 |
138 /// Implementation of FrameTimer interface method | 138 /// Implementation of FrameTimer interface method |
139 virtual sv_frame_t getFrame() const; | 139 sv_frame_t getFrame() const override; |
140 | 140 |
141 void setDefaultFfwdRwdStep(RealTime step) { | 141 void setDefaultFfwdRwdStep(RealTime step) { |
142 m_defaultFfwdRwdStep = step; | 142 m_defaultFfwdRwdStep = step; |
143 } | 143 } |
144 | 144 |
355 | 355 |
356 class OSCQueueStarter : public QThread | 356 class OSCQueueStarter : public QThread |
357 { | 357 { |
358 public: | 358 public: |
359 OSCQueueStarter(MainWindowBase *mwb) : QThread(mwb), m_mwb(mwb) { } | 359 OSCQueueStarter(MainWindowBase *mwb) : QThread(mwb), m_mwb(mwb) { } |
360 virtual void run() { | 360 void run() override { |
361 OSCQueue *queue = new OSCQueue(); // can take a long time | 361 OSCQueue *queue = new OSCQueue(); // can take a long time |
362 m_mwb->m_oscQueue = queue; | 362 m_mwb->m_oscQueue = queue; |
363 } | 363 } |
364 private: | 364 private: |
365 MainWindowBase *m_mwb; | 365 MainWindowBase *m_mwb; |
419 | 419 |
420 class PaneCallback : public SVFileReaderPaneCallback | 420 class PaneCallback : public SVFileReaderPaneCallback |
421 { | 421 { |
422 public: | 422 public: |
423 PaneCallback(MainWindowBase *mw) : m_mw(mw) { } | 423 PaneCallback(MainWindowBase *mw) : m_mw(mw) { } |
424 virtual Pane *addPane() { return m_mw->addPaneToStack(); } | 424 Pane *addPane() override { return m_mw->addPaneToStack(); } |
425 virtual void setWindowSize(int width, int height) { | 425 void setWindowSize(int width, int height) override { |
426 m_mw->resizeConstrained(QSize(width, height)); | 426 m_mw->resizeConstrained(QSize(width, height)); |
427 } | 427 } |
428 virtual void addSelection(sv_frame_t start, sv_frame_t end) { | 428 void addSelection(sv_frame_t start, sv_frame_t end) override { |
429 m_mw->m_viewManager->addSelectionQuietly(Selection(start, end)); | 429 m_mw->m_viewManager->addSelectionQuietly(Selection(start, end)); |
430 } | 430 } |
431 protected: | 431 protected: |
432 MainWindowBase *m_mw; | 432 MainWindowBase *m_mw; |
433 }; | 433 }; |
436 { | 436 { |
437 public: | 437 public: |
438 AddPaneCommand(MainWindowBase *mw); | 438 AddPaneCommand(MainWindowBase *mw); |
439 virtual ~AddPaneCommand(); | 439 virtual ~AddPaneCommand(); |
440 | 440 |
441 virtual void execute(); | 441 void execute() override; |
442 virtual void unexecute(); | 442 void unexecute() override; |
443 virtual QString getName() const; | 443 QString getName() const override; |
444 | 444 |
445 Pane *getPane() { return m_pane; } | 445 Pane *getPane() { return m_pane; } |
446 | 446 |
447 protected: | 447 protected: |
448 MainWindowBase *m_mw; | 448 MainWindowBase *m_mw; |
455 { | 455 { |
456 public: | 456 public: |
457 RemovePaneCommand(MainWindowBase *mw, Pane *pane); | 457 RemovePaneCommand(MainWindowBase *mw, Pane *pane); |
458 virtual ~RemovePaneCommand(); | 458 virtual ~RemovePaneCommand(); |
459 | 459 |
460 virtual void execute(); | 460 void execute() override; |
461 virtual void unexecute(); | 461 void unexecute() override; |
462 virtual QString getName() const; | 462 QString getName() const override; |
463 | 463 |
464 protected: | 464 protected: |
465 MainWindowBase *m_mw; | 465 MainWindowBase *m_mw; |
466 Pane *m_pane; // Main window owns this, but I determine its lifespan | 466 Pane *m_pane; // Main window owns this, but I determine its lifespan |
467 Pane *m_prevCurrentPane; // I don't own this | 467 Pane *m_prevCurrentPane; // I don't own this |