1
//=============================================================================
3
// File : kvi_kvs_treenode_command.cpp
4
// Creation date : Thu 09 Oct 2003 01:49:40 by Szymon Stefanek
6
// This file is part of the KVIrc IRC client distribution
7
// Copyright (C) 2003-2008 Szymon Stefanek <pragma at kvirc dot net>
9
// This program is FREE software. You can redistribute it and/or
10
// modify it under the terms of the GNU General Public License
11
// as published by the Free Software Foundation; either version 2
12
// of the License, or (at your opinion) any later version.
14
// This program is distributed in the HOPE that it will be USEFUL,
15
// but WITHOUT ANY WARRANTY; without even the implied warranty of
16
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17
// See the GNU General Public License for more details.
19
// You should have received a copy of the GNU General Public License
20
// along with this program. If not, write to the Free Software Foundation,
21
// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23
//=============================================================================
25
#include "kvi_kvs_treenode_command.h"
26
#include "kvi_kvs_treenode_switchlist.h"
28
KviKvsTreeNodeCommand::KviKvsTreeNodeCommand(const QChar * pLocation,const QString &szCmdName)
29
: KviKvsTreeNodeInstruction(pLocation)
31
m_szCmdName = szCmdName;
35
KviKvsTreeNodeCommand::~KviKvsTreeNodeCommand()
37
if(m_pSwitches)delete m_pSwitches;
40
//#warning "All the dump() functions could be killed (or moved to print on the kvirc windows)"
42
void KviKvsTreeNodeCommand::contextDescription(QString &szBuffer)
44
KviQString::sprintf(szBuffer,"Command \"%s\"",&m_szCmdName);
47
void KviKvsTreeNodeCommand::dump(const char * prefix)
49
qDebug("%s Command(%s)",prefix,m_szCmdName.toUtf8().data());
50
dumpSwitchList(prefix);
53
void KviKvsTreeNodeCommand::dumpSwitchList(const char * prefix)
55
if(!m_pSwitches)return;
58
m_pSwitches->dump(tmp.toUtf8().data());
61
void KviKvsTreeNodeCommand::setSwitchList(KviKvsTreeNodeSwitchList * sw)
64
m_pSwitches->setParent(this);