Files
amnezia-client/client/ui/controllers/systemController.h
T
yp 3e8077f2ca feat: split app/tunnel logs viewer (#3262)
* feat: split app/tunnel log streams and add in-app log viewer

* fix: report real save result on android

* remove dead logging code & open qt log on start, stop ne logging on auto-off, pin log date locale

* drop dead share api and simplify logs ui components

* add ru strings for logs redesign
2026-10-13 22:10:30 +08:00

36 lines
1.0 KiB
C++

#ifndef SYSTEMCONTROLLER_H
#define SYSTEMCONTROLLER_H
#include <QByteArray>
#include <QObject>
class SystemController : public QObject
{
Q_OBJECT
public:
explicit SystemController(QObject *parent = nullptr);
static bool saveFile(const QString &fileName, const QString &data);
static bool saveFile(const QString &fileName, const QByteArray &data, const QString &mimeType = QStringLiteral("text/plain"),
bool *cancelled = nullptr);
static bool readFile(const QString &fileName, QByteArray &data);
static bool readFile(const QString &fileName, QString &data);
public slots:
QString getFileName(const QString &acceptLabel, const QString &nameFilter, const QString &selectedFile = "",
const bool isSaveMode = false, const QString &defaultSuffix = "");
void setQmlRoot(QObject *qmlRoot);
bool isAuthenticated();
void sendTouch(float x, float y);
signals:
void fileDialogClosed(const bool isAccepted);
private:
QObject *m_qmlRoot;
};
#endif // SYSTEMCONTROLLER_H