Dialog for adding new backup targets.
More...
#include <addbackuptargetdialog.h>
|
void | backupTargetAdded (int app_id, QString target_name, QString target_path, QString default_backup, QString first_backup) |
| Signals dialog has been accepted.
|
|
|
| AddBackupTargetDialog (QWidget *parent=nullptr) |
| Initializes the UI.
|
|
| ~AddBackupTargetDialog () |
| Deletes the UI.
|
|
void | resetDialog (int app_id) |
| Removes the text from all input fields.
|
|
|
void | updateOkButton () |
| Updates the Ok button to only be enabled if the target path, name and default backup fields are filled.
|
|
bool | pathIsValid () |
| Verifies if the target path field refers to an existing file or directory.
|
|
|
Ui::AddBackupTargetDialog * | ui |
| Contains auto-generated UI elements.
|
|
std::unique_ptr< QFileDialog > | file_dialog_ |
| File dialog used to select a backup target.
|
|
int | app_id_ |
| Application to which the new backup target is to be added.
|
|
bool | dialog_completed_ = false |
| Indicates whether the dialog has been completed.
|
|
Dialog for adding new backup targets.
◆ AddBackupTargetDialog()
AddBackupTargetDialog::AddBackupTargetDialog |
( |
QWidget * | parent = nullptr | ) |
|
|
explicit |
Initializes the UI.
- Parameters
-
parent | Parent for this widget, this is passed to the constructor of QDialog. |
◆ backupTargetAdded
void AddBackupTargetDialog::backupTargetAdded |
( |
int | app_id, |
|
|
QString | target_name, |
|
|
QString | target_path, |
|
|
QString | default_backup, |
|
|
QString | first_backup ) |
|
signal |
Signals dialog has been accepted.
- Parameters
-
app_id | Application to which the new backup target is to be added. |
target_name | Name of the new backup target. |
target_path | Path to the file or directory to be managed. |
default_backup | Name of the currently active version of the target. |
first_backup | If not empty: Name of the first backup. |
◆ on_default_backup_field_textEdited
void AddBackupTargetDialog::on_default_backup_field_textEdited |
( |
const QString & | text | ) |
|
|
privateslot |
◆ on_target_name_field_textEdited
void AddBackupTargetDialog::on_target_name_field_textEdited |
( |
const QString & | text | ) |
|
|
privateslot |
◆ on_target_path_field_textEdited
void AddBackupTargetDialog::on_target_path_field_textEdited |
( |
const QString & | text | ) |
|
|
privateslot |
◆ onFileDialogAccepted
void AddBackupTargetDialog::onFileDialogAccepted |
( |
const QString & | path | ) |
|
|
privateslot |
Updates the target path field with the new path.
- Parameters
-
◆ onFileDialogSelectionChanged
void AddBackupTargetDialog::onFileDialogSelectionChanged |
( |
const QString & | path | ) |
|
|
privateslot |
Updates the file mode of file_dialog_ to allow selection of both files and directories.
- Parameters
-
path | Currently selected item. |
◆ resetDialog()
void AddBackupTargetDialog::resetDialog |
( |
int | app_id | ) |
|
Removes the text from all input fields.
- Parameters
-
app_id | Application to which the new backup target is to be added. |
The documentation for this class was generated from the following files: