-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactoring actions into relightapp.
- Loading branch information
Showing
14 changed files
with
236 additions
and
148 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#include <QVBoxLayout> | ||
#include <QHBoxLayout> | ||
#include <QToolBar> | ||
|
||
#include "imagestab.h" | ||
#include "relightapp.h" | ||
|
||
ImagesTab::ImagesTab() { | ||
|
||
QVBoxLayout *container = new QVBoxLayout(this); | ||
|
||
QToolBar *toolbar = new QToolBar(this); | ||
toolbar->addAction(qRelightApp->action("fullscreen")); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#ifndef IMAGESTAB_H | ||
#define IMAGESTAB_H | ||
|
||
#include <QFrame> | ||
|
||
class ImagesTab: public QFrame { | ||
public: | ||
ImagesTab(); | ||
}; | ||
|
||
#endif // IMAGESTAB_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,30 @@ | ||
#include "relightapp.h" | ||
|
||
#include <QAction> | ||
|
||
|
||
RelightApp::RelightApp(int &argc, char **argv): QApplication(argc, argv) { | ||
QTemporaryDir tmp; | ||
if(!tmp.isValid()) { | ||
QMessageBox::critical(nullptr, "Temporary folder is needed", "Could not create a temporary file for the scripts.\nSelect a folder in File->Preferences"); | ||
} | ||
|
||
QFile style(":/css/style.txt"); | ||
style.open(QFile::ReadOnly); | ||
setStyleSheet(style.readAll()); | ||
|
||
ProcessQueue &queue = ProcessQueue::instance(); | ||
queue.start(); | ||
|
||
|
||
addAction("new_project", "New project...", "Ctrl+N"); | ||
addAction("open_project", "Open project...", "Ctrl+O"); | ||
addAction("close_project", "Close project", "Ctrl-W"); | ||
addAction("exit", "Exit", "Alt+F4"); | ||
} | ||
|
||
void RelightApp::addAction(const QString &id, const QString &label, const QString &shortcut) { | ||
QAction *a = new QAction(label); | ||
a->setShortcut(shortcut); | ||
actions[id] = a; | ||
} |
Oops, something went wrong.