Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
44b52eb
Add Editor superclass
lukas-w Dec 7, 2014
c6ee614
Clean up ToolButton class
lukas-w Dec 7, 2014
02006f9
Use Editor superclass in AutomationEditor
lukas-w Dec 7, 2014
3e9cc61
SongEditor: Use Editor superclass
lukas-w Dec 7, 2014
86f2c86
Move play, record and stop signals to superclass
lukas-w Dec 7, 2014
d8db894
Editor: Don't delete on close
lukas-w Dec 8, 2014
ec9158c
PianoRoll: Use Editor superclass
lukas-w Dec 8, 2014
e9d841d
Migrate Timeline::addToolButtons to QToolBar
lukas-w Dec 8, 2014
4b27569
ToolBar css fixes
lukas-w Dec 8, 2014
d029c85
BBEditor: Use Editor superclass
lukas-w Dec 8, 2014
11898a5
Move Timeline.cpp to gui directory
lukas-w Dec 8, 2014
7a21d69
SongEditor: Some renames
lukas-w Dec 8, 2014
f131fbd
Editors: Add to workspace in MainWindow class, not in themselves
lukas-w Dec 8, 2014
32da8cb
Editor: Don't use ToolButton
lukas-w Dec 8, 2014
968e581
Editors: Don't use ToolButton
lukas-w Dec 8, 2014
b661e08
PianoRoll: Slot renames
lukas-w Dec 8, 2014
47cbc9e
AutomationEditor + PianoRoll: Move Copy/Paste shortcuts
lukas-w Dec 8, 2014
409e8f2
AutomationEditor style updates
lukas-w Dec 8, 2014
51f5929
Rename Timeline to TimeLineWidget
lukas-w Dec 8, 2014
b25765d
Move Editors to src/gui/editors subdirectory
lukas-w Dec 8, 2014
7c508f7
Merge master into ed_refac
lukas-w Dec 8, 2014
1d07a91
PianoRoll: Coding style updates
lukas-w Dec 11, 2014
ebbec2f
Editor: Add edit mode support
lukas-w Dec 11, 2014
9b6612c
PianoRoll rename fix
lukas-w Dec 11, 2014
02869b1
Editors: Some cleanups
lukas-w Dec 11, 2014
7877888
Introduce ActionGroup subclass
lukas-w Dec 11, 2014
11cb8b5
Automation Editor tension fix
lukas-w Dec 12, 2014
657fb06
More Automation refactoring
lukas-w Dec 17, 2014
eb79701
Merge branch 'master' into ed_refac
lukas-w Dec 17, 2014
1ee9340
Move Engine' GUI code to new GuiApplication class
lukas-w Dec 17, 2014
0df3998
Move some gui initialization to GuiApplication's constructor
lukas-w Jan 6, 2015
834be94
Merge commit 'f7741f184f83e6b9e2f081d39efffb2c499962f6' into ed_refac
lukas-w Jan 6, 2015
1706279
Merge commit '25ab7260f5cc57075360c976826e13434ade058c' into ed_refac
lukas-w Jan 6, 2015
0680669
Merge commit 'b5538c7da818cbcdde5ff1c885ce4eee5b626f3b' into ed_refac
lukas-w Jan 6, 2015
23e0e0f
Merge branch 'master' into ed_refac
lukas-w Jan 6, 2015
0c4833c
Adjust automation editor flip implementation
lukas-w Jan 6, 2015
748cccd
Merge branch 'gui_application' into ed_refac
lukas-w Jan 6, 2015
e0dbfa6
Remove Engine's has_gui option
lukas-w Jan 6, 2015
7f2f9f2
Merge branch 'master' into ed_refac
lukas-w Jan 8, 2015
23dbe95
Stop on second space key press
lukas-w Jan 11, 2015
56055b3
Merge branch 'master' into ed_refac
lukas-w Jan 11, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Editor: Don't use ToolButton
  • Loading branch information
lukas-w committed Dec 8, 2014
commit 32da8cb677388a9e2d27f94315505049b7e900dc
8 changes: 4 additions & 4 deletions include/Editor.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ protected slots:

QToolBar* m_toolBar;

QAbstractButton* m_playButton;
QAbstractButton* m_recordButton;
QAbstractButton* m_recordAccompanyButton;
QAbstractButton* m_stopButton;
QAction* m_playAction;
QAction* m_recordAction;
QAction* m_recordAccompanyAction;
QAction* m_stopAction;
private:
};

Expand Down
8 changes: 4 additions & 4 deletions src/gui/AutomationEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2029,14 +2029,14 @@ AutomationEditorWindow::AutomationEditorWindow() :


// Play/stop buttons
m_playButton->setToolTip(tr( "Play/pause current pattern (Space)" ));
m_playButton->setWhatsThis(
m_playAction->setToolTip(tr( "Play/pause current pattern (Space)" ));
m_playAction->setWhatsThis(
tr( "Click here if you want to play the current pattern. "
"This is useful while editing it. The pattern is "
"automatically looped when the end is reached." ) );

m_stopButton->setToolTip(tr("Stop playing of current pattern (Space)"));
m_stopButton->setWhatsThis(
m_stopAction->setToolTip(tr("Stop playing of current pattern (Space)"));
m_stopAction->setWhatsThis(
tr( "Click here if you want to stop playing of the "
"current pattern." ) );

Expand Down
10 changes: 5 additions & 5 deletions src/gui/BBEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ BBEditor::BBEditor( BBTrackContainer* tc ) :
}


m_playButton->setToolTip(tr( "Play/pause current beat/bassline (Space)" ));
m_stopButton->setToolTip(tr( "Stop playback of current beat/bassline (Space)" ));
m_playAction->setToolTip(tr( "Play/pause current beat/bassline (Space)" ));
m_stopAction->setToolTip(tr( "Stop playback of current beat/bassline (Space)" ));

ToolButton * add_bb_track = new ToolButton(
embed::getIconPixmap( "add_bb_track" ),
Expand All @@ -90,11 +90,11 @@ BBEditor::BBEditor( BBTrackContainer* tc ) :
m_trackContainerView, SLOT( addSteps() ), m_toolBar );


m_playButton->setWhatsThis(
m_playAction->setWhatsThis(
tr( "Click here to play the current "
"beat/bassline. The beat/bassline is automatically "
"looped when its end is reached." ) );
m_stopButton->setWhatsThis(
m_stopAction->setWhatsThis(
tr( "Click here to stop playing of current "
"beat/bassline." ) );

Expand Down Expand Up @@ -136,7 +136,7 @@ BBEditor::~BBEditor()

QSize BBEditor::sizeHint() const
{
return {minimumWidth(), 300};
return {minimumWidth()+10, 300};
}


Expand Down
38 changes: 19 additions & 19 deletions src/gui/Editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ void Editor::setPauseIcon(bool displayPauseIcon)
{
// If we're playing, show a pause icon
if (displayPauseIcon)
m_playButton->setIcon(embed::getIconPixmap("pause"));
m_playAction->setIcon(embed::getIconPixmap("pause"));
else
m_playButton->setIcon(embed::getIconPixmap("play"));
m_playAction->setIcon(embed::getIconPixmap("play"));
}

void Editor::play()
Expand All @@ -59,45 +59,45 @@ void Editor::stop()

Editor::Editor(bool record) :
m_toolBar(new QToolBar(this)),
m_playButton(nullptr),
m_recordButton(nullptr),
m_recordAccompanyButton(nullptr),
m_stopButton(nullptr)
m_playAction(nullptr),
m_recordAction(nullptr),
m_recordAccompanyAction(nullptr),
m_stopAction(nullptr)
{
m_toolBar->setContextMenuPolicy(Qt::PreventContextMenu);
m_toolBar->setMovable(false);

auto addButton = [this](const char* pixmap_name, QString text, QString objectName) {
ToolButton* button = new ToolButton(embed::getIconPixmap(pixmap_name), text);
button->setObjectName(objectName);
m_toolBar->addWidget(button);
return button;
QAction* action = m_toolBar->addAction(embed::getIconPixmap(pixmap_name), text);
m_toolBar->widgetForAction(action)->setObjectName(objectName);
return action;
};

// Set up play button
m_playButton = addButton("play", tr("Play (Space)"), "playButton");
m_playButton->setShortcut(Qt::Key_Space);
m_playAction = addButton("play", tr("Play (Space)"), "playButton");
m_playAction->setShortcut(Qt::Key_Space);

// Set up record buttons if wanted
if (record)
{
m_recordButton = addButton("record", tr("Record"), "recordButton");
m_recordAccompanyButton = addButton("record_accompany", tr("Record while playing"), "recordAccompanyButton");
m_recordAction = addButton("record", tr("Record"), "recordButton");
m_recordAccompanyAction = addButton("record_accompany", tr("Record while playing"), "recordAccompanyButton");
}

// Set up stop button
m_stopButton = addButton("stop", tr("Stop (Space)"), "stopButton");
m_stopAction = addButton("stop", tr("Stop (Space)"), "stopButton");

// Add toolbar to window
addToolBar(Qt::TopToolBarArea, m_toolBar);

// Set up connections
connect(m_playButton, SIGNAL(clicked()), this, SLOT(play()));
connect(m_playAction, SIGNAL(triggered()), this, SLOT(play()));
if (record)
{
connect(m_recordButton, SIGNAL(clicked()), this, SLOT(record()));
connect(m_recordAccompanyButton, SIGNAL(clicked()), this, SLOT(recordAccompany()));
connect(m_recordAction, SIGNAL(triggered()), this, SLOT(record()));
connect(m_recordAccompanyAction, SIGNAL(triggered()), this, SLOT(recordAccompany()));
}
connect(m_stopButton, SIGNAL(clicked()), this, SLOT(stop()));
connect(m_stopAction, SIGNAL(triggered()), this, SLOT(stop()));
}

Editor::~Editor()
Expand Down
16 changes: 8 additions & 8 deletions src/gui/PianoRoll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3978,28 +3978,28 @@ PianoRollWindow::PianoRollWindow() :
{
setCentralWidget(m_editor);

m_playButton->setToolTip(tr("Play/pause current pattern (Space)"));
m_recordButton->setToolTip(tr("Record notes from MIDI-device/channel-piano"));
m_recordAccompanyButton->setToolTip(tr("Record notes from MIDI-device/channel-piano while playing song or BB track"));
m_stopButton->setToolTip(tr("Stop playing of current pattern (Space)"));
m_playAction->setToolTip(tr("Play/pause current pattern (Space)"));
m_recordAction->setToolTip(tr("Record notes from MIDI-device/channel-piano"));
m_recordAccompanyAction->setToolTip(tr("Record notes from MIDI-device/channel-piano while playing song or BB track"));
m_stopAction->setToolTip(tr("Stop playing of current pattern (Space)"));

m_playButton->setWhatsThis(
m_playAction->setWhatsThis(
tr( "Click here to play the current pattern. "
"This is useful while editing it. The pattern is "
"automatically looped when its end is reached." ) );
m_recordButton->setWhatsThis(
m_recordAction->setWhatsThis(
tr( "Click here to record notes from a MIDI-"
"device or the virtual test-piano of the according "
"channel-window to the current pattern. When recording "
"all notes you play will be written to this pattern "
"and you can play and edit them afterwards." ) );
m_recordAccompanyButton->setWhatsThis(
m_recordAccompanyAction->setWhatsThis(
tr( "Click here to record notes from a MIDI-"
"device or the virtual test-piano of the according "
"channel-window to the current pattern. When recording "
"all notes you play will be written to this pattern "
"and you will hear the song or BB track in the background." ) );
m_stopButton->setWhatsThis(
m_stopAction->setWhatsThis(
tr( "Click here to stop playback of current pattern." ) );

// init edit-buttons at the top
Expand Down
14 changes: 7 additions & 7 deletions src/gui/SongEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -611,13 +611,13 @@ SongEditorWindow::SongEditorWindow(Song* song) :
setCentralWidget(m_editor);

// Set up buttons
m_playButton->setToolTip(tr("Play song (Space)"));
if (m_recordButton && m_recordAccompanyButton)
m_playAction->setToolTip(tr("Play song (Space)"));
if (m_recordAction && m_recordAccompanyAction)
{
m_recordButton->setToolTip(tr("Record samples from Audio-device"));
m_recordAccompanyButton->setToolTip(tr( "Record samples from Audio-device while playing song or BB track"));
m_recordAction->setToolTip(tr("Record samples from Audio-device"));
m_recordAccompanyAction->setToolTip(tr( "Record samples from Audio-device while playing song or BB track"));
}
m_stopButton->setToolTip(tr( "Stop song (Space)" ));
m_stopAction->setToolTip(tr( "Stop song (Space)" ));

m_addBBTrackButton = new ToolButton(
embed::getIconPixmap("add_bb_track"),
Expand Down Expand Up @@ -649,11 +649,11 @@ SongEditorWindow::SongEditorWindow(Song* song) :
tool_button_group->addButton(m_editModeButton);
tool_button_group->setExclusive(true);

m_playButton->setWhatsThis(
m_playAction->setWhatsThis(
tr("Click here, if you want to play your whole song. "
"Playing will be started at the song-position-marker (green). "
"You can also move it while playing."));
m_stopButton->setWhatsThis(
m_stopAction->setWhatsThis(
tr("Click here, if you want to stop playing of your song. "
"The song-position-marker will be set to the start of your song."));

Expand Down