Subversion Repositories svn1-original

Rev

Rev 262 | Rev 287 | Go to most recent revision | Details | Compare with Previous | 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>
262 - 10
#include <QDoubleSpinBox>
160 - 11
 
172 david 12
class QWidget;
211 - 13
class QPrinter;
209 - 14
class QmWebView;
215 - 15
class QPrintPreviewDialog;
160 - 16
 
208 - 17
class QmReportWindow : public QWidget
160 - 18
{
19
    Q_OBJECT
20
 
21
public:
22
    explicit QmReportWindow(QWidget *parent = 0);
23
    ~QmReportWindow();
207 - 24
    void addReport(const QString &report, const QString &name);
208 - 25
 
26
private:
27
    QTabWidget *tabWidget;
28
    QLineEdit *tabPath;
211 - 29
    QAction *pb_original;
30
    QAction *pb_back;
31
    QAction *pb_forward;
284 david 32
    QAction *pb_explore;
33
    QAction *pb_openExternal;
211 - 34
    QAction *pb_print;
262 - 35
    QDoubleSpinBox *pb_size;
209 - 36
    QmWebView *currentWebView;
215 - 37
    QPrintPreviewDialog *printPreviewDialog;
262 - 38
    QmWebView *currentWebViewPrinter;
39
    QPrinter *printer;
208 - 40
 
41
private slots:
42
    void deleteTab(int tab);
43
    void tabChanged(int tab);
44
    void back(void);
209 - 45
    void forward(void);
46
    void home(void);
211 - 47
    void print(void);
48
    void printPreview(QPrinter * printer);
284 david 49
    void openLocation(void);
50
    void openExternal(void);
160 - 51
};
52
 
209 - 53
class QmWebView : public QWebView
54
{
55
public:
56
    QmWebView(QWidget * parent = 0 ) : QWebView(parent) {}
57
    void setUrl(const QString &url) { homeUrl = url; QWebView::setUrl(QUrl(url,QUrl::TolerantMode)); }
58
    void home(void) { QWebView::setUrl(QUrl(homeUrl,QUrl::TolerantMode)); }
59
    QString homeUrl;
60
};
61
 
160 - 62
#endif // QMREPORTWINDOW_H