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>
211 - 9
#include <QAction>
160 - 10
 
172 david 11
class QWidget;
211 - 12
class QPrinter;
209 - 13
class QmWebView;
160 - 14
 
208 - 15
class QmReportWindow : public QWidget
160 - 16
{
17
    Q_OBJECT
18
 
19
public:
20
    explicit QmReportWindow(QWidget *parent = 0);
21
    ~QmReportWindow();
207 - 22
    void addReport(const QString &report, const QString &name);
208 - 23
 
24
private:
25
    QTabWidget *tabWidget;
26
    QLineEdit *tabPath;
211 - 27
    QAction *pb_original;
28
    QAction *pb_back;
29
    QAction *pb_forward;
30
    QAction *pb_print;
209 - 31
    QmWebView *currentWebView;
208 - 32
 
33
private slots:
34
    void deleteTab(int tab);
35
    void tabChanged(int tab);
36
    void back(void);
209 - 37
    void forward(void);
38
    void home(void);
211 - 39
    void print(void);
40
    void printPreview(QPrinter * printer);
160 - 41
};
42
 
209 - 43
class QmWebView : public QWebView
44
{
45
public:
46
    QmWebView(QWidget * parent = 0 ) : QWebView(parent) {}
47
    void setUrl(const QString &url) { homeUrl = url; QWebView::setUrl(QUrl(url,QUrl::TolerantMode)); }
48
    void home(void) { QWebView::setUrl(QUrl(homeUrl,QUrl::TolerantMode)); }
49
    QString homeUrl;
50
};
51
 
160 - 52
#endif // QMREPORTWINDOW_H