SongEditor: Use Editor superclass

This commit is contained in:
Lukas W
2014-12-07 17:37:22 +01:00
parent 02006f9855
commit 3e9cc61042
6 changed files with 184 additions and 181 deletions

View File

@@ -45,7 +45,7 @@ class Mixer;
class PianoRoll;
class ProjectNotes;
class Song;
class SongEditor;
class SongEditorWindow;
class Ladspa2LMMS;
class ControllerRackView;
@@ -108,7 +108,7 @@ public:
return s_fxMixerView;
}
static SongEditor* songEditor()
static SongEditorWindow* songEditor()
{
return s_songEditor;
}
@@ -187,7 +187,7 @@ private:
// GUI
static MainWindow * s_mainWindow;
static FxMixerView * s_fxMixerView;
static SongEditor* s_songEditor;
static SongEditorWindow* s_songEditor;
static AutomationEditorWindow * s_automationEditor;
static BBEditor * s_bbEditor;
static PianoRoll* s_pianoRoll;

View File

@@ -27,6 +27,7 @@
#ifndef SONG_EDITOR_H
#define SONG_EDITOR_H
#include "Editor.h"
#include "TrackContainerView.h"
class QLabel;
@@ -34,6 +35,7 @@ class QScrollBar;
class AutomatableSlider;
class ComboBox;
class ComboBoxModel;
class LcdSpinBox;
class MeterDialog;
class Song;
@@ -56,6 +58,12 @@ class SongEditor : public TrackContainerView
{
Q_OBJECT
public:
enum Mode
{
DrawMode,
EditMode
};
SongEditor( Song * _song );
virtual ~SongEditor();
@@ -65,6 +73,10 @@ public:
public slots:
void scrolled( int _new_pos );
void setMode(Mode mode);
void setModeDraw();
void setModeEdit();
private slots:
void setHighQuality( bool );
@@ -119,6 +131,28 @@ private:
TextFloat * m_mvsStatus;
TextFloat * m_mpsStatus;
positionLine * m_positionLine;
ComboBoxModel* m_zoomingModel;
bool m_scrollBack;
bool m_smoothScroll;
Mode m_mode;
friend class SongEditorWindow;
} ;
class SongEditorWindow : public Editor
{
Q_OBJECT
public:
SongEditorWindow(Song* song);
SongEditor* m_editor;
private:
ToolButton * m_addBBTrackButton;
ToolButton * m_addSampleTrackButton;
ToolButton * m_addAutomationTrackButton;
@@ -127,14 +161,6 @@ private:
ToolButton * m_editModeButton;
ComboBox * m_zoomingComboBox;
positionLine * m_positionLine;
bool m_scrollBack;
bool m_smoothScroll;
} ;
};
#endif