Subversion Repositories svn1

Rev

Rev 204 | Rev 207 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
156 - 1
#ifndef QMREPORTWINDOW_H
2
#define QMREPORTWINDOW_H
3
 
4
#include <QTabWidget>
204 - 5
#include <QLineEdit>
6
#include <QPushButton>
205 - 7
#include <QWebView>
8
#include <QUrl>
156 - 9
 
168 david 10
class QWidget;
205 - 11
class QmWebView;
156 - 12
 
204 - 13
class QmReportWindow : public QWidget
156 - 14
{
15
    Q_OBJECT
16
 
17
public:
18
    explicit QmReportWindow(QWidget *parent = 0);
19
    ~QmReportWindow();
203 - 20
    void addReport(const QString &report, const QString &name);
204 - 21
 
22
private:
23
    QTabWidget *tabWidget;
24
    QLineEdit *tabPath;
25
    QPushButton *pb_original;
26
    QPushButton *pb_back;
205 - 27
    QPushButton *pb_forward;
204 - 28
    QPushButton *pb_print;
205 - 29
    QmWebView *currentWebView;
204 - 30
 
31
private slots:
32
    void deleteTab(int tab);
33
    void tabChanged(int tab);
34
    void back(void);
205 - 35
    void forward(void);
36
    void home(void);
156 - 37
};
38
 
205 - 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
 
156 - 48
#endif // QMREPORTWINDOW_H