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

Dialog for overwriting backups. More...

#include <overwritebackupdialog.h>

Inheritance diagram for OverwriteBackupDialog:
Collaboration diagram for OverwriteBackupDialog:

Signals

void backupOverwritten (int target_id, int source_backup, int dest_backup)
 Signals completion of the dialog.
 

Public Member Functions

 OverwriteBackupDialog (QWidget *parent=nullptr)
 Initializes the UI.
 
 ~OverwriteBackupDialog ()
 Deletes the UI.
 
void setupDialog (const QStringList &backup_names, int target_id, int dest_backup)
 Initializes the dialog.
 

Private Slots

void on_backup_field_textChanged (const QString &text)
 Ensures Ok button is only available when a valid backup has been selected.
 
void on_buttonBox_accepted ()
 Closes the dialog and emits backupOverwritten.
 

Private Attributes

Ui::OverwriteBackupDialog * ui
 Contains auto-generated UI elements.
 
int backup_target_
 Id of the backup target for which to overwrite a backup.
 
int dest_backup_
 Backup to be overwritten.
 
QStringList backup_names_
 Contains names for all backups.
 
std::unique_ptr< QCompleter > completer_
 Completer used for backup names.
 
bool dialog_completed_ = false
 Indicates whether the dialog has been completed.
 

Detailed Description

Dialog for overwriting backups.

Constructor & Destructor Documentation

◆ OverwriteBackupDialog()

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

Initializes the UI.

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

Member Function Documentation

◆ backupOverwritten

void OverwriteBackupDialog::backupOverwritten ( int target_id,
int source_backup,
int dest_backup )
signal

Signals completion of the dialog.

Parameters
target_idId of the backup target for which to overwrite a backup.
source_backupBackup from which to copy files.
dest_backupBackup to be overwritten.

◆ on_backup_field_textChanged

void OverwriteBackupDialog::on_backup_field_textChanged ( const QString & text)
privateslot

Ensures Ok button is only available when a valid backup has been selected.

Parameters
textThe new input.

◆ setupDialog()

void OverwriteBackupDialog::setupDialog ( const QStringList & backup_names,
int target_id,
int dest_backup )

Initializes the dialog.

Parameters
backup_namesContains names for all backups.
target_idId of the backup target for which to overwrite a backup.
dest_backupBackup to be overwritten.

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