KVIrc 5.2.6
Developer APIs
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
27//
28// This file was originally part of KviInput.h
29//
30
40#include "kvi_settings.h"
41
42#include <vector>
43
44class QString;
45
46#define KVI_INPUT_MAX_GLOBAL_HISTORY_ENTRIES 500
47#define KVI_INPUT_MAX_LOCAL_HISTORY_ENTRIES 50
48
54{
55private:
57
58protected:
59 std::vector<QString> m_StringList;
60
61public:
66 static void init();
67
72 static void done();
73
78 static inline KviInputHistory * instance() { return m_pSelf; };
79
85 void add(const QString & szString);
86
91 std::vector<QString> list() { return m_StringList; };
92
98 void save(const QString & szFileName);
99
105 void load(const QString & szFileName);
106};
107
108#endif //_KVI_INPUT_HISTORY_H_
Input history class.
Definition KviInputHistory.h:54
static KviInputHistory * instance()
Returns the instance of the class.
Definition KviInputHistory.h:78
std::vector< QString > m_StringList
Definition KviInputHistory.h:59
static KviInputHistory * m_pSelf
Definition KviInputHistory.h:56
std::vector< QString > list()
Returns the list of string in the history.
Definition KviInputHistory.h:91
This file contains compile time settings.
#define KVIRC_API
Definition kvi_settings.h:127
int init()
Definition winamp.cpp:118