14 #include "snippetitem.h"
16 #include <tdeaction.h>
20 SnippetItem::SnippetItem(TQListView * parent, TQString name, TQString text )
21 : TQListViewItem( parent, name ), action(0)
29 SnippetItem::SnippetItem(TQListViewItem * parent, TQString name, TQString text)
30 : TQListViewItem( parent, name ), action(0)
38 SnippetItem::~SnippetItem()
50 TQString SnippetItem::getName()
59 TQString SnippetItem::getText()
68 void SnippetItem::setText(TQString text)
77 void SnippetItem::setName(TQString name)
82 void SnippetItem::resetParent()
86 iParent = group->getId();
90 TDEAction* SnippetItem::getAction()
95 void SnippetItem::setAction(TDEAction * anAction)
100 void SnippetItem::slotExecute()
102 emit execute(
this );
106 SnippetItem * SnippetItem::findItemByName(TQString name, TQPtrList<SnippetItem> &list)
108 for (
SnippetItem * item = list.first(); item; item = list.next() ) {
109 if (item->getName() == name)
115 SnippetGroup * SnippetItem::findGroupById(
int id, TQPtrList<SnippetItem> &list)
117 for (
SnippetItem * item = list.first(); item; item = list.next() ) {
119 if (group && group->getId() == id)
130 int SnippetGroup::iMaxId = 1;
132 SnippetGroup::SnippetGroup(TQListView * parent, TQString name,
int id)
145 SnippetGroup::~SnippetGroup()
149 void SnippetGroup::setId(
int id)
156 #include "snippetitem.moc"
This class represents one group in the listview.
This class represents one CodeSnippet-Item in the listview.