aboutsummaryrefslogtreecommitdiffstats
path: root/gui/basewindow.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gui/basewindow.cc')
-rw-r--r--gui/basewindow.cc28
1 files changed, 10 insertions, 18 deletions
diff --git a/gui/basewindow.cc b/gui/basewindow.cc
index 04898410..b9c1de5e 100644
--- a/gui/basewindow.cc
+++ b/gui/basewindow.cc
@@ -42,7 +42,7 @@ BaseMainWindow::BaseMainWindow(std::unique_ptr<Context> context, QWidget *parent
log_files.clear();
log_streams.clear();
- setObjectName(QStringLiteral("BaseMainWindow"));
+ setObjectName("BaseMainWindow");
resize(1024, 768);
createMenusAndBars();
@@ -92,35 +92,27 @@ void BaseMainWindow::writeInfo(std::string text) { console->info(text); }
void BaseMainWindow::createMenusAndBars()
{
- actionNew = new QAction("New", this);
- QIcon iconNew;
- iconNew.addFile(QStringLiteral(":/icons/resources/new.png"));
- actionNew->setIcon(iconNew);
+ actionNew = new QAction("New", this);
+ actionNew->setIcon(QIcon(":/icons/resources/new.png"));
actionNew->setShortcuts(QKeySequence::New);
actionNew->setStatusTip("New project file");
connect(actionNew, SIGNAL(triggered()), this, SLOT(new_proj()));
- actionOpen = new QAction("Open", this);
- QIcon iconOpen;
- iconOpen.addFile(QStringLiteral(":/icons/resources/open.png"));
- actionOpen->setIcon(iconOpen);
+ actionOpen = new QAction("Open", this);
+ actionOpen->setIcon(QIcon(":/icons/resources/open.png"));
actionOpen->setShortcuts(QKeySequence::Open);
actionOpen->setStatusTip("Open an existing project file");
connect(actionOpen, SIGNAL(triggered()), this, SLOT(open_proj()));
- QAction *actionSave = new QAction("Save", this);
- QIcon iconSave;
- iconSave.addFile(QStringLiteral(":/icons/resources/save.png"));
- actionSave->setIcon(iconSave);
+ QAction *actionSave = new QAction("Save", this);
+ actionSave->setIcon(QIcon(":/icons/resources/save.png"));
actionSave->setShortcuts(QKeySequence::Save);
actionSave->setStatusTip("Save existing project to disk");
- connect(actionSave, SIGNAL(triggered()), this, SLOT(save_proj()));
actionSave->setEnabled(false);
+ connect(actionSave, SIGNAL(triggered()), this, SLOT(save_proj()));
- QAction *actionExit = new QAction("Exit", this);
- QIcon iconExit;
- iconExit.addFile(QStringLiteral(":/icons/resources/exit.png"));
- actionExit->setIcon(iconExit);
+ QAction *actionExit = new QAction("Exit", this);
+ actionExit->setIcon(QIcon(":/icons/resources/exit.png"));
actionExit->setShortcuts(QKeySequence::Quit);
actionExit->setStatusTip("Exit the application");
connect(actionExit, SIGNAL(triggered()), this, SLOT(close()));