Limo
A simple mod manager
Loading...
Searching...
No Matches
addprofiledialog.h
Go to the documentation of this file.
1
5
6#pragma once
7
9#include <QDialog>
10
11
12namespace Ui
13{
14class AddProfileDialog;
15}
16
20class AddProfileDialog : public QDialog
21{
22 Q_OBJECT
23
24public:
29 explicit AddProfileDialog(QWidget* parent = nullptr);
32
33private:
35 Ui::AddProfileDialog* ui;
37 bool edit_mode_ = false;
43 bool dialog_completed_ = false;
44
45public:
51 void setAddMode(int app_id, const QStringList& profiles);
59 void setEditMode(int app_id, int profile, const QString& name, const QString& app_version);
60
61private slots:
63 void on_clone_check_box_stateChanged(int state);
65 void on_name_field_textChanged(const QString& text);
68
69signals:
75 void profileAdded(int app_id, EditProfileInfo info);
82 void profileEdited(int app_id, int profile, EditProfileInfo info);
83};
void setEditMode(int app_id, int profile, const QString &name, const QString &app_version)
Initializes the dialog to allow editing an existing profile.
Definition addprofiledialog.cpp:31
int profile_
Target profile.
Definition addprofiledialog.h:41
Ui::AddProfileDialog * ui
Contains auto-generated UI elements.
Definition addprofiledialog.h:35
int app_id_
Target ModdedApplication.
Definition addprofiledialog.h:39
void profileEdited(int app_id, int profile, EditProfileInfo info)
Signals completion of this dialog in edit mode.
void on_buttonBox_accepted()
Closes this dialog and emits a signal for completion.
Definition addprofiledialog.cpp:66
void on_clone_check_box_stateChanged(int state)
Enables/ disables clone combo box to reflect the state of the clone check box.
Definition addprofiledialog.cpp:48
AddProfileDialog(QWidget *parent=nullptr)
Initializes the UI.
Definition addprofiledialog.cpp:6
bool dialog_completed_
Indicates whether the dialog has been completed.
Definition addprofiledialog.h:43
bool edit_mode_
If true: Dialog is used to edit, else: Dialog is used to create.
Definition addprofiledialog.h:37
~AddProfileDialog()
Deletes the UI.
Definition addprofiledialog.cpp:11
void on_name_field_textChanged(const QString &text)
Only enable the OK button if a name has been entered.
Definition addprofiledialog.cpp:57
void setAddMode(int app_id, const QStringList &profiles)
Initializes the dialog to allow creating a new profile.
Definition addprofiledialog.cpp:16
void profileAdded(int app_id, EditProfileInfo info)
Signals completion of this dialog in add mode.
Contains the EditProfileInfo struct.
Stores data needed to either create a new or edit an existing profile of a application.
Definition editprofileinfo.h:16