2023-07-12 16:49:47 -04:00
|
|
|
#ifndef CENTRALWIDGET_H
|
|
|
|
|
#define CENTRALWIDGET_H
|
2023-02-17 16:20:29 +01:00
|
|
|
|
|
|
|
|
#include <QLabel>
|
|
|
|
|
#include <QVBoxLayout>
|
|
|
|
|
#include <QWebEnginePage>
|
|
|
|
|
#include <QWebEngineProfile>
|
|
|
|
|
#include <QWebEngineView>
|
|
|
|
|
#include <QWidget>
|
|
|
|
|
|
2023-07-12 16:49:47 -04:00
|
|
|
#ifdef KNOTIFICATIONS
|
|
|
|
|
constexpr bool USE_KF5_NOTIFICATIONS = true;
|
|
|
|
|
#else
|
|
|
|
|
constexpr bool USE_KF5_NOTIFICATIONS = false;
|
|
|
|
|
#endif
|
|
|
|
|
|
2023-02-17 16:20:29 +01:00
|
|
|
class CentralWidget : public QWidget {
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
CentralWidget(QWidget *parent = nullptr);
|
|
|
|
|
|
2023-07-12 16:49:47 -04:00
|
|
|
public slots:
|
|
|
|
|
void setLoadingIndicator(QString text);
|
|
|
|
|
|
2023-02-17 16:20:29 +01:00
|
|
|
private:
|
|
|
|
|
void setupWebView();
|
2023-07-12 16:49:47 -04:00
|
|
|
|
2023-02-17 16:20:29 +01:00
|
|
|
QVBoxLayout *m_layout;
|
|
|
|
|
QWebEngineView *m_webView;
|
2023-07-12 16:49:47 -04:00
|
|
|
QLabel *m_loadingLabel;
|
|
|
|
|
bool m_useKF5Notifications;
|
2023-02-17 16:20:29 +01:00
|
|
|
};
|
2023-07-12 16:49:47 -04:00
|
|
|
|
|
|
|
|
#endif // CENTRALWIDGET_H
|