Mercurial > hg > svapp
comparison framework/MainWindowBase.h @ 595:b23bebfdfaba
Untabify
author | Chris Cannam |
---|---|
date | Thu, 01 Mar 2018 18:02:22 +0000 |
parents | 702272b78bbe |
children | f03bc1d38cac |
comparison
equal
deleted
inserted
replaced
594:72b4870f0e6b | 595:b23bebfdfaba |
---|---|
409 void removeLayerEditDialog(Layer *); | 409 void removeLayerEditDialog(Layer *); |
410 | 410 |
411 class PaneCallback : public SVFileReaderPaneCallback | 411 class PaneCallback : public SVFileReaderPaneCallback |
412 { | 412 { |
413 public: | 413 public: |
414 PaneCallback(MainWindowBase *mw) : m_mw(mw) { } | 414 PaneCallback(MainWindowBase *mw) : m_mw(mw) { } |
415 virtual Pane *addPane() { return m_mw->addPaneToStack(); } | 415 virtual Pane *addPane() { return m_mw->addPaneToStack(); } |
416 virtual void setWindowSize(int width, int height) { | 416 virtual void setWindowSize(int width, int height) { |
417 m_mw->resizeConstrained(QSize(width, height)); | 417 m_mw->resizeConstrained(QSize(width, height)); |
418 } | 418 } |
419 virtual void addSelection(sv_frame_t start, sv_frame_t end) { | 419 virtual void addSelection(sv_frame_t start, sv_frame_t end) { |
420 m_mw->m_viewManager->addSelectionQuietly(Selection(start, end)); | 420 m_mw->m_viewManager->addSelectionQuietly(Selection(start, end)); |
421 } | 421 } |
422 protected: | 422 protected: |
423 MainWindowBase *m_mw; | 423 MainWindowBase *m_mw; |
424 }; | 424 }; |
425 | 425 |
426 class AddPaneCommand : public Command | 426 class AddPaneCommand : public Command |
427 { | 427 { |
428 public: | 428 public: |
429 AddPaneCommand(MainWindowBase *mw); | 429 AddPaneCommand(MainWindowBase *mw); |
430 virtual ~AddPaneCommand(); | 430 virtual ~AddPaneCommand(); |
431 | 431 |
432 virtual void execute(); | 432 virtual void execute(); |
433 virtual void unexecute(); | 433 virtual void unexecute(); |
434 virtual QString getName() const; | 434 virtual QString getName() const; |
435 | 435 |
436 Pane *getPane() { return m_pane; } | 436 Pane *getPane() { return m_pane; } |
437 | 437 |
438 protected: | 438 protected: |
439 MainWindowBase *m_mw; | 439 MainWindowBase *m_mw; |
440 Pane *m_pane; // Main window owns this, but I determine its lifespan | 440 Pane *m_pane; // Main window owns this, but I determine its lifespan |
441 Pane *m_prevCurrentPane; // I don't own this | 441 Pane *m_prevCurrentPane; // I don't own this |
442 bool m_added; | 442 bool m_added; |
443 }; | 443 }; |
444 | 444 |
445 class RemovePaneCommand : public Command | 445 class RemovePaneCommand : public Command |
446 { | 446 { |
447 public: | 447 public: |
448 RemovePaneCommand(MainWindowBase *mw, Pane *pane); | 448 RemovePaneCommand(MainWindowBase *mw, Pane *pane); |
449 virtual ~RemovePaneCommand(); | 449 virtual ~RemovePaneCommand(); |
450 | 450 |
451 virtual void execute(); | 451 virtual void execute(); |
452 virtual void unexecute(); | 452 virtual void unexecute(); |
453 virtual QString getName() const; | 453 virtual QString getName() const; |
454 | 454 |
455 protected: | 455 protected: |
456 MainWindowBase *m_mw; | 456 MainWindowBase *m_mw; |
457 Pane *m_pane; // Main window owns this, but I determine its lifespan | 457 Pane *m_pane; // Main window owns this, but I determine its lifespan |
458 Pane *m_prevCurrentPane; // I don't own this | 458 Pane *m_prevCurrentPane; // I don't own this |
459 bool m_added; | 459 bool m_added; |
460 }; | 460 }; |
461 | 461 |
462 virtual bool checkSaveModified() = 0; | 462 virtual bool checkSaveModified() = 0; |
463 | 463 |
464 virtual QString getOpenFileName(FileFinder::FileType type); | 464 virtual QString getOpenFileName(FileFinder::FileType type); |