Files
amnezia-client/client/ui/controllers/systemController.h
T

37 lines
965 B
C++
Raw Normal View History

2023-09-06 22:20:59 +05:00
#ifndef SYSTEMCONTROLLER_H
#define SYSTEMCONTROLLER_H
#include <QObject>
#include "settings.h"
class SystemController : public QObject
{
Q_OBJECT
public:
explicit SystemController(const std::shared_ptr<Settings> &setting, QObject *parent = nullptr);
2024-12-31 04:16:52 +01:00
static void saveFile(const QString &fileName, const QString &data);
static bool readFile(const QString &fileName, QByteArray &data);
static bool readFile(const QString &fileName, QString &data);
2023-09-06 22:20:59 +05:00
public slots:
QString getFileName(const QString &acceptLabel, const QString &nameFilter, const QString &selectedFile = "",
const bool isSaveMode = false, const QString &defaultSuffix = "");
2023-09-06 22:20:59 +05:00
void setQmlRoot(QObject *qmlRoot);
2024-09-09 14:36:33 +03:00
bool isAuthenticated();
2024-12-31 04:16:52 +01:00
void sendTouch(float x, float y);
2023-09-06 22:20:59 +05:00
signals:
void fileDialogClosed(const bool isAccepted);
2023-09-06 22:20:59 +05:00
private:
std::shared_ptr<Settings> m_settings;
QObject *m_qmlRoot;
};
#endif // SYSTEMCONTROLLER_H