Used to edit the local and remote sources of a given mod.
More...
#include <editmodsourcesdialog.h>
|
void | modSourcesEdited (int app_id, int mod_id, QString local_source, QString remote_source) |
| Signals successful dialog completion.
|
|
void | dialogClosed () |
| Signals cancellation of editing.
|
|
|
| EditModSourcesDialog (QWidget *parent=nullptr) |
| Initializes the UI.
|
|
| ~EditModSourcesDialog () |
| Deletes the UI.
|
|
void | setupDialog (int app_id, int mod_id, const QString &mod_name, const QString &local_source, const QString &remote_source) |
| Initializes the dialog with the given data.
|
|
void | closeEvent (QCloseEvent *event) override |
| Emits dialogClosed.
|
|
void | reject () override |
| Closes the dialog and emits a signal indicating the dialog has been closed.
|
|
|
void | onFileDialogAccepted (const QString &path) |
| Updates the local source field with the new path.
|
|
void | onFileDialogSelectionChanged (const QString &path) |
| Updates the file mode of file_dialog_ to allow selection of both files and directories.
|
|
void | on_buttonBox_accepted () |
| Completes the dialog by emitting modSourcesEdited.
|
|
void | on_buttonBox_rejected () |
| Signals cancellation of editing by emitting dialogClosed.
|
|
void | on_path_picker_button_clicked () |
| Shows a file dialog for editing the local source path.
|
|
|
Ui::EditModSourcesDialog * | ui |
| Contains auto generated UI elements.
|
|
int | app_id_ |
| App to which the edited mod belongs.
|
|
int | mod_id_ |
| Target mod id.
|
|
std::unique_ptr< QFileDialog > | file_dialog_ |
| Dialog used for selecting a local source.
|
|
bool | dialog_completed_ = false |
| Indicates whether the dialog has been completed.
|
|
Used to edit the local and remote sources of a given mod.
◆ EditModSourcesDialog()
EditModSourcesDialog::EditModSourcesDialog |
( |
QWidget * | parent = nullptr | ) |
|
|
explicit |
Initializes the UI.
- Parameters
-
parent | Parent widget of this dialog. Passed to the constructor of QDialog. |
◆ closeEvent()
void EditModSourcesDialog::closeEvent |
( |
QCloseEvent * | event | ) |
|
|
override |
Emits dialogClosed.
- Parameters
-
event | The close event sent upon closing the dialog. |
◆ modSourcesEdited
void EditModSourcesDialog::modSourcesEdited |
( |
int | app_id, |
|
|
int | mod_id, |
|
|
QString | local_source, |
|
|
QString | remote_source ) |
|
signal |
Signals successful dialog completion.
- Parameters
-
app_id | App to which the edited mod belongs. |
mod_id | Target mod id. |
local_source | Path to a local archive or directory used for mod installation. |
remote_source | Remote URL from which the mod was downloaded. |
◆ onFileDialogAccepted
void EditModSourcesDialog::onFileDialogAccepted |
( |
const QString & | path | ) |
|
|
privateslot |
Updates the local source field with the new path.
- Parameters
-
◆ onFileDialogSelectionChanged
void EditModSourcesDialog::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. |
◆ setupDialog()
void EditModSourcesDialog::setupDialog |
( |
int | app_id, |
|
|
int | mod_id, |
|
|
const QString & | mod_name, |
|
|
const QString & | local_source, |
|
|
const QString & | remote_source ) |
Initializes the dialog with the given data.
- Parameters
-
app_id | App to which the edited mod belongs. |
mod_id | Target mod id. |
mod_name | Target mod name. |
local_source | Path to a local archive or directory used for mod installation. |
remote_source | Remote URL from which the mod was downloaded. |
The documentation for this class was generated from the following files: