9#include <QCoreApplication>
10#include <QGuiApplication>
18 if (!qobject_cast<QGuiApplication*>(QCoreApplication::instance())) {
39 return newFileAction_;
42 return openFileAction_;
45 return saveFileAction_;
48 return saveFileAsAction_;
59 newFileAction_->trigger();
63 openFileAction_->trigger();
67 saveFileAction_->trigger();
70 if (saveFileAsAction_)
71 saveFileAsAction_->trigger();
Declares QAction wrappers exposed to the UI layer and QML.
Defines UI-specific runtime constants that are not shared with core.
Provides translated C++ UI strings for shell, workflow, adapter and view model code.
Actions(QObject *parent=nullptr)
Construct the actions container.
void importBrowseRequested(const QString &filter)
Emitted when QML requests an import file dialog.
Q_INVOKABLE void newFile()
Requests creation of a new workspace file.
Q_INVOKABLE void openFile()
Requests opening an existing workspace file.
Q_INVOKABLE void browseImportPdf()
Requests an import PDF file picker.
QAction * saveFileAsAction
Q_INVOKABLE void browseExportFile()
Requests an export file picker.
Q_INVOKABLE void saveFile()
Requests saving the current workspace file.
void exportBrowseRequested(const QString &filter)
Emitted when QML requests an export file dialog.
Q_INVOKABLE void saveFileAs()
Requests saving the current workspace file under a new path.
void exportDirectoryBrowseRequested(const QString &title)
Emitted when QML requests an export directory dialog.
Q_INVOKABLE void browseExportDirectory()
Requests an export directory picker.
constexpr auto kActionOpenFile
Object name assigned to the main window's "open file" QAction.
constexpr auto kActionQuit
Object name assigned to the main window's "quit" QAction.
constexpr auto kActionNewFile
Object name assigned to the main window's "new file" QAction.
constexpr auto kActionAbout
Object name assigned to the main window's "about" QAction.
constexpr auto kActionSaveFileAs
Object name assigned to the main window's "save as" QAction.
constexpr auto kActionSaveFile
Object name assigned to the main window's "save file" QAction.
QString saveFileAs()
Label for saving the current workspace under another path.
QString newFile()
Label for creating a new workspace file.
QString saveFile()
Label for saving the current workspace file.
QString openFile()
Label for opening an existing workspace file.
QString about()
Label for opening the about dialog.
QString quit()
Label for quitting the application.
QString importPdfFilter()
File filter for PDF import sources.
QString exportDirectoryTitle()
Title for selecting an export target directory.
QString exportFileFilter()
File filter for direct export targets.