Martchus
49ff5a7b65
So settings pages, web view and other widgets can be used in other components such as the Dolphin plugin and Plasmoid, too.
38 lines
580 B
C++
38 lines
580 B
C++
#ifndef TEXTVIEWDIALOG_H
|
|
#define TEXTVIEWDIALOG_H
|
|
|
|
#include "../global.h"
|
|
|
|
#include <QWidget>
|
|
|
|
QT_FORWARD_DECLARE_CLASS(QTextBrowser)
|
|
|
|
namespace QtGui {
|
|
|
|
class SYNCTHINGWIDGETS_EXPORT TextViewDialog : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
TextViewDialog(const QString &title = QString(), QWidget *parent = nullptr);
|
|
|
|
QTextBrowser *browser();
|
|
|
|
signals:
|
|
void reload();
|
|
|
|
protected:
|
|
void keyPressEvent(QKeyEvent *event);
|
|
|
|
private:
|
|
QTextBrowser *m_browser;
|
|
};
|
|
|
|
inline QTextBrowser *TextViewDialog::browser()
|
|
{
|
|
return m_browser;
|
|
}
|
|
|
|
}
|
|
|
|
#endif // TEXTVIEWDIALOG_H
|