Добавлена реализация базовых профилей (Имя, путь до java)
This commit is contained in:
11
mainwindow.h
11
mainwindow.h
@@ -4,6 +4,7 @@
|
||||
#include <QMainWindow>
|
||||
#include <QProcess>
|
||||
#include <QSettings>
|
||||
#include <QJsonObject> // Важно: добавить для хранения данных профилей
|
||||
|
||||
// Предварительное объявление класса, сгенерированного из mainwindow.ui
|
||||
QT_BEGIN_NAMESPACE
|
||||
@@ -24,6 +25,9 @@ private slots:
|
||||
void on_modsFolderButton_clicked();
|
||||
void on_updateModsButton_clicked();
|
||||
void on_settingsButton_clicked();
|
||||
void on_addProfileButton_clicked(); // Слот для кнопки "Новый..."
|
||||
void on_editProfileButton_clicked(); // <-- ДОБАВЬТЕ ЭТОТ СЛОТ
|
||||
void on_profileComboBox_currentIndexChanged(int index); // Слот для смены профиля
|
||||
|
||||
// Слоты для QProcess (подключаются вручную)
|
||||
void onProcessFinished(int exitCode, QProcess::ExitStatus exitStatus);
|
||||
@@ -33,6 +37,13 @@ private slots:
|
||||
private:
|
||||
QString getMinecraftPath();
|
||||
|
||||
// Новые методы для работы с профилями
|
||||
void loadProfiles();
|
||||
void saveProfiles();
|
||||
void createNewProfile();
|
||||
QString profilesPath; // Путь к launcher_profiles.json
|
||||
QJsonObject profilesData; // JSON данные из файла
|
||||
|
||||
Ui::MainWindow *ui; // Указатель на объект интерфейса
|
||||
QProcess *process;
|
||||
QSettings *settings;
|
||||
|
||||
Reference in New Issue
Block a user