~ubuntu-branches/ubuntu/oneiric/kdepim/oneiric-updates

« back to all changes in this revision

Viewing changes to kmail/kmsearchpatternedit.cpp

  • Committer: Package Import Robot
  • Author(s): Philip Muškovac
  • Date: 2011-06-28 19:33:24 UTC
  • mfrom: (0.2.13) (0.1.13 sid)
  • Revision ID: package-import@ubuntu.com-20110628193324-8yvjs8sdv9rdoo6c
Tags: 4:4.7.0-0ubuntu1
* New upstream release
  - update install files
  - add missing kdepim-doc package to control file
  - Fix Vcs lines
  - kontact breaks/replaces korganizer << 4:4.6.80
  - tighten the dependency of kdepim-dev on libkdepim4 to fix lintian error

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- mode: C++; c-file-style: "gnu" -*-
2
 
  kmsearchpatternedit.cpp
3
 
  Author: Marc Mutz <Marc@Mutz.com>
4
 
 
5
 
  This program is free software; you can redistribute it and/or modify
6
 
  it under the terms of the GNU General Public License as published by
7
 
  the Free Software Foundation; either version 2 of the License, or
8
 
  (at your option) any later version.
9
 
 
10
 
  This program is distributed in the hope that it will be useful,
11
 
  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
 
  GNU General Public License for more details.
14
 
 
15
 
  You should have received a copy of the GNU General Public License along
16
 
  with this program; if not, write to the Free Software Foundation, Inc.,
17
 
  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18
 
*/
19
 
 
20
 
#include "kmsearchpatternedit.h"
21
 
 
22
 
#include <QStackedWidget>
23
 
#include "kmsearchpattern.h"
24
 
#include "rulewidgethandlermanager.h"
25
 
using KMail::RuleWidgetHandlerManager;
26
 
 
27
 
#include <kcombobox.h>
28
 
#include <klocale.h>
29
 
#include <kdialog.h>
30
 
#include <kdebug.h>
31
 
 
32
 
#include <QButtonGroup>
33
 
#include <QByteArray>
34
 
#include <QHBoxLayout>
35
 
#include <QRadioButton>
36
 
 
37
 
#include <assert.h>
38
 
 
39
 
// Definition of special rule field strings
40
 
// Note: Also see KMSearchRule::matches() and ruleFieldToEnglish() if
41
 
//       you change the following i18n-ized strings!
42
 
// Note: The index of the values in the following array has to correspond to
43
 
//       the value of the entries in the enum in KMSearchRuleWidget.
44
 
 
45
 
#undef I18N_NOOP
46
 
#define I18N_NOOP(t) 0, t
47
 
#undef I18N_NOOP2
48
 
#define I18N_NOOP2(c,t) c, t
49
 
 
50
 
static const struct {
51
 
  const char *internalName;
52
 
  const char *context;
53
 
  const char *displayName;
54
 
 
55
 
  QString getLocalizedDisplayName() const { return i18nc(context, displayName); };
56
 
 
57
 
} SpecialRuleFields[] = {
58
 
  { "<message>",     I18N_NOOP( "Complete Message" )       },
59
 
  { "<body>",        I18N_NOOP( "Body of Message" )          },
60
 
  { "<any header>",  I18N_NOOP( "Anywhere in Headers" )    },
61
 
  { "<recipients>",  I18N_NOOP( "All Recipients" )    },
62
 
  { "<size>",        I18N_NOOP( "Size in Bytes" ) },
63
 
  { "<age in days>", I18N_NOOP( "Age in Days" )   },
64
 
  { "<status>",      I18N_NOOP( "Message Status" )        },
65
 
  { "<tag>",         I18N_NOOP( "Message Tag" ) },
66
 
  { "Subject",       I18N_NOOP2( "Subject of an email.", "Subject" )  },
67
 
  { "From",          I18N_NOOP( "From" )  },
68
 
  { "To",            I18N_NOOP2( "Receiver of an email.", "To" )  },
69
 
  { "CC",            I18N_NOOP( "CC" )  }
70
 
};
71
 
static const int SpecialRuleFieldsCount =
72
 
  sizeof( SpecialRuleFields ) / sizeof( *SpecialRuleFields );
73
 
 
74
 
//=============================================================================
75
 
//
76
 
// class KMSearchRuleWidget
77
 
//
78
 
//=============================================================================
79
 
 
80
 
KMSearchRuleWidget::KMSearchRuleWidget( QWidget *parent, KMSearchRule *aRule,
81
 
                                        bool headersOnly,
82
 
                                        bool absoluteDates )
83
 
  : QWidget( parent ),
84
 
    mRuleField( 0 ),
85
 
    mFunctionStack( 0 ),
86
 
    mValueStack( 0 ),
87
 
    mAbsoluteDates( absoluteDates )
88
 
{
89
 
  initFieldList( headersOnly, absoluteDates );
90
 
  initWidget();
91
 
 
92
 
  if ( aRule )
93
 
    setRule( aRule );
94
 
  else
95
 
    reset();
96
 
}
97
 
 
98
 
void KMSearchRuleWidget::setHeadersOnly( bool headersOnly )
99
 
{
100
 
  KMSearchRule* srule = rule();
101
 
  QByteArray currentText = srule->field();
102
 
  delete srule;
103
 
  initFieldList( headersOnly, mAbsoluteDates );
104
 
 
105
 
  mRuleField->clear();
106
 
  mRuleField->addItems( mFilterFieldList );
107
 
  mRuleField->setMaxCount( mRuleField->count() );
108
 
  mRuleField->adjustSize();
109
 
 
110
 
  if (( currentText != "<message>") &&
111
 
      ( currentText != "<body>"))
112
 
    mRuleField->setItemText( 0, QString::fromAscii( currentText ) );
113
 
  else
114
 
    mRuleField->setItemText( 0, QString() );
115
 
}
116
 
 
117
 
void KMSearchRuleWidget::initWidget()
118
 
{
119
 
  QHBoxLayout * hlay = new QHBoxLayout( this );
120
 
  hlay->setSpacing( KDialog::spacingHint() );
121
 
  hlay->setMargin( 0 );
122
 
 
123
 
  // initialize the header field combo box
124
 
  mRuleField = new KComboBox( this );
125
 
  mRuleField->setObjectName( "mRuleField" );
126
 
  mRuleField->setEditable( true );
127
 
  mRuleField->addItems( mFilterFieldList );
128
 
  // don't show sliders when popping up this menu
129
 
  mRuleField->setMaxCount( mRuleField->count() );
130
 
  mRuleField->adjustSize();
131
 
  hlay->addWidget( mRuleField );
132
 
 
133
 
  // initialize the function/value widget stack
134
 
  mFunctionStack = new QStackedWidget( this );
135
 
  //Don't expand the widget in vertical direction
136
 
  mFunctionStack->setSizePolicy( QSizePolicy::Preferred,QSizePolicy::Fixed );
137
 
 
138
 
  hlay->addWidget( mFunctionStack );
139
 
 
140
 
  mValueStack = new QStackedWidget( this );
141
 
  mValueStack->setSizePolicy( QSizePolicy::Preferred,QSizePolicy::Fixed );
142
 
  hlay->addWidget( mValueStack );
143
 
  hlay->setStretchFactor( mValueStack, 10 );
144
 
 
145
 
  RuleWidgetHandlerManager::instance()->createWidgets( mFunctionStack,
146
 
                                                       mValueStack,
147
 
                                                       this );
148
 
 
149
 
  // redirect focus to the header field combo box
150
 
  setFocusProxy( mRuleField );
151
 
 
152
 
  connect( mRuleField, SIGNAL( activated( const QString & ) ),
153
 
           this, SLOT( slotRuleFieldChanged( const QString & ) ) );
154
 
  connect( mRuleField, SIGNAL(editTextChanged( const QString & ) ),
155
 
           this, SLOT( slotRuleFieldChanged( const QString & ) ) );
156
 
  connect( mRuleField, SIGNAL(editTextChanged( const QString & ) ),
157
 
           this, SIGNAL( fieldChanged( const QString & ) ) );
158
 
}
159
 
 
160
 
void KMSearchRuleWidget::setRule( KMSearchRule *aRule )
161
 
{
162
 
  assert ( aRule );
163
 
 
164
 
//  kDebug() << "(" << aRule->asString() << ")";
165
 
 
166
 
  //--------------set the field
167
 
  int i = indexOfRuleField( aRule->field() );
168
 
 
169
 
  mRuleField->blockSignals( true );
170
 
 
171
 
  if ( i < 0 ) { // not found -> user defined field
172
 
    mRuleField->setItemText( 0, QString::fromLatin1( aRule->field() ) );
173
 
    i = 0;
174
 
  } else { // found in the list of predefined fields
175
 
    mRuleField->setItemText( 0, QString() );
176
 
  }
177
 
 
178
 
  mRuleField->setCurrentIndex( i );
179
 
  mRuleField->blockSignals( false );
180
 
 
181
 
  RuleWidgetHandlerManager::instance()->setRule( mFunctionStack, mValueStack,
182
 
                                                 aRule );
183
 
}
184
 
 
185
 
KMSearchRule* KMSearchRuleWidget::rule() const {
186
 
  const QByteArray ruleField = ruleFieldToEnglish( mRuleField->currentText() );
187
 
  const KMSearchRule::Function function =
188
 
    RuleWidgetHandlerManager::instance()->function( ruleField,
189
 
                                                    mFunctionStack );
190
 
  const QString value =
191
 
    RuleWidgetHandlerManager::instance()->value( ruleField, mFunctionStack,
192
 
                                                 mValueStack );
193
 
 
194
 
  return KMSearchRule::createInstance( ruleField, function, value );
195
 
}
196
 
 
197
 
void KMSearchRuleWidget::reset()
198
 
{
199
 
  mRuleField->blockSignals( true );
200
 
  mRuleField->setItemText( 0, "" );
201
 
  mRuleField->setCurrentIndex( 0 );
202
 
  mRuleField->blockSignals( false );
203
 
 
204
 
  RuleWidgetHandlerManager::instance()->reset( mFunctionStack, mValueStack );
205
 
}
206
 
 
207
 
void KMSearchRuleWidget::slotFunctionChanged()
208
 
{
209
 
  const QByteArray ruleField = ruleFieldToEnglish( mRuleField->currentText() );
210
 
  RuleWidgetHandlerManager::instance()->update( ruleField,
211
 
                                                mFunctionStack,
212
 
                                                mValueStack );
213
 
}
214
 
 
215
 
void KMSearchRuleWidget::slotValueChanged()
216
 
{
217
 
  const QByteArray ruleField = ruleFieldToEnglish( mRuleField->currentText() );
218
 
  const QString prettyValue =
219
 
    RuleWidgetHandlerManager::instance()->prettyValue( ruleField,
220
 
                                                       mFunctionStack,
221
 
                                                       mValueStack );
222
 
  emit contentsChanged( prettyValue );
223
 
}
224
 
 
225
 
QByteArray KMSearchRuleWidget::ruleFieldToEnglish( const QString & i18nVal )
226
 
{
227
 
  for ( int i = 0; i < SpecialRuleFieldsCount; ++i ) {
228
 
    if ( i18nVal == SpecialRuleFields[i].getLocalizedDisplayName() )
229
 
      return SpecialRuleFields[i].internalName;
230
 
  }
231
 
  return i18nVal.toLatin1();
232
 
}
233
 
 
234
 
int KMSearchRuleWidget::ruleFieldToId( const QString & i18nVal )
235
 
{
236
 
  for ( int i = 0; i < SpecialRuleFieldsCount; ++i ) {
237
 
    if ( i18nVal == SpecialRuleFields[i].getLocalizedDisplayName() )
238
 
      return i;
239
 
  }
240
 
  return -1; // no pseudo header
241
 
}
242
 
 
243
 
static QString displayNameFromInternalName( const QString & internal )
244
 
{
245
 
  for ( int i = 0; i < SpecialRuleFieldsCount; ++i ) {
246
 
    if ( internal == SpecialRuleFields[i].internalName )
247
 
      return SpecialRuleFields[i].getLocalizedDisplayName();
248
 
  }
249
 
  return internal.toLatin1();
250
 
}
251
 
 
252
 
 
253
 
 
254
 
int KMSearchRuleWidget::indexOfRuleField( const QByteArray & aName ) const
255
 
{
256
 
  if ( aName.isEmpty() )
257
 
    return -1;
258
 
 
259
 
  QString i18n_aName = displayNameFromInternalName( aName );
260
 
 
261
 
  for ( int i = 1; i < mRuleField->count(); ++i ) {
262
 
    if ( mRuleField->itemText( i ) == i18n_aName )
263
 
      return i;
264
 
  }
265
 
 
266
 
  return -1;
267
 
}
268
 
 
269
 
void KMSearchRuleWidget::initFieldList( bool headersOnly, bool absoluteDates )
270
 
{
271
 
  mFilterFieldList.clear();
272
 
  mFilterFieldList.append(""); // empty entry for user input
273
 
  if( !headersOnly ) {
274
 
    mFilterFieldList.append( SpecialRuleFields[Message].getLocalizedDisplayName() );
275
 
    mFilterFieldList.append( SpecialRuleFields[Body].getLocalizedDisplayName()    );
276
 
  }
277
 
  mFilterFieldList.append( SpecialRuleFields[AnyHeader].getLocalizedDisplayName()  );
278
 
  mFilterFieldList.append( SpecialRuleFields[Recipients].getLocalizedDisplayName() );
279
 
  mFilterFieldList.append( SpecialRuleFields[Size].getLocalizedDisplayName()       );
280
 
  if ( !absoluteDates )
281
 
    mFilterFieldList.append( SpecialRuleFields[AgeInDays].getLocalizedDisplayName() );
282
 
  mFilterFieldList.append( SpecialRuleFields[Subject].getLocalizedDisplayName() );
283
 
  mFilterFieldList.append( SpecialRuleFields[From].getLocalizedDisplayName()    );
284
 
  mFilterFieldList.append( SpecialRuleFields[To].getLocalizedDisplayName()      );
285
 
  mFilterFieldList.append( SpecialRuleFields[CC].getLocalizedDisplayName()      );
286
 
  mFilterFieldList.append( SpecialRuleFields[Status].getLocalizedDisplayName()  );
287
 
  mFilterFieldList.append( SpecialRuleFields[Tag].getLocalizedDisplayName()     );
288
 
 
289
 
  // these others only represent message headers and you can add to
290
 
  // them as you like
291
 
  mFilterFieldList.append("Reply-To");
292
 
  mFilterFieldList.append("List-Id");
293
 
  mFilterFieldList.append("Organization");
294
 
  mFilterFieldList.append("Resent-From");
295
 
  mFilterFieldList.append("X-Loop");
296
 
  mFilterFieldList.append("X-Mailing-List");
297
 
  mFilterFieldList.append("X-Spam-Flag");
298
 
}
299
 
 
300
 
void KMSearchRuleWidget::slotRuleFieldChanged( const QString & field )
301
 
{
302
 
  RuleWidgetHandlerManager::instance()->update( ruleFieldToEnglish( field ),
303
 
                                                mFunctionStack,
304
 
                                                mValueStack );
305
 
}
306
 
 
307
 
//=============================================================================
308
 
//
309
 
// class KMFilterActionWidgetLister (the filter action editor)
310
 
//
311
 
//=============================================================================
312
 
 
313
 
KMSearchRuleWidgetLister::KMSearchRuleWidgetLister( QWidget *parent, const char* name, bool headersOnly, bool absoluteDates )
314
 
  : KWidgetLister( 2, FILTER_MAX_RULES, parent, name )
315
 
{
316
 
  mRuleList = 0;
317
 
  mHeadersOnly = headersOnly;
318
 
  mAbsoluteDates = absoluteDates;
319
 
}
320
 
 
321
 
KMSearchRuleWidgetLister::~KMSearchRuleWidgetLister()
322
 
{
323
 
}
324
 
 
325
 
void KMSearchRuleWidgetLister::setRuleList( QList<KMSearchRule*> *aList )
326
 
{
327
 
  assert ( aList );
328
 
 
329
 
  if ( mRuleList && mRuleList != aList )
330
 
    regenerateRuleListFromWidgets();
331
 
 
332
 
  mRuleList = aList;
333
 
 
334
 
  if ( !mWidgetList.isEmpty() ) // move this below next 'if'?
335
 
    mWidgetList.first()->blockSignals(true);
336
 
 
337
 
  if ( aList->count() == 0 ) {
338
 
    slotClear();
339
 
    mWidgetList.first()->blockSignals(false);
340
 
    return;
341
 
  }
342
 
 
343
 
  int superfluousItems = (int)mRuleList->count() - mMaxWidgets ;
344
 
  if ( superfluousItems > 0 ) {
345
 
    kDebug() << "Clipping rule list to" << mMaxWidgets << "items!";
346
 
 
347
 
    for ( ; superfluousItems ; superfluousItems-- )
348
 
      mRuleList->removeLast();
349
 
  }
350
 
 
351
 
  // HACK to workaround regression in Qt 3.1.3 and Qt 3.2.0 (fixes bug #63537)
352
 
  setNumberOfShownWidgetsTo( qMax((int)mRuleList->count(),mMinWidgets)+1 );
353
 
  // set the right number of widgets
354
 
  setNumberOfShownWidgetsTo( qMax((int)mRuleList->count(),mMinWidgets) );
355
 
 
356
 
  // load the actions into the widgets
357
 
  QList<KMSearchRule*>::const_iterator rIt;
358
 
  QList<QWidget*>::const_iterator wIt = mWidgetList.constBegin();
359
 
  for ( rIt = mRuleList->constBegin();
360
 
        rIt != mRuleList->constEnd() && wIt != mWidgetList.constEnd(); ++rIt, ++wIt ) {
361
 
    static_cast<KMSearchRuleWidget*>( *wIt )->setRule( (*rIt) );
362
 
  }
363
 
  for ( ; wIt != mWidgetList.constEnd() ; ++wIt )
364
 
    static_cast<KMSearchRuleWidget*>( *wIt )->reset();
365
 
 
366
 
  assert( !mWidgetList.isEmpty() );
367
 
  mWidgetList.first()->blockSignals(false);
368
 
}
369
 
 
370
 
void KMSearchRuleWidgetLister::setHeadersOnly( bool headersOnly )
371
 
{
372
 
  foreach ( QWidget *w, mWidgetList ) {
373
 
    static_cast<KMSearchRuleWidget*>( w )->setHeadersOnly( headersOnly );
374
 
  }
375
 
}
376
 
 
377
 
void KMSearchRuleWidgetLister::reset()
378
 
{
379
 
  if ( mRuleList )
380
 
    regenerateRuleListFromWidgets();
381
 
 
382
 
  mRuleList = 0;
383
 
  slotClear();
384
 
}
385
 
 
386
 
QWidget* KMSearchRuleWidgetLister::createWidget( QWidget *parent )
387
 
{
388
 
  return new KMSearchRuleWidget(parent, 0,  mHeadersOnly, mAbsoluteDates);
389
 
}
390
 
 
391
 
void KMSearchRuleWidgetLister::clearWidget( QWidget *aWidget )
392
 
{
393
 
  if ( aWidget )
394
 
    ((KMSearchRuleWidget*)aWidget)->reset();
395
 
}
396
 
 
397
 
void KMSearchRuleWidgetLister::regenerateRuleListFromWidgets()
398
 
{
399
 
  if ( !mRuleList ) return;
400
 
 
401
 
  mRuleList->clear();
402
 
 
403
 
  foreach ( const QWidget *w, mWidgetList ) {
404
 
    KMSearchRule *r = static_cast<const KMSearchRuleWidget*>( w )->rule();
405
 
    if ( r )
406
 
      mRuleList->append( r );
407
 
  }
408
 
}
409
 
 
410
 
 
411
 
 
412
 
 
413
 
//=============================================================================
414
 
//
415
 
// class KMSearchPatternEdit
416
 
//
417
 
//=============================================================================
418
 
 
419
 
KMSearchPatternEdit::KMSearchPatternEdit( QWidget *parent, bool headersOnly,
420
 
                                          bool absoluteDates )
421
 
  : QGroupBox( parent )
422
 
{
423
 
  setObjectName( "KMSearchPatternEdit" );
424
 
  setTitle( i18n("Search Criteria") );
425
 
  initLayout( headersOnly, absoluteDates );
426
 
}
427
 
 
428
 
KMSearchPatternEdit::KMSearchPatternEdit( const QString &title, QWidget *parent,
429
 
                                          bool headersOnly, bool absoluteDates )
430
 
  : QGroupBox( title, parent )
431
 
{
432
 
  setObjectName( "KMSearchPatternEdit" );
433
 
  initLayout( headersOnly, absoluteDates );
434
 
}
435
 
 
436
 
KMSearchPatternEdit::~KMSearchPatternEdit()
437
 
{
438
 
}
439
 
 
440
 
void KMSearchPatternEdit::initLayout(bool headersOnly, bool absoluteDates)
441
 
{
442
 
  QVBoxLayout *layout = new QVBoxLayout( this );
443
 
 
444
 
  //------------the radio buttons
445
 
  mAllRBtn = new QRadioButton( i18n("Match a&ll of the following"), this );
446
 
  mAnyRBtn = new QRadioButton( i18n("Match an&y of the following"), this );
447
 
 
448
 
  mAllRBtn->setObjectName( "mAllRBtn" );
449
 
  mAllRBtn->setChecked(true);
450
 
  mAnyRBtn->setObjectName( "mAnyRBtn" );
451
 
  mAnyRBtn->setChecked(false);
452
 
 
453
 
  layout->addWidget( mAllRBtn );
454
 
  layout->addWidget( mAnyRBtn );
455
 
 
456
 
  QButtonGroup *bg = new QButtonGroup( this );
457
 
  bg->addButton( mAllRBtn );
458
 
  bg->addButton( mAnyRBtn );
459
 
 
460
 
  //------------connect a few signals
461
 
  connect( bg, SIGNAL(buttonClicked(QAbstractButton *)),
462
 
           this, SLOT(slotRadioClicked(QAbstractButton *)) );
463
 
 
464
 
  //------------the list of KMSearchRuleWidget's
465
 
  mRuleLister = new KMSearchRuleWidgetLister( this, "swl", headersOnly, absoluteDates );
466
 
  mRuleLister->slotClear();
467
 
 
468
 
  if ( !mRuleLister->mWidgetList.isEmpty() ) {
469
 
    KMSearchRuleWidget *srw = static_cast<KMSearchRuleWidget*>( mRuleLister->mWidgetList.first() );
470
 
    connect( srw, SIGNAL(fieldChanged(const QString &)),
471
 
             this, SLOT(slotAutoNameHack()) );
472
 
    connect( srw, SIGNAL(contentsChanged(const QString &)),
473
 
             this, SLOT(slotAutoNameHack()) );
474
 
  } else
475
 
    kDebug() << "No first KMSearchRuleWidget, though slotClear() has been called!";
476
 
 
477
 
  layout->addWidget( mRuleLister );
478
 
}
479
 
 
480
 
void KMSearchPatternEdit::setSearchPattern( KMSearchPattern *aPattern )
481
 
{
482
 
  assert( aPattern );
483
 
 
484
 
  mRuleLister->setRuleList( aPattern );
485
 
 
486
 
  mPattern = aPattern;
487
 
 
488
 
  blockSignals(true);
489
 
  if ( mPattern->op() == KMSearchPattern::OpOr )
490
 
    mAnyRBtn->setChecked(true);
491
 
  else
492
 
    mAllRBtn->setChecked(true);
493
 
  blockSignals(false);
494
 
 
495
 
  setEnabled( true );
496
 
}
497
 
 
498
 
void KMSearchPatternEdit::setHeadersOnly( bool headersOnly )
499
 
{
500
 
  mRuleLister->setHeadersOnly( headersOnly );
501
 
}
502
 
 
503
 
void KMSearchPatternEdit::reset()
504
 
{
505
 
  mRuleLister->reset();
506
 
 
507
 
  blockSignals(true);
508
 
  mAllRBtn->setChecked( true );
509
 
  blockSignals(false);
510
 
 
511
 
  setEnabled( false );
512
 
}
513
 
 
514
 
void KMSearchPatternEdit::slotRadioClicked(QAbstractButton *aRBtn)
515
 
{
516
 
  if ( mPattern ) {
517
 
    if ( aRBtn == mAllRBtn )
518
 
      mPattern->setOp( KMSearchPattern::OpAnd );
519
 
    else
520
 
      mPattern->setOp( KMSearchPattern::OpOr );
521
 
  }
522
 
}
523
 
 
524
 
void KMSearchPatternEdit::slotAutoNameHack()
525
 
{
526
 
  mRuleLister->regenerateRuleListFromWidgets();
527
 
  emit maybeNameChanged();
528
 
}
529
 
 
530
 
#include "kmsearchpatternedit.moc"