ZIMA CAD Parts
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
techspecswebview.h
Go to the documentation of this file.
1 /*
2  ZIMA-CAD-Parts
3  http://www.zima-construction.cz/software/ZIMA-Parts
4 
5  Copyright (C) 2011-2012 Jakub Skokan <aither@havefun.cz>
6 
7  This program is free software: you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation, either version 3 of the License, or
10  (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20 
21 #ifndef TECHSPECSWEBVIEW_H
22 #define TECHSPECSWEBVIEW_H
23 
24 #include <QWebView>
25 #include <QNetworkReply>
26 #include "transferhandler.h"
27 
28 class DownloadModel;
29 struct File;
30 
31 class TechSpecsWebView : public QWebView, public TransferHandler
32 {
33  Q_OBJECT
34 public:
35  explicit TechSpecsWebView(QWidget *parent = 0);
36  void setRootPath(QString path);
37  void setDownloadDirectory(QString path);
38  void stopDownload();
39  void resumeDownload();
40  void clearQueue();
41 
42 signals:
43 
44 public slots:
45  void loadAboutPage();
46 
47 protected:
48  TechSpecsWebView *createWindow(QWebPage::WebWindowType type);
49 
50 private slots:
51  void pageLoaded(bool ok);
52  void urlChange(const QUrl &url);
53  void downloadFile(QNetworkReply *reply, File *f = 0);
54 
55 private:
56  QString m_rootPath;
57  QString m_dlDir;
58  DownloadModel *m_downloadModel;
59 
60 };
61 
62 #endif // TECHSPECSWEBVIEW_H
Definition: techspecswebview.h:31
void setRootPath(QString path)
Definition: techspecswebview.cpp:50
TechSpecsWebView(QWidget *parent=0)
Definition: techspecswebview.cpp:36
void resumeDownload()
Definition: techspecswebview.cpp:68
void setDownloadDirectory(QString path)
Definition: techspecswebview.cpp:55
Definition: transferhandler.h:4
Definition: item.h:41
TechSpecsWebView * createWindow(QWebPage::WebWindowType type)
Definition: techspecswebview.cpp:98
void clearQueue()
Definition: techspecswebview.cpp:77
Definition: downloadmodel.h:39
void loadAboutPage()
Definition: techspecswebview.cpp:85
void stopDownload()
Definition: techspecswebview.cpp:60