Subversion Repositories svn1-original

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
160 - 1
#ifndef QMREPORTWINDOW_H
2
#define QMREPORTWINDOW_H
3
 
4
#include <QTabWidget>
208 - 5
#include <QLineEdit>
6
#include <QPushButton>
209 - 7
#include <QWebView>
8
#include <QUrl>
160 - 9
 
172 david 10
class QWidget;
209 - 11
class QmWebView;
160 - 12
 
208 - 13
class QmReportWindow : public QWidget
160 - 14
{
15
    Q_OBJECT
16
 
17
public:
18
    explicit QmReportWindow(QWidget *parent = 0);
19
    ~QmReportWindow();
207 - 20
    void addReport(const QString &report, const QString &name);
208 - 21
 
22
private:
23
    QTabWidget *tabWidget;
24
    QLineEdit *tabPath;
25
    QPushButton *pb_original;
26
    QPushButton *pb_back;
209 - 27
    QPushButton *pb_forward;
208 - 28
    QPushButton *pb_print;
209 - 29
    QmWebView *currentWebView;
208 - 30
 
31
private slots:
32
    void deleteTab(int tab);
33
    void tabChanged(int tab);
34
    void back(void);
209 - 35
    void forward(void);
36
    void home(void);
160 - 37
};
38
 
209 - 39
class QmWebView : public QWebView
40
{
41
public:
42
    QmWebView(QWidget * parent = 0 ) : QWebView(parent) {}
43
    void setUrl(const QString &url) { homeUrl = url; QWebView::setUrl(QUrl(url,QUrl::TolerantMode)); }
44
    void home(void) { QWebView::setUrl(QUrl(homeUrl,QUrl::TolerantMode)); }
45
    QString homeUrl;
46
};
47
 
160 - 48
#endif // QMREPORTWINDOW_H