|
void | applicationImported (QString name, QString app_id, QString install_dir, QString prefix_path, QString icon_path) |
| Signals completion of the dialog.
|
|
|
| ImportFromSteamDialog (QWidget *parent=nullptr) |
| Initializes the UI.
|
|
| ~ImportFromSteamDialog () |
| Deletes the UI.
|
|
void | init () |
| Initializes the dialog.
|
|
|
void | on_pick_path_button_clicked () |
| Opens a file dialog to chose the steam path.
|
|
void | on_buttonBox_accepted () |
| Closes the dialog and emits a signal for completion.
|
|
void | on_path_field_editingFinished () |
| Updates ui->app_table with information from the selected directory.
|
|
void | on_search_field_textEdited (const QString &new_text) |
| Called when the text in ui->search_field has been edited by the user.
|
|
|
bool | pathIsValid (std::filesystem::path path) const |
| Checks if given path contains the library file.
|
|
void | updateTable (std::filesystem::path steam_dir) |
| Updates ui->app_table with all apps listed in the library file.
|
|
bool | addTableRow (std::string app_id, std::filesystem::path path) |
| Adds a row to ui->app_table containing information about the app pertaining the given app_id.
|
|
void | showError (QString title, QString message) |
| Shows an error in a QMessageBox with given title and message.
|
|
|
Ui::ImportFromSteamDialog * | ui |
| Contains auto-generated ui elements.
|
|
const std::string | library_file_name_ = "libraryfolders.vdf" |
| Name of the file containing all installed steam apps.
|
|
bool | dialog_completed_ = false |
| Indicates whether the dialog has been completed.
|
|
◆ ImportFromSteamDialog()
ImportFromSteamDialog::ImportFromSteamDialog |
( |
QWidget * | parent = nullptr | ) |
|
|
explicit |
Initializes the UI.
- Parameters
-
parent | Parent for this widget, this is passed to the constructor of QDialog. |
◆ addTableRow()
bool ImportFromSteamDialog::addTableRow |
( |
std::string | app_id, |
|
|
std::filesystem::path | path ) |
|
private |
Adds a row to ui->app_table containing information about the app pertaining the given app_id.
- Parameters
-
app_id | Target app_id. |
path | Path to the apps library folder. |
- Returns
- True if a new row has been added.
◆ applicationImported
void ImportFromSteamDialog::applicationImported |
( |
QString | name, |
|
|
QString | app_id, |
|
|
QString | install_dir, |
|
|
QString | prefix_path, |
|
|
QString | icon_path ) |
|
signal |
Signals completion of the dialog.
- Parameters
-
name | Name of the imported application. |
app_id | Steam app_id of the imported application. |
install_dir | Name of the directory under steamapps which contains the new applications files. |
prefix_path | Path to the applications Proton prefix, or empty if none exists. |
icon_path | Path to the applications icon. |
◆ on_search_field_textEdited
void ImportFromSteamDialog::on_search_field_textEdited |
( |
const QString & | new_text | ) |
|
|
privateslot |
Called when the text in ui->search_field has been edited by the user.
- Parameters
-
new_text | The newly entered text. |
◆ pathIsValid()
bool ImportFromSteamDialog::pathIsValid |
( |
std::filesystem::path | path | ) |
const |
|
private |
Checks if given path contains the library file.
- Parameters
-
- Returns
- True if path contains a file named library_file_name, else False.
◆ showError()
void ImportFromSteamDialog::showError |
( |
QString | title, |
|
|
QString | message ) |
|
private |
Shows an error in a QMessageBox with given title and message.
- Parameters
-
title | Title of the error box. |
message | Error message to be displayed. |
◆ updateTable()
void ImportFromSteamDialog::updateTable |
( |
std::filesystem::path | steam_dir | ) |
|
|
private |
Updates ui->app_table with all apps listed in the library file.
- Parameters
-
steam_dir | Path to steam installation. |
The documentation for this class was generated from the following files: