2016-08-25 00:45:32 +02:00
|
|
|
#ifndef WEBVIEW_DIALOG_H
|
|
|
|
#define WEBVIEW_DIALOG_H
|
|
|
|
#ifndef SYNCTHINGTRAY_NO_WEBVIEW
|
|
|
|
|
|
|
|
#include "./webviewprovider.h"
|
|
|
|
|
2016-09-03 20:14:52 +02:00
|
|
|
#include "../application/settings.h"
|
|
|
|
|
2016-08-25 00:45:32 +02:00
|
|
|
#include <QMainWindow>
|
|
|
|
|
|
|
|
QT_FORWARD_DECLARE_CLASS(WEB_VIEW_PROVIDER)
|
|
|
|
|
2016-09-03 20:14:52 +02:00
|
|
|
namespace Settings {
|
|
|
|
struct ConnectionSettings;
|
|
|
|
}
|
|
|
|
|
2016-08-25 00:45:32 +02:00
|
|
|
namespace QtGui {
|
|
|
|
|
|
|
|
class WebViewDialog : public QMainWindow
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
WebViewDialog(QWidget *parent = nullptr);
|
|
|
|
~WebViewDialog();
|
|
|
|
|
|
|
|
public slots:
|
2016-09-29 21:19:54 +02:00
|
|
|
void applySettings(const Data::SyncthingConnectionSettings &connectionSettings);
|
|
|
|
const Data::SyncthingConnectionSettings &settings() const;
|
2016-08-25 00:45:32 +02:00
|
|
|
|
|
|
|
protected:
|
|
|
|
void closeEvent(QCloseEvent *event);
|
|
|
|
|
|
|
|
private:
|
|
|
|
WEB_VIEW_PROVIDER *m_view;
|
2016-09-29 21:19:54 +02:00
|
|
|
Data::SyncthingConnectionSettings m_settings;
|
2016-08-25 00:45:32 +02:00
|
|
|
};
|
|
|
|
|
2016-09-29 21:19:54 +02:00
|
|
|
inline const Data::SyncthingConnectionSettings &WebViewDialog::settings() const
|
2016-09-03 20:14:52 +02:00
|
|
|
{
|
|
|
|
return m_settings;
|
|
|
|
}
|
|
|
|
|
2016-08-25 00:45:32 +02:00
|
|
|
}
|
|
|
|
|
2016-09-01 16:34:30 +02:00
|
|
|
#endif // SYNCTHINGTRAY_NO_WEBVIEW
|
2016-08-25 00:45:32 +02:00
|
|
|
#endif // WEBVIEW_DIALOG_H
|