mirror of
https://github.com/Quill-OS/quill.git
synced 2024-10-31 21:33:22 -07:00
59 lines
1.3 KiB
C
59 lines
1.3 KiB
C
|
#ifndef USERAPPS_H
|
||
|
#define USERAPPS_H
|
||
|
|
||
|
#include "generaldialog.h"
|
||
|
|
||
|
#include <QWidget>
|
||
|
#include <QJsonDocument>
|
||
|
#include <QJsonParseError>
|
||
|
#include <QJsonObject>
|
||
|
#include <QJsonValue>
|
||
|
#include <QJsonArray>
|
||
|
#include <QDir>
|
||
|
#include <QFile>
|
||
|
|
||
|
namespace Ui {
|
||
|
class userapps;
|
||
|
}
|
||
|
|
||
|
class userapps : public QWidget
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
public:
|
||
|
QString className = this->metaObject()->className();
|
||
|
explicit userapps(QWidget * parent = nullptr);
|
||
|
~userapps();
|
||
|
QJsonDocument jsonDocument; // TODO: Optimize for RAM usage
|
||
|
QJsonObject jsonObject; // Needed for 'App info' button
|
||
|
QString jsonFilePath;
|
||
|
|
||
|
signals:
|
||
|
// This is needed, because user application have their own JSON file. If the user changes it too fast it won't read it and overwrite previous changes
|
||
|
void updateJsonFileSignalUA(QJsonDocument jsonDocument);
|
||
|
|
||
|
|
||
|
public slots:
|
||
|
void provideInfo(QJsonObject jsonObject);
|
||
|
void changePageEnabling(bool goThere);
|
||
|
void updateJsonFileSlotUA(QJsonDocument jsonDocument);
|
||
|
bool manageRequiredFeatures();
|
||
|
QString parseJsonShow(QJsonObject json);
|
||
|
|
||
|
private slots:
|
||
|
void on_infoBtn_clicked();
|
||
|
void on_statusBtn_clicked();
|
||
|
void on_launchBtn_clicked();
|
||
|
|
||
|
private:
|
||
|
Ui::userapps * ui;
|
||
|
generalDialog * generalDialogWindow;
|
||
|
|
||
|
QDir appDir;
|
||
|
QFile execPath;
|
||
|
bool userAppEnabled;
|
||
|
QString appName;
|
||
|
};
|
||
|
|
||
|
#endif // USERAPPS_H
|