Limo
A simple mod manager
Loading...
Searching...
No Matches
AddBackupDialog Class Reference

Dialog for adding new backups. More...

#include <addbackupdialog.h>

Inheritance diagram for AddBackupDialog:
Collaboration diagram for AddBackupDialog:

Signals

void addBackupDialogAccepted (int app_id, int target_id, QString name, QString target_name, int source_backup)
 Signals completion of this dialog.
 

Public Member Functions

 AddBackupDialog (QWidget *parent=nullptr)
 Initializes the UI.
 
 ~AddBackupDialog ()
 Deletes the UI.
 
void setupDialog (int app_id, int target_id, const QString &target_name, const QStringList &existing_backups)
 Initializes this dialog with data needed for backup creation.
 

Private Slots

void on_name_field_textChanged (const QString &text)
 Called when the user edits the backup name field. Updates the Ok button.
 
void on_buttonBox_accepted ()
 Emits addBackupDialogAccepted with the data entered in the Ui.
 

Private Attributes

Ui::AddBackupDialog * ui
 Contains auto-generated UI elements.
 
int target_id_
 Id of the target for which to create a new backup.
 
int app_id_
 Application to which the new backup is to be added.
 
QString target_name_
 Name of the target for which to create a new backup.
 
bool dialog_completed_ = false
 Indicates whether the dialog has been completed.
 

Detailed Description

Dialog for adding new backups.

Constructor & Destructor Documentation

◆ AddBackupDialog()

AddBackupDialog::AddBackupDialog ( QWidget * parent = nullptr)
explicit

Initializes the UI.

Parameters
parentParent for this widget, this is passed to the constructor of QDialog.

Member Function Documentation

◆ addBackupDialogAccepted

void AddBackupDialog::addBackupDialogAccepted ( int app_id,
int target_id,
QString name,
QString target_name,
int source_backup )
signal

Signals completion of this dialog.

Parameters
app_idApplication to which the new backup is to be added.
target_idId of the target for which to create a new backup.
nameName of the target for which to create a new backup.
target_nameName of the target for which to create a new backup.
source_backupData for the new backup will be copied from this backup.

◆ on_name_field_textChanged

void AddBackupDialog::on_name_field_textChanged ( const QString & text)
privateslot

Called when the user edits the backup name field. Updates the Ok button.

Parameters
textNew text.

◆ setupDialog()

void AddBackupDialog::setupDialog ( int app_id,
int target_id,
const QString & target_name,
const QStringList & existing_backups )

Initializes this dialog with data needed for backup creation.

Parameters
Applicationto which the new backup is to be added.
target_idId of the target for which to create a new backup.
target_nameName of the target for which to create a new backup.
existing_backupsList of all existing backup names for the selected target.

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