KVIrc  4.9.2
DeveloperAPIs
KviIrcUserDataBase.h
Go to the documentation of this file.
1 #ifndef _KVI_IRCUSERDB_H_
2 #define _KVI_IRCUSERDB_H_
3 
4 //=============================================================================
5 //
6 // File : KviIrcUserDataBase.h
7 // Creation date : Mon Jul 31 2000 20:59:12 by Szymon Stefanek
8 //
9 // This file is part of the KVIrc IRC client distribution
10 // Copyright (C) 2000-2010 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 
34 #include "kvi_settings.h"
35 #include "KviPointerHashTable.h"
36 #include "KviCString.h"
37 #include "KviAvatar.h"
39 #include "KviIrcUserEntry.h"
40 
45 class KVILIB_API KviIrcUserDataBase : public QObject
46 {
47  Q_OBJECT
48 public:
54 
59 
60 private:
62 
63 public:
68  void clear();
69 
77  KviIrcUserEntry * insertUser(const QString & szNick, const QString & szUser, const QString & szHost);
78 
84  KviIrcUserEntry * find(const QString & szNick) { return m_pDict->find(szNick); };
85 
92  bool removeUser(const QString & szNick, KviIrcUserEntry * pEntry);
93 
99 
105  KviRegisteredUser * registeredUser(const QString & szNick);
106 
114  KviRegisteredUser * registeredUser(const QString & szNick, const QString & szUser, const QString & szHost);
115 
121  bool haveCustomColor(const QString & szNick);
122 
128  QColor * customColor(const QString & szNick);
129 
134  void setupConnectionWithReguserDb();
135 protected slots:
141  void registeredUserChanged(const QString & szUser);
142 
148  void registeredUserAdded(const QString & szUser);
149 
154  void registeredDatabaseCleared();
155 };
156 
157 #endif //_KVI_IRCUSERDB_H_
KviPointerHashTable< QString, KviIrcUserEntry > * dict()
Returns the database dictionary.
Definition: KviIrcUserDataBase.h:98
Definition: KviRegisteredUser.h:35
btnDict clear()
Pointer Hash Table.
QString szHost
Definition: libkvisetup.cpp:45
Avatar handling.
User DB handling.
A class to handle the entries of the user database.
Definition: KviIrcUserEntry.h:45
The class which manages the user database.
Definition: KviIrcUserDataBase.h:45
KviIrcUserEntry * find(const QString &szNick)
Searches for a user in the database.
Definition: KviIrcUserDataBase.h:84
This file contains compile time settings.
#define KVILIB_API
Definition: kvi_settings.h:125
KviPointerHashTable< QString, KviIrcUserEntry > * m_pDict
Definition: KviIrcUserDataBase.h:61