Subversion Repositories svn1

Rev

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