You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
835 B
28 lines
835 B
/* Настройки media-хранилища: автозагрузка, лимит файла и общий размер. |
|
* applyAndSave сохраняет значения и передаёт их chat_setting через uasync. */ |
|
#pragma once |
|
|
|
#include <QWidget> |
|
|
|
class DbManager; |
|
class QCheckBox; |
|
class QSpinBox; |
|
|
|
void postChatSetting(const QString& configPath, const char* name, int val); |
|
|
|
class StorageSettingsPage : public QWidget { |
|
Q_OBJECT |
|
public: |
|
explicit StorageSettingsPage(DbManager* db, QWidget* parent = nullptr); |
|
|
|
void setConfigPath(const QString& path) { m_configPath = path; } |
|
void loadFromDb(); |
|
void applyAndSave(); |
|
|
|
private: |
|
DbManager* m_db = nullptr; |
|
QString m_configPath; |
|
QCheckBox* m_autoloadCheck; |
|
QSpinBox* m_autoloadMaxSize; |
|
QSpinBox* m_maxStorageSize; |
|
};
|
|
|