1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
|
/*
* kmail: KDE mail client
* Copyright (c) 1996-1998 Stefan Taferner <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#ifndef kmfilteraction_h
#define kmfilteraction_h
#include <kmime_mdn.h>
#include <tqstring.h>
#include <tqstringlist.h>
#include <tqdict.h>
#include <tqptrlist.h>
#include <tqvaluelist.h>
#include <tqguardedptr.h>
#include <tqwidget.h>
class KMMsgBase;
class KMMessage;
class TQWidget;
class KMFolder;
class KTempFile;
//=========================================================
//
// class KMFilterAction
//
//=========================================================
/** Abstract base class for KMail's filter actions. All it can do is
hold a name (ie. type-string). There are several sub-classes that
inherit form this and are capable of providing parameter handling
(import/export as string, a widget to allow editing, etc.)
@short Abstract base class for KMail's filter actions.
@author Marc Mutz <[email protected]>, based on work by Stefan Taferner <[email protected]>.
@see KMFilter KMFilterMgr
*/
class KMFilterAction
{
public:
/** Possible return codes of process:
@li @p ErrorNeedComplete: Could not process because a
complete message is needed.
@li @p GoOn: Go on with applying filter actions.
@li @p ErrorButGoOn: There was a non-critical error (e.g. an
invalid address in the 'forward' action), but the processing
should continue.
@li @p CriticalError: A critical error has occurred during
processing (e.g. "disk full").
*/
enum ReturnCode { ErrorNeedComplete = 0x1, GoOn = 0x2, ErrorButGoOn = 0x4,
CriticalError = 0x8 };
/** Initialize filter action with (english) name @p aName and
(internationalized) label @p aLabel. */
KMFilterAction(const char* aName, const TQString aLabel);
virtual ~KMFilterAction();
/** Returns nationalized label, ie. the one which is presented in
the filter dialog. */
const TQString label() const { return mLabel; }
/** Returns english name, ie. the one under which it is known in the
config. */
const TQString name() const { return mName; }
/** Execute action on given message. Returns @p CriticalError if a
critical error has occurred (eg. disk full), @p ErrorButGoOn if
there was a non-critical error (e.g. invalid address in
'forward' action), @p ErrorNeedComplete if a complete message
is required, @p GoOn if the message shall be processed by
further filters and @p Ok otherwise.
*/
virtual ReturnCode process(KMMessage* msg) const = 0;
/** Execute an action on given message asynchronously.
Emits a result signal on completion.
*/
virtual void processAsync(KMMessage* msg) const;
/** Determines if the action depends on the body of the message
*/
virtual bool requiresBody(KMMsgBase* msgBase) const;
/** Determines whether this action is valid. But this is just a
quick test. Eg., actions that have a mail address as parameter
shouldn't try real address validation, but only check if the
string representation is empty. */
virtual bool isEmpty() const { return FALSE; }
/** Creates a widget for setting the filter action parameter. Also
sets the value of the widget. */
virtual TQWidget* createParamWidget(TQWidget* tqparent) const;
/** The filter action shall set it's parameter from the widget's
contents. It is allowed that the value is read by the action
before this function is called. */
virtual void applyParamWidgetValue(TQWidget* paramWidget);
/** The filter action shall set it's widget's contents from it's
parameter. */
virtual void setParamWidgetValue(TQWidget* paramWidget) const;
/** The filter action shall clear it's parameter widget's
contents. */
virtual void clearParamWidget(TQWidget* paramWidget) const;
/** Read extra arguments from given string. */
virtual void argsFromString(const TQString argsStr) = 0;
/** Return extra arguments as string. Must not contain newlines. */
virtual const TQString argsAsString() const = 0;
/** Returns a translated string describing this filter for visualization
purposes, e.g. in the filter log. */
virtual const TQString displayString() const = 0;
/** Called from the filter when a folder is removed. Tests if the
folder @p aFolder is used and changes to @p aNewFolder in this
case. Returns TRUE if a change was made. */
virtual bool folderRemoved(KMFolder* aFolder, KMFolder* aNewFolder);
/** Static function that creates a filter action of this type. */
static KMFilterAction* newAction();
/** Temporarily open folder. Will be closed by the next
KMFilterMgr::cleanup() call. */
static int tempOpenFolder(KMFolder* aFolder);
/** Automates the sending of MDNs from filter actions. */
static void sendMDN( KMMessage * msg, KMime::MDN::DispositionType d,
const TQValueList<KMime::MDN::DispositionModifier> & m
=TQValueList<KMime::MDN::DispositionModifier>() );
private:
TQString mName;
TQString mLabel;
};
//=========================================================
//
// class KMFilterActionWithNone
//
//=========================================================
/** Abstract base class for KMail's filter actions that need no
parameter, e.g. "Confirm Delivery". Creates an (empty) TQWidget as
parameter widget. A subclass of this must provide at least
implementations for the following methods:
@li virtual KMFilterAction::ReturnCodes KMFilterAction::process
@li static KMFilterAction::newAction
@short Abstract base class for filter actions with no parameter.
@author Marc Mutz <[email protected]>, based upon work by Stefan Taferner <[email protected]>
@see KMFilterAction KMFilter
*/
class KMFilterActionWithNone : public KMFilterAction
{
public:
/** Initialize filter action with (english) name @p aName. This is
the name under which this action is known in the config file. */
KMFilterActionWithNone(const char* aName, const TQString aLabel);
/** Read extra arguments from given string. This type of filter
action has no parameters, so this is a no-op. */
virtual void argsFromString(const TQString) {};
/** Return extra arguments as string. Must not contain newlines. We
return TQString(), because we have no parameter. */
virtual const TQString argsAsString() const { return TQString(); }
/** Returns a translated string describing this filter for visualization
purposes, e.g. in the filter log. */
virtual const TQString displayString() const;
};
//=========================================================
//
// class KMFilterActionWithString
//
//=========================================================
/** Abstract base class for KMail's filter actions that need a
free-form parameter, e.g. 'set transport' or 'set reply to'. Can
create a TQLineEdit as parameter widget. A subclass of this
must provide at least implementations for the following methods:
@li virtual KMFilterAction::ReturnCodes KMFilterAction::process
@li static KMFilterAction::newAction
@short Abstract base class for filter actions with a free-form string as parameter.
@author Marc Mutz <[email protected]>, based upon work by Stefan Taferner <[email protected]>
@see KMFilterAction KMFilter
*/
class KMFilterActionWithString : public KMFilterAction
{
public:
/** Initialize filter action with (english) name @p aName. This is
the name under which this action is known in the config file. */
KMFilterActionWithString(const char* aName, const TQString aLabel);
/** Determines whether this action is valid. But this is just a
quick test. Eg., actions that have a mail address as parameter
shouldn't try real address validation, but only check if the
string representation is empty. */
virtual bool isEmpty() const { return mParameter.stripWhiteSpace().isEmpty(); }
/** Creates a widget for setting the filter action parameter. Also
sets the value of the widget. */
virtual TQWidget* createParamWidget(TQWidget* tqparent) const;
/** The filter action shall set it's parameter from the widget's
contents. It is allowed that the value is read by the action
before this function is called. */
virtual void applyParamWidgetValue(TQWidget* paramWidget);
/** The filter action shall set it's widget's contents from it's
parameter. */
virtual void setParamWidgetValue(TQWidget* paramWidget) const;
/** The filter action shall clear it's parameter widget's
contents. */
virtual void clearParamWidget(TQWidget* paramWidget) const;
/** Read extra arguments from given string. */
virtual void argsFromString(const TQString argsStr);
/** Return extra arguments as string. Must not contain newlines. */
virtual const TQString argsAsString() const;
/** Returns a translated string describing this filter for visualization
purposes, e.g. in the filter log. */
virtual const TQString displayString() const;
protected:
TQString mParameter;
};
//=========================================================
//
// class KMFilterActionWithUOID
//
//=========================================================
/** Abstract base class for KMail's filter actions that need a
parameter that has a UOID, e.g. "set identity". A subclass of this
must provide at least implementations for the following methods:
@li virtual KMFilterAction::ReturnCodes KMFilterAction::process
@li static KMFilterAction::newAction
@li the *ParamWidget* methods.
@short Abstract base class for filter actions with a free-form string as parameter.
@author Marc Mutz <[email protected]>, based upon work by Stefan Taferner <[email protected]>
@see KMFilterAction KMFilter
*/
class KMFilterActionWithUOID : public KMFilterAction
{
public:
/** Initialize filter action with (english) name @p aName. This is
the name under which this action is known in the config file. */
KMFilterActionWithUOID(const char* aName, const TQString aLabel);
/** Determines whether this action is valid. But this is just a
quick test. Eg., actions that have a mail address as parameter
shouldn't try real address validation, but only check if the
string representation is empty. */
virtual bool isEmpty() const { return mParameter == 0; }
/** Read extra arguments from given string. */
virtual void argsFromString(const TQString argsStr);
/** Return extra arguments as string. Must not contain newlines. */
virtual const TQString argsAsString() const;
/** Returns a translated string describing this filter for visualization
purposes, e.g. in the filter log. */
virtual const TQString displayString() const;
protected:
uint mParameter;
};
//=========================================================
//
// class KMFilterActionWithStringList
//
//=========================================================
/** Abstract base class for KMail's filter actions that need a
parameter which can be chosen from a fixed set, e.g. 'set
identity'. Can create a TQComboBox as parameter widget. A
subclass of this must provide at least implementations for the
following methods:
@li virtual KMFilterAction::ReturnCodes KMFilterAction::process
@li static KMFilterAction::newAction
Additionally, it's constructor should populate the
TQStringList @p mParameterList with the valid parameter
strings. The combobox will then contain be populated automatically
with those strings. The default string will be the first one.
@short Abstract base class for filter actions with a fixed set of string parameters.
@author Marc Mutz <[email protected]>, based upon work by Stefan Taferner <[email protected]>
@see KMFilterActionWithString KMFilterActionWithFolder KMFilterAction KMFilter
*/
class KMFilterActionWithStringList : public KMFilterActionWithString
{
public:
/** Initialize filter action with (english) name @p aName. This is
the name under which this action is known in the config file. */
KMFilterActionWithStringList(const char* aName, const TQString aLabel);
/** Creates a widget for setting the filter action parameter. Also
sets the value of the widget. */
virtual TQWidget* createParamWidget(TQWidget* tqparent) const;
/** The filter action shall set it's parameter from the widget's
contents. It is allowed that the value is read by the action
before this function is called. */
virtual void applyParamWidgetValue(TQWidget* paramWidget);
/** The filter action shall set it's widget's contents from it's
parameter. */
virtual void setParamWidgetValue(TQWidget* paramWidget) const;
/** The filter action shall clear it's parameter widget's
contents. */
virtual void clearParamWidget(TQWidget* paramWidget) const;
/** Read extra arguments from given string. */
virtual void argsFromString(const TQString argsStr);
protected:
TQStringList mParameterList;
};
//=========================================================
//
// class KMFilterActionWithFolder
//
//=========================================================
/** Abstract base class for KMail's filter actions that need a
mail folder as parameter, e.g. 'move into folder'. Can
create a TQComboBox as parameter widget. A subclass of this
must provide at least implementations for the following methods:
@li virtual KMFilterAction::ReturnCodes KMFilterAction::process
@li static KMFilterAction::newAction
@short Abstract base class for filter actions with a mail folder as parameter.
@author Marc Mutz <[email protected]>, based upon work by Stefan Taferner <[email protected]>
@see KMFilterActionWithStringList KMFilterAction KMFilter
*/
class KMFilterActionWithFolder : public KMFilterAction
{
public:
/** Initialize filter action with (english) name @p aName. This is
the name under which this action is known in the config file. */
KMFilterActionWithFolder(const char* aName, const TQString aLabel);
/** Determines whether this action is valid. But this is just a
quick test. Eg., actions that have a mail address as parameter
shouldn't try real address validation, but only check if the
string representation is empty. */
virtual bool isEmpty() const { return (!mFolder && mFolderName.isEmpty()); }
/** Creates a widget for setting the filter action parameter. Also
sets the value of the widget. */
virtual TQWidget* createParamWidget(TQWidget* tqparent) const;
/** The filter action shall set it's parameter from the widget's
contents. It is allowed that the value is read by the action
before this function is called. */
virtual void applyParamWidgetValue(TQWidget* paramWidget);
/** The filter action shall set it's widget's contents from it's
parameter. */
virtual void setParamWidgetValue(TQWidget* paramWidget) const;
/** The filter action shall clear it's parameter widget's
contents. */
virtual void clearParamWidget(TQWidget* paramWidget) const;
/** Read extra arguments from given string. */
virtual void argsFromString(const TQString argsStr);
/** Return extra arguments as string. Must not contain newlines. */
virtual const TQString argsAsString() const;
/** Returns a translated string describing this filter for visualization
purposes, e.g. in the filter log. */
virtual const TQString displayString() const;
/** Called from the filter when a folder is removed. Tests if the
folder @p aFolder is used and changes to @p aNewFolder in this
case. Returns TRUE if a change was made. */
virtual bool folderRemoved(KMFolder* aFolder, KMFolder* aNewFolder);
protected:
TQGuardedPtr<KMFolder> mFolder;
TQString mFolderName;
};
//=========================================================
//
// class KMFilterActionWithAddress
//
//=========================================================
/** Abstract base class for KMail's filter actions that need a mail
address as parameter, e.g. 'forward to'. Can create a
TQComboBox (capable of completion from the address book) as
parameter widget. A subclass of this must provide at least
implementations for the following methods:
@li virtual KMFilterAction::ReturnCodes KMFilterAction::process
@li static KMFilterAction::newAction
@short Abstract base class for filter actions with a mail address as parameter.
@author Marc Mutz <[email protected]>, based upon work by Stefan Taferner <[email protected]>
@see KMFilterActionWithString KMFilterAction KMFilter
*/
class KMFilterActionWithAddress : public KMFilterActionWithString
{
public:
/** Initialize filter action with (english) name @p aName. This is
the name under which this action is known in the config file. */
KMFilterActionWithAddress(const char* aName, const TQString aLabel);
/** Creates a widget for setting the filter action parameter. Also
sets the value of the widget. */
virtual TQWidget* createParamWidget(TQWidget* tqparent) const;
/** The filter action shall set it's parameter from the widget's
contents. It is allowed that the value is read by the action
before this function is called. */
virtual void applyParamWidgetValue(TQWidget* paramWidget);
/** The filter action shall set it's widget's contents from it's
parameter. */
virtual void setParamWidgetValue(TQWidget* paramWidget) const;
/** The filter action shall clear it's parameter widget's
contents. */
virtual void clearParamWidget(TQWidget* paramWidget) const;
};
//=========================================================
//
// class KMFilterActionWithCommand
//
//=========================================================
/** Abstract base class for KMail's filter actions that need a command
line as parameter, e.g. 'forward to'. Can create a TQLineEdit
(are there better widgets in the depths of the kdelibs?) as
parameter widget. A subclass of this must provide at least
implementations for the following methods:
@li virtual KMFilterAction::ReturnCodes KMFilterAction::process
@li static KMFilterAction::newAction
The implementation of KMFilterAction::process should take the
command line specified in mParameter, make all required
modifications and stream the resulting command line into @p
mProcess. Then you can start the command with @p mProcess.start().
@short Abstract base class for filter actions with a command line as parameter.
@author Marc Mutz <[email protected]>, based upon work by Stefan Taferner <[email protected]>
@see KMFilterActionWithString KMFilterAction KMFilter KProcess
*/
class KMFilterActionWithUrl : public KMFilterAction
{
public:
/** Initialize filter action with (english) name @p aName. This is
the name under which this action is known in the config file. */
KMFilterActionWithUrl(const char* aName, const TQString aLabel);
~KMFilterActionWithUrl();
/** Determines whether this action is valid. But this is just a
quick test. Eg., actions that have a mail address as parameter
shouldn't try real address validation, but only check if the
string representation is empty. */
virtual bool isEmpty() const { return mParameter.stripWhiteSpace().isEmpty(); }
/** Creates a widget for setting the filter action parameter. Also
sets the value of the widget. */
virtual TQWidget* createParamWidget(TQWidget* tqparent) const;
/** The filter action shall set it's parameter from the widget's
contents. It is allowed that the value is read by the action
before this function is called. */
virtual void applyParamWidgetValue(TQWidget* paramWidget);
/** The filter action shall set it's widget's contents from it's
parameter. */
virtual void setParamWidgetValue(TQWidget* paramWidget) const;
/** The filter action shall clear it's parameter widget's
contents. */
virtual void clearParamWidget(TQWidget* paramWidget) const;
/** Read extra arguments from given string. */
virtual void argsFromString(const TQString argsStr);
/** Return extra arguments as string. Must not contain newlines. */
virtual const TQString argsAsString() const;
/** Returns a translated string describing this filter for visualization
purposes, e.g. in the filter log. */
virtual const TQString displayString() const;
protected:
TQString mParameter;
};
class KMFilterActionWithCommand : public KMFilterActionWithUrl
{
public:
/** Initialize filter action with (english) name @p aName. This is
the name under which this action is known in the config file. */
KMFilterActionWithCommand(const char* aName, const TQString aLabel);
/** Creates a widget for setting the filter action parameter. Also
sets the value of the widget. */
virtual TQWidget* createParamWidget(TQWidget* tqparent) const;
/** The filter action shall set it's parameter from the widget's
contents. It is allowed that the value is read by the action
before this function is called. */
virtual void applyParamWidgetValue(TQWidget* paramWidget);
/** The filter action shall set it's widget's contents from it's
parameter. */
virtual void setParamWidgetValue(TQWidget* paramWidget) const;
/** The filter action shall clear it's parameter widget's
contents. */
virtual void clearParamWidget(TQWidget* paramWidget) const;
/** Substitutes various placeholders for data from the message
resp. for filenames containing that data. Currently, only %n is
supported, where n in an integer >= 0. %n gets substituted for
the name of a tempfile holding the n'th message part, with n=0
meaning the body of the message. */
virtual TQString substituteCommandLineArgsFor( KMMessage *aMsg, TQPtrList<KTempFile> & aTempFileList ) const;
virtual ReturnCode genericProcess( KMMessage * aMsg, bool filtering ) const;
};
class KMFilterActionWithTest : public KMFilterAction
{
public:
/** Initialize filter action with (english) name @p aName. This is
the name under which this action is known in the config file. */
KMFilterActionWithTest(const char* aName, const TQString aLabel);
~KMFilterActionWithTest();
/** Determines whether this action is valid. But this is just a
quick test. Eg., actions that have a mail address as parameter
shouldn't try real address validation, but only check if the
string representation is empty. */
virtual bool isEmpty() const { return mParameter.stripWhiteSpace().isEmpty(); }
/** Creates a widget for setting the filter action parameter. Also
sets the value of the widget. */
virtual TQWidget* createParamWidget(TQWidget* tqparent) const;
/** The filter action shall set it's parameter from the widget's
contents. It is allowed that the value is read by the action
before this function is called. */
virtual void applyParamWidgetValue(TQWidget* paramWidget);
/** The filter action shall set it's widget's contents from it's
parameter. */
virtual void setParamWidgetValue(TQWidget* paramWidget) const;
/** The filter action shall clear it's parameter widget's
contents. */
virtual void clearParamWidget(TQWidget* paramWidget) const;
/** Read extra arguments from given string. */
virtual void argsFromString(const TQString argsStr);
/** Return extra arguments as string. Must not contain newlines. */
virtual const TQString argsAsString() const;
/** Returns a translated string describing this filter for visualization
purposes, e.g. in the filter log. */
virtual const TQString displayString() const;
protected:
TQString mParameter;
};
typedef KMFilterAction* (*KMFilterActionNewFunc)(void);
//-----------------------------------------------------------------------------
/** Auxiliary struct to KMFilterActionDict. */
struct KMFilterActionDesc
{
TQString label, name;
KMFilterActionNewFunc create;
};
/** Dictionary that contains a list of all registered filter actions
with their creation functions. They are hard-coded into the
constructor. If you want to add a new KMFilterAction, make
sure you add the details of it in init, too.
You will be able to find a description of a KMFilterAction by
looking up either it's (english) name or it's (i18n) label:
<pre>
KMFilterActionDict dict;
// get name of the action with label "move into folder":
dict[i18n("move into folder")]->name; // == "transfer"
// create one such action:
KMFilterAction *action = dict["transfer"]->create();
</pre>
You can iterate over all known filter actions by using list.
@short List of known KMFilterAction-types.
@author Marc Mutz <[email protected]>, based on work by Stefan Taferner <[email protected]>
@see KMFilterAction KMFilterActionDesc KMFilter
*/
class KMFilterActionDict: public TQDict<KMFilterActionDesc>
{
public:
KMFilterActionDict();
/** Overloaded member function, provided for convenience. Thin
wrapper around TQDict::insert and TQPtrList::insert.
Inserts the resulting KMFilterActionDesc
thrice: First with the name, then with the label as key into the
TQDict, then into the TQPtrList. For that, it creates an
instance of the action internally and deletes it again after
querying it for name and label. */
void insert(KMFilterActionNewFunc aNewFunc);
/** Provides read-only access to a list of all known filter
actions. */
const TQPtrList<KMFilterActionDesc>& list() const { return mList; }
protected:
/** Populate the dictionary with all known KMFilterAction
types. Called automatically from the constructor. */
virtual void init(void);
private:
TQPtrList<KMFilterActionDesc> mList;
};
#endif /*kmfilteraction_h*/
|