summaryrefslogtreecommitdiffstats
path: root/src/idsuggestionswidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/idsuggestionswidget.cpp')
-rw-r--r--src/idsuggestionswidget.cpp192
1 files changed, 96 insertions, 96 deletions
diff --git a/src/idsuggestionswidget.cpp b/src/idsuggestionswidget.cpp
index d2d371f..5faaff9 100644
--- a/src/idsuggestionswidget.cpp
+++ b/src/idsuggestionswidget.cpp
@@ -17,12 +17,12 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qlayout.h>
-#include <qspinbox.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qobjectlist.h>
-#include <qscrollview.h>
+#include <ntqlayout.h>
+#include <ntqspinbox.h>
+#include <ntqlabel.h>
+#include <ntqcheckbox.h>
+#include <ntqobjectlist.h>
+#include <ntqscrollview.h>
#include <kglobalsettings.h>
#include <klineedit.h>
@@ -43,22 +43,22 @@
namespace KBibTeX
{
- 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}";
+ TQString 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}";
- IdSuggestionComponent::IdSuggestionComponent( const QString& title, QWidget *parent ): QFrame( parent ), m_toBeDeleted( false ), m_title( title ), m_parent( parent )
+ IdSuggestionComponent::IdSuggestionComponent( const TQString& title, TQWidget *parent ): TQFrame( parent ), m_toBeDeleted( false ), m_title( title ), m_parent( parent )
{
- setFrameShape( QFrame::Panel );
- setFrameShadow( QFrame::Sunken );
+ setFrameShape( TQFrame::Panel );
+ setFrameShadow( TQFrame::Sunken );
setLineWidth( 1 );
}
- QWidget *IdSuggestionComponent::moveWidgets( QWidget *parent )
+ TQWidget *IdSuggestionComponent::moveWidgets( TQWidget *parent )
{
- QWidget *container = new QWidget( parent );
- QVBoxLayout *layout = new QVBoxLayout( container, 0, KDialog::spacingHint() );
- m_pushButtonUp = new KPushButton( QIconSet( SmallIcon( "up" ) ), i18n( "Up" ), container );
- m_pushButtonDown = new KPushButton( QIconSet( SmallIcon( "down" ) ), i18n( "Down" ), container );
- m_pushButtonDel = new KPushButton( QIconSet( SmallIcon( "remove" ) ), i18n( "Delete" ), container );
+ TQWidget *container = new TQWidget( parent );
+ TQVBoxLayout *layout = new TQVBoxLayout( container, 0, KDialog::spacingHint() );
+ m_pushButtonUp = new KPushButton( TQIconSet( SmallIcon( "up" ) ), i18n( "Up" ), container );
+ m_pushButtonDown = new KPushButton( TQIconSet( SmallIcon( "down" ) ), i18n( "Down" ), container );
+ m_pushButtonDel = new KPushButton( TQIconSet( SmallIcon( "remove" ) ), i18n( "Delete" ), container );
layout->addWidget( m_pushButtonUp );
layout->addWidget( m_pushButtonDown );
layout->addWidget( m_pushButtonDel );
@@ -77,7 +77,7 @@ namespace KBibTeX
void IdSuggestionComponent::slotUp()
{
- QVBoxLayout *layout = dynamic_cast<QVBoxLayout*>( m_parent->layout() );
+ TQVBoxLayout *layout = dynamic_cast<TQVBoxLayout*>( m_parent->layout() );
if ( layout == NULL ) return;
int oldPos = layout->findWidget( this );
if ( oldPos > 0 )
@@ -90,7 +90,7 @@ namespace KBibTeX
void IdSuggestionComponent::slotDown()
{
- QVBoxLayout *layout = dynamic_cast<QVBoxLayout*>( m_parent->layout() );
+ TQVBoxLayout *layout = dynamic_cast<TQVBoxLayout*>( m_parent->layout() );
if ( layout == NULL ) return;
int oldPos = layout->findWidget( this );
int componentCount = dynamic_cast<IdSuggestionsWidget*>( m_parent->parent()->parent()->parent() )->numComponents();
@@ -109,17 +109,17 @@ namespace KBibTeX
delete this;
}
- IdSuggestionComponentAuthor::IdSuggestionComponentAuthor( const QString &text, QWidget *parent ): IdSuggestionComponent( i18n( "Author" ), parent )
+ IdSuggestionComponentAuthor::IdSuggestionComponentAuthor( const TQString &text, TQWidget *parent ): IdSuggestionComponent( i18n( "Author" ), parent )
{
- QGridLayout *layout = new QGridLayout( this, 6, 4, KDialog::marginHint(), KDialog::spacingHint() );
+ TQGridLayout *layout = new TQGridLayout( this, 6, 4, KDialog::marginHint(), KDialog::spacingHint() );
- QLabel *label = new QLabel( m_title, this );
- QFont labelFont( label->font() );
+ TQLabel *label = new TQLabel( m_title, this );
+ TQFont labelFont( label->font() );
labelFont.setBold( TRUE );
label->setFont( labelFont );
label->setBackgroundColor( KGlobalSettings::highlightColor() );
label->setPaletteForegroundColor( KGlobalSettings::highlightedTextColor() );
- label->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
+ label->setAlignment( TQt::AlignHCenter | TQt::AlignVCenter );
layout->addMultiCellWidget( label, 0, 0, 0, 2 );
m_comboBoxWhichAuthors = new KComboBox( false, this );
@@ -133,11 +133,11 @@ namespace KBibTeX
case 'z': m_comboBoxWhichAuthors->setCurrentItem( 2 ); break;
default: m_comboBoxWhichAuthors->setCurrentItem( 0 );
}
- connect( m_comboBoxWhichAuthors, SIGNAL( activated( const QString& ) ), SIGNAL( modified() ) );
+ connect( m_comboBoxWhichAuthors, SIGNAL( activated( const TQString& ) ), SIGNAL( modified() ) );
struct IdSuggestionTokenInfo info = IdSuggestions::evalToken( text.mid( 1 ) );
- label = new QLabel( i18n( "Casing:" ), this );
+ label = new TQLabel( i18n( "Casing:" ), this );
layout->addWidget( label, 2, 0 );
m_comboBoxCasing = new KComboBox( FALSE, this );
label->setBuddy( m_comboBoxCasing );
@@ -151,11 +151,11 @@ namespace KBibTeX
m_comboBoxCasing->setCurrentItem( 2 );
else
m_comboBoxCasing->setCurrentItem( 0 );
- connect( m_comboBoxCasing, SIGNAL( activated( const QString& ) ), SIGNAL( modified() ) );
+ connect( m_comboBoxCasing, SIGNAL( activated( const TQString& ) ), SIGNAL( modified() ) );
- label = new QLabel( i18n( "Only first letters:" ), this );
+ label = new TQLabel( i18n( "Only first letters:" ), this );
layout->addWidget( label, 3, 0 );
- m_spinBoxLen = new QSpinBox( this );
+ m_spinBoxLen = new TQSpinBox( this );
label->setBuddy( m_spinBoxLen );
layout->addWidget( m_spinBoxLen, 3, 1 );
m_spinBoxLen->setMinValue( 0 );
@@ -165,13 +165,13 @@ namespace KBibTeX
m_spinBoxLen->setMinimumWidth( m_spinBoxLen->fontMetrics().width( i18n( "Complete name" ) ) + 32 );
connect( m_spinBoxLen, SIGNAL( valueChanged( int ) ), SIGNAL( modified() ) );
- label = new QLabel( i18n( "Text between authors:" ), this );
+ label = new TQLabel( i18n( "Text between authors:" ), this );
layout->addWidget( label, 4, 0 );
m_lineEditInBetween = new KLineEdit( this );
label->setBuddy( m_lineEditInBetween );
layout->addWidget( m_lineEditInBetween, 4, 1 );
m_lineEditInBetween->setText( info.inBetween );
- connect( m_lineEditInBetween, SIGNAL( textChanged( const QString& ) ), SIGNAL( modified() ) );
+ connect( m_lineEditInBetween, SIGNAL( textChanged( const TQString& ) ), SIGNAL( modified() ) );
layout->setRowStretch( 5, 1 );
layout->setColStretch( 1, 1 );
@@ -179,18 +179,18 @@ namespace KBibTeX
layout->addMultiCellWidget( moveWidgets( this ), 0, 5, 3, 3 );
}
- QString IdSuggestionComponentAuthor::text() const
+ TQString IdSuggestionComponentAuthor::text() const
{
- if ( m_toBeDeleted ) return QString::null;
+ if ( m_toBeDeleted ) return TQString::null;
- QString result;
+ TQString result;
switch ( m_comboBoxWhichAuthors->currentItem() )
{
case 1: result = "a"; break;
case 2: result = "z"; break;
default: result = "A";
}
- if ( m_spinBoxLen->value() > 0 && m_spinBoxLen->value() <= 9 ) result.append( QString::number( m_spinBoxLen->value() ) );
+ if ( m_spinBoxLen->value() > 0 && m_spinBoxLen->value() <= 9 ) result.append( TQString::number( m_spinBoxLen->value() ) );
if ( m_comboBoxCasing->currentItem() == 1 ) result.append( "l" );
else if ( m_comboBoxCasing->currentItem() == 2 ) result.append( "u" );
if ( !m_lineEditInBetween->text().isEmpty() ) result.append( '"' ).append( m_lineEditInBetween->text() );
@@ -198,27 +198,27 @@ namespace KBibTeX
return result;
}
- IdSuggestionComponentTitle::IdSuggestionComponentTitle( const QString &text, QWidget *parent ): IdSuggestionComponent( i18n( "Title" ), parent )
+ IdSuggestionComponentTitle::IdSuggestionComponentTitle( const TQString &text, TQWidget *parent ): IdSuggestionComponent( i18n( "Title" ), parent )
{
- QGridLayout *layout = new QGridLayout( this, 6, 4, KDialog::marginHint(), KDialog::spacingHint() );
+ TQGridLayout *layout = new TQGridLayout( this, 6, 4, KDialog::marginHint(), KDialog::spacingHint() );
- QLabel *label = new QLabel( m_title, this );
- QFont labelFont( label->font() );
+ TQLabel *label = new TQLabel( m_title, this );
+ TQFont labelFont( label->font() );
labelFont.setBold( TRUE );
label->setFont( labelFont );
label->setBackgroundColor( KGlobalSettings::highlightColor() );
label->setPaletteForegroundColor( KGlobalSettings::highlightedTextColor() );
- label->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
+ label->setAlignment( TQt::AlignHCenter | TQt::AlignVCenter );
layout->addMultiCellWidget( label, 0, 0, 0, 2 );
- m_checkBoxRemoveSmallWords = new QCheckBox( i18n( "Remove small words" ), this );
+ m_checkBoxRemoveSmallWords = new TQCheckBox( i18n( "Remove small words" ), this );
layout->addMultiCellWidget( m_checkBoxRemoveSmallWords, 1, 1, 0, 1 );
m_checkBoxRemoveSmallWords->setChecked( text[0] == 'T' );
connect( m_checkBoxRemoveSmallWords, SIGNAL( toggled( bool ) ), SIGNAL( modified() ) );
struct IdSuggestionTokenInfo info = IdSuggestions::evalToken( text.mid( 1 ) );
- label = new QLabel( i18n( "Casing:" ), this );
+ label = new TQLabel( i18n( "Casing:" ), this );
layout->addWidget( label, 2, 0 );
m_comboBoxCasing = new KComboBox( FALSE, this );
label->setBuddy( m_comboBoxCasing );
@@ -232,11 +232,11 @@ namespace KBibTeX
m_comboBoxCasing->setCurrentItem( 2 );
else
m_comboBoxCasing->setCurrentItem( 0 );
- connect( m_comboBoxCasing, SIGNAL( textChanged( const QString& ) ), SIGNAL( modified() ) );
+ connect( m_comboBoxCasing, SIGNAL( textChanged( const TQString& ) ), SIGNAL( modified() ) );
- label = new QLabel( i18n( "Only first letters:" ), this );
+ label = new TQLabel( i18n( "Only first letters:" ), this );
layout->addWidget( label, 3, 0 );
- m_spinBoxLen = new QSpinBox( this );
+ m_spinBoxLen = new TQSpinBox( this );
label->setBuddy( m_spinBoxLen );
layout->addWidget( m_spinBoxLen, 3, 1 );
m_spinBoxLen->setMinValue( 0 );
@@ -246,13 +246,13 @@ namespace KBibTeX
m_spinBoxLen->setMinimumWidth( m_spinBoxLen->fontMetrics().width( i18n( "Complete title" ) ) + 32 );
connect( m_spinBoxLen, SIGNAL( valueChanged( int ) ), SIGNAL( modified() ) );
- label = new QLabel( i18n( "Text between words:" ), this );
+ label = new TQLabel( i18n( "Text between words:" ), this );
layout->addWidget( label, 4, 0 );
m_lineEditInBetween = new KLineEdit( this );
label->setBuddy( m_lineEditInBetween );
layout->addWidget( m_lineEditInBetween, 4, 1 );
m_lineEditInBetween->setText( info.inBetween );
- connect( m_lineEditInBetween, SIGNAL( textChanged( const QString& ) ), SIGNAL( modified() ) );
+ connect( m_lineEditInBetween, SIGNAL( textChanged( const TQString& ) ), SIGNAL( modified() ) );
layout->setRowStretch( 5, 1 );
layout->setColStretch( 1, 1 );
@@ -260,12 +260,12 @@ namespace KBibTeX
layout->addMultiCellWidget( moveWidgets( this ), 0, 5, 3, 3 );
}
- QString IdSuggestionComponentTitle::text() const
+ TQString IdSuggestionComponentTitle::text() const
{
- if ( m_toBeDeleted ) return QString::null;
+ if ( m_toBeDeleted ) return TQString::null;
- QString result = m_checkBoxRemoveSmallWords->isChecked() ? "T" : "t";
- if ( m_spinBoxLen->value() > 0 && m_spinBoxLen->value() <= 9 ) result.append( QString::number( m_spinBoxLen->value() ) );
+ TQString result = m_checkBoxRemoveSmallWords->isChecked() ? "T" : "t";
+ if ( m_spinBoxLen->value() > 0 && m_spinBoxLen->value() <= 9 ) result.append( TQString::number( m_spinBoxLen->value() ) );
if ( m_comboBoxCasing->currentItem() == 1 ) result.append( "l" );
else if ( m_comboBoxCasing->currentItem() == 2 ) result.append( "u" );
if ( !m_lineEditInBetween->text().isEmpty() ) result.append( '"' ).append( m_lineEditInBetween->text() );
@@ -273,20 +273,20 @@ namespace KBibTeX
return result;
}
- IdSuggestionComponentYear::IdSuggestionComponentYear( const QString &text, QWidget *parent ): IdSuggestionComponent( i18n( "Year" ), parent )
+ IdSuggestionComponentYear::IdSuggestionComponentYear( const TQString &text, TQWidget *parent ): IdSuggestionComponent( i18n( "Year" ), parent )
{
- QGridLayout *layout = new QGridLayout( this, 3, 4, KDialog::marginHint(), KDialog::spacingHint() );
+ TQGridLayout *layout = new TQGridLayout( this, 3, 4, KDialog::marginHint(), KDialog::spacingHint() );
- QLabel *label = new QLabel( m_title, this );
- QFont labelFont( label->font() );
+ TQLabel *label = new TQLabel( m_title, this );
+ TQFont labelFont( label->font() );
labelFont.setBold( TRUE );
label->setFont( labelFont );
label->setBackgroundColor( KGlobalSettings::highlightColor() );
label->setPaletteForegroundColor( KGlobalSettings::highlightedTextColor() );
- label->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
+ label->setAlignment( TQt::AlignHCenter | TQt::AlignVCenter );
layout->addMultiCellWidget( label, 0, 0, 0, 2 );
- label = new QLabel( i18n( "Year:" ), this );
+ label = new TQLabel( i18n( "Year:" ), this );
layout->addWidget( label, 1, 0 );
m_comboBoxDigits = new KComboBox( this );
label->setBuddy( m_comboBoxDigits );
@@ -302,32 +302,32 @@ namespace KBibTeX
layout->addMultiCellWidget( moveWidgets( this ), 0, 2, 3, 3 );
}
- QString IdSuggestionComponentYear::text() const
+ TQString IdSuggestionComponentYear::text() const
{
- if ( m_toBeDeleted ) return QString::null;
+ if ( m_toBeDeleted ) return TQString::null;
return m_comboBoxDigits->currentItem() == 0 ? "y" : "Y";
}
- IdSuggestionComponentText::IdSuggestionComponentText( const QString &text, QWidget *parent ): IdSuggestionComponent( i18n( "Text" ), parent )
+ IdSuggestionComponentText::IdSuggestionComponentText( const TQString &text, TQWidget *parent ): IdSuggestionComponent( i18n( "Text" ), parent )
{
- QGridLayout *layout = new QGridLayout( this, 3, 4, KDialog::marginHint(), KDialog::spacingHint() );
+ TQGridLayout *layout = new TQGridLayout( this, 3, 4, KDialog::marginHint(), KDialog::spacingHint() );
- QLabel *label = new QLabel( m_title, this );
- QFont labelFont( label->font() );
+ TQLabel *label = new TQLabel( m_title, this );
+ TQFont labelFont( label->font() );
labelFont.setBold( TRUE );
label->setFont( labelFont );
label->setBackgroundColor( KGlobalSettings::highlightColor() );
label->setPaletteForegroundColor( KGlobalSettings::highlightedTextColor() );
- label->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
+ label->setAlignment( TQt::AlignHCenter | TQt::AlignVCenter );
layout->addMultiCellWidget( label, 0, 0, 0, 2 );
- label = new QLabel( i18n( "Text in between:" ), this );
+ label = new TQLabel( i18n( "Text in between:" ), this );
layout->addWidget( label, 1, 0 );
m_lineEditInBetween = new KLineEdit( this );
label->setBuddy( m_lineEditInBetween );
layout->addWidget( m_lineEditInBetween, 1, 1 );
m_lineEditInBetween->setText( text.mid( 1 ) );
- connect( m_lineEditInBetween, SIGNAL( textChanged( const QString& ) ), SIGNAL( modified() ) );
+ connect( m_lineEditInBetween, SIGNAL( textChanged( const TQString& ) ), SIGNAL( modified() ) );
layout->setColStretch( 1, 1 );
layout->setRowStretch( 2, 1 );
@@ -335,17 +335,17 @@ namespace KBibTeX
layout->addMultiCellWidget( moveWidgets( this ), 0, 2, 3, 3 );
}
- QString IdSuggestionComponentText::text() const
+ TQString IdSuggestionComponentText::text() const
{
- if ( m_toBeDeleted ) return QString::null;
- return m_lineEditInBetween->text().isEmpty() ? QString::null : QString( "\"" ).append( m_lineEditInBetween->text() );
+ if ( m_toBeDeleted ) return TQString::null;
+ return m_lineEditInBetween->text().isEmpty() ? TQString::null : TQString( "\"" ).append( m_lineEditInBetween->text() );
}
- IdSuggestionsScrollView::IdSuggestionsScrollView( QWidget *parent, const char*name ): QScrollView( parent, name ), m_widget( NULL )
+ IdSuggestionsScrollView::IdSuggestionsScrollView( TQWidget *parent, const char*name ): TQScrollView( parent, name ), m_widget( NULL )
{
setMinimumHeight( 256 );
- setHScrollBarMode( QScrollView::AlwaysOff );
- setVScrollBarMode( QScrollView::AlwaysOn );
+ setHScrollBarMode( TQScrollView::AlwaysOff );
+ setVScrollBarMode( TQScrollView::AlwaysOn );
setLineWidth( 0 );
}
@@ -354,14 +354,14 @@ namespace KBibTeX
// nothing
}
- void IdSuggestionsScrollView::viewportResizeEvent( QResizeEvent * )
+ void IdSuggestionsScrollView::viewportResizeEvent( TQResizeEvent * )
{
if ( m_widget != NULL )
m_widget->setFixedWidth( viewport()->width() );
}
- IdSuggestionsWidget::IdSuggestionsWidget( const QString &formatStr, KDialogBase *parent, const char *name )
- : QWidget( parent, name ), m_originalFormatStr( formatStr ), m_parent( parent )
+ IdSuggestionsWidget::IdSuggestionsWidget( const TQString &formatStr, KDialogBase *parent, const char *name )
+ : TQWidget( parent, name ), m_originalFormatStr( formatStr ), m_parent( parent )
{
BibTeX::FileImporter *importer = new BibTeX::FileImporterBibTeX( false );
BibTeX::File *file = importer->load( exampleBibTeXEntry );
@@ -383,14 +383,14 @@ namespace KBibTeX
return m_componentCount;
}
- QDialog::DialogCode IdSuggestionsWidget::execute( QString &formatStr, QWidget *parent, const char *name )
+ TQDialog::DialogCode IdSuggestionsWidget::execute( TQString &formatStr, TQWidget *parent, const char *name )
{
KDialogBase * dlg = new KDialogBase( parent, name, true, i18n( "Edit Id Suggestions" ), KDialogBase::Ok | KDialogBase::Cancel );
IdSuggestionsWidget* ui = new IdSuggestionsWidget( formatStr, dlg, "IdSuggestionsWidget" );
dlg->setMainWidget( ui );
- QDialog::DialogCode result = ( QDialog::DialogCode ) dlg->exec();
- if ( result == QDialog::Accepted )
+ TQDialog::DialogCode result = ( TQDialog::DialogCode ) dlg->exec();
+ if ( result == TQDialog::Accepted )
ui->apply( formatStr );
delete( ui );
@@ -399,10 +399,10 @@ namespace KBibTeX
return result;
}
- void IdSuggestionsWidget::reset( const QString& formatStr )
+ void IdSuggestionsWidget::reset( const TQString& formatStr )
{
- QLayoutIterator it = m_listOfComponents->layout()->iterator();
- QLayoutItem *child;
+ TQLayoutIterator it = m_listOfComponents->layout()->iterator();
+ TQLayoutItem *child;
while (( child = it.current() ) != 0 )
{
IdSuggestionComponent *component = dynamic_cast<IdSuggestionComponent*>( child->widget() );
@@ -412,8 +412,8 @@ namespace KBibTeX
}
m_componentCount = 0;
- QStringList lines = QStringList::split( '|', formatStr );
- for ( QStringList::Iterator it = lines.begin(); it != lines.end();++it )
+ TQStringList lines = TQStringList::split( '|', formatStr );
+ for ( TQStringList::Iterator it = lines.begin(); it != lines.end();++it )
{
IdSuggestionComponent *component = NULL;
if (( *it )[0] == 'a' || ( *it )[0] == 'A' )
@@ -440,17 +440,17 @@ namespace KBibTeX
m_scrollViewComponents->resize( m_scrollViewComponents->width(), min( 384, m_listOfComponents->height() + 2 ) );
}
- void IdSuggestionsWidget::apply( QString& formatStr )
+ void IdSuggestionsWidget::apply( TQString& formatStr )
{
bool first = TRUE;
formatStr = "";
- QLayoutIterator it = m_listOfComponents->layout()->iterator();
- QLayoutItem *child;
+ TQLayoutIterator it = m_listOfComponents->layout()->iterator();
+ TQLayoutItem *child;
while (( child = it.current() ) != 0 )
{
IdSuggestionComponent *component = dynamic_cast<IdSuggestionComponent*>( child->widget() );
- QString text = QString::null;
- if ( component != NULL && ( text = component->text() ) != QString::null )
+ TQString text = TQString::null;
+ if ( component != NULL && ( text = component->text() ) != TQString::null )
{
if ( first ) first = FALSE; else formatStr.append( "|" );
formatStr.append( text );
@@ -461,22 +461,22 @@ namespace KBibTeX
void IdSuggestionsWidget::setupGUI()
{
- QGridLayout *gridLayout = new QGridLayout( this, 3, 2, 0, KDialog::spacingHint() );
+ TQGridLayout *gridLayout = new TQGridLayout( this, 3, 2, 0, KDialog::spacingHint() );
gridLayout->setRowStretch( 2, 1 );
gridLayout->setColStretch( 0, 1 );
- m_labelExample = new QLabel( this );
+ m_labelExample = new TQLabel( this );
gridLayout->addMultiCellWidget( m_labelExample, 0, 1, 0, 0 );
m_pushButtonAdd = new KPushButton( i18n( "Add" ), this );
gridLayout->addWidget( m_pushButtonAdd, 1, 1 );
m_scrollViewComponents = new IdSuggestionsScrollView( this );
- m_listOfComponents = new QWidget( m_scrollViewComponents->viewport() );
+ m_listOfComponents = new TQWidget( m_scrollViewComponents->viewport() );
m_scrollViewComponents->setMainWidget( m_listOfComponents );
m_scrollViewComponents->addChild( m_listOfComponents );
gridLayout->addMultiCellWidget( m_scrollViewComponents, 2, 2, 0, 1 );
- QVBoxLayout *listLayout = new QVBoxLayout( m_listOfComponents, 0, KDialog::spacingHint() );
+ TQVBoxLayout *listLayout = new TQVBoxLayout( m_listOfComponents, 0, KDialog::spacingHint() );
listLayout->setAutoAdd( TRUE );
KPopupMenu *addMenu = new KPopupMenu( m_pushButtonAdd );
@@ -517,8 +517,8 @@ namespace KBibTeX
void IdSuggestionsWidget::updateGUI()
{
- QLayoutIterator it = m_listOfComponents->layout()->iterator();
- QLayoutItem *child = NULL;
+ TQLayoutIterator it = m_listOfComponents->layout()->iterator();
+ TQLayoutItem *child = NULL;
IdSuggestionComponent *lastComponent = NULL;
bool first = TRUE;
int i = 0;
@@ -557,10 +557,10 @@ namespace KBibTeX
void IdSuggestionsWidget::updateExample()
{
- QString formatStr;
+ TQString formatStr;
apply( formatStr );
- QString formatted = IdSuggestions::formatId( m_example, formatStr );
- m_labelExample->setText( QString( i18n( "<qt>Example:<br/><b>%1</b></qt>" ) ).arg( formatted ) );
+ TQString formatted = IdSuggestions::formatId( m_example, formatStr );
+ m_labelExample->setText( TQString( i18n( "<qt>Example:<br/><b>%1</b></qt>" ) ).arg( formatted ) );
}
}