|
From: Tapio V. <aa...@us...> - 2011-02-01 09:54:48
|
Module: editor
Branch: master
Commit: 31190ce2446a55342b4319106984ee14086a713c
Author: Tapio Vierros <tap...@gm...>
Date: Tue Feb 1 11:43:18 2011 +0200
Implement GettingStarted buttons.
---
editorapp.hh | 2 ++
gettingstarted.hh | 27 +++++++++++++++++++++++++++
gettingstarted.ui | 4 ++--
3 files changed, 31 insertions(+), 2 deletions(-)
diff --git a/editorapp.hh b/editorapp.hh
index cb5e675..f754d19 100644
--- a/editorapp.hh
+++ b/editorapp.hh
@@ -33,6 +33,8 @@ public:
void updateSongMeta(bool readFromSongToUI = false);
void updateMenuStates();
+ void showTab(int tab) { ui.tabWidget->setCurrentIndex(tab); }
+ void showExportMenu() { ui.menuExport->exec(pos() + QPoint(0, ui.menubar->height())); }
private:
bool promptSaving();
diff --git a/gettingstarted.hh b/gettingstarted.hh
index 1b4b753..a9c9e43 100644
--- a/gettingstarted.hh
+++ b/gettingstarted.hh
@@ -1,6 +1,7 @@
#include <QSettings>
#include "ui_gettingstarted.h"
#include "editorapp.hh"
+#include <iostream>
class GettingStartedDialog: public QDialog, private Ui::GettingStarted
{
@@ -23,6 +24,32 @@ public slots:
settings.setValue("showhelp", state != Qt::Unchecked);
}
+ // Command link buttons
+
+ void on_cmdMusicFile_clicked(bool) {
+ m_editorApp->on_actionMusicFile_triggered();
+ }
+
+ void on_cmdLyricsFromFile_clicked(bool) {
+ m_editorApp->on_actionLyricsFromFile_triggered();
+ }
+
+ void on_cmdLyricsFromClipboard_clicked(bool) {
+ m_editorApp->on_actionLyricsFromClipboard_triggered();
+ }
+
+ void on_cmdTimeLyrics_clicked(bool) {
+ m_editorApp->showTab(2);
+ }
+
+ void on_cmdFineTuneLyrics_clicked(bool) {
+ m_editorApp->showTab(0);
+ }
+
+ void on_cmdExport_clicked(bool) {
+ m_editorApp->showExportMenu();
+ }
+
protected:
void closeEvent(QCloseEvent*) {
QSettings settings;
diff --git a/gettingstarted.ui b/gettingstarted.ui
index 26bdd75..10cc2b7 100644
--- a/gettingstarted.ui
+++ b/gettingstarted.ui
@@ -159,14 +159,14 @@
</widget>
</item>
<item row="3" column="1" colspan="3">
- <widget class="QCommandLinkButton" name="commandLinkButton">
+ <widget class="QCommandLinkButton" name="cmdFineTuneLyrics">
<property name="text">
<string>Fine tune and fix wrongly guessed note positions</string>
</property>
</widget>
</item>
<item row="4" column="1" colspan="3">
- <widget class="QCommandLinkButton" name="commandLinkButton_2">
+ <widget class="QCommandLinkButton" name="cmdExport">
<property name="text">
<string>Export to your preferred format</string>
</property>
|