fort/src/ui/fortmanager.h

51 lines
1.1 KiB
C
Raw Normal View History

2017-09-01 15:13:17 +00:00
#ifndef FORTMANAGER_H
#define FORTMANAGER_H
2017-09-01 13:13:12 +00:00
#include <QObject>
class QQmlApplicationEngine;
class FortSettings;
class FirewallConf;
2017-09-01 15:13:17 +00:00
class FortManager : public QObject
2017-09-01 13:13:12 +00:00
{
Q_OBJECT
2017-09-02 10:17:51 +00:00
Q_PROPERTY(FortSettings *fortSettings READ fortSettings CONSTANT)
Q_PROPERTY(FirewallConf *firewallConf READ firewallConf CONSTANT)
Q_PROPERTY(FirewallConf *firewallConfToEdit READ firewallConfToEdit CONSTANT)
2017-09-01 13:13:12 +00:00
public:
2017-09-01 15:13:17 +00:00
explicit FortManager(QObject *parent = nullptr);
2017-09-01 13:13:12 +00:00
2017-09-02 10:17:51 +00:00
FortSettings *fortSettings() const { return m_fortSettings; }
FirewallConf *firewallConf() const { return m_firewallConf; }
FirewallConf *firewallConfToEdit() const { return m_firewallConfToEdit; }
2017-09-01 13:13:12 +00:00
signals:
public slots:
2017-09-01 15:13:17 +00:00
void showWindow();
2017-09-01 13:13:12 +00:00
2017-09-01 15:13:17 +00:00
bool saveConf();
2017-09-01 13:13:12 +00:00
2017-09-02 10:17:51 +00:00
private slots:
void handleClosedWindow();
2017-09-01 13:13:12 +00:00
private:
2017-09-02 10:17:51 +00:00
static void registerQmlTypes();
2017-09-01 13:13:12 +00:00
void setupContext();
2017-09-02 10:17:51 +00:00
void createConfToEdit();
2017-09-01 13:13:12 +00:00
private:
QQmlApplicationEngine *m_engine;
FortSettings *m_fortSettings;
2017-09-01 15:13:17 +00:00
FirewallConf *m_firewallConf;
2017-09-02 10:17:51 +00:00
FirewallConf *m_firewallConfToEdit;
2017-09-01 13:13:12 +00:00
};
2017-09-01 15:13:17 +00:00
#endif // FORTMANAGER_H