|
From: Tapio V. <aa...@us...> - 2011-01-11 15:10:41
|
Module: editor
Branch: master
Commit: e8bf33b3cf314a0b457a470c327c55116022728b
Author: Tapio Vierros <tap...@gm...>
Date: Tue Jan 11 17:09:51 2011 +0200
Dummy Open menu action (with various format options).
---
editorapp.cc | 17 +++++++++++++++++
editorapp.hh | 1 +
2 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/editorapp.cc b/editorapp.cc
index 19cbafa..bd4c393 100644
--- a/editorapp.cc
+++ b/editorapp.cc
@@ -71,6 +71,23 @@ void EditorApp::on_actionNew_triggered()
}
}
+void EditorApp::on_actionOpen_triggered()
+{
+ QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"),
+ "",
+ tr("All supported formats (*.TBD!!! *.xml *.mid *.ini *.txt)") + ";;" +
+ tr("Project files (*.TBD!!!)") + ";;" + // FIXME: Project file extension
+ tr("SingStar XML (*.xml)") + ";;" +
+ tr("Frets on Fire MIDI (*.mid *.ini)") + ";;" +
+ tr("UltraStar TXT (*.txt)") + ";;" +
+ tr("All files (*)")
+ );
+
+ if (!fileName.isNull()) {
+ // TODO: Spawn a parser
+ }
+}
+
void EditorApp::on_actionExit_triggered()
{
// TODO: Check if a save prompt is in order
diff --git a/editorapp.hh b/editorapp.hh
index 30009d7..6e357f8 100644
--- a/editorapp.hh
+++ b/editorapp.hh
@@ -18,6 +18,7 @@ public slots:
// File menu
void on_actionNew_triggered();
+ void on_actionOpen_triggered();
void on_actionExit_triggered();
// Insert menu
|