Limo
A simple mod manager
Loading...
Searching...
No Matches
importfromsteamdialog.h
Go to the documentation of this file.
1
5
6#pragma once
7
8#include <QDialog>
9#include <filesystem>
10
11
12namespace Ui
13{
14class ImportFromSteamDialog;
15}
16
17class ImportFromSteamDialog : public QDialog
18{
19 Q_OBJECT
20
21public:
26 explicit ImportFromSteamDialog(QWidget* parent = nullptr);
30 void init();
31
32private:
34 Ui::ImportFromSteamDialog* ui;
36 const std::string library_file_name_ = "libraryfolders.vdf";
38 bool dialog_completed_ = false;
39
45 bool pathIsValid(std::filesystem::path path) const;
50 void updateTable(std::filesystem::path steam_dir);
58 bool addTableRow(std::string app_id, std::filesystem::path path);
64 void showError(QString title, QString message);
65
66private slots:
77 void on_search_field_textEdited(const QString& new_text);
78
79signals:
89 void applicationImported(QString name,
90 QString app_id,
91 QString install_dir,
92 QString prefix_path,
93 QString icon_path);
94};
Ui::ImportFromSteamDialog * ui
Contains auto-generated ui elements.
Definition importfromsteamdialog.h:34
void updateTable(std::filesystem::path steam_dir)
Updates ui->app_table with all apps listed in the library file.
Definition importfromsteamdialog.cpp:71
void on_buttonBox_accepted()
Closes the dialog and emits a signal for completion.
Definition importfromsteamdialog.cpp:207
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.
Definition importfromsteamdialog.cpp:16
void on_pick_path_button_clicked()
Opens a file dialog to chose the steam path.
Definition importfromsteamdialog.cpp:56
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.
Definition importfromsteamdialog.cpp:137
void init()
Initializes the dialog.
Definition importfromsteamdialog.cpp:46
const std::string library_file_name_
Name of the file containing all installed steam apps.
Definition importfromsteamdialog.h:36
void showError(QString title, QString message)
Shows an error in a QMessageBox with given title and message.
Definition importfromsteamdialog.cpp:200
bool dialog_completed_
Indicates whether the dialog has been completed.
Definition importfromsteamdialog.h:38
void on_path_field_editingFinished()
Updates ui->app_table with information from the selected directory.
Definition importfromsteamdialog.cpp:230
~ImportFromSteamDialog()
Deletes the UI.
Definition importfromsteamdialog.cpp:41
void on_search_field_textEdited(const QString &new_text)
Called when the text in ui->search_field has been edited by the user.
Definition importfromsteamdialog.cpp:235
bool pathIsValid(std::filesystem::path path) const
Checks if given path contains the library file.
Definition importfromsteamdialog.cpp:66
char path[256]
Path to which to extract the file.
Definition lspakfilelistentry.h:1