syncthingtray/widgets/misc/textviewdialog.h
Martchus 49ff5a7b65 Move widgets from tray app to separate lib
So settings pages, web view and other widgets
can be used in other components such as the
Dolphin plugin and Plasmoid, too.
2017-04-23 18:31:18 +02:00

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