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

Dialog for creating and editing profiles. More...

#include <addprofiledialog.h>

Inheritance diagram for AddProfileDialog:
Collaboration diagram for AddProfileDialog:

Signals

void profileAdded (int app_id, EditProfileInfo info)
 Signals completion of this dialog in add mode.
 
void profileEdited (int app_id, int profile, EditProfileInfo info)
 Signals completion of this dialog in edit mode.
 

Public Member Functions

 AddProfileDialog (QWidget *parent=nullptr)
 Initializes the UI.
 
 ~AddProfileDialog ()
 Deletes the UI.
 
void setAddMode (int app_id, const QStringList &profiles)
 Initializes the dialog to allow creating a new profile.
 
void setEditMode (int app_id, int profile, const QString &name, const QString &app_version)
 Initializes the dialog to allow editing an existing profile.
 

Private Slots

void on_clone_check_box_stateChanged (int state)
 Enables/ disables clone combo box to reflect the state of the clone check box.
 
void on_name_field_textChanged (const QString &text)
 Only enable the OK button if a name has been entered.
 
void on_buttonBox_accepted ()
 Closes this dialog and emits a signal for completion.
 

Private Attributes

Ui::AddProfileDialog * ui
 Contains auto-generated UI elements.
 
bool edit_mode_ = false
 If true: Dialog is used to edit, else: Dialog is used to create.
 
int app_id_
 Target ModdedApplication.
 
int profile_
 Target profile.
 
bool dialog_completed_ = false
 Indicates whether the dialog has been completed.
 

Detailed Description

Dialog for creating and editing profiles.

Constructor & Destructor Documentation

◆ AddProfileDialog()

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

Initializes the UI.

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

Member Function Documentation

◆ profileAdded

void AddProfileDialog::profileAdded ( int app_id,
EditProfileInfo info )
signal

Signals completion of this dialog in add mode.

Parameters
app_idApplication for which a new profile is to be added.
infoContains data for the new profile.

◆ profileEdited

void AddProfileDialog::profileEdited ( int app_id,
int profile,
EditProfileInfo info )
signal

Signals completion of this dialog in edit mode.

Parameters
app_idTarget application.
profileProfile to be edited.
infoContains the new data for the edited profile.

◆ setAddMode()

void AddProfileDialog::setAddMode ( int app_id,
const QStringList & profiles )

Initializes the dialog to allow creating a new profile.

Parameters
app_idTarget ModdedApplication.
profilesNames of existing profiles.

◆ setEditMode()

void AddProfileDialog::setEditMode ( int app_id,
int profile,
const QString & name,
const QString & app_version )

Initializes the dialog to allow editing an existing profile.

Parameters
app_idTarget ModdedApplication.
profileProfile to be edited.
nameCurrent name of the edited profile.
app_versionCurrent app version for this profile.

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