Subversion Repositories svn1

Rev

Rev 258 | Rev 283 | 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;
280 david 32
    QAction *pb_explore;
33
    QAction *pb_openExternal;
207 - 34
    QAction *pb_print;
258 - 35
    QDoubleSpinBox *pb_size;
205 - 36
    QmWebView *currentWebView;
211 - 37
    QPrintPreviewDialog *printPreviewDialog;
258 - 38
    QmWebView *currentWebViewPrinter;
39
    QPrinter *printer;
204 - 40
 
41
private slots:
42
    void deleteTab(int tab);
43
    void tabChanged(int tab);
44
    void back(void);
205 - 45
    void forward(void);
46
    void home(void);
207 - 47
    void print(void);
48
    void printPreview(QPrinter * printer);
280 david 49
    void openLocation(void);
50
    void openExternal(void);
156 - 51
};
52
 
205 - 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
 
156 - 62
#endif // QMREPORTWINDOW_H