1
#ifndef _KVI_KVS_USERACTION_H_
2
#define _KVI_KVS_USERACTION_H_
3
//=============================================================================
5
// File : kvi_kvs_useraction.h
6
// Creation date : Tue 07 Dec 2004 02:00:24 by Szymon Stefanek
8
// This file is part of the KVIrc IRC client distribution
9
// Copyright (C) 2004-2008 Szymon Stefanek <pragma at kvirc dot net>
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 opinion) any later version.
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.
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.
25
//=============================================================================
27
#include "kvi_settings.h"
28
#include "kvi_kvs_action.h"
33
class KVIRC_API KviKvsUserAction : public KviKvsAction
35
friend class KviActionManager;
40
const QString &szName,
41
const QString &szScriptCode,
42
const QString &szVisibleNameCode,
43
const QString &szDescriptionCode,
44
const QString &szCategory,
45
const QString &szBigIconId,
46
const QString &szSmallIconId,
48
const QString &szKeySequence = QString()
50
KviKvsUserAction(QObject * pParent);
53
// Static allocator function.
54
// This MUST be used by the modules to allocate action structures
55
// instead of the new operator.
56
// See kvi_heapobject.cpp for an explaination.
57
static KviKvsUserAction * createInstance(
59
const QString &szName,
60
const QString &szScriptCode,
61
const QString &szVisibleNameCode,
62
const QString &szDescriptionCode,
63
const QString &szCategory,
64
const QString &szBigIconId,
65
const QString &szSmallIconId,
67
const QString &szKeySequence = QString()
69
void suicide() { delete this; };
72
KviKvsScript * m_pDescriptionScript;
73
KviKvsScript * m_pVisibleNameScript;
75
virtual bool isKviUserActionNeverOverrideThis();
76
bool load(KviConfig * cfg);
77
void save(KviConfig * cfg);
79
virtual const QString & visibleName();
80
virtual const QString & description();
81
const QString & visibleNameCode();
82
const QString & descriptionCode();
83
const QString & category(){ return m_szCategory; };
84
static void exportToKvs(
86
const QString &szName,
87
const QString &szScriptCode,
88
const QString &szVisibleName,
89
const QString &szDescription,
90
const QString &szCategory,
91
const QString &szBigIcon,
92
const QString &szSmallIcon,
94
const QString &szKeySequence
96
void exportToKvs(QString &szBuffer);
100
#endif //!_KVI_KVS_USERACTION_H_