KVIrc  4.9.2
DeveloperAPIs
AddonManagementDialog.h
Go to the documentation of this file.
1 #ifndef _MANAGEMENTDIALOG_H_
2 #define _MANAGEMENTDIALOG_H_
3 //=============================================================================
4 //
5 // File : AddonManagementDialog.h
6 // Creation date : Fri 08 Apr 2005 14:54:56 by Szymon Stefanek
7 //
8 // This file is part of the KVIrc IRC Client distribution
9 // Copyright (C) 2005-2010 Szymon Stefanek <pragma at kvirc dot net>
10 //
11 // This program is FREE software. You can redistribute it and/or
12 // modify it under the terms of the GNU General Public License
13 // as published by the Free Software Foundation; either version 2
14 // of the License, or (at your option) any later version.
15 //
16 // This program is distributed in the HOPE that it will be USEFUL,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19 // See the GNU General Public License for more details.
20 //
21 // You should have received a copy of the GNU General Public License
22 // along with this program. If not, write to the Free Software Foundation,
23 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 //
25 //=============================================================================
26 
27 #include "kvi_settings.h"
28 #include "KviTalListWidget.h"
29 
30 #include <QWidget>
31 #include <QLabel>
32 #include <QColor>
33 #include <QTextDocument>
34 #include <QListWidget>
35 #include <QItemDelegate>
36 #include <QToolButton>
37 #include <QPointer>
38 
39 class QPixmap;
40 class KviKvsScriptAddon;
41 
43 {
44 public:
47 
48 protected:
50  QTextDocument * m_pText;
51  QPixmap * m_pIcon;
52  QListWidget * m_pListWidget;
53  QString m_szKey;
54 
55 public:
56  KviKvsScriptAddon * addon() { return m_pAddon; };
57 };
58 
59 #ifdef COMPILE_WEBKIT_SUPPORT
60 class WebAddonInterfaceDialog;
61 #endif //COMPILE_WEBKIT_SUPPORT
62 
63 class AddonManagementDialog : public QWidget
64 {
65  Q_OBJECT
66 protected:
67  AddonManagementDialog(QWidget * p);
68 
69 public:
71 
72 protected:
75  QToolButton * m_pConfigureButton;
76  QToolButton * m_pHelpButton;
77  QToolButton * m_pPackButton;
78  QToolButton * m_pUninstallButton;
79 #ifdef COMPILE_WEBKIT_SUPPORT
80  QPointer<WebAddonInterfaceDialog> m_pWebInterfaceDialog;
81 #endif //COMPILE_WEBKIT_SUPPORT
82 public:
83  static AddonManagementDialog * instance() { return m_pInstance; };
84  static void display(bool bTopLevel);
85  static void cleanup();
86 
87 protected:
88  void fillListView();
89  virtual void closeEvent(QCloseEvent * e);
90 protected slots:
91  void currentChanged(QListWidgetItem * i, QListWidgetItem *);
92  void closeClicked();
93  void configureScript();
94  void showScriptHelp();
95  void packScript();
96  void uninstallScript();
97  void getMoreScripts();
98  void installScript();
99  virtual void reject();
100 };
101 
102 #endif
QToolButton * m_pHelpButton
Definition: AddonManagementDialog.h:76
Definition: KviTalListWidget.h:35
AddonManagementDialog(QWidget *p)
Definition: AddonManagementDialog.cpp:94
QString m_szKey
Definition: AddonManagementDialog.h:53
#define a
Definition: detector.cpp:91
virtual void reject()
Definition: AddonManagementDialog.cpp:407
void closeClicked()
Definition: AddonManagementDialog.cpp:353
static void cleanup()
Definition: AddonManagementDialog.cpp:358
void configureScript()
Definition: AddonManagementDialog.cpp:253
Definition: AddonManagementDialog.h:42
QTextDocument * m_pText
Definition: AddonManagementDialog.h:50
AddonListViewItem(KviTalListWidget *v, KviKvsScriptAddon *a)
Definition: AddonManagementDialog.cpp:66
#define e
Definition: detector.cpp:69
#define i
Definition: detector.cpp:73
~AddonListViewItem()
Definition: AddonManagementDialog.cpp:89
void packScript()
Definition: AddonManagementDialog.cpp:263
void showScriptHelp()
Definition: AddonManagementDialog.cpp:243
KviKvsScriptAddon * addon()
Definition: AddonManagementDialog.h:56
~AddonManagementDialog()
Definition: AddonManagementDialog.cpp:201
void fillListView()
Definition: AddonManagementDialog.cpp:211
void currentChanged(QListWidgetItem *i, QListWidgetItem *)
Definition: AddonManagementDialog.cpp:226
virtual void closeEvent(QCloseEvent *e)
Definition: AddonManagementDialog.cpp:401
void uninstallScript()
Definition: AddonManagementDialog.cpp:270
QPixmap * m_pIcon
Definition: AddonManagementDialog.h:51
QToolButton * m_pConfigureButton
Definition: AddonManagementDialog.h:75
void getMoreScripts()
Definition: AddonManagementDialog.cpp:293
QListWidget * m_pListWidget
Definition: AddonManagementDialog.h:52
static void display(bool bTopLevel)
Definition: AddonManagementDialog.cpp:366
Definition: KviKvsScriptAddonManager.h:39
Definition: KviTalListWidget.h:51
QToolButton * m_pUninstallButton
Definition: AddonManagementDialog.h:78
static AddonManagementDialog * m_pInstance
Definition: AddonManagementDialog.h:74
QToolButton * m_pPackButton
Definition: AddonManagementDialog.h:77
static AddonManagementDialog * instance()
Definition: AddonManagementDialog.h:83
KviKvsScriptAddon * m_pAddon
Definition: AddonManagementDialog.h:49
This file contains compile time settings.
Definition: AddonManagementDialog.h:63
#define v
Definition: detector.cpp:86
#define p
Definition: detector.cpp:80
KviTalListWidget * m_pListWidget
Definition: AddonManagementDialog.h:73
void installScript()
Definition: AddonManagementDialog.cpp:305