21 #ifndef KCOMPLETION_PRIVATE_H
22 #define KCOMPLETION_PRIVATE_H
25 #include <ksortablevaluelist.h>
29 #include <kallocator.h>
34 class TDECORE_EXPORT TDECompTreeNodeList
37 TDECompTreeNodeList() : first(0), last(0), m_count(0) {}
46 uint count()
const {
return m_count; }
53 typedef TDECompTreeNodeList TDECompTreeChildren;
93 void *
operator new(
size_t s ) {
94 return alloc.allocate( s );
96 void operator delete(
void * s ) {
97 alloc.deallocate( s );
104 while (cur && (*cur != ch)) cur = cur->next;
108 void remove(
const TQString& );
110 inline int childrenCount()
const {
return myChildren.count(); }
113 inline void confirm() { myWeight++; }
114 inline void confirm(uint w) { myWeight += w; }
115 inline void decline() { myWeight--; }
116 inline uint weight()
const {
return myWeight; }
118 inline const TDECompTreeChildren * children()
const {
122 return myChildren.at(index);
125 return myChildren.begin();
128 return myChildren.end();
137 TDECompTreeNodeList myChildren;
149 class TDECORE_EXPORT TDECompletionMatchesWrapper
152 TDECompletionMatchesWrapper(
bool sort =
false )
156 ~TDECompletionMatchesWrapper() {
160 void setSorting(
bool sort ) {
161 if ( sort && !sortedList )
171 bool sorting()
const {
172 return sortedList != 0L;
175 void append(
int i,
const TQString&
string ) {
177 sortedList->
insert( i,
string );
179 stringList.append(
string );
192 return sortedList->count();
193 return stringList.count();
196 bool isEmpty()
const {
200 TQString first()
const {
201 return list().first();
204 TQString last()
const {
205 return list().last();
208 TQStringList list()
const;
210 mutable TQStringList stringList;
KSortableValueList is a special TQValueList for KSortableItem.
void insert(Key i, const T &t)
Insert a KSortableItem with the given values.
A helper class for TDECompletion.
Memory allocator for large groups of small objects.
TDEAction * clear(const TQObject *recvr, const char *slot, TDEActionCollection *parent, const char *name=0)
const TDEShortcut & insert()
Toggle insert/overwrite (with visual feedback, e.g.
const TDEShortcut & end()
Goto end of the document.