1
/***************************************************************************
2
* Copyright (C) 2004-2009 by Thomas Fischer *
3
* fischer@unix-ag.uni-kl.de *
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. *
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. *
15
* You should have received a copy of the GNU General Public License *
16
* along with this program; if not, write to the *
17
* Free Software Foundation, Inc., *
18
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19
***************************************************************************/
23
#include <qcheckbox.h>
24
#include <qobjectlist.h>
25
#include <qscrollview.h>
27
#include <kglobalsettings.h>
28
#include <klineedit.h>
29
#include <kpopupmenu.h>
30
#include <kcombobox.h>
31
#include <kpushbutton.h>
32
#include <kdialogbase.h>
33
#include <kiconloader.h>
36
#include <idsuggestions.h>
37
#include <fileimporter.h>
38
#include <fileimporterbibtex.h>
39
#include "idsuggestionswidget.h"
41
#define min(a,b) ((a)>(b)?(b):(a))
42
#define max(a,b) ((a)<(b)?(b):(a))
46
QString IdSuggestionsWidget::exampleBibTeXEntry = "@Article{ dijkstra1983terminationdetect,\nauthor = {Edsger W. Dijkstra and W. H. J. Feijen and A. J. M. {van Gasteren}},\ntitle = {{Derivation of a Termination Detection Algorithm for Distributed Computations}},\njournal = {Information Processing Letters},\nvolume = 16,\nnumber = 5,\npages = {217--219},\nmonth = jun,\nyear = 1983\n}";
48
IdSuggestionComponent::IdSuggestionComponent( const QString& title, QWidget *parent ): QFrame( parent ), m_toBeDeleted( false ), m_title( title ), m_parent( parent )
50
setFrameShape( QFrame::Panel );
51
setFrameShadow( QFrame::Sunken );
55
QWidget *IdSuggestionComponent::moveWidgets( QWidget *parent )
57
QWidget *container = new QWidget( parent );
58
QVBoxLayout *layout = new QVBoxLayout( container, 0, KDialog::spacingHint() );
59
m_pushButtonUp = new KPushButton( QIconSet( SmallIcon( "up" ) ), i18n( "Up" ), container );
60
m_pushButtonDown = new KPushButton( QIconSet( SmallIcon( "down" ) ), i18n( "Down" ), container );
61
m_pushButtonDel = new KPushButton( QIconSet( SmallIcon( "remove" ) ), i18n( "Delete" ), container );
62
layout->addWidget( m_pushButtonUp );
63
layout->addWidget( m_pushButtonDown );
64
layout->addWidget( m_pushButtonDel );
65
layout->addStretch( 10 );
66
connect( m_pushButtonUp, SIGNAL( clicked() ), this, SLOT( slotUp() ) );
67
connect( m_pushButtonDown, SIGNAL( clicked() ), this, SLOT( slotDown() ) );
68
connect( m_pushButtonDel, SIGNAL( clicked() ), this, SLOT( slotDelete() ) );
72
void IdSuggestionComponent::setEnableUpDown( bool enableUp, bool enableDown )
74
m_pushButtonUp->setEnabled( enableUp );
75
m_pushButtonDown->setEnabled( enableDown );
78
void IdSuggestionComponent::slotUp()
80
QVBoxLayout *layout = dynamic_cast<QVBoxLayout*>( m_parent->layout() );
81
if ( layout == NULL ) return;
82
int oldPos = layout->findWidget( this );
85
layout->remove( this );
86
layout->insertWidget( oldPos - 1, this );
91
void IdSuggestionComponent::slotDown()
93
QVBoxLayout *layout = dynamic_cast<QVBoxLayout*>( m_parent->layout() );
94
if ( layout == NULL ) return;
95
int oldPos = layout->findWidget( this );
96
int componentCount = dynamic_cast<IdSuggestionsWidget*>( m_parent->parent()->parent()->parent() )->numComponents();
97
if ( oldPos < componentCount - 1 )
99
layout->remove( this );
100
layout->insertWidget( oldPos + 1, this );
105
void IdSuggestionComponent::slotDelete()
107
m_toBeDeleted = true;
112
IdSuggestionComponentAuthor::IdSuggestionComponentAuthor( const QString &text, QWidget *parent ): IdSuggestionComponent( i18n( "Author" ), parent )
114
QGridLayout *layout = new QGridLayout( this, 6, 4, KDialog::marginHint(), KDialog::spacingHint() );
116
QLabel *label = new QLabel( m_title, this );
117
QFont labelFont( label->font() );
118
labelFont.setBold( TRUE );
119
label->setFont( labelFont );
120
label->setBackgroundColor( KGlobalSettings::highlightColor() );
121
label->setPaletteForegroundColor( KGlobalSettings::highlightedTextColor() );
122
label->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
123
layout->addMultiCellWidget( label, 0, 0, 0, 2 );
125
m_comboBoxWhichAuthors = new KComboBox( false, this );
126
layout->addMultiCellWidget( m_comboBoxWhichAuthors, 1, 1, 0, 1 );
127
m_comboBoxWhichAuthors->insertItem( i18n( "All authors" ) );
128
m_comboBoxWhichAuthors->insertItem( i18n( "First author only" ) );
129
m_comboBoxWhichAuthors->insertItem( i18n( "All but first author" ) );
132
case 'a': m_comboBoxWhichAuthors->setCurrentItem( 1 ); break;
133
case 'z': m_comboBoxWhichAuthors->setCurrentItem( 2 ); break;
134
default: m_comboBoxWhichAuthors->setCurrentItem( 0 );
136
connect( m_comboBoxWhichAuthors, SIGNAL( activated( const QString& ) ), SIGNAL( modified() ) );
138
struct IdSuggestionTokenInfo info = IdSuggestions::evalToken( text.mid( 1 ) );
140
label = new QLabel( i18n( "Casing:" ), this );
141
layout->addWidget( label, 2, 0 );
142
m_comboBoxCasing = new KComboBox( FALSE, this );
143
label->setBuddy( m_comboBoxCasing );
144
layout->addWidget( m_comboBoxCasing, 2, 1 );
145
m_comboBoxCasing->insertItem( i18n( "No change" ) );
146
m_comboBoxCasing->insertItem( i18n( "Lower case" ) );
147
m_comboBoxCasing->insertItem( i18n( "Upper case" ) );
149
m_comboBoxCasing->setCurrentItem( 1 );
150
else if ( info.toUpper )
151
m_comboBoxCasing->setCurrentItem( 2 );
153
m_comboBoxCasing->setCurrentItem( 0 );
154
connect( m_comboBoxCasing, SIGNAL( activated( const QString& ) ), SIGNAL( modified() ) );
156
label = new QLabel( i18n( "Only first letters:" ), this );
157
layout->addWidget( label, 3, 0 );
158
m_spinBoxLen = new QSpinBox( this );
159
label->setBuddy( m_spinBoxLen );
160
layout->addWidget( m_spinBoxLen, 3, 1 );
161
m_spinBoxLen->setMinValue( 0 );
162
m_spinBoxLen->setMaxValue( 9 );
163
m_spinBoxLen->setSpecialValueText( i18n( "Complete name" ) );
164
m_spinBoxLen->setValue( info.len > 9 ? 0 : info.len );
165
m_spinBoxLen->setMinimumWidth( m_spinBoxLen->fontMetrics().width( i18n( "Complete name" ) ) + 32 );
166
connect( m_spinBoxLen, SIGNAL( valueChanged( int ) ), SIGNAL( modified() ) );
168
label = new QLabel( i18n( "Text between authors:" ), this );
169
layout->addWidget( label, 4, 0 );
170
m_lineEditInBetween = new KLineEdit( this );
171
label->setBuddy( m_lineEditInBetween );
172
layout->addWidget( m_lineEditInBetween, 4, 1 );
173
m_lineEditInBetween->setText( info.inBetween );
174
connect( m_lineEditInBetween, SIGNAL( textChanged( const QString& ) ), SIGNAL( modified() ) );
176
layout->setRowStretch( 5, 1 );
177
layout->setColStretch( 1, 1 );
178
layout->setColSpacing( 2, KDialog::spacingHint() * 3 );
179
layout->addMultiCellWidget( moveWidgets( this ), 0, 5, 3, 3 );
182
QString IdSuggestionComponentAuthor::text() const
184
if ( m_toBeDeleted ) return QString::null;
187
switch ( m_comboBoxWhichAuthors->currentItem() )
189
case 1: result = "a"; break;
190
case 2: result = "z"; break;
191
default: result = "A";
193
if ( m_spinBoxLen->value() > 0 && m_spinBoxLen->value() <= 9 ) result.append( QString::number( m_spinBoxLen->value() ) );
194
if ( m_comboBoxCasing->currentItem() == 1 ) result.append( "l" );
195
else if ( m_comboBoxCasing->currentItem() == 2 ) result.append( "u" );
196
if ( !m_lineEditInBetween->text().isEmpty() ) result.append( '"' ).append( m_lineEditInBetween->text() );
201
IdSuggestionComponentTitle::IdSuggestionComponentTitle( const QString &text, QWidget *parent ): IdSuggestionComponent( i18n( "Title" ), parent )
203
QGridLayout *layout = new QGridLayout( this, 6, 4, KDialog::marginHint(), KDialog::spacingHint() );
205
QLabel *label = new QLabel( m_title, this );
206
QFont labelFont( label->font() );
207
labelFont.setBold( TRUE );
208
label->setFont( labelFont );
209
label->setBackgroundColor( KGlobalSettings::highlightColor() );
210
label->setPaletteForegroundColor( KGlobalSettings::highlightedTextColor() );
211
label->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
212
layout->addMultiCellWidget( label, 0, 0, 0, 2 );
214
m_checkBoxRemoveSmallWords = new QCheckBox( i18n( "Remove small words" ), this );
215
layout->addMultiCellWidget( m_checkBoxRemoveSmallWords, 1, 1, 0, 1 );
216
m_checkBoxRemoveSmallWords->setChecked( text[0] == 'T' );
217
connect( m_checkBoxRemoveSmallWords, SIGNAL( toggled( bool ) ), SIGNAL( modified() ) );
219
struct IdSuggestionTokenInfo info = IdSuggestions::evalToken( text.mid( 1 ) );
221
label = new QLabel( i18n( "Casing:" ), this );
222
layout->addWidget( label, 2, 0 );
223
m_comboBoxCasing = new KComboBox( FALSE, this );
224
label->setBuddy( m_comboBoxCasing );
225
layout->addWidget( m_comboBoxCasing, 2, 1 );
226
m_comboBoxCasing->insertItem( i18n( "No change" ) );
227
m_comboBoxCasing->insertItem( i18n( "Lower case" ) );
228
m_comboBoxCasing->insertItem( i18n( "Upper case" ) );
230
m_comboBoxCasing->setCurrentItem( 1 );
231
else if ( info.toUpper )
232
m_comboBoxCasing->setCurrentItem( 2 );
234
m_comboBoxCasing->setCurrentItem( 0 );
235
connect( m_comboBoxCasing, SIGNAL( textChanged( const QString& ) ), SIGNAL( modified() ) );
237
label = new QLabel( i18n( "Only first letters:" ), this );
238
layout->addWidget( label, 3, 0 );
239
m_spinBoxLen = new QSpinBox( this );
240
label->setBuddy( m_spinBoxLen );
241
layout->addWidget( m_spinBoxLen, 3, 1 );
242
m_spinBoxLen->setMinValue( 0 );
243
m_spinBoxLen->setMaxValue( 9 );
244
m_spinBoxLen->setSpecialValueText( i18n( "Complete title" ) );
245
m_spinBoxLen->setValue( info.len > 9 ? 0 : info.len );
246
m_spinBoxLen->setMinimumWidth( m_spinBoxLen->fontMetrics().width( i18n( "Complete title" ) ) + 32 );
247
connect( m_spinBoxLen, SIGNAL( valueChanged( int ) ), SIGNAL( modified() ) );
249
label = new QLabel( i18n( "Text between words:" ), this );
250
layout->addWidget( label, 4, 0 );
251
m_lineEditInBetween = new KLineEdit( this );
252
label->setBuddy( m_lineEditInBetween );
253
layout->addWidget( m_lineEditInBetween, 4, 1 );
254
m_lineEditInBetween->setText( info.inBetween );
255
connect( m_lineEditInBetween, SIGNAL( textChanged( const QString& ) ), SIGNAL( modified() ) );
257
layout->setRowStretch( 5, 1 );
258
layout->setColStretch( 1, 1 );
259
layout->setColSpacing( 2, KDialog::spacingHint() *2 );
260
layout->addMultiCellWidget( moveWidgets( this ), 0, 5, 3, 3 );
263
QString IdSuggestionComponentTitle::text() const
265
if ( m_toBeDeleted ) return QString::null;
267
QString result = m_checkBoxRemoveSmallWords->isChecked() ? "T" : "t";
268
if ( m_spinBoxLen->value() > 0 && m_spinBoxLen->value() <= 9 ) result.append( QString::number( m_spinBoxLen->value() ) );
269
if ( m_comboBoxCasing->currentItem() == 1 ) result.append( "l" );
270
else if ( m_comboBoxCasing->currentItem() == 2 ) result.append( "u" );
271
if ( !m_lineEditInBetween->text().isEmpty() ) result.append( '"' ).append( m_lineEditInBetween->text() );
276
IdSuggestionComponentYear::IdSuggestionComponentYear( const QString &text, QWidget *parent ): IdSuggestionComponent( i18n( "Year" ), parent )
278
QGridLayout *layout = new QGridLayout( this, 3, 4, KDialog::marginHint(), KDialog::spacingHint() );
280
QLabel *label = new QLabel( m_title, this );
281
QFont labelFont( label->font() );
282
labelFont.setBold( TRUE );
283
label->setFont( labelFont );
284
label->setBackgroundColor( KGlobalSettings::highlightColor() );
285
label->setPaletteForegroundColor( KGlobalSettings::highlightedTextColor() );
286
label->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
287
layout->addMultiCellWidget( label, 0, 0, 0, 2 );
289
label = new QLabel( i18n( "Year:" ), this );
290
layout->addWidget( label, 1, 0 );
291
m_comboBoxDigits = new KComboBox( this );
292
label->setBuddy( m_comboBoxDigits );
293
layout->addWidget( m_comboBoxDigits, 1, 1 );
294
m_comboBoxDigits->insertItem( i18n( "2 digits" ) );
295
m_comboBoxDigits->insertItem( i18n( "4 digits" ) );
296
m_comboBoxDigits->setCurrentItem( text[0] == 'y' ? 0 : 1 );
297
connect( m_comboBoxDigits, SIGNAL( activated( int ) ), SIGNAL( modified() ) );
299
layout->setColStretch( 1, 1 );
300
layout->setRowStretch( 2, 1 );
301
layout->setColSpacing( 2, KDialog::spacingHint() *2 );
302
layout->addMultiCellWidget( moveWidgets( this ), 0, 2, 3, 3 );
305
QString IdSuggestionComponentYear::text() const
307
if ( m_toBeDeleted ) return QString::null;
308
return m_comboBoxDigits->currentItem() == 0 ? "y" : "Y";
311
IdSuggestionComponentText::IdSuggestionComponentText( const QString &text, QWidget *parent ): IdSuggestionComponent( i18n( "Text" ), parent )
313
QGridLayout *layout = new QGridLayout( this, 3, 4, KDialog::marginHint(), KDialog::spacingHint() );
315
QLabel *label = new QLabel( m_title, this );
316
QFont labelFont( label->font() );
317
labelFont.setBold( TRUE );
318
label->setFont( labelFont );
319
label->setBackgroundColor( KGlobalSettings::highlightColor() );
320
label->setPaletteForegroundColor( KGlobalSettings::highlightedTextColor() );
321
label->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
322
layout->addMultiCellWidget( label, 0, 0, 0, 2 );
324
label = new QLabel( i18n( "Text in between:" ), this );
325
layout->addWidget( label, 1, 0 );
326
m_lineEditInBetween = new KLineEdit( this );
327
label->setBuddy( m_lineEditInBetween );
328
layout->addWidget( m_lineEditInBetween, 1, 1 );
329
m_lineEditInBetween->setText( text.mid( 1 ) );
330
connect( m_lineEditInBetween, SIGNAL( textChanged( const QString& ) ), SIGNAL( modified() ) );
332
layout->setColStretch( 1, 1 );
333
layout->setRowStretch( 2, 1 );
334
layout->setColSpacing( 2, KDialog::spacingHint() * 2 );
335
layout->addMultiCellWidget( moveWidgets( this ), 0, 2, 3, 3 );
338
QString IdSuggestionComponentText::text() const
340
if ( m_toBeDeleted ) return QString::null;
341
return m_lineEditInBetween->text().isEmpty() ? QString::null : QString( "\"" ).append( m_lineEditInBetween->text() );
344
IdSuggestionsScrollView::IdSuggestionsScrollView( QWidget *parent, const char*name ): QScrollView( parent, name ), m_widget( NULL )
346
setMinimumHeight( 256 );
347
setHScrollBarMode( QScrollView::AlwaysOff );
348
setVScrollBarMode( QScrollView::AlwaysOn );
352
IdSuggestionsScrollView::~IdSuggestionsScrollView()
357
void IdSuggestionsScrollView::viewportResizeEvent( QResizeEvent * )
359
if ( m_widget != NULL )
360
m_widget->setFixedWidth( viewport()->width() );
363
IdSuggestionsWidget::IdSuggestionsWidget( const QString &formatStr, KDialogBase *parent, const char *name )
364
: QWidget( parent, name ), m_originalFormatStr( formatStr ), m_parent( parent )
366
BibTeX::FileImporter *importer = new BibTeX::FileImporterBibTeX( false );
367
BibTeX::File *file = importer->load( exampleBibTeXEntry );
368
m_example = new BibTeX::Entry( dynamic_cast<BibTeX::Entry*>( *( file->begin() ) ) );
376
IdSuggestionsWidget::~IdSuggestionsWidget()
381
int IdSuggestionsWidget::numComponents()
383
return m_componentCount;
386
QDialog::DialogCode IdSuggestionsWidget::execute( QString &formatStr, QWidget *parent, const char *name )
388
KDialogBase * dlg = new KDialogBase( parent, name, true, i18n( "Edit Id Suggestions" ), KDialogBase::Ok | KDialogBase::Cancel );
389
IdSuggestionsWidget* ui = new IdSuggestionsWidget( formatStr, dlg, "IdSuggestionsWidget" );
390
dlg->setMainWidget( ui );
392
QDialog::DialogCode result = ( QDialog::DialogCode ) dlg->exec();
393
if ( result == QDialog::Accepted )
394
ui->apply( formatStr );
402
void IdSuggestionsWidget::reset( const QString& formatStr )
404
QLayoutIterator it = m_listOfComponents->layout()->iterator();
406
while (( child = it.current() ) != 0 )
408
IdSuggestionComponent *component = dynamic_cast<IdSuggestionComponent*>( child->widget() );
410
if ( component != NULL )
414
m_componentCount = 0;
415
QStringList lines = QStringList::split( '|', formatStr );
416
for ( QStringList::Iterator it = lines.begin(); it != lines.end();++it )
418
IdSuggestionComponent *component = NULL;
419
if (( *it )[0] == 'a' || ( *it )[0] == 'A' )
420
component = new IdSuggestionComponentAuthor( *it, m_listOfComponents );
421
else if (( *it )[0] == 't' || ( *it )[0] == 'T' )
422
component = new IdSuggestionComponentTitle( *it, m_listOfComponents );
423
else if (( *it )[0] == 'y' || ( *it )[0] == 'Y' )
424
component = new IdSuggestionComponentYear( *it, m_listOfComponents );
425
else if (( *it )[0] == '"' )
426
component = new IdSuggestionComponentText( *it, m_listOfComponents );
428
if ( component != NULL )
431
connect( component, SIGNAL( moved() ), this, SLOT( updateGUI() ) );
432
connect( component, SIGNAL( deleted() ), this, SLOT( componentDeleted() ) );
433
connect( component, SIGNAL( modified() ), this, SLOT( updateExample() ) );
437
m_listOfComponents->adjustSize();
438
m_scrollViewComponents->verticalScrollBar()->adjustSize();
440
m_scrollViewComponents->resize( m_scrollViewComponents->width(), min( 384, m_listOfComponents->height() + 2 ) );
443
void IdSuggestionsWidget::apply( QString& formatStr )
447
QLayoutIterator it = m_listOfComponents->layout()->iterator();
449
while (( child = it.current() ) != 0 )
451
IdSuggestionComponent *component = dynamic_cast<IdSuggestionComponent*>( child->widget() );
452
QString text = QString::null;
453
if ( component != NULL && ( text = component->text() ) != QString::null )
455
if ( first ) first = FALSE; else formatStr.append( "|" );
456
formatStr.append( text );
462
void IdSuggestionsWidget::setupGUI()
464
QGridLayout *gridLayout = new QGridLayout( this, 3, 2, 0, KDialog::spacingHint() );
465
gridLayout->setRowStretch( 2, 1 );
466
gridLayout->setColStretch( 0, 1 );
468
m_labelExample = new QLabel( this );
469
gridLayout->addMultiCellWidget( m_labelExample, 0, 1, 0, 0 );
471
m_pushButtonAdd = new KPushButton( i18n( "Add" ), this );
472
gridLayout->addWidget( m_pushButtonAdd, 1, 1 );
474
m_scrollViewComponents = new IdSuggestionsScrollView( this );
475
m_listOfComponents = new QWidget( m_scrollViewComponents->viewport() );
476
m_scrollViewComponents->setMainWidget( m_listOfComponents );
477
m_scrollViewComponents->addChild( m_listOfComponents );
478
gridLayout->addMultiCellWidget( m_scrollViewComponents, 2, 2, 0, 1 );
479
QVBoxLayout *listLayout = new QVBoxLayout( m_listOfComponents, 0, KDialog::spacingHint() );
480
listLayout->setAutoAdd( TRUE );
482
KPopupMenu *addMenu = new KPopupMenu( m_pushButtonAdd );
483
addMenu->insertItem( i18n( "Author" ), 1 );
484
addMenu->insertItem( i18n( "Year" ), 2 );
485
addMenu->insertItem( i18n( "Title" ), 3 );
486
addMenu->insertItem( i18n( "Text" ), 4 );
487
connect( addMenu, SIGNAL( activated( int ) ), this, SLOT( addMenuActivated( int ) ) );
488
m_pushButtonAdd->setPopup( addMenu );
491
void IdSuggestionsWidget::addMenuActivated( int id )
493
IdSuggestionComponent *comp = NULL;
495
comp = new IdSuggestionComponentAuthor( "a", m_listOfComponents );
497
comp = new IdSuggestionComponentYear( "y", m_listOfComponents );
499
comp = new IdSuggestionComponentTitle( "t", m_listOfComponents );
501
comp = new IdSuggestionComponentText( "", m_listOfComponents );
509
connect( comp, SIGNAL( moved() ), this, SLOT( updateGUI() ) );
510
connect( comp, SIGNAL( deleted() ), this, SLOT( componentDeleted() ) );
511
connect( comp, SIGNAL( modified() ), this, SLOT( updateExample() ) );
512
m_listOfComponents->adjustSize();
513
m_scrollViewComponents->ensureVisible( 10, m_listOfComponents->height() - 2 );
518
void IdSuggestionsWidget::updateGUI()
520
QLayoutIterator it = m_listOfComponents->layout()->iterator();
521
QLayoutItem *child = NULL;
522
IdSuggestionComponent *lastComponent = NULL;
525
while (( child = it.current() ) != 0 )
527
IdSuggestionComponent *component = dynamic_cast<IdSuggestionComponent*>( child->widget() );
529
if ( component != NULL )
534
component->setEnableUpDown( FALSE, m_componentCount > 1 );
537
component->setEnableUpDown( TRUE, i < m_componentCount - 1 );
540
lastComponent = component;
544
if ( lastComponent != NULL )
545
lastComponent->setEnableUpDown( m_componentCount > 1, FALSE );
547
m_scrollViewComponents->updateGeometry();
548
m_parent->enableButtonOK( m_componentCount > 0 );
552
void IdSuggestionsWidget::componentDeleted()
558
void IdSuggestionsWidget::updateExample()
562
QString formatted = IdSuggestions::formatId( m_example, formatStr );
563
m_labelExample->setText( QString( i18n( "<qt>Example:<br/><b>%1</b></qt>" ) ).arg( formatted ) );
567
#include "idsuggestionswidget.moc"