18 #ifndef SCOREEDITWIDGET_H
19 #define SCOREEDITWIDGET_H
22 #include <kdialogbase.h>
26 #include "kwidgetlister.h"
28 #include <tdemacros.h>
42 class KScoringExpression;
43 class KScoringManager;
46 class ScoreEditWidget;
60 void setCondition(KScoringExpression*);
61 KScoringExpression *createCondition()
const;
65 void toggleRegExpButton(
int );
66 void showRegExpDialog();
78 TQPushButton *regExpButton;
80 KScoringManager *manager;
93 void updateRule(KScoringRule*);
96 void slotEditRule(KScoringRule*);
98 KScoringManager *manager;
119 TQWidgetStack *stack;
121 KLineEdit *notifyEditor;
123 KIntSpinBox *scoreEditor;
125 KColorCombo *colorEditor;
129 KScoringManager *manager;
141 TQWidget* createWidget(TQWidget *parent);
142 void updateRule(KScoringRule*);
143 void clearWidget(TQWidget *);
145 void slotEditRule(KScoringRule *);
147 KScoringManager *manager;
157 RuleEditWidget(KScoringManager *m,TQWidget *p =0,
const char *n =0);
161 void slotEditRule(
const TQString&);
162 void updateRule(KScoringRule*);
170 void slotExpireEditChanged(
int value);
172 void clearContents();
176 KLineEdit *ruleNameEdit;
178 KLineEdit *groupsEdit;
180 KComboBox *groupsBox;
182 TQCheckBox *expireCheck;
184 TQLabel *expireLabel;
186 KIntSpinBox *expireEdit;
188 TQRadioButton *linkModeOr, *linkModeAnd;
194 KScoringManager *manager;
197 TQString oldRuleName;
208 RuleListWidget(KScoringManager *m,
bool =
false, TQWidget *p =0,
const char *n =0);
210 TQString currentRule()
const {
return ruleList->currentText(); }
215 void ruleSelected(
const TQString&);
216 void ruleEdited(
const TQString&);
219 void slotRuleSelected(
const TQString&);
220 void slotRuleSelected(TQListBoxItem *);
221 void slotRuleSelected(
int);
222 void updateRuleList();
223 void updateRuleList(
const KScoringRule*);
224 void slotRuleNameChanged(
const TQString&,
const TQString&);
226 void slotGroupFilter(
const TQString&);
227 void slotEditRule(TQListBoxItem*);
228 void slotEditRule(
const TQString&);
238 TDEListBox *ruleList;
244 KScoringManager *manager;
246 TQPushButton *editRule;
247 TQPushButton *newRule;
248 TQPushButton *delRule;
249 TQPushButton *copyRule;
250 TQPushButton *mRuleUp;
251 TQPushButton *mRuleDown;
254 class TDE_EXPORT KScoringEditor :
public KDialogBase
260 void setRule(KScoringRule*);
261 static KScoringEditor *createEditor(KScoringManager* m, TQWidget *parent=0,
const char *name=0);
262 static KScoringEditor *editor() {
return scoreEditor; }
265 KScoringEditor(KScoringManager* m, TQWidget *parent=0,
const char *name=0);
279 KScoringManager *manager;
280 ScoreEditWidget *edit;
282 static KScoringEditor *scoreEditor;
285 class KScoringEditorWidgetDialog :
public KDialogBase
290 KScoringEditorWidgetDialog(KScoringManager *m,
const TQString& rName, TQWidget *parent=0,
const char *name=0);
298 KScoringManager *manager;
302 class TDE_EXPORT KScoringEditorWidget :
public TQWidget
307 KScoringEditorWidget(KScoringManager *m,TQWidget *p =0,
const char *n =0);
308 ~KScoringEditorWidget();
310 void slotRuleEdited(
const TQString&);
313 KScoringManager *manager;
Base class for other Action classes.