Subversion Repositories svn1

Rev

Rev 205 | 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>
207 - 9
#include <QAction>
156 - 10
 
168 david 11
class QWidget;
207 - 12
class QPrinter;
205 - 13
class QmWebView;
156 - 14
 
204 - 15
class QmReportWindow : public QWidget
156 - 16
{
17
    Q_OBJECT
18
 
19
public:
20
    explicit QmReportWindow(QWidget *parent = 0);
21
    ~QmReportWindow();
203 - 22
    void addReport(const QString &report, const QString &name);
204 - 23
 
24
private:
25
    QTabWidget *tabWidget;
26
    QLineEdit *tabPath;
207 - 27
    QAction *pb_original;
28
    QAction *pb_back;
29
    QAction *pb_forward;
30
    QAction *pb_print;
205 - 31
    QmWebView *currentWebView;
204 - 32
 
33
private slots:
34
    void deleteTab(int tab);
35
    void tabChanged(int tab);
36
    void back(void);
205 - 37
    void forward(void);
38
    void home(void);
207 - 39
    void print(void);
40
    void printPreview(QPrinter * printer);
156 - 41
};
42
 
205 - 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
 
156 - 52
#endif // QMREPORTWINDOW_H