KVIrc  4.9.2
DeveloperAPIs
KviWebPackageManagementDialog.h
Go to the documentation of this file.
1 #ifndef _KviWebPackageManagementDialog_h_
2 #define _KviWebPackageManagementDialog_h_
3 //=============================================================================
4 //
5 // File : KviWebPackageManagementDialog.h
6 // Creation date : Thu 17 Mar 2011 15:21:06
7 //
8 // This file is part of the KVIrc IRC Client distribution
9 // Copyright (C) 2011 Alessandro Carbone <elfonol at gmail dot com>
10 // Copyright (C) 2011 Szymon Stefanek <pragma at kvirc dot net>
11 //
12 // This program is FREE software. You can redistribute it and/or
13 // modify it under the terms of the GNU General Public License
14 // as published by the Free Software Foundation; either version 2
15 // of the License, or (at your option) any later version.
16 //
17 // This program is distributed in the HOPE that it will be USEFUL,
18 // but WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20 // See the GNU General Public License for more details.
21 //
22 // You should have received a copy of the GNU General Public License
23 // along with this program. If not, write to the Free Software Foundation,
24 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25 //
26 //=============================================================================
27 
28 #include "kvi_settings.h"
29 
30 #ifdef COMPILE_WEBKIT_SUPPORT
31 
32 #include <QWidget>
33 
34 class QToolBar;
35 class QVBoxLayout;
36 class QWebView;
37 class QFile;
38 class QProgressBar;
39 class QUrl;
40 
47 class KVIRC_API KviWebPackageManagementDialog : public QWidget
48 {
49  Q_OBJECT
50 
51 public:
55  KviWebPackageManagementDialog(QWidget * pParent = NULL);
56 
61  virtual ~KviWebPackageManagementDialog();
62 
63 private:
64  QToolBar * m_pToolBar;
65  QVBoxLayout * m_pLayout;
66  QWebView * m_pWebView;
67  bool m_bBusy;
68  QProgressBar * m_pProgressBar;
69  QString m_szPackagePageUrl;
70  QString m_szLocalTemporaryPath;
71 
72 protected:
73  void setPackagePageUrl(const QString & szUrl);
74  virtual void showEvent(QShowEvent * e);
75 
76  virtual bool packageIsInstalled(const QString & szId, const QString & szVersion) = 0;
77  virtual bool installPackage(const QString & szPath, QString & szError) = 0;
78 
79 protected slots:
80 
81  void slotLoadFinished(bool ok);
82  void slotLoadProgress(int iProgress);
83  void slotDataTransferProgress(qint64 iDone, qint64 iTotal);
84  void slotCommandFinished();
85  void slotLinkClicked(const QUrl & url);
86 
87 }; // class KviWebPackageManagementDialog
88 
89 #endif //COMPILE_WEBKIT_SUPPORT
90 
91 #endif
#define KVIRC_API
Definition: kvi_settings.h:128
char * NULL
Definition: KviIrcNumericCodes.h:391
#define e
Definition: detector.cpp:69
QString szUrl
Definition: libkvisetup.cpp:46
This file contains compile time settings.