refactor
This commit is contained in:
+9
-4
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "webservernotify.h"
|
||||
#include <QDialog>
|
||||
#include "udatabase.h"
|
||||
|
||||
namespace Ui {
|
||||
class FCreateNotify;
|
||||
@@ -14,11 +15,12 @@ class FCreateNotify : public QDialog
|
||||
|
||||
signals:
|
||||
void serverCreated(HttpServer *server, const QString &name);
|
||||
|
||||
void serverUpdated(HttpServer *server, const QString &name);
|
||||
public:
|
||||
explicit FCreateNotify(QWidget *parent = nullptr);
|
||||
explicit FCreateNotify(uDataBase *database = nullptr, QWidget *parent = nullptr);
|
||||
~FCreateNotify();
|
||||
|
||||
void loadExistingServer(HttpServer *server, const QString &name);
|
||||
void setEditMode(bool isEditMode);
|
||||
protected:
|
||||
void closeEvent(QCloseEvent *event) override;
|
||||
|
||||
@@ -34,11 +36,14 @@ private:
|
||||
void createNotification(bool isTest = false);
|
||||
QString getAbsolutePath(const QString &relativePath);
|
||||
void copyFileToAppDir(const QString &sourcePath, const QString &destSubDir);
|
||||
|
||||
bool m_isEditMode;
|
||||
uDataBase *m_database;
|
||||
QString m_existingServerName;
|
||||
// Сервер
|
||||
HttpServer *m_server;
|
||||
int m_notificationCounter;
|
||||
void createServer();
|
||||
void applyCurrentSettingsToServer();
|
||||
};
|
||||
|
||||
#endif // FCREATENOTIFY_H
|
||||
|
||||
Reference in New Issue
Block a user