21 #ifndef KCOMPLETION_PRIVATE_H 22 #define KCOMPLETION_PRIVATE_H 25 #include <ksortablevaluelist.h> 29 #include <kallocator.h> 34 class KDECORE_EXPORT KCompTreeNodeList
37 KCompTreeNodeList() : first(0), last(0), m_count(0) {}
46 uint count()
const {
return m_count; }
53 typedef KCompTreeNodeList KCompTreeChildren;
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 KCompTreeChildren * children()
const {
122 return myChildren.at(index);
125 return myChildren.begin();
128 return myChildren.end();
137 KCompTreeNodeList myChildren;
149 class KDECORE_EXPORT KCompletionMatchesWrapper
152 KCompletionMatchesWrapper(
bool sort =
false )
156 ~KCompletionMatchesWrapper() {
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;
216 #endif // KCOMPLETION_PRIVATE_H void insert(Key i, const T &t)
Insert a KSortableItem with the given values.
KSortableValueList is a special TQValueList for KSortableItem.
const KShortcut & insert()
Toggle insert/overwrite (with visual feedback, e.g.
A helper class for KCompletion.
Memory allocator for large groups of small objects.
const KShortcut & end()
Goto end of the document.