From 5f5e7c5455d52826b0bd50f64fcffb7695ce970d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sat, 29 Jun 2013 12:56:53 +0200 Subject: Initial TQt conversion --- src/entrywidget.cpp | 170 ++++++++++++++++++++++++++-------------------------- 1 file changed, 85 insertions(+), 85 deletions(-) (limited to 'src/entrywidget.cpp') diff --git a/src/entrywidget.cpp b/src/entrywidget.cpp index cb4c7ff..377ae7c 100644 --- a/src/entrywidget.cpp +++ b/src/entrywidget.cpp @@ -17,19 +17,19 @@ * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -60,13 +60,13 @@ namespace KBibTeX { - QDialog::DialogCode EntryWidget::execute( BibTeX::Entry *entry, BibTeX::File *bibtexfile, bool isReadOnly, bool isNew, QWidget *parent, const char *name ) + TQDialog::DialogCode EntryWidget::execute( BibTeX::Entry *entry, BibTeX::File *bibtexfile, bool isReadOnly, bool isNew, TQWidget *parent, const char *name ) { EntryWidgetDialog *dlg = new EntryWidgetDialog( parent, name, TRUE, i18n( "Edit BibTeX Entry" ), KDialogBase::Ok | KDialogBase::Cancel ); EntryWidget *entryWidget = new EntryWidget( entry, bibtexfile, isReadOnly, isNew, dlg, "entryWidget" ); dlg->setMainWidget( entryWidget ); - QDialog::DialogCode result = ( QDialog::DialogCode ) dlg->exec(); + TQDialog::DialogCode result = ( TQDialog::DialogCode ) dlg->exec(); delete entryWidget; delete dlg; @@ -74,8 +74,8 @@ namespace KBibTeX return result; } - EntryWidget::EntryWidget( BibTeX::File *bibtexfile, bool isReadOnly, bool isNew, QDialog *parent, const char *name ) - : QWidget( parent, name ), m_originalEntry( NULL ), m_bibtexfile( bibtexfile ), m_isReadOnly( isReadOnly ), m_isNew( isNew ), m_lastPage( NULL ), m_dlgParent( parent ), m_wqa( new WebQueryArXiv( NULL ) ) + EntryWidget::EntryWidget( BibTeX::File *bibtexfile, bool isReadOnly, bool isNew, TQDialog *parent, const char *name ) + : TQWidget( parent, name ), m_originalEntry( NULL ), m_bibtexfile( bibtexfile ), m_isReadOnly( isReadOnly ), m_isNew( isNew ), m_lastPage( NULL ), m_dlgParent( parent ), m_wqa( new WebQueryArXiv( NULL ) ) { setupGUI( parent, FALSE ); @@ -89,8 +89,8 @@ namespace KBibTeX connect( m_wqa, SIGNAL( endSearch( WebQuery::Status ) ), this, SLOT( endExternalSearch( WebQuery::Status ) ) ); } - EntryWidget::EntryWidget( BibTeX::Entry *entry, BibTeX::File *bibtexfile, bool isReadOnly, bool isNew, QDialog *parent, const char *name ) - : QWidget( parent, name ), m_originalEntry( entry ), m_bibtexfile( bibtexfile ), m_isReadOnly( isReadOnly ), m_isNew( isNew ), m_lastPage( NULL ), m_dlgParent( parent ), m_wqa( new WebQueryArXiv( NULL ) ) + EntryWidget::EntryWidget( BibTeX::Entry *entry, BibTeX::File *bibtexfile, bool isReadOnly, bool isNew, TQDialog *parent, const char *name ) + : TQWidget( parent, name ), m_originalEntry( entry ), m_bibtexfile( bibtexfile ), m_isReadOnly( isReadOnly ), m_isNew( isNew ), m_lastPage( NULL ), m_dlgParent( parent ), m_wqa( new WebQueryArXiv( NULL ) ) { setupGUI( parent ); @@ -118,9 +118,9 @@ namespace KBibTeX saveWindowSize( config ); } - void EntryWidget::showEvent( QShowEvent *showev ) + void EntryWidget::showEvent( TQShowEvent *showev ) { - QWidget::showEvent( showev ); + TQWidget::showEvent( showev ); EntryWidgetTitle *ewt = dynamic_cast( m_tabWidget->page( 0 ) ); if ( ewt != NULL ) ewt->m_fieldLineEditTitle->setFocus(); @@ -134,7 +134,7 @@ namespace KBibTeX { bool isModified = m_lineEditID->isModified(); - for ( QValueList::iterator it( m_internalEntryWidgets.begin() ); !isModified && it != m_internalEntryWidgets.end(); ++it ) + for ( TQValueList::iterator it( m_internalEntryWidgets.begin() ); !isModified && it != m_internalEntryWidgets.end(); ++it ) isModified = ( *it ) ->isModified(); isModified |= m_sourcePage->isModified(); @@ -161,7 +161,7 @@ namespace KBibTeX m_sourcePage->apply( entry ); else { - for ( QValueList::iterator it( m_internalEntryWidgets.begin() ); it != m_internalEntryWidgets.end(); ++it ) + for ( TQValueList::iterator it( m_internalEntryWidgets.begin() ); it != m_internalEntryWidgets.end(); ++it ) ( *it ) ->apply( entry ); } } @@ -186,7 +186,7 @@ namespace KBibTeX { internalReset( entry ); m_sourcePage->reset( entry ); - for ( QValueList::iterator it( m_internalEntryWidgets.begin() ); it != m_internalEntryWidgets.end(); ++it ) + for ( TQValueList::iterator it( m_internalEntryWidgets.begin() ); it != m_internalEntryWidgets.end(); ++it ) ( *it ) ->reset( entry ); updateGUI(); @@ -228,7 +228,7 @@ namespace KBibTeX updateGUI(); } - void EntryWidget::slotCurrentPageChanged( QWidget* newPage ) + void EntryWidget::slotCurrentPageChanged( TQWidget* newPage ) { BibTeX::Entry temporaryEntry; @@ -237,7 +237,7 @@ namespace KBibTeX // switching to source tab m_updateWarningsTimer->stop(); internalApply( &temporaryEntry ); - for ( QValueList::iterator it( m_internalEntryWidgets.begin() ); it != m_internalEntryWidgets.end(); ++it ) + for ( TQValueList::iterator it( m_internalEntryWidgets.begin() ); it != m_internalEntryWidgets.end(); ++it ) ( *it ) ->apply( &temporaryEntry ); m_sourcePage->reset( &temporaryEntry ); @@ -255,7 +255,7 @@ namespace KBibTeX { if ( KMessageBox::warningYesNo( this, i18n( "The source code does not contain valid BibTeX code.\n\nRestore previous version or continue editing?" ), i18n( "Invalid BibTeX code" ), KGuiItem( i18n( "Restore" ) ), KGuiItem( i18n( "Edit" ) ) ) == KMessageBox::No ) { - QString text = m_sourcePage->text(); + TQString text = m_sourcePage->text(); m_tabWidget->showPage( m_sourcePage ); m_sourcePage->setText( text ); doChange = false; @@ -271,7 +271,7 @@ namespace KBibTeX { m_sourcePage->apply( &temporaryEntry ); internalReset( &temporaryEntry ); - for ( QValueList::iterator it( m_internalEntryWidgets.begin() ); it != m_internalEntryWidgets.end(); ++it ) + for ( TQValueList::iterator it( m_internalEntryWidgets.begin() ); it != m_internalEntryWidgets.end(); ++it ) ( *it ) ->reset( &temporaryEntry ); updateWarnings(); } @@ -288,14 +288,14 @@ namespace KBibTeX m_lastPage = newPage; } - void EntryWidget::warningsExecute( QListViewItem* item ) + void EntryWidget::warningsExecute( TQListViewItem* item ) { EntryWidgetWarningsItem * ewwi = dynamic_cast( item ); if ( ewwi != NULL && ewwi->widget() != NULL ) { ewwi->widget() ->setFocus(); // find and activate corresponding tab page - QObject *parent = ewwi->widget(); + TQObject *parent = ewwi->widget(); KBibTeX::EntryWidgetTab *ewt = dynamic_cast( parent ); while ( ewt == NULL && parent != NULL ) { @@ -306,62 +306,62 @@ namespace KBibTeX } } - void EntryWidget::setupGUI( QWidget *parent, bool showWarnings ) + void EntryWidget::setupGUI( TQWidget *parent, bool showWarnings ) { - QGridLayout * layout = new QGridLayout( this, 4, 6, 0, KDialog::spacingHint() ); + TQGridLayout * layout = new TQGridLayout( this, 4, 6, 0, KDialog::spacingHint() ); // in the top row on the left, put an entry type label and combobox - QLabel *label = new QLabel( i18n( "E&ntry Type:" ), this ); + TQLabel *label = new TQLabel( i18n( "E&ntry Type:" ), this ); layout->addWidget( label, 0, 0 ); - m_comboBoxEntryType = new QComboBox( TRUE, this, "m_comboBoxEntryType" ); + m_comboBoxEntryType = new TQComboBox( TRUE, this, "m_comboBoxEntryType" ); label->setBuddy( m_comboBoxEntryType ); - m_comboBoxEntryType->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Fixed ); + m_comboBoxEntryType->setSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed ); m_comboBoxEntryType->setEnabled( !m_isReadOnly ); layout->addWidget( m_comboBoxEntryType, 0, 1 ); setupEntryTypes(); // in the top row on the left, put an identifier label and combobox - label = new QLabel( i18n( "&Identifier" ), this ); + label = new TQLabel( i18n( "&Identifier" ), this ); layout->addWidget( label, 0, 2 ); - m_lineEditID = new QLineEdit( this, "m_lineEditID" ); + m_lineEditID = new TQLineEdit( this, "m_lineEditID" ); label->setBuddy( m_lineEditID ); m_lineEditID->setReadOnly( m_isReadOnly ); - m_lineEditID->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Fixed ); + m_lineEditID->setSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed ); layout->addWidget( m_lineEditID, 0, 3 ); - m_pushButtonIdSuggestions = new QPushButton( QIconSet( BarIcon( "wizard" ) ), "", this, "m_pushButtonIdSuggestions" ); - m_menuIdSuggestions = new QPopupMenu( m_pushButtonIdSuggestions ); + m_pushButtonIdSuggestions = new TQPushButton( TQIconSet( BarIcon( "wizard" ) ), "", this, "m_pushButtonIdSuggestions" ); + m_menuIdSuggestions = new TQPopupMenu( m_pushButtonIdSuggestions ); connect( m_menuIdSuggestions, SIGNAL( activated( int ) ), this, SLOT( insertIdSuggestion( int ) ) ); m_pushButtonIdSuggestions->setPopup( m_menuIdSuggestions ); layout->addWidget( m_pushButtonIdSuggestions, 0, 4 ); - m_pushButtonForceDefaultIdSuggestion = new QPushButton( QIconSet( BarIcon( "favorites" ) ), "", this, "m_pushButtonForceDefaultIdSuggestion" ); + m_pushButtonForceDefaultIdSuggestion = new TQPushButton( TQIconSet( BarIcon( "favorites" ) ), "", this, "m_pushButtonForceDefaultIdSuggestion" ); m_pushButtonForceDefaultIdSuggestion->setToggleButton( TRUE ); layout->addWidget( m_pushButtonForceDefaultIdSuggestion, 0, 5 ); - QToolTip::add( m_pushButtonForceDefaultIdSuggestion, i18n( "Use the default id suggestion to set the entry id" ) ); - QWhatsThis::add( m_pushButtonForceDefaultIdSuggestion, i18n( "Use the default id suggestion to set the entry id.\nYou can edit and select the default id suggestion in the configuration dialog." ) ); + TQToolTip::add( m_pushButtonForceDefaultIdSuggestion, i18n( "Use the default id suggestion to set the entry id" ) ); + TQWhatsThis::add( m_pushButtonForceDefaultIdSuggestion, i18n( "Use the default id suggestion to set the entry id.\nYou can edit and select the default id suggestion in the configuration dialog." ) ); // central tab widget for all the tabs - m_tabWidget = new QTabWidget( this ); + m_tabWidget = new TQTabWidget( this ); layout->addMultiCellWidget( m_tabWidget, 1, 1, 0, 5 ); addTabWidgets(); // a check box if the user want to edit all fields - m_checkBoxEnableAll = new QCheckBox( i18n( "Enable all &fields for editing" ), this ); + m_checkBoxEnableAll = new TQCheckBox( i18n( "Enable all &fields for editing" ), this ); layout->addMultiCellWidget( m_checkBoxEnableAll, 2, 2, 0, 4 ); - m_pushButtonRefetch = new QPushButton( KGlobal::iconLoader() ->loadIconSet( "reload", KIcon::Small ), i18n( "Refetch" ), this ); + m_pushButtonRefetch = new TQPushButton( KGlobal::iconLoader() ->loadIconSet( "reload", KIcon::Small ), i18n( "Refetch" ), this ); layout->addWidget( m_pushButtonRefetch, 2, 5 ); connect( m_pushButtonRefetch, SIGNAL( clicked() ), this, SLOT( refreshFromURL() ) ); if ( showWarnings ) { // list view for warnings, errors and suggestions - m_listViewWarnings = new QListView( this ); + m_listViewWarnings = new TQListView( this ); m_listViewWarnings->addColumn( i18n( "Message" ) ); m_listViewWarnings->setAllColumnsShowFocus( true ); layout->addMultiCellWidget( m_listViewWarnings, 3, 3, 0, 5 ); - connect( m_listViewWarnings, SIGNAL( doubleClicked( QListViewItem*, const QPoint&, int ) ), this, SLOT( warningsExecute( QListViewItem* ) ) ); + connect( m_listViewWarnings, SIGNAL( doubleClicked( TQListViewItem*, const TQPoint&, int ) ), this, SLOT( warningsExecute( TQListViewItem* ) ) ); } else m_listViewWarnings = NULL; @@ -369,12 +369,12 @@ namespace KBibTeX connect( m_checkBoxEnableAll, SIGNAL( toggled( bool ) ), this, SLOT( slotEnableAllFields( ) ) ); connect( m_comboBoxEntryType, SIGNAL( activated( int ) ), this, SLOT( slotEntryTypeChanged( ) ) ); connect( m_pushButtonForceDefaultIdSuggestion, SIGNAL( toggled( bool ) ), this, SLOT( slotForceDefaultIdSuggestion() ) ); - connect( m_comboBoxEntryType, SIGNAL( textChanged( const QString & ) ), this, SLOT( slotEntryTypeChanged() ) ); - connect( m_tabWidget, SIGNAL( currentChanged( QWidget* ) ), this, SLOT( slotCurrentPageChanged( QWidget* ) ) ); + connect( m_comboBoxEntryType, SIGNAL( textChanged( const TQString & ) ), this, SLOT( slotEntryTypeChanged() ) ); + connect( m_tabWidget, SIGNAL( currentChanged( TQWidget* ) ), this, SLOT( slotCurrentPageChanged( TQWidget* ) ) ); connect( parent, SIGNAL( okClicked() ), this, SLOT( apply() ) ); connect( m_menuIdSuggestions, SIGNAL( aboutToShow() ), this, SLOT( updateIdSuggestionsMenu() ) ); - m_updateWarningsTimer = new QTimer( this ); + m_updateWarningsTimer = new TQTimer( this ); connect( m_updateWarningsTimer, SIGNAL( timeout() ), this, SLOT( updateWarnings() ) ); if ( !m_isReadOnly ) m_updateWarningsTimer->start( 500 ); @@ -395,7 +395,7 @@ namespace KBibTeX m_tabWidget->insertTab( m_sourcePage, i18n( "Source" ) ); } - void EntryWidget::addTabWidget( EntryWidgetTab *widget, const QString& title ) + void EntryWidget::addTabWidget( EntryWidgetTab *widget, const TQString& title ) { m_tabWidget->insertTab( widget, title ); m_internalEntryWidgets.append( widget ); @@ -407,7 +407,7 @@ namespace KBibTeX BibTeX::Entry::EntryType entryType = ( BibTeX::Entry::EntryType ) i; while ( entryType != BibTeX::Entry::etUnknown ) { - QString currentString = BibTeX::Entry::entryTypeToString( entryType ); + TQString currentString = BibTeX::Entry::entryTypeToString( entryType ); m_comboBoxEntryType->insertItem( currentString ); entryType = ( BibTeX::Entry::EntryType ) ++i; } @@ -416,7 +416,7 @@ namespace KBibTeX void EntryWidget::updateGUI() { BibTeX::Entry::EntryType entryType = BibTeX::Entry::entryTypeFromString( m_comboBoxEntryType->currentText() ); - for ( QValueList::iterator it( m_internalEntryWidgets.begin() ); it != m_internalEntryWidgets.end(); ++it ) + for ( TQValueList::iterator it( m_internalEntryWidgets.begin() ); it != m_internalEntryWidgets.end(); ++it ) ( *it ) ->updateGUI( entryType, m_checkBoxEnableAll->isChecked() ); updateWarnings( ); } @@ -433,49 +433,49 @@ namespace KBibTeX { BibTeX::Entry temporaryEntry; apply( &temporaryEntry ); - QString id = IdSuggestions::createDefaultSuggestion( m_bibtexfile, &temporaryEntry ); + TQString id = IdSuggestions::createDefaultSuggestion( m_bibtexfile, &temporaryEntry ); if ( id.isNull() || id.isEmpty() ) new KBibTeX::EntryWidgetWarningsItem( KBibTeX::EntryWidgetWarningsItem::wlWarning, i18n( "Please supply more fields to use the default id" ), m_pushButtonForceDefaultIdSuggestion, m_listViewWarnings ); else { - new KBibTeX::EntryWidgetWarningsItem( KBibTeX::EntryWidgetWarningsItem::wlInformation, QString( i18n( "Using '%1' as entry id" ) ).arg( id ), m_pushButtonForceDefaultIdSuggestion, m_listViewWarnings ); + new KBibTeX::EntryWidgetWarningsItem( KBibTeX::EntryWidgetWarningsItem::wlInformation, TQString( i18n( "Using '%1' as entry id" ) ).arg( id ), m_pushButtonForceDefaultIdSuggestion, m_listViewWarnings ); m_lineEditID->setText( id ); } } else if ( m_lineEditID->text().isEmpty() ) new KBibTeX::EntryWidgetWarningsItem( KBibTeX::EntryWidgetWarningsItem::wlError, i18n( "An entry has to have an identifier" ), m_lineEditID, m_listViewWarnings ); else if (( p = m_lineEditID->text().find( Settings::noIdChars ) ) > 0 ) - new KBibTeX::EntryWidgetWarningsItem( KBibTeX::EntryWidgetWarningsItem::wlError, QString( i18n( "The identifier contains invalid characters at position %1" ) ).arg( p + 1 ), m_lineEditID, m_listViewWarnings ); + new KBibTeX::EntryWidgetWarningsItem( KBibTeX::EntryWidgetWarningsItem::wlError, TQString( i18n( "The identifier contains invalid characters at position %1" ) ).arg( p + 1 ), m_lineEditID, m_listViewWarnings ); BibTeX::Entry::EntryType entryType = BibTeX::Entry::entryTypeFromString( m_comboBoxEntryType->currentText() ); - for ( QValueList::iterator it( m_internalEntryWidgets.begin() ); it != m_internalEntryWidgets.end(); ++it ) + for ( TQValueList::iterator it( m_internalEntryWidgets.begin() ); it != m_internalEntryWidgets.end(); ++it ) ( *it ) ->updateWarnings( entryType, m_listViewWarnings ); - QString text = m_lineEditID->text(); + TQString text = m_lineEditID->text(); for ( unsigned int i = 0; i < text.length(); i++ ) if ( text.at( i ).unicode() > 127 ) { - new KBibTeX::EntryWidgetWarningsItem( KBibTeX::EntryWidgetWarningsItem::wlWarning, QString( i18n( "The identifier contains non-ascii characters, first one is '%1'" ) ).arg( text.at( i ) ), m_lineEditID, m_listViewWarnings ); + new KBibTeX::EntryWidgetWarningsItem( KBibTeX::EntryWidgetWarningsItem::wlWarning, TQString( i18n( "The identifier contains non-ascii characters, first one is '%1'" ) ).arg( text.at( i ) ), m_lineEditID, m_listViewWarnings ); break; } BibTeX::Entry temporaryEntry; /** fetch data from GUI elements */ - for ( QValueList::iterator it( m_internalEntryWidgets.begin() ); it != m_internalEntryWidgets.end(); ++it ) + for ( TQValueList::iterator it( m_internalEntryWidgets.begin() ); it != m_internalEntryWidgets.end(); ++it ) ( *it ) ->apply( &temporaryEntry ); internalApply( &temporaryEntry ); /** check if entry with same id already exists */ - QString id = temporaryEntry.id(); + TQString id = temporaryEntry.id(); if ( m_bibtexfile != NULL && !id.isEmpty() ) { BibTeX::Entry *nameMatched = dynamic_cast( m_bibtexfile->containsKey( id ) ); if ( nameMatched != NULL && nameMatched != m_originalEntry ) - new KBibTeX::EntryWidgetWarningsItem( KBibTeX::EntryWidgetWarningsItem::wlError, QString( i18n( "This BibTeX file already contains an entry with id '%1'." ) ).arg( id ), m_lineEditID, m_listViewWarnings ); + new KBibTeX::EntryWidgetWarningsItem( KBibTeX::EntryWidgetWarningsItem::wlError, TQString( i18n( "This BibTeX file already contains an entry with id '%1'." ) ).arg( id ), m_lineEditID, m_listViewWarnings ); } BibTeX::Entry *crossRefEntry = NULL; - QString crossRefText = ""; + TQString crossRefText = ""; BibTeX::EntryField *crossRef = temporaryEntry.getField( BibTeX::EntryField::ftCrossRef ); if ( crossRef != NULL && m_bibtexfile != NULL ) { @@ -497,7 +497,7 @@ namespace KBibTeX { if ( crossRefEntry->getField( BibTeX::EntryField::ftEditor ) == NULL && crossRefEntry->getField( BibTeX::EntryField::ftKey ) == NULL && crossRefEntry->getField( BibTeX::EntryField::ftBookTitle ) == NULL ) { - new KBibTeX::EntryWidgetWarningsItem( KBibTeX::EntryWidgetWarningsItem::wlWarning, QString( i18n( "Cross referenced entry '%1' must contain either 'Editor', 'Key', or 'Book Title'" ) ).arg( crossRefText ), NULL, m_listViewWarnings ); + new KBibTeX::EntryWidgetWarningsItem( KBibTeX::EntryWidgetWarningsItem::wlWarning, TQString( i18n( "Cross referenced entry '%1' must contain either 'Editor', 'Key', or 'Book Title'" ) ).arg( crossRefText ), NULL, m_listViewWarnings ); } } } @@ -507,10 +507,10 @@ namespace KBibTeX if ( crossRefEntry != NULL ) { if ( crossRefEntry->getField( BibTeX::EntryField::ftVolume ) == NULL ) - new KBibTeX::EntryWidgetWarningsItem( KBibTeX::EntryWidgetWarningsItem::wlWarning, QString( i18n( "Cross referenced entry '%1' must contain 'Volume'" ) ).arg( crossRefText ), NULL, m_listViewWarnings ); + new KBibTeX::EntryWidgetWarningsItem( KBibTeX::EntryWidgetWarningsItem::wlWarning, TQString( i18n( "Cross referenced entry '%1' must contain 'Volume'" ) ).arg( crossRefText ), NULL, m_listViewWarnings ); if ( crossRefEntry->getField( BibTeX::EntryField::ftEditor ) == NULL && crossRefEntry->getField( BibTeX::EntryField::ftKey ) == NULL && crossRefEntry->getField( BibTeX::EntryField::ftSeries ) == NULL ) { - new KBibTeX::EntryWidgetWarningsItem( KBibTeX::EntryWidgetWarningsItem::wlWarning, QString( i18n( "Cross referenced entry '%1' must contain either 'Editor', 'Key', or 'Series'" ) ).arg( crossRefText ), NULL, m_listViewWarnings ); + new KBibTeX::EntryWidgetWarningsItem( KBibTeX::EntryWidgetWarningsItem::wlWarning, TQString( i18n( "Cross referenced entry '%1' must contain either 'Editor', 'Key', or 'Series'" ) ).arg( crossRefText ), NULL, m_listViewWarnings ); } } } @@ -529,8 +529,8 @@ namespace KBibTeX m_idToSuggestion.clear(); apply( &temporaryEntry ); - QStringList suggestions = IdSuggestions::createSuggestions( m_bibtexfile, &temporaryEntry ); - for ( QStringList::ConstIterator it = suggestions.begin(); it != suggestions.end(); ++it ) + TQStringList suggestions = IdSuggestions::createSuggestions( m_bibtexfile, &temporaryEntry ); + for ( TQStringList::ConstIterator it = suggestions.begin(); it != suggestions.end(); ++it ) m_idToSuggestion.insert( m_menuIdSuggestions->insertItem( *it ), *it ); if ( m_idToSuggestion.count() == 0 ) @@ -545,8 +545,8 @@ namespace KBibTeX /* This function was taken form KMainWindow of KDE 3.5 and modified to fit KBibTeX */ void EntryWidget::saveWindowSize( KConfig *config ) const { - int scnum = QApplication::desktop()->screenNumber( parentWidget() ); - QRect desk = QApplication::desktop()->screenGeometry( scnum ); + int scnum = TQApplication::desktop()->screenNumber( parentWidget() ); + TQRect desk = TQApplication::desktop()->screenGeometry( scnum ); int w, h; #if defined Q_WS_X11 // save maximalization as desktop size + 1 in that direction @@ -561,10 +561,10 @@ namespace KBibTeX } //TODO: add "Maximized" property instead "+1" hack #endif - QRect size( desk.width(), w, desk.height(), h ); + TQRect size( desk.width(), w, desk.height(), h ); bool defaultSize = false;//( size == d->defaultWindowSize ); - QString widthString = QString::fromLatin1( "Width %1" ).arg( desk.width() ); - QString heightString = QString::fromLatin1( "Height %1" ).arg( desk.height() ); + TQString widthString = TQString::fromLatin1( "Width %1" ).arg( desk.width() ); + TQString heightString = TQString::fromLatin1( "Height %1" ).arg( desk.height() ); if ( !config->hasDefault( widthString ) && defaultSize ) config->revertToDefault( widthString ); else @@ -580,22 +580,22 @@ namespace KBibTeX void EntryWidget::restoreWindowSize( KConfig *config ) { // restore the size - int scnum = QApplication::desktop()->screenNumber( parentWidget() ); - QRect desk = QApplication::desktop()->screenGeometry( scnum ); + int scnum = TQApplication::desktop()->screenNumber( parentWidget() ); + TQRect desk = TQApplication::desktop()->screenGeometry( scnum ); // if ( d->defaultWindowSize.isNull() ) // only once -// d->defaultWindowSize = QRect( desk.width(), width(), desk.height(), height() ); // store default values - QSize size( config->readNumEntry( QString::fromLatin1( "Width %1" ).arg( desk.width() ), 0 ), - config->readNumEntry( QString::fromLatin1( "Height %1" ).arg( desk.height() ), 0 ) ); +// d->defaultWindowSize = TQRect( desk.width(), width(), desk.height(), height() ); // store default values + TQSize size( config->readNumEntry( TQString::fromLatin1( "Width %1" ).arg( desk.width() ), 0 ), + config->readNumEntry( TQString::fromLatin1( "Height %1" ).arg( desk.height() ), 0 ) ); if ( size.isEmpty() ) { // try the KDE 2.0 way - size = QSize( config->readNumEntry( QString::fromLatin1( "Width" ), 0 ), - config->readNumEntry( QString::fromLatin1( "Height" ), 0 ) ); + size = TQSize( config->readNumEntry( TQString::fromLatin1( "Width" ), 0 ), + config->readNumEntry( TQString::fromLatin1( "Height" ), 0 ) ); if ( !size.isEmpty() ) { // make sure the other resolutions don't get old settings - config->writeEntry( QString::fromLatin1( "Width" ), 0 ); - config->writeEntry( QString::fromLatin1( "Height" ), 0 ); + config->writeEntry( TQString::fromLatin1( "Width" ), 0 ); + config->writeEntry( TQString::fromLatin1( "Height" ), 0 ); } } if ( !size.isEmpty() ) @@ -611,7 +611,7 @@ namespace KBibTeX m_dlgParent->resize( size.width(), height() ); else m_dlgParent->resize( size ); - // QWidget::showMaximized() is both insufficient and broken + // TQWidget::showMaximized() is both insufficient and broken KWin::setState( m_dlgParent->winId(), state ); #else if ( size.width() > desk.width() || size.height() > desk.height() ) @@ -633,7 +633,7 @@ namespace KBibTeX if ( url.isValid() && url.prettyURL().contains( "arxiv.org/abs/" ) ) { m_pushButtonRefetch->setEnabled( false ); - qDebug( "Refetching from url %s", url.prettyURL().latin1() ); + tqDebug( "Refetching from url %s", url.prettyURL().latin1() ); m_wqa->fetchFromAbstract( url ); } else -- cgit v1.2.3