You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
755 B
50 lines
755 B
%{CPP_TEMPLATE}
|
|
|
|
#include "%{APPNAMELC}.h"
|
|
#include <kdebug.h>
|
|
#include <kapplication.h>
|
|
|
|
%{APPNAME}::%{APPNAME}() : DCOPObject("serviceInterface")
|
|
{
|
|
kdDebug() << "Starting new service... " << endl;
|
|
m_List = TQStringList();
|
|
}
|
|
|
|
%{APPNAME}::~%{APPNAME}()
|
|
{
|
|
kdDebug() << "Going away... " << endl;
|
|
}
|
|
|
|
TQString %{APPNAME}::string(int idx)
|
|
{
|
|
return *m_List.at(idx);
|
|
}
|
|
|
|
TQStringList %{APPNAME}::list()
|
|
{
|
|
return m_List;
|
|
}
|
|
|
|
void %{APPNAME}::add(TQString arg)
|
|
{
|
|
kdDebug() << "Adding " << arg << " to the list" << endl;
|
|
m_List << arg;
|
|
}
|
|
|
|
bool %{APPNAME}::remove(TQString arg)
|
|
{
|
|
TQStringList::Iterator it = m_List.find(arg);
|
|
if (it != m_List.end())
|
|
{
|
|
m_List.remove(it);
|
|
}
|
|
else
|
|
return false;
|
|
return true;
|
|
}
|
|
|
|
bool %{APPNAME}::exit()
|
|
{
|
|
kapp->quit();
|
|
}
|