mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-12-04 22:21:41 +09:00
* 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
36 lines
1.0 KiB
C++
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
|