KVIrc  4.9.2
DeveloperAPIs
KviInputHistory.h
Go to the documentation of this file.
1 #ifndef _KVI_INPUT_HISTORY_H_
2 #define _KVI_INPUT_HISTORY_H_
3 //============================================================================
4 //
5 // File : KviInputHistory.h
6 // Creation date : Fri Sep 5 2008 17:26:34 by Elvio Basello
7 //
8 // This file is part of the KVIrc IRC client distribution
9 // Copyright (C) 2008 Elvio Basello (hellvis69 at netsons dot org)
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 // This file was originally part of KviInput.h
27 //============================================================================
28 
38 #include "kvi_settings.h"
39 #include "KviPointerList.h"
40 
41 #define KVI_INPUT_MAX_GLOBAL_HISTORY_ENTRIES 500
42 #define KVI_INPUT_MAX_LOCAL_HISTORY_ENTRIES 50
43 
49 {
50 private:
52  static unsigned int m_uCount;
53 
54 protected:
56 
57 public:
66  ~KviInputHistory();
67 
72  static void init();
73 
78  static void done();
79 
84  static inline KviInputHistory * instance() { return m_pSelf; };
85 
90  unsigned int count() { return m_uCount; };
91 
96  static void addRef();
97 
102  static void delRef();
103 
109  void add(QString * szString);
110 
115  KviPointerList<QString> * list() { return m_pStringList; };
116 
122  void save(const QString & szFileName);
123 
129  void load(const QString & szFileName);
130 };
131 
132 #endif //_KVI_INPUT_HISTORY_H_
#define KVIRC_API
Definition: kvi_settings.h:128
KviPointerList< QString > * list()
Returns the list of string in the history.
Definition: KviInputHistory.h:115
static unsigned int m_uCount
Definition: KviInputHistory.h:52
void done()
Definition: KviKvs.cpp:50
bool save(KviThemeInfo &options, bool bSaveIcons)
Definition: KviOptions.cpp:986
static KviInputHistory * m_pSelf
Definition: KviInputHistory.h:51
Input history class.
Definition: KviInputHistory.h:48
C++ Template based double linked pointer list class.
KviPointerList< QString > * m_pStringList
Definition: KviInputHistory.h:55
unsigned int count()
Returns the number of instances of the class.
Definition: KviInputHistory.h:90
static KviInputHistory * instance()
Returns the instance of the class.
Definition: KviInputHistory.h:84
int init()
Definition: winamp.cpp:118
This file contains compile time settings.