Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow.cc')
-rw-r--r--src/mainwindow.cc27
1 files changed, 20 insertions, 7 deletions
diff --git a/src/mainwindow.cc b/src/mainwindow.cc
index 4a0f84a..6aaf48a 100644
--- a/src/mainwindow.cc
+++ b/src/mainwindow.cc
@@ -8,6 +8,8 @@
#include "mainwindow.h"
#include "editorwindow.h"
+#include "config.h"
+
namespace editor
{
@@ -18,7 +20,7 @@ namespace editor
MainWindow::MainWindow()
{
// set window title
- setWindowTitle(tr("Project::OSiRiON world editor"));
+ setWindowTitle(tr("Project::OSiRiON world editor") + " " + PACKAGE_VERSION);
// initialize MDI (multiple document interface) area
mainwindow_mdiarea = new QMdiArea();
@@ -34,6 +36,9 @@ MainWindow::MainWindow()
// initialize menu bar
initMenus();
updateMenus();
+
+ // initialize status bar
+ initStatus();
}
@@ -41,24 +46,24 @@ void MainWindow::initActions()
{
// File -> New
action_new = new QAction( tr("&New..."), this);
- action_new->setShortcuts(QKeySequence::New);
action_new->setStatusTip(tr("Create a new zone"));
+ action_new->setShortcuts(QKeySequence::New);
connect(action_new, SIGNAL(triggered()), this, SLOT(slot_new()));
// File -> Open
action_open = new QAction( tr("&Open..."), this);
action_open->setShortcuts(QKeySequence::Open);
- action_open->setStatusTip(tr("Open an existing zone ini file"));
+ action_open->setStatusTip(tr("Open an existing zone .ini file"));
connect(action_open, SIGNAL(triggered()), this, SLOT(slot_open()));
action_save = new QAction( tr("&Save"), this);
+ action_save->setStatusTip(tr("Save zone to current .ini file"));
action_save->setShortcuts(QKeySequence::Save);
- action_save->setStatusTip(tr("Save zone"));
connect(action_save, SIGNAL(triggered()), this, SLOT(slot_save()));
action_save_as = new QAction( tr("Save &As..."), this);
+ action_save_as->setStatusTip(tr("Save zone to a new .ini file"));
action_save_as->setShortcuts(QKeySequence::SaveAs);
- action_save_as->setStatusTip(tr("Save zone as ini file"));
connect(action_save_as, SIGNAL(triggered()), this, SLOT(slot_save_as()));
// File -> Quit
@@ -69,16 +74,18 @@ void MainWindow::initActions()
// Edit -> Add
action_add = new QAction(tr("&Add"), this);
+ action_add->setStatusTip(tr("Add a new entity"));
connect(action_add, SIGNAL(triggered()), this, SLOT(slot_add()));
action_delete = new QAction(tr("&Delete"), this);
+ action_delete->setStatusTip(tr("Delete selected entities"));
action_delete->setShortcuts(QKeySequence::Delete);
connect(action_delete, SIGNAL(triggered()), this, SLOT(slot_delete()));
action_duplicate = new QAction(tr("D&uplicate"), this);
+ action_duplicate->setStatusTip(tr("Duplicate selected entities"));
action_duplicate->setShortcut(QKeySequence(Qt::Key_Space));
- connect(action_duplicate, SIGNAL(triggered()), this, SLOT(slot_duplicate()));
-
+ connect(action_duplicate, SIGNAL(triggered()), this, SLOT(slot_duplicate()));
}
void MainWindow::initMenus()
@@ -97,6 +104,12 @@ void MainWindow::initMenus()
mainwindow_editmenu->addAction(action_duplicate);
}
+void MainWindow::initStatus()
+{
+ setStatusBar(new QStatusBar(this));
+ statusBar()->showMessage(tr("Project::OSiRiON world editor") + " " + PACKAGE_VERSION);
+}
+
void MainWindow::updateMenus()
{
bool active =(mainwindow_mdiarea->activeSubWindow() != 0);