KVIrc  4.9.2
DeveloperAPIs
KviKvsPopupManager.h
Go to the documentation of this file.
1 #ifndef _KVI_KVS_POPUPMANAGER_H_
2 #define _KVI_KVS_POPUPMANAGER_H_
3 //=============================================================================
4 //
5 // File : KviKvsPopupManager.h
6 // Creation date : Tue 7 Jan 2004 02:11:41 by Szymon Stefanek
7 //
8 // This file is part of the KVIrc IRC client distribution
9 // Copyright (C) 2004-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 "KviKvsPopupMenu.h"
29 
30 class KVIRC_API KviKvsPopupManager : public QObject
31 {
32  Q_OBJECT
33 protected: // can only be created by init/done
36 
37 protected:
40 
41 public:
42  static KviKvsPopupManager * instance() { return m_pInstance; };
43  static void init();
44  static void done();
45  int popupCount() { return m_pPopupDict->count(); };
46 
48 
49  KviKvsPopupMenu * lookup(const QString & szPopupName) { return m_pPopupDict->find(szPopupName); };
50  KviKvsPopupMenu * get(const QString & szPopupName);
51  void add(const QString & szPopupName, KviKvsPopupMenu * pPopup);
52  void remove(const QString & szPopupName) { m_pPopupDict->remove(szPopupName); };
53  void clear() { m_pPopupDict->clear(); };
54 
55  void save(const QString & filename);
56  void load(const QString & filename);
57  void emitRefresh(const QString & szPopupName);
58 signals:
59  void popupRefresh(const QString & szPopupName);
60 };
61 
62 #endif
#define KVIRC_API
Definition: kvi_settings.h:128
static KviKvsPopupManager * m_pInstance
Definition: KviKvsPopupManager.h:39
void clear()
Definition: KviKvsPopupManager.h:53
void done()
Definition: KviKvs.cpp:50
bool save(KviThemeInfo &options, bool bSaveIcons)
Definition: KviOptions.cpp:986
KviPointerHashTable< QString, KviKvsPopupMenu > * m_pPopupDict
Definition: KviKvsPopupManager.h:38
Definition: KviKvsPopupMenu.h:270
int popupCount()
Definition: KviKvsPopupManager.h:45
KviPointerHashTable< QString, KviKvsPopupMenu > * popupDict()
Definition: KviKvsPopupManager.h:47
Definition: KviKvsPopupManager.h:30
static KviKvsPopupManager * instance()
Definition: KviKvsPopupManager.h:42
int init()
Definition: winamp.cpp:118
This file contains compile time settings.
KviKvsPopupMenu * lookup(const QString &szPopupName)
Definition: KviKvsPopupManager.h:49