diff options
Diffstat (limited to 'src/webquery.cpp')
-rw-r--r-- | src/webquery.cpp | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/src/webquery.cpp b/src/webquery.cpp index 3bb4dc9..ca371a2 100644 --- a/src/webquery.cpp +++ b/src/webquery.cpp @@ -97,8 +97,8 @@ namespace KBibTeX hLayout->addWidget( lineEditQuery ); label->setBuddy( lineEditQuery ); hLayout->addSpacing( KDialog::spacingHint() * 2 ); - connect( clearSearchText, SIGNAL( clicked() ), lineEditQuery, SLOT( clear() ) ); - connect( lineEditQuery, SIGNAL( textChanged( const TQString& ) ), this, SLOT( slotTextChanged( const TQString& ) ) ); + connect( clearSearchText, TQ_SIGNAL( clicked() ), lineEditQuery, TQ_SLOT( clear() ) ); + connect( lineEditQuery, TQ_SIGNAL( textChanged( const TQString& ) ), this, TQ_SLOT( slotTextChanged( const TQString& ) ) ); hLayout->setStretchFactor( lineEditQuery, 4 ); TDECompletion *completionQuery = lineEditQuery->completionObject(); @@ -111,8 +111,8 @@ namespace KBibTeX vLayout->addStretch( 0 ); - connect( lineEditQuery, SIGNAL( returnPressed() ), this, SIGNAL( startSearch() ) ); - connect( lineEditQuery, SIGNAL( returnPressed( const TQString& ) ), completionQuery, SLOT( addItem( const TQString& ) ) ); + connect( lineEditQuery, TQ_SIGNAL( returnPressed() ), this, TQ_SIGNAL( startSearch() ) ); + connect( lineEditQuery, TQ_SIGNAL( returnPressed( const TQString& ) ), completionQuery, TQ_SLOT( addItem( const TQString& ) ) ); } void WebQueryWidget::slotTextChanged( const TQString& text ) @@ -124,7 +124,7 @@ namespace KBibTeX { bool doEnable = !text.stripWhiteSpace().replace( '$', "" ).isEmpty(); if ( delayed && doEnable ) - TQTimer::singleShot( 100, this, SLOT( slotEnableSearchTrue() ) ); + TQTimer::singleShot( 100, this, TQ_SLOT( slotEnableSearchTrue() ) ); else if ( !delayed ) emit enableSearch( doEnable ); } @@ -155,7 +155,7 @@ namespace KBibTeX m_progressDialog->setAutoClose( true ); m_progressDialog->setMinimumDuration( 10 ); m_progressDialog->setEnabled( true ); - connect( m_progressDialog, SIGNAL( cancelClicked() ), this, SLOT( slotCancelQuery() ) ); + connect( m_progressDialog, TQ_SIGNAL( cancelClicked() ), this, TQ_SLOT( slotCancelQuery() ) ); } void WebQuery::cancelQuery() @@ -216,10 +216,10 @@ namespace KBibTeX m_incomingData = ""; m_currentJobTotalSize = -1; m_currentJob = TDEIO::get( url, false, false ); - connect( m_currentJob, SIGNAL( totalSize( TDEIO::Job*, TDEIO::filesize_t ) ), this, SLOT( slotSetJobTotalSize( TDEIO::Job*, TDEIO::filesize_t ) ) ); - connect( m_currentJob, SIGNAL( processedSize( TDEIO::Job*, TDEIO::filesize_t ) ), this, SLOT( slotSetJobProcessedSize( TDEIO::Job*, TDEIO::filesize_t ) ) ); - connect( m_currentJob, SIGNAL( data( TDEIO::Job*, const TQByteArray & ) ), this, SLOT( slotJobData( TDEIO::Job*, const TQByteArray & ) ) ); - connect( m_currentJob, SIGNAL( result( TDEIO::Job* ) ), this, SLOT( slotJobFinished( TDEIO::Job* ) ) ); + connect( m_currentJob, TQ_SIGNAL( totalSize( TDEIO::Job*, TDEIO::filesize_t ) ), this, TQ_SLOT( slotSetJobTotalSize( TDEIO::Job*, TDEIO::filesize_t ) ) ); + connect( m_currentJob, TQ_SIGNAL( processedSize( TDEIO::Job*, TDEIO::filesize_t ) ), this, TQ_SLOT( slotSetJobProcessedSize( TDEIO::Job*, TDEIO::filesize_t ) ) ); + connect( m_currentJob, TQ_SIGNAL( data( TDEIO::Job*, const TQByteArray & ) ), this, TQ_SLOT( slotJobData( TDEIO::Job*, const TQByteArray & ) ) ); + connect( m_currentJob, TQ_SIGNAL( result( TDEIO::Job* ) ), this, TQ_SLOT( slotJobFinished( TDEIO::Job* ) ) ); tqApp->eventLoop()->enterLoop(); @@ -232,8 +232,8 @@ namespace KBibTeX if ( data == TQString::null ) return NULL; - BibTeX::FileImporterBibTeX importer( FALSE ); - importer.setIgnoreComments( TRUE ); + BibTeX::FileImporterBibTeX importer( false ); + importer.setIgnoreComments( true ); TQBuffer buffer; buffer.open( IO_WriteOnly ); @@ -296,14 +296,14 @@ namespace KBibTeX WebQueryWizard::~WebQueryWizard() { - TDEConfig * config = kapp->config(); + TDEConfig * config = tdeApp->config(); config->setGroup( "WebQueryWizard" ); saveWindowSize( config ); } void WebQueryWizard::showEvent( TQShowEvent * ) { - TDEConfig * config = kapp->config(); + TDEConfig * config = tdeApp->config(); config->setGroup( "WebQueryWizard" ); restoreWindowSize( config ); } @@ -314,7 +314,7 @@ namespace KBibTeX WebQueryWizard *wiz = new WebQueryWizard( dlg, "WebQueryWizard" ); dlg->setButtonOK( KGuiItem( i18n( "&Import" ), "import", i18n( "Import selected items" ) ) ); dlg->setMainWidget( wiz ); - connect( wiz, SIGNAL( changeButtonOK( bool ) ), dlg, SLOT( enableButtonOK( bool ) ) ); + connect( wiz, TQ_SIGNAL( changeButtonOK( bool ) ), dlg, TQ_SLOT( enableButtonOK( bool ) ) ); dlg->enableButtonOK( false ); results.clear(); @@ -345,7 +345,7 @@ namespace KBibTeX if ( rlvi != NULL ) { BibTeX::Entry *entry = rlvi->entry(); - KBibTeX::EntryWidget::execute( entry, NULL, TRUE, FALSE ); + KBibTeX::EntryWidget::execute( entry, NULL, true, false ); } } @@ -379,12 +379,12 @@ namespace KBibTeX int index = m_comboBoxEngines->currentItem(); - setEnabled( FALSE ); - m_dlg->enableButtonCancel( FALSE ); + setEnabled( false ); + m_dlg->enableButtonCancel( false ); TQApplication::setOverrideCursor( TQt::waitCursor ); m_listViewResults->clear(); - connect( m_webQueries[index], SIGNAL( foundEntry( BibTeX::Entry*, bool ) ), this, SLOT( addHit( BibTeX::Entry*, bool ) ) ); - connect( m_webQueries[index], SIGNAL( endSearch( WebQuery::Status ) ), this, SLOT( endSearch( WebQuery::Status ) ) ); + connect( m_webQueries[index], TQ_SIGNAL( foundEntry( BibTeX::Entry*, bool ) ), this, TQ_SLOT( addHit( BibTeX::Entry*, bool ) ) ); + connect( m_webQueries[index], TQ_SIGNAL( endSearch( WebQuery::Status ) ), this, TQ_SLOT( endSearch( WebQuery::Status ) ) ); m_webQueries[index]->query(); } @@ -392,10 +392,10 @@ namespace KBibTeX void WebQueryWizard::endSearch( WebQuery::Status status ) { int index = m_comboBoxEngines->currentItem(); - disconnect( m_webQueries[index], SIGNAL( foundEntry( BibTeX::Entry*, bool ) ), this, SLOT( addHit( BibTeX::Entry*, bool ) ) ); - disconnect( m_webQueries[index], SIGNAL( endSearch( WebQuery::Status ) ), this, SLOT( endSearch( WebQuery::Status ) ) ); - setEnabled( TRUE ); - m_dlg->enableButtonCancel( TRUE ); + disconnect( m_webQueries[index], TQ_SIGNAL( foundEntry( BibTeX::Entry*, bool ) ), this, TQ_SLOT( addHit( BibTeX::Entry*, bool ) ) ); + disconnect( m_webQueries[index], TQ_SIGNAL( endSearch( WebQuery::Status ) ), this, TQ_SLOT( endSearch( WebQuery::Status ) ) ); + setEnabled( true ); + m_dlg->enableButtonCancel( true ); importEnableChanging(); TQApplication::restoreOverrideCursor(); if ( status == WebQuery::statusInsufficientPermissions ) @@ -430,10 +430,10 @@ namespace KBibTeX TQLabel *label = new TQLabel( i18n( "&Engine:" ), this ); layout->addWidget( label, 0, 0 ); - m_comboBoxEngines = new KComboBox( FALSE, this ); + m_comboBoxEngines = new KComboBox( false, this ); label->setBuddy( m_comboBoxEngines ); layout->addWidget( m_comboBoxEngines, 0, 1 ); - connect( m_comboBoxEngines, SIGNAL( activated( int ) ), this, SLOT( otherEngineSelected( int ) ) ); + connect( m_comboBoxEngines, TQ_SIGNAL( activated( int ) ), this, TQ_SLOT( otherEngineSelected( int ) ) ); m_widgetStackQueries = new TQWidgetStack( this ); layout->addMultiCellWidget( m_widgetStackQueries, 1, 2, 0, 2 ); @@ -442,7 +442,7 @@ namespace KBibTeX m_pushButtonSearch = new KPushButton( i18n( "&Search" ), this ); layout->addWidget( m_pushButtonSearch, 0, 3 ); m_pushButtonSearch->setIconSet( TQIconSet( SmallIcon( "edit-find" ) ) ); - m_pushButtonSearch->setEnabled( FALSE ); + m_pushButtonSearch->setEnabled( false ); m_listViewResults = new TDEListView( this ); m_listViewResults->addColumn( i18n( "Year" ), 64 ); @@ -453,12 +453,12 @@ namespace KBibTeX else m_listViewResults->setFont( TDEGlobalSettings::generalFont() ); m_listViewResults->header() ->setFont( TDEGlobalSettings::generalFont() ); - m_listViewResults->setAllColumnsShowFocus( TRUE ); + m_listViewResults->setAllColumnsShowFocus( true ); m_listViewResults->setFullWidth( true ); m_listViewResults->setSelectionMode( TQListView::Extended ); layout->addMultiCellWidget( m_listViewResults, 3, 3, 0, 3 ); - connect( m_listViewResults, SIGNAL( executed( TQListViewItem* ) ), this, SLOT( previewEntry( TQListViewItem* ) ) ); - connect( m_listViewResults, SIGNAL( returnPressed( TQListViewItem* ) ), this, SLOT( previewEntry( TQListViewItem* ) ) ); + connect( m_listViewResults, TQ_SIGNAL( executed( TQListViewItem* ) ), this, TQ_SLOT( previewEntry( TQListViewItem* ) ) ); + connect( m_listViewResults, TQ_SIGNAL( returnPressed( TQListViewItem* ) ), this, TQ_SLOT( previewEntry( TQListViewItem* ) ) ); TQHBoxLayout *horizontalLayout = new TQHBoxLayout(); layout->addMultiCellLayout( horizontalLayout, 4, 4, 0, 3 ); @@ -469,11 +469,11 @@ namespace KBibTeX m_checkBoxImportAll->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ); horizontalLayout->addWidget( m_checkBoxImportAll ); - connect( m_disclaimerLabel, SIGNAL( leftClickedURL( const TQString& ) ), this, SLOT( openURL( const TQString& ) ) ); - connect( m_listViewResults, SIGNAL( selectionChanged( ) ), this, SLOT( importEnableChanging( ) ) ); - connect( m_listViewResults, SIGNAL( clicked( TQListViewItem* ) ), this, SLOT( importEnableChanging( ) ) ); - connect( m_checkBoxImportAll, SIGNAL( toggled( bool ) ), this, SLOT( importEnableChanging( ) ) ); - connect( m_pushButtonSearch, SIGNAL( clicked() ), this, SLOT( startSearch() ) ); + connect( m_disclaimerLabel, TQ_SIGNAL( leftClickedURL( const TQString& ) ), this, TQ_SLOT( openURL( const TQString& ) ) ); + connect( m_listViewResults, TQ_SIGNAL( selectionChanged( ) ), this, TQ_SLOT( importEnableChanging( ) ) ); + connect( m_listViewResults, TQ_SIGNAL( clicked( TQListViewItem* ) ), this, TQ_SLOT( importEnableChanging( ) ) ); + connect( m_checkBoxImportAll, TQ_SIGNAL( toggled( bool ) ), this, TQ_SLOT( importEnableChanging( ) ) ); + connect( m_pushButtonSearch, TQ_SIGNAL( clicked() ), this, TQ_SLOT( startSearch() ) ); } void WebQueryWizard::setupQueries() @@ -515,8 +515,8 @@ namespace KBibTeX { m_comboBoxEngines->insertItem(( *it )->title() ); m_widgetStackQueries->addWidget(( *it )->widget() ); - connect(( *it )->widget(), SIGNAL( enableSearch( bool ) ), this, SLOT( enableSearch( bool ) ) ); - connect(( *it )->widget(), SIGNAL( startSearch() ), this, SLOT( startSearch() ) ); + connect(( *it )->widget(), TQ_SIGNAL( enableSearch( bool ) ), this, TQ_SLOT( enableSearch( bool ) ) ); + connect(( *it )->widget(), TQ_SIGNAL( startSearch() ), this, TQ_SLOT( startSearch() ) ); } } @@ -526,7 +526,7 @@ namespace KBibTeX int scnum = TQApplication::desktop()->screenNumber( parentWidget() ); TQRect desk = TQApplication::desktop()->screenGeometry( scnum ); int w, h; -#if defined Q_WS_X11 +#if defined TQ_WS_X11 // save maximalization as desktop size + 1 in that direction KWin::WindowInfo info = KWin::windowInfo( m_dlg->winId(), NET::WMState ); w = info.state() & NET::MaxHoriz ? desk.width() + 1 : m_dlg->width(); @@ -576,7 +576,7 @@ namespace KBibTeX } if ( !size.isEmpty() ) { -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 int state = ( size.width() > desk.width() ? NET::MaxHoriz : 0 ) | ( size.height() > desk.height() ? NET::MaxVert : 0 ); if (( state & NET::Max ) == NET::Max ) |