FOSSredder 0.5.0
Loading...
Searching...
No Matches
ui::Actions Class Reference

Owns the main window actions and exposes them to QML. More...

#include <AppActions.h>

Inheritance diagram for ui::Actions:
Collaboration diagram for ui::Actions:

Signals

void importBrowseRequested (const QString &filter)
 Emitted when QML requests an import file dialog.
void importFileSelected (const QString &path)
 Emitted after a single import file was selected by the user.
void importFilesSelected (const QStringList &paths)
 Emitted after multiple import files were selected by the user.
void importFileDropped (const QString &path)
 Emitted when a file was dropped onto an import target in QML.
void importFilesDropped (const QStringList &paths)
 Emitted when multiple files were dropped onto an import target in QML.
void exportBrowseRequested (const QString &filter)
 Emitted when QML requests an export file dialog.
void exportDirectoryBrowseRequested (const QString &title)
 Emitted when QML requests an export directory dialog.
void exportFileSelected (const QString &path)
 Emitted after an export path was chosen by the user.
void exportDirectorySelected (const QString &path)
 Emitted after an export directory was chosen by the user.

Public Member Functions

 Actions (QObject *parent=nullptr)
 Construct the actions container.
QAction * newFileAction () const
 Return the QAction for creating a new file.
QAction * openFileAction () const
 Return the QAction for opening a file.
QAction * saveFileAction () const
 Return the QAction for saving the current file.
QAction * saveFileAsAction () const
 Return the QAction for saving the current file under a new name.
QAction * quitAction () const
 Return the QAction for quitting the application.
QAction * aboutAction () const
 Return the QAction for showing the about 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 saveFile ()
 Requests saving the current workspace file.
Q_INVOKABLE void saveFileAs ()
 Requests saving the current workspace file under a new path.
Q_INVOKABLE void browseImportPdf ()
 Requests an import PDF file picker.
Q_INVOKABLE void browseExportFile ()
 Requests an export file picker.
Q_INVOKABLE void browseExportDirectory ()
 Requests an export directory picker.

Properties

QAction * newFileAction
QAction * openFileAction
QAction * saveFileAction
QAction * saveFileAsAction
QAction * quitAction
QAction * aboutAction

Detailed Description

Owns the main window actions and exposes them to QML.

Definition at line 18 of file AppActions.h.

Constructor & Destructor Documentation

◆ Actions()

ui::Actions::Actions ( QObject * parent = nullptr)
explicit

Construct the actions container.

Parameters
parentQObject parent

Definition at line 17 of file AppActions.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ aboutAction()

QAction * ui::Actions::aboutAction ( ) const

Return the QAction for showing the about dialog.

Returns
Pointer to the QAction

Definition at line 53 of file AppActions.cpp.

◆ browseExportDirectory()

void ui::Actions::browseExportDirectory ( )

Requests an export directory picker.

Definition at line 82 of file AppActions.cpp.

Here is the call graph for this function:

◆ browseExportFile()

void ui::Actions::browseExportFile ( )

Requests an export file picker.

Definition at line 78 of file AppActions.cpp.

Here is the call graph for this function:

◆ browseImportPdf()

void ui::Actions::browseImportPdf ( )

Requests an import PDF file picker.

Definition at line 74 of file AppActions.cpp.

Here is the call graph for this function:

◆ exportBrowseRequested

void ui::Actions::exportBrowseRequested ( const QString & filter)
signal

Emitted when QML requests an export file dialog.

Parameters
filterNative file dialog filter string (e.g. "All Files (*.*)").
Here is the call graph for this function:
Here is the caller graph for this function:

◆ exportDirectoryBrowseRequested

void ui::Actions::exportDirectoryBrowseRequested ( const QString & title)
signal

Emitted when QML requests an export directory dialog.

Parameters
titleNative file dialog title.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ exportDirectorySelected

void ui::Actions::exportDirectorySelected ( const QString & path)
signal

Emitted after an export directory was chosen by the user.

Parameters
pathAbsolute path of the target directory.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ exportFileSelected

void ui::Actions::exportFileSelected ( const QString & path)
signal

Emitted after an export path was chosen by the user.

Parameters
pathAbsolute path of the target file.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ importBrowseRequested

void ui::Actions::importBrowseRequested ( const QString & filter)
signal

Emitted when QML requests an import file dialog.

Parameters
filterNative file dialog filter string (e.g. "PDF Files (*.pdf)").
Here is the call graph for this function:
Here is the caller graph for this function:

◆ importFileDropped

void ui::Actions::importFileDropped ( const QString & path)
signal

Emitted when a file was dropped onto an import target in QML.

Parameters
pathAbsolute path of the dropped file.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ importFilesDropped

void ui::Actions::importFilesDropped ( const QStringList & paths)
signal

Emitted when multiple files were dropped onto an import target in QML.

Parameters
pathsList of absolute file paths.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ importFileSelected

void ui::Actions::importFileSelected ( const QString & path)
signal

Emitted after a single import file was selected by the user.

Parameters
pathAbsolute path of the selected file.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ importFilesSelected

void ui::Actions::importFilesSelected ( const QStringList & paths)
signal

Emitted after multiple import files were selected by the user.

Parameters
pathsList of absolute file paths.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ newFile()

void ui::Actions::newFile ( )

Requests creation of a new workspace file.

Definition at line 57 of file AppActions.cpp.

◆ newFileAction()

QAction * ui::Actions::newFileAction ( ) const

Return the QAction for creating a new file.

Returns
Pointer to the QAction

Definition at line 38 of file AppActions.cpp.

◆ openFile()

void ui::Actions::openFile ( )

Requests opening an existing workspace file.

Definition at line 61 of file AppActions.cpp.

◆ openFileAction()

QAction * ui::Actions::openFileAction ( ) const

Return the QAction for opening a file.

Returns
Pointer to the QAction

Definition at line 41 of file AppActions.cpp.

◆ quitAction()

QAction * ui::Actions::quitAction ( ) const

Return the QAction for quitting the application.

Returns
Pointer to the QAction

Definition at line 50 of file AppActions.cpp.

◆ saveFile()

void ui::Actions::saveFile ( )

Requests saving the current workspace file.

Definition at line 65 of file AppActions.cpp.

◆ saveFileAction()

QAction * ui::Actions::saveFileAction ( ) const

Return the QAction for saving the current file.

Returns
Pointer to the QAction

Definition at line 44 of file AppActions.cpp.

◆ saveFileAs()

void ui::Actions::saveFileAs ( )

Requests saving the current workspace file under a new path.

Definition at line 69 of file AppActions.cpp.

◆ saveFileAsAction()

QAction * ui::Actions::saveFileAsAction ( ) const

Return the QAction for saving the current file under a new name.

Returns
Pointer to the QAction

Definition at line 47 of file AppActions.cpp.

Property Documentation

◆ aboutAction

QAction* ui::Actions::aboutAction
read

Definition at line 25 of file AppActions.h.

◆ newFileAction

QAction* ui::Actions::newFileAction
read

Definition at line 20 of file AppActions.h.

◆ openFileAction

QAction* ui::Actions::openFileAction
read

Definition at line 21 of file AppActions.h.

◆ quitAction

QAction* ui::Actions::quitAction
read

Definition at line 24 of file AppActions.h.

◆ saveFileAction

QAction* ui::Actions::saveFileAction
read

Definition at line 22 of file AppActions.h.

◆ saveFileAsAction

QAction* ui::Actions::saveFileAsAction
read

Definition at line 23 of file AppActions.h.


The documentation for this class was generated from the following files: