summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2013-06-29 12:56:53 +0200
committerSlávek Banko <slavek.banko@axis.cz>2013-07-04 03:11:35 +0200
commit5f5e7c5455d52826b0bd50f64fcffb7695ce970d (patch)
treec8ee8792d3fb139365abbf70c2255f1e69d2aa34 /src
parent251c9a439759c830d34c70683d0fc9454d703010 (diff)
downloadkbibtex-5f5e7c5455d52826b0bd50f64fcffb7695ce970d.tar.gz
kbibtex-5f5e7c5455d52826b0bd50f64fcffb7695ce970d.zip
Initial TQt conversion
Diffstat (limited to 'src')
-rw-r--r--src/comment.cpp16
-rw-r--r--src/comment.h10
-rw-r--r--src/commentwidget.cpp26
-rw-r--r--src/commentwidget.h18
-rw-r--r--src/documentlistview.cpp172
-rw-r--r--src/documentlistview.h30
-rw-r--r--src/documentlistviewitem.cpp14
-rw-r--r--src/documentlistviewitem.h4
-rw-r--r--src/documentsourceview.cpp38
-rw-r--r--src/documentsourceview.h14
-rw-r--r--src/documentwidget.cpp354
-rw-r--r--src/documentwidget.h58
-rw-r--r--src/element.cpp6
-rw-r--r--src/element.h8
-rw-r--r--src/encoder.h14
-rw-r--r--src/encoderlatex.cpp140
-rw-r--r--src/encoderlatex.h30
-rw-r--r--src/encoderxml.cpp26
-rw-r--r--src/encoderxml.h22
-rw-r--r--src/entry.cpp86
-rw-r--r--src/entry.h40
-rw-r--r--src/entryfield.cpp78
-rw-r--r--src/entryfield.h14
-rw-r--r--src/entrywidget.cpp170
-rw-r--r--src/entrywidget.h78
-rw-r--r--src/entrywidgetauthor.cpp14
-rw-r--r--src/entrywidgetauthor.h8
-rw-r--r--src/entrywidgetexternal.cpp82
-rw-r--r--src/entrywidgetexternal.h8
-rw-r--r--src/entrywidgetkeyword.cpp72
-rw-r--r--src/entrywidgetkeyword.h30
-rw-r--r--src/entrywidgetmisc.cpp20
-rw-r--r--src/entrywidgetmisc.h4
-rw-r--r--src/entrywidgetother.cpp84
-rw-r--r--src/entrywidgetother.h30
-rw-r--r--src/entrywidgetpublication.cpp86
-rw-r--r--src/entrywidgetpublication.h12
-rw-r--r--src/entrywidgetsource.cpp34
-rw-r--r--src/entrywidgetsource.h12
-rw-r--r--src/entrywidgettab.cpp20
-rw-r--r--src/entrywidgettab.h16
-rw-r--r--src/entrywidgettitle.cpp16
-rw-r--r--src/entrywidgettitle.h4
-rw-r--r--src/entrywidgetuserdefined.cpp24
-rw-r--r--src/entrywidgetuserdefined.h6
-rw-r--r--src/entrywidgetwarningsitem.cpp6
-rw-r--r--src/entrywidgetwarningsitem.h12
-rw-r--r--src/fieldlineedit.cpp70
-rw-r--r--src/fieldlineedit.h20
-rw-r--r--src/fieldlistview.cpp120
-rw-r--r--src/fieldlistview.h40
-rw-r--r--src/file.cpp66
-rw-r--r--src/file.h46
-rw-r--r--src/fileexporter.cpp2
-rw-r--r--src/fileexporter.h14
-rw-r--r--src/fileexporterbibtex.cpp108
-rw-r--r--src/fileexporterbibtex.h36
-rw-r--r--src/fileexporterbibutils.cpp76
-rw-r--r--src/fileexporterbibutils.h20
-rw-r--r--src/fileexporterdocbook5.cpp22
-rw-r--r--src/fileexporterdocbook5.h18
-rw-r--r--src/fileexporterexternal.cpp54
-rw-r--r--src/fileexporterexternal.h18
-rw-r--r--src/fileexporterpdf.cpp66
-rw-r--r--src/fileexporterpdf.h28
-rw-r--r--src/fileexporterps.cpp34
-rw-r--r--src/fileexporterps.h26
-rw-r--r--src/fileexporterris.cpp36
-rw-r--r--src/fileexporterris.h8
-rw-r--r--src/fileexporterrtf.cpp34
-rw-r--r--src/fileexporterrtf.h24
-rw-r--r--src/fileexportertoolchain.cpp90
-rw-r--r--src/fileexportertoolchain.h28
-rw-r--r--src/fileexporterxml.cpp46
-rw-r--r--src/fileexporterxml.h14
-rw-r--r--src/fileexporterxslt.cpp34
-rw-r--r--src/fileexporterxslt.h4
-rw-r--r--src/fileimporter.cpp12
-rw-r--r--src/fileimporter.h16
-rw-r--r--src/fileimporterbibtex.cpp170
-rw-r--r--src/fileimporterbibtex.h34
-rw-r--r--src/fileimporterbibutils.cpp104
-rw-r--r--src/fileimporterbibutils.h20
-rw-r--r--src/fileimporterexternal.cpp44
-rw-r--r--src/fileimporterexternal.h16
-rw-r--r--src/fileimporterris.cpp64
-rw-r--r--src/fileimporterris.h16
-rw-r--r--src/findduplicates.cpp62
-rw-r--r--src/findduplicates.h30
-rw-r--r--src/idsuggestions.cpp110
-rw-r--r--src/idsuggestions.h38
-rw-r--r--src/idsuggestionswidget.cpp192
-rw-r--r--src/idsuggestionswidget.h72
-rw-r--r--src/iso5426converter.cpp14
-rw-r--r--src/iso5426converter.h14
-rw-r--r--src/iso6937converter.cpp14
-rw-r--r--src/iso6937converter.h12
-rw-r--r--src/kbibtex_part.cpp106
-rw-r--r--src/kbibtex_part.h36
-rw-r--r--src/kbibtexshell.cpp22
-rw-r--r--src/kbibtexshell.h14
-rw-r--r--src/latin1literal.h16
-rw-r--r--src/macro.cpp20
-rw-r--r--src/macro.h14
-rw-r--r--src/macrowidget.cpp18
-rw-r--r--src/macrowidget.h8
-rw-r--r--src/main.cpp4
-rw-r--r--src/mergeelements.cpp196
-rw-r--r--src/mergeelements.h72
-rw-r--r--src/messagehandler.cpp4
-rw-r--r--src/messagehandler.h12
-rw-r--r--src/preamble.cpp16
-rw-r--r--src/preamble.h6
-rw-r--r--src/preamblewidget.cpp14
-rw-r--r--src/preamblewidget.h10
-rw-r--r--src/searchbar.cpp56
-rw-r--r--src/searchbar.h14
-rw-r--r--src/settings.cpp344
-rw-r--r--src/settings.h98
-rw-r--r--src/settingsdlg.cpp22
-rw-r--r--src/settingsdlg.h2
-rw-r--r--src/settingsediting.cpp142
-rw-r--r--src/settingsediting.h52
-rw-r--r--src/settingsfileio.cpp130
-rw-r--r--src/settingsfileio.h34
-rw-r--r--src/settingsidsuggestions.cpp102
-rw-r--r--src/settingsidsuggestions.h34
-rw-r--r--src/settingskeyword.cpp54
-rw-r--r--src/settingskeyword.h24
-rw-r--r--src/settingssearchurl.cpp64
-rw-r--r--src/settingssearchurl.h12
-rw-r--r--src/settingsuserdefinedinput.cpp66
-rw-r--r--src/settingsuserdefinedinput.h8
-rw-r--r--src/settingsz3950.cpp90
-rw-r--r--src/settingsz3950.h24
-rw-r--r--src/sidebar.cpp74
-rw-r--r--src/sidebar.h36
-rw-r--r--src/value.cpp140
-rw-r--r--src/value.h88
-rw-r--r--src/valuewidget.cpp100
-rw-r--r--src/valuewidget.h30
-rw-r--r--src/webquery.cpp186
-rw-r--r--src/webquery.h64
-rw-r--r--src/webqueryamatex.cpp34
-rw-r--r--src/webqueryamatex.h10
-rw-r--r--src/webqueryarxiv.cpp106
-rw-r--r--src/webqueryarxiv.h28
-rw-r--r--src/webquerybibsonomy.cpp32
-rw-r--r--src/webquerybibsonomy.h10
-rw-r--r--src/webquerycitebase.cpp30
-rw-r--r--src/webquerycitebase.h10
-rw-r--r--src/webqueryciteseerx.cpp58
-rw-r--r--src/webqueryciteseerx.h26
-rw-r--r--src/webquerycsb.cpp118
-rw-r--r--src/webquerycsb.h20
-rw-r--r--src/webquerydblp.cpp64
-rw-r--r--src/webquerydblp.h14
-rw-r--r--src/webquerygooglescholar.cpp118
-rw-r--r--src/webquerygooglescholar.h32
-rw-r--r--src/webqueryieeexplore.cpp54
-rw-r--r--src/webqueryieeexplore.h26
-rw-r--r--src/webquerymathscinet.cpp66
-rw-r--r--src/webquerymathscinet.h10
-rw-r--r--src/webquerypubmed.cpp176
-rw-r--r--src/webquerypubmed.h54
-rw-r--r--src/webquerysciencedirect.cpp126
-rw-r--r--src/webquerysciencedirect.h18
-rw-r--r--src/webqueryspireshep.cpp76
-rw-r--r--src/webqueryspireshep.h16
-rw-r--r--src/webqueryz3950.cpp98
-rw-r--r--src/webqueryz3950.h28
-rw-r--r--src/webqueryzmath.cpp28
-rw-r--r--src/webqueryzmath.h10
-rw-r--r--src/xsltransform.cpp24
-rw-r--r--src/xsltransform.h6
-rw-r--r--src/z3950connection.cpp146
-rw-r--r--src/z3950connection.h78
177 files changed, 4375 insertions, 4375 deletions
diff --git a/src/comment.cpp b/src/comment.cpp
index dcf0a58..3d2e5c1 100644
--- a/src/comment.cpp
+++ b/src/comment.cpp
@@ -17,8 +17,8 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qregexp.h>
-#include <qstringlist.h>
+#include <ntqregexp.h>
+#include <ntqstringlist.h>
#include <comment.h>
#include <xsltransform.h>
@@ -26,7 +26,7 @@
namespace BibTeX
{
- Comment::Comment( const QString& text, bool useCommand ) : Element(), m_text( text ), m_useCommand( useCommand )
+ Comment::Comment( const TQString& text, bool useCommand ) : Element(), m_text( text ), m_useCommand( useCommand )
{
// nothing
}
@@ -42,12 +42,12 @@ namespace BibTeX
// nothing
}
- QString Comment::text() const
+ TQString Comment::text() const
{
return m_text;
}
- void Comment::setText( const QString &text )
+ void Comment::setText( const TQString &text )
{
m_text = text;
}
@@ -62,7 +62,7 @@ namespace BibTeX
m_useCommand = useCommand;
}
- bool Comment::containsPattern( const QString& pattern, EntryField::FieldType fieldType, FilterType filterType, bool caseSensitive ) const
+ bool Comment::containsPattern( const TQString& pattern, EntryField::FieldType fieldType, FilterType filterType, bool caseSensitive ) const
{
if ( filterType == ftExact )
{
@@ -72,9 +72,9 @@ namespace BibTeX
else
{
/** for each word in the search pattern ... */
- QStringList words = QStringList::split( QRegExp( "\\s+" ), pattern );
+ TQStringList words = TQStringList::split( TQRegExp( "\\s+" ), pattern );
unsigned int hits = 0;
- for ( QStringList::Iterator it = words.begin(); it != words.end(); ++it )
+ for ( TQStringList::Iterator it = words.begin(); it != words.end(); ++it )
{
/** check if word is contained in text */
if ( fieldType == EntryField::ftUnknown && m_text.contains( *it, caseSensitive ) )
diff --git a/src/comment.h b/src/comment.h
index f259daf..10927e8 100644
--- a/src/comment.h
+++ b/src/comment.h
@@ -28,20 +28,20 @@ namespace BibTeX
class Comment : public Element
{
public:
- Comment( const QString &text, bool useCommand = false );
+ Comment( const TQString &text, bool useCommand = false );
Comment( Comment *other );
virtual ~Comment();
- QString text() const;
- void setText( const QString &text );
+ TQString text() const;
+ void setText( const TQString &text );
bool useCommand() const;
void setUseCommand( bool useCommand );
- bool containsPattern( const QString& pattern, EntryField::FieldType fieldType = EntryField::ftUnknown, FilterType filterType = BibTeX::Element::ftExact, bool caseSensitive = FALSE ) const;
+ bool containsPattern( const TQString& pattern, EntryField::FieldType fieldType = EntryField::ftUnknown, FilterType filterType = BibTeX::Element::ftExact, bool caseSensitive = FALSE ) const;
Element* clone();
private:
- QString m_text;
+ TQString m_text;
bool m_useCommand;
};
diff --git a/src/commentwidget.cpp b/src/commentwidget.cpp
index 09d371f..56a6854 100644
--- a/src/commentwidget.cpp
+++ b/src/commentwidget.cpp
@@ -17,10 +17,10 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qlabel.h>
-#include <qmultilineedit.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
+#include <ntqlabel.h>
+#include <ntqmultilineedit.h>
+#include <ntqlayout.h>
+#include <ntqcheckbox.h>
#include <kdialogbase.h>
#include <kglobalsettings.h>
#include <klocale.h>
@@ -33,8 +33,8 @@
namespace KBibTeX
{
- CommentWidget::CommentWidget( BibTeX::Comment *comment, bool isReadOnly, QWidget *parent, const char *name )
- : QWidget( parent, name ), m_comment( comment ), m_isReadOnly( isReadOnly )
+ CommentWidget::CommentWidget( BibTeX::Comment *comment, bool isReadOnly, TQWidget *parent, const char *name )
+ : TQWidget( parent, name ), m_comment( comment ), m_isReadOnly( isReadOnly )
{
setupGUI();
getCommentData();
@@ -50,18 +50,18 @@ namespace KBibTeX
void CommentWidget::setupGUI()
{
setMinimumWidth( 384 );
- QVBoxLayout * layout = new QVBoxLayout( this, 0, KDialog::spacingHint() );
+ TQVBoxLayout * layout = new TQVBoxLayout( this, 0, KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "Co&mment:" ), this );
+ TQLabel *label = new TQLabel( i18n( "Co&mment:" ), this );
layout->addWidget( label );
- m_multiLineEdit = new QMultiLineEdit( this );
+ m_multiLineEdit = new TQMultiLineEdit( this );
m_multiLineEdit->setFont( KGlobalSettings::fixedFont() );
layout->addWidget( m_multiLineEdit );
label->setBuddy( m_multiLineEdit );
m_multiLineEdit->setReadOnly( m_isReadOnly );
- m_checkboxUseCommand = new QCheckBox( i18n( "&Use @Comment for comment instead of plain text" ), this );
+ m_checkboxUseCommand = new TQCheckBox( i18n( "&Use @Comment for comment instead of plain text" ), this );
layout->addWidget( m_checkboxUseCommand );
}
@@ -77,14 +77,14 @@ namespace KBibTeX
m_comment->setUseCommand( m_checkboxUseCommand->isChecked() );
}
- QDialog::DialogCode CommentWidget::execute( BibTeX::Comment *comment, bool isReadOnly, QWidget *parent, const char *name )
+ TQDialog::DialogCode CommentWidget::execute( BibTeX::Comment *comment, bool isReadOnly, TQWidget *parent, const char *name )
{
KDialogBase * dlg = new KDialogBase( parent, name, true, i18n( "Edit BibTeX Comment" ), KDialogBase::Ok | KDialogBase::Cancel );
CommentWidget* ui = new CommentWidget( comment, isReadOnly, dlg, "kbibtex::commentwidget" );
dlg->setMainWidget( ui );
- QDialog::DialogCode result = ( QDialog::DialogCode ) dlg->exec();
- if ( !isReadOnly && result == QDialog::Accepted )
+ TQDialog::DialogCode result = ( TQDialog::DialogCode ) dlg->exec();
+ if ( !isReadOnly && result == TQDialog::Accepted )
ui->setCommentData();
delete( ui );
diff --git a/src/commentwidget.h b/src/commentwidget.h
index 16ac051..8b9c0b9 100644
--- a/src/commentwidget.h
+++ b/src/commentwidget.h
@@ -20,29 +20,29 @@
#ifndef COMMENTWIDGET_H
#define COMMENTWIDGET_H
-#include <qwidget.h>
-#include <qdialog.h>
+#include <ntqwidget.h>
+#include <ntqdialog.h>
#include <comment.h>
-class QMultiLineEdit;
-class QCheckBox;
+class TQMultiLineEdit;
+class TQCheckBox;
namespace KBibTeX
{
- class CommentWidget : public QWidget
+ class CommentWidget : public TQWidget
{
Q_OBJECT
public:
- CommentWidget( BibTeX::Comment *comment, bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+ CommentWidget( BibTeX::Comment *comment, bool isReadOnly, TQWidget *parent = 0, const char *name = 0 );
~CommentWidget();
- static QDialog::DialogCode execute( BibTeX::Comment *comment, bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+ static TQDialog::DialogCode execute( BibTeX::Comment *comment, bool isReadOnly, TQWidget *parent = 0, const char *name = 0 );
private:
BibTeX::Comment* m_comment;
- QCheckBox *m_checkboxUseCommand;
- QMultiLineEdit *m_multiLineEdit;
+ TQCheckBox *m_checkboxUseCommand;
+ TQMultiLineEdit *m_multiLineEdit;
bool m_isReadOnly;
void setupGUI();
diff --git a/src/documentlistview.cpp b/src/documentlistview.cpp
index 61ff980..7478252 100644
--- a/src/documentlistview.cpp
+++ b/src/documentlistview.cpp
@@ -21,17 +21,17 @@
#include <config.h>
#endif
-#include <qevent.h>
-#include <qdragobject.h>
-#include <qfile.h>
-#include <qvaluelist.h>
-#include <qcursor.h>
-#include <qbuffer.h>
-#include <qlistview.h>
-#include <qclipboard.h>
-#include <qheader.h>
-#include <qtextstream.h>
-#include <qtimer.h>
+#include <ntqevent.h>
+#include <ntqdragobject.h>
+#include <ntqfile.h>
+#include <ntqvaluelist.h>
+#include <ntqcursor.h>
+#include <ntqbuffer.h>
+#include <ntqlistview.h>
+#include <ntqclipboard.h>
+#include <ntqheader.h>
+#include <ntqtextstream.h>
+#include <ntqtimer.h>
#include <kapplication.h>
#include <kio/netaccess.h>
@@ -69,12 +69,12 @@
namespace KBibTeX
{
- DocumentListView::DocumentListView( KBibTeX::DocumentWidget *docWidget, bool isReadOnly, QWidget *parent, const char *name )
+ DocumentListView::DocumentListView( KBibTeX::DocumentWidget *docWidget, bool isReadOnly, TQWidget *parent, const char *name )
: KListView( parent, name ), m_docWidget( docWidget ), m_bibtexFile( NULL ), m_contextMenu( NULL ), m_headerMenu( NULL ), m_isReadOnly( isReadOnly ), m_newElementCounter( 1 )
{
setAllColumnsShowFocus( true );
setShowSortIndicator( true );
- setSelectionMode( QListView::Extended );
+ setSelectionMode( TQListView::Extended );
header() ->setClickEnabled( TRUE );
header() ->setMovingEnabled( TRUE );
buildColumns();
@@ -85,9 +85,9 @@ namespace KBibTeX
setDropVisualizer( TRUE );
connect( header(), SIGNAL( clicked( int ) ), this, SLOT( setSortingColumn( int ) ) );
- connect( this, SIGNAL( contextMenu( KListView *, QListViewItem *, const QPoint & ) ), this, SLOT( showBibtexListContextMenu( KListView *, QListViewItem *, const QPoint & ) ) );
- connect( this, SIGNAL( doubleClicked( QListViewItem*, const QPoint&, int ) ), this, SLOT( slotDoubleClick( QListViewItem* ) ) );
- connect( this, SIGNAL( dropped( QDropEvent*, QListViewItem* ) ), this, SLOT( slotDropped( QDropEvent*, QListViewItem* ) ) );
+ connect( this, SIGNAL( contextMenu( KListView *, TQListViewItem *, const TQPoint & ) ), this, SLOT( showBibtexListContextMenu( KListView *, TQListViewItem *, const TQPoint & ) ) );
+ connect( this, SIGNAL( doubleClicked( TQListViewItem*, const TQPoint&, int ) ), this, SLOT( slotDoubleClick( TQListViewItem* ) ) );
+ connect( this, SIGNAL( dropped( TQDropEvent*, TQListViewItem* ) ), this, SLOT( slotDropped( TQDropEvent*, TQListViewItem* ) ) );
}
DocumentListView::~DocumentListView()
@@ -115,7 +115,7 @@ namespace KBibTeX
void DocumentListView::setItems()
{
- QApplication::setOverrideCursor( Qt::waitCursor );
+ TQApplication::setOverrideCursor( TQt::waitCursor );
KProgressDialog *prgDlg = new KProgressDialog( this, "prgDlg", i18n( "List View" ), i18n( "Updating main view ..." ), TRUE );
prgDlg->show();
@@ -145,7 +145,7 @@ namespace KBibTeX
updateVisiblity();
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
void DocumentListView::insertItems( BibTeX::File *items, KBibTeX::DocumentListViewItem *after )
@@ -167,9 +167,9 @@ namespace KBibTeX
if ( m_bibtexFile->containsKey( newEntry->id() ) )
{
int counter = 0;
- QString newId = QString( newEntry->id() ).append( '_' ).append( QString::number( ++counter ) );
+ TQString newId = TQString( newEntry->id() ).append( '_' ).append( TQString::number( ++counter ) );
while ( m_bibtexFile->containsKey( newId ) )
- newId = QString( newEntry->id() ).append( '_' ).append( QString::number( ++counter ) );
+ newId = TQString( newEntry->id() ).append( '_' ).append( TQString::number( ++counter ) );
newEntry->setId( newId );
}
element = newEntry;
@@ -185,7 +185,7 @@ namespace KBibTeX
m_unreadItems.append( after );
emit modified();
- QTimer::singleShot( 3500, this, SLOT( makeNewItemsUnread() ) );
+ TQTimer::singleShot( 3500, this, SLOT( makeNewItemsUnread() ) );
return after;
}
@@ -197,7 +197,7 @@ namespace KBibTeX
void DocumentListView::updateVisiblity()
{
- QListViewItemIterator it( this );
+ TQListViewItemIterator it( this );
while ( it.current() )
{
DocumentListViewItem * kblvi = dynamic_cast<DocumentListViewItem*>( it.current() );
@@ -263,7 +263,7 @@ namespace KBibTeX
for ( int i = 0; i <= ( int ) BibTeX::EntryField::ftYear - ( int ) BibTeX::EntryField::ftAbstract; i++ )
{
BibTeX::EntryField::FieldType fieldType = ( BibTeX::EntryField::FieldType )( i + ( int ) BibTeX::EntryField::ftAbstract );
- QString label = Settings::fieldTypeToI18NString( fieldType );
+ TQString label = Settings::fieldTypeToI18NString( fieldType );
item = m_headerMenu->insertItem( label, ( int ) fieldType + 2 );
m_headerMenu->setItemChecked( item, settings->editing_MainListColumnsWidth[ i + 2 ] > 0 );
}
@@ -272,11 +272,11 @@ namespace KBibTeX
void DocumentListView::deleteSelected()
{
- QListViewItemIterator it( this, QListViewItemIterator::Selected | QListViewItemIterator::Visible );
+ TQListViewItemIterator it( this, TQListViewItemIterator::Selected | TQListViewItemIterator::Visible );
if ( it.current() == NULL ) return;
- QListViewItem *above = it.current() ->itemAbove();
- QValueList<DocumentListViewItem*> toBeDeleted;
+ TQListViewItem *above = it.current() ->itemAbove();
+ TQValueList<DocumentListViewItem*> toBeDeleted;
while ( it.current() )
{
DocumentListViewItem * kblvi = dynamic_cast<DocumentListViewItem*>( it.current() );
@@ -284,7 +284,7 @@ namespace KBibTeX
it++;
}
- for ( QValueList<DocumentListViewItem*>::Iterator it = toBeDeleted.begin(); it != toBeDeleted.end(); ++it )
+ for ( TQValueList<DocumentListViewItem*>::Iterator it = toBeDeleted.begin(); it != toBeDeleted.end(); ++it )
{
m_bibtexFile->deleteElement(( *it )->element() );
takeItem( *it );
@@ -297,11 +297,11 @@ namespace KBibTeX
emit modified();
}
- const QValueList<BibTeX::Element*> DocumentListView::selectedItems()
+ const TQValueList<BibTeX::Element*> DocumentListView::selectedItems()
{
- QValueList<BibTeX::Element*> result;
+ TQValueList<BibTeX::Element*> result;
- QListViewItemIterator it( this, QListViewItemIterator::Selected );
+ TQListViewItemIterator it( this, TQListViewItemIterator::Selected );
while ( it.current() )
{
DocumentListViewItem * kblvi = dynamic_cast<DocumentListViewItem*>( it.current() );
@@ -313,33 +313,33 @@ namespace KBibTeX
return result;
}
- QString DocumentListView::selectedToBibTeXText()
+ TQString DocumentListView::selectedToBibTeXText()
{
BibTeX::FileExporterBibTeX *exporter = new BibTeX::FileExporterBibTeX();
exporter->setEncoding( "latex" );
- QBuffer buffer;
+ TQBuffer buffer;
buffer.open( IO_WriteOnly );
- QValueList<BibTeX::Element*> selectedElements = selectedItems();
- for ( QValueList<BibTeX::Element*>::iterator it = selectedElements.begin(); it != selectedElements.end(); ++it )
+ TQValueList<BibTeX::Element*> selectedElements = selectedItems();
+ for ( TQValueList<BibTeX::Element*>::iterator it = selectedElements.begin(); it != selectedElements.end(); ++it )
exporter->save( &buffer, *it );
buffer.close();
delete exporter;
buffer.open( IO_ReadOnly );
- QTextStream in( &buffer );
- in.setEncoding( QTextStream::UnicodeUTF8 );
- QString result = in.read();
+ TQTextStream in( &buffer );
+ in.setEncoding( TQTextStream::UnicodeUTF8 );
+ TQString result = in.read();
buffer.close();
return result;
}
- QString DocumentListView::selectedToBibTeXRefs()
+ TQString DocumentListView::selectedToBibTeXRefs()
{
- QString refs;
- QValueList<BibTeX::Element*> selectedElements = selectedItems();
- for ( QValueList<BibTeX::Element*>::iterator it = selectedElements.begin(); it != selectedElements.end(); ++it )
+ TQString refs;
+ TQValueList<BibTeX::Element*> selectedElements = selectedItems();
+ for ( TQValueList<BibTeX::Element*>::iterator it = selectedElements.begin(); it != selectedElements.end(); ++it )
{
BibTeX::Entry *entry = dynamic_cast<BibTeX::Entry*>( *it );
if ( entry == NULL ) continue;
@@ -348,7 +348,7 @@ namespace KBibTeX
refs.append( "," );
refs.append( entry->id() );
}
- return QString( "\\cite{%1}" ).arg( refs );
+ return TQString( "\\cite{%1}" ).arg( refs );
}
void DocumentListView::copy()
@@ -373,11 +373,11 @@ namespace KBibTeX
if ( dlvi == NULL )
dlvi = dynamic_cast<KBibTeX::DocumentListViewItem *>( currentItem() );
- QString clipboardText = kapp->clipboard() ->text();
+ TQString clipboardText = kapp->clipboard() ->text();
return paste( clipboardText, dlvi );
}
- bool DocumentListView::paste( const QString& text, DocumentListViewItem *at )
+ bool DocumentListView::paste( const TQString& text, DocumentListViewItem *at )
{
Settings * settings = Settings::self( m_bibtexFile );
@@ -454,11 +454,11 @@ namespace KBibTeX
popup->insertItem( Settings::fieldTypeToI18NString( ft ), i );
}
popup->insertSeparator();
- QIconSet cancelPixmap = KGlobal::iconLoader() ->loadIconSet( "cancel", KIcon::Small );
+ TQIconSet cancelPixmap = KGlobal::iconLoader() ->loadIconSet( "cancel", KIcon::Small );
int cancelId = popup->insertItem( cancelPixmap, i18n( "Cancel" ) );
// show popup menu
- int selectedId = popup->exec( QCursor::pos() );
+ int selectedId = popup->exec( TQCursor::pos() );
if ( selectedId == cancelId || selectedId == -1 )
return FALSE; // cancel menu
@@ -473,7 +473,7 @@ namespace KBibTeX
else if ( field->value() != NULL )
delete field->value();
- QString encodedText = BibTeX::EncoderLaTeX::currentEncoderLaTeX() ->encode( text );
+ TQString encodedText = BibTeX::EncoderLaTeX::currentEncoderLaTeX() ->encode( text );
// create new value from clipboard's content
BibTeX::Value * value = new BibTeX::Value();
@@ -495,13 +495,13 @@ namespace KBibTeX
void DocumentListView::selectAll()
{
- QListView::selectAll( true );
+ TQListView::selectAll( true );
}
/* void DocumentListView::sendSelectedToLyx()
{
- QStringList refsToSend;
- QListViewItemIterator it( this, QListViewItemIterator::Selected );
+ TQStringList refsToSend;
+ TQListViewItemIterator it( this, TQListViewItemIterator::Selected );
while ( it.current() )
{
DocumentListViewItem * kblvi = dynamic_cast<DocumentListViewItem*>( it.current() );
@@ -512,28 +512,28 @@ namespace KBibTeX
}
Settings * settings = Settings::self( m_bibtexFile );
- QString lyxPipeFilename = settings->detectLyXInPipe();
+ TQString lyxPipeFilename = settings->detectLyXInPipe();
kdDebug() << "sendSelectedToLyx: lyxPipeFilename= " << lyxPipeFilename << endl;
- QFile pipe( lyxPipeFilename );
+ TQFile pipe( lyxPipeFilename );
if ( pipe.exists() && pipe.open( IO_WriteOnly ) )
{
- QTextStream * writer = new QTextStream( &pipe );
- QString msg = "LYXCMD:kbibtex:citation-insert:" + refsToSend.join( "," );
+ TQTextStream * writer = new TQTextStream( &pipe );
+ TQString msg = "LYXCMD:kbibtex:citation-insert:" + refsToSend.join( "," );
*writer << msg << endl;
delete writer;
pipe.close();
}
else
- KMessageBox::error( this, ( lyxPipeFilename.isEmpty() ? i18n( "Cannot establish a link to LyX" ) : QString( i18n( "Cannot establish a link to LyX using the pipe \"%1\"" ) ).arg( lyxPipeFilename ) ) + i18n( "\nMaybe LyX is not running?" ), i18n( "Error communicating with LyX" ) );
+ KMessageBox::error( this, ( lyxPipeFilename.isEmpty() ? i18n( "Cannot establish a link to LyX" ) : TQString( i18n( "Cannot establish a link to LyX using the pipe \"%1\"" ) ).arg( lyxPipeFilename ) ) + i18n( "\nMaybe LyX is not running?" ), i18n( "Error communicating with LyX" ) );
}*/
- void DocumentListView::slotDoubleClick( QListViewItem *item )
+ void DocumentListView::slotDoubleClick( TQListViewItem *item )
{
DocumentListViewItem *dlvi = dynamic_cast<DocumentListViewItem*>( item );
if ( dlvi != NULL ) emit executed( dlvi );
}
- void DocumentListView::filter( const QString & text, BibTeX::Element::FilterType filterType, BibTeX::EntryField::FieldType fieldType )
+ void DocumentListView::filter( const TQString & text, BibTeX::Element::FilterType filterType, BibTeX::EntryField::FieldType fieldType )
{
m_filter = text;
m_filterType = filterType;
@@ -563,7 +563,7 @@ namespace KBibTeX
}
}
- void DocumentListView::showBibtexListContextMenu( KListView *, QListViewItem *, const QPoint & p )
+ void DocumentListView::showBibtexListContextMenu( KListView *, TQListViewItem *, const TQPoint & p )
{
if ( m_contextMenu != NULL )
{
@@ -576,25 +576,25 @@ namespace KBibTeX
{
Settings * settings = Settings::self( m_bibtexFile );
settings->editing_MainListSortingColumn = column;
- settings->editing_MainListSortingOrder = ( sortOrder() == Qt::Ascending ) ? 1 : -1;
+ settings->editing_MainListSortingOrder = ( sortOrder() == TQt::Ascending ) ? 1 : -1;
}
- bool DocumentListView::acceptDrag( QDropEvent * event ) const
+ bool DocumentListView::acceptDrag( TQDropEvent * event ) const
{
if ( event->source() == this ) return false;
- return QTextDrag::canDecode( event ) || QUriDrag::canDecode( event );
+ return TQTextDrag::canDecode( event ) || TQUriDrag::canDecode( event );
}
void DocumentListView::startDrag()
{
Settings * settings = Settings::self( m_bibtexFile );
- QDragObject *d = new QTextDrag( settings->editing_DragAction == Settings::COPYREFERENCE ? selectedToBibTeXRefs() : selectedToBibTeXText(), this );
+ TQDragObject *d = new TQTextDrag( settings->editing_DragAction == Settings::COPYREFERENCE ? selectedToBibTeXRefs() : selectedToBibTeXText(), this );
d->dragCopy();
}
void DocumentListView::saveColumnIndex()
{
Settings * settings = Settings::self( m_bibtexFile );
- QHeader *hdr = header();
+ TQHeader *hdr = header();
for ( int i = 0; i < columns(); i++ )
settings->editing_MainListColumnsIndex[ i ] = hdr->mapToIndex( i );
@@ -603,7 +603,7 @@ namespace KBibTeX
void DocumentListView::restoreColumnIndex()
{
Settings * settings = Settings::self( m_bibtexFile );
- QHeader *hdr = header();
+ TQHeader *hdr = header();
for ( int i = 0; i < columns(); i++ )
hdr->moveSection( i, settings->editing_MainListColumnsIndex[ i ] );
@@ -617,7 +617,7 @@ namespace KBibTeX
for ( int i = from; i < to; i++ )
{
- if ( columnWidthMode( i ) == QListView::Manual )
+ if ( columnWidthMode( i ) == TQListView::Manual )
settings->editing_MainListColumnsWidth[ i ] = columnWidth( i );
else
settings->editing_MainListColumnsWidth[ i ] = 0xffff;
@@ -639,12 +639,12 @@ namespace KBibTeX
{
Settings * settings = Settings::self( m_bibtexFile );
setSortColumn( settings->editing_MainListSortingColumn );
- setSortOrder( settings->editing_MainListSortingOrder > 0 ? Qt::Ascending : Qt::Descending );
+ setSortOrder( settings->editing_MainListSortingOrder > 0 ? TQt::Ascending : TQt::Descending );
}
void DocumentListView::makeNewItemsUnread()
{
- for ( QValueList<DocumentListViewItem*>::ConstIterator it = m_unreadItems.begin() ; it != m_unreadItems.end(); ++it )
+ for ( TQValueList<DocumentListViewItem*>::ConstIterator it = m_unreadItems.begin() ; it != m_unreadItems.end(); ++it )
{
( *it ) ->setUnreadStatus( FALSE );
( *it ) ->repaint();
@@ -653,36 +653,36 @@ namespace KBibTeX
m_unreadItems.clear();
}
- void DocumentListView::slotDropped( QDropEvent * event, QListViewItem * item )
+ void DocumentListView::slotDropped( TQDropEvent * event, TQListViewItem * item )
{
- QString text;
- QStrList urlList;
+ TQString text;
+ TQStrList urlList;
- if ( QTextDrag::decode( event, text ) && KURL( text ).isValid() )
+ if ( TQTextDrag::decode( event, text ) && KURL( text ).isValid() )
urlList.append( text );
- if ( !urlList.isEmpty() || QUriDrag::decode( event, urlList ) )
+ if ( !urlList.isEmpty() || TQUriDrag::decode( event, urlList ) )
{
- QString url = urlList.at( 0 );
- QString tmpFile;
+ TQString url = urlList.at( 0 );
+ TQString tmpFile;
if ( ! KIO::NetAccess::download( url, tmpFile, 0 ) )
{
KMessageBox::error( this, KIO::NetAccess::lastErrorString() );
return ;
}
- QFile f( tmpFile );
+ TQFile f( tmpFile );
if ( ! f.open( IO_ReadOnly ) )
{
KMessageBox::error( this, f.errorString() );
KIO::NetAccess::removeTempFile( tmpFile );
return ;
}
- QByteArray ba = f.readAll();
- text = QString( ba );
+ TQByteArray ba = f.readAll();
+ text = TQString( ba );
f.close();
KIO::NetAccess::removeTempFile( tmpFile );
}
- else if ( !QTextDrag::decode( event, text ) )
+ else if ( !TQTextDrag::decode( event, text ) )
return;
event->accept( TRUE );
@@ -691,16 +691,16 @@ namespace KBibTeX
paste( text, dlvi );
}
- bool DocumentListView::eventFilter( QObject * watched, QEvent * e )
+ bool DocumentListView::eventFilter( TQObject * watched, TQEvent * e )
{
if ( watched == header() )
{
switch ( e->type() )
{
- case QEvent::MouseButtonPress:
+ case TQEvent::MouseButtonPress:
{
- if ( static_cast<QMouseEvent *>( e ) ->button() == RightButton && m_headerMenu != NULL )
- m_headerMenu->popup( QCursor::pos() );
+ if ( static_cast<TQMouseEvent *>( e ) ->button() == RightButton && m_headerMenu != NULL )
+ m_headerMenu->popup( TQCursor::pos() );
break;
}
@@ -713,9 +713,9 @@ namespace KBibTeX
return KListView::eventFilter( watched, e );
}
- void DocumentListView::keyPressEvent( QKeyEvent *e )
+ void DocumentListView::keyPressEvent( TQKeyEvent *e )
{
- if ( e->key() == QKeyEvent::Key_Enter || e->key() == QKeyEvent::Key_Return )
+ if ( e->key() == TQKeyEvent::Key_Enter || e->key() == TQKeyEvent::Key_Return )
{
DocumentListViewItem *item = dynamic_cast<DocumentListViewItem*>( selectedItem() );
if ( item == NULL )
@@ -742,7 +742,7 @@ namespace KBibTeX
setColumnWidth( col, colWidth );
header() ->setResizeEnabled( colWidth > 0, col );
- setColumnWidthMode( col, colWidth < 0xffff ? QListView::Manual : QListView::Maximum );
+ setColumnWidthMode( col, colWidth < 0xffff ? TQListView::Manual : TQListView::Maximum );
saveColumnWidths( col );
}
@@ -759,7 +759,7 @@ namespace KBibTeX
for ( int i = 0; i <= ( int ) BibTeX::EntryField::ftYear - ( int ) BibTeX::EntryField::ftAbstract; i++ )
{
BibTeX::EntryField::FieldType fieldType = ( BibTeX::EntryField::FieldType )( i + ( int ) BibTeX::EntryField::ftAbstract );
- QString label = Settings::fieldTypeToI18NString( fieldType );
+ TQString label = Settings::fieldTypeToI18NString( fieldType );
addColumn( label );
}
}
diff --git a/src/documentlistview.h b/src/documentlistview.h
index da2c6c5..aedb0b2 100644
--- a/src/documentlistview.h
+++ b/src/documentlistview.h
@@ -27,7 +27,7 @@
#include <settings.h>
#include <file.h>
-class QString;
+class TQString;
class KURL;
class KActionMenu;
class KPopupMenu;
@@ -41,7 +41,7 @@ namespace KBibTeX
{
Q_OBJECT
public:
- DocumentListView( KBibTeX::DocumentWidget *docWidget, bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+ DocumentListView( KBibTeX::DocumentWidget *docWidget, bool isReadOnly, TQWidget *parent = 0, const char *name = 0 );
~DocumentListView();
void setFactory( KXMLGUIFactory *factory, KXMLGUIClient *client );
@@ -52,7 +52,7 @@ namespace KBibTeX
KBibTeX::DocumentListViewItem *insertItem( BibTeX::Element *item, KBibTeX::DocumentListViewItem *after );
void deleteSelected();
- const QValueList<BibTeX::Element*> selectedItems();
+ const TQValueList<BibTeX::Element*> selectedItems();
// void sendSelectedToLyx();
void updateVisiblity();
@@ -70,9 +70,9 @@ namespace KBibTeX
void copyReferences();
void cut();
bool paste();
- bool paste( const QString& text, DocumentListViewItem *at );
+ bool paste( const TQString& text, DocumentListViewItem *at );
void selectAll();
- void filter( const QString& text, BibTeX::Element::FilterType filterType, BibTeX::EntryField::FieldType fieldType );
+ void filter( const TQString& text, BibTeX::Element::FilterType filterType, BibTeX::EntryField::FieldType fieldType );
void setReadOnly( bool isReadOnly );
void activateShowColumnMenu( int id );
@@ -80,10 +80,10 @@ namespace KBibTeX
void insertItem( BibTeX::Element *item );
private slots:
- void slotDoubleClick( QListViewItem * item = NULL );
+ void slotDoubleClick( TQListViewItem * item = NULL );
void setSortingColumn( int column );
- void showBibtexListContextMenu( KListView *, QListViewItem *, const QPoint &p );
- void slotDropped( QDropEvent* event, QListViewItem* item );
+ void showBibtexListContextMenu( KListView *, TQListViewItem *, const TQPoint &p );
+ void slotDropped( TQDropEvent* event, TQListViewItem* item );
void saveColumnIndex();
void restoreColumnIndex();
void saveColumnWidths( int col = -1 );
@@ -92,12 +92,12 @@ namespace KBibTeX
void makeNewItemsUnread();
protected:
- bool acceptDrag( QDropEvent* e ) const;
+ bool acceptDrag( TQDropEvent* e ) const;
void startDrag();
- virtual bool eventFilter( QObject *watched, QEvent *e );
+ virtual bool eventFilter( TQObject *watched, TQEvent *e );
- virtual void keyPressEvent( QKeyEvent *e );
+ virtual void keyPressEvent( TQKeyEvent *e );
private:
static const int maxColumns = 256;
@@ -107,16 +107,16 @@ namespace KBibTeX
KPopupMenu *m_headerMenu;
KActionMenu *m_columnVisibleAction;
bool m_isReadOnly;
- QValueList<DocumentListViewItem*> m_unreadItems;
+ TQValueList<DocumentListViewItem*> m_unreadItems;
- QString m_filter;
+ TQString m_filter;
BibTeX::Element::FilterType m_filterType;
BibTeX::EntryField::FieldType m_filterFieldType;
int m_newElementCounter;
void setItems();
- QString selectedToBibTeXText();
- QString selectedToBibTeXRefs();
+ TQString selectedToBibTeXText();
+ TQString selectedToBibTeXRefs();
void showColumn( int col, int colWidth = 0xffff );
void hideColumn( int col );
diff --git a/src/documentlistviewitem.cpp b/src/documentlistviewitem.cpp
index 7a71873..ce4db30 100644
--- a/src/documentlistviewitem.cpp
+++ b/src/documentlistviewitem.cpp
@@ -17,9 +17,9 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qlistview.h>
-#include <qpainter.h>
-#include <qpen.h>
+#include <ntqlistview.h>
+#include <ntqpainter.h>
+#include <ntqpen.h>
#include <klocale.h>
@@ -36,7 +36,7 @@ namespace KBibTeX
setTexts();
}
- DocumentListViewItem::DocumentListViewItem( BibTeX::File *file, BibTeX::Element *element, DocumentListView *parent, QListViewItem *after ) : KListViewItem( parent, after ), m_element( element ), m_bibtexFile( file ), m_parent( parent )
+ DocumentListViewItem::DocumentListViewItem( BibTeX::File *file, BibTeX::Element *element, DocumentListView *parent, TQListViewItem *after ) : KListViewItem( parent, after ), m_element( element ), m_bibtexFile( file ), m_parent( parent )
{
setTexts();
}
@@ -61,7 +61,7 @@ namespace KBibTeX
m_unreadStatus = unread;
}
- void DocumentListViewItem::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align )
+ void DocumentListViewItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align )
{
if ( !p )
return ;
@@ -69,7 +69,7 @@ namespace KBibTeX
// make unread items bold
if ( m_unreadStatus )
{
- QFont f = p->font();
+ TQFont f = p->font();
f.setBold( TRUE );
p->setFont( f );
}
@@ -112,7 +112,7 @@ namespace KBibTeX
if ( comment )
{
setText( 0, i18n( "Comment" ) );
- QString text = comment->text();
+ TQString text = comment->text();
text.replace( '\n', ' ' );
setText(( int ) BibTeX::EntryField::ftTitle - ( int ) BibTeX::EntryField::ftAbstract + 2, text );
}
diff --git a/src/documentlistviewitem.h b/src/documentlistviewitem.h
index 3462fd6..5debafa 100644
--- a/src/documentlistviewitem.h
+++ b/src/documentlistviewitem.h
@@ -31,7 +31,7 @@ namespace KBibTeX
{
public:
DocumentListViewItem( BibTeX::File *file, BibTeX::Element *element, DocumentListView *parent );
- DocumentListViewItem( BibTeX::File *file, BibTeX::Element *element, DocumentListView *parent, QListViewItem *after );
+ DocumentListViewItem( BibTeX::File *file, BibTeX::Element *element, DocumentListView *parent, TQListViewItem *after );
~DocumentListViewItem();
@@ -40,7 +40,7 @@ namespace KBibTeX
void setUnreadStatus( bool unread );
protected:
- void paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align );
+ void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align );
private:
BibTeX::Element *m_element;
diff --git a/src/documentsourceview.cpp b/src/documentsourceview.cpp
index 0edce91..86d2322 100644
--- a/src/documentsourceview.cpp
+++ b/src/documentsourceview.cpp
@@ -17,9 +17,9 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qbuffer.h>
-#include <qlayout.h>
-#include <qfile.h>
+#include <ntqbuffer.h>
+#include <ntqlayout.h>
+#include <ntqfile.h>
#include <klibloader.h>
#include <kxmlguifactory.h>
@@ -46,8 +46,8 @@
namespace KBibTeX
{
- DocumentSourceView::DocumentSourceView( KBibTeX::DocumentWidget *docWidget, bool isReadOnly, QWidget *parent, const char *name )
- : QWidget( parent, name ), m_isReadOnly( isReadOnly ), m_docWidget( docWidget ), m_bibtexFile( NULL ), m_document( NULL ), m_view( NULL ), m_progDlg( NULL )
+ DocumentSourceView::DocumentSourceView( KBibTeX::DocumentWidget *docWidget, bool isReadOnly, TQWidget *parent, const char *name )
+ : TQWidget( parent, name ), m_isReadOnly( isReadOnly ), m_docWidget( docWidget ), m_bibtexFile( NULL ), m_document( NULL ), m_view( NULL ), m_progDlg( NULL )
{
setupGUI();
@@ -97,7 +97,7 @@ namespace KBibTeX
/**
* Paste a line of text into the document at the designated position
*/
- void DocumentSourceView::insertLines( const QString& text, int line )
+ void DocumentSourceView::insertLines( const TQString& text, int line )
{
m_editInterface->insertLine( line < 0 ? m_editInterface->numLines() : ( uint ) line, text );
@@ -122,7 +122,7 @@ namespace KBibTeX
void DocumentSourceView::setFactory( KXMLGUIFactory *factory, KXMLGUIClient * client )
{
KTextEditor::PopupMenuInterface * popupInterface = dynamic_cast<KTextEditor::PopupMenuInterface*>( m_view );
- popupInterface->installPopup(( QPopupMenu* )( factory ->container( "ktexteditor_popup", client ) ) );
+ popupInterface->installPopup(( TQPopupMenu* )( factory ->container( "ktexteditor_popup", client ) ) );
}
void DocumentSourceView::configureEditor()
@@ -159,7 +159,7 @@ namespace KBibTeX
dlg.setSupportsCaseSensitiveFind( FALSE );
dlg.setSupportsRegularExpressionFind( FALSE );
#endif
- if ( dlg.exec() == QDialog::Accepted )
+ if ( dlg.exec() == TQDialog::Accepted )
{
m_lastSearchTerm = dlg.pattern();
m_findHistory = dlg.findHistory();
@@ -215,7 +215,7 @@ namespace KBibTeX
m_progDlg->setAllowCancel( false );
kapp->processEvents();
- QBuffer buffer;
+ TQBuffer buffer;
buffer.open( IO_WriteOnly );
BibTeX::FileExporterBibTeX * exporter = new BibTeX::FileExporterBibTeX();
connect( exporter, SIGNAL( progress( int, int ) ), this, SLOT( updateProgress( int, int ) ) );
@@ -231,9 +231,9 @@ namespace KBibTeX
{
kapp->processEvents();
buffer.open( IO_ReadOnly );
- QTextStream in( &buffer );
- in.setEncoding( QTextStream::UnicodeUTF8 );
- QString text = in.read();
+ TQTextStream in( &buffer );
+ in.setEncoding( TQTextStream::UnicodeUTF8 );
+ TQString text = in.read();
buffer.close();
if ( m_editInterface )
@@ -259,11 +259,11 @@ namespace KBibTeX
{
if ( m_editInterface )
{
- QBuffer buffer;
+ TQBuffer buffer;
buffer.open( IO_WriteOnly );
- QTextStream stream( &buffer );
- stream.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream stream( &buffer );
+ stream.setEncoding( TQTextStream::UnicodeUTF8 );
stream << m_editInterface->text();
buffer.close();
@@ -281,7 +281,7 @@ namespace KBibTeX
return NULL;
}
- void DocumentSourceView::focusInEvent( QFocusEvent* /*event*/ )
+ void DocumentSourceView::focusInEvent( TQFocusEvent* /*event*/ )
{
if ( m_view != NULL )
m_view->setFocus();
@@ -297,8 +297,8 @@ namespace KBibTeX
m_document->setReadWrite( !m_isReadOnly );
if ( !m_isReadOnly )
connect( m_document, SIGNAL( textChanged() ), this, SIGNAL( modified() ) );
- QBoxLayout * layout = new QVBoxLayout( this );
- layout->addWidget( static_cast<QWidget*>( m_view ) );
+ TQBoxLayout * layout = new TQVBoxLayout( this );
+ layout->addWidget( static_cast<TQWidget*>( m_view ) );
int c = m_document->hlModeCount() ;
int hlIdx = -1;
@@ -366,7 +366,7 @@ namespace KBibTeX
fromLine = 0;
fromCol = 0;
}
- while ( KMessageBox::questionYesNo( this, QString( i18n( "Could not find text '%1' in the document.\nStart from the beginning?" ) ).arg( m_lastSearchTerm ), i18n( "Find text in source view" ), KGuiItem( i18n( "Restart search" ) ) ) == KMessageBox::Yes );
+ while ( KMessageBox::questionYesNo( this, TQString( i18n( "Could not find text '%1' in the document.\nStart from the beginning?" ) ).arg( m_lastSearchTerm ), i18n( "Find text in source view" ), KGuiItem( i18n( "Restart search" ) ) ) == KMessageBox::Yes );
}
void DocumentSourceView::updateProgress( int current, int total )
diff --git a/src/documentsourceview.h b/src/documentsourceview.h
index 8edb23a..1ea0519 100644
--- a/src/documentsourceview.h
+++ b/src/documentsourceview.h
@@ -20,7 +20,7 @@
#ifndef KBIBTEXDOCUMENTSOURCEVIEW_H
#define KBIBTEXDOCUMENTSOURCEVIEW_H
-#include <qwidget.h>
+#include <ntqwidget.h>
#include <file.h>
@@ -37,11 +37,11 @@ namespace KBibTeX
/**
* @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
*/
- class DocumentSourceView : public QWidget
+ class DocumentSourceView : public TQWidget
{
Q_OBJECT
public:
- DocumentSourceView( KBibTeX::DocumentWidget *docWidget, bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+ DocumentSourceView( KBibTeX::DocumentWidget *docWidget, bool isReadOnly, TQWidget *parent = 0, const char *name = 0 );
~DocumentSourceView();
bool setBibTeXFile( BibTeX::File *bibtexFile );
@@ -50,7 +50,7 @@ namespace KBibTeX
void copy();
void cut();
bool paste();
- void insertLines( const QString& text, int line = -1 );
+ void insertLines( const TQString& text, int line = -1 );
void selectAll();
void setReadOnly( bool isReadOnly );
@@ -66,7 +66,7 @@ namespace KBibTeX
void modified();
protected:
- virtual void focusInEvent( QFocusEvent* event );
+ virtual void focusInEvent( TQFocusEvent* event );
private:
bool m_isReadOnly;
@@ -75,8 +75,8 @@ namespace KBibTeX
Kate::Document* m_document;
Kate::View* m_view;
KTextEditor::EditInterface* m_editInterface;
- QString m_lastSearchTerm;
- QStringList m_findHistory;
+ TQString m_lastSearchTerm;
+ TQStringList m_findHistory;
KProgressDialog *m_progDlg;
void setupGUI();
diff --git a/src/documentwidget.cpp b/src/documentwidget.cpp
index 1a59434..1353dee 100644
--- a/src/documentwidget.cpp
+++ b/src/documentwidget.cpp
@@ -19,19 +19,19 @@
***************************************************************************/
#include <cmath>
-#include <qlayout.h>
-#include <qfile.h>
-#include <qdragobject.h>
-#include <qregexp.h>
-#include <qsplitter.h>
-#include <qurl.h>
-#include <qtextedit.h>
-#include <qprogressdialog.h>
-#include <qbuffer.h>
-#include <qtooltip.h>
-#include <qapplication.h>
-#include <qpushbutton.h>
-#include <qfileinfo.h>
+#include <ntqlayout.h>
+#include <ntqfile.h>
+#include <ntqdragobject.h>
+#include <ntqregexp.h>
+#include <ntqsplitter.h>
+#include <ntqurl.h>
+#include <ntqtextedit.h>
+#include <ntqprogressdialog.h>
+#include <ntqbuffer.h>
+#include <ntqtooltip.h>
+#include <ntqapplication.h>
+#include <ntqpushbutton.h>
+#include <ntqfileinfo.h>
#include <kdebug.h>
#include <klocale.h>
@@ -92,8 +92,8 @@
namespace KBibTeX
{
- DocumentWidget::DocumentWidget( bool isReadOnly, QWidget *parent, const char *name )
- : QTabWidget( parent, name ), m_lineEditNewKeyword( NULL ), m_isReadOnly( isReadOnly ), m_filename( QString::null ), m_progressDialog( NULL ), m_newElementCounter( 1 ), m_editMode( emList ), m_viewDocumentActionMenu( NULL ), m_assignKeywordsActionMenu( NULL ), m_searchWebsitesActionMenu( NULL ), m_actionEditCut( NULL ), m_actionEditCopy( NULL ), m_actionEditCopyRef( NULL ), m_actionEditPaste( NULL ), m_actionEditSelectAll( NULL ), m_actionEditFind( NULL ), m_actionEditFindNext( NULL ), m_dirWatch( this )
+ DocumentWidget::DocumentWidget( bool isReadOnly, TQWidget *parent, const char *name )
+ : TQTabWidget( parent, name ), m_lineEditNewKeyword( NULL ), m_isReadOnly( isReadOnly ), m_filename( TQString::null ), m_progressDialog( NULL ), m_newElementCounter( 1 ), m_editMode( emList ), m_viewDocumentActionMenu( NULL ), m_assignKeywordsActionMenu( NULL ), m_searchWebsitesActionMenu( NULL ), m_actionEditCut( NULL ), m_actionEditCopy( NULL ), m_actionEditCopyRef( NULL ), m_actionEditPaste( NULL ), m_actionEditSelectAll( NULL ), m_actionEditFind( NULL ), m_actionEditFindNext( NULL ), m_dirWatch( this )
{
m_bibtexfile = new BibTeX::File();
@@ -111,30 +111,30 @@ namespace KBibTeX
void DocumentWidget::setupGUI()
{
setAcceptDrops( TRUE );
- setFocusPolicy( QWidget::ClickFocus );
+ setFocusPolicy( TQWidget::ClickFocus );
// List view tab widget ===============================
- m_container = new QWidget( this );
- QVBoxLayout *layout = new QVBoxLayout( m_container, 0, 0 );
+ m_container = new TQWidget( this );
+ TQVBoxLayout *layout = new TQVBoxLayout( m_container, 0, 0 );
addTab( m_container, i18n( "L&ist view" ) );
m_searchBar = new SearchBar( m_container );
layout->addWidget( m_searchBar );
- m_horSplitter = new QSplitter( Qt::Horizontal, m_container );
+ m_horSplitter = new TQSplitter( TQt::Horizontal, m_container );
layout->addWidget( m_horSplitter );
- m_horSplitter->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding );
+ m_horSplitter->setSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding );
m_sideBar = new SideBar( m_isReadOnly, m_horSplitter );
- m_vertSplitter = new QSplitter( Qt::Vertical, m_horSplitter );
- m_vertSplitter->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding );
+ m_vertSplitter = new TQSplitter( TQt::Vertical, m_horSplitter );
+ m_vertSplitter->setSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding );
m_listViewElements = new DocumentListView( this, m_isReadOnly, m_vertSplitter );
m_preview = new KTextEdit( m_vertSplitter );
m_preview->setReadOnly( TRUE );
- m_preview->setAlignment( Qt::AlignTop && Qt::AlignLeft );
+ m_preview->setAlignment( TQt::AlignTop && TQt::AlignLeft );
// Source view tab widget =============================
@@ -144,22 +144,22 @@ namespace KBibTeX
// Setup actions
connect( m_searchBar, SIGNAL( onlineSearch() ), this, SLOT( onlineSearch() ) );
- connect( m_searchBar, SIGNAL( doSearch( const QString&, BibTeX::Element::FilterType, BibTeX::EntryField::FieldType ) ), m_listViewElements, SLOT( filter( const QString&, BibTeX::Element::FilterType, BibTeX::EntryField::FieldType ) ) );
+ connect( m_searchBar, SIGNAL( doSearch( const TQString&, BibTeX::Element::FilterType, BibTeX::EntryField::FieldType ) ), m_listViewElements, SLOT( filter( const TQString&, BibTeX::Element::FilterType, BibTeX::EntryField::FieldType ) ) );
connect( m_listViewElements, SIGNAL( executed( DocumentListViewItem* ) ), this, SLOT( executeElement( DocumentListViewItem* ) ) );
connect( m_listViewElements, SIGNAL( selectionChanged() ), this, SLOT( slotSelectionChanged() ) );
- connect( m_listViewElements, SIGNAL( currentChanged( QListViewItem* ) ), this, SLOT( slotPreviewElement( QListViewItem* ) ) );
- connect( m_listViewElements, SIGNAL( clicked( QListViewItem* ) ), this, SLOT( slotPreviewElement( QListViewItem* ) ) );
- connect( this, SIGNAL( currentChanged( QWidget * ) ), this, SLOT( slotTabChanged( QWidget* ) ) );
+ connect( m_listViewElements, SIGNAL( currentChanged( TQListViewItem* ) ), this, SLOT( slotPreviewElement( TQListViewItem* ) ) );
+ connect( m_listViewElements, SIGNAL( clicked( TQListViewItem* ) ), this, SLOT( slotPreviewElement( TQListViewItem* ) ) );
+ connect( this, SIGNAL( currentChanged( TQWidget * ) ), this, SLOT( slotTabChanged( TQWidget* ) ) );
connect( m_sourceView, SIGNAL( modified() ), this, SLOT( slotModified() ) );
connect( m_listViewElements, SIGNAL( modified() ), this, SLOT( slotModified() ) );
connect( m_sideBar, SIGNAL( valueRenamed() ), this, SLOT( slotModified() ) );
connect( m_sideBar, SIGNAL( valueRenamed() ), this, SLOT( refreshBibTeXFile() ) );
- connect( m_sideBar, SIGNAL( selected( const QString&, BibTeX::Element::FilterType, BibTeX::EntryField::FieldType ) ), m_searchBar, SLOT( setSearch( const QString&, BibTeX::Element::FilterType, BibTeX::EntryField::FieldType ) ) );
- connect( &m_dirWatch, SIGNAL( dirty( const QString& ) ), this, SLOT( slotFileGotDirty( const QString & ) ) );
+ connect( m_sideBar, SIGNAL( selected( const TQString&, BibTeX::Element::FilterType, BibTeX::EntryField::FieldType ) ), m_searchBar, SLOT( setSearch( const TQString&, BibTeX::Element::FilterType, BibTeX::EntryField::FieldType ) ) );
+ connect( &m_dirWatch, SIGNAL( dirty( const TQString& ) ), this, SLOT( slotFileGotDirty( const TQString & ) ) );
}
- bool DocumentWidget::open( const QString &fileName, bool mergeOnly )
+ bool DocumentWidget::open( const TQString &fileName, bool mergeOnly )
{
bool result = FALSE;
if ( !mergeOnly )
@@ -168,10 +168,10 @@ namespace KBibTeX
BibTeX::FileImporter *importer = fileImporterFactory( fileName );
if ( importer != NULL )
{
- QFile file( fileName );
+ TQFile file( fileName );
if ( file.open( IO_ReadOnly ) )
{
- result = open( &file, mergeOnly, QString( i18n( "<qt>Loading file <b>%1</b></qt>" ) ).arg( fileName ), importer );
+ result = open( &file, mergeOnly, TQString( i18n( "<qt>Loading file <b>%1</b></qt>" ) ).arg( fileName ), importer );
if ( result )
{
m_bibtexfile->fileName = fileName;
@@ -192,7 +192,7 @@ namespace KBibTeX
return result;
}
- bool DocumentWidget::open( QIODevice *iodevice, bool mergeOnly, const QString &label, BibTeX::FileImporter *importer )
+ bool DocumentWidget::open( TQIODevice *iodevice, bool mergeOnly, const TQString &label, BibTeX::FileImporter *importer )
{
bool result = FALSE;
setEnabled( FALSE );
@@ -215,7 +215,7 @@ namespace KBibTeX
{
if ( mergeOnly )
{
- for ( QValueList<BibTeX::Element*>::ConstIterator eit = newFile->constBegin(); eit != newFile->constEnd(); ++eit )
+ for ( TQValueList<BibTeX::Element*>::ConstIterator eit = newFile->constBegin(); eit != newFile->constEnd(); ++eit )
m_bibtexfile->appendElement(( *eit )->clone() );
if ( KMessageBox::questionYesNo( this, i18n( "Do you want to search for duplicates in the merged document?" ), i18n( "Find duplicates?" ), KGuiItem( i18n( "Find Duplicates" ) ) ) == KMessageBox::Yes )
@@ -253,7 +253,7 @@ namespace KBibTeX
return result;
}
- bool DocumentWidget::save( const QString &fileName, QStringList *errorLog )
+ bool DocumentWidget::save( const TQString &fileName, TQStringList *errorLog )
{
bool result = FALSE;
m_dirWatch.removeFile( m_filename );
@@ -276,9 +276,9 @@ namespace KBibTeX
format = BibTeX::File::formatPS;
else if ( fileName.endsWith( ".xml", FALSE ) )
{
- QStringList options = QStringList::split( '|', ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable ? "DocBook5|MODS|internal XML" : "DocBook5|internal XML" ) );
+ TQStringList options = TQStringList::split( '|', ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable ? "DocBook5|MODS|internal XML" : "DocBook5|internal XML" ) );
bool ok = false;
- QString answer = KInputDialog::getItem( i18n( "Choose file format" ), QString( i18n( "Choose file format of file '%1':" ) ).arg( fileName ), options, 0, false, &ok, this );
+ TQString answer = KInputDialog::getItem( i18n( "Choose file format" ), TQString( i18n( "Choose file format of file '%1':" ) ).arg( fileName ), options, 0, false, &ok, this );
if ( ok && !answer.isNull() && answer == "DocBook5" )
format = BibTeX::File::formatDocBook5;
else if ( ok && !answer.isNull() && answer == "MODS" )
@@ -291,14 +291,14 @@ namespace KBibTeX
if ( format != BibTeX::File::formatUndefined )
{
- QString usedFileName = fileName;
- QFileInfo fi( fileName );
- if ( !fi.readLink().isNull() && KMessageBox::questionYesNo( this, QString( i18n( "The selected filename \"%1\" is a symbolic link pointing to \"%2\".\nReplace the link with a new file or overwrite the existing file the link points to?" ) ).arg( usedFileName ).arg( Settings::resolveLink( fileName, fi.readLink() ) ), i18n( "Symbolic Link" ), KGuiItem( i18n( "Replace link" ) ), KGuiItem( i18n( "Overwrite file the link points to" ) ) ) == KMessageBox::No )
+ TQString usedFileName = fileName;
+ TQFileInfo fi( fileName );
+ if ( !fi.readLink().isNull() && KMessageBox::questionYesNo( this, TQString( i18n( "The selected filename \"%1\" is a symbolic link pointing to \"%2\".\nReplace the link with a new file or overwrite the existing file the link points to?" ) ).arg( usedFileName ).arg( Settings::resolveLink( fileName, fi.readLink() ) ), i18n( "Symbolic Link" ), KGuiItem( i18n( "Replace link" ) ), KGuiItem( i18n( "Overwrite file the link points to" ) ) ) == KMessageBox::No )
usedFileName = Settings::resolveLink( fileName, fi.readLink() );
- QFile file( usedFileName );
+ TQFile file( usedFileName );
if ( file.open( IO_WriteOnly ) )
{
- result = save( &file, format, QString( i18n( "<qt>Writing file <b>%1</b></qt>" ) ).arg( fileName ), errorLog );
+ result = save( &file, format, TQString( i18n( "<qt>Writing file <b>%1</b></qt>" ) ).arg( fileName ), errorLog );
if ( result )
{
m_bibtexfile->fileName = fileName;
@@ -316,7 +316,7 @@ namespace KBibTeX
return result;
}
- bool DocumentWidget::save( QIODevice *iodevice, BibTeX::File::FileFormat format, const QString &label, QStringList *errorLog )
+ bool DocumentWidget::save( TQIODevice *iodevice, BibTeX::File::FileFormat format, const TQString &label, TQStringList *errorLog )
{
Settings * settings = Settings::self( m_bibtexfile );
@@ -363,7 +363,7 @@ namespace KBibTeX
case BibTeX::FileExporterExternal::exporterXSLT:
{
KStandardDirs * kstd = KGlobal::dirs();
- QString resPath = kstd->findResource( "data", "kbibtexpart/xslt/html.xsl" );
+ TQString resPath = kstd->findResource( "data", "kbibtexpart/xslt/html.xsl" );
if ( resPath != NULL )
transform = new BibTeX::XSLTransform( resPath );
@@ -385,7 +385,7 @@ namespace KBibTeX
{
if ( !settings->external_latex2rtfAvailable )
{
- QString msg = i18n( "To export a BibTeX document to the Rich Text Format (RTF) KBibTeX requires the program 'latex2rtf'." ) ;
+ TQString msg = i18n( "To export a BibTeX document to the Rich Text Format (RTF) KBibTeX requires the program 'latex2rtf'." ) ;
KMessageBox::information( this, msg );
errorLog->append( msg );
}
@@ -400,9 +400,9 @@ namespace KBibTeX
break;
case BibTeX::File::formatDocBook5:
{
- if ( settings->fileIO_bib2db5ClassPath == QString::null )
+ if ( settings->fileIO_bib2db5ClassPath == TQString::null )
{
- QString msg = i18n( "To export a BibTeX document to the DocBook5 format KBibTeX requires the program 'bib2db5'." ) ;
+ TQString msg = i18n( "To export a BibTeX document to the DocBook5 format KBibTeX requires the program 'bib2db5'." ) ;
KMessageBox::information( this, msg );
errorLog->append( msg );
}
@@ -424,10 +424,10 @@ namespace KBibTeX
BibTeX::FileExporterPDF *pdfExporter = new BibTeX::FileExporterPDF( settings->fileIO_EmbedFiles );
pdfExporter->setLaTeXLanguage( settings->fileIO_ExportLanguage );
pdfExporter->setLaTeXBibliographyStyle( settings->fileIO_ExportBibliographyStyle );
- QStringList searchPaths;
- for ( QStringList::Iterator it = settings->editing_DocumentSearchPaths.begin(); it != settings->editing_DocumentSearchPaths.end(); ++it )
+ TQStringList searchPaths;
+ for ( TQStringList::Iterator it = settings->editing_DocumentSearchPaths.begin(); it != settings->editing_DocumentSearchPaths.end(); ++it )
searchPaths.append( *it );
- if ( m_bibtexfile->fileName != QString::null )
+ if ( m_bibtexfile->fileName != TQString::null )
searchPaths.append( KURL( m_bibtexfile->fileName ).directory( FALSE, FALSE ) );
pdfExporter->setDocumentSearchPaths( searchPaths );
exporter = pdfExporter;
@@ -460,7 +460,7 @@ namespace KBibTeX
return result;
}
- bool DocumentWidget::newElement( const QString& elementType )
+ bool DocumentWidget::newElement( const TQString& elementType )
{
Settings * settings = Settings::self( m_bibtexfile );
@@ -468,9 +468,9 @@ namespace KBibTeX
{
if ( elementType.lower() == "macro" )
{
- QString name = QString( i18n( "May only contain ASCII characters, in case of doubt keep English form", "NewMacro%1" ) ).arg( m_newElementCounter++ );
+ TQString name = TQString( i18n( "May only contain ASCII characters, in case of doubt keep English form", "NewMacro%1" ) ).arg( m_newElementCounter++ );
BibTeX::Macro *macro = new BibTeX::Macro( name );
- if ( MacroWidget::execute( macro, m_isReadOnly ) == QDialog::Accepted )
+ if ( MacroWidget::execute( macro, m_isReadOnly ) == TQDialog::Accepted )
{
new DocumentListViewItem( m_bibtexfile, macro, m_listViewElements );
m_bibtexfile->appendElement( macro );
@@ -487,7 +487,7 @@ namespace KBibTeX
else if ( elementType.lower() == "comment" )
{
BibTeX::Comment * comment = new BibTeX::Comment( i18n( "Put your comment here..." ) );
- if ( CommentWidget::execute( comment, m_isReadOnly ) == QDialog::Accepted )
+ if ( CommentWidget::execute( comment, m_isReadOnly ) == TQDialog::Accepted )
{
new DocumentListViewItem( m_bibtexfile, comment, m_listViewElements );
m_bibtexfile->appendElement( comment );
@@ -502,7 +502,7 @@ namespace KBibTeX
else if ( elementType.lower() == "preamble" )
{
BibTeX::Preamble * preamble = new BibTeX::Preamble( );
- if ( PreambleWidget::execute( preamble, m_isReadOnly ) == QDialog::Accepted )
+ if ( PreambleWidget::execute( preamble, m_isReadOnly ) == TQDialog::Accepted )
{
new DocumentListViewItem( m_bibtexfile, preamble, m_listViewElements );
m_bibtexfile->appendElement( preamble );
@@ -516,10 +516,10 @@ namespace KBibTeX
}
else
{
- QString name = nextNewEntry();
+ TQString name = nextNewEntry();
BibTeX::Entry *entry = new BibTeX::Entry( elementType, name );
m_dirWatch.stopScan();
- if ( EntryWidget::execute( entry, m_bibtexfile, m_isReadOnly, TRUE ) == QDialog::Accepted )
+ if ( EntryWidget::execute( entry, m_bibtexfile, m_isReadOnly, TRUE ) == TQDialog::Accepted )
{
new DocumentListViewItem( m_bibtexfile, entry, m_listViewElements );
m_bibtexfile->appendElement( entry );
@@ -540,8 +540,8 @@ namespace KBibTeX
{
if ( elementType.lower() == "macro" )
{
- QString name = QString( i18n( "May only contain ASCII characters, in case of doubt keep English form", "NewString%1" ) ).arg( m_newElementCounter++ );
- m_sourceView->insertLines( QString( "@string{ %1 = \"%2\" }" ).arg( name ).arg( i18n( "No text yet" ) ) );
+ TQString name = TQString( i18n( "May only contain ASCII characters, in case of doubt keep English form", "NewString%1" ) ).arg( m_newElementCounter++ );
+ m_sourceView->insertLines( TQString( "@string{ %1 = \"%2\" }" ).arg( name ).arg( i18n( "No text yet" ) ) );
}
else if ( elementType.lower() == "comment" )
{
@@ -553,7 +553,7 @@ namespace KBibTeX
}
else
{
- QString name = nextNewEntry();
+ TQString name = nextNewEntry();
BibTeX::Entry *entry = new BibTeX::Entry( elementType, name );
for ( int t = 0; t < 2; t++ )
@@ -573,7 +573,7 @@ namespace KBibTeX
}
BibTeX::FileExporter * exporter = new BibTeX::FileExporterBibTeX( );
- QBuffer buffer;
+ TQBuffer buffer;
buffer.open( IO_WriteOnly );
bool result = exporter->save( &buffer, entry );
buffer.close();
@@ -581,12 +581,12 @@ namespace KBibTeX
if ( result )
{
buffer.open( IO_ReadOnly );
- QTextStream textStream( &buffer );
- textStream.setEncoding( QTextStream::UnicodeUTF8 );
- QString text = textStream.read();
+ TQTextStream textStream( &buffer );
+ textStream.setEncoding( TQTextStream::UnicodeUTF8 );
+ TQString text = textStream.read();
buffer.close();
- QStringList lines = QStringList::split( '\n', text );
- for ( QStringList::Iterator it = lines.begin(); it != lines.end(); ++it )
+ TQStringList lines = TQStringList::split( '\n', text );
+ for ( TQStringList::Iterator it = lines.begin(); it != lines.end(); ++it )
m_sourceView->insertLines( *it );
}
@@ -656,7 +656,7 @@ namespace KBibTeX
BibTeX::Element * currentElement = NULL;
- QListViewItem * item = m_listViewElements->selectedItem();
+ TQListViewItem * item = m_listViewElements->selectedItem();
if ( item == NULL )
item = m_listViewElements->currentItem();
DocumentListViewItem * dlvi = dynamic_cast<DocumentListViewItem*>( item );
@@ -675,7 +675,7 @@ namespace KBibTeX
{
for ( KURL::List::Iterator i = documentURLs.begin(); i != documentURLs.end(); ++i )
{
- QString prettyURL = ( *i ).prettyURL();
+ TQString prettyURL = ( *i ).prettyURL();
if ( prettyURL.endsWith( ".pdf", FALSE ) || prettyURL.find( "/pdf/" ) > 0 )
popup->insertItem( SmallIcon( "pdf" ), prettyURL );
else if ( prettyURL.endsWith( ".ps", FALSE ) )
@@ -702,14 +702,14 @@ namespace KBibTeX
KPopupMenu * popup = m_assignKeywordsActionMenu->popupMenu();
popup->clear();
m_assignKeywordsActionMenuURLs.clear();
- QStringList entryKeywords;
- QStringList fileKeywords;
+ TQStringList entryKeywords;
+ TQStringList fileKeywords;
/**
* Fetch keywords from selected entries into entryKeywords list
*/
- QValueList<BibTeX::Entry*> entryList;
- for ( QListViewItemIterator it( m_listViewElements, QListViewItemIterator::Selected ); it.current(); ++it )
+ TQValueList<BibTeX::Entry*> entryList;
+ for ( TQListViewItemIterator it( m_listViewElements, TQListViewItemIterator::Selected ); it.current(); ++it )
{
BibTeX::Element * currentElement = NULL;
DocumentListViewItem * dlvi = dynamic_cast<DocumentListViewItem*>( it.current() );
@@ -721,17 +721,17 @@ namespace KBibTeX
}
}
- for ( QValueList<BibTeX::Entry*>::Iterator it = entryList.begin(); it != entryList.end(); ++it )
+ for ( TQValueList<BibTeX::Entry*>::Iterator it = entryList.begin(); it != entryList.end(); ++it )
{
BibTeX::Entry *entry = *it;
BibTeX::EntryField *field = NULL;
BibTeX::Value *valueKeywords = NULL;
if (( field = entry->getField( BibTeX::EntryField::ftKeywords ) ) != NULL && ( valueKeywords = field->value() ) != NULL )
- for ( QValueList<BibTeX::ValueItem*>::ConstIterator it = valueKeywords->items.begin();it != valueKeywords->items.end();++it )
+ for ( TQValueList<BibTeX::ValueItem*>::ConstIterator it = valueKeywords->items.begin();it != valueKeywords->items.end();++it )
{
BibTeX::KeywordContainer *container = dynamic_cast<BibTeX::KeywordContainer*>( *it );
if ( container != NULL )
- for ( QValueList<BibTeX::Keyword*>::ConstIterator kit = container->keywords.begin();kit != container->keywords.end();++kit )
+ for ( TQValueList<BibTeX::Keyword*>::ConstIterator kit = container->keywords.begin();kit != container->keywords.end();++kit )
entryKeywords.append(( *kit )->text() );
}
}
@@ -739,19 +739,19 @@ namespace KBibTeX
/**
* Fetch all keywords from current file into fileKeywords
*/
- for ( QValueList<BibTeX::Element*>::ConstIterator eit = m_bibtexfile->constBegin(); eit != m_bibtexfile->constEnd(); ++eit )
+ for ( TQValueList<BibTeX::Element*>::ConstIterator eit = m_bibtexfile->constBegin(); eit != m_bibtexfile->constEnd(); ++eit )
{
BibTeX::Entry *entry = dynamic_cast<BibTeX::Entry*>( *eit );
BibTeX::EntryField *field = NULL;
BibTeX::Value *value = NULL;
if ( entry != NULL && (( field = entry->getField( BibTeX::EntryField::ftKeywords ) ) != NULL ) && (( value = field->value() ) != NULL ) )
{
- for ( QValueList<BibTeX::ValueItem*>::ConstIterator vit = value->items.constBegin(); vit != value->items.constEnd();++vit )
+ for ( TQValueList<BibTeX::ValueItem*>::ConstIterator vit = value->items.constBegin(); vit != value->items.constEnd();++vit )
{
BibTeX::KeywordContainer *container = dynamic_cast<BibTeX::KeywordContainer *>( *vit );
- for ( QValueList<BibTeX::Keyword*>::ConstIterator kit = container->keywords.constBegin(); kit != container->keywords.constEnd();++kit )
+ for ( TQValueList<BibTeX::Keyword*>::ConstIterator kit = container->keywords.constBegin(); kit != container->keywords.constEnd();++kit )
{
- QString text = ( *kit )->text();
+ TQString text = ( *kit )->text();
if ( !fileKeywords.contains( text ) )
fileKeywords.append( text );
}
@@ -763,8 +763,8 @@ namespace KBibTeX
* Merge keyword lists
*/
Settings * settings = Settings::self( m_bibtexfile );
- QStringList allKeywords = QStringList( fileKeywords );
- for ( QStringList::Iterator it = settings->keyword_GlobalList.begin(); it != settings->keyword_GlobalList.end(); ++it )
+ TQStringList allKeywords = TQStringList( fileKeywords );
+ for ( TQStringList::Iterator it = settings->keyword_GlobalList.begin(); it != settings->keyword_GlobalList.end(); ++it )
if ( !allKeywords.contains( *it ) )
allKeywords.append( *it );
allKeywords.sort();
@@ -777,7 +777,7 @@ namespace KBibTeX
popupEmpty = TRUE;
else if ( allKeywords.count() < 24 )
{
- for ( QStringList::Iterator it = allKeywords.begin(); it != allKeywords.end(); ++it )
+ for ( TQStringList::Iterator it = allKeywords.begin(); it != allKeywords.end(); ++it )
{
int i = popup->insertItem( *it );
popup->setItemChecked( i, entryKeywords.contains( *it ) );
@@ -790,8 +790,8 @@ namespace KBibTeX
int countPerSubMenu = 0;
KPopupMenu *subMenu = new KPopupMenu( popup );
connect( subMenu, SIGNAL( activated( int ) ), this, SLOT( slotAssignKeywords( int ) ) );
- QString startWord, endWord;
- for ( QStringList::Iterator it = allKeywords.begin(); it != allKeywords.end(); ++it )
+ TQString startWord, endWord;
+ for ( TQStringList::Iterator it = allKeywords.begin(); it != allKeywords.end(); ++it )
{
if ( countPerSubMenu == 0 )
startWord = *it;
@@ -803,7 +803,7 @@ namespace KBibTeX
++countPerSubMenu;
if ( countPerSubMenu >= maxCountPerSubMenu )
{
- popup->insertItem( QString( i18n( "%1 ... %2" ) ).arg( startWord ).arg( endWord ), subMenu );
+ popup->insertItem( TQString( i18n( "%1 ... %2" ) ).arg( startWord ).arg( endWord ), subMenu );
subMenu = new KPopupMenu( popup );
connect( subMenu, SIGNAL( activated( int ) ), this, SLOT( slotAssignKeywords( int ) ) );
countPerSubMenu = 0;
@@ -812,7 +812,7 @@ namespace KBibTeX
if ( countPerSubMenu > 0 )
{
- popup->insertItem( QString( i18n( "%1 ... %2" ) ).arg( startWord ).arg( endWord ), subMenu );
+ popup->insertItem( TQString( i18n( "%1 ... %2" ) ).arg( startWord ).arg( endWord ), subMenu );
}
else
delete subMenu;
@@ -821,16 +821,16 @@ namespace KBibTeX
if ( !popupEmpty )
popup->insertSeparator();
- QWidget *container = new QWidget( popup );
+ TQWidget *container = new TQWidget( popup );
container->setBackgroundColor( KGlobalSettings::baseColor() );
- QHBoxLayout *layout = new QHBoxLayout( container, 1, 1 );
- QLabel *label = new QLabel( i18n( "New keyword:" ), container );
+ TQHBoxLayout *layout = new TQHBoxLayout( container, 1, 1 );
+ TQLabel *label = new TQLabel( i18n( "New keyword:" ), container );
label->setBackgroundColor( KGlobalSettings::baseColor() );
layout->addWidget( label );
m_lineEditNewKeyword = new KLineEdit( container );
layout->addWidget( m_lineEditNewKeyword );
container->setFocusProxy( m_lineEditNewKeyword );
- container->setFocusPolicy( QWidget::ClickFocus );
+ container->setFocusPolicy( TQWidget::ClickFocus );
popup->insertItem( container );
connect( m_lineEditNewKeyword, SIGNAL( returnPressed() ), this, SLOT( slotAddKeyword() ) );
@@ -864,7 +864,7 @@ namespace KBibTeX
KPopupMenu * popup = m_searchWebsitesActionMenu->popupMenu();
popup->clear();
int i = 0;
- for ( QValueList<Settings::SearchURL*>::ConstIterator it = settings->searchURLs.begin(); it != settings->searchURLs.end(); ++it )
+ for ( TQValueList<Settings::SearchURL*>::ConstIterator it = settings->searchURLs.begin(); it != settings->searchURLs.end(); ++it )
popup->insertItem(( *it ) ->description, ++i );
}
@@ -886,20 +886,20 @@ namespace KBibTeX
if ( entry != NULL )
{
/** prefer local urls over remote urls, so first check for file:// and use other protocols only if no file:// was found */
- QString protocol = "file";
+ TQString protocol = "file";
KURL::List urls = getEntryURLs( entry );
KURL selected = KURL();
- while ( !selected.isValid() && protocol != QString::null )
+ while ( !selected.isValid() && protocol != TQString::null )
{
for ( KURL::List::Iterator it = urls.begin(); !selected.isValid() && it != urls.end(); ++it )
{
KURL url = *it;
- if ( url.isValid() && ( !url.isLocalFile() || QFile::exists( url.path() ) ) && url.protocol().startsWith( protocol ) )
+ if ( url.isValid() && ( !url.isLocalFile() || TQFile::exists( url.path() ) ) && url.protocol().startsWith( protocol ) )
selected = url;
}
/** little trick setting protocol prefix in the first round to "file://", then to "", and setting to null to quit the loop */
if ( !protocol.isEmpty() ) protocol = "";
- else protocol = QString::null;
+ else protocol = TQString::null;
}
if ( selected.isValid() )
@@ -914,7 +914,7 @@ namespace KBibTeX
bool DocumentWidget::editElement()
{
bool result = false;
- QListViewItem * item = m_listViewElements->selectedItem();
+ TQListViewItem * item = m_listViewElements->selectedItem();
if ( item == NULL )
item = m_listViewElements->currentItem();
DocumentListViewItem * dlvi = dynamic_cast<DocumentListViewItem*>( item );
@@ -950,7 +950,7 @@ namespace KBibTeX
bool DocumentWidget::editElementDialog( BibTeX::Element *element )
{
- QDialog::DialogCode dialogResult = QDialog::Rejected;
+ TQDialog::DialogCode dialogResult = TQDialog::Rejected;
BibTeX::Entry * entry = dynamic_cast<BibTeX::Entry*>( element );
if ( entry )
dialogResult = KBibTeX::EntryWidget::execute( entry, m_bibtexfile, m_isReadOnly, FALSE );
@@ -973,10 +973,10 @@ namespace KBibTeX
}
}
- if ( dialogResult == QDialog::Accepted )
+ if ( dialogResult == TQDialog::Accepted )
slotModified();
- return dialogResult == QDialog::Accepted;
+ return dialogResult == TQDialog::Accepted;
}
void DocumentWidget::deleteElements()
@@ -995,19 +995,19 @@ namespace KBibTeX
{
if ( m_editMode == emList )
{
- QValueList<BibTeX::Element*> elements = m_listViewElements->selectedItems();
- QString genericMsg = i18n( "\n\nEither LyX is not running or has not been correctly configured to send references to." );
- QString title = i18n( "Error communicating with LyX" );
+ TQValueList<BibTeX::Element*> elements = m_listViewElements->selectedItems();
+ TQString genericMsg = i18n( "\n\nEither LyX is not running or has not been correctly configured to send references to." );
+ TQString title = i18n( "Error communicating with LyX" );
Settings * settings = Settings::self( m_bibtexfile );
- QString lyxPipeFilename = settings->detectLyXInPipe();
+ TQString lyxPipeFilename = settings->detectLyXInPipe();
kdDebug() << "sendSelectedToLyx: lyxPipeFilename= " << lyxPipeFilename << endl;
if ( lyxPipeFilename.isNull() )
KMessageBox::error( this, i18n( "Cannot determine how to send references to LyX." ).append( genericMsg ), title );
else
{
- QFile pipe( lyxPipeFilename );
+ TQFile pipe( lyxPipeFilename );
if ( !pipe.exists() )
KMessageBox::error( this, i18n( "The inpipe as configured in LyX does not exist." ).append( genericMsg ), title );
else
@@ -1016,15 +1016,15 @@ namespace KBibTeX
KMessageBox::error( this, i18n( "Cannot open the inpipe as configured in LyX." ).append( genericMsg ), title );
else
{
- QStringList refsToSend;
- for ( QValueList<BibTeX::Element*>::Iterator it = elements.begin(); it != elements.end(); ++it )
+ TQStringList refsToSend;
+ for ( TQValueList<BibTeX::Element*>::Iterator it = elements.begin(); it != elements.end(); ++it )
{
BibTeX::Entry *entry = dynamic_cast<BibTeX::Entry*>( *it );
if ( entry != NULL ) refsToSend.append( entry->id() );
}
- QTextStream * writer = new QTextStream( &pipe );
- QString msg = "LYXCMD:kbibtex:citation-insert:" + refsToSend.join( "," );
+ TQTextStream * writer = new TQTextStream( &pipe );
+ TQString msg = "LYXCMD:kbibtex:citation-insert:" + refsToSend.join( "," );
*writer << msg << endl;
delete writer;
pipe.close();
@@ -1133,29 +1133,29 @@ namespace KBibTeX
if ( m_progressDialog != NULL )
{
m_progressDialog->setProgress( current, total );
- qApp->processEvents();
+ tqApp->processEvents();
}
}
- void DocumentWidget::startProgress( const QString & label, QObject * progressFrom )
+ void DocumentWidget::startProgress( const TQString & label, TQObject * progressFrom )
{
- m_progressDialog = new QProgressDialog( this );
+ m_progressDialog = new TQProgressDialog( this );
m_progressDialog->setLabelText( label );
connect( progressFrom, SIGNAL( progress( int, int ) ), this, SLOT( slotShowProgress( int, int ) ) );
connect( m_progressDialog, SIGNAL( canceled() ), progressFrom, SLOT( cancel( ) ) );
- QApplication::setOverrideCursor( Qt::waitCursor );
+ TQApplication::setOverrideCursor( TQt::waitCursor );
}
- void DocumentWidget::endProgress( QObject * progressFrom )
+ void DocumentWidget::endProgress( TQObject * progressFrom )
{
disconnect( progressFrom, SIGNAL( progress( int, int ) ), this, SLOT( slotShowProgress( int, int ) ) );
disconnect( m_progressDialog, SIGNAL( canceled() ), progressFrom, SLOT( cancel( ) ) );
delete m_progressDialog;
m_progressDialog = NULL;
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
- void DocumentWidget::searchWebsites( const QString& searchURL, bool includeAuthor )
+ void DocumentWidget::searchWebsites( const TQString& searchURL, bool includeAuthor )
{
DocumentListViewItem * item = dynamic_cast<DocumentListViewItem*>( m_listViewElements->selectedItem() );
if ( item == NULL )
@@ -1165,9 +1165,9 @@ namespace KBibTeX
searchWebsites( item->element(), searchURL, includeAuthor );
}
- void DocumentWidget::searchWebsites( BibTeX::Element * element, const QString& searchURL, bool includeAuthor )
+ void DocumentWidget::searchWebsites( BibTeX::Element * element, const TQString& searchURL, bool includeAuthor )
{
- QString queryString = QString::null;
+ TQString queryString = TQString::null;
BibTeX::Entry* entry = dynamic_cast<BibTeX::Entry*>( element );
if ( entry != NULL )
@@ -1183,8 +1183,8 @@ namespace KBibTeX
BibTeX::PersonContainer *personContainer = dynamic_cast<BibTeX::PersonContainer*>( field->value()->items.first() );
if ( personContainer != NULL )
{
- QValueList<BibTeX::Person*> list = personContainer->persons;
- for ( QValueList<BibTeX::Person*>::ConstIterator it = list.begin(); it != list.end(); ++it )
+ TQValueList<BibTeX::Person*> list = personContainer->persons;
+ for ( TQValueList<BibTeX::Person*>::ConstIterator it = list.begin(); it != list.end(); ++it )
queryString = queryString.append( " " ).append(( *it )->lastName() );
}
@@ -1206,10 +1206,10 @@ namespace KBibTeX
}
}
- if ( queryString != QString::null )
+ if ( queryString != TQString::null )
{
queryString = queryString.stripWhiteSpace().replace( '$', "" ).replace( "%", "%25" ).replace( "+", "%2B" ).replace( " ", "%20" ).replace( "#", "%23" ).replace( "&", "%26" ).replace( "?", "%3F" ).replace( '{', "" ).replace( '}', "" );
- KURL url( QString( searchURL ).arg( queryString ) );
+ KURL url( TQString( searchURL ).arg( queryString ) );
Settings::openUrl( url, this );
}
}
@@ -1219,30 +1219,30 @@ namespace KBibTeX
if ( !m_isReadOnly )
{
BibTeX::FileExporter * exporter = new BibTeX::FileExporterBibTeX( );
- QValueList<BibTeX::Entry*> list;
- if ( WebQueryWizard::execute( this, list ) == QDialog::Accepted )
+ TQValueList<BibTeX::Entry*> list;
+ if ( WebQueryWizard::execute( this, list ) == TQDialog::Accepted )
{
Settings * settings = Settings::self( m_bibtexfile );
- for ( QValueList<BibTeX::Entry*>::Iterator it = list.begin(); it != list.end(); ++it )
+ for ( TQValueList<BibTeX::Entry*>::Iterator it = list.begin(); it != list.end(); ++it )
{
( *it )->setId( IdSuggestions::resolveConflict( m_bibtexfile, ( *it )->id() ) );
if ( m_editMode == emList )
m_listViewElements->insertItem( new BibTeX::Entry( *it ) );
else
{
- QBuffer buffer;
+ TQBuffer buffer;
buffer.open( IO_WriteOnly );
bool result = exporter->save( &buffer, *it );
buffer.close();
if ( result )
{
buffer.open( IO_ReadOnly );
- QTextStream textStream( &buffer );
- textStream.setEncoding( QTextStream::UnicodeUTF8 );
- QString text = textStream.read();
+ TQTextStream textStream( &buffer );
+ textStream.setEncoding( TQTextStream::UnicodeUTF8 );
+ TQString text = textStream.read();
buffer.close();
- QStringList lines = QStringList::split( '\n', text );
- for ( QStringList::Iterator it = lines.begin(); it != lines.end(); ++it )
+ TQStringList lines = TQStringList::split( '\n', text );
+ for ( TQStringList::Iterator it = lines.begin(); it != lines.end(); ++it )
m_sourceView->insertLines( *it );
m_sourceView->insertLines( "" );
}
@@ -1260,7 +1260,7 @@ namespace KBibTeX
void DocumentWidget::findDuplicates()
{
MergeElements *me = new MergeElements( this );
- if ( me->mergeDuplicates( m_bibtexfile ) == QDialog::Accepted )
+ if ( me->mergeDuplicates( m_bibtexfile ) == TQDialog::Accepted )
{
refreshBibTeXFile();
slotModified();
@@ -1283,14 +1283,14 @@ namespace KBibTeX
}
}
- QString DocumentWidget::nextNewEntry()
+ TQString DocumentWidget::nextNewEntry()
{
- QString name = QString( i18n( "May only contain ASCII characters, in case of doubt keep English form", "NewEntry%1" ) ).arg( m_newElementCounter++ );
+ TQString name = TQString( i18n( "May only contain ASCII characters, in case of doubt keep English form", "NewEntry%1" ) ).arg( m_newElementCounter++ );
while ( m_bibtexfile->containsKey( name ) != NULL )
{
++m_newElementCounter;
- name = QString( i18n( "May only contain ASCII characters, in case of doubt keep English form", "NewEntry%1" ) ).arg( m_newElementCounter++ );
+ name = TQString( i18n( "May only contain ASCII characters, in case of doubt keep English form", "NewEntry%1" ) ).arg( m_newElementCounter++ );
}
return name;
@@ -1298,10 +1298,10 @@ namespace KBibTeX
KURL::List DocumentWidget::getEntryURLs( BibTeX::Entry *entry )
{
- QStringList urls = entry->urls();
+ TQStringList urls = entry->urls();
KURL::List result;
- for ( QStringList::Iterator it = urls.begin(); it != urls.end(); ++it )
+ for ( TQStringList::Iterator it = urls.begin(); it != urls.end(); ++it )
{
KURL url = Settings::locateFile( *it, m_bibtexfile->fileName, this );
if ( url.isValid() )
@@ -1314,7 +1314,7 @@ namespace KBibTeX
void DocumentWidget::slotSelectionChanged()
{
int numSelected = 0;
- QListViewItemIterator it( m_listViewElements, QListViewItemIterator::Selected );
+ TQListViewItemIterator it( m_listViewElements, TQListViewItemIterator::Selected );
while ( it.current() && numSelected < 3 )
{
numSelected++;
@@ -1324,7 +1324,7 @@ namespace KBibTeX
emit listViewSelectionChanged( numSelected );
}
- BibTeX::FileImporter *DocumentWidget::fileImporterFactory( const QString &fileName )
+ BibTeX::FileImporter *DocumentWidget::fileImporterFactory( const TQString &fileName )
{
Settings * settings = Settings::self( NULL );
BibTeX::FileImporter * importer = NULL;
@@ -1340,9 +1340,9 @@ namespace KBibTeX
format = BibTeX::File::formatRIS;
else if ( fileName.endsWith( ".xml", FALSE ) )
{
- QStringList options = QStringList::split( '|', ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable ? "MODS|EndNote XML|internal XML" : "internal XML" ) );
+ TQStringList options = TQStringList::split( '|', ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable ? "MODS|EndNote XML|internal XML" : "internal XML" ) );
bool ok = false;
- QString answer = KInputDialog::getItem( i18n( "Choose file format" ), QString( i18n( "Choose file format of file '%1':" ) ).arg( fileName ), options, 0, false, &ok, this );
+ TQString answer = KInputDialog::getItem( i18n( "Choose file format" ), TQString( i18n( "Choose file format of file '%1':" ) ).arg( fileName ), options, 0, false, &ok, this );
if ( ok && !answer.isNull() && answer == "DocBook5" )
format = BibTeX::File::formatDocBook5;
else if ( ok && !answer.isNull() && answer == "MODS" )
@@ -1354,9 +1354,9 @@ namespace KBibTeX
}
else
{
- QStringList options = QStringList::split( '|', ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable ? "BibTeX|EndNote|ISI|RIS" : "BibTeX|RIS" ) );
+ TQStringList options = TQStringList::split( '|', ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable ? "BibTeX|EndNote|ISI|RIS" : "BibTeX|RIS" ) );
bool ok = false;
- QString answer = KInputDialog::getItem( i18n( "Choose file format" ), QString( i18n( "Choose file format of file '%1':" ) ).arg( fileName ), options, 0, false, &ok, this );
+ TQString answer = KInputDialog::getItem( i18n( "Choose file format" ), TQString( i18n( "Choose file format of file '%1':" ) ).arg( fileName ), options, 0, false, &ok, this );
if ( ok && !answer.isNull() && answer == "BibTeX" )
format = BibTeX::File::formatBibTeX;
else if ( ok && !answer.isNull() && answer == "EndNote" )
@@ -1395,7 +1395,7 @@ namespace KBibTeX
break;
default:
{
- KMessageBox::sorry( this, QString( i18n( "The file '%1' does not contain a known type of bibliography." ) ).arg( fileName ), i18n( "Unknown file format" ) );
+ KMessageBox::sorry( this, TQString( i18n( "The file '%1' does not contain a known type of bibliography." ) ).arg( fileName ), i18n( "Unknown file format" ) );
}
}
}
@@ -1403,7 +1403,7 @@ namespace KBibTeX
return importer;
}
- void DocumentWidget::slotPreviewElement( QListViewItem * item )
+ void DocumentWidget::slotPreviewElement( TQListViewItem * item )
{
if ( item == NULL )
item = m_listViewElements->selectedItem();
@@ -1425,7 +1425,7 @@ namespace KBibTeX
if ( transform != NULL )
{
BibTeX::FileExporterXSLT * exporter = new BibTeX::FileExporterXSLT( transform );
- QBuffer buffer;
+ TQBuffer buffer;
buffer.open( IO_WriteOnly );
bool result = exporter->save( &buffer, currentElement );
buffer.close();
@@ -1433,11 +1433,11 @@ namespace KBibTeX
if ( result )
{
buffer.open( IO_ReadOnly );
- QTextStream htmlTS( &buffer );
- htmlTS.setEncoding( QTextStream::UnicodeUTF8 );
- QString htmlText = htmlTS.read();
+ TQTextStream htmlTS( &buffer );
+ htmlTS.setEncoding( TQTextStream::UnicodeUTF8 );
+ TQString htmlText = htmlTS.read();
buffer.close();
- QString text = htmlText.remove( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" ).append( "</qt>" ).prepend( "<qt>" ).replace( QRegExp( "\\\\emph\\{([^}]+)\\}" ), "<em>\\1</em>" ).replace( QRegExp( "\\\\[A-Za-z0-9]+" ), "" ).replace( '{', "" ).replace( '}', "" );
+ TQString text = htmlText.remove( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" ).append( "</qt>" ).prepend( "<qt>" ).replace( TQRegExp( "\\\\emph\\{([^}]+)\\}" ), "<em>\\1</em>" ).replace( TQRegExp( "\\\\[A-Za-z0-9]+" ), "" ).replace( '{', "" ).replace( '}', "" );
m_preview->setText( text );
}
else
@@ -1457,10 +1457,10 @@ namespace KBibTeX
}
}
- void DocumentWidget::slotTabChanged( QWidget *tab )
+ void DocumentWidget::slotTabChanged( TQWidget *tab )
{
setEnabled( FALSE );
- QApplication::setOverrideCursor( Qt::waitCursor );
+ TQApplication::setOverrideCursor( TQt::waitCursor );
BibTeX::File *bibTeXFile = NULL;
if ( m_editMode == emSource )
@@ -1526,7 +1526,7 @@ namespace KBibTeX
if ( m_actionEditCopyRef )
m_actionEditCopyRef->setEnabled( m_editMode == emList );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
emit undoChanged( m_editMode == emSource );
}
@@ -1540,18 +1540,18 @@ namespace KBibTeX
}
}
- void DocumentWidget::slotFileGotDirty( const QString& path )
+ void DocumentWidget::slotFileGotDirty( const TQString& path )
{
if ( path == m_filename )
{
m_dirWatch.removeFile( m_filename );
- QTimer::singleShot( 100, this, SLOT( slotRefreshDirtyFile( ) ) );
+ TQTimer::singleShot( 100, this, SLOT( slotRefreshDirtyFile( ) ) );
}
}
void DocumentWidget::slotRefreshDirtyFile()
{
- if ( KMessageBox::questionYesNo( this, QString( i18n( "File '%1' has been modified. Reload file to import changes or ignore changes?" ) ).arg( m_filename ), i18n( "Reload file?" ), KGuiItem( i18n( "Reload" ), "reload" ), KGuiItem( i18n( "Ignore" ), "ignore" ) ) == KMessageBox::Yes )
+ if ( KMessageBox::questionYesNo( this, TQString( i18n( "File '%1' has been modified. Reload file to import changes or ignore changes?" ) ).arg( m_filename ), i18n( "Reload file?" ), KGuiItem( i18n( "Reload" ), "reload" ), KGuiItem( i18n( "Ignore" ), "ignore" ) ) == KMessageBox::Yes )
open( m_filename, FALSE );
else
m_dirWatch.addFile( m_filename );
@@ -1564,7 +1564,7 @@ namespace KBibTeX
void DocumentWidget::slotViewFirstDocument()
{
- for ( QStringList::Iterator it = m_viewDocumentActionMenuURLs.begin(); it != m_viewDocumentActionMenuURLs.end(); ++it )
+ for ( TQStringList::Iterator it = m_viewDocumentActionMenuURLs.begin(); it != m_viewDocumentActionMenuURLs.end(); ++it )
if (( *it ).endsWith( ".pdf" ) || ( *it ).endsWith( ".ps" ) || ( *it ).endsWith( ".djv" ) )
{
Settings::openUrl( *it, this );
@@ -1574,7 +1574,7 @@ namespace KBibTeX
void DocumentWidget::slotViewFirstDocumentsOnlineRef()
{
- for ( QStringList::Iterator it = m_viewDocumentActionMenuURLs.begin(); it != m_viewDocumentActionMenuURLs.end(); ++it )
+ for ( TQStringList::Iterator it = m_viewDocumentActionMenuURLs.begin(); it != m_viewDocumentActionMenuURLs.end(); ++it )
if (( *it ).contains( "dx.doi.org" ) )
{
Settings::openUrl( *it, this );
@@ -1584,12 +1584,12 @@ namespace KBibTeX
void DocumentWidget::slotAssignKeywords( int id )
{
- QValueList<BibTeX::Entry*> entryList;
+ TQValueList<BibTeX::Entry*> entryList;
- QListViewItem * item = m_listViewElements->selectedItem();
+ TQListViewItem * item = m_listViewElements->selectedItem();
if ( item == NULL )
item = m_listViewElements->currentItem();
- for ( QListViewItemIterator it( m_listViewElements, QListViewItemIterator::Selected ); it.current(); ++it )
+ for ( TQListViewItemIterator it( m_listViewElements, TQListViewItemIterator::Selected ); it.current(); ++it )
{
BibTeX::Element * currentElement = NULL;
DocumentListViewItem * dlvi = dynamic_cast<DocumentListViewItem*>( it.current() );
@@ -1601,7 +1601,7 @@ namespace KBibTeX
}
}
- for ( QValueList<BibTeX::Entry*>::Iterator it = entryList.begin(); it != entryList.end(); ++it )
+ for ( TQValueList<BibTeX::Entry*>::Iterator it = entryList.begin(); it != entryList.end(); ++it )
{
BibTeX::Entry *entry = *it;
BibTeX::EntryField *field = NULL;
@@ -1630,10 +1630,10 @@ namespace KBibTeX
void DocumentWidget::slotAddKeyword()
{
- QString newKeyword = m_lineEditNewKeyword->text();
+ TQString newKeyword = m_lineEditNewKeyword->text();
- QValueList<BibTeX::Entry*> entryList;
- for ( QListViewItemIterator it( m_listViewElements, QListViewItemIterator::Selected ); it.current(); ++it )
+ TQValueList<BibTeX::Entry*> entryList;
+ for ( TQListViewItemIterator it( m_listViewElements, TQListViewItemIterator::Selected ); it.current(); ++it )
{
BibTeX::Element * currentElement = NULL;
DocumentListViewItem * dlvi = dynamic_cast<DocumentListViewItem*>( it.current() );
@@ -1645,7 +1645,7 @@ namespace KBibTeX
}
}
- for ( QValueList<BibTeX::Entry*>::Iterator it = entryList.begin(); it != entryList.end(); ++it )
+ for ( TQValueList<BibTeX::Entry*>::Iterator it = entryList.begin(); it != entryList.end(); ++it )
{
BibTeX::Entry *entry = *it;
BibTeX::EntryField *field = entry->getField( BibTeX::EntryField::ftKeywords );
@@ -1672,7 +1672,7 @@ namespace KBibTeX
if ( m_lineEditNewKeyword->isVisible() &&
m_lineEditNewKeyword->parentWidget() &&
m_lineEditNewKeyword->parentWidget()->parentWidget() &&
- m_lineEditNewKeyword->parentWidget()->parentWidget()->inherits( "QPopupMenu" ) )
+ m_lineEditNewKeyword->parentWidget()->parentWidget()->inherits( "TQPopupMenu" ) )
m_lineEditNewKeyword->parentWidget()->parentWidget()->close();
slotModified();
@@ -1682,9 +1682,9 @@ namespace KBibTeX
void DocumentWidget::slotNormalizeIds()
{
Settings * settings = Settings::self();
- QMap<BibTeX::Entry*, QString> entryToNewId;
- QMap<BibTeX::Entry*, DocumentListViewItem*> entryToItem;
- QStringList msgList;
+ TQMap<BibTeX::Entry*, TQString> entryToNewId;
+ TQMap<BibTeX::Entry*, DocumentListViewItem*> entryToItem;
+ TQStringList msgList;
if ( settings->idSuggestions_default < 0 )
{
@@ -1692,7 +1692,7 @@ namespace KBibTeX
return;
}
- for ( QListViewItemIterator it( m_listViewElements, QListViewItemIterator::Selected ); it.current(); ++it )
+ for ( TQListViewItemIterator it( m_listViewElements, TQListViewItemIterator::Selected ); it.current(); ++it )
{
BibTeX::Element * currentElement = NULL;
DocumentListViewItem * dlvi = dynamic_cast<DocumentListViewItem*>( it.current() );
@@ -1701,7 +1701,7 @@ namespace KBibTeX
BibTeX::Entry *entry = dynamic_cast<BibTeX::Entry*>( currentElement );
if ( entry != NULL )
{
- QString newEntryId = IdSuggestions::createDefaultSuggestion( m_bibtexfile, entry );
+ TQString newEntryId = IdSuggestions::createDefaultSuggestion( m_bibtexfile, entry );
entryToNewId[entry] = newEntryId;
entryToItem[entry] = dlvi;
msgList << "Replacing id of entry \"" + entry->id() + "\" with new id \"" + newEntryId + "\"";
@@ -1713,20 +1713,20 @@ namespace KBibTeX
KMessageBox::information( this, i18n( "No entries were selected." ) );
else if ( KMessageBox::questionYesNoList( this, i18n( "The following changes will be applied to the currently selected elements.\nConflicts with duplicate entry ids will be resolved when applying the new ids." ), msgList, i18n( "Normalize Entry Ids" ), KGuiItem( i18n( "Replace Entry Ids" ), "run" ), KGuiItem( i18n( "Cancel" ), "cancel" ) ) == KMessageBox::Yes )
{
- QApplication::setOverrideCursor( Qt::waitCursor );
- QMap<BibTeX::Entry*, DocumentListViewItem*>::Iterator itItem = entryToItem.begin();
- for ( QMap<BibTeX::Entry*, QString>::Iterator it = entryToNewId.begin(); it != entryToNewId.end(); ++it, ++itItem )
+ TQApplication::setOverrideCursor( TQt::waitCursor );
+ TQMap<BibTeX::Entry*, DocumentListViewItem*>::Iterator itItem = entryToItem.begin();
+ for ( TQMap<BibTeX::Entry*, TQString>::Iterator it = entryToNewId.begin(); it != entryToNewId.end(); ++it, ++itItem )
{
BibTeX::Entry *entry = it.key();
- QString newEntryId = it.data();
+ TQString newEntryId = it.data();
newEntryId = IdSuggestions::resolveConflict( m_bibtexfile, newEntryId, entry );
- qDebug( "Replacing id of entry \"%s\" with new id \"%s\"", entry->id().latin1(), newEntryId.latin1() );
+ tqDebug( "Replacing id of entry \"%s\" with new id \"%s\"", entry->id().latin1(), newEntryId.latin1() );
entry->setId( newEntryId );
itItem.data()->updateItem();
}
slotModified();
m_sideBar->refreshLists( m_bibtexfile );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
}
diff --git a/src/documentwidget.h b/src/documentwidget.h
index cc6e344..abdd570 100644
--- a/src/documentwidget.h
+++ b/src/documentwidget.h
@@ -20,7 +20,7 @@
#ifndef KBIBTEXDOCUMENTWIDGET_H
#define KBIBTEXDOCUMENTWIDGET_H
-#include <qtabwidget.h>
+#include <ntqtabwidget.h>
#include <kdirwatch.h>
@@ -28,11 +28,11 @@
#include <file.h>
#include <settings.h>
-class QIODevice;
-class QProgressDialog;
-class QListViewItem;
-class QWidget;
-class QSplitter;
+class TQIODevice;
+class TQProgressDialog;
+class TQListViewItem;
+class TQWidget;
+class TQSplitter;
class KPopupMenu;
class KActionMenu;
@@ -49,20 +49,20 @@ namespace KBibTeX
class SideBar;
class WebQuery;
- class DocumentWidget : public QTabWidget
+ class DocumentWidget : public TQTabWidget
{
Q_OBJECT
public:
- DocumentWidget( bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+ DocumentWidget( bool isReadOnly, TQWidget *parent = 0, const char *name = 0 );
~DocumentWidget();
- bool open( const QString &fileName, bool mergeOnly = FALSE );
- bool open( QIODevice *iodevice, bool mergeOnly = FALSE, const QString &label = QString::null, BibTeX::FileImporter *importer = NULL );
- bool save( const QString &fileName, QStringList *errorLog = NULL );
- bool save( QIODevice *iodevice, BibTeX::File::FileFormat format = BibTeX::File::formatBibTeX, const QString &label = QString::null, QStringList *errorLog = NULL );
+ bool open( const TQString &fileName, bool mergeOnly = FALSE );
+ bool open( TQIODevice *iodevice, bool mergeOnly = FALSE, const TQString &label = TQString::null, BibTeX::FileImporter *importer = NULL );
+ bool save( const TQString &fileName, TQStringList *errorLog = NULL );
+ bool save( TQIODevice *iodevice, BibTeX::File::FileFormat format = BibTeX::File::formatBibTeX, const TQString &label = TQString::null, TQStringList *errorLog = NULL );
- bool newElement( const QString& elementType );
- void searchWebsites( const QString& searchURL, bool includeAuthor );
+ bool newElement( const TQString& elementType );
+ void searchWebsites( const TQString& searchURL, bool includeAuthor );
void updateViews();
void showStatistics();
@@ -113,23 +113,23 @@ namespace KBibTeX
KLineEdit *m_lineEditNewKeyword;
bool m_isReadOnly;
- QSplitter *m_horSplitter;
- QSplitter *m_vertSplitter;
- QWidget *m_container;
+ TQSplitter *m_horSplitter;
+ TQSplitter *m_vertSplitter;
+ TQWidget *m_container;
SearchBar *m_searchBar;
DocumentListView *m_listViewElements;
KTextEdit * m_preview;
DocumentSourceView *m_sourceView;
SideBar* m_sideBar;
BibTeX::File *m_bibtexfile;
- QString m_filename;
- QProgressDialog *m_progressDialog;
+ TQString m_filename;
+ TQProgressDialog *m_progressDialog;
int m_newElementCounter;
EditMode m_editMode;
KActionMenu *m_viewDocumentActionMenu;
KActionMenu *m_assignKeywordsActionMenu;
- QStringList m_viewDocumentActionMenuURLs;
- QMap<int, QString> m_assignKeywordsActionMenuURLs;
+ TQStringList m_viewDocumentActionMenuURLs;
+ TQMap<int, TQString> m_assignKeywordsActionMenuURLs;
KActionMenu *m_searchWebsitesActionMenu;
KAction *m_actionEditCut;
KAction *m_actionEditCopy;
@@ -143,26 +143,26 @@ namespace KBibTeX
void setupGUI();
- void startProgress( const QString &label, QObject *progressFrom );
- void endProgress( QObject *progressFrom );
+ void startProgress( const TQString &label, TQObject *progressFrom );
+ void endProgress( TQObject *progressFrom );
- void searchWebsites( BibTeX::Element *element, const QString& searchURL, bool includeAuthor );
+ void searchWebsites( BibTeX::Element *element, const TQString& searchURL, bool includeAuthor );
bool editElementDialog( BibTeX::Element *element );
void updateFromGUI();
- QString nextNewEntry();
+ TQString nextNewEntry();
KURL::List getEntryURLs( BibTeX::Entry *entry );
- BibTeX::FileImporter *fileImporterFactory( const QString &fileName );
+ BibTeX::FileImporter *fileImporterFactory( const TQString &fileName );
private slots:
void slotShowProgress( int current, int total );
void slotSelectionChanged();
- void slotPreviewElement( QListViewItem * item = NULL );
- void slotTabChanged( QWidget *tab );
+ void slotPreviewElement( TQListViewItem * item = NULL );
+ void slotTabChanged( TQWidget *tab );
void slotModified();
- void slotFileGotDirty( const QString& path );
+ void slotFileGotDirty( const TQString& path );
void slotRefreshDirtyFile();
void slotViewDocument( int id );
void slotAssignKeywords( int id );
diff --git a/src/element.cpp b/src/element.cpp
index 73b3178..e3e1a2e 100644
--- a/src/element.cpp
+++ b/src/element.cpp
@@ -17,7 +17,7 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qstring.h>
+#include <ntqstring.h>
#include <xsltransform.h>
#include "element.h"
@@ -36,10 +36,10 @@ namespace BibTeX
// nothing
}
- bool Element::isSimpleString( const QString &text )
+ bool Element::isSimpleString( const TQString &text )
{
bool result = TRUE;
- const QString goodChars = "abcdefghijklmnopqrstuvwxyz0123456789-_";
+ const TQString goodChars = "abcdefghijklmnopqrstuvwxyz0123456789-_";
for ( unsigned int i = 0; result && i < text.length(); i++ )
result &= goodChars.contains( text.at( i ), FALSE );
diff --git a/src/element.h b/src/element.h
index 1955383..c470f0d 100644
--- a/src/element.h
+++ b/src/element.h
@@ -23,7 +23,7 @@
#include <file.h>
#include <entryfield.h>
-class QString;
+class TQString;
namespace BibTeX
{
@@ -36,11 +36,11 @@ namespace BibTeX
Element();
virtual ~Element();
- virtual bool containsPattern( const QString& /* pattern */, BibTeX::EntryField::FieldType /* fieldType */, FilterType /* filterType */ = BibTeX::Element::ftExact, bool /* caseSensitive */ = false ) const = 0;
+ virtual bool containsPattern( const TQString& /* pattern */, BibTeX::EntryField::FieldType /* fieldType */, FilterType /* filterType */ = BibTeX::Element::ftExact, bool /* caseSensitive */ = false ) const = 0;
virtual Element* clone() = 0;
- virtual QString text() const = 0;
+ virtual TQString text() const = 0;
- static bool isSimpleString( const QString &text );
+ static bool isSimpleString( const TQString &text );
};
diff --git a/src/encoder.h b/src/encoder.h
index 7997b8e..06567c0 100644
--- a/src/encoder.h
+++ b/src/encoder.h
@@ -22,7 +22,7 @@
#include <entryfield.h>
-class QString;
+class TQString;
namespace BibTeX
{
@@ -35,17 +35,17 @@ namespace BibTeX
public:
virtual ~Encoder() { /* nothing */};
- virtual QString decode( const QString & /*text*/ )
+ virtual TQString decode( const TQString & /*text*/ )
{
- return QString::null;
+ return TQString::null;
};
- virtual QString encode( const QString & /*text*/ )
+ virtual TQString encode( const TQString & /*text*/ )
{
- return QString::null;
+ return TQString::null;
};
- virtual QString encodeSpecialized( const QString & /*text*/, const EntryField::FieldType /*fieldType*/ = EntryField::ftUnknown )
+ virtual TQString encodeSpecialized( const TQString & /*text*/, const EntryField::FieldType /*fieldType*/ = EntryField::ftUnknown )
{
- return QString::null;
+ return TQString::null;
};
};
diff --git a/src/encoderlatex.cpp b/src/encoderlatex.cpp
index f111848..4dc0326 100644
--- a/src/encoderlatex.cpp
+++ b/src/encoderlatex.cpp
@@ -17,9 +17,9 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qstring.h>
-#include <qapplication.h>
-#include <qregexp.h>
+#include <ntqstring.h>
+#include <ntqapplication.h>
+#include <ntqregexp.h>
#include "encoderlatex.h"
@@ -497,23 +497,23 @@ namespace BibTeX
// nothing
}
- QString EncoderLaTeX::decode( const QString & text )
+ TQString EncoderLaTeX::decode( const TQString & text )
{
- const QString splitMarker = "|KBIBTEX|";
+ const TQString splitMarker = "|KBIBTEX|";
/** start-stop marker ensures that each text starts and stops
* with plain text and not with an inline math environment.
* This invariant is exploited implicitly in the code below. */
- const QString startStopMarker="|STARTSTOP|";
- QString result = startStopMarker + text + startStopMarker;
+ const TQString startStopMarker="|STARTSTOP|";
+ TQString result = startStopMarker + text + startStopMarker;
/** Collect (all?) urls from the BibTeX file and store them in urls */
/** Problem is that the replace function below will replace
* character sequences in the URL rendering the URL invalid.
* Later, all URLs will be replaced back to their original
* in the hope nothing breaks ... */
- QStringList urls;
- QRegExp httpRegExp( "(ht|f)tp://[^\"} ]+" );
+ TQStringList urls;
+ TQRegExp httpRegExp( "(ht|f)tp://[^\"} ]+" );
httpRegExp.setMinimal( false );
int pos = 0;
while ( pos >= 0 )
@@ -522,7 +522,7 @@ namespace BibTeX
if ( pos >= 0 )
{
++pos;
- QString url = httpRegExp.cap( 0 );
+ TQString url = httpRegExp.cap( 0 );
urls << url;
}
}
@@ -530,8 +530,8 @@ namespace BibTeX
decomposedUTF8toLaTeX( result );
/** split text into math and non-math regions */
- QStringList intermediate = QStringList::split( '$', result, true );
- QStringList::Iterator it = intermediate.begin();
+ TQStringList intermediate = TQStringList::split( '$', result, true );
+ TQStringList::Iterator it = intermediate.begin();
while ( it != intermediate.end() )
{
/**
@@ -544,7 +544,7 @@ namespace BibTeX
*/
if (( *it ).endsWith( "\\" ) )
{
- QStringList::Iterator cur = it;
+ TQStringList::Iterator cur = it;
++it;
( *cur ).append( '$' ).append( *it );
intermediate.remove( it );
@@ -554,10 +554,10 @@ namespace BibTeX
++it;
}
- qApp->processEvents();
+ tqApp->processEvents();
result = "";
- for ( QStringList::Iterator it = intermediate.begin(); it != intermediate.end(); ++it )
+ for ( TQStringList::Iterator it = intermediate.begin(); it != intermediate.end(); ++it )
{
if ( !result.isEmpty() ) result.append( splitMarker );
result.append( *it );
@@ -567,22 +567,22 @@ namespace BibTeX
break;
if (( *it ).length() > 256 )
- qDebug( "Very long math equation using $ found, maybe due to broken inline math: %s", ( *it ).left( 48 ).latin1() );
+ tqDebug( "Very long math equation using $ found, maybe due to broken inline math: %s", ( *it ).left( 48 ).latin1() );
}
- qApp->processEvents();
+ tqApp->processEvents();
- for ( QValueList<CharMappingItem>::ConstIterator cmit = m_charMapping.begin(); cmit != m_charMapping.end(); ++cmit )
+ for ( TQValueList<CharMappingItem>::ConstIterator cmit = m_charMapping.begin(); cmit != m_charMapping.end(); ++cmit )
result.replace(( *cmit ).regExp, ( *cmit ).unicode );
- qApp->processEvents();
+ tqApp->processEvents();
- QStringList transformed = QStringList::split( splitMarker, result, true );
+ TQStringList transformed = TQStringList::split( splitMarker, result, true );
- qApp->processEvents();
+ tqApp->processEvents();
result = "";
- for ( QStringList::Iterator itt = transformed.begin(), iti = intermediate.begin(); itt != transformed.end() && iti != intermediate.end(); ++itt, ++iti )
+ for ( TQStringList::Iterator itt = transformed.begin(), iti = intermediate.begin(); itt != transformed.end() && iti != intermediate.end(); ++itt, ++iti )
{
result.append( *itt );
@@ -593,7 +593,7 @@ namespace BibTeX
result.append( "$" ).append( *iti ).append( "$" );
}
- qApp->processEvents();
+ tqApp->processEvents();
/** Reinserting original URLs as explained above */
pos = 0;
@@ -612,23 +612,23 @@ namespace BibTeX
return result.replace( startStopMarker,"" );
}
- QString EncoderLaTeX::encode( const QString & text )
+ TQString EncoderLaTeX::encode( const TQString & text )
{
- const QString splitMarker = "|KBIBTEX|";
+ const TQString splitMarker = "|KBIBTEX|";
/** start-stop marker ensures that each text starts and stops
* with plain text and not with an inline math environment.
* This invariant is exploited implicitly in the code below. */
- const QString startStopMarker="|STARTSTOP|";
- QString result = startStopMarker + text + startStopMarker;
+ const TQString startStopMarker="|STARTSTOP|";
+ TQString result = startStopMarker + text + startStopMarker;
/** Collect (all?) urls from the BibTeX file and store them in urls */
/** Problem is that the replace function below will replace
* character sequences in the URL rendering the URL invalid.
* Later, all URLs will be replaced back to their original
* in the hope nothing breaks ... */
- QStringList urls;
- QRegExp httpRegExp( "(ht|f)tp://[^\"} ]+" );
+ TQStringList urls;
+ TQRegExp httpRegExp( "(ht|f)tp://[^\"} ]+" );
httpRegExp.setMinimal( false );
int pos = 0;
while ( pos >= 0 )
@@ -637,14 +637,14 @@ namespace BibTeX
if ( pos >= 0 )
{
++pos;
- QString url = httpRegExp.cap( 0 );
+ TQString url = httpRegExp.cap( 0 );
urls << url;
}
}
/** split text into math and non-math regions */
- QStringList intermediate = QStringList::split( '$', result, true );
- QStringList::Iterator it = intermediate.begin();
+ TQStringList intermediate = TQStringList::split( '$', result, true );
+ TQStringList::Iterator it = intermediate.begin();
while ( it != intermediate.end() )
{
/**
@@ -657,7 +657,7 @@ namespace BibTeX
*/
if (( *it ).endsWith( "\\" ) )
{
- QStringList::Iterator cur = it;
+ TQStringList::Iterator cur = it;
++it;
( *cur ).append( '$' ).append( *it );
intermediate.remove( it );
@@ -667,10 +667,10 @@ namespace BibTeX
++it;
}
- qApp->processEvents();
+ tqApp->processEvents();
result = "";
- for ( QStringList::Iterator it = intermediate.begin(); it != intermediate.end(); ++it )
+ for ( TQStringList::Iterator it = intermediate.begin(); it != intermediate.end(); ++it )
{
if ( !result.isEmpty() ) result.append( splitMarker );
result.append( *it );
@@ -680,22 +680,22 @@ namespace BibTeX
break;
if (( *it ).length() > 256 )
- qDebug( "Very long math equation using $ found, maybe due to broken inline math: %s", ( *it ).left( 48 ).latin1() );
+ tqDebug( "Very long math equation using $ found, maybe due to broken inline math: %s", ( *it ).left( 48 ).latin1() );
}
- qApp->processEvents();
+ tqApp->processEvents();
- for ( QValueList<CharMappingItem>::ConstIterator cmit = m_charMapping.begin(); cmit != m_charMapping.end(); ++cmit )
+ for ( TQValueList<CharMappingItem>::ConstIterator cmit = m_charMapping.begin(); cmit != m_charMapping.end(); ++cmit )
result.replace(( *cmit ).unicode, ( *cmit ).latex );
- qApp->processEvents();
+ tqApp->processEvents();
- QStringList transformed = QStringList::split( splitMarker, result, true );
+ TQStringList transformed = TQStringList::split( splitMarker, result, true );
- qApp->processEvents();
+ tqApp->processEvents();
result = "";
- for ( QStringList::Iterator itt = transformed.begin(), iti = intermediate.begin(); itt != transformed.end() && iti != intermediate.end(); ++itt, ++iti )
+ for ( TQStringList::Iterator itt = transformed.begin(), iti = intermediate.begin(); itt != transformed.end() && iti != intermediate.end(); ++itt, ++iti )
{
result.append( *itt );
@@ -706,12 +706,12 @@ namespace BibTeX
result.append( "$" ).append( *iti ).append( "$" );
}
- qApp->processEvents();
+ tqApp->processEvents();
/** \url accepts unquotet & and _
May introduce new problem tough */
if ( result.contains( "\\url{" ) )
- result.replace( "\\&", "&" ).replace( "\\_", "_" ).replace( QChar( 0x2013 ), "--" ).replace( "\\#", "#" );
+ result.replace( "\\&", "&" ).replace( "\\_", "_" ).replace( TQChar( 0x2013 ), "--" ).replace( "\\#", "#" );
decomposedUTF8toLaTeX( result );
@@ -732,27 +732,27 @@ namespace BibTeX
return result.replace( startStopMarker,"" );
}
- QString EncoderLaTeX::encode( const QString &text, const QChar &replace )
+ TQString EncoderLaTeX::encode( const TQString &text, const TQChar &replace )
{
- QString result = text;
- for ( QValueList<CharMappingItem>::ConstIterator it = m_charMapping.begin(); it != m_charMapping.end(); ++it )
+ TQString result = text;
+ for ( TQValueList<CharMappingItem>::ConstIterator it = m_charMapping.begin(); it != m_charMapping.end(); ++it )
if (( *it ).unicode == replace )
result.replace(( *it ).unicode, ( *it ).latex );
return result;
}
- QString EncoderLaTeX::encodeSpecialized( const QString & text, const EntryField::FieldType fieldType )
+ TQString EncoderLaTeX::encodeSpecialized( const TQString & text, const EntryField::FieldType fieldType )
{
- QString result = encode( text );
+ TQString result = encode( text );
switch ( fieldType )
{
case EntryField::ftPages:
- result.replace( QChar( 0x2013 ), "--" );
+ result.replace( TQChar( 0x2013 ), "--" );
break;
case EntryField::ftURL:
- result.replace( "\\&", "&" ).replace( "\\_", "_" ).replace( QChar( 0x2013 ), "--" ).replace( "\\#", "#" );
+ result.replace( "\\&", "&" ).replace( "\\_", "_" ).replace( TQChar( 0x2013 ), "--" ).replace( "\\#", "#" );
break;
default:
@@ -762,14 +762,14 @@ namespace BibTeX
return result;
}
- QString& EncoderLaTeX::decomposedUTF8toLaTeX( QString &text )
+ TQString& EncoderLaTeX::decomposedUTF8toLaTeX( TQString &text )
{
- for ( QValueList<CombinedMappingItem>::Iterator it = m_combinedMapping.begin(); it != m_combinedMapping.end(); ++it )
+ for ( TQValueList<CombinedMappingItem>::Iterator it = m_combinedMapping.begin(); it != m_combinedMapping.end(); ++it )
{
int i = ( *it ).regExp.search( text );
while ( i >= 0 )
{
- QString a = ( *it ).regExp.cap( 1 );
+ TQString a = ( *it ).regExp.cap( 1 );
text = text.left( i ) + "\\" + ( *it ).latex + "{" + a + "}" + text.mid( i + 2 );
i = ( *it ).regExp.search( text, i + 1 );
}
@@ -783,7 +783,7 @@ namespace BibTeX
for ( int i = 0; i < decompositionscount; i++ )
{
CombinedMappingItem item;
- item.regExp = QRegExp( "(.)" + QString( QChar( decompositions[i].unicode ) ) );
+ item.regExp = TQRegExp( "(.)" + TQString( TQChar( decompositions[i].unicode ) ) );
item.latex = decompositions[i].latexCommand;
m_combinedMapping.append( item );
}
@@ -795,9 +795,9 @@ namespace BibTeX
for ( int i = 0; i < charmappingdatalatexcount; i++ )
{
CharMappingItem charMappingItem;
- charMappingItem.regExp = QRegExp( charmappingdatalatex[ i ].regexp );
- charMappingItem.unicode = QChar( charmappingdatalatex[ i ].unicode );
- charMappingItem.latex = QString( charmappingdatalatex[ i ].latex );
+ charMappingItem.regExp = TQRegExp( charmappingdatalatex[ i ].regexp );
+ charMappingItem.unicode = TQChar( charmappingdatalatex[ i ].unicode );
+ charMappingItem.latex = TQString( charmappingdatalatex[ i ].latex );
m_charMapping.append( charMappingItem );
}
@@ -808,11 +808,11 @@ namespace BibTeX
for ( int j = 0; j < expansionscmdcount; ++j )
{
CharMappingItem charMappingItem;
- charMappingItem.regExp = QRegExp( QString( expansionsCmd[j] ).arg( commandmappingdatalatex[i].letters ) );
- charMappingItem.unicode = QChar( commandmappingdatalatex[i].unicode );
+ charMappingItem.regExp = TQRegExp( TQString( expansionsCmd[j] ).arg( commandmappingdatalatex[i].letters ) );
+ charMappingItem.unicode = TQChar( commandmappingdatalatex[i].unicode );
if ( charMappingItem.regExp.numCaptures() > 0 )
- charMappingItem.unicode += QString( "\\1" );
- charMappingItem.latex = QString( "{\\%1}" ).arg( commandmappingdatalatex[i].letters );
+ charMappingItem.unicode += TQString( "\\1" );
+ charMappingItem.latex = TQString( "{\\%1}" ).arg( commandmappingdatalatex[i].letters );
m_charMapping.append( charMappingItem );
}
}
@@ -820,8 +820,8 @@ namespace BibTeX
/** encoding and decoding for letters such as \"a */
for ( int i = 0; i < modcharmappingdatalatexcount; ++i )
{
- QString modifierRegExp = QString( modcharmappingdatalatex[i].modifier );
- QString modifier = modifierRegExp;
+ TQString modifierRegExp = TQString( modcharmappingdatalatex[i].modifier );
+ TQString modifier = modifierRegExp;
modifier.replace( "\\^", "^" ).replace( "\\\\", "\\" );
/** first batch of replacement rules, where no separator is required between modifier and character (e.g. \"a) */
@@ -829,9 +829,9 @@ namespace BibTeX
for ( int j = 0; j < expansionsmod2count; ++j )
{
CharMappingItem charMappingItem;
- charMappingItem.regExp = QRegExp( QString( expansionsMod2[j] ).arg( modifierRegExp ).arg( modcharmappingdatalatex[i].letter ) );
- charMappingItem.unicode = QChar( modcharmappingdatalatex[i].unicode );
- charMappingItem.latex = QString( "{%1%2}" ).arg( modifier ).arg( modcharmappingdatalatex[i].letter );
+ charMappingItem.regExp = TQRegExp( TQString( expansionsMod2[j] ).arg( modifierRegExp ).arg( modcharmappingdatalatex[i].letter ) );
+ charMappingItem.unicode = TQChar( modcharmappingdatalatex[i].unicode );
+ charMappingItem.latex = TQString( "{%1%2}" ).arg( modifier ).arg( modcharmappingdatalatex[i].letter );
m_charMapping.append( charMappingItem );
}
@@ -839,9 +839,9 @@ namespace BibTeX
for ( int j = 0; j < expansionsmod1count; ++j )
{
CharMappingItem charMappingItem;
- charMappingItem.regExp = QRegExp( QString( expansionsMod1[j] ).arg( modifierRegExp ).arg( modcharmappingdatalatex[i].letter ) );
- charMappingItem.unicode = QChar( modcharmappingdatalatex[i].unicode );
- charMappingItem.latex = QString( "%1{%2}" ).arg( modifier ).arg( modcharmappingdatalatex[i].letter );
+ charMappingItem.regExp = TQRegExp( TQString( expansionsMod1[j] ).arg( modifierRegExp ).arg( modcharmappingdatalatex[i].letter ) );
+ charMappingItem.unicode = TQChar( modcharmappingdatalatex[i].unicode );
+ charMappingItem.latex = TQString( "%1{%2}" ).arg( modifier ).arg( modcharmappingdatalatex[i].letter );
m_charMapping.append( charMappingItem );
}
}
diff --git a/src/encoderlatex.h b/src/encoderlatex.h
index d301652..a9e4b12 100644
--- a/src/encoderlatex.h
+++ b/src/encoderlatex.h
@@ -20,13 +20,13 @@
#ifndef ENCODERLATEX_H
#define ENCODERLATEX_H
-#include <qvaluelist.h>
-#include <qregexp.h>
+#include <ntqvaluelist.h>
+#include <ntqregexp.h>
#include <encoder.h>
#include <entry.h>
-class QString;
+class TQString;
namespace BibTeX
{
@@ -37,11 +37,11 @@ namespace BibTeX
EncoderLaTeX();
~EncoderLaTeX();
- QString decode( const QString &text );
- QString encode( const QString &text );
- QString encode( const QString &text, const QChar &replace );
- QString encodeSpecialized( const QString &text, const EntryField::FieldType fieldType = EntryField::ftUnknown );
- QString& decomposedUTF8toLaTeX( QString &text );
+ TQString decode( const TQString &text );
+ TQString encode( const TQString &text );
+ TQString encode( const TQString &text, const TQChar &replace );
+ TQString encodeSpecialized( const TQString &text, const EntryField::FieldType fieldType = EntryField::ftUnknown );
+ TQString& decomposedUTF8toLaTeX( TQString &text );
static EncoderLaTeX *currentEncoderLaTeX();
static void deleteCurrentEncoderLaTeX();
@@ -53,22 +53,22 @@ namespace BibTeX
struct CombinedMappingItem
{
- QRegExp regExp;
- QString latex;
+ TQRegExp regExp;
+ TQString latex;
};
- QValueList<CombinedMappingItem> m_combinedMapping;
+ TQValueList<CombinedMappingItem> m_combinedMapping;
void buildCombinedMapping();
struct CharMappingItem
{
- QRegExp regExp;
- QString unicode;
- QString latex;
+ TQRegExp regExp;
+ TQString unicode;
+ TQString latex;
};
- QValueList<CharMappingItem> m_charMapping;
+ TQValueList<CharMappingItem> m_charMapping;
void buildCharMapping();
};
diff --git a/src/encoderxml.cpp b/src/encoderxml.cpp
index bbb76dd..5c8d1ea 100644
--- a/src/encoderxml.cpp
+++ b/src/encoderxml.cpp
@@ -17,7 +17,7 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qregexp.h>
+#include <ntqregexp.h>
#include "encoderxml.h"
@@ -51,11 +51,11 @@ namespace BibTeX
// nothing
}
- QString EncoderXML::decode( const QString &text )
+ TQString EncoderXML::decode( const TQString &text )
{
- QString result = text;
+ TQString result = text;
- for ( QValueList<CharMappingItem>::ConstIterator it = m_charMapping.begin(); it != m_charMapping.end(); ++it )
+ for ( TQValueList<CharMappingItem>::ConstIterator it = m_charMapping.begin(); it != m_charMapping.end(); ++it )
result.replace(( *it ).regExp, ( *it ).unicode );
/**
@@ -69,7 +69,7 @@ namespace BibTeX
bool ok = FALSE;
int hex = result.mid( p + 3, p2 - p - 3 ).toInt( &ok, 16 );
if ( ok && hex > 0 )
- result.replace( result.mid( p, p2 - p + 1 ), QChar( hex ) );
+ result.replace( result.mid( p, p2 - p + 1 ), TQChar( hex ) );
}
/**
@@ -83,23 +83,23 @@ namespace BibTeX
bool ok = FALSE;
int dec = result.mid( p + 2, p2 - p - 2 ).toInt( &ok, 10 );
if ( ok && dec > 0 )
- result.replace( result.mid( p, p2 - p + 1 ), QChar( dec ) );
+ result.replace( result.mid( p, p2 - p + 1 ), TQChar( dec ) );
}
return result;
}
- QString EncoderXML::encode( const QString &text )
+ TQString EncoderXML::encode( const TQString &text )
{
- QString result = text;
+ TQString result = text;
- for ( QValueList<CharMappingItem>::ConstIterator it = m_charMapping.begin(); it != m_charMapping.end(); ++it )
+ for ( TQValueList<CharMappingItem>::ConstIterator it = m_charMapping.begin(); it != m_charMapping.end(); ++it )
result.replace(( *it ).unicode, ( *it ).latex );
return result;
}
- QString EncoderXML::encodeSpecialized( const QString &text, const EntryField::FieldType /* fieldType */ )
+ TQString EncoderXML::encodeSpecialized( const TQString &text, const EntryField::FieldType /* fieldType */ )
{
return encode( text );
}
@@ -109,9 +109,9 @@ namespace BibTeX
for ( int i = 0; i < charmappingdataxmlcount; i++ )
{
CharMappingItem charMappingItem;
- charMappingItem.regExp = QRegExp( charmappingdataxml[ i ].regexp );
- charMappingItem.unicode = QChar( charmappingdataxml[ i ].unicode );
- charMappingItem.latex = QString( charmappingdataxml[ i ].latex );
+ charMappingItem.regExp = TQRegExp( charmappingdataxml[ i ].regexp );
+ charMappingItem.unicode = TQChar( charmappingdataxml[ i ].unicode );
+ charMappingItem.latex = TQString( charmappingdataxml[ i ].latex );
m_charMapping.append( charMappingItem );
}
}
diff --git a/src/encoderxml.h b/src/encoderxml.h
index 89e1be1..142c6f0 100644
--- a/src/encoderxml.h
+++ b/src/encoderxml.h
@@ -20,13 +20,13 @@
#ifndef BIBTEXENCODERXML_H
#define BIBTEXENCODERXML_H
-#include <qptrlist.h>
-#include <qregexp.h>
+#include <ntqptrlist.h>
+#include <ntqregexp.h>
#include <encoder.h>
-class QString;
-class QRegExp;
+class TQString;
+class TQRegExp;
namespace BibTeX
{
@@ -40,21 +40,21 @@ namespace BibTeX
EncoderXML();
~EncoderXML();
- QString decode( const QString &text );
- QString encode( const QString &text );
- QString encodeSpecialized( const QString &text, const EntryField::FieldType fieldType = EntryField::ftUnknown );
+ TQString decode( const TQString &text );
+ TQString encode( const TQString &text );
+ TQString encodeSpecialized( const TQString &text, const EntryField::FieldType fieldType = EntryField::ftUnknown );
static EncoderXML *currentEncoderXML();
private:
struct CharMappingItem
{
- QRegExp regExp;
- QChar unicode;
- QString latex;
+ TQRegExp regExp;
+ TQChar unicode;
+ TQString latex;
};
- QValueList<CharMappingItem> m_charMapping;
+ TQValueList<CharMappingItem> m_charMapping;
void buildCharMapping();
};
diff --git a/src/entry.cpp b/src/entry.cpp
index fcd81fd..00be859 100644
--- a/src/entry.cpp
+++ b/src/entry.cpp
@@ -17,9 +17,9 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qregexp.h>
+#include <ntqstring.h>
+#include <ntqstringlist.h>
+#include <ntqregexp.h>
#include <entry.h>
#include <file.h>
@@ -32,18 +32,18 @@ namespace BibTeX
{
Entry::Entry( )
- : Element(), m_entryType( etUnknown ), m_entryTypeString( QString::null ), m_id( QString::null )
+ : Element(), m_entryType( etUnknown ), m_entryTypeString( TQString::null ), m_id( TQString::null )
{
// nothing
}
- Entry::Entry( const EntryType entryType, const QString &id )
+ Entry::Entry( const EntryType entryType, const TQString &id )
: Element( ), m_entryType( entryType ), m_id( id )
{
m_entryTypeString = entryTypeToString( entryType );
}
- Entry::Entry( const QString& entryTypeString, const QString& id ) : Element( ), m_entryTypeString( entryTypeString ), m_id( id )
+ Entry::Entry( const TQString& entryTypeString, const TQString& id ) : Element( ), m_entryTypeString( entryTypeString ), m_id( id )
{
m_entryType = entryTypeFromString( entryTypeString );
if ( m_entryType != etUnknown )
@@ -85,9 +85,9 @@ namespace BibTeX
return true;
}
- QString Entry::text() const
+ TQString Entry::text() const
{
- QString result = "Id: ";
+ TQString result = "Id: ";
result.append( m_id ).append( " (" ).append( entryTypeString() ).append( ")\n" );
for ( EntryFields::ConstIterator it = m_fields.begin(); it != m_fields.end(); it++ )
@@ -105,7 +105,7 @@ namespace BibTeX
m_entryTypeString = entryTypeToString( entryType );
}
- void Entry::setEntryTypeString( const QString& entryTypeString )
+ void Entry::setEntryTypeString( const TQString& entryTypeString )
{
m_entryTypeString = entryTypeString;
m_entryType = entryTypeFromString( entryTypeString );
@@ -116,22 +116,22 @@ namespace BibTeX
return m_entryType;
}
- QString Entry::entryTypeString() const
+ TQString Entry::entryTypeString() const
{
return m_entryTypeString;
}
- void Entry::setId( const QString& id )
+ void Entry::setId( const TQString& id )
{
m_id = id;
}
- QString Entry::id() const
+ TQString Entry::id() const
{
return m_id;
}
- bool Entry::containsPattern( const QString & pattern, EntryField::FieldType fieldType, BibTeX::Element::FilterType filterType, bool caseSensitive ) const
+ bool Entry::containsPattern( const TQString & pattern, EntryField::FieldType fieldType, BibTeX::Element::FilterType filterType, bool caseSensitive ) const
{
if ( filterType == ftExact )
{
@@ -147,10 +147,10 @@ namespace BibTeX
else
{
/** for each word in the search pattern ... */
- QStringList words = QStringList::split( QRegExp( "\\s+" ), pattern );
+ TQStringList words = TQStringList::split( TQRegExp( "\\s+" ), pattern );
bool *hits = new bool[words.count()];
int i = 0;
- for ( QStringList::Iterator wit = words.begin(); wit != words.end(); ++wit, ++i )
+ for ( TQStringList::Iterator wit = words.begin(); wit != words.end(); ++wit, ++i )
{
hits[i] = fieldType == EntryField::ftUnknown && m_id.contains( *wit, caseSensitive );
@@ -170,18 +170,18 @@ namespace BibTeX
}
}
- QStringList Entry::urls() const
+ TQStringList Entry::urls() const
{
- QStringList result;
- const QString fieldNames[] = {"localfile", "pdf", "ps", "postscript", "doi", "url", "howpublished", "ee", "biburl", "note"};
+ TQStringList result;
+ const TQString fieldNames[] = {"localfile", "pdf", "ps", "postscript", "doi", "url", "howpublished", "ee", "biburl", "note"};
const int fieldNamesCount = sizeof( fieldNames ) / sizeof( fieldNames[0] );
for ( int j = 1; j < 5 ; ++j ) /** there may be variants such as url3 or doi2 */
for ( int i = 0; i < fieldNamesCount; i++ )
{
- QString fieldName = fieldNames[i];
+ TQString fieldName = fieldNames[i];
/** field names should be like url, url2, url3, ... */
- if ( j > 1 ) fieldName.append( QString::number( j ) );
+ if ( j > 1 ) fieldName.append( TQString::number( j ) );
EntryField * field = getField( fieldName );
if (( field && !field->value()->items.isEmpty() ) )
@@ -189,7 +189,7 @@ namespace BibTeX
PlainText *plainText = dynamic_cast<PlainText*>( field->value()->items.first() );
if ( plainText != NULL )
{
- QString plain = plainText->text();
+ TQString plain = plainText->text();
int urlPos = plain.find( "\\url{", 0, FALSE );
if ( urlPos > -1 )
{
@@ -226,7 +226,7 @@ namespace BibTeX
return result;
}
- EntryField* Entry::getField( const QString & fieldName ) const
+ EntryField* Entry::getField( const TQString & fieldName ) const
{
EntryField * result = NULL;
@@ -237,7 +237,7 @@ namespace BibTeX
return result;
}
- bool Entry::deleteField( const QString & fieldName )
+ bool Entry::deleteField( const TQString & fieldName )
{
for ( EntryFields::ConstIterator it = m_fields.begin(); it != m_fields.end(); it++ )
if (( *it ) ->fieldTypeName().lower() == fieldName.lower() )
@@ -303,7 +303,7 @@ namespace BibTeX
{
EntryField *otherField = new EntryField( *it );
EntryField::FieldType otherFieldType = otherField->fieldType();
- QString otherFieldTypeName = otherField->fieldTypeName();
+ TQString otherFieldTypeName = otherField->fieldTypeName();
EntryField *thisField = otherFieldType != EntryField::ftUnknown ? getField( otherFieldType ) : getField( otherFieldTypeName );
if ( thisField == NULL )
@@ -319,48 +319,48 @@ namespace BibTeX
}
}
- QString Entry::entryTypeToString( const EntryType entryType )
+ TQString Entry::entryTypeToString( const EntryType entryType )
{
switch ( entryType )
{
case etArticle:
- return QString( "Article" );
+ return TQString( "Article" );
case etBook:
- return QString( "Book" );
+ return TQString( "Book" );
case etBooklet:
- return QString( "Booklet" );
+ return TQString( "Booklet" );
case etCollection:
- return QString( "Collection" );
+ return TQString( "Collection" );
case etElectronic:
- return QString( "Electronic" );
+ return TQString( "Electronic" );
case etInBook:
- return QString( "InBook" );
+ return TQString( "InBook" );
case etInCollection:
- return QString( "InCollection" );
+ return TQString( "InCollection" );
case etInProceedings:
- return QString( "InProceedings" );
+ return TQString( "InProceedings" );
case etManual:
- return QString( "Manual" );
+ return TQString( "Manual" );
case etMastersThesis:
- return QString( "MastersThesis" );
+ return TQString( "MastersThesis" );
case etMisc:
- return QString( "Misc" );
+ return TQString( "Misc" );
case etPhDThesis:
- return QString( "PhDThesis" );
+ return TQString( "PhDThesis" );
case etProceedings:
- return QString( "Proceedings" );
+ return TQString( "Proceedings" );
case etTechReport:
- return QString( "TechReport" );
+ return TQString( "TechReport" );
case etUnpublished:
- return QString( "Unpublished" );
+ return TQString( "Unpublished" );
default:
- return QString( "Unknown" );
+ return TQString( "Unknown" );
}
}
- Entry::EntryType Entry::entryTypeFromString( const QString & entryTypeString )
+ Entry::EntryType Entry::entryTypeFromString( const TQString & entryTypeString )
{
- QString entryTypeStringLower = entryTypeString.lower();
+ TQString entryTypeStringLower = entryTypeString.lower();
if ( entryTypeStringLower == "article" )
return etArticle;
else if ( entryTypeStringLower == "book" )
diff --git a/src/entry.h b/src/entry.h
index 6a8633c..4a6d970 100644
--- a/src/entry.h
+++ b/src/entry.h
@@ -20,14 +20,14 @@
#ifndef BIBTEXBIBTEXENTRY_H
#define BIBTEXBIBTEXENTRY_H
-#include <qvaluelist.h>
-#include <qstringlist.h>
+#include <ntqvaluelist.h>
+#include <ntqstringlist.h>
#include <element.h>
#include <entryfield.h>
-class QString;
-class QStringList;
+class TQString;
+class TQStringList;
namespace BibTeX
{
@@ -35,7 +35,7 @@ namespace BibTeX
class Entry : public Element
{
public:
- typedef QValueList<BibTeX::EntryField*> EntryFields;
+ typedef TQValueList<BibTeX::EntryField*> EntryFields;
enum EntryType {etArticle, etBook, etBooklet, etCollection, etElectronic, etInBook, etInCollection, etInProceedings, etManual, etMastersThesis, etMisc, etPhDThesis, etProceedings, etTechReport, etUnpublished, etUnknown};
@@ -44,29 +44,29 @@ namespace BibTeX
enum MergeSemantics {msAddNew, msForceAdding};
Entry( );
- Entry( const EntryType entryType, const QString &id );
- Entry( const QString& entryTypeString, const QString& id );
+ Entry( const EntryType entryType, const TQString &id );
+ Entry( const TQString& entryTypeString, const TQString& id );
Entry( const Entry *other );
virtual ~Entry();
Element* clone();
bool equals( const Entry &other );
- QString text() const;
+ TQString text() const;
void setEntryType( const EntryType elementType );
- void setEntryTypeString( const QString& elementTypeString );
+ void setEntryTypeString( const TQString& elementTypeString );
EntryType entryType() const;
- QString entryTypeString() const;
- void setId( const QString& id );
- QString id() const;
+ TQString entryTypeString() const;
+ void setId( const TQString& id );
+ TQString id() const;
- bool containsPattern( const QString& pattern, EntryField::FieldType fieldType = EntryField::ftUnknown, BibTeX::Element::FilterType filterType = BibTeX::Element::ftExact, bool caseSensitive = FALSE ) const;
- QStringList urls() const;
+ bool containsPattern( const TQString& pattern, EntryField::FieldType fieldType = EntryField::ftUnknown, BibTeX::Element::FilterType filterType = BibTeX::Element::ftExact, bool caseSensitive = FALSE ) const;
+ TQStringList urls() const;
bool addField( EntryField *field );
BibTeX::EntryField* getField( const EntryField::FieldType fieldType ) const;
- BibTeX::EntryField* getField( const QString& fieldName ) const;
+ BibTeX::EntryField* getField( const TQString& fieldName ) const;
bool deleteField( const BibTeX::EntryField::FieldType fieldType );
- bool deleteField( const QString &fieldName );
+ bool deleteField( const TQString &fieldName );
EntryFields::const_iterator begin() const;
EntryFields::const_iterator end() const;
@@ -76,14 +76,14 @@ namespace BibTeX
void copyFrom( const BibTeX::Entry *other );
void merge( BibTeX::Entry *other, MergeSemantics mergeSemantics );
- static QString entryTypeToString( const EntryType entryType );
- static EntryType entryTypeFromString( const QString &entryTypeString );
+ static TQString entryTypeToString( const EntryType entryType );
+ static EntryType entryTypeFromString( const TQString &entryTypeString );
static Entry::FieldRequireStatus getRequireStatus( Entry::EntryType entryType, EntryField::FieldType fieldType );
private:
EntryType m_entryType;
- QString m_entryTypeString;
- QString m_id;
+ TQString m_entryTypeString;
+ TQString m_id;
EntryFields m_fields;
};
diff --git a/src/entryfield.cpp b/src/entryfield.cpp
index bb7cb9d..78c7a4a 100644
--- a/src/entryfield.cpp
+++ b/src/entryfield.cpp
@@ -28,7 +28,7 @@ namespace BibTeX
m_value = new Value();
}
- EntryField::EntryField( const QString &fieldTypeName ) : m_fieldTypeName( fieldTypeName )
+ EntryField::EntryField( const TQString &fieldTypeName ) : m_fieldTypeName( fieldTypeName )
{
m_fieldType = fieldTypeFromString( m_fieldTypeName );
m_value = new Value();
@@ -44,12 +44,12 @@ namespace BibTeX
delete m_value;
}
- QString EntryField::fieldTypeName() const
+ TQString EntryField::fieldTypeName() const
{
return m_fieldTypeName;
}
- void EntryField::setFieldType( FieldType fieldType, const QString& fieldTypeName )
+ void EntryField::setFieldType( FieldType fieldType, const TQString& fieldTypeName )
{
m_fieldType = fieldType;
m_fieldTypeName = fieldTypeName;
@@ -60,82 +60,82 @@ namespace BibTeX
return m_fieldType;
}
- QString EntryField::fieldTypeToString( const FieldType fieldType )
+ TQString EntryField::fieldTypeToString( const FieldType fieldType )
{
switch ( fieldType )
{
case ftAbstract:
- return QString( "abstract" );
+ return TQString( "abstract" );
case ftAddress:
- return QString( "address" );
+ return TQString( "address" );
case ftAnnote:
- return QString( "annote" );
+ return TQString( "annote" );
case ftAuthor:
- return QString( "author" );
+ return TQString( "author" );
case ftBookTitle:
- return QString( "booktitle" );
+ return TQString( "booktitle" );
case ftChapter:
- return QString( "chapter" );
+ return TQString( "chapter" );
case ftCrossRef:
- return QString( "crossref" );
+ return TQString( "crossref" );
case ftDoi:
- return QString( "doi" );
+ return TQString( "doi" );
case ftEdition:
- return QString( "edition" );
+ return TQString( "edition" );
case ftEditor:
- return QString( "editor" );
+ return TQString( "editor" );
case ftHowPublished:
- return QString( "howpublished" );
+ return TQString( "howpublished" );
case ftInstitution:
- return QString( "institution" );
+ return TQString( "institution" );
case ftISBN:
- return QString( "isbn" );
+ return TQString( "isbn" );
case ftISSN:
- return QString( "issn" );
+ return TQString( "issn" );
case ftJournal:
- return QString( "journal" );
+ return TQString( "journal" );
case ftKey:
- return QString( "key" );
+ return TQString( "key" );
case ftKeywords:
- return QString( "keywords" );
+ return TQString( "keywords" );
case ftLocalFile:
- return QString( "localfile" );
+ return TQString( "localfile" );
case ftLocation:
- return QString( "location" );
+ return TQString( "location" );
case ftMonth:
- return QString( "month" );
+ return TQString( "month" );
case ftNote:
- return QString( "note" );
+ return TQString( "note" );
case ftNumber:
- return QString( "number" );
+ return TQString( "number" );
case ftOrganization:
- return QString( "organization" );
+ return TQString( "organization" );
case ftPages:
- return QString( "pages" );
+ return TQString( "pages" );
case ftPublisher:
- return QString( "publisher" );
+ return TQString( "publisher" );
case ftSeries:
- return QString( "series" );
+ return TQString( "series" );
case ftSchool:
- return QString( "school" );
+ return TQString( "school" );
case ftTitle:
- return QString( "title" );
+ return TQString( "title" );
case ftType:
- return QString( "type" );
+ return TQString( "type" );
case ftURL:
- return QString( "url" );
+ return TQString( "url" );
case ftVolume:
- return QString( "volume" );
+ return TQString( "volume" );
case ftYear:
- return QString( "year" );
+ return TQString( "year" );
default:
- return QString( "unknown" );
+ return TQString( "unknown" );
}
}
- EntryField::FieldType EntryField::fieldTypeFromString( const QString & fieldTypeString )
+ EntryField::FieldType EntryField::fieldTypeFromString( const TQString & fieldTypeString )
{
- QString fieldTypeStringLower = fieldTypeString.lower();
+ TQString fieldTypeStringLower = fieldTypeString.lower();
if ( fieldTypeStringLower == "abstract" )
return ftAbstract;
diff --git a/src/entryfield.h b/src/entryfield.h
index 6b3af30..684045e 100644
--- a/src/entryfield.h
+++ b/src/entryfield.h
@@ -20,7 +20,7 @@
#ifndef BIBTEXBIBTEXENTRYFIELD_H
#define BIBTEXBIBTEXENTRYFIELD_H
-#include <qstring.h>
+#include <ntqstring.h>
#include <value.h>
@@ -32,23 +32,23 @@ namespace BibTeX
enum FieldType {ftAbstract, ftAddress, ftAnnote, ftAuthor, ftBookTitle, ftChapter, ftCrossRef, ftDoi, ftEdition, ftEditor, ftHowPublished, ftInstitution, ftISBN, ftISSN, ftJournal, ftKey, ftKeywords, ftLocalFile, ftLocation, ftMonth, ftNote, ftNumber, ftOrganization, ftPages, ftPublisher, ftSchool, ftSeries, ftTitle, ftType, ftURL, ftVolume, ftYear, ftUnknown = -1};
EntryField( FieldType fieldType );
- EntryField( const QString &fieldTypeName );
+ EntryField( const TQString &fieldTypeName );
EntryField( BibTeX::EntryField *other );
~EntryField();
- QString fieldTypeName() const;
+ TQString fieldTypeName() const;
FieldType fieldType() const;
- void setFieldType( FieldType fieldType, const QString& fieldTypeName );
+ void setFieldType( FieldType fieldType, const TQString& fieldTypeName );
- static QString fieldTypeToString( const FieldType fieldType );
- static FieldType fieldTypeFromString( const QString &fieldTypeString );
+ static TQString fieldTypeToString( const FieldType fieldType );
+ static FieldType fieldTypeFromString( const TQString &fieldTypeString );
BibTeX::Value *value();
void setValue( const BibTeX::Value *value );
private:
FieldType m_fieldType;
- QString m_fieldTypeName;
+ TQString m_fieldTypeName;
Value *m_value;
};
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 <qlayout.h>
-#include <qcheckbox.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qlistview.h>
-#include <qlabel.h>
-#include <qregexp.h>
-#include <qpushbutton.h>
-#include <qpopupmenu.h>
-#include <qtabwidget.h>
-#include <qcombobox.h>
-#include <qtimer.h>
-#include <qlineedit.h>
+#include <ntqlayout.h>
+#include <ntqcheckbox.h>
+#include <ntqtooltip.h>
+#include <ntqwhatsthis.h>
+#include <ntqlistview.h>
+#include <ntqlabel.h>
+#include <ntqregexp.h>
+#include <ntqpushbutton.h>
+#include <ntqpopupmenu.h>
+#include <ntqtabwidget.h>
+#include <ntqcombobox.h>
+#include <ntqtimer.h>
+#include <ntqlineedit.h>
#include <klocale.h>
#include <kdebug.h>
@@ -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<EntryWidgetTitle*>( m_tabWidget->page( 0 ) );
if ( ewt != NULL )
ewt->m_fieldLineEditTitle->setFocus();
@@ -134,7 +134,7 @@ namespace KBibTeX
{
bool isModified = m_lineEditID->isModified();
- for ( QValueList<KBibTeX::EntryWidgetTab*>::iterator it( m_internalEntryWidgets.begin() ); !isModified && it != m_internalEntryWidgets.end(); ++it )
+ for ( TQValueList<KBibTeX::EntryWidgetTab*>::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<KBibTeX::EntryWidgetTab*>::iterator it( m_internalEntryWidgets.begin() ); it != m_internalEntryWidgets.end(); ++it )
+ for ( TQValueList<KBibTeX::EntryWidgetTab*>::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<KBibTeX::EntryWidgetTab*>::iterator it( m_internalEntryWidgets.begin() ); it != m_internalEntryWidgets.end(); ++it )
+ for ( TQValueList<KBibTeX::EntryWidgetTab*>::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<KBibTeX::EntryWidgetTab*>::iterator it( m_internalEntryWidgets.begin() ); it != m_internalEntryWidgets.end(); ++it )
+ for ( TQValueList<KBibTeX::EntryWidgetTab*>::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<KBibTeX::EntryWidgetTab*>::iterator it( m_internalEntryWidgets.begin() ); it != m_internalEntryWidgets.end(); ++it )
+ for ( TQValueList<KBibTeX::EntryWidgetTab*>::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<KBibTeX::EntryWidgetWarningsItem*>( 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<KBibTeX::EntryWidgetTab*>( 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<KBibTeX::EntryWidgetTab*>::iterator it( m_internalEntryWidgets.begin() ); it != m_internalEntryWidgets.end(); ++it )
+ for ( TQValueList<KBibTeX::EntryWidgetTab*>::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<KBibTeX::EntryWidgetTab*>::iterator it( m_internalEntryWidgets.begin() ); it != m_internalEntryWidgets.end(); ++it )
+ for ( TQValueList<KBibTeX::EntryWidgetTab*>::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<KBibTeX::EntryWidgetTab*>::iterator it( m_internalEntryWidgets.begin() ); it != m_internalEntryWidgets.end(); ++it )
+ for ( TQValueList<KBibTeX::EntryWidgetTab*>::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<BibTeX::Entry*>( 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
diff --git a/src/entrywidget.h b/src/entrywidget.h
index 10dfd13..3d9ad2f 100644
--- a/src/entrywidget.h
+++ b/src/entrywidget.h
@@ -20,10 +20,10 @@
#ifndef KBIBTEXENTRYWIDGET_H
#define KBIBTEXENTRYWIDGET_H
-#include <qwidget.h>
-#include <qdialog.h>
-#include <qvaluelist.h>
-#include <qmap.h>
+#include <ntqwidget.h>
+#include <ntqdialog.h>
+#include <ntqvaluelist.h>
+#include <ntqmap.h>
#include <kdialogbase.h>
@@ -31,13 +31,13 @@
#include <entrywidgetsource.h>
#include <webquery.h>
-class QComboBox;
-class QLineEdit;
-class QCheckBox;
-class QTabWidget;
-class QString;
-class QTimer;
-class QListView;
+class TQComboBox;
+class TQLineEdit;
+class TQCheckBox;
+class TQTabWidget;
+class TQString;
+class TQTimer;
+class TQListView;
class KConfig;
@@ -46,7 +46,7 @@ namespace KBibTeX
class EntryWidgetTab;
class WebQueryArXiv;
- class EntryWidget : public QWidget
+ class EntryWidget : public TQWidget
{
Q_OBJECT
@@ -55,11 +55,11 @@ namespace KBibTeX
public:
~EntryWidget();
- static QDialog::DialogCode execute( BibTeX::Entry *entry, BibTeX::File *bibtexfile, bool isReadOnly, bool isNew, QWidget *parent = 0, const char *name = 0 );
+ static TQDialog::DialogCode execute( BibTeX::Entry *entry, BibTeX::File *bibtexfile, bool isReadOnly, bool isNew, TQWidget *parent = 0, const char *name = 0 );
protected:
- EntryWidget( BibTeX::File *bibtexfile, bool isReadOnly, bool isNew, QDialog *parent, const char *name = 0 );
- void showEvent( QShowEvent * );
+ EntryWidget( BibTeX::File *bibtexfile, bool isReadOnly, bool isNew, TQDialog *parent, const char *name = 0 );
+ void showEvent( TQShowEvent * );
bool queryClose();
private slots:
@@ -70,8 +70,8 @@ namespace KBibTeX
void slotEnableAllFields();
void slotForceDefaultIdSuggestion();
void slotEntryTypeChanged();
- void slotCurrentPageChanged( QWidget* newPage );
- void warningsExecute( QListViewItem* item );
+ void slotCurrentPageChanged( TQWidget* newPage );
+ void warningsExecute( TQListViewItem* item );
void updateWarnings();
void insertIdSuggestion( int id );
void updateIdSuggestionsMenu();
@@ -83,34 +83,34 @@ namespace KBibTeX
void updateTabs( BibTeX::Entry::EntryType entryType, bool enableAll, bool isReadOnly );
private:
- EntryWidget( BibTeX::Entry *entry, BibTeX::File *bibtexfile, bool isReadOnly, bool isNew, QDialog *parent, const char *name = 0 );
+ EntryWidget( BibTeX::Entry *entry, BibTeX::File *bibtexfile, bool isReadOnly, bool isNew, TQDialog *parent, const char *name = 0 );
BibTeX::Entry *m_originalEntry;
BibTeX::File *m_bibtexfile;
bool m_isReadOnly;
bool m_isNew;
bool m_defaultIdSuggestionAvailable;
- QComboBox *m_comboBoxEntryType;
- QLineEdit *m_lineEditID;
- QPushButton *m_pushButtonForceDefaultIdSuggestion;
- QPushButton *m_pushButtonIdSuggestions;
- QPopupMenu *m_menuIdSuggestions;
- QMap<int, QString> m_idToSuggestion;
- QCheckBox *m_checkBoxEnableAll;
- QPushButton *m_pushButtonRefetch;
- QListView *m_listViewWarnings;
- QTabWidget *m_tabWidget;
+ TQComboBox *m_comboBoxEntryType;
+ TQLineEdit *m_lineEditID;
+ TQPushButton *m_pushButtonForceDefaultIdSuggestion;
+ TQPushButton *m_pushButtonIdSuggestions;
+ TQPopupMenu *m_menuIdSuggestions;
+ TQMap<int, TQString> m_idToSuggestion;
+ TQCheckBox *m_checkBoxEnableAll;
+ TQPushButton *m_pushButtonRefetch;
+ TQListView *m_listViewWarnings;
+ TQTabWidget *m_tabWidget;
KBibTeX::EntryWidgetSource *m_sourcePage;
- QValueList<KBibTeX::EntryWidgetTab*> m_internalEntryWidgets;
- QWidget *m_lastPage;
- QTimer *m_updateWarningsTimer;
- QDialog *m_dlgParent;
+ TQValueList<KBibTeX::EntryWidgetTab*> m_internalEntryWidgets;
+ TQWidget *m_lastPage;
+ TQTimer *m_updateWarningsTimer;
+ TQDialog *m_dlgParent;
WebQueryArXiv *m_wqa;
- QString m_oldId;
+ TQString m_oldId;
- void setupGUI( QWidget *parent, bool showWarnings = TRUE );
+ void setupGUI( TQWidget *parent, bool showWarnings = TRUE );
void addTabWidgets();
- void addTabWidget( EntryWidgetTab *widget, const QString& title );
+ void addTabWidget( EntryWidgetTab *widget, const TQString& title );
void setupEntryTypes();
void updateGUI();
void internalApply( BibTeX::Entry *entry );
@@ -123,7 +123,7 @@ namespace KBibTeX
{
Q_OBJECT
public:
- EntryWidgetDialog( QWidget *parent = 0, const char *name = 0, bool modal = true, const QString &caption = QString::null, int buttonMask = Ok | Apply | Cancel ) : KDialogBase( parent, name, modal, caption, buttonMask ) {/* nothing */};
+ EntryWidgetDialog( TQWidget *parent = 0, const char *name = 0, bool modal = true, const TQString &caption = TQString::null, int buttonMask = Ok | Apply | Cancel ) : KDialogBase( parent, name, modal, caption, buttonMask ) {/* nothing */};
~EntryWidgetDialog() {/* nothing */};
void setMainWidget( EntryWidget *widget )
{
@@ -132,7 +132,7 @@ namespace KBibTeX
};
protected:
- void closeEvent( QCloseEvent * e )
+ void closeEvent( TQCloseEvent * e )
{
if ( m_widget->queryClose() ) e->accept();
else e->ignore();
@@ -141,12 +141,12 @@ namespace KBibTeX
protected slots:
void slotCancel()
{
- if ( m_widget->queryClose() ) QDialog::done( Cancel );
+ if ( m_widget->queryClose() ) TQDialog::done( Cancel );
}
void slotClose()
{
- if ( m_widget->queryClose() ) QDialog::done( Cancel );
+ if ( m_widget->queryClose() ) TQDialog::done( Cancel );
}
private:
diff --git a/src/entrywidgetauthor.cpp b/src/entrywidgetauthor.cpp
index 32e2e18..578a9d8 100644
--- a/src/entrywidgetauthor.cpp
+++ b/src/entrywidgetauthor.cpp
@@ -17,8 +17,8 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qlayout.h>
-#include <qlabel.h>
+#include <ntqlayout.h>
+#include <ntqlabel.h>
#include <kdialog.h>
#include <klocale.h>
@@ -30,7 +30,7 @@
namespace KBibTeX
{
- EntryWidgetAuthor::EntryWidgetAuthor( BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent, const char *name )
+ EntryWidgetAuthor::EntryWidgetAuthor( BibTeX::File *bibtexfile, bool isReadOnly, TQWidget *parent, const char *name )
: EntryWidgetTab( bibtexfile, isReadOnly, parent, name )
{
setupGUI();
@@ -75,7 +75,7 @@ namespace KBibTeX
m_fieldListViewEditor->setValue( field != NULL ? field->value() : NULL );
}
- void EntryWidgetAuthor::updateWarnings( BibTeX::Entry::EntryType entryType, QListView *listViewWarnings )
+ void EntryWidgetAuthor::updateWarnings( BibTeX::Entry::EntryType entryType, TQListView *listViewWarnings )
{
if ( entryType == BibTeX::Entry::etBook || entryType == BibTeX::Entry::etInBook )
{
@@ -92,17 +92,17 @@ namespace KBibTeX
void EntryWidgetAuthor::setupGUI()
{
- QGridLayout * gridLayout = new QGridLayout( this, 2, 3, KDialog::marginHint(), KDialog::spacingHint(), "gridLayout" );
+ TQGridLayout * gridLayout = new TQGridLayout( this, 2, 3, KDialog::marginHint(), KDialog::spacingHint(), "gridLayout" );
gridLayout->setColSpacing( 1, KDialog::spacingHint() * 4 );
- QLabel *label = new QLabel( QString( "%1:" ).arg( i18n( "Author" ) ), this );
+ TQLabel *label = new TQLabel( TQString( "%1:" ).arg( i18n( "Author" ) ), this );
gridLayout->addWidget( label, 0, 0 );
m_fieldListViewAuthor = new KBibTeX::FieldListView( i18n( "Author" ), i18n( "May only contain ASCII characters, in case of doubt keep English form", "NewAuthor" ), m_isReadOnly, this );
m_fieldListViewAuthor->setFieldType( BibTeX::EntryField::ftAuthor );
gridLayout->addWidget( m_fieldListViewAuthor, 1, 0 );
label->setBuddy( m_fieldListViewAuthor );
- label = new QLabel( QString( "%1:" ).arg( i18n( "Editor" ) ), this );
+ label = new TQLabel( TQString( "%1:" ).arg( i18n( "Editor" ) ), this );
gridLayout->addWidget( label, 0, 2 );
m_fieldListViewEditor = new KBibTeX::FieldListView( i18n( "Editor" ), i18n( "May only contain ASCII characters, in case of doubt keep English form", "NewEditor" ), m_isReadOnly, this );
m_fieldListViewEditor->setFieldType( BibTeX::EntryField::ftEditor );
diff --git a/src/entrywidgetauthor.h b/src/entrywidgetauthor.h
index 1986614..60f89f8 100644
--- a/src/entrywidgetauthor.h
+++ b/src/entrywidgetauthor.h
@@ -22,8 +22,8 @@
#include <entrywidgettab.h>
-class QWidget;
-class QScrollView;
+class TQWidget;
+class TQScrollView;
namespace KBibTeX
{
@@ -36,7 +36,7 @@ namespace KBibTeX
{
Q_OBJECT
public:
- EntryWidgetAuthor( BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+ EntryWidgetAuthor( BibTeX::File *bibtexfile, bool isReadOnly, TQWidget *parent = 0, const char *name = 0 );
~EntryWidgetAuthor();
bool isModified();
@@ -45,7 +45,7 @@ namespace KBibTeX
void updateGUI( BibTeX::Entry::EntryType entryType, bool enableAll );
void apply( BibTeX::Entry *entry );
void reset( BibTeX::Entry *entry );
- void updateWarnings( BibTeX::Entry::EntryType entryType, QListView *listViewWarnings );
+ void updateWarnings( BibTeX::Entry::EntryType entryType, TQListView *listViewWarnings );
private:
FieldListView *m_fieldListViewAuthor;
diff --git a/src/entrywidgetexternal.cpp b/src/entrywidgetexternal.cpp
index a672e25..f316c82 100644
--- a/src/entrywidgetexternal.cpp
+++ b/src/entrywidgetexternal.cpp
@@ -17,9 +17,9 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qtooltip.h>
+#include <ntqlayout.h>
+#include <ntqlabel.h>
+#include <ntqtooltip.h>
#include <kpushbutton.h>
#include <kdialog.h>
@@ -39,9 +39,9 @@ namespace KBibTeX
const int EntryWidgetExternal::m_menuIdCurrentDirectory = 8192;
const int EntryWidgetExternal::m_menuIdPreviousDirectory = 8191;
- QString EntryWidgetExternal::m_previousDirectory = QString::null;
+ TQString EntryWidgetExternal::m_previousDirectory = TQString::null;
- EntryWidgetExternal::EntryWidgetExternal( BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent, const char *name )
+ EntryWidgetExternal::EntryWidgetExternal( BibTeX::File *bibtexfile, bool isReadOnly, TQWidget *parent, const char *name )
: EntryWidgetTab( bibtexfile, isReadOnly, parent, name )
{
setupGUI();
@@ -110,7 +110,7 @@ namespace KBibTeX
connect( m_fieldLineEditLocalFile, SIGNAL( textChanged() ), this, SLOT( updateGUI() ) );
}
- void EntryWidgetExternal::updateWarnings( BibTeX::Entry::EntryType entryType, QListView *listViewWarnings )
+ void EntryWidgetExternal::updateWarnings( BibTeX::Entry::EntryType entryType, TQListView *listViewWarnings )
{
addMissingWarning( entryType, BibTeX::EntryField::ftURL, m_fieldLineEditURL->caption(), !m_fieldLineEditURL->isEmpty(), m_fieldLineEditURL, listViewWarnings );
@@ -135,7 +135,7 @@ namespace KBibTeX
m_pushButtonOpenURL->setEnabled( FALSE );
}
- void EntryWidgetExternal::openURL( const QString &url )
+ void EntryWidgetExternal::openURL( const TQString &url )
{
Settings::openUrl( KURL( url ), this );
}
@@ -163,14 +163,14 @@ namespace KBibTeX
void EntryWidgetExternal::browseLocalFile( int id )
{
Settings * settings = Settings::self();
- QString startDir = QString::null;
- if ( id == m_menuIdPreviousDirectory && m_previousDirectory != QString::null )
+ TQString startDir = TQString::null;
+ if ( id == m_menuIdPreviousDirectory && m_previousDirectory != TQString::null )
startDir = m_previousDirectory;
else if ( settings->editing_DocumentSearchPaths.size() > ( unsigned int )id )
startDir = *settings->editing_DocumentSearchPaths.at( id );
else
- startDir = QDir::currentDirPath();
- QString filename = KFileDialog::getOpenFileName( startDir );
+ startDir = TQDir::currentDirPath();
+ TQString filename = KFileDialog::getOpenFileName( startDir );
if ( !filename.isEmpty() )
{
@@ -191,12 +191,12 @@ namespace KBibTeX
value->items.append( new BibTeX::PlainText( filename ) );
m_fieldLineEditLocalFile->setValue( value );
- if ( m_previousDirectory == QString::null )
+ if ( m_previousDirectory == TQString::null )
{
- QPopupMenu *menu = m_pushButtonBrowseLocalFile->popup();
- menu->insertItem( QIconSet( SmallIcon( "favorite" ) ), i18n( "Previously used directory" ), m_menuIdPreviousDirectory, 2 );
+ TQPopupMenu *menu = m_pushButtonBrowseLocalFile->popup();
+ menu->insertItem( TQIconSet( SmallIcon( "favorite" ) ), i18n( "Previously used directory" ), m_menuIdPreviousDirectory, 2 );
}
- QFileInfo fileInfo( filename );
+ TQFileInfo fileInfo( filename );
m_previousDirectory = fileInfo.dirPath( true );
}
}
@@ -217,10 +217,10 @@ namespace KBibTeX
{
Settings * settings = Settings::self();
- QGridLayout * gridLayout = new QGridLayout( this, 5, 3, KDialog::marginHint(), KDialog::spacingHint(), "gridLayout" );
+ TQGridLayout * gridLayout = new TQGridLayout( this, 5, 3, KDialog::marginHint(), KDialog::spacingHint(), "gridLayout" );
gridLayout->setRowStretch( 4, 10 );
- QLabel *label = new QLabel( QString( "%1:" ).arg( i18n( "URL" ) ), this );
+ TQLabel *label = new TQLabel( TQString( "%1:" ).arg( i18n( "URL" ) ), this );
gridLayout->addWidget( label, 0, 0 );
m_fieldLineEditURL = new KBibTeX::FieldLineEdit( i18n( "URL" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditURL" );
m_fieldLineEditURL->setFieldType( BibTeX::EntryField::ftURL );
@@ -230,30 +230,30 @@ namespace KBibTeX
m_pushButtonOpenURL = new KPushButton( this );
gridLayout->addWidget( m_pushButtonOpenURL, 0, 2 );
- m_pushButtonOpenURL->setIconSet( QIconSet( SmallIcon( "fileopen" ) ) );
- m_pushButtonOpenURL->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
- QToolTip::add( m_pushButtonOpenURL, QString( i18n( "Open %1" ) ).arg( i18n( "URL" ) ) );
+ m_pushButtonOpenURL->setIconSet( TQIconSet( SmallIcon( "fileopen" ) ) );
+ m_pushButtonOpenURL->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum );
+ TQToolTip::add( m_pushButtonOpenURL, TQString( i18n( "Open %1" ) ).arg( i18n( "URL" ) ) );
connect( m_pushButtonOpenURL, SIGNAL( clicked() ), this, SLOT( openURL() ) );
- KURLLabel *urllabel = new KURLLabel( "http://www.doi.org/", QString( "%1:" ).arg( i18n( "DOI" ) ), this );
- QToolTip::add( urllabel, i18n( "Digital Object Identifier" ) );
- urllabel->setFocusPolicy( QWidget::NoFocus );
+ KURLLabel *urllabel = new KURLLabel( "http://www.doi.org/", TQString( "%1:" ).arg( i18n( "DOI" ) ), this );
+ TQToolTip::add( urllabel, i18n( "Digital Object Identifier" ) );
+ urllabel->setFocusPolicy( TQWidget::NoFocus );
gridLayout->addWidget( urllabel, 1, 0 );
m_fieldLineEditDoi = new KBibTeX::FieldLineEdit( i18n( "DOI" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditDoi" );
m_fieldLineEditDoi->setFieldType( BibTeX::EntryField::ftDoi );
gridLayout->addWidget( m_fieldLineEditDoi, 1, 1 );
urllabel->setBuddy( m_fieldLineEditDoi );
connect( m_fieldLineEditDoi, SIGNAL( textChanged() ), this, SLOT( updateGUI() ) );
- connect( urllabel, SIGNAL( leftClickedURL( const QString& ) ), this, SLOT( openURL( const QString& ) ) );
+ connect( urllabel, SIGNAL( leftClickedURL( const TQString& ) ), this, SLOT( openURL( const TQString& ) ) );
m_pushButtonOpenDoi = new KPushButton( this );
gridLayout->addWidget( m_pushButtonOpenDoi, 1, 2 );
- m_pushButtonOpenDoi->setIconSet( QIconSet( SmallIcon( "fileopen" ) ) );
- m_pushButtonOpenDoi->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
- QToolTip::add( m_pushButtonOpenDoi, i18n( "Open DOI" ) );
+ m_pushButtonOpenDoi->setIconSet( TQIconSet( SmallIcon( "fileopen" ) ) );
+ m_pushButtonOpenDoi->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum );
+ TQToolTip::add( m_pushButtonOpenDoi, i18n( "Open DOI" ) );
connect( m_pushButtonOpenDoi, SIGNAL( clicked() ), this, SLOT( openDoi() ) );
- label = new QLabel( QString( "%1:" ).arg( i18n( "Local File" ) ), this );
+ label = new TQLabel( TQString( "%1:" ).arg( i18n( "Local File" ) ), this );
gridLayout->addWidget( label, 2, 0 );
m_fieldLineEditLocalFile = new KBibTeX::FieldLineEdit( i18n( "Local File" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditLocalFile" );
m_fieldLineEditLocalFile->setFieldType( BibTeX::EntryField::ftLocalFile );
@@ -263,32 +263,32 @@ namespace KBibTeX
m_pushButtonOpenLocalFile = new KPushButton( this );
gridLayout->addWidget( m_pushButtonOpenLocalFile, 2, 2 );
- m_pushButtonOpenLocalFile->setIconSet( QIconSet( SmallIcon( "fileopen" ) ) );
- m_pushButtonOpenLocalFile->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
- QToolTip::add( m_pushButtonOpenLocalFile, QString( i18n( "Open %1" ) ).arg( i18n( "Local File" ) ) );
+ m_pushButtonOpenLocalFile->setIconSet( TQIconSet( SmallIcon( "fileopen" ) ) );
+ m_pushButtonOpenLocalFile->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum );
+ TQToolTip::add( m_pushButtonOpenLocalFile, TQString( i18n( "Open %1" ) ).arg( i18n( "Local File" ) ) );
connect( m_pushButtonOpenLocalFile, SIGNAL( clicked() ), this, SLOT( openLocalFile() ) );
- QWidget *container = new QWidget( this );
- QHBoxLayout *containerLayout = new QHBoxLayout( container );
+ TQWidget *container = new TQWidget( this );
+ TQHBoxLayout *containerLayout = new TQHBoxLayout( container );
gridLayout->addWidget( container, 3, 1 );
m_pushButtonBrowseLocalFile = new KPushButton( i18n( "&Browse..." ), container );
- QToolTip::add( m_pushButtonBrowseLocalFile, i18n( "Browse for a local file" ) );
- m_pushButtonBrowseLocalFile->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
+ TQToolTip::add( m_pushButtonBrowseLocalFile, i18n( "Browse for a local file" ) );
+ m_pushButtonBrowseLocalFile->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum );
containerLayout->addWidget( m_pushButtonBrowseLocalFile );
containerLayout->addStretch( 10 );
- m_pushButtonBrowseLocalFile->setIconSet( QIconSet( SmallIcon( "fileopen" ) ) );
+ m_pushButtonBrowseLocalFile->setIconSet( TQIconSet( SmallIcon( "fileopen" ) ) );
KPopupMenu *menu = new KPopupMenu( m_pushButtonBrowseLocalFile );
menu->insertTitle( i18n( "Select base directory" ) );
- menu->insertItem( QIconSet( SmallIcon( "favorite" ) ), i18n( "Current directory" ), m_menuIdCurrentDirectory );
- if ( m_previousDirectory != QString::null )
- menu->insertItem( QIconSet( SmallIcon( "favorite" ) ), i18n( "Previously used directory" ), m_menuIdPreviousDirectory );
+ menu->insertItem( TQIconSet( SmallIcon( "favorite" ) ), i18n( "Current directory" ), m_menuIdCurrentDirectory );
+ if ( m_previousDirectory != TQString::null )
+ menu->insertItem( TQIconSet( SmallIcon( "favorite" ) ), i18n( "Previously used directory" ), m_menuIdPreviousDirectory );
if ( !settings->editing_DocumentSearchPaths.isEmpty() )
{
menu->insertSeparator();
int i = 0;
- for ( QStringList::Iterator it = settings->editing_DocumentSearchPaths.begin(); it != settings->editing_DocumentSearchPaths.end(); ++it, ++i )
- menu->insertItem( QIconSet( SmallIcon( "folder" ) ), *it, i );
+ for ( TQStringList::Iterator it = settings->editing_DocumentSearchPaths.begin(); it != settings->editing_DocumentSearchPaths.end(); ++it, ++i )
+ menu->insertItem( TQIconSet( SmallIcon( "folder" ) ), *it, i );
}
m_pushButtonBrowseLocalFile->setPopup( menu );
connect( menu, SIGNAL( activated( int ) ), this, SLOT( browseLocalFile( int ) ) );
diff --git a/src/entrywidgetexternal.h b/src/entrywidgetexternal.h
index 16cb608..525b9b7 100644
--- a/src/entrywidgetexternal.h
+++ b/src/entrywidgetexternal.h
@@ -37,7 +37,7 @@ namespace KBibTeX
{
Q_OBJECT
public:
- EntryWidgetExternal( BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+ EntryWidgetExternal( BibTeX::File *bibtexfile, bool isReadOnly, TQWidget *parent = 0, const char *name = 0 );
~EntryWidgetExternal();
bool isModified();
@@ -46,11 +46,11 @@ namespace KBibTeX
void updateGUI( BibTeX::Entry::EntryType entryType, bool enableAll );
void apply( BibTeX::Entry *entry );
void reset( BibTeX::Entry *entry );
- void updateWarnings( BibTeX::Entry::EntryType entryType, QListView *listViewWarnings );
+ void updateWarnings( BibTeX::Entry::EntryType entryType, TQListView *listViewWarnings );
private slots:
void openURL();
- void openURL( const QString & );
+ void openURL( const TQString & );
void openDoi();
void openLocalFile();
void browseLocalFile( int id );
@@ -65,7 +65,7 @@ namespace KBibTeX
KPushButton *m_pushButtonOpenLocalFile;
KPushButton *m_pushButtonBrowseLocalFile;
- static QString m_previousDirectory;
+ static TQString m_previousDirectory;
static const int m_menuIdCurrentDirectory, m_menuIdPreviousDirectory;
void setupGUI();
diff --git a/src/entrywidgetkeyword.cpp b/src/entrywidgetkeyword.cpp
index b61acc0..da34947 100644
--- a/src/entrywidgetkeyword.cpp
+++ b/src/entrywidgetkeyword.cpp
@@ -17,12 +17,12 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qlayout.h>
-#include <qregexp.h>
-#include <qpushbutton.h>
-#include <qtooltip.h>
-#include <qtimer.h>
-#include <qlabel.h>
+#include <ntqlayout.h>
+#include <ntqregexp.h>
+#include <ntqpushbutton.h>
+#include <ntqtooltip.h>
+#include <ntqtimer.h>
+#include <ntqlabel.h>
#include <kdialog.h>
#include <klocale.h>
@@ -38,7 +38,7 @@
namespace KBibTeX
{
- KeywordListViewItem::KeywordListViewItem( KListView * parent, const QString & text, bool global ) : QCheckListItem( parent, text, QCheckListItem::CheckBox )
+ KeywordListViewItem::KeywordListViewItem( KListView * parent, const TQString & text, bool global ) : TQCheckListItem( parent, text, TQCheckListItem::CheckBox )
{
setGlobal( global );
}
@@ -63,7 +63,7 @@ namespace KBibTeX
}
}
- EntryWidgetKeyword::EntryWidgetKeyword( BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent, const char *name ) : EntryWidgetTab( bibtexfile, isReadOnly, parent, name ), m_bibtexfile( bibtexfile ), m_isModified( FALSE ), m_numKeywords( 0 )
+ EntryWidgetKeyword::EntryWidgetKeyword( BibTeX::File *bibtexfile, bool isReadOnly, TQWidget *parent, const char *name ) : EntryWidgetTab( bibtexfile, isReadOnly, parent, name ), m_bibtexfile( bibtexfile ), m_isModified( FALSE ), m_numKeywords( 0 )
{
setupGUI();
}
@@ -119,7 +119,7 @@ namespace KBibTeX
BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftKeywords );
BibTeX::KeywordContainer *keywordContainer = NULL;
if ( field != NULL && ( keywordContainer = dynamic_cast<BibTeX::KeywordContainer*>( field->value()->items.first() ) ) != NULL )
- for ( QValueList<BibTeX::Keyword*>::Iterator it = keywordContainer->keywords.begin(); it != keywordContainer->keywords.end(); ++it )
+ for ( TQValueList<BibTeX::Keyword*>::Iterator it = keywordContainer->keywords.begin(); it != keywordContainer->keywords.end(); ++it )
m_usedKeywords.append(( *it )->text() );
if ( m_bibtexfile != NULL )
@@ -128,18 +128,18 @@ namespace KBibTeX
KBibTeX::Settings * settings = KBibTeX::Settings::self();
m_globalKeywords = settings->keyword_GlobalList;
- m_availableKeywords = QStringList( m_globalKeywords );
- for ( QStringList::Iterator it = m_fileKeywords.begin(); it != m_fileKeywords.end(); ++it )
+ m_availableKeywords = TQStringList( m_globalKeywords );
+ for ( TQStringList::Iterator it = m_fileKeywords.begin(); it != m_fileKeywords.end(); ++it )
if ( !m_availableKeywords.contains( *it ) )
m_availableKeywords.append( *it );
- for ( QStringList::Iterator it = m_usedKeywords.begin(); it != m_usedKeywords.end(); ++it )
+ for ( TQStringList::Iterator it = m_usedKeywords.begin(); it != m_usedKeywords.end(); ++it )
if ( !m_availableKeywords.contains( *it ) )
m_availableKeywords.append( *it );
setListView();
}
- void EntryWidgetKeyword::updateWarnings( BibTeX::Entry::EntryType /*entryType*/, QListView */*listViewWarnings*/ )
+ void EntryWidgetKeyword::updateWarnings( BibTeX::Entry::EntryType /*entryType*/, TQListView */*listViewWarnings*/ )
{
// nothing
}
@@ -152,7 +152,7 @@ namespace KBibTeX
m_buttonToggleGlobal->setEnabled( hasCurrent );
}
- void EntryWidgetKeyword::slotKeywordRenamed( QListViewItem * item, const QString & text, int /*col*/ )
+ void EntryWidgetKeyword::slotKeywordRenamed( TQListViewItem * item, const TQString & text, int /*col*/ )
{
KeywordListViewItem *kwlvi = dynamic_cast<KeywordListViewItem*>( item );
if ( text.isEmpty() )
@@ -165,7 +165,7 @@ namespace KBibTeX
if ( m_availableKeywords.contains( text ) )
{
item->setText( 0, m_beforeRenaming );
- KMessageBox::error( this, QString( i18n( "The keyword '%1' does already exist in the list of keywords.\nThe old name has been restored." ) ).arg( text ), i18n( "Renaming keyword failed" ) );
+ KMessageBox::error( this, TQString( i18n( "The keyword '%1' does already exist in the list of keywords.\nThe old name has been restored." ) ).arg( text ), i18n( "Renaming keyword failed" ) );
}
else
{
@@ -181,7 +181,7 @@ namespace KBibTeX
m_fileKeywords.remove( m_beforeRenaming );
m_fileKeywords.append( text );
}
- QCheckListItem *checkedItem = dynamic_cast<QCheckListItem*>( item );
+ TQCheckListItem *checkedItem = dynamic_cast<TQCheckListItem*>( item );
if ( checkedItem != NULL )
checkedItem->setOn( TRUE );
}
@@ -190,14 +190,14 @@ namespace KBibTeX
void EntryWidgetKeyword::slotNewKeyword()
{
- KeywordListViewItem * item = new KeywordListViewItem( m_listviewKeywords, QString( i18n( "May only contain ASCII characters, in case of doubt keep English form", "NewKeyword%1" ) ).arg( ++m_numKeywords ), FALSE );
+ KeywordListViewItem * item = new KeywordListViewItem( m_listviewKeywords, TQString( i18n( "May only contain ASCII characters, in case of doubt keep English form", "NewKeyword%1" ) ).arg( ++m_numKeywords ), FALSE );
m_listviewKeywords->setSelected( item, TRUE );
- QTimer::singleShot( 100, this, SLOT( slotEditKeyword() ) );
+ TQTimer::singleShot( 100, this, SLOT( slotEditKeyword() ) );
}
void EntryWidgetKeyword::slotEditKeyword()
{
- QListViewItem * item = m_listviewKeywords->selectedItem();
+ TQListViewItem * item = m_listviewKeywords->selectedItem();
if ( item != NULL )
{
m_beforeRenaming = item->text( 0 );
@@ -222,7 +222,7 @@ namespace KBibTeX
void EntryWidgetKeyword::setupGUI()
{
- QGridLayout * gridLayout = new QGridLayout( this, 6, 2, KDialog::marginHint(), KDialog::spacingHint(), "gridLayout" );
+ TQGridLayout * gridLayout = new TQGridLayout( this, 6, 2, KDialog::marginHint(), KDialog::spacingHint(), "gridLayout" );
gridLayout->setRowStretch( 4, 1 );
m_listviewKeywords = new KListView( this );
@@ -231,33 +231,33 @@ namespace KBibTeX
m_listviewKeywords->addColumn( i18n( "Origin" ) );
gridLayout->addMultiCellWidget( m_listviewKeywords, 0, 4, 0, 0 );
m_listviewKeywords->setAllColumnsShowFocus( TRUE );
- connect( m_listviewKeywords, SIGNAL( currentChanged( QListViewItem* ) ), this, SLOT( slotSelectionChanged() ) );
- connect( m_listviewKeywords, SIGNAL( clicked( QListViewItem * ) ), this, SLOT( slotSelectionChanged() ) );
- connect( m_listviewKeywords, SIGNAL( itemRenamed( QListViewItem*, const QString&, int ) ), this, SLOT( slotKeywordRenamed( QListViewItem*, const QString&, int ) ) );
+ connect( m_listviewKeywords, SIGNAL( currentChanged( TQListViewItem* ) ), this, SLOT( slotSelectionChanged() ) );
+ connect( m_listviewKeywords, SIGNAL( clicked( TQListViewItem * ) ), this, SLOT( slotSelectionChanged() ) );
+ connect( m_listviewKeywords, SIGNAL( itemRenamed( TQListViewItem*, const TQString&, int ) ), this, SLOT( slotKeywordRenamed( TQListViewItem*, const TQString&, int ) ) );
- m_buttonNew = new QPushButton( i18n( "keyword", "New" ), this );
+ m_buttonNew = new TQPushButton( i18n( "keyword", "New" ), this );
m_buttonNew->setEnabled( !m_isReadOnly );
- m_buttonNew->setIconSet( QIconSet( SmallIcon( "add" ) ) );
- QToolTip::add( m_buttonNew, i18n( "Add a new keyword to the list" ) );
+ m_buttonNew->setIconSet( TQIconSet( SmallIcon( "add" ) ) );
+ TQToolTip::add( m_buttonNew, i18n( "Add a new keyword to the list" ) );
gridLayout->addWidget( m_buttonNew, 0, 1 );
connect( m_buttonNew, SIGNAL( clicked() ), this, SLOT( slotNewKeyword() ) );
- m_buttonEdit = new QPushButton( i18n( "keyword", "Edit" ), this );
- m_buttonEdit->setIconSet( QIconSet( SmallIcon( "edit" ) ) );
- QToolTip::add( m_buttonEdit, i18n( "Edit the selected keyword" ) );
+ m_buttonEdit = new TQPushButton( i18n( "keyword", "Edit" ), this );
+ m_buttonEdit->setIconSet( TQIconSet( SmallIcon( "edit" ) ) );
+ TQToolTip::add( m_buttonEdit, i18n( "Edit the selected keyword" ) );
gridLayout->addWidget( m_buttonEdit, 1, 1 );
m_buttonEdit->setEnabled( FALSE );
connect( m_buttonEdit, SIGNAL( clicked() ), this, SLOT( slotEditKeyword() ) );
- m_buttonToggleGlobal = new QPushButton( i18n( "keyword", "Toggle &global" ), this );
- m_buttonToggleGlobal->setIconSet( QIconSet( SmallIcon( "package" ) ) );
- QToolTip::add( m_buttonToggleGlobal, i18n( "Add or remove the selected keyword to or from the global list" ) );
+ m_buttonToggleGlobal = new TQPushButton( i18n( "keyword", "Toggle &global" ), this );
+ m_buttonToggleGlobal->setIconSet( TQIconSet( SmallIcon( "package" ) ) );
+ TQToolTip::add( m_buttonToggleGlobal, i18n( "Add or remove the selected keyword to or from the global list" ) );
gridLayout->addWidget( m_buttonToggleGlobal, 2, 1 );
m_buttonToggleGlobal->setEnabled( FALSE );
connect( m_buttonToggleGlobal, SIGNAL( clicked() ), this, SLOT( slotToggleGlobal() ) );
- QLabel *label = new QLabel( i18n( "There is no need to delete keywords. Simply uncheck unwanted keywords and make them non-global.\nGlobal keywords can also be edited in the settings dialog." ), this );
- label->setAlignment( QLabel::WordBreak | QLabel::AlignTop );
+ TQLabel *label = new TQLabel( i18n( "There is no need to delete keywords. Simply uncheck unwanted keywords and make them non-global.\nGlobal keywords can also be edited in the settings dialog." ), this );
+ label->setAlignment( TQLabel::WordBreak | TQLabel::AlignTop );
gridLayout->addMultiCellWidget( label, 5, 5, 0, 1 );
}
@@ -265,7 +265,7 @@ namespace KBibTeX
{
m_availableKeywords.sort();
m_listviewKeywords->clear();
- for ( QStringList::Iterator it = m_availableKeywords.begin(); it != m_availableKeywords.end(); ++it )
+ for ( TQStringList::Iterator it = m_availableKeywords.begin(); it != m_availableKeywords.end(); ++it )
{
KeywordListViewItem *item = new KeywordListViewItem( m_listviewKeywords, *it, m_globalKeywords.contains( *it ) );
if ( m_usedKeywords.contains( *it ) )
@@ -276,7 +276,7 @@ namespace KBibTeX
void EntryWidgetKeyword::readListView()
{
m_usedKeywords.clear();
- for ( QListViewItemIterator it = QListViewItemIterator( m_listviewKeywords, QListViewItemIterator::Checked ); it.current() != NULL; ++it )
+ for ( TQListViewItemIterator it = TQListViewItemIterator( m_listviewKeywords, TQListViewItemIterator::Checked ); it.current() != NULL; ++it )
m_usedKeywords.append(( *it ) ->text( 0 ) );
}
}
diff --git a/src/entrywidgetkeyword.h b/src/entrywidgetkeyword.h
index 88eae61..e8a7c75 100644
--- a/src/entrywidgetkeyword.h
+++ b/src/entrywidgetkeyword.h
@@ -22,15 +22,15 @@
#include <entrywidgettab.h>
-class QPushButton;
+class TQPushButton;
class KListView;
namespace KBibTeX
{
- class KeywordListViewItem: public QCheckListItem
+ class KeywordListViewItem: public TQCheckListItem
{
public:
- KeywordListViewItem( KListView * parent, const QString & text, bool isGlobal );
+ KeywordListViewItem( KListView * parent, const TQString & text, bool isGlobal );
~KeywordListViewItem();
bool isGlobal()
@@ -50,7 +50,7 @@ namespace KBibTeX
{
Q_OBJECT
public:
- EntryWidgetKeyword( BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+ EntryWidgetKeyword( BibTeX::File *bibtexfile, bool isReadOnly, TQWidget *parent = 0, const char *name = 0 );
~EntryWidgetKeyword();
bool isModified();
@@ -59,33 +59,33 @@ namespace KBibTeX
void updateGUI( BibTeX::Entry::EntryType entryType, bool enableAll );
void apply( BibTeX::Entry *entry );
void reset( BibTeX::Entry *entry );
- void updateWarnings( BibTeX::Entry::EntryType entryType, QListView *listViewWarnings );
+ void updateWarnings( BibTeX::Entry::EntryType entryType, TQListView *listViewWarnings );
private slots:
void slotSelectionChanged();
- void slotKeywordRenamed( QListViewItem * item, const QString & text, int col );
+ void slotKeywordRenamed( TQListViewItem * item, const TQString & text, int col );
void slotNewKeyword();
void slotEditKeyword();
void slotToggleGlobal();
private:
BibTeX::File *m_bibtexfile;
- QStringList m_availableKeywords;
- QStringList m_globalKeywords;
- QStringList m_fileKeywords;
- QStringList m_usedKeywords;
+ TQStringList m_availableKeywords;
+ TQStringList m_globalKeywords;
+ TQStringList m_fileKeywords;
+ TQStringList m_usedKeywords;
bool m_isModified;
KListView *m_listviewKeywords;
- QPushButton *m_buttonNew;
- QPushButton *m_buttonEdit;
- QPushButton *m_buttonToggleGlobal;
+ TQPushButton *m_buttonNew;
+ TQPushButton *m_buttonEdit;
+ TQPushButton *m_buttonToggleGlobal;
int m_numKeywords;
- QString m_beforeRenaming;
+ TQString m_beforeRenaming;
void setupGUI();
void setListView();
void readListView();
- bool editKeywords( QStringList *keywords );
+ bool editKeywords( TQStringList *keywords );
};
}
diff --git a/src/entrywidgetmisc.cpp b/src/entrywidgetmisc.cpp
index f2e4f5e..66ec617 100644
--- a/src/entrywidgetmisc.cpp
+++ b/src/entrywidgetmisc.cpp
@@ -17,8 +17,8 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qlayout.h>
-#include <qlabel.h>
+#include <ntqlayout.h>
+#include <ntqlabel.h>
#include <kdialog.h>
#include <klocale.h>
@@ -31,7 +31,7 @@
namespace KBibTeX
{
- EntryWidgetMisc::EntryWidgetMisc( BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent, const char *name )
+ EntryWidgetMisc::EntryWidgetMisc( BibTeX::File *bibtexfile, bool isReadOnly, TQWidget *parent, const char *name )
: EntryWidgetTab( bibtexfile, isReadOnly, parent, name )
{
setupGUI();
@@ -103,7 +103,7 @@ namespace KBibTeX
m_fieldLineEditAbstract->setValue( field != NULL ? field->value() : NULL );
}
- void EntryWidgetMisc::updateWarnings( BibTeX::Entry::EntryType entryType, QListView *listViewWarnings )
+ void EntryWidgetMisc::updateWarnings( BibTeX::Entry::EntryType entryType, TQListView *listViewWarnings )
{
addMissingWarning( entryType, BibTeX::EntryField::ftType, m_fieldLineEditType->caption(), !m_fieldLineEditType->isEmpty(), m_fieldLineEditType, listViewWarnings );
@@ -128,39 +128,39 @@ namespace KBibTeX
void EntryWidgetMisc::setupGUI()
{
- QGridLayout * gridLayout = new QGridLayout( this, 5, 5, KDialog::marginHint(), KDialog::spacingHint(), "gridLayout" );
+ TQGridLayout * gridLayout = new TQGridLayout( this, 5, 5, KDialog::marginHint(), KDialog::spacingHint(), "gridLayout" );
gridLayout->setColSpacing( 2, KDialog::spacingHint() * 4 );
gridLayout->setRowStretch( 4, 1 );
- QLabel *label = new QLabel( QString( "%1:" ).arg( i18n( "Type" ) ), this );
+ TQLabel *label = new TQLabel( TQString( "%1:" ).arg( i18n( "Type" ) ), this );
gridLayout->addWidget( label, 0, 0 );
m_fieldLineEditType = new KBibTeX::FieldLineEdit( i18n( "Type" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditType" );
m_fieldLineEditType->setFieldType( BibTeX::EntryField::ftType );
label->setBuddy( m_fieldLineEditType );
gridLayout->addWidget( m_fieldLineEditType, 0, 1 );
- label = new QLabel( QString( "%1:" ).arg( i18n( "Key" ) ), this );
+ label = new TQLabel( TQString( "%1:" ).arg( i18n( "Key" ) ), this );
gridLayout->addWidget( label, 0, 3 );
m_fieldLineEditKey = new KBibTeX::FieldLineEdit( i18n( "Key" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditKey" );
m_fieldLineEditKey->setFieldType( BibTeX::EntryField::ftKey );
label->setBuddy( m_fieldLineEditKey );
gridLayout->addWidget( m_fieldLineEditKey, 0, 4 );
- label = new QLabel( QString( "%1:" ).arg( i18n( "Note" ) ), this );
+ label = new TQLabel( TQString( "%1:" ).arg( i18n( "Note" ) ), this );
gridLayout->addWidget( label, 1, 0 );
m_fieldLineEditNote = new KBibTeX::FieldLineEdit( i18n( "Note" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditNote" );
m_fieldLineEditNote->setFieldType( BibTeX::EntryField::ftNote );
label->setBuddy( m_fieldLineEditNote );
gridLayout->addMultiCellWidget( m_fieldLineEditNote, 1, 1, 1, 4 );
- label = new QLabel( QString( "%1:" ).arg( i18n( "Annote" ) ), this );
+ label = new TQLabel( TQString( "%1:" ).arg( i18n( "Annote" ) ), this );
gridLayout->addWidget( label, 2, 0 );
m_fieldLineEditAnnote = new KBibTeX::FieldLineEdit( i18n( "Annote" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditAnnote" );
m_fieldLineEditAnnote->setFieldType( BibTeX::EntryField::ftAnnote );
label->setBuddy( m_fieldLineEditAnnote );
gridLayout->addMultiCellWidget( m_fieldLineEditAnnote, 2, 2, 1, 4 );
- label = new QLabel( QString( "%1:" ).arg( i18n( "Abstract" ) ), this );
+ label = new TQLabel( TQString( "%1:" ).arg( i18n( "Abstract" ) ), this );
gridLayout->addWidget( label, 3, 0 );
m_fieldLineEditAbstract = new KBibTeX::FieldLineEdit( i18n( "Abstract" ), KBibTeX::FieldLineEdit::itMultiLine, m_isReadOnly, this, "m_fieldLineEditAbstract" );
m_fieldLineEditAbstract->setFieldType( BibTeX::EntryField::ftAbstract );
diff --git a/src/entrywidgetmisc.h b/src/entrywidgetmisc.h
index 5cb99b2..5cef564 100644
--- a/src/entrywidgetmisc.h
+++ b/src/entrywidgetmisc.h
@@ -30,7 +30,7 @@ namespace KBibTeX
{
Q_OBJECT
public:
- EntryWidgetMisc( BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+ EntryWidgetMisc( BibTeX::File *bibtexfile, bool isReadOnly, TQWidget *parent = 0, const char *name = 0 );
~EntryWidgetMisc();
bool isModified();
@@ -39,7 +39,7 @@ namespace KBibTeX
void updateGUI( BibTeX::Entry::EntryType entryType, bool enableAll );
void apply( BibTeX::Entry *entry );
void reset( BibTeX::Entry *entry );
- void updateWarnings( BibTeX::Entry::EntryType entryType, QListView *listViewWarnings );
+ void updateWarnings( BibTeX::Entry::EntryType entryType, TQListView *listViewWarnings );
private:
FieldLineEdit *m_fieldLineEditType;
diff --git a/src/entrywidgetother.cpp b/src/entrywidgetother.cpp
index 1c5d13b..cd165f2 100644
--- a/src/entrywidgetother.cpp
+++ b/src/entrywidgetother.cpp
@@ -17,11 +17,11 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qstringlist.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qlabel.h>
-#include <qwhatsthis.h>
+#include <ntqstringlist.h>
+#include <ntqlayout.h>
+#include <ntqtooltip.h>
+#include <ntqlabel.h>
+#include <ntqwhatsthis.h>
#include <kdialog.h>
#include <kapplication.h>
@@ -39,7 +39,7 @@
namespace KBibTeX
{
- EntryWidgetOther::EntryWidgetOther( BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent, const char *name )
+ EntryWidgetOther::EntryWidgetOther( BibTeX::File *bibtexfile, bool isReadOnly, TQWidget *parent, const char *name )
: EntryWidgetTab( bibtexfile, isReadOnly, parent, name ), m_isModified( FALSE )
{
setupGUI();
@@ -63,24 +63,24 @@ namespace KBibTeX
void EntryWidgetOther::apply( BibTeX::Entry *entry )
{
Settings * settings = Settings::self();
- QStringList toBeDeleted;
- for ( QValueList<BibTeX::EntryField*>::ConstIterator it = entry->begin(); it != entry->end(); it++ )
+ TQStringList toBeDeleted;
+ for ( TQValueList<BibTeX::EntryField*>::ConstIterator it = entry->begin(); it != entry->end(); it++ )
{
BibTeX::EntryField *field = *it;
bool doDel = field->fieldType() == BibTeX::EntryField::ftUnknown;
if ( !doDel ) continue;
- QString ftn = field->fieldTypeName().lower();
+ TQString ftn = field->fieldTypeName().lower();
for ( unsigned int i = 0; doDel && i < settings->userDefinedInputFields.count(); ++i )
doDel &= settings->userDefinedInputFields[i]->name.lower() != ftn;
if ( doDel )
toBeDeleted.append( ftn );
}
- for ( QStringList::ConstIterator it = toBeDeleted.begin(); it != toBeDeleted.end(); ++it )
+ for ( TQStringList::ConstIterator it = toBeDeleted.begin(); it != toBeDeleted.end(); ++it )
entry->deleteField( *it );
- for ( QListViewItemIterator it( m_listViewFields ); it.current(); it++ )
+ for ( TQListViewItemIterator it( m_listViewFields ); it.current(); it++ )
{
ValueListViewItem *vlvi = dynamic_cast<KBibTeX::ValueListViewItem*>( it.current() );
if ( vlvi != NULL )
@@ -99,13 +99,13 @@ namespace KBibTeX
m_listViewFields->clear();
Settings * settings = Settings::self();
- for ( QValueList<BibTeX::EntryField*>::ConstIterator it = entry->begin(); it != entry->end(); it++ )
+ for ( TQValueList<BibTeX::EntryField*>::ConstIterator it = entry->begin(); it != entry->end(); it++ )
{
BibTeX::EntryField *field = *it;
bool doAdd = field->fieldType() == BibTeX::EntryField::ftUnknown;
if ( !doAdd ) continue;
- QString ftn = field->fieldTypeName().lower();
+ TQString ftn = field->fieldTypeName().lower();
for ( unsigned int i = 0; doAdd && i < settings->userDefinedInputFields.count(); ++i )
doAdd &= settings->userDefinedInputFields[i]->name.lower() != ftn;
@@ -116,37 +116,37 @@ namespace KBibTeX
m_isModified = FALSE;
}
- void EntryWidgetOther::updateWarnings( BibTeX::Entry::EntryType /*entryType*/, QListView * /*listViewWarnings*/ )
+ void EntryWidgetOther::updateWarnings( BibTeX::Entry::EntryType /*entryType*/, TQListView * /*listViewWarnings*/ )
{
// no warnings neccessary for user fields
}
void EntryWidgetOther::setupGUI()
{
- QGridLayout * gridLayout = new QGridLayout( this, 5, 3, KDialog::marginHint(), KDialog::spacingHint(), "gridLayout" );
+ TQGridLayout * gridLayout = new TQGridLayout( this, 5, 3, KDialog::marginHint(), KDialog::spacingHint(), "gridLayout" );
m_lineEditKey = new KLineEdit( this, "m_lineEditKey" );
m_lineEditKey->setReadOnly( m_isReadOnly );
gridLayout->addWidget( m_lineEditKey, 0, 1 );
- QToolTip::add( m_lineEditKey, i18n( "Name of the user-defined field" ) );
- QWhatsThis::add( m_lineEditKey, i18n( "The name of the user-defined field. Should only contain letters and numbers." ) );
- QLabel *label = new QLabel( i18n( "&Name:" ), this );
+ TQToolTip::add( m_lineEditKey, i18n( "Name of the user-defined field" ) );
+ TQWhatsThis::add( m_lineEditKey, i18n( "The name of the user-defined field. Should only contain letters and numbers." ) );
+ TQLabel *label = new TQLabel( i18n( "&Name:" ), this );
label->setBuddy( m_lineEditKey );
gridLayout->addWidget( label, 0, 0 );
m_pushButtonAdd = new KPushButton( i18n( "&Add" ), this, "m_pushButtonAdd" );
gridLayout->addWidget( m_pushButtonAdd, 0, 2 );
- m_pushButtonAdd->setIconSet( QIconSet( SmallIcon( "add" ) ) );
+ m_pushButtonAdd->setIconSet( TQIconSet( SmallIcon( "add" ) ) );
m_fieldLineEditValue = new KBibTeX::FieldLineEdit( i18n( "Value" ), KBibTeX::FieldLineEdit::itMultiLine, m_isReadOnly, this, "m_fieldLineEditValue" );
gridLayout->addMultiCellWidget( m_fieldLineEditValue, 1, 2, 1, 2 );
- QToolTip::add( m_fieldLineEditValue, i18n( "Content of the user-defined field" ) );
- QWhatsThis::add( m_fieldLineEditValue, i18n( "The content of the user-defined field. May contain any text." ) );
- label = new QLabel( i18n( "&Content:" ), this );
+ TQToolTip::add( m_fieldLineEditValue, i18n( "Content of the user-defined field" ) );
+ TQWhatsThis::add( m_fieldLineEditValue, i18n( "The content of the user-defined field. May contain any text." ) );
+ label = new TQLabel( i18n( "&Content:" ), this );
label->setBuddy( m_fieldLineEditValue );
gridLayout->addWidget( label, 1, 0 );
- QSpacerItem* spacer = new QSpacerItem( 20, 110, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ TQSpacerItem* spacer = new TQSpacerItem( 20, 110, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
gridLayout->addItem( spacer, 2, 0 );
m_listViewFields = new KListView( this, "m_listViewFields" );
@@ -156,28 +156,28 @@ namespace KBibTeX
m_listViewFields->setFullWidth( TRUE );
gridLayout->addMultiCellWidget( m_listViewFields, 3, 5, 1, 1 );
- label = new QLabel( i18n( "&List:" ), this );
+ label = new TQLabel( i18n( "&List:" ), this );
label->setBuddy( m_listViewFields );
- label->setAlignment( Qt::AlignTop );
+ label->setAlignment( TQt::AlignTop );
gridLayout->addWidget( label, 3, 0 );
m_pushButtonDelete = new KPushButton( i18n( "&Delete" ), this, "m_pushButtonDelete" );
gridLayout->addWidget( m_pushButtonDelete, 3, 2 );
- m_pushButtonDelete->setIconSet( QIconSet( SmallIcon( "delete" ) ) );
+ m_pushButtonDelete->setIconSet( TQIconSet( SmallIcon( "delete" ) ) );
m_pushButtonOpen = new KPushButton( i18n( "Op&en" ), this, "m_pushButtonOpen" );
gridLayout->addWidget( m_pushButtonOpen, 4, 2 );
- m_pushButtonOpen->setIconSet( QIconSet( SmallIcon( "fileopen" ) ) );
+ m_pushButtonOpen->setIconSet( TQIconSet( SmallIcon( "fileopen" ) ) );
- spacer = new QSpacerItem( 20, 110, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ spacer = new TQSpacerItem( 20, 110, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
gridLayout->addItem( spacer, 5, 2 );
m_pushButtonOpen->setEnabled( FALSE );
m_pushButtonAdd->setEnabled( FALSE );
m_pushButtonDelete->setEnabled( FALSE );
- connect( m_listViewFields, SIGNAL( clicked( QListViewItem*, const QPoint&, int ) ), this, SLOT( fieldExecute( QListViewItem* ) ) );
- connect( m_lineEditKey, SIGNAL( textChanged( const QString& ) ), this, SLOT( updateGUI() ) );
+ connect( m_listViewFields, SIGNAL( clicked( TQListViewItem*, const TQPoint&, int ) ), this, SLOT( fieldExecute( TQListViewItem* ) ) );
+ connect( m_lineEditKey, SIGNAL( textChanged( const TQString& ) ), this, SLOT( updateGUI() ) );
connect( m_fieldLineEditValue, SIGNAL( textChanged( ) ), this, SLOT( updateGUI() ) );
connect( m_pushButtonAdd, SIGNAL( clicked( ) ), this, SLOT( addClicked( ) ) );
connect( m_pushButtonDelete, SIGNAL( clicked( ) ), this, SLOT( deleteClicked( ) ) );
@@ -186,8 +186,8 @@ namespace KBibTeX
void EntryWidgetOther::updateGUI()
{
- QString text = m_lineEditKey->text();
- QListViewItem * item = m_listViewFields->findItem( text, 0 ) ;
+ TQString text = m_lineEditKey->text();
+ TQListViewItem * item = m_listViewFields->findItem( text, 0 ) ;
bool contains = item != NULL;
bool isUnknown = BibTeX::EntryField::fieldTypeFromString( text ) == BibTeX::EntryField::ftUnknown;
@@ -199,7 +199,7 @@ namespace KBibTeX
m_pushButtonDelete->setEnabled( !m_isReadOnly && contains );
m_pushButtonAdd->setEnabled( !m_isReadOnly && !text.isEmpty() && !m_fieldLineEditValue->isEmpty() && isUnknown );
m_pushButtonAdd->setText( contains ? i18n( "&Apply" ) : i18n( "&Add" ) );
- m_pushButtonAdd->setIconSet( QIconSet( SmallIcon( contains ? "apply" : "fileopen" ) ) );
+ m_pushButtonAdd->setIconSet( TQIconSet( SmallIcon( contains ? "apply" : "fileopen" ) ) );
bool validURL = FALSE;
if ( contains )
@@ -211,7 +211,7 @@ namespace KBibTeX
m_pushButtonOpen->setEnabled( validURL );
}
- void EntryWidgetOther::fieldExecute( QListViewItem * item )
+ void EntryWidgetOther::fieldExecute( TQListViewItem * item )
{
ValueListViewItem * vlvi = dynamic_cast<KBibTeX::ValueListViewItem*>( item );
if ( vlvi != NULL )
@@ -223,8 +223,8 @@ namespace KBibTeX
void EntryWidgetOther::addClicked()
{
- QString key = m_lineEditKey->text();
- QListViewItem * item = m_listViewFields->findItem( key, 0 ) ;
+ TQString key = m_lineEditKey->text();
+ TQListViewItem * item = m_listViewFields->findItem( key, 0 ) ;
ValueListViewItem * vlvi = item != NULL ? dynamic_cast<KBibTeX::ValueListViewItem*>( item ) : NULL;
if ( vlvi != NULL )
@@ -239,7 +239,7 @@ namespace KBibTeX
void EntryWidgetOther::deleteClicked()
{
- QListViewItem * item = m_listViewFields->findItem( m_lineEditKey->text(), 0 );
+ TQListViewItem * item = m_listViewFields->findItem( m_lineEditKey->text(), 0 );
if ( item != NULL )
{
@@ -264,8 +264,8 @@ namespace KBibTeX
m_fieldLineEditValue->setEnabled( FALSE );
}
- ValueListViewItem::ValueListViewItem( const QString& title, BibTeX::Value *value, QListView *parent )
- : QListViewItem( parent ), m_title( title )
+ ValueListViewItem::ValueListViewItem( const TQString& title, BibTeX::Value *value, TQListView *parent )
+ : TQListViewItem( parent ), m_title( title )
{
m_value = new BibTeX::Value( value );
setTexts( m_title );
@@ -281,7 +281,7 @@ namespace KBibTeX
return m_value;
}
- QString ValueListViewItem::title()
+ TQString ValueListViewItem::title()
{
return m_title;
}
@@ -302,13 +302,13 @@ namespace KBibTeX
setTexts( m_title );
}
- void ValueListViewItem::setTitle( const QString &title )
+ void ValueListViewItem::setTitle( const TQString &title )
{
m_title = title;
setTexts( title );
}
- void ValueListViewItem::setTexts( const QString& title )
+ void ValueListViewItem::setTexts( const TQString& title )
{
setText( 0, title );
if ( m_value != NULL )
diff --git a/src/entrywidgetother.h b/src/entrywidgetother.h
index 1119214..e8aae71 100644
--- a/src/entrywidgetother.h
+++ b/src/entrywidgetother.h
@@ -24,9 +24,9 @@
#include <entrywidgettab.h>
-class QPushButton;
+class TQPushButton;
class KListView;
-class QLineEdit;
+class TQLineEdit;
namespace KBibTeX
{
@@ -40,7 +40,7 @@ namespace KBibTeX
{
Q_OBJECT
public:
- EntryWidgetOther( BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+ EntryWidgetOther( BibTeX::File *bibtexfile, bool isReadOnly, TQWidget *parent = 0, const char *name = 0 );
~EntryWidgetOther();
bool isModified();
@@ -49,15 +49,15 @@ namespace KBibTeX
void updateGUI( BibTeX::Entry::EntryType /*entryType*/, bool enableAll );
void apply( BibTeX::Entry *entry );
void reset( BibTeX::Entry *entry );
- void updateWarnings( BibTeX::Entry::EntryType entryType, QListView * /*listViewWarnings*/ );
+ void updateWarnings( BibTeX::Entry::EntryType entryType, TQListView * /*listViewWarnings*/ );
private:
bool m_isModified;
- QPushButton *m_pushButtonAdd;
- QPushButton *m_pushButtonDelete;
- QPushButton *m_pushButtonOpen;
- QLineEdit *m_lineEditKey;
+ TQPushButton *m_pushButtonAdd;
+ TQPushButton *m_pushButtonDelete;
+ TQPushButton *m_pushButtonOpen;
+ TQLineEdit *m_lineEditKey;
FieldLineEdit *m_fieldLineEditValue;
KListView *m_listViewFields;
KURL m_internalURL;
@@ -66,29 +66,29 @@ namespace KBibTeX
private slots:
void updateGUI();
- void fieldExecute( QListViewItem * item );
+ void fieldExecute( TQListViewItem * item );
void addClicked();
void deleteClicked();
void openClicked();
};
- class ValueListViewItem : public QListViewItem
+ class ValueListViewItem : public TQListViewItem
{
public:
- ValueListViewItem( const QString& title, BibTeX::Value *value, QListView *parent );
+ ValueListViewItem( const TQString& title, BibTeX::Value *value, TQListView *parent );
~ValueListViewItem();
const BibTeX::Value *value();
- QString title();
+ TQString title();
void setValue( BibTeX::Value *value );
- void setTitle( const QString &title );
+ void setTitle( const TQString &title );
private:
- QString m_title;
+ TQString m_title;
BibTeX::Value *m_value;
- void setTexts( const QString& title );
+ void setTexts( const TQString& title );
};
}
diff --git a/src/entrywidgetpublication.cpp b/src/entrywidgetpublication.cpp
index d1dfd14..b048970 100644
--- a/src/entrywidgetpublication.cpp
+++ b/src/entrywidgetpublication.cpp
@@ -17,12 +17,12 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qregexp.h>
-#include <qpushbutton.h>
-#include <qpopupmenu.h>
-#include <qtooltip.h>
+#include <ntqlayout.h>
+#include <ntqlabel.h>
+#include <ntqregexp.h>
+#include <ntqpushbutton.h>
+#include <ntqpopupmenu.h>
+#include <ntqtooltip.h>
#include <kurl.h>
#include <kiconloader.h>
@@ -37,7 +37,7 @@
namespace KBibTeX
{
- EntryWidgetPublication::EntryWidgetPublication( BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent, const char *name )
+ EntryWidgetPublication::EntryWidgetPublication( BibTeX::File *bibtexfile, bool isReadOnly, TQWidget *parent, const char *name )
: EntryWidgetTab( bibtexfile, isReadOnly, parent, name )
{
setupGUI();
@@ -153,7 +153,7 @@ namespace KBibTeX
{
BibTeX::PlainText *plainText = dynamic_cast<BibTeX::PlainText*>( value->items.first() );
if ( plainText != NULL )
- plainText->setText( plainText->text().replace( QRegExp( "\\s*--?\\s*" ), QChar( 0x2013 ) ) );
+ plainText->setText( plainText->text().replace( TQRegExp( "\\s*--?\\s*" ), TQChar( 0x2013 ) ) );
}
setValue( entry, BibTeX::EntryField::ftPages, value );
delete value;
@@ -253,7 +253,7 @@ namespace KBibTeX
slotSetCrossRefEntry();
}
- void EntryWidgetPublication::updateWarnings( BibTeX::Entry::EntryType entryType, QListView *listViewWarnings )
+ void EntryWidgetPublication::updateWarnings( BibTeX::Entry::EntryType entryType, TQListView *listViewWarnings )
{
bool crossRefValid = FALSE;
BibTeX::Value *value = NULL;
@@ -320,7 +320,7 @@ namespace KBibTeX
BibTeX::MacroKey *key = dynamic_cast<BibTeX::MacroKey*>( value->items[0] );
if ( key != NULL )
{
- QString jourText = key->text();
+ TQString jourText = key->text();
if ( !jourText.isEmpty() && !m_bibtexfile->containsKey( jourText ) )
new EntryWidgetWarningsItem( EntryWidgetWarningsItem::wlWarning, i18n( "The field 'Journal' refers to a not existing entry" ), m_fieldLineEditJournal, listViewWarnings, "warning" );
}
@@ -381,7 +381,7 @@ namespace KBibTeX
m_crossRefEntry = NULL;
if ( m_fieldLineEditCrossRef->value() != NULL && m_bibtexfile != NULL )
{
- QString crossRefText = m_fieldLineEditCrossRef->value() ->text();
+ TQString crossRefText = m_fieldLineEditCrossRef->value() ->text();
if ( !crossRefText.isEmpty() )
m_crossRefEntry = dynamic_cast<BibTeX::Entry*>( m_bibtexfile->containsKey( crossRefText ) );
}
@@ -389,7 +389,7 @@ namespace KBibTeX
void EntryWidgetPublication::slotOpenISBN()
{
- KURL url = KURL( QString( i18n( "http://en.wikipedia.org/w/index.php?title=Special:Booksources&isbn=%1" ) ).arg( isbn() ) );
+ KURL url = KURL( TQString( i18n( "http://en.wikipedia.org/w/index.php?title=Special:Booksources&isbn=%1" ) ).arg( isbn() ) );
Settings::openUrl( url, this );
}
@@ -398,38 +398,38 @@ namespace KBibTeX
*/
void EntryWidgetPublication::setupGUI()
{
- QGridLayout * gridLayout = new QGridLayout( this, 10, 5, KDialog::marginHint(), KDialog::spacingHint(), "gridLayout" );
+ TQGridLayout * gridLayout = new TQGridLayout( this, 10, 5, KDialog::marginHint(), KDialog::spacingHint(), "gridLayout" );
gridLayout->setColSpacing( 2, KDialog::spacingHint() * 4 );
gridLayout->setRowStretch( 9, 1 );
- QLabel *label = new QLabel( QString( "%1:" ).arg( i18n( "Journal" ) ), this );
+ TQLabel *label = new TQLabel( TQString( "%1:" ).arg( i18n( "Journal" ) ), this );
gridLayout->addWidget( label, 0, 0 );
m_fieldLineEditJournal = new KBibTeX::FieldLineEdit( i18n( "Journal" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditJournal" );
m_fieldLineEditJournal ->setFieldType( BibTeX::EntryField::ftJournal );
label->setBuddy( m_fieldLineEditJournal );
gridLayout->addWidget( m_fieldLineEditJournal, 0, 1 );
- label = new QLabel( QString( "%1:" ).arg( i18n( "Volume" ) ), this );
+ label = new TQLabel( TQString( "%1:" ).arg( i18n( "Volume" ) ), this );
gridLayout->addWidget( label, 1, 0 );
m_fieldLineEditVolume = new KBibTeX::FieldLineEdit( i18n( "Volume" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditVolume" );
m_fieldLineEditVolume->setFieldType( BibTeX::EntryField::ftVolume );
label->setBuddy( m_fieldLineEditVolume );
gridLayout->addWidget( m_fieldLineEditVolume, 1, 1 );
- label = new QLabel( QString( "%1:" ).arg( i18n( "Number" ) ), this );
+ label = new TQLabel( TQString( "%1:" ).arg( i18n( "Number" ) ), this );
gridLayout->addWidget( label, 2, 0 );
m_fieldLineEditNumber = new KBibTeX::FieldLineEdit( i18n( "Number" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditNumber" );
m_fieldLineEditNumber ->setFieldType( BibTeX::EntryField::ftNumber );
label->setBuddy( m_fieldLineEditNumber );
gridLayout->addWidget( m_fieldLineEditNumber, 2, 1 );
- label = new QLabel( QString( "%1:" ).arg( i18n( "Month" ) ), this );
+ label = new TQLabel( TQString( "%1:" ).arg( i18n( "Month" ) ), this );
gridLayout->addWidget( label, 3, 0 );
- QHBoxLayout *innerLayout = new QHBoxLayout();
+ TQHBoxLayout *innerLayout = new TQHBoxLayout();
gridLayout->addLayout( innerLayout, 3, 1 );
- m_pushButtonMonths = new QPushButton( this, "m_pushButtonMonths" );
- m_pushButtonMonths->setIconSet( QIconSet( SmallIcon( "vcalendar" ) ) );
- m_pushButtonMonths->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Minimum );
+ m_pushButtonMonths = new TQPushButton( this, "m_pushButtonMonths" );
+ m_pushButtonMonths->setIconSet( TQIconSet( SmallIcon( "vcalendar" ) ) );
+ m_pushButtonMonths->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Minimum );
m_pushButtonMonths->setEnabled( !m_isReadOnly );
innerLayout->addWidget( m_pushButtonMonths );
m_fieldLineEditMonth = new KBibTeX::FieldLineEdit( i18n( "Month" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditMonth" );
@@ -437,35 +437,35 @@ namespace KBibTeX
label->setBuddy( m_fieldLineEditMonth );
innerLayout->addWidget( m_fieldLineEditMonth );
- label = new QLabel( QString( "%1:" ).arg( i18n( "Year" ) ), this );
+ label = new TQLabel( TQString( "%1:" ).arg( i18n( "Year" ) ), this );
gridLayout->addWidget( label, 4, 0 );
m_fieldLineEditYear = new KBibTeX::FieldLineEdit( i18n( "Year" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditYear" );
m_fieldLineEditYear->setFieldType( BibTeX::EntryField::ftYear );
label->setBuddy( m_fieldLineEditYear );
gridLayout->addWidget( m_fieldLineEditYear, 4, 1 );
- label = new QLabel( QString( "%1:" ).arg( i18n( "Pages" ) ), this );
+ label = new TQLabel( TQString( "%1:" ).arg( i18n( "Pages" ) ), this );
gridLayout->addWidget( label, 5, 0 );
m_fieldLineEditPages = new KBibTeX::FieldLineEdit( i18n( "Pages" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditPages" );
m_fieldLineEditPages->setFieldType( BibTeX::EntryField::ftPages );
label->setBuddy( m_fieldLineEditPages );
gridLayout->addWidget( m_fieldLineEditPages, 5, 1 );
- label = new QLabel( QString( "%1:" ).arg( i18n( "Edition" ) ), this );
+ label = new TQLabel( TQString( "%1:" ).arg( i18n( "Edition" ) ), this );
gridLayout->addWidget( label, 6, 0 );
m_fieldLineEditEdition = new KBibTeX::FieldLineEdit( i18n( "Edition" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditEdition" );
m_fieldLineEditEdition->setFieldType( BibTeX::EntryField::ftEdition );
label->setBuddy( m_fieldLineEditEdition );
gridLayout->addWidget( m_fieldLineEditEdition, 6, 1 );
- label = new QLabel( QString( "%1:" ).arg( i18n( "Chapter" ) ), this );
+ label = new TQLabel( TQString( "%1:" ).arg( i18n( "Chapter" ) ), this );
gridLayout->addWidget( label, 7, 0 );
m_fieldLineEditChapter = new KBibTeX::FieldLineEdit( i18n( "Chapter" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditChapter" );
m_fieldLineEditChapter ->setFieldType( BibTeX::EntryField::ftChapter );
label->setBuddy( m_fieldLineEditChapter );
gridLayout->addWidget( m_fieldLineEditChapter, 7, 1 );
- label = new QLabel( QString( "%1:" ).arg( i18n( "Cross Reference" ) ), this );
+ label = new TQLabel( TQString( "%1:" ).arg( i18n( "Cross Reference" ) ), this );
gridLayout->addWidget( label, 8, 0 );
m_fieldLineEditCrossRef = new KBibTeX::FieldLineEdit( i18n( "Cross Reference" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditCrossRef" );
m_fieldLineEditCrossRef->setFieldType( BibTeX::EntryField::ftCrossRef );
@@ -473,56 +473,56 @@ namespace KBibTeX
gridLayout->addWidget( m_fieldLineEditCrossRef, 8, 1 );
connect( m_fieldLineEditCrossRef, SIGNAL( textChanged() ), this, SLOT( slotSetCrossRefEntry() ) );
- label = new QLabel( QString( "%1:" ).arg( i18n( "Organization" ) ), this );
+ label = new TQLabel( TQString( "%1:" ).arg( i18n( "Organization" ) ), this );
gridLayout->addWidget( label, 0, 3 );
m_fieldLineEditOrganization = new KBibTeX::FieldLineEdit( i18n( "Organization" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditOrganization" );
m_fieldLineEditOrganization->setFieldType( BibTeX::EntryField::ftOrganization );
label->setBuddy( m_fieldLineEditOrganization );
gridLayout->addWidget( m_fieldLineEditOrganization, 0, 4 );
- label = new QLabel( QString( "%1:" ).arg( i18n( "Publisher" ) ), this );
+ label = new TQLabel( TQString( "%1:" ).arg( i18n( "Publisher" ) ), this );
gridLayout->addWidget( label, 1, 3 );
m_fieldLineEditPublisher = new KBibTeX::FieldLineEdit( i18n( "Publisher" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditPublisher" );
m_fieldLineEditPublisher->setFieldType( BibTeX::EntryField::ftPublisher );
label->setBuddy( m_fieldLineEditPublisher );
gridLayout->addWidget( m_fieldLineEditPublisher, 1, 4 );
- label = new QLabel( QString( "%1:" ).arg( i18n( "School" ) ), this );
+ label = new TQLabel( TQString( "%1:" ).arg( i18n( "School" ) ), this );
gridLayout->addWidget( label, 2, 3 );
m_fieldLineEditSchool = new KBibTeX::FieldLineEdit( i18n( "School" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditSchool" );
m_fieldLineEditSchool->setFieldType( BibTeX::EntryField::ftSchool );
label->setBuddy( m_fieldLineEditSchool );
gridLayout->addWidget( m_fieldLineEditSchool, 2, 4 );
- label = new QLabel( QString( "%1:" ).arg( i18n( "Institution" ) ), this );
+ label = new TQLabel( TQString( "%1:" ).arg( i18n( "Institution" ) ), this );
gridLayout->addWidget( label, 3, 3 );
m_fieldLineEditInstitution = new KBibTeX::FieldLineEdit( i18n( "Institution" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditInstitution" );
m_fieldLineEditInstitution->setFieldType( BibTeX::EntryField::ftInstitution );
label->setBuddy( m_fieldLineEditInstitution );
gridLayout->addWidget( m_fieldLineEditInstitution, 3, 4 );
- label = new QLabel( QString( "%1:" ).arg( i18n( "Location" ) ), this );
+ label = new TQLabel( TQString( "%1:" ).arg( i18n( "Location" ) ), this );
gridLayout->addWidget( label, 4, 3 );
m_fieldLineEditLocation = new KBibTeX::FieldLineEdit( i18n( "Location" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditLocation" );
m_fieldLineEditLocation->setFieldType( BibTeX::EntryField::ftLocation );
label->setBuddy( m_fieldLineEditLocation );
gridLayout->addWidget( m_fieldLineEditLocation, 4, 4 );
- label = new QLabel( QString( "%1:" ).arg( i18n( "Address" ) ), this );
+ label = new TQLabel( TQString( "%1:" ).arg( i18n( "Address" ) ), this );
gridLayout->addWidget( label, 5, 3 );
m_fieldLineEditAddress = new KBibTeX::FieldLineEdit( i18n( "Address" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditAddress" );
m_fieldLineEditAddress->setFieldType( BibTeX::EntryField::ftAddress );
label->setBuddy( m_fieldLineEditAddress );
gridLayout->addWidget( m_fieldLineEditAddress, 5, 4 );
- label = new QLabel( QString( "%1:" ).arg( i18n( "ISBN" ) ), this );
+ label = new TQLabel( TQString( "%1:" ).arg( i18n( "ISBN" ) ), this );
gridLayout->addWidget( label, 6, 3 );
- innerLayout = new QHBoxLayout();
+ innerLayout = new TQHBoxLayout();
gridLayout->addLayout( innerLayout, 6, 4 );
- m_pushButtonISBN = new QPushButton( this, "m_pushButtonMonths" );
- m_pushButtonISBN->setIconSet( QIconSet( SmallIcon( "find" ) ) );
- m_pushButtonISBN->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Minimum );
- QToolTip::add( m_pushButtonISBN, i18n( "Lookup ISBN number in Wikipedia" ) );
+ m_pushButtonISBN = new TQPushButton( this, "m_pushButtonMonths" );
+ m_pushButtonISBN->setIconSet( TQIconSet( SmallIcon( "find" ) ) );
+ m_pushButtonISBN->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Minimum );
+ TQToolTip::add( m_pushButtonISBN, i18n( "Lookup ISBN number in Wikipedia" ) );
innerLayout->addWidget( m_pushButtonISBN );
m_fieldLineEditISBN = new KBibTeX::FieldLineEdit( i18n( "ISBN" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditISBN" );
m_fieldLineEditISBN ->setFieldType( BibTeX::EntryField::ftISBN );
@@ -530,34 +530,34 @@ namespace KBibTeX
innerLayout->addWidget( m_fieldLineEditISBN );
connect( m_pushButtonISBN, SIGNAL( clicked() ), this, SLOT( slotOpenISBN() ) );
- label = new QLabel( QString( "%1:" ).arg( i18n( "ISSN" ) ), this );
+ label = new TQLabel( TQString( "%1:" ).arg( i18n( "ISSN" ) ), this );
gridLayout->addWidget( label, 7, 3 );
m_fieldLineEditISSN = new KBibTeX::FieldLineEdit( i18n( "ISSN" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditISSN" );
m_fieldLineEditISSN->setFieldType( BibTeX::EntryField::ftISSN );
label->setBuddy( m_fieldLineEditISSN );
gridLayout->addWidget( m_fieldLineEditISSN, 7, 4 );
- label = new QLabel( QString( "%1:" ).arg( i18n( "How Published" ) ), this );
+ label = new TQLabel( TQString( "%1:" ).arg( i18n( "How Published" ) ), this );
gridLayout->addWidget( label, 8, 3 );
m_fieldLineEditHowPublished = new KBibTeX::FieldLineEdit( i18n( "How Published" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditHowPublished" );
m_fieldLineEditHowPublished->setFieldType( BibTeX::EntryField::ftHowPublished );
label->setBuddy( m_fieldLineEditHowPublished );
gridLayout->addWidget( m_fieldLineEditHowPublished, 8, 4 );
- QPopupMenu *menuMonths = new QPopupMenu( this, "menuMonths" );
+ TQPopupMenu *menuMonths = new TQPopupMenu( this, "menuMonths" );
for ( int i = 0; i < 12; i++ )
menuMonths->insertItem( BibTeX::Months[ i ], i );
m_pushButtonMonths->setPopup( menuMonths );
connect( menuMonths, SIGNAL( activated( int ) ), this, SLOT( slotSetMonth( int ) ) );
}
- QString EntryWidgetPublication::isbn() const
+ TQString EntryWidgetPublication::isbn() const
{
BibTeX::Value *value = m_fieldLineEditISBN->value();
if ( value == NULL )
return "";
- return value->text().replace( QRegExp( "[^0-9X]" ), "" );
+ return value->text().replace( TQRegExp( "[^0-9X]" ), "" );
}
}
#include "entrywidgetpublication.moc"
diff --git a/src/entrywidgetpublication.h b/src/entrywidgetpublication.h
index e0e21ca..dedf0cb 100644
--- a/src/entrywidgetpublication.h
+++ b/src/entrywidgetpublication.h
@@ -22,7 +22,7 @@
#include <entrywidgettab.h>
-class QPushButton;
+class TQPushButton;
namespace KBibTeX
{
@@ -32,7 +32,7 @@ namespace KBibTeX
{
Q_OBJECT
public:
- EntryWidgetPublication( BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+ EntryWidgetPublication( BibTeX::File *bibtexfile, bool isReadOnly, TQWidget *parent = 0, const char *name = 0 );
~EntryWidgetPublication();
bool isModified();
@@ -41,7 +41,7 @@ namespace KBibTeX
void updateGUI( BibTeX::Entry::EntryType entryType, bool enableAll );
void apply( BibTeX::Entry *entry );
void reset( BibTeX::Entry *entry );
- void updateWarnings( BibTeX::Entry::EntryType entryType, QListView *listViewWarnings );
+ void updateWarnings( BibTeX::Entry::EntryType entryType, TQListView *listViewWarnings );
private slots:
void slotSetMonth( int month );
@@ -62,16 +62,16 @@ namespace KBibTeX
KBibTeX::FieldLineEdit *m_fieldLineEditVolume;
KBibTeX::FieldLineEdit *m_fieldLineEditNumber;
KBibTeX::FieldLineEdit *m_fieldLineEditMonth;
- QPushButton *m_pushButtonMonths;
+ TQPushButton *m_pushButtonMonths;
KBibTeX::FieldLineEdit *m_fieldLineEditYear;
KBibTeX::FieldLineEdit *m_fieldLineEditISBN;
- QPushButton *m_pushButtonISBN;
+ TQPushButton *m_pushButtonISBN;
KBibTeX::FieldLineEdit *m_fieldLineEditISSN;
KBibTeX::FieldLineEdit *m_fieldLineEditCrossRef;
KBibTeX::FieldLineEdit *m_fieldLineEditHowPublished;
void setupGUI();
- QString isbn() const;
+ TQString isbn() const;
};
diff --git a/src/entrywidgetsource.cpp b/src/entrywidgetsource.cpp
index 27d95a6..f3f03d9 100644
--- a/src/entrywidgetsource.cpp
+++ b/src/entrywidgetsource.cpp
@@ -17,9 +17,9 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qlayout.h>
-#include <qtextedit.h>
-#include <qbuffer.h>
+#include <ntqlayout.h>
+#include <ntqtextedit.h>
+#include <ntqbuffer.h>
#include <kdialog.h>
#include <kpushbutton.h>
@@ -35,7 +35,7 @@
namespace KBibTeX
{
- EntryWidgetSource::EntryWidgetSource( BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent, const char *name )
+ EntryWidgetSource::EntryWidgetSource( BibTeX::File *bibtexfile, bool isReadOnly, TQWidget *parent, const char *name )
: EntryWidgetTab( bibtexfile, isReadOnly, parent, name ), m_entry( NULL )
{
setupGUI();
@@ -53,17 +53,17 @@ namespace KBibTeX
bool EntryWidgetSource::containsValidText()
{
- BibTeX::Entry dummy( BibTeX::Entry::etArticle, "iaKWjDMVuB2vQDuYRK49Y85tyxa9" );
+ BibTeX::Entry dummy( BibTeX::Entry::etArticle, "iaKWjDMVuB2vTQDuYRK49Y85tyxa9" );
apply( &dummy );
- return dummy.id().compare( "iaKWjDMVuB2vQDuYRK49Y85tyxa9" ) != 0;
+ return dummy.id().compare( "iaKWjDMVuB2vTQDuYRK49Y85tyxa9" ) != 0;
}
- QString EntryWidgetSource::text()
+ TQString EntryWidgetSource::text()
{
return m_textEditSource->text();
}
- void EntryWidgetSource::setText( const QString& text )
+ void EntryWidgetSource::setText( const TQString& text )
{
m_textEditSource->setText( text );
}
@@ -76,12 +76,12 @@ namespace KBibTeX
void EntryWidgetSource::apply( BibTeX::Entry *entry )
{
Settings * settings = Settings::self();
- QBuffer buffer;
+ TQBuffer buffer;
BibTeX::FileImporterBibTeX importer( settings->editing_FirstNameFirst );
buffer.open( IO_WriteOnly );
- QTextStream ts( &buffer );
- ts.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream ts( &buffer );
+ ts.setEncoding( TQTextStream::UnicodeUTF8 );
ts << m_textEditSource->text() << endl;
buffer.close();
@@ -113,7 +113,7 @@ namespace KBibTeX
Settings * settings = Settings::self();
- QBuffer buffer;
+ TQBuffer buffer;
BibTeX::FileExporterBibTeX exporter;
exporter.setEncoding( "latex" );
exporter.setStringDelimiter( settings->fileIO_BibtexStringOpenDelimiter, settings->fileIO_BibtexStringCloseDelimiter );
@@ -125,8 +125,8 @@ namespace KBibTeX
buffer.close();
buffer.open( IO_ReadOnly );
- QTextStream ts( &buffer );
- ts.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream ts( &buffer );
+ ts.setEncoding( TQTextStream::UnicodeUTF8 );
m_textEditSource->setText( ts.read() );
buffer.close();
}
@@ -136,18 +136,18 @@ namespace KBibTeX
reset( m_entry );
}
- void EntryWidgetSource::updateWarnings( BibTeX::Entry::EntryType /*entryType*/, QListView * /*listViewWarnings*/ )
+ void EntryWidgetSource::updateWarnings( BibTeX::Entry::EntryType /*entryType*/, TQListView * /*listViewWarnings*/ )
{
// nothing
}
void EntryWidgetSource::setupGUI()
{
- QGridLayout * gridLayout = new QGridLayout( this, 2, 2, KDialog::marginHint(), KDialog::spacingHint(), "gridLayout" );
+ TQGridLayout * gridLayout = new TQGridLayout( this, 2, 2, KDialog::marginHint(), KDialog::spacingHint(), "gridLayout" );
gridLayout->setRowStretch( 0, 5 );
gridLayout->setColStretch( 0, 5 );
- m_textEditSource = new QTextEdit( this );
+ m_textEditSource = new TQTextEdit( this );
gridLayout->addMultiCellWidget( m_textEditSource, 0, 0, 0, 1 );
m_textEditSource->setFont( KGlobalSettings::fixedFont() );
m_textEditSource->setReadOnly( m_isReadOnly );
diff --git a/src/entrywidgetsource.h b/src/entrywidgetsource.h
index 77b98e2..48a35bb 100644
--- a/src/entrywidgetsource.h
+++ b/src/entrywidgetsource.h
@@ -22,7 +22,7 @@
#include <entrywidgettab.h>
-class QTextEdit;
+class TQTextEdit;
namespace KBibTeX
{
@@ -34,23 +34,23 @@ namespace KBibTeX
{
Q_OBJECT
public:
- EntryWidgetSource( BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+ EntryWidgetSource( BibTeX::File *bibtexfile, bool isReadOnly, TQWidget *parent = 0, const char *name = 0 );
~EntryWidgetSource();
bool isModified();
bool containsValidText();
- QString text();
- void setText( const QString& text );
+ TQString text();
+ void setText( const TQString& text );
public slots:
void updateGUI( BibTeX::Entry::EntryType entryType, bool enableAll );
void apply( BibTeX::Entry *entry );
void reset( BibTeX::Entry *entry );
void restore();
- void updateWarnings( BibTeX::Entry::EntryType entryType, QListView *listViewWarnings );
+ void updateWarnings( BibTeX::Entry::EntryType entryType, TQListView *listViewWarnings );
private:
- QTextEdit *m_textEditSource;
+ TQTextEdit *m_textEditSource;
BibTeX::Entry *m_entry;
void setupGUI();
diff --git a/src/entrywidgettab.cpp b/src/entrywidgettab.cpp
index c4efc51..6d0ac07 100644
--- a/src/entrywidgettab.cpp
+++ b/src/entrywidgettab.cpp
@@ -28,8 +28,8 @@ namespace KBibTeX
{
BibTeX::Entry *EntryWidgetTab::m_crossRefEntry = NULL;
- EntryWidgetTab::EntryWidgetTab(BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent, const char *name )
- : QWidget( parent, name ), m_isReadOnly( isReadOnly ), m_bibtexfile( bibtexfile )
+ EntryWidgetTab::EntryWidgetTab(BibTeX::File *bibtexfile, bool isReadOnly, TQWidget *parent, const char *name )
+ : TQWidget( parent, name ), m_isReadOnly( isReadOnly ), m_bibtexfile( bibtexfile )
{
// nothing
}
@@ -59,24 +59,24 @@ namespace KBibTeX
}
}
- void EntryWidgetTab::addMissingWarning( BibTeX::Entry::EntryType entryType, BibTeX::EntryField::FieldType fieldType, const QString& label, bool valid, QWidget *widget, QListView *listView )
+ void EntryWidgetTab::addMissingWarning( BibTeX::Entry::EntryType entryType, BibTeX::EntryField::FieldType fieldType, const TQString& label, bool valid, TQWidget *widget, TQListView *listView )
{
if ( BibTeX::Entry::getRequireStatus( entryType, fieldType ) == BibTeX::Entry::frsRequired && !valid )
- new EntryWidgetWarningsItem( EntryWidgetWarningsItem::wlWarning, QString( i18n( "The field '%1' is required, but missing" ) ).arg( label ), widget, listView, "warning" );
+ new EntryWidgetWarningsItem( EntryWidgetWarningsItem::wlWarning, TQString( i18n( "The field '%1' is required, but missing" ) ).arg( label ), widget, listView, "warning" );
}
- void EntryWidgetTab::addCrossRefInfo( const QString& label, QWidget *widget, QListView *listView )
+ void EntryWidgetTab::addCrossRefInfo( const TQString& label, TQWidget *widget, TQListView *listView )
{
- QString crossRefId = m_crossRefEntry != NULL ? m_crossRefEntry->id() : "???";
- new EntryWidgetWarningsItem( EntryWidgetWarningsItem::wlInformation, QString( i18n( "Using cross referenced entry '%1' for field '%2'" ) ).arg( crossRefId ).arg( label ), widget, listView, "information" );
+ TQString crossRefId = m_crossRefEntry != NULL ? m_crossRefEntry->id() : "???";
+ new EntryWidgetWarningsItem( EntryWidgetWarningsItem::wlInformation, TQString( i18n( "Using cross referenced entry '%1' for field '%2'" ) ).arg( crossRefId ).arg( label ), widget, listView, "information" );
}
- void EntryWidgetTab::addFieldLineEditWarning( FieldLineEdit *fieldLineEdit, const QString& label, QListView *listView )
+ void EntryWidgetTab::addFieldLineEditWarning( FieldLineEdit *fieldLineEdit, const TQString& label, TQListView *listView )
{
switch ( fieldLineEdit->error() )
{
case FieldLineEdit::etInvalidStringKey:
- new EntryWidgetWarningsItem( EntryWidgetWarningsItem::wlError, QString( i18n( "The field '%1' contains string keys with invalid characters" ) ).arg( label ), fieldLineEdit, listView, "error" );
+ new EntryWidgetWarningsItem( EntryWidgetWarningsItem::wlError, TQString( i18n( "The field '%1' contains string keys with invalid characters" ) ).arg( label ), fieldLineEdit, listView, "error" );
break;
case FieldLineEdit::etNoError:
{
@@ -84,7 +84,7 @@ namespace KBibTeX
}
break;
default:
- new EntryWidgetWarningsItem( EntryWidgetWarningsItem::wlError, QString( i18n( "The field '%1' contains some unknown error" ) ).arg( label ), fieldLineEdit, listView, "error" );
+ new EntryWidgetWarningsItem( EntryWidgetWarningsItem::wlError, TQString( i18n( "The field '%1' contains some unknown error" ) ).arg( label ), fieldLineEdit, listView, "error" );
}
}
}
diff --git a/src/entrywidgettab.h b/src/entrywidgettab.h
index 8e63252..1eace4f 100644
--- a/src/entrywidgettab.h
+++ b/src/entrywidgettab.h
@@ -20,22 +20,22 @@
#ifndef KBIBTEXENTRYWIDGETTAB_H
#define KBIBTEXENTRYWIDGETTAB_H
-#include <qwidget.h>
+#include <ntqwidget.h>
#include <entry.h>
#include <file.h>
-class QListView;
+class TQListView;
namespace KBibTeX
{
class FieldLineEdit;
- class EntryWidgetTab : public QWidget
+ class EntryWidgetTab : public TQWidget
{
Q_OBJECT
public:
- EntryWidgetTab( BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+ EntryWidgetTab( BibTeX::File *bibtexfile, bool isReadOnly, TQWidget *parent = 0, const char *name = 0 );
~EntryWidgetTab();
virtual bool isModified() = 0;
@@ -44,13 +44,13 @@ namespace KBibTeX
virtual void updateGUI( BibTeX::Entry::EntryType entryType, bool enableAll ) = 0;
virtual void apply( BibTeX::Entry *entry ) = 0;
virtual void reset( BibTeX::Entry *entry ) = 0;
- virtual void updateWarnings( BibTeX::Entry::EntryType entryType, QListView *listViewWarnings ) = 0;
+ virtual void updateWarnings( BibTeX::Entry::EntryType entryType, TQListView *listViewWarnings ) = 0;
protected:
void setValue( BibTeX::Entry *entry, const BibTeX::EntryField::FieldType fieldType, BibTeX::Value *value );
- void addMissingWarning( BibTeX::Entry::EntryType entryType, BibTeX::EntryField::FieldType fieldType, const QString& label, bool valid, QWidget *widget, QListView *listView );
- void addCrossRefInfo( const QString& label, QWidget *widget, QListView *listView );
- void addFieldLineEditWarning( FieldLineEdit *fieldLineEdit, const QString& label, QListView *listView );
+ void addMissingWarning( BibTeX::Entry::EntryType entryType, BibTeX::EntryField::FieldType fieldType, const TQString& label, bool valid, TQWidget *widget, TQListView *listView );
+ void addCrossRefInfo( const TQString& label, TQWidget *widget, TQListView *listView );
+ void addFieldLineEditWarning( FieldLineEdit *fieldLineEdit, const TQString& label, TQListView *listView );
bool m_isReadOnly;
static BibTeX::Entry *m_crossRefEntry;
diff --git a/src/entrywidgettitle.cpp b/src/entrywidgettitle.cpp
index f72bb71..06164b2 100644
--- a/src/entrywidgettitle.cpp
+++ b/src/entrywidgettitle.cpp
@@ -17,8 +17,8 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qlayout.h>
-#include <qlabel.h>
+#include <ntqlayout.h>
+#include <ntqlabel.h>
#include <kdialog.h>
#include <klocale.h>
@@ -30,7 +30,7 @@
namespace KBibTeX
{
- EntryWidgetTitle::EntryWidgetTitle( BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent, const char *name )
+ EntryWidgetTitle::EntryWidgetTitle( BibTeX::File *bibtexfile, bool isReadOnly, TQWidget *parent, const char *name )
: EntryWidgetTab( bibtexfile, isReadOnly, parent, name )
{
setupGUI();
@@ -88,7 +88,7 @@ namespace KBibTeX
m_fieldLineEditSeries->setValue( field != NULL ? field->value() : NULL );
}
- void EntryWidgetTitle::updateWarnings( BibTeX::Entry::EntryType entryType, QListView *listViewWarnings )
+ void EntryWidgetTitle::updateWarnings( BibTeX::Entry::EntryType entryType, TQListView *listViewWarnings )
{
bool crossRefValid = FALSE;
@@ -110,22 +110,22 @@ namespace KBibTeX
void EntryWidgetTitle::setupGUI()
{
- QGridLayout * gridLayout = new QGridLayout( this, 4, 2, KDialog::marginHint(), KDialog::spacingHint(), "gridLayout" );
+ TQGridLayout * gridLayout = new TQGridLayout( this, 4, 2, KDialog::marginHint(), KDialog::spacingHint(), "gridLayout" );
gridLayout->setRowStretch( 3, 1 );
- QLabel *label = new QLabel( QString( "%1:" ).arg( i18n( "Title" ) ), this );
+ TQLabel *label = new TQLabel( TQString( "%1:" ).arg( i18n( "Title" ) ), this );
gridLayout->addWidget( label, 0, 0 );
m_fieldLineEditTitle = new KBibTeX::FieldLineEdit( i18n( "Title" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditTitle" );
label->setBuddy( m_fieldLineEditTitle );
gridLayout->addWidget( m_fieldLineEditTitle, 0, 1 );
- label = new QLabel( QString( "%1:" ).arg( i18n( "Book Title" ) ), this );
+ label = new TQLabel( TQString( "%1:" ).arg( i18n( "Book Title" ) ), this );
gridLayout->addWidget( label, 1, 0 );
m_fieldLineEditBookTitle = new KBibTeX::FieldLineEdit( i18n( "Book Title" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditBookTitle" );
label->setBuddy( m_fieldLineEditBookTitle );
gridLayout->addWidget( m_fieldLineEditBookTitle, 1, 1 );
- label = new QLabel( QString( "%1:" ).arg( i18n( "Series" ) ), this );
+ label = new TQLabel( TQString( "%1:" ).arg( i18n( "Series" ) ), this );
gridLayout->addWidget( label, 2, 0 );
m_fieldLineEditSeries = new KBibTeX::FieldLineEdit( i18n( "Series" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditSeries" );
label->setBuddy( m_fieldLineEditSeries );
diff --git a/src/entrywidgettitle.h b/src/entrywidgettitle.h
index c43bb57..a26e2b1 100644
--- a/src/entrywidgettitle.h
+++ b/src/entrywidgettitle.h
@@ -30,7 +30,7 @@ namespace KBibTeX
{
Q_OBJECT
public:
- EntryWidgetTitle( BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+ EntryWidgetTitle( BibTeX::File *bibtexfile, bool isReadOnly, TQWidget *parent = 0, const char *name = 0 );
~EntryWidgetTitle();
bool isModified();
@@ -39,7 +39,7 @@ namespace KBibTeX
void updateGUI( BibTeX::Entry::EntryType entryType, bool enableAll );
void apply( BibTeX::Entry *entry );
void reset( BibTeX::Entry *entry );
- void updateWarnings( BibTeX::Entry::EntryType entryType, QListView *listViewWarnings );
+ void updateWarnings( BibTeX::Entry::EntryType entryType, TQListView *listViewWarnings );
private:
friend class EntryWidget;
diff --git a/src/entrywidgetuserdefined.cpp b/src/entrywidgetuserdefined.cpp
index 6479f73..b231938 100644
--- a/src/entrywidgetuserdefined.cpp
+++ b/src/entrywidgetuserdefined.cpp
@@ -17,8 +17,8 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qlayout.h>
-#include <qlabel.h>
+#include <ntqlayout.h>
+#include <ntqlabel.h>
#include <kdebug.h>
#include <kdialog.h>
@@ -31,7 +31,7 @@
namespace KBibTeX
{
- EntryWidgetUserDefined::EntryWidgetUserDefined( BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent, const char *name ) : EntryWidgetTab( bibtexfile, isReadOnly, parent, name )
+ EntryWidgetUserDefined::EntryWidgetUserDefined( BibTeX::File *bibtexfile, bool isReadOnly, TQWidget *parent, const char *name ) : EntryWidgetTab( bibtexfile, isReadOnly, parent, name )
{
setupGUI();
}
@@ -44,7 +44,7 @@ namespace KBibTeX
bool EntryWidgetUserDefined::isModified()
{
bool result = FALSE;
- for ( QValueList<FieldLineEdit*>::iterator it = m_widgets.begin(); !FALSE && it != m_widgets.end(); ++it )
+ for ( TQValueList<FieldLineEdit*>::iterator it = m_widgets.begin(); !FALSE && it != m_widgets.end(); ++it )
result |= ( *it )->isModified();
return result;
}
@@ -97,7 +97,7 @@ namespace KBibTeX
}
}
- void EntryWidgetUserDefined::updateWarnings( BibTeX::Entry::EntryType /*entryType*/, QListView */*listViewWarnings*/ )
+ void EntryWidgetUserDefined::updateWarnings( BibTeX::Entry::EntryType /*entryType*/, TQListView */*listViewWarnings*/ )
{
// nothing
}
@@ -107,16 +107,16 @@ namespace KBibTeX
Settings * settings = Settings::self();
int rows = settings->userDefinedInputFields.count() + 1;
if ( rows < 2 ) rows = 2;
- QGridLayout *gridLayout = new QGridLayout( this, rows, 2, KDialog::marginHint(), KDialog::spacingHint(), "gridLayout" );
+ TQGridLayout *gridLayout = new TQGridLayout( this, rows, 2, KDialog::marginHint(), KDialog::spacingHint(), "gridLayout" );
gridLayout->setRowStretch( rows - 1, 1 );
if ( settings->userDefinedInputFields.count() > 0 )
for ( unsigned int i = 0; i < settings->userDefinedInputFields.count(); ++i )
{
- QLabel *label = new QLabel( settings->userDefinedInputFields[i]->label, this );
+ TQLabel *label = new TQLabel( settings->userDefinedInputFields[i]->label, this );
gridLayout->addWidget( label, i, 0 );
if ( settings->userDefinedInputFields[i]->inputType == FieldLineEdit::itMultiLine )
- label->setAlignment( Qt::AlignTop );
+ label->setAlignment( TQt::AlignTop );
FieldLineEdit *widget = new FieldLineEdit( settings->userDefinedInputFields[i]->label, settings->userDefinedInputFields[i]->inputType, m_isReadOnly, this );
gridLayout->addWidget( widget, i, 1 );
@@ -129,13 +129,13 @@ namespace KBibTeX
gridLayout->setColStretch( 0, 0 );
gridLayout->setColStretch( 1, 1 );
- QLabel *label = new QLabel( this );
+ TQLabel *label = new TQLabel( this );
gridLayout->addWidget( label, 0, 0 );
label->setPixmap( BarIcon( "messagebox_info" ) );
- label->setAlignment( Qt::AlignVCenter | Qt::AlignLeft | Qt::WordBreak );
+ label->setAlignment( TQt::AlignVCenter | TQt::AlignLeft | TQt::WordBreak );
- label = new QLabel( i18n( "Please use the settings dialog to add user-defined fields here." ), this );
- label->setAlignment( Qt::AlignVCenter | Qt::AlignLeft | Qt::WordBreak );
+ label = new TQLabel( i18n( "Please use the settings dialog to add user-defined fields here." ), this );
+ label->setAlignment( TQt::AlignVCenter | TQt::AlignLeft | TQt::WordBreak );
gridLayout->addWidget( label, 0, 1 );
}
}
diff --git a/src/entrywidgetuserdefined.h b/src/entrywidgetuserdefined.h
index bc5e238..e7855d6 100644
--- a/src/entrywidgetuserdefined.h
+++ b/src/entrywidgetuserdefined.h
@@ -32,7 +32,7 @@ namespace KBibTeX
{
Q_OBJECT
public:
- EntryWidgetUserDefined( BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+ EntryWidgetUserDefined( BibTeX::File *bibtexfile, bool isReadOnly, TQWidget *parent = 0, const char *name = 0 );
~EntryWidgetUserDefined();
bool isModified();
@@ -41,10 +41,10 @@ namespace KBibTeX
void updateGUI( BibTeX::Entry::EntryType entryType, bool enableAll );
void apply(BibTeX::Entry *entry);
void reset(BibTeX::Entry *entry);
- void updateWarnings( BibTeX::Entry::EntryType entryType, QListView *listViewWarnings );
+ void updateWarnings( BibTeX::Entry::EntryType entryType, TQListView *listViewWarnings );
private:
- QValueList<FieldLineEdit*> m_widgets;
+ TQValueList<FieldLineEdit*> m_widgets;
void setupGUI();
};
diff --git a/src/entrywidgetwarningsitem.cpp b/src/entrywidgetwarningsitem.cpp
index 741d1a0..92346fc 100644
--- a/src/entrywidgetwarningsitem.cpp
+++ b/src/entrywidgetwarningsitem.cpp
@@ -25,8 +25,8 @@
namespace KBibTeX
{
- EntryWidgetWarningsItem::EntryWidgetWarningsItem( WarningLevel level, const QString &message, QWidget *widget, QListView *parent, const char* name )
- : QListViewItem( parent, name ), m_widget( widget )
+ EntryWidgetWarningsItem::EntryWidgetWarningsItem( WarningLevel level, const TQString &message, TQWidget *widget, TQListView *parent, const char* name )
+ : TQListViewItem( parent, name ), m_widget( widget )
{
KIconLoader * loader = KGlobal::instance() ->iconLoader();
switch ( level )
@@ -54,7 +54,7 @@ namespace KBibTeX
// nothing
}
- QWidget *EntryWidgetWarningsItem::widget()
+ TQWidget *EntryWidgetWarningsItem::widget()
{
return m_widget;
}
diff --git a/src/entrywidgetwarningsitem.h b/src/entrywidgetwarningsitem.h
index 2aa2044..f65beec 100644
--- a/src/entrywidgetwarningsitem.h
+++ b/src/entrywidgetwarningsitem.h
@@ -20,25 +20,25 @@
#ifndef KBIBTEXENTRYWIDGETWARNINGSITEM_H
#define KBIBTEXENTRYWIDGETWARNINGSITEM_H
-#include <qlistview.h>
+#include <ntqlistview.h>
-class QString;
+class TQString;
namespace KBibTeX
{
- class EntryWidgetWarningsItem : public QListViewItem
+ class EntryWidgetWarningsItem : public TQListViewItem
{
public:
enum WarningLevel {wlInformation = 1, wlWarning = 2, wlError = 3};
- EntryWidgetWarningsItem( WarningLevel level, const QString &message, QWidget *widget, QListView *parent, const char* name = NULL );
+ EntryWidgetWarningsItem( WarningLevel level, const TQString &message, TQWidget *widget, TQListView *parent, const char* name = NULL );
~EntryWidgetWarningsItem();
- QWidget *widget();
+ TQWidget *widget();
private:
- QWidget *m_widget;
+ TQWidget *m_widget;
};
}
diff --git a/src/fieldlineedit.cpp b/src/fieldlineedit.cpp
index ba36fe7..03296ca 100644
--- a/src/fieldlineedit.cpp
+++ b/src/fieldlineedit.cpp
@@ -17,11 +17,11 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qtextedit.h>
+#include <ntqpushbutton.h>
+#include <ntqlayout.h>
+#include <ntqtooltip.h>
+#include <ntqwhatsthis.h>
+#include <ntqtextedit.h>
#include <kdialog.h>
#include <klocale.h>
@@ -37,8 +37,8 @@
namespace KBibTeX
{
- FieldLineEdit::FieldLineEdit( const QString& caption, InputType inputType, bool isReadOnly, QWidget *parent, const char *name )
- : QWidget( parent, name ), m_value( new BibTeX::Value() ), m_caption( caption ), m_lineEdit( NULL ), m_textEdit( NULL ), m_isReadOnly( isReadOnly ), m_enabled( TRUE ), m_inputType( inputType ), m_isModified( FALSE ), m_fieldType( BibTeX::EntryField::ftUnknown ), m_completion( NULL )
+ FieldLineEdit::FieldLineEdit( const TQString& caption, InputType inputType, bool isReadOnly, TQWidget *parent, const char *name )
+ : TQWidget( parent, name ), m_value( new BibTeX::Value() ), m_caption( caption ), m_lineEdit( NULL ), m_textEdit( NULL ), m_isReadOnly( isReadOnly ), m_enabled( TRUE ), m_inputType( inputType ), m_isModified( FALSE ), m_fieldType( BibTeX::EntryField::ftUnknown ), m_completion( NULL )
{
setupGUI( name );
}
@@ -88,18 +88,18 @@ namespace KBibTeX
m_lineEdit->setCompletionObject( m_completion );
else
m_lineEdit->setCompletionObject( settings->completionMacro );
- QToolTip::add( m_lineEdit, QString( i18n( "BibTeX field '%1'" ) ).arg( BibTeX::EntryField::fieldTypeToString( fieldType ) ) );
- QWhatsThis::add( m_lineEdit, QString( i18n( "BibTeX field '%1'" ) ).arg( BibTeX::EntryField::fieldTypeToString( fieldType ) ) );
+ TQToolTip::add( m_lineEdit, TQString( i18n( "BibTeX field '%1'" ) ).arg( BibTeX::EntryField::fieldTypeToString( fieldType ) ) );
+ TQWhatsThis::add( m_lineEdit, TQString( i18n( "BibTeX field '%1'" ) ).arg( BibTeX::EntryField::fieldTypeToString( fieldType ) ) );
}
else if ( m_textEdit != NULL )
{
- QToolTip::add( m_textEdit, QString( i18n( "BibTeX field '%1'" ) ).arg( BibTeX::EntryField::fieldTypeToString( fieldType ) ) );
- QWhatsThis::add( m_textEdit, QString( i18n( "BibTeX field '%1'" ) ).arg( BibTeX::EntryField::fieldTypeToString( fieldType ) ) );
+ TQToolTip::add( m_textEdit, TQString( i18n( "BibTeX field '%1'" ) ).arg( BibTeX::EntryField::fieldTypeToString( fieldType ) ) );
+ TQWhatsThis::add( m_textEdit, TQString( i18n( "BibTeX field '%1'" ) ).arg( BibTeX::EntryField::fieldTypeToString( fieldType ) ) );
}
}
- QString FieldLineEdit::caption()
+ TQString FieldLineEdit::caption()
{
return m_caption;
}
@@ -117,7 +117,7 @@ namespace KBibTeX
FieldLineEdit::ErrorType FieldLineEdit::error()
{
ErrorType result = etNoError;
- for ( QValueList<BibTeX::ValueItem*>::ConstIterator it = m_value->items.begin(); result == etNoError && it != m_value->items.end(); ++it )
+ for ( TQValueList<BibTeX::ValueItem*>::ConstIterator it = m_value->items.begin(); result == etNoError && it != m_value->items.end(); ++it )
{
BibTeX::MacroKey *macroKey = dynamic_cast<BibTeX::MacroKey*>( *it );
result = ( macroKey != NULL && !macroKey->isValid() ) ? etInvalidStringKey : etNoError;
@@ -128,7 +128,7 @@ namespace KBibTeX
void FieldLineEdit::slotTextChanged( )
{
- QString text;
+ TQString text;
switch ( m_inputType )
{
case itSingleLine:
@@ -161,7 +161,7 @@ namespace KBibTeX
{
if ( m_value->items.count() == 1 )
{
- QString text = m_value->items.first()->text();
+ TQString text = m_value->items.first()->text();
if ( m_pushButtonString->isOn() )
{
BibTeX::PlainText *plainText = dynamic_cast<BibTeX::PlainText*>( m_value->items.first() );
@@ -200,7 +200,7 @@ namespace KBibTeX
void FieldLineEdit::slotComplexClicked()
{
- if ( ValueWidget::execute( m_caption, m_fieldType, m_value, m_isReadOnly, this ) == QDialog::Accepted )
+ if ( ValueWidget::execute( m_caption, m_fieldType, m_value, m_isReadOnly, this ) == TQDialog::Accepted )
{
updateGUI();
emit textChanged();
@@ -221,11 +221,11 @@ namespace KBibTeX
strcpy( subname, name );
strcat( subname, "_pbstring" );
}
- m_pushButtonString = new QPushButton( this, subname );
- m_pushButtonString->setIconSet( QIconSet( SmallIcon( "flag" ) ) );
- m_pushButtonString->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
+ m_pushButtonString = new TQPushButton( this, subname );
+ m_pushButtonString->setIconSet( TQIconSet( SmallIcon( "flag" ) ) );
+ m_pushButtonString->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum );
m_pushButtonString->setToggleButton( TRUE );
- QToolTip::add( m_pushButtonString, QString( i18n( "Set '%1' to be a string key" ) ).arg( m_caption ) );
+ TQToolTip::add( m_pushButtonString, TQString( i18n( "Set '%1' to be a string key" ) ).arg( m_caption ) );
m_pushButtonString->setEnabled( !m_isReadOnly );
connect( m_pushButtonString, SIGNAL( clicked() ), this, SLOT( slotStringToggled() ) );
@@ -234,18 +234,18 @@ namespace KBibTeX
strcpy( subname, name );
strcat( subname, "_pbcomplex" );
}
- m_pushButtonComplex = new QPushButton( this, subname );
- m_pushButtonComplex->setIconSet( QIconSet( SmallIcon( "leftjust" ) ) );
- m_pushButtonComplex->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
- QToolTip::add( m_pushButtonComplex, QString( i18n( "Edit '%1' as a concatenated value" ) ).arg( m_caption ) );
+ m_pushButtonComplex = new TQPushButton( this, subname );
+ m_pushButtonComplex->setIconSet( TQIconSet( SmallIcon( "leftjust" ) ) );
+ m_pushButtonComplex->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum );
+ TQToolTip::add( m_pushButtonComplex, TQString( i18n( "Edit '%1' as a concatenated value" ) ).arg( m_caption ) );
connect( m_pushButtonComplex, SIGNAL( clicked() ), this, SLOT( slotComplexClicked() ) );
- QGridLayout * layout = NULL;
+ TQGridLayout * layout = NULL;
switch ( m_inputType )
{
case itSingleLine:
{
- layout = new QGridLayout( this, 2, 3, 0, KDialog::spacingHint() );
+ layout = new TQGridLayout( this, 2, 3, 0, KDialog::spacingHint() );
if ( subname != NULL )
{
strcpy( subname, name );
@@ -259,19 +259,19 @@ namespace KBibTeX
setFocusProxy( m_lineEdit );
layout->addWidget( m_pushButtonString, 0, 1 );
layout->addWidget( m_pushButtonComplex, 0, 2 );
- QWidget::setTabOrder( m_lineEdit, m_pushButtonString );
+ TQWidget::setTabOrder( m_lineEdit, m_pushButtonString );
}
break;
case itMultiLine:
{
- layout = new QGridLayout( this, 3, 2, 0, KDialog::spacingHint() );
+ layout = new TQGridLayout( this, 3, 2, 0, KDialog::spacingHint() );
layout->setRowStretch( 2, 1 );
if ( subname != NULL )
{
strcpy( subname, name );
strcat( subname, "_textedit" );
}
- m_textEdit = new QTextEdit( this, subname );
+ m_textEdit = new TQTextEdit( this, subname );
m_textEdit->setReadOnly( m_isReadOnly );
if ( settings->editing_UseSpecialFont )
m_textEdit->setFont( settings->editing_SpecialFont );
@@ -279,12 +279,12 @@ namespace KBibTeX
setFocusProxy( m_textEdit );
layout->addWidget( m_pushButtonString, 0, 1 );
layout->addWidget( m_pushButtonComplex, 1, 1 );
- QWidget::setTabOrder( m_textEdit, m_pushButtonString );
+ TQWidget::setTabOrder( m_textEdit, m_pushButtonString );
}
break;
}
- QWidget::setTabOrder( m_pushButtonString, m_pushButtonComplex );
+ TQWidget::setTabOrder( m_pushButtonString, m_pushButtonComplex );
layout->setRowStretch( layout->numRows() - 1, 1 );
if ( subname != NULL )
@@ -308,11 +308,11 @@ namespace KBibTeX
switch ( m_inputType )
{
case itSingleLine:
- if ( QString::compare( m_lineEdit->text(), item->text() ) != 0 )
+ if ( TQString::compare( m_lineEdit->text(), item->text() ) != 0 )
m_lineEdit->setText( item->text() );
break;
case itMultiLine:
- if ( QString::compare( m_textEdit->text(), item->text() ) != 0 )
+ if ( TQString::compare( m_textEdit->text(), item->text() ) != 0 )
m_textEdit->setText( item->text() );
break;
}
@@ -353,9 +353,9 @@ namespace KBibTeX
{
case itSingleLine:
if ( enabled )
- connect( m_lineEdit, SIGNAL( textChanged( const QString& ) ), this, SLOT( slotTextChanged( ) ) );
+ connect( m_lineEdit, SIGNAL( textChanged( const TQString& ) ), this, SLOT( slotTextChanged( ) ) );
else
- disconnect( m_lineEdit, SIGNAL( textChanged( const QString& ) ), this, SLOT( slotTextChanged( ) ) );
+ disconnect( m_lineEdit, SIGNAL( textChanged( const TQString& ) ), this, SLOT( slotTextChanged( ) ) );
break;
case itMultiLine:
if ( enabled )
diff --git a/src/fieldlineedit.h b/src/fieldlineedit.h
index e17dde1..ebff73f 100644
--- a/src/fieldlineedit.h
+++ b/src/fieldlineedit.h
@@ -20,26 +20,26 @@
#ifndef KBIBTEXFIELDLINEEDIT_H
#define KBIBTEXFIELDLINEEDIT_H
-#include <qwidget.h>
+#include <ntqwidget.h>
#include <entryfield.h>
#include <value.h>
class KLineEdit;
-class QTextEdit;
-class QPushButton;
+class TQTextEdit;
+class TQPushButton;
class KCompletion;
namespace KBibTeX
{
- class FieldLineEdit : public QWidget
+ class FieldLineEdit : public TQWidget
{
Q_OBJECT
public:
enum InputType {itSingleLine, itMultiLine};
enum ErrorType {etNoError, etInvalidStringKey};
- FieldLineEdit( const QString& caption, InputType inputType = itSingleLine, bool readOnly = FALSE, QWidget *parent = 0, const char *name = 0 );
+ FieldLineEdit( const TQString& caption, InputType inputType = itSingleLine, bool readOnly = FALSE, TQWidget *parent = 0, const char *name = 0 );
~FieldLineEdit();
/**
@@ -64,7 +64,7 @@ namespace KBibTeX
void setFieldType( BibTeX::EntryField::FieldType fieldType );
- QString caption();
+ TQString caption();
bool isEmpty();
@@ -85,11 +85,11 @@ namespace KBibTeX
private:
BibTeX::Value *m_value;
- QString m_caption;
+ TQString m_caption;
KLineEdit *m_lineEdit;
- QTextEdit *m_textEdit;
- QPushButton *m_pushButtonString;
- QPushButton *m_pushButtonComplex;
+ TQTextEdit *m_textEdit;
+ TQPushButton *m_pushButtonString;
+ TQPushButton *m_pushButtonComplex;
bool m_isReadOnly;
bool m_enabled;
InputType m_inputType;
diff --git a/src/fieldlistview.cpp b/src/fieldlistview.cpp
index 62ba8a6..edb21a4 100644
--- a/src/fieldlistview.cpp
+++ b/src/fieldlistview.cpp
@@ -17,15 +17,15 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qstring.h>
-#include <qregexp.h>
-#include <qlayout.h>
-#include <qheader.h>
-#include <qtimer.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
+#include <ntqstring.h>
+#include <ntqregexp.h>
+#include <ntqlayout.h>
+#include <ntqheader.h>
+#include <ntqtimer.h>
+#include <ntqtooltip.h>
+#include <ntqwhatsthis.h>
+#include <ntqpushbutton.h>
+#include <ntqcheckbox.h>
#include <klistview.h>
#include <klineedit.h>
@@ -42,8 +42,8 @@
namespace KBibTeX
{
- FieldListView::FieldListView( const QString& caption, const QString& prefixNew, bool isReadOnly, QWidget *parent, const char *name )
- : QWidget( parent, name ), m_value( new BibTeX::Value() ), m_caption( caption ), m_prefixNew( prefixNew ), m_isReadOnly( isReadOnly ), m_enabled( TRUE ), m_isComplex( FALSE ), m_isModified( FALSE ), m_newValueCounter( 0 ), m_fieldType( BibTeX::EntryField::ftUnknown )
+ FieldListView::FieldListView( const TQString& caption, const TQString& prefixNew, bool isReadOnly, TQWidget *parent, const char *name )
+ : TQWidget( parent, name ), m_value( new BibTeX::Value() ), m_caption( caption ), m_prefixNew( prefixNew ), m_isReadOnly( isReadOnly ), m_enabled( TRUE ), m_isComplex( FALSE ), m_isModified( FALSE ), m_newValueCounter( 0 ), m_fieldType( BibTeX::EntryField::ftUnknown )
{
setupGUI();
m_listViewElements->installEventFilter( this );
@@ -97,13 +97,13 @@ namespace KBibTeX
Settings * settings = Settings::self();
m_listViewElements->renameLineEdit() ->setCompletionObject( settings->completion( m_fieldType ) );
- QToolTip::add( m_listViewElements, QString( i18n( "BibTeX field '%1'" ) ).arg( BibTeX::EntryField::fieldTypeToString( fieldType ) ) );
- QWhatsThis::add( m_listViewElements, QString( i18n( "BibTeX field '%1'" ) ).arg( BibTeX::EntryField::fieldTypeToString( fieldType ) ) );
+ TQToolTip::add( m_listViewElements, TQString( i18n( "BibTeX field '%1'" ) ).arg( BibTeX::EntryField::fieldTypeToString( fieldType ) ) );
+ TQWhatsThis::add( m_listViewElements, TQString( i18n( "BibTeX field '%1'" ) ).arg( BibTeX::EntryField::fieldTypeToString( fieldType ) ) );
m_value->items.clear();
}
- QString FieldListView::caption()
+ TQString FieldListView::caption()
{
return m_caption;
}
@@ -118,16 +118,16 @@ namespace KBibTeX
return m_isModified;
}
- bool FieldListView::eventFilter( QObject *o, QEvent * e )
+ bool FieldListView::eventFilter( TQObject *o, TQEvent * e )
{
if ( o == m_listViewElements->renameLineEdit() )
{
- if ( e->type() == QEvent::Hide )
+ if ( e->type() == TQEvent::Hide )
itemRenameDone();
}
- else if ( e->type() == QEvent::AccelOverride )
+ else if ( e->type() == TQEvent::AccelOverride )
{
- QKeyEvent * ke = static_cast<QKeyEvent*>( e );
+ TQKeyEvent * ke = static_cast<TQKeyEvent*>( e );
//override delete action
if ( ke->key() == Key_Delete && ke->state() == NoButton )
{
@@ -201,10 +201,10 @@ namespace KBibTeX
{
if ( isSimple() )
{
- KListViewItem * item = new KListViewItem( m_listViewElements, m_listViewElements->lastItem(), QString( "%1%2" ).arg( m_prefixNew ).arg( ++m_newValueCounter ) );
+ KListViewItem * item = new KListViewItem( m_listViewElements, m_listViewElements->lastItem(), TQString( "%1%2" ).arg( m_prefixNew ).arg( ++m_newValueCounter ) );
m_listViewElements->setSelected( item, TRUE );
updateGUI();
- QTimer::singleShot( 100, this, SLOT( slotEdit() ) );
+ TQTimer::singleShot( 100, this, SLOT( slotEdit() ) );
}
}
@@ -220,7 +220,7 @@ namespace KBibTeX
void FieldListView::slotDelete()
{
- QListViewItem * item = m_listViewElements->selectedItem();
+ TQListViewItem * item = m_listViewElements->selectedItem();
if ( isSimple() && item != NULL )
{
delete item;
@@ -233,7 +233,7 @@ namespace KBibTeX
void FieldListView::slotUp()
{
- QListViewItem * item = m_listViewElements->selectedItem();
+ TQListViewItem * item = m_listViewElements->selectedItem();
if ( isSimple() && !m_listViewElements->isRenaming() && item != NULL && item -> itemAbove() != NULL )
{
item->itemAbove() ->moveItem( item );
@@ -246,7 +246,7 @@ namespace KBibTeX
void FieldListView::slotDown()
{
- QListViewItem * item = m_listViewElements->selectedItem();
+ TQListViewItem * item = m_listViewElements->selectedItem();
if ( isSimple() && !m_listViewElements->isRenaming() && item != NULL && item -> itemBelow() != NULL )
{
item->moveItem( item->itemBelow() );
@@ -259,7 +259,7 @@ namespace KBibTeX
void FieldListView::slotComplex()
{
- if ( !m_listViewElements->isRenaming() && ValueWidget::execute( m_caption, m_fieldType, m_value, m_isReadOnly, this ) == QDialog::Accepted )
+ if ( !m_listViewElements->isRenaming() && ValueWidget::execute( m_caption, m_fieldType, m_value, m_isReadOnly, this ) == TQDialog::Accepted )
{
reset();
updateGUI();
@@ -268,13 +268,13 @@ namespace KBibTeX
}
}
- void FieldListView::slotListViewDoubleClicked( QListViewItem * lvi )
+ void FieldListView::slotListViewDoubleClicked( TQListViewItem * lvi )
{
if ( lvi == NULL )
slotAdd();
}
- void FieldListView::slotItemRenamed( QListViewItem * item, int /*col*/, const QString & text )
+ void FieldListView::slotItemRenamed( TQListViewItem * item, int /*col*/, const TQString & text )
{
if ( text.isEmpty() && isSimple() && item != NULL )
{
@@ -290,7 +290,7 @@ namespace KBibTeX
{
Settings * settings = Settings::self();
- QGridLayout * layout = new QGridLayout( this, 8, 2, 0, KDialog::spacingHint() );
+ TQGridLayout * layout = new TQGridLayout( this, 8, 2, 0, KDialog::spacingHint() );
layout->setRowStretch( 5, 1 );
m_listViewElements = new KListView( this );
@@ -298,7 +298,7 @@ namespace KBibTeX
m_listViewElements->renameLineEdit() ->setCompletionObject( settings->completion( m_fieldType ) );
m_listViewElements->renameLineEdit() ->setCompletionMode( KGlobalSettings::CompletionPopup );
m_listViewElements->renameLineEdit() ->completionObject() ->setIgnoreCase( true );
- m_listViewElements->setDefaultRenameAction( QListView::Accept );
+ m_listViewElements->setDefaultRenameAction( TQListView::Accept );
m_listViewElements->addColumn( m_caption );
m_listViewElements->setSorting( -1, TRUE );
m_listViewElements->setItemsRenameable( TRUE );
@@ -309,62 +309,62 @@ namespace KBibTeX
m_listViewElements->header() ->setClickEnabled( FALSE );
m_listViewElements->header() ->setStretchEnabled( TRUE, 0 );
connect( m_listViewElements, SIGNAL( selectionChanged() ), this, SLOT( updateGUI() ) );
- connect( m_listViewElements, SIGNAL( clicked( QListViewItem * ) ), this, SLOT( updateGUI() ) );
- connect( m_listViewElements, SIGNAL( doubleClicked( QListViewItem * ) ), this, SLOT( slotListViewDoubleClicked( QListViewItem * ) ) );
- connect( m_listViewElements, SIGNAL( currentChanged( QListViewItem * ) ), this, SLOT( updateGUI() ) );
- connect( m_listViewElements, SIGNAL( itemRenamed( QListViewItem*, int, const QString& ) ), this, SLOT( slotItemRenamed( QListViewItem*, int, const QString& ) ) );
+ connect( m_listViewElements, SIGNAL( clicked( TQListViewItem * ) ), this, SLOT( updateGUI() ) );
+ connect( m_listViewElements, SIGNAL( doubleClicked( TQListViewItem * ) ), this, SLOT( slotListViewDoubleClicked( TQListViewItem * ) ) );
+ connect( m_listViewElements, SIGNAL( currentChanged( TQListViewItem * ) ), this, SLOT( updateGUI() ) );
+ connect( m_listViewElements, SIGNAL( itemRenamed( TQListViewItem*, int, const TQString& ) ), this, SLOT( slotItemRenamed( TQListViewItem*, int, const TQString& ) ) );
- m_pushButtonAdd = new QPushButton( i18n( "Add" ), this );
+ m_pushButtonAdd = new TQPushButton( i18n( "Add" ), this );
layout->addWidget( m_pushButtonAdd, 0, 1 );
- m_pushButtonAdd->setIconSet( QIconSet( SmallIcon( "add" ) ) );
+ m_pushButtonAdd->setIconSet( TQIconSet( SmallIcon( "add" ) ) );
connect( m_pushButtonAdd, SIGNAL( clicked() ), this, SLOT( slotAdd() ) );
- QToolTip::add( m_pushButtonAdd, QString( i18n( "Add new '%1' item (Ctrl+A)" ) ).arg( m_caption ) );
+ TQToolTip::add( m_pushButtonAdd, TQString( i18n( "Add new '%1' item (Ctrl+A)" ) ).arg( m_caption ) );
- m_pushButtonEdit = new QPushButton( i18n( "Edit" ), this );
+ m_pushButtonEdit = new TQPushButton( i18n( "Edit" ), this );
layout->addWidget( m_pushButtonEdit, 1, 1 );
- m_pushButtonEdit->setIconSet( QIconSet( SmallIcon( "edit" ) ) );
+ m_pushButtonEdit->setIconSet( TQIconSet( SmallIcon( "edit" ) ) );
connect( m_pushButtonEdit, SIGNAL( clicked() ), this, SLOT( slotEdit() ) );
- QToolTip::add( m_pushButtonEdit, QString( i18n( "Edit current '%1' item (F2)" ) ).arg( m_caption ) );
+ TQToolTip::add( m_pushButtonEdit, TQString( i18n( "Edit current '%1' item (F2)" ) ).arg( m_caption ) );
- m_pushButtonDelete = new QPushButton( i18n( "Delete" ), this );
+ m_pushButtonDelete = new TQPushButton( i18n( "Delete" ), this );
layout->addWidget( m_pushButtonDelete, 2, 1 );
- m_pushButtonDelete->setIconSet( QIconSet( SmallIcon( "editdelete" ) ) );
+ m_pushButtonDelete->setIconSet( TQIconSet( SmallIcon( "editdelete" ) ) );
connect( m_pushButtonDelete, SIGNAL( clicked() ), this, SLOT( slotDelete() ) );
- QToolTip::add( m_pushButtonDelete, QString( i18n( "Delete current '%1' item (Del)" ) ).arg( m_caption ) );
+ TQToolTip::add( m_pushButtonDelete, TQString( i18n( "Delete current '%1' item (Del)" ) ).arg( m_caption ) );
- m_pushButtonUp = new QPushButton( i18n( "Up" ), this );
+ m_pushButtonUp = new TQPushButton( i18n( "Up" ), this );
layout->addWidget( m_pushButtonUp, 3, 1 );
- m_pushButtonUp->setIconSet( QIconSet( SmallIcon( "up" ) ) );
+ m_pushButtonUp->setIconSet( TQIconSet( SmallIcon( "up" ) ) );
connect( m_pushButtonUp, SIGNAL( clicked() ), this, SLOT( slotUp() ) );
- QToolTip::add( m_pushButtonUp, QString( i18n( "Move current '%1' item up (Ctrl+Up)" ) ).arg( m_caption ) );
+ TQToolTip::add( m_pushButtonUp, TQString( i18n( "Move current '%1' item up (Ctrl+Up)" ) ).arg( m_caption ) );
- m_pushButtonDown = new QPushButton( i18n( "Down" ), this );
+ m_pushButtonDown = new TQPushButton( i18n( "Down" ), this );
layout->addWidget( m_pushButtonDown, 4, 1 );
- m_pushButtonDown->setIconSet( QIconSet( SmallIcon( "down" ) ) );
+ m_pushButtonDown->setIconSet( TQIconSet( SmallIcon( "down" ) ) );
connect( m_pushButtonDown, SIGNAL( clicked() ), this, SLOT( slotDown() ) );
- QToolTip::add( m_pushButtonDown, QString( i18n( "Move current '%1' item down (Ctrl+Down)" ) ).arg( m_caption ) );
+ TQToolTip::add( m_pushButtonDown, TQString( i18n( "Move current '%1' item down (Ctrl+Down)" ) ).arg( m_caption ) );
- m_pushButtonComplexEdit = new QPushButton( i18n( "Complex..." ), this );
+ m_pushButtonComplexEdit = new TQPushButton( i18n( "Complex..." ), this );
layout->addWidget( m_pushButtonComplexEdit, 6, 1 );
- m_pushButtonComplexEdit->setIconSet( QIconSet( SmallIcon( "leftjust" ) ) );
+ m_pushButtonComplexEdit->setIconSet( TQIconSet( SmallIcon( "leftjust" ) ) );
connect( m_pushButtonComplexEdit, SIGNAL( clicked() ), this, SLOT( slotComplex() ) );
- QToolTip::add( m_pushButtonComplexEdit, QString( i18n( "Edit current '%1' item as a concatenated string (Ctrl+Alt+C)" ) ).arg( m_caption ) );
+ TQToolTip::add( m_pushButtonComplexEdit, TQString( i18n( "Edit current '%1' item as a concatenated string (Ctrl+Alt+C)" ) ).arg( m_caption ) );
- m_checkBoxEtAl = new QCheckBox( i18n( "... and others (et al.)" ), this );
+ m_checkBoxEtAl = new TQCheckBox( i18n( "... and others (et al.)" ), this );
layout->addMultiCellWidget( m_checkBoxEtAl, 7, 7, 0, 1 );
connect( m_checkBoxEtAl, SIGNAL( toggled( bool ) ), this, SLOT( apply() ) );
}
void FieldListView::apply()
{
- QStringList elements;
+ TQStringList elements;
Settings * settings = Settings::self();
m_value->items.clear();
- for ( QListViewItemIterator it( m_listViewElements ); it.current(); it++ )
+ for ( TQListViewItemIterator it( m_listViewElements ); it.current(); it++ )
{
- QString text = it.current() ->text( 0 );
+ TQString text = it.current() ->text( 0 );
elements.append( text );
}
@@ -378,7 +378,7 @@ namespace KBibTeX
case BibTeX::EntryField::ftAuthor:
case BibTeX::EntryField::ftEditor:
{
- for ( QStringList::ConstIterator it = elements.constBegin(); it != elements.constEnd(); ++it )
+ for ( TQStringList::ConstIterator it = elements.constBegin(); it != elements.constEnd(); ++it )
{
BibTeX::Person *person = new BibTeX::Person( *it, settings->editing_FirstNameFirst );
container->persons.append( person );
@@ -408,7 +408,7 @@ namespace KBibTeX
m_checkBoxEtAl->setChecked( FALSE );
m_isComplex = FALSE;
- for ( QValueList<BibTeX::ValueItem*>::ConstIterator it = m_value->items.constBegin(); !m_isComplex && it != m_value->items.constEnd(); ++it )
+ for ( TQValueList<BibTeX::ValueItem*>::ConstIterator it = m_value->items.constBegin(); !m_isComplex && it != m_value->items.constEnd(); ++it )
{
BibTeX::MacroKey *macroKey = dynamic_cast<BibTeX::MacroKey *>( *it );
m_isComplex = macroKey != NULL;
@@ -420,17 +420,17 @@ namespace KBibTeX
case BibTeX::EntryField::ftAuthor:
case BibTeX::EntryField::ftEditor:
{
- for ( QValueList<BibTeX::ValueItem*>::ConstIterator it = m_value->items.constBegin(); it != m_value->items.constEnd(); ++it )
+ for ( TQValueList<BibTeX::ValueItem*>::ConstIterator it = m_value->items.constBegin(); it != m_value->items.constEnd(); ++it )
{
BibTeX::PersonContainer *container = dynamic_cast<BibTeX::PersonContainer *>( *it );
if ( container != NULL )
- for ( QValueList<BibTeX::Person*>::ConstIterator pit = container->persons.constBegin(); pit != container->persons.constEnd(); ++pit )
+ for ( TQValueList<BibTeX::Person*>::ConstIterator pit = container->persons.constBegin(); pit != container->persons.constEnd(); ++pit )
{
- QString text = ( *pit )->text();
+ TQString text = ( *pit )->text();
if ( text == "others" )
m_checkBoxEtAl->setChecked( TRUE );
else
- new QListViewItem( m_listViewElements, m_listViewElements->lastItem(), text );
+ new TQListViewItem( m_listViewElements, m_listViewElements->lastItem(), text );
}
}
}
diff --git a/src/fieldlistview.h b/src/fieldlistview.h
index f8a3baa..9cfed77 100644
--- a/src/fieldlistview.h
+++ b/src/fieldlistview.h
@@ -20,16 +20,16 @@
#ifndef KBIBTEXFIELDLISTVIEW_H
#define KBIBTEXFIELDLISTVIEW_H
-#include <qwidget.h>
+#include <ntqwidget.h>
#include <value.h>
#include <entryfield.h>
-class QString;
+class TQString;
class KListView;
-class QListViewItem;
-class QPushButton;
-class QCheckBox;
+class TQListViewItem;
+class TQPushButton;
+class TQCheckBox;
namespace KBibTeX
{
@@ -37,11 +37,11 @@ namespace KBibTeX
/**
@author Thomas Fischer <fischer@unix-ag.uni-kl.de>
*/
- class FieldListView : public QWidget
+ class FieldListView : public TQWidget
{
Q_OBJECT
public:
- FieldListView( const QString& caption, const QString& prefixNew, bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+ FieldListView( const TQString& caption, const TQString& prefixNew, bool isReadOnly, TQWidget *parent = 0, const char *name = 0 );
~FieldListView();
void setValue( const BibTeX::Value *value );
@@ -51,13 +51,13 @@ namespace KBibTeX
void setFieldType( BibTeX::EntryField::FieldType fieldType );
- QString caption();
+ TQString caption();
bool isEmpty();
bool isModified();
- virtual bool eventFilter( QObject *o, QEvent * e );
+ virtual bool eventFilter( TQObject *o, TQEvent * e );
private slots:
void updateGUI();
@@ -67,14 +67,14 @@ namespace KBibTeX
void slotUp();
void slotDown();
void slotComplex();
- void slotListViewDoubleClicked( QListViewItem * );
- void slotItemRenamed( QListViewItem * item, int col, const QString & text );
+ void slotListViewDoubleClicked( TQListViewItem * );
+ void slotItemRenamed( TQListViewItem * item, int col, const TQString & text );
void apply();
private:
BibTeX::Value *m_value;
- QString m_caption;
- QString m_prefixNew;
+ TQString m_caption;
+ TQString m_prefixNew;
bool m_isReadOnly;
bool m_enabled;
bool m_isComplex;
@@ -82,13 +82,13 @@ namespace KBibTeX
int m_newValueCounter;
BibTeX::EntryField::FieldType m_fieldType;
KListView *m_listViewElements;
- QPushButton *m_pushButtonAdd;
- QPushButton *m_pushButtonEdit;
- QPushButton *m_pushButtonDelete;
- QPushButton *m_pushButtonUp;
- QPushButton *m_pushButtonDown;
- QPushButton *m_pushButtonComplexEdit;
- QCheckBox *m_checkBoxEtAl;
+ TQPushButton *m_pushButtonAdd;
+ TQPushButton *m_pushButtonEdit;
+ TQPushButton *m_pushButtonDelete;
+ TQPushButton *m_pushButtonUp;
+ TQPushButton *m_pushButtonDown;
+ TQPushButton *m_pushButtonComplexEdit;
+ TQCheckBox *m_checkBoxEtAl;
void setupGUI();
void reset();
diff --git a/src/file.cpp b/src/file.cpp
index 8b6106e..c02ae79 100644
--- a/src/file.cpp
+++ b/src/file.cpp
@@ -17,11 +17,11 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qiodevice.h>
-#include <qstringlist.h>
-#include <qregexp.h>
+#include <ntqfile.h>
+#include <ntqtextstream.h>
+#include <ntqiodevice.h>
+#include <ntqstringlist.h>
+#include <ntqregexp.h>
#include <settings.h>
#include <file.h>
@@ -34,7 +34,7 @@
namespace BibTeX
{
- File::File( ) : QObject( ), fileName( QString::null )
+ File::File( ) : TQObject( ), fileName( TQString::null )
{
// nothing
}
@@ -88,7 +88,7 @@ namespace BibTeX
}
if ( !found )
- qDebug( "BibTeX::File got told to delete an element which is not in this file." );
+ tqDebug( "BibTeX::File got told to delete an element which is not in this file." );
}
Element* File::cloneElement( Element *element )
@@ -112,7 +112,7 @@ namespace BibTeX
}
}
- Element *File::containsKey( const QString &key )
+ Element *File::containsKey( const TQString &key )
{
for ( ElementList::iterator it = elements.begin(); it != elements.end(); it++ )
{
@@ -136,7 +136,7 @@ namespace BibTeX
return NULL;
}
- const Element *File::containsKeyConst( const QString &key ) const
+ const Element *File::containsKeyConst( const TQString &key ) const
{
for ( ElementList::const_iterator it = elements.begin(); it != elements.end(); it++ )
{
@@ -160,9 +160,9 @@ namespace BibTeX
return NULL;
}
- QStringList File::allKeys()
+ TQStringList File::allKeys()
{
- QStringList result;
+ TQStringList result;
for ( ElementList::iterator it = elements.begin(); it != elements.end(); it++ )
{
@@ -180,9 +180,9 @@ namespace BibTeX
return result;
}
- QString File::text()
+ TQString File::text()
{
- QString result;
+ TQString result;
for ( ElementList::iterator it = elements.begin(); it != elements.end(); it++ )
{
@@ -213,17 +213,17 @@ namespace BibTeX
return elements.constEnd();
}
- QStringList File::getAllValuesAsStringList( const EntryField::FieldType fieldType ) const
+ TQStringList File::getAllValuesAsStringList( const EntryField::FieldType fieldType ) const
{
- QStringList result;
+ TQStringList result;
for ( ElementList::ConstIterator eit = elements.constBegin(); eit != elements.constEnd(); ++eit )
{
Entry* entry = dynamic_cast<Entry*>( *eit );
EntryField * field = NULL;
if ( entry != NULL && ( field = entry->getField( fieldType ) ) != NULL )
{
- QValueList<ValueItem*> valueItems = field->value()->items;
- for ( QValueList<ValueItem*>::ConstIterator vit = valueItems.begin(); vit != valueItems.end(); ++vit )
+ TQValueList<ValueItem*> valueItems = field->value()->items;
+ for ( TQValueList<ValueItem*>::ConstIterator vit = valueItems.begin(); vit != valueItems.end(); ++vit )
{
switch ( fieldType )
{
@@ -231,9 +231,9 @@ namespace BibTeX
{
KeywordContainer *container = dynamic_cast<KeywordContainer*>( *vit );
if ( container != NULL )
- for ( QValueList<Keyword*>::ConstIterator kit = container->keywords.constBegin(); kit != container->keywords.constEnd(); ++kit )
+ for ( TQValueList<Keyword*>::ConstIterator kit = container->keywords.constBegin(); kit != container->keywords.constEnd(); ++kit )
{
- QString text = ( *kit )->text();
+ TQString text = ( *kit )->text();
if ( !result.contains( text ) )
result.append( text );
}
@@ -244,9 +244,9 @@ namespace BibTeX
{
PersonContainer *container = dynamic_cast<PersonContainer*>( *vit );
if ( container != NULL )
- for ( QValueList<Person*>::ConstIterator pit = container->persons.constBegin(); pit != container->persons.constEnd(); ++pit )
+ for ( TQValueList<Person*>::ConstIterator pit = container->persons.constBegin(); pit != container->persons.constEnd(); ++pit )
{
- QString text = ( *pit )->text();
+ TQString text = ( *pit )->text();
if ( !result.contains( text ) )
result.append( text );
}
@@ -254,7 +254,7 @@ namespace BibTeX
break;
default:
{
- QString text = ( *vit )->text();
+ TQString text = ( *vit )->text();
if ( !result.contains( text ) )
result.append( text );
}
@@ -267,17 +267,17 @@ namespace BibTeX
return result;
}
- QMap<QString, int> File::getAllValuesAsStringListWithCount( const EntryField::FieldType fieldType ) const
+ TQMap<TQString, int> File::getAllValuesAsStringListWithCount( const EntryField::FieldType fieldType ) const
{
- QMap<QString, int> result;
+ TQMap<TQString, int> result;
for ( ElementList::ConstIterator eit = elements.begin(); eit != elements.end(); ++eit )
{
Entry* entry = dynamic_cast<Entry*>( *eit );
EntryField * field = NULL;
if ( entry != NULL && ( field = entry->getField( fieldType ) ) != NULL )
{
- QValueList<ValueItem*> valueItems = field->value()->items;
- for ( QValueList<ValueItem*>::ConstIterator vit = valueItems.begin(); vit != valueItems.end(); ++vit )
+ TQValueList<ValueItem*> valueItems = field->value()->items;
+ for ( TQValueList<ValueItem*>::ConstIterator vit = valueItems.begin(); vit != valueItems.end(); ++vit )
{
switch ( fieldType )
{
@@ -285,9 +285,9 @@ namespace BibTeX
{
KeywordContainer *container = dynamic_cast<KeywordContainer*>( *vit );
if ( container != NULL )
- for ( QValueList<Keyword*>::ConstIterator kit = container->keywords.constBegin(); kit != container->keywords.constEnd(); ++kit )
+ for ( TQValueList<Keyword*>::ConstIterator kit = container->keywords.constBegin(); kit != container->keywords.constEnd(); ++kit )
{
- QString text = ( *kit )->text();
+ TQString text = ( *kit )->text();
if ( !result.contains( text ) )
result[text] = 1;
else
@@ -300,9 +300,9 @@ namespace BibTeX
{
PersonContainer *container = dynamic_cast<PersonContainer*>( *vit );
if ( container != NULL )
- for ( QValueList<Person*>::ConstIterator pit = container->persons.constBegin(); pit != container->persons.constEnd(); ++pit )
+ for ( TQValueList<Person*>::ConstIterator pit = container->persons.constBegin(); pit != container->persons.constEnd(); ++pit )
{
- QString text = ( *pit )->text();
+ TQString text = ( *pit )->text();
if ( !result.contains( text ) )
result[text] = 1;
else
@@ -312,7 +312,7 @@ namespace BibTeX
break;
default:
{
- QString text = ( *vit )->text();
+ TQString text = ( *vit )->text();
if ( !result.contains( text ) )
result[text] = 1;
else
@@ -326,9 +326,9 @@ namespace BibTeX
return result;
}
- void File::replaceValue( const QString& oldText, const QString& newText, const EntryField::FieldType fieldType )
+ void File::replaceValue( const TQString& oldText, const TQString& newText, const EntryField::FieldType fieldType )
{
- qDebug( "Renaming all occurrences of '%s' to '%s' for fields of type '%s'", oldText.latin1(), newText.latin1(), EntryField::fieldTypeToString( fieldType ).latin1() );
+ tqDebug( "Renaming all occurrences of '%s' to '%s' for fields of type '%s'", oldText.latin1(), newText.latin1(), EntryField::fieldTypeToString( fieldType ).latin1() );
for ( ElementList::ConstIterator it = elements.begin(); it != elements.end(); it++ )
{
diff --git a/src/file.h b/src/file.h
index fcb797a..37c942b 100644
--- a/src/file.h
+++ b/src/file.h
@@ -20,18 +20,18 @@
#ifndef BIBTEXFILE_H
#define BIBTEXFILE_H
-#include <qobject.h>
-#include <qvaluelist.h>
+#include <ntqobject.h>
+#include <ntqvaluelist.h>
#include <entryfield.h>
-class QDir;
-class QString;
-class QChar;
-class QStringList;
-class QWaitCondition;
-class QProcess;
-class QIODevice;
+class TQDir;
+class TQString;
+class TQChar;
+class TQStringList;
+class TQWaitCondition;
+class TQProcess;
+class TQIODevice;
namespace BibTeX
{
@@ -40,17 +40,17 @@ namespace BibTeX
class String;
class FileExporter;
- static const QString Months[] =
+ static const TQString Months[] =
{
- QString( "January" ), QString( "February" ), QString( "March" ), QString( "April" ), QString( "May" ), QString( "June" ), QString( "July" ), QString( "August" ), QString( "September" ), QString( "October" ), QString( "November" ), QString( "December" )
+ TQString( "January" ), TQString( "February" ), TQString( "March" ), TQString( "April" ), TQString( "May" ), TQString( "June" ), TQString( "July" ), TQString( "August" ), TQString( "September" ), TQString( "October" ), TQString( "November" ), TQString( "December" )
};
- static const QString MonthsTriple[] =
+ static const TQString MonthsTriple[] =
{
- QString( "jan" ), QString( "feb" ), QString( "mar" ), QString( "apr" ), QString( "may" ), QString( "jun" ), QString( "jul" ), QString( "aug" ), QString( "sep" ), QString( "oct" ), QString( "nov" ), QString( "dec" )
+ TQString( "jan" ), TQString( "feb" ), TQString( "mar" ), TQString( "apr" ), TQString( "may" ), TQString( "jun" ), TQString( "jul" ), TQString( "aug" ), TQString( "sep" ), TQString( "oct" ), TQString( "nov" ), TQString( "dec" )
};
- class File : public QObject
+ class File : public TQObject
{
Q_OBJECT
@@ -61,7 +61,7 @@ namespace BibTeX
friend class FileParser;
public:
- typedef QValueList<Element*> ElementList;
+ typedef TQValueList<Element*> ElementList;
enum FileFormat { formatUndefined = 0, formatBibTeX = 1, formatXML = 2, formatHTML = 3, formatPDF = 4, formatPS = 5, formatRTF = 6, formatRIS = 7, formatEndNote = 8, formatISI = 9, formatDocBook5 = 10, formatMODS = 11, formatWordBib = 12, formatAds = 13, formatEndNoteXML = 14 };
enum Encoding {encImplicit = 0, encLaTeX = 1, encUTF8 = 2};
@@ -77,23 +77,23 @@ namespace BibTeX
void deleteElement( Element *element );
static Element* cloneElement( Element *element );
- Element *containsKey( const QString &key );
- const Element *containsKeyConst( const QString &key ) const;
- QStringList allKeys();
- QString text();
+ Element *containsKey( const TQString &key );
+ const Element *containsKeyConst( const TQString &key ) const;
+ TQStringList allKeys();
+ TQString text();
ElementList::iterator begin();
ElementList::iterator end();
ElementList::const_iterator constBegin() const;
ElementList::const_iterator constEnd() const;
- QStringList getAllValuesAsStringList( const EntryField::FieldType fieldType ) const;
- QMap<QString, int> getAllValuesAsStringListWithCount( const EntryField::FieldType fieldType ) const;
- void replaceValue( const QString& oldText, const QString& newText, const EntryField::FieldType fieldType );
+ TQStringList getAllValuesAsStringList( const EntryField::FieldType fieldType ) const;
+ TQMap<TQString, int> getAllValuesAsStringListWithCount( const EntryField::FieldType fieldType ) const;
+ void replaceValue( const TQString& oldText, const TQString& newText, const EntryField::FieldType fieldType );
BibTeX::Entry *completeReferencedFieldsConst( const BibTeX::Entry *entry ) const;
void completeReferencedFields( BibTeX::Entry *entry ) const;
- QString fileName;
+ TQString fileName;
protected:
ElementList elements;
diff --git a/src/fileexporter.cpp b/src/fileexporter.cpp
index b5fe73b..8d190b7 100644
--- a/src/fileexporter.cpp
+++ b/src/fileexporter.cpp
@@ -22,7 +22,7 @@
namespace BibTeX
{
- FileExporter::FileExporter() : QObject()
+ FileExporter::FileExporter() : TQObject()
{
// nothing
}
diff --git a/src/fileexporter.h b/src/fileexporter.h
index cc60ac0..834310f 100644
--- a/src/fileexporter.h
+++ b/src/fileexporter.h
@@ -20,12 +20,12 @@
#ifndef BIBTEXFILEEXPORTER_H
#define BIBTEXFILEEXPORTER_H
-#include <qobject.h>
-#include <qmutex.h>
+#include <ntqobject.h>
+#include <ntqmutex.h>
#include <file.h>
-class QIODevice;
+class TQIODevice;
namespace BibTeX
{
@@ -35,15 +35,15 @@ namespace BibTeX
/**
@author Thomas Fischer
*/
- class FileExporter : public QObject
+ class FileExporter : public TQObject
{
Q_OBJECT
public:
FileExporter();
~FileExporter();
- virtual bool save( QIODevice *iodevice, const File *bibtexfile, QStringList *errorLog = NULL ) = 0;
- virtual bool save( QIODevice *iodevice, const Element* element, QStringList *errorLog = NULL ) = 0;
+ virtual bool save( TQIODevice *iodevice, const File *bibtexfile, TQStringList *errorLog = NULL ) = 0;
+ virtual bool save( TQIODevice *iodevice, const Element* element, TQStringList *errorLog = NULL ) = 0;
signals:
void progress( int current, int total );
@@ -55,7 +55,7 @@ namespace BibTeX
};
protected:
- QMutex m_mutex;
+ TQMutex m_mutex;
};
}
diff --git a/src/fileexporterbibtex.cpp b/src/fileexporterbibtex.cpp
index 240754d..03ed618 100644
--- a/src/fileexporterbibtex.cpp
+++ b/src/fileexporterbibtex.cpp
@@ -42,7 +42,7 @@ namespace BibTeX
delete[] m_iconvBuffer;
}
- bool FileExporterBibTeX::save( QIODevice* iodevice, const File* bibtexfile, QStringList * /*errorLog*/ )
+ bool FileExporterBibTeX::save( TQIODevice* iodevice, const File* bibtexfile, TQStringList * /*errorLog*/ )
{
m_mutex.lock();
bool result = TRUE;
@@ -53,11 +53,11 @@ namespace BibTeX
* in the correct order.
*/
- QValueList<Comment*> parameterCommentsList;
- QValueList<Preamble*> preambleList;
- QValueList<Macro*> macroList;
- QValueList<Entry*> crossRefingEntryList;
- QValueList<Element*> remainingList;
+ TQValueList<Comment*> parameterCommentsList;
+ TQValueList<Preamble*> preambleList;
+ TQValueList<Macro*> macroList;
+ TQValueList<Entry*> crossRefingEntryList;
+ TQValueList<Element*> remainingList;
for ( File::ElementList::const_iterator it = bibtexfile->elements.begin(); it != bibtexfile->elements.end() && result && !cancelFlag; it++ )
{
@@ -77,12 +77,12 @@ namespace BibTeX
else
{
Comment *comment = dynamic_cast<Comment*>( *it );
- QString commentText = QString::null;
+ TQString commentText = TQString::null;
/** check if this file requests a special encoding */
if ( comment != NULL && comment->useCommand() && (( commentText = comment->text().lower() ) ).startsWith( "x-kbibtex-encoding=" ) )
{
m_encoding = commentText.mid( 19 );
- qDebug( "Switching encoding to <%s>", m_encoding.latin1() );
+ tqDebug( "Switching encoding to <%s>", m_encoding.latin1() );
parameterCommentsList.append( comment );
}
else
@@ -99,34 +99,34 @@ namespace BibTeX
m_iconvHandle = iconv_open( encodingTo, "utf-8" );
/** before anything else, write parameter comments */
- for ( QValueList<Comment*>::iterator it = parameterCommentsList.begin(); it != parameterCommentsList.end() && result && !cancelFlag; it++ )
+ for ( TQValueList<Comment*>::iterator it = parameterCommentsList.begin(); it != parameterCommentsList.end() && result && !cancelFlag; it++ )
{
result &= writeComment( *iodevice, *it );
emit progress( ++currentPos, totalElements );
}
/** first, write preambles and strings (macros) at the beginning */
- for ( QValueList<Preamble*>::iterator it = preambleList.begin(); it != preambleList.end() && result && !cancelFlag; it++ )
+ for ( TQValueList<Preamble*>::iterator it = preambleList.begin(); it != preambleList.end() && result && !cancelFlag; it++ )
{
result &= writePreamble( *iodevice, *it );
emit progress( ++currentPos, totalElements );
}
- for ( QValueList<Macro*>::iterator it = macroList.begin(); it != macroList.end() && result && !cancelFlag; it++ )
+ for ( TQValueList<Macro*>::iterator it = macroList.begin(); it != macroList.end() && result && !cancelFlag; it++ )
{
result &= writeMacro( *iodevice, *it );
emit progress( ++currentPos, totalElements );
}
/** second, write cross-referencing elements */
- for ( QValueList<Entry*>::iterator it = crossRefingEntryList.begin(); it != crossRefingEntryList.end() && result && !cancelFlag; it++ )
+ for ( TQValueList<Entry*>::iterator it = crossRefingEntryList.begin(); it != crossRefingEntryList.end() && result && !cancelFlag; it++ )
{
result &= writeEntry( *iodevice, *it );
emit progress( ++currentPos, totalElements );
}
/** third, write remaining elements */
- for ( QValueList<Element*>::iterator it = remainingList.begin(); it != remainingList.end() && result && !cancelFlag; it++ )
+ for ( TQValueList<Element*>::iterator it = remainingList.begin(); it != remainingList.end() && result && !cancelFlag; it++ )
{
Entry *entry = dynamic_cast<Entry*>( *it );
if ( entry != NULL )
@@ -145,7 +145,7 @@ namespace BibTeX
return result && !cancelFlag;
}
- bool FileExporterBibTeX::save( QIODevice* iodevice, const Element* element, QStringList * /*errorLog*/ )
+ bool FileExporterBibTeX::save( TQIODevice* iodevice, const Element* element, TQStringList * /*errorLog*/ )
{
m_mutex.lock();
bool result = FALSE;
@@ -185,44 +185,44 @@ namespace BibTeX
cancelFlag = TRUE;
}
- bool FileExporterBibTeX::writeEntry( QIODevice &device, const Entry* entry )
+ bool FileExporterBibTeX::writeEntry( TQIODevice &device, const Entry* entry )
{
- writeString( device, QString( "@%1{ %2" ).arg( applyKeywordCasing( entry->entryTypeString() ) ).arg( entry->id() ) );
+ writeString( device, TQString( "@%1{ %2" ).arg( applyKeywordCasing( entry->entryTypeString() ) ).arg( entry->id() ) );
for ( Entry::EntryFields::ConstIterator it = entry->begin(); it != entry->end(); ++it )
{
EntryField *field = *it;
- QString text = valueToString( field->value(), field->fieldType(), field->fieldTypeName() );
+ TQString text = valueToString( field->value(), field->fieldType(), field->fieldTypeName() );
if ( m_protectCasing && dynamic_cast<BibTeX::PlainText*>( field->value()->items.first() ) != NULL && ( field->fieldType() == EntryField::ftTitle || field->fieldType() == EntryField::ftBookTitle || field->fieldType() == EntryField::ftSeries ) )
addProtectiveCasing( text );
- writeString( device, QString( ",\n\t%1 = %2" ).arg( field->fieldTypeName() ).arg( text ) );
+ writeString( device, TQString( ",\n\t%1 = %2" ).arg( field->fieldTypeName() ).arg( text ) );
}
writeString( device, "\n}\n\n" );
return TRUE;
}
- bool FileExporterBibTeX::writeMacro( QIODevice &device, const Macro *macro )
+ bool FileExporterBibTeX::writeMacro( TQIODevice &device, const Macro *macro )
{
- QString text = valueToString( macro->value() );
+ TQString text = valueToString( macro->value() );
if ( m_protectCasing )
addProtectiveCasing( text );
- writeString( device, QString( "@%1{ %2 = %3 }\n\n" ).arg( applyKeywordCasing( "String" ) ).arg( macro->key() ).arg( text ) );
+ writeString( device, TQString( "@%1{ %2 = %3 }\n\n" ).arg( applyKeywordCasing( "String" ) ).arg( macro->key() ).arg( text ) );
return TRUE;
}
- bool FileExporterBibTeX::writeComment( QIODevice &device, const Comment *comment )
+ bool FileExporterBibTeX::writeComment( TQIODevice &device, const Comment *comment )
{
if ( !comment->useCommand() )
{
- QString text = comment->text() ;
+ TQString text = comment->text() ;
if ( m_encoding == "latex" )
text = EncoderLaTeX::currentEncoderLaTeX() ->encode( text );
- QStringList commentLines = QStringList::split( '\n', text );
- for ( QStringList::Iterator it = commentLines.begin(); it != commentLines.end(); it++ )
+ TQStringList commentLines = TQStringList::split( '\n', text );
+ for ( TQStringList::Iterator it = commentLines.begin(); it != commentLines.end(); it++ )
{
writeString( device, ( *it ).append( "\n" ) );
}
@@ -230,27 +230,27 @@ namespace BibTeX
}
else
{
- QString text = comment->text() ;
+ TQString text = comment->text() ;
if ( m_encoding == "latex" )
text = EncoderLaTeX::currentEncoderLaTeX() ->encode( text );
- writeString( device, QString( "@%1{%2}\n\n" ).arg( applyKeywordCasing( "Comment" ) ).arg( text ) );
+ writeString( device, TQString( "@%1{%2}\n\n" ).arg( applyKeywordCasing( "Comment" ) ).arg( text ) );
}
return TRUE;
}
- bool FileExporterBibTeX::writePreamble( QIODevice &device, const Preamble* preamble )
+ bool FileExporterBibTeX::writePreamble( TQIODevice &device, const Preamble* preamble )
{
- writeString( device, QString( "@%1{%2}\n\n" ).arg( applyKeywordCasing( "Preamble" ) ).arg( valueToString( preamble->value() ) ) );
+ writeString( device, TQString( "@%1{%2}\n\n" ).arg( applyKeywordCasing( "Preamble" ) ).arg( valueToString( preamble->value() ) ) );
return TRUE;
}
- bool FileExporterBibTeX::writeString( QIODevice &device, const QString& text )
+ bool FileExporterBibTeX::writeString( TQIODevice &device, const TQString& text )
{
size_t utf8datasize = 1;
- QCString utf8 = text.utf8();
+ TQCString utf8 = text.utf8();
char *utf8data = utf8.data();
utf8datasize = utf8.length();
char *outputdata = m_iconvBuffer;
@@ -259,20 +259,20 @@ namespace BibTeX
size_t result = iconv( m_iconvHandle, &utf8data, &utf8datasize, &outputdata, &outputdatasize );
if ( result != 0 )
{
- qWarning( "Cannot convert string using iconv" );
+ tqWarning( "Cannot convert string using iconv" );
return false;
}
if ( device.writeBlock( m_iconvBuffer, m_iconvBufferSize - outputdatasize ) != ( int )( m_iconvBufferSize - outputdatasize ) )
{
- qWarning( "Cannot write string to device" );
+ tqWarning( "Cannot write string to device" );
return false;
}
return true;
}
- void FileExporterBibTeX::setStringDelimiter( const QChar& stringOpenDelimiter, const QChar& stringCloseDelimiter )
+ void FileExporterBibTeX::setStringDelimiter( const TQChar& stringOpenDelimiter, const TQChar& stringCloseDelimiter )
{
m_stringOpenDelimiter = stringOpenDelimiter;
m_stringCloseDelimiter = stringCloseDelimiter;
@@ -283,7 +283,7 @@ namespace BibTeX
m_keywordCasing = keywordCasing;
}
- void FileExporterBibTeX::setEncoding( const QString& encoding )
+ void FileExporterBibTeX::setEncoding( const TQString& encoding )
{
m_encoding = encoding;
}
@@ -293,16 +293,16 @@ namespace BibTeX
m_protectCasing = protectCasing;
}
- QString FileExporterBibTeX::valueToString( const Value *value, const EntryField::FieldType fieldType, const QString &fieldTypeName )
+ TQString FileExporterBibTeX::valueToString( const Value *value, const EntryField::FieldType fieldType, const TQString &fieldTypeName )
{
if ( value == NULL )
return "";
- QString result;
+ TQString result;
bool isFirst = TRUE;
EncoderLaTeX *encoder = EncoderLaTeX::currentEncoderLaTeX();
- for ( QValueList<ValueItem*>::ConstIterator it = value->items.begin(); it != value->items.end(); ++it )
+ for ( TQValueList<ValueItem*>::ConstIterator it = value->items.begin(); it != value->items.end(); ++it )
{
if ( !isFirst )
result.append( " # " );
@@ -314,7 +314,7 @@ namespace BibTeX
result.append( macroKey->text() );
else
{
- QString text;
+ TQString text;
BibTeX::PersonContainer *personContainer = dynamic_cast<BibTeX::PersonContainer*>( *it );
BibTeX::PlainText *plainText = dynamic_cast<BibTeX::PlainText*>( *it );
BibTeX::KeywordContainer *keywordContainer = dynamic_cast<BibTeX::KeywordContainer*>( *it );
@@ -324,7 +324,7 @@ namespace BibTeX
else if ( keywordContainer != NULL )
{
bool first = TRUE;
- for ( QValueList<Keyword*>::Iterator it = keywordContainer->keywords.begin(); it != keywordContainer->keywords.end(); ++it )
+ for ( TQValueList<Keyword*>::Iterator it = keywordContainer->keywords.begin(); it != keywordContainer->keywords.end(); ++it )
{
if ( !first )
text.append( ", " );
@@ -336,14 +336,14 @@ namespace BibTeX
else if ( personContainer != NULL )
{
bool first = TRUE;
- for ( QValueList<Person*>::Iterator it = personContainer->persons.begin(); it != personContainer->persons.end(); ++it )
+ for ( TQValueList<Person*>::Iterator it = personContainer->persons.begin(); it != personContainer->persons.end(); ++it )
{
if ( !first )
text.append( " and " );
else
first = FALSE;
- QString v = ( *it )->firstName();
+ TQString v = ( *it )->firstName();
if ( !v.isEmpty() )
{
bool requiresQuoting = requiresPersonQuoting( v, FALSE );
@@ -367,12 +367,12 @@ namespace BibTeX
* Thus we split the von-Parts from the surname (= everything after the first upcase char).
* FIXME: Make the personContainer aware of von-Parts and jr-Parts, instead.
*/
- QStringList list = QStringList::split( " ", v );
- QString von;
- for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+ TQStringList list = TQStringList::split( " ", v );
+ TQString von;
+ for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it )
{
- QString str = *it;
- if ( str != "others" && str[0].category() == QChar::Letter_Lowercase )
+ TQString str = *it;
+ if ( str != "others" && str[0].category() == TQChar::Letter_Lowercase )
{
von += *it;
von += " ";
@@ -404,8 +404,8 @@ namespace BibTeX
* as quote chars as string delimiters would result
* in parser failures
*/
- QChar stringOpenDelimiter = m_stringOpenDelimiter;
- QChar stringCloseDelimiter = m_stringCloseDelimiter;
+ TQChar stringOpenDelimiter = m_stringOpenDelimiter;
+ TQChar stringCloseDelimiter = m_stringCloseDelimiter;
if ( text.contains( '"' ) && ( m_stringOpenDelimiter == '"' || m_stringCloseDelimiter == '"' ) )
{
stringOpenDelimiter = '{';
@@ -419,12 +419,12 @@ namespace BibTeX
return result;
}
- void FileExporterBibTeX::removeBackslashQuoting( QString &text )
+ void FileExporterBibTeX::removeBackslashQuoting( TQString &text )
{
text.replace( "\\&", "&" ).replace( "\\#", "#" ).replace( "\\_", "_" ).replace( "\\%", "%" );
}
- QString FileExporterBibTeX::applyKeywordCasing( const QString &keyword )
+ TQString FileExporterBibTeX::applyKeywordCasing( const TQString &keyword )
{
switch ( m_keywordCasing )
{
@@ -435,12 +435,12 @@ namespace BibTeX
}
}
- bool FileExporterBibTeX::requiresPersonQuoting( const QString &text, bool isLastName )
+ bool FileExporterBibTeX::requiresPersonQuoting( const TQString &text, bool isLastName )
{
if ( isLastName && !text.contains( " " ) )
/** Last name contains NO spaces, no quoting necessary */
return FALSE;
- else if ( isLastName && text[0].category() == QChar::Letter_Lowercase )
+ else if ( isLastName && text[0].category() == TQChar::Letter_Lowercase )
/** Last name starts with lower case character (e.g. as in "van der Linden") */
return FALSE;
else if ( !isLastName && !text.contains( " and " ) )
@@ -464,7 +464,7 @@ namespace BibTeX
return FALSE;
}
- void FileExporterBibTeX::addProtectiveCasing( QString &text )
+ void FileExporterBibTeX::addProtectiveCasing( TQString &text )
{
if (( text[0] != '"' || text[text.length()-1] != '"' ) && ( text[0] != '{' || text[text.length()-1] != '}' ) )
{
diff --git a/src/fileexporterbibtex.h b/src/fileexporterbibtex.h
index 6606283..b9d806e 100644
--- a/src/fileexporterbibtex.h
+++ b/src/fileexporterbibtex.h
@@ -26,7 +26,7 @@
#include <entryfield.h>
#include <fileexporter.h>
-class QChar;
+class TQChar;
namespace BibTeX
{
@@ -46,12 +46,12 @@ namespace BibTeX
FileExporterBibTeX();
~FileExporterBibTeX();
- bool save( QIODevice* iodevice, const File* bibtexfile, QStringList *errorLog = NULL );
- bool save( QIODevice* iodevice, const Element* element, QStringList *errorLog = NULL );
+ bool save( TQIODevice* iodevice, const File* bibtexfile, TQStringList *errorLog = NULL );
+ bool save( TQIODevice* iodevice, const Element* element, TQStringList *errorLog = NULL );
- void setStringDelimiter( const QChar& stringOpenDelimiter, const QChar& stringCloseDelimiter );
+ void setStringDelimiter( const TQChar& stringOpenDelimiter, const TQChar& stringCloseDelimiter );
void setKeywordCasing( const KeywordCasing keywordCasing );
- void setEncoding( const QString& encoding );
+ void setEncoding( const TQString& encoding );
void setEnclosingCurlyBrackets( bool protectCasing );
public slots:
@@ -62,25 +62,25 @@ namespace BibTeX
char *m_iconvBuffer;
const int m_iconvBufferSize;
- QChar m_stringOpenDelimiter;
- QChar m_stringCloseDelimiter;
+ TQChar m_stringOpenDelimiter;
+ TQChar m_stringCloseDelimiter;
KeywordCasing m_keywordCasing;
- QString m_encoding;
+ TQString m_encoding;
bool m_protectCasing;
bool cancelFlag;
- bool writeEntry( QIODevice &device, const Entry* entry );
- bool writeMacro( QIODevice &device, const Macro *macro );
- bool writeComment( QIODevice &device, const Comment *comment );
- bool writePreamble( QIODevice &device, const Preamble* preamble );
- bool writeString( QIODevice &device, const QString& text );
+ bool writeEntry( TQIODevice &device, const Entry* entry );
+ bool writeMacro( TQIODevice &device, const Macro *macro );
+ bool writeComment( TQIODevice &device, const Comment *comment );
+ bool writePreamble( TQIODevice &device, const Preamble* preamble );
+ bool writeString( TQIODevice &device, const TQString& text );
- QString valueToString( const Value *value, const EntryField::FieldType fieldType = EntryField::ftUnknown, const QString &fieldTypeName = QString::null );
+ TQString valueToString( const Value *value, const EntryField::FieldType fieldType = EntryField::ftUnknown, const TQString &fieldTypeName = TQString::null );
- void removeBackslashQuoting( QString &text );
- QString applyKeywordCasing( const QString &keyword );
- bool requiresPersonQuoting( const QString &text, bool isLastName );
- void addProtectiveCasing( QString &text );
+ void removeBackslashQuoting( TQString &text );
+ TQString applyKeywordCasing( const TQString &keyword );
+ bool requiresPersonQuoting( const TQString &text, bool isLastName );
+ void addProtectiveCasing( TQString &text );
};
}
diff --git a/src/fileexporterbibutils.cpp b/src/fileexporterbibutils.cpp
index 4de7aeb..c9bb51a 100644
--- a/src/fileexporterbibutils.cpp
+++ b/src/fileexporterbibutils.cpp
@@ -17,13 +17,13 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qfile.h>
-#include <qdir.h>
-#include <qstringlist.h>
-#include <qapplication.h>
-#include <qbuffer.h>
-#include <qprocess.h>
-#include <qwaitcondition.h>
+#include <ntqfile.h>
+#include <ntqdir.h>
+#include <ntqstringlist.h>
+#include <ntqapplication.h>
+#include <ntqbuffer.h>
+#include <ntqprocess.h>
+#include <ntqwaitcondition.h>
#include <fileexporterbibtex.h>
#include "fileexporterbibutils.h"
@@ -35,7 +35,7 @@ namespace BibTeX
: FileExporter(), m_outputFormat( outputFormat ), m_bibTeXExporter( new FileExporterBibTeX() )
{
m_bibTeXExporter->setEncoding( "utf-8" );
- m_processBuffer = new QBuffer();
+ m_processBuffer = new TQBuffer();
}
FileExporterBibUtils::~FileExporterBibUtils()
@@ -44,10 +44,10 @@ namespace BibTeX
delete m_bibTeXExporter;
}
- bool FileExporterBibUtils::save( QIODevice* iodevice, const Element* element, QStringList* errorLog )
+ bool FileExporterBibUtils::save( TQIODevice* iodevice, const Element* element, TQStringList* errorLog )
{
m_cancelFlag = false;
- QBuffer bibBuffer;
+ TQBuffer bibBuffer;
if ( !toBuffer( element, &bibBuffer, errorLog ) )
return false;
if ( !bufferToXMLbuffer( &bibBuffer ) || m_cancelFlag )
@@ -55,11 +55,11 @@ namespace BibTeX
return !m_cancelFlag && xmlBufferToIOdevice( iodevice );
}
- bool FileExporterBibUtils::save( QIODevice* iodevice, const File* bibtexfile, QStringList* errorLog )
+ bool FileExporterBibUtils::save( TQIODevice* iodevice, const File* bibtexfile, TQStringList* errorLog )
{
emit progress( 0, 3 );
m_cancelFlag = false;
- QBuffer bibBuffer;
+ TQBuffer bibBuffer;
if ( !toBuffer( bibtexfile, &bibBuffer, errorLog ) )
return false;
emit progress( 1, 3 );
@@ -78,7 +78,7 @@ namespace BibTeX
m_cancelFlag = true;
}
- bool FileExporterBibUtils::toBuffer( const File *bibFile, QBuffer *buffer, QStringList* errorLog )
+ bool FileExporterBibUtils::toBuffer( const File *bibFile, TQBuffer *buffer, TQStringList* errorLog )
{
buffer->open( IO_WriteOnly );
bool result = m_bibTeXExporter->save( buffer, bibFile, errorLog );
@@ -86,7 +86,7 @@ namespace BibTeX
return result;
}
- bool FileExporterBibUtils::toBuffer( const Element *bibElement, QBuffer *buffer, QStringList* errorLog )
+ bool FileExporterBibUtils::toBuffer( const Element *bibElement, TQBuffer *buffer, TQStringList* errorLog )
{
buffer->open( IO_WriteOnly );
bool result = m_bibTeXExporter->save( buffer, bibElement, errorLog );
@@ -94,13 +94,13 @@ namespace BibTeX
return result;
}
- bool FileExporterBibUtils::bufferToXMLbuffer( QBuffer *bibBuffer )
+ bool FileExporterBibUtils::bufferToXMLbuffer( TQBuffer *bibBuffer )
{
- QWaitCondition wc;
+ TQWaitCondition wc;
m_processBuffer->open( IO_WriteOnly );
m_waiting = true;
- m_process = new QProcess( QStringList::split( ' ', "bib2xml -i utf8" ) );
+ m_process = new TQProcess( TQStringList::split( ' ', "bib2xml -i utf8" ) );
connect( m_process, SIGNAL( processExited() ), this, SLOT( wakeUp() ) );
connect( m_process, SIGNAL( readyReadStdout() ), this, SLOT( slotReadyStdout() ) );
connect( m_process, SIGNAL( readyReadStderr() ), this, SLOT( slotReadyStderr() ) );
@@ -110,7 +110,7 @@ namespace BibTeX
{
bibBuffer->open( IO_ReadOnly );
m_process->writeToStdin( bibBuffer->readAll() );
- qApp->processEvents();
+ tqApp->processEvents();
m_process->closeStdin();
bibBuffer->close();
@@ -118,7 +118,7 @@ namespace BibTeX
while ( m_waiting )
{
wc.wait( 250 );
- qApp->processEvents();
+ tqApp->processEvents();
--nothingHappens;
}
@@ -127,14 +127,14 @@ namespace BibTeX
if ( !m_process->normalExit() )
{
- qDebug( "%s did not exit in a clean fashion", m_process->arguments()[0].latin1() );
+ tqDebug( "%s did not exit in a clean fashion", m_process->arguments()[0].latin1() );
delete m_process;
return false;
}
}
else
{
- qDebug( "%s did not start", m_process->arguments()[0].latin1() );
+ tqDebug( "%s did not start", m_process->arguments()[0].latin1() );
delete m_process;
return false;
}
@@ -145,34 +145,34 @@ namespace BibTeX
return true;
}
- bool FileExporterBibUtils::xmlBufferToIOdevice( QIODevice *iodevice )
+ bool FileExporterBibUtils::xmlBufferToIOdevice( TQIODevice *iodevice )
{
- QWaitCondition wc;
+ TQWaitCondition wc;
m_waiting = true;
m_process = NULL;
switch ( m_outputFormat )
{
case BibTeX::File::formatISI:
- m_process = new QProcess( QStringList::split( ' ', "xml2isi" ) );
+ m_process = new TQProcess( TQStringList::split( ' ', "xml2isi" ) );
break;
case BibTeX::File::formatWordBib:
- m_process = new QProcess( QStringList::split( ' ', "xml2wordbib" ) );
+ m_process = new TQProcess( TQStringList::split( ' ', "xml2wordbib" ) );
break;
case BibTeX::File::formatAds:
- m_process = new QProcess( QStringList::split( ' ', "xml2ads" ) );
+ m_process = new TQProcess( TQStringList::split( ' ', "xml2ads" ) );
break;
case BibTeX::File::formatEndNote:
- m_process = new QProcess( QStringList::split( ' ', "xml2end" ) );
+ m_process = new TQProcess( TQStringList::split( ' ', "xml2end" ) );
break;
case BibTeX::File::formatRIS:
- m_process = new QProcess( QStringList::split( ' ', "xml2ris" ) );
+ m_process = new TQProcess( TQStringList::split( ' ', "xml2ris" ) );
break;
case BibTeX::File::formatMODS:
/* m_process = NULL; */
break;
default:
- qDebug( "Cannot handle output format %i", m_outputFormat );
+ tqDebug( "Cannot handle output format %i", m_outputFormat );
return false;
}
@@ -184,12 +184,12 @@ namespace BibTeX
if ( m_process->start() )
{
- QBuffer *tempBuffer = m_processBuffer;
- m_processBuffer = new QBuffer();
+ TQBuffer *tempBuffer = m_processBuffer;
+ m_processBuffer = new TQBuffer();
tempBuffer->open( IO_ReadOnly );
m_process->writeToStdin( tempBuffer->readAll() );
- qApp->processEvents();
+ tqApp->processEvents();
m_process->closeStdin();
tempBuffer->close();
@@ -198,7 +198,7 @@ namespace BibTeX
while ( m_waiting )
{
wc.wait( 250 );
- qApp->processEvents();
+ tqApp->processEvents();
--nothingHappens;
}
m_processBuffer->close();
@@ -222,7 +222,7 @@ namespace BibTeX
}
else
{
- qDebug( "%s did not start", m_process->arguments()[0].latin1() );
+ tqDebug( "%s did not start", m_process->arguments()[0].latin1() );
delete m_process;
return false;
}
@@ -249,10 +249,10 @@ namespace BibTeX
void FileExporterBibUtils::slotReadyStderr()
{
- QByteArray ba = m_process->readStderr();
- QTextStream bats( ba, IO_ReadOnly );
- bats.setEncoding( QTextStream::UnicodeUTF8 );
- qDebug( "%s", bats.read().latin1() );
+ TQByteArray ba = m_process->readStderr();
+ TQTextStream bats( ba, IO_ReadOnly );
+ bats.setEncoding( TQTextStream::UnicodeUTF8 );
+ tqDebug( "%s", bats.read().latin1() );
}
}
diff --git a/src/fileexporterbibutils.h b/src/fileexporterbibutils.h
index 978a92d..fafefd6 100644
--- a/src/fileexporterbibutils.h
+++ b/src/fileexporterbibutils.h
@@ -22,8 +22,8 @@
#include <fileexporter.h>
-class QProcess;
-class QBuffer;
+class TQProcess;
+class TQBuffer;
namespace BibTeX
{
@@ -39,8 +39,8 @@ namespace BibTeX
FileExporterBibUtils( BibTeX::File::FileFormat outputFormat );
~FileExporterBibUtils();
- bool save( QIODevice* iodevice, const Element* element, QStringList* errorLog = NULL );
- bool save( QIODevice* iodevice, const File* bibtexfile, QStringList* errorLog = NULL );
+ bool save( TQIODevice* iodevice, const Element* element, TQStringList* errorLog = NULL );
+ bool save( TQIODevice* iodevice, const File* bibtexfile, TQStringList* errorLog = NULL );
public slots:
void cancel();
@@ -51,13 +51,13 @@ namespace BibTeX
FileExporterBibTeX *m_bibTeXExporter;
bool m_waiting;
- QProcess *m_process;
- QBuffer *m_processBuffer;
+ TQProcess *m_process;
+ TQBuffer *m_processBuffer;
- bool toBuffer( const File *bibFile, QBuffer *buffer, QStringList* errorLog);
- bool toBuffer( const Element *bibFile, QBuffer *buffer, QStringList* errorLog);
- bool bufferToXMLbuffer( QBuffer *buffer );
- bool xmlBufferToIOdevice( QIODevice *iodevice );
+ bool toBuffer( const File *bibFile, TQBuffer *buffer, TQStringList* errorLog);
+ bool toBuffer( const Element *bibFile, TQBuffer *buffer, TQStringList* errorLog);
+ bool bufferToXMLbuffer( TQBuffer *buffer );
+ bool xmlBufferToIOdevice( TQIODevice *iodevice );
private slots:
void wakeUp();
diff --git a/src/fileexporterdocbook5.cpp b/src/fileexporterdocbook5.cpp
index 7a962b6..b776391 100644
--- a/src/fileexporterdocbook5.cpp
+++ b/src/fileexporterdocbook5.cpp
@@ -17,8 +17,8 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qfile.h>
-#include <qstringlist.h>
+#include <ntqfile.h>
+#include <ntqstringlist.h>
#include <file.h>
#include <fileexporterbibtex.h>
@@ -27,11 +27,11 @@
namespace BibTeX
{
- FileExporterDocBook5::FileExporterDocBook5( const QString& classPath )
+ FileExporterDocBook5::FileExporterDocBook5( const TQString& classPath )
: FileExporterToolchain(), m_classPath( classPath )
{
- bibTeXFilename = QString( workingDir ).append( "/bibtex-to-docbook5.bib" );
- outputFilename = QString( workingDir ).append( "/bibtex-to-docbook5.bib.xml" );
+ bibTeXFilename = TQString( workingDir ).append( "/bibtex-to-docbook5.bib" );
+ outputFilename = TQString( workingDir ).append( "/bibtex-to-docbook5.bib.xml" );
}
@@ -40,12 +40,12 @@ namespace BibTeX
// nothing
}
- bool FileExporterDocBook5::save( QIODevice* iodevice, const File* bibtexfile, QStringList *errorLog )
+ bool FileExporterDocBook5::save( TQIODevice* iodevice, const File* bibtexfile, TQStringList *errorLog )
{
m_mutex.lock();
bool result = FALSE;
- QFile bibtexFile( bibTeXFilename );
+ TQFile bibtexFile( bibTeXFilename );
if ( bibtexFile.open( IO_WriteOnly ) )
{
FileExporter * bibtexExporter = new FileExporterBibTeX();
@@ -61,12 +61,12 @@ namespace BibTeX
return result;
}
- bool FileExporterDocBook5::save( QIODevice* iodevice, const Element* element, QStringList *errorLog )
+ bool FileExporterDocBook5::save( TQIODevice* iodevice, const Element* element, TQStringList *errorLog )
{
m_mutex.lock();
bool result = FALSE;
- QFile bibtexFile( bibTeXFilename );
+ TQFile bibtexFile( bibTeXFilename );
if ( bibtexFile.open( IO_WriteOnly ) )
{
FileExporter * bibtexExporter = new FileExporterBibTeX();
@@ -82,9 +82,9 @@ namespace BibTeX
return result;
}
- bool FileExporterDocBook5::runBib2Db5( QIODevice* iodevice, QStringList *errorLog )
+ bool FileExporterDocBook5::runBib2Db5( TQIODevice* iodevice, TQStringList *errorLog )
{
- QStringList cmdLine;
+ TQStringList cmdLine;
cmdLine << "java" << "-cp" << m_classPath << "net.sf.bib2db5.DB5Converter" << "-O" << "." << "bibtex-to-docbook5.bib";
if ( runProcess( cmdLine, errorLog ) && writeFileToIODevice( outputFilename, iodevice ) )
diff --git a/src/fileexporterdocbook5.h b/src/fileexporterdocbook5.h
index 7b5f812..88742b5 100644
--- a/src/fileexporterdocbook5.h
+++ b/src/fileexporterdocbook5.h
@@ -31,21 +31,21 @@ namespace BibTeX
class FileExporterDocBook5 : public FileExporterToolchain
{
public:
- FileExporterDocBook5(const QString& classPath);
+ FileExporterDocBook5(const TQString& classPath);
~FileExporterDocBook5();
- bool save( QIODevice* iodevice, const File* bibtexfile, QStringList *errorLog = NULL );
- bool save( QIODevice* iodevice, const Element* element, QStringList *errorLog = NULL );
+ bool save( TQIODevice* iodevice, const File* bibtexfile, TQStringList *errorLog = NULL );
+ bool save( TQIODevice* iodevice, const Element* element, TQStringList *errorLog = NULL );
- void setLaTeXLanguage( const QString& language );
- void setLaTeXBibliographyStyle( const QString& bibStyle );
+ void setLaTeXLanguage( const TQString& language );
+ void setLaTeXBibliographyStyle( const TQString& bibStyle );
private:
-QString m_classPath;
- QString bibTeXFilename;
- QString outputFilename;
+TQString m_classPath;
+ TQString bibTeXFilename;
+ TQString outputFilename;
- bool runBib2Db5( QIODevice* iodevice, QStringList *errorLog );
+ bool runBib2Db5( TQIODevice* iodevice, TQStringList *errorLog );
};
diff --git a/src/fileexporterexternal.cpp b/src/fileexporterexternal.cpp
index 6b7e449..38e8e68 100644
--- a/src/fileexporterexternal.cpp
+++ b/src/fileexporterexternal.cpp
@@ -17,10 +17,10 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qprocess.h>
-#include <qwaitcondition.h>
-#include <qapplication.h>
-#include <qbuffer.h>
+#include <ntqprocess.h>
+#include <ntqwaitcondition.h>
+#include <ntqapplication.h>
+#include <ntqbuffer.h>
#include <fileexporterbibtex.h>
#include <settings.h>
@@ -32,7 +32,7 @@ namespace BibTeX
FileExporterExternal::FileExporterExternal( Exporter exporter, File::FileFormat fileformat )
: FileExporter(), writeTo( NULL ), m_exporter( exporter ), m_fileformat( fileformat )
{
- wc = new QWaitCondition();
+ wc = new TQWaitCondition();
}
FileExporterExternal::~FileExporterExternal()
@@ -40,10 +40,10 @@ namespace BibTeX
delete wc;
}
- bool FileExporterExternal::save( QIODevice* iodevice, const File* bibtexfile, QStringList *errorLog )
+ bool FileExporterExternal::save( TQIODevice* iodevice, const File* bibtexfile, TQStringList *errorLog )
{
m_mutex.lock();
- QBuffer buffer;
+ TQBuffer buffer;
buffer.open( IO_WriteOnly );
FileExporter * bibtexExporter = new FileExporterBibTeX();
bool result = bibtexExporter->save( &buffer, bibtexfile, errorLog );
@@ -57,10 +57,10 @@ namespace BibTeX
return result;
}
- bool FileExporterExternal::save( QIODevice* iodevice, const Element* element, QStringList *errorLog )
+ bool FileExporterExternal::save( TQIODevice* iodevice, const Element* element, TQStringList *errorLog )
{
m_mutex.lock();
- QBuffer buffer;
+ TQBuffer buffer;
buffer.open( IO_WriteOnly );
FileExporter * bibtexExporter = new FileExporterBibTeX();
bool result = bibtexExporter->save( &buffer, element, errorLog );
@@ -74,11 +74,11 @@ namespace BibTeX
return result;
}
- bool FileExporterExternal::generateOutput( QBuffer &input, QIODevice *output )
+ bool FileExporterExternal::generateOutput( TQBuffer &input, TQIODevice *output )
{
bool result = FALSE;
- QString commandLine;
+ TQString commandLine;
switch ( m_fileformat )
{
case File::formatHTML:
@@ -100,14 +100,14 @@ namespace BibTeX
default:
return FALSE;
}
- QStringList args = QStringList::split( ' ', commandLine );
+ TQStringList args = TQStringList::split( ' ', commandLine );
- writeTo = new QTextStream( output );
- writeTo->setEncoding( QTextStream::UnicodeUTF8 );
+ writeTo = new TQTextStream( output );
+ writeTo->setEncoding( TQTextStream::UnicodeUTF8 );
- QApplication::setOverrideCursor( Qt::waitCursor );
+ TQApplication::setOverrideCursor( TQt::waitCursor );
- process = new QProcess( args );
+ process = new TQProcess( args );
connect( process, SIGNAL( processExited() ), this, SLOT( slotProcessExited() ) );
connect( process, SIGNAL( readyReadStdout() ), this, SLOT( slotReadProcessOutput() ) );
connect( process, SIGNAL( readyReadStderr() ), this, SLOT( slotReadProcessOutput() ) );
@@ -118,19 +118,19 @@ namespace BibTeX
while ( !process->isRunning() )
{
wc->wait( 250 );
- qApp->processEvents();
+ tqApp->processEvents();
}
- qApp->processEvents();
+ tqApp->processEvents();
input.open( IO_ReadOnly );
- QByteArray buf = input.buffer();
- // qDebug( "buf.size=%i", buf.size() );
+ TQByteArray buf = input.buffer();
+ // tqDebug( "buf.size=%i", buf.size() );
process->writeToStdin( buf );
input.close();
- qApp->processEvents();
+ tqApp->processEvents();
while ( process->isRunning() )
{
wc->wait( 250 );
- qApp->processEvents();
+ tqApp->processEvents();
}
result = process->normalExit();
@@ -145,7 +145,7 @@ namespace BibTeX
delete writeTo;
writeTo = NULL;
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
return result;
}
@@ -159,14 +159,14 @@ namespace BibTeX
if ( writeTo != NULL )
while ( process->canReadLineStdout() )
{
- QString line = process->readLineStdout();
- // qDebug( "line=%s", line.latin1() );
+ TQString line = process->readLineStdout();
+ // tqDebug( "line=%s", line.latin1() );
( *writeTo ) << line.latin1() << endl;
}
// while ( process->canReadLineStderr() )
// {
- // QString line = process->readLineStderr();
- // qDebug( "stderr=%s", line.latin1() );
+ // TQString line = process->readLineStderr();
+ // tqDebug( "stderr=%s", line.latin1() );
// }
}
diff --git a/src/fileexporterexternal.h b/src/fileexporterexternal.h
index 463f26a..50a28fc 100644
--- a/src/fileexporterexternal.h
+++ b/src/fileexporterexternal.h
@@ -23,9 +23,9 @@
#include <fileexporter.h>
#include <settings.h>
-class QWaitCondition;
-class QProcess;
-class QBuffer;
+class TQWaitCondition;
+class TQProcess;
+class TQBuffer;
namespace BibTeX
{
@@ -42,17 +42,17 @@ namespace BibTeX
FileExporterExternal( Exporter exporter, File::FileFormat fileformat );
~FileExporterExternal();
- bool save( QIODevice* iodevice, const File* bibtexfile, QStringList *errorLog = NULL );
- bool save( QIODevice* iodevice, const Element* element, QStringList *errorLog = NULL );
+ bool save( TQIODevice* iodevice, const File* bibtexfile, TQStringList *errorLog = NULL );
+ bool save( TQIODevice* iodevice, const Element* element, TQStringList *errorLog = NULL );
private:
- QWaitCondition *wc;
- QProcess *process;
- QTextStream *writeTo;
+ TQWaitCondition *wc;
+ TQProcess *process;
+ TQTextStream *writeTo;
Exporter m_exporter;
File::FileFormat m_fileformat;
- bool generateOutput( QBuffer &input, QIODevice* output );
+ bool generateOutput( TQBuffer &input, TQIODevice* output );
private slots:
void slotProcessExited();
diff --git a/src/fileexporterpdf.cpp b/src/fileexporterpdf.cpp
index 47b8dad..9fff4b3 100644
--- a/src/fileexporterpdf.cpp
+++ b/src/fileexporterpdf.cpp
@@ -17,9 +17,9 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qfile.h>
-#include <qstringlist.h>
-#include <qurl.h>
+#include <ntqfile.h>
+#include <ntqstringlist.h>
+#include <ntqurl.h>
#include <settings.h>
#include <element.h>
@@ -33,9 +33,9 @@ namespace BibTeX
FileExporterPDF::FileExporterPDF( bool embedFiles )
: FileExporterToolchain(), m_latexLanguage( "english" ), m_latexBibStyle( "plain" ), m_embedFiles( embedFiles )
{
- laTeXFilename = QString( workingDir ).append( "/bibtex-to-pdf.tex" );
- bibTeXFilename = QString( workingDir ).append( "/bibtex-to-pdf.bib" );
- outputFilename = QString( workingDir ).append( "/bibtex-to-pdf.pdf" );
+ laTeXFilename = TQString( workingDir ).append( "/bibtex-to-pdf.tex" );
+ bibTeXFilename = TQString( workingDir ).append( "/bibtex-to-pdf.bib" );
+ outputFilename = TQString( workingDir ).append( "/bibtex-to-pdf.pdf" );
}
FileExporterPDF::~FileExporterPDF()
@@ -43,18 +43,18 @@ namespace BibTeX
// nothing
}
- bool FileExporterPDF::save( QIODevice* iodevice, const File* bibtexfile, QStringList *errorLog )
+ bool FileExporterPDF::save( TQIODevice* iodevice, const File* bibtexfile, TQStringList *errorLog )
{
m_mutex.lock();
bool result = FALSE;
m_embeddedFileList.clear();
if ( m_embedFiles )
{
- m_embeddedFileList.append( QString( "%1|%2" ).arg( "BibTeX source" ).arg( bibTeXFilename ) );
+ m_embeddedFileList.append( TQString( "%1|%2" ).arg( "BibTeX source" ).arg( bibTeXFilename ) );
fillEmbeddedFileList( bibtexfile );
}
- QFile bibtexFile( bibTeXFilename );
+ TQFile bibtexFile( bibTeXFilename );
if ( bibtexFile.open( IO_WriteOnly ) )
{
FileExporter * bibtexExporter = new FileExporterBibTeX();
@@ -70,7 +70,7 @@ namespace BibTeX
return result;
}
- bool FileExporterPDF::save( QIODevice* iodevice, const Element* element, QStringList *errorLog )
+ bool FileExporterPDF::save( TQIODevice* iodevice, const Element* element, TQStringList *errorLog )
{
m_mutex.lock();
bool result = FALSE;
@@ -78,7 +78,7 @@ namespace BibTeX
if ( m_embedFiles )
fillEmbeddedFileList( element );
- QFile bibtexFile( bibTeXFilename );
+ TQFile bibtexFile( bibTeXFilename );
if ( bibtexFile.open( IO_WriteOnly ) )
{
FileExporter * bibtexExporter = new FileExporterBibTeX();
@@ -94,24 +94,24 @@ namespace BibTeX
return result;
}
- void FileExporterPDF::setLaTeXLanguage( const QString& language )
+ void FileExporterPDF::setLaTeXLanguage( const TQString& language )
{
m_latexLanguage = language;
}
- void FileExporterPDF::setLaTeXBibliographyStyle( const QString& bibStyle )
+ void FileExporterPDF::setLaTeXBibliographyStyle( const TQString& bibStyle )
{
m_latexBibStyle = bibStyle;
}
- void FileExporterPDF::setDocumentSearchPaths( const QStringList& searchPaths )
+ void FileExporterPDF::setDocumentSearchPaths( const TQStringList& searchPaths )
{
m_searchPaths = searchPaths;
}
- bool FileExporterPDF::generatePDF( QIODevice* iodevice, QStringList *errorLog )
+ bool FileExporterPDF::generatePDF( TQIODevice* iodevice, TQStringList *errorLog )
{
- QStringList cmdLines = QStringList::split( '|', "pdflatex -halt-on-error bibtex-to-pdf.tex|bibtex bibtex-to-pdf|pdflatex -halt-on-error bibtex-to-pdf.tex|pdflatex -halt-on-error bibtex-to-pdf.tex" );
+ TQStringList cmdLines = TQStringList::split( '|', "pdflatex -halt-on-error bibtex-to-pdf.tex|bibtex bibtex-to-pdf|pdflatex -halt-on-error bibtex-to-pdf.tex|pdflatex -halt-on-error bibtex-to-pdf.tex" );
if ( writeLatexFile( laTeXFilename ) && runProcesses( cmdLines, errorLog ) && writeFileToIODevice( outputFilename, iodevice ) )
return TRUE;
@@ -119,14 +119,14 @@ namespace BibTeX
return FALSE;
}
- bool FileExporterPDF::writeLatexFile( const QString &filename )
+ bool FileExporterPDF::writeLatexFile( const TQString &filename )
{
- QFile latexFile( filename );
+ TQFile latexFile( filename );
if ( latexFile.open( IO_WriteOnly ) )
{
m_embedFiles &= kpsewhich( "embedfile.sty" );
- QTextStream ts( &latexFile );
- ts.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream ts( &latexFile );
+ ts.setEncoding( TQTextStream::UnicodeUTF8 );
ts << "\\documentclass{article}\n";
if ( kpsewhich( "t1enc.dfu" ) )
ts << "\\usepackage[T1]{fontenc}\n";
@@ -144,10 +144,10 @@ namespace BibTeX
ts << "\\begin{document}\n";
if ( m_embedFiles )
- for ( QStringList::ConstIterator it = m_embeddedFileList.begin(); it != m_embeddedFileList.end(); ++it )
+ for ( TQStringList::ConstIterator it = m_embeddedFileList.begin(); it != m_embeddedFileList.end(); ++it )
{
- QStringList param = QStringList::split( "|", *it );
- QFile file( param[1] );
+ TQStringList param = TQStringList::split( "|", *it );
+ TQFile file( param[1] );
if ( file.exists() )
ts << "\\embedfile[desc={" << param[0] << "}]{" << param[1] << "}\n";
}
@@ -173,20 +173,20 @@ namespace BibTeX
const Entry *entry = dynamic_cast<const Entry*>( element );
if ( entry != NULL )
{
- QString id = entry->id();
- QStringList urls = entry->urls();
- for ( QStringList::Iterator it = urls.begin(); it != urls.end(); ++it )
+ TQString id = entry->id();
+ TQStringList urls = entry->urls();
+ for ( TQStringList::Iterator it = urls.begin(); it != urls.end(); ++it )
{
- QUrl url = QUrl( *it );
- if ( url.isValid() && url.isLocalFile() && !( *it ).endsWith( "/" ) && QFile( url.path() ).exists() )
- m_embeddedFileList.append( QString( "%1|%2" ).arg( id ).arg( url.path() ) );
+ TQUrl url = TQUrl( *it );
+ if ( url.isValid() && url.isLocalFile() && !( *it ).endsWith( "/" ) && TQFile( url.path() ).exists() )
+ m_embeddedFileList.append( TQString( "%1|%2" ).arg( id ).arg( url.path() ) );
else
- for ( QStringList::Iterator path_it = m_searchPaths.begin(); path_it != m_searchPaths.end(); ++path_it )
+ for ( TQStringList::Iterator path_it = m_searchPaths.begin(); path_it != m_searchPaths.end(); ++path_it )
{
- url = QUrl( QString( *path_it ).append( "/" ).append( *it ) );
- if ( url.isValid() && url.isLocalFile() && !( *it ).endsWith( "/" ) && QFile( url.path() ).exists() )
+ url = TQUrl( TQString( *path_it ).append( "/" ).append( *it ) );
+ if ( url.isValid() && url.isLocalFile() && !( *it ).endsWith( "/" ) && TQFile( url.path() ).exists() )
{
- m_embeddedFileList.append( QString( "%1|%2" ).arg( id ).arg( url.path() ) );
+ m_embeddedFileList.append( TQString( "%1|%2" ).arg( id ).arg( url.path() ) );
break;
}
}
diff --git a/src/fileexporterpdf.h b/src/fileexporterpdf.h
index 5641921..0d67350 100644
--- a/src/fileexporterpdf.h
+++ b/src/fileexporterpdf.h
@@ -34,25 +34,25 @@ namespace BibTeX
FileExporterPDF( bool embedFiles = FALSE );
~FileExporterPDF();
- bool save( QIODevice* iodevice, const File* bibtexfile, QStringList *errorLog = NULL );
- bool save( QIODevice* iodevice, const Element* element, QStringList *errorLog = NULL );
+ bool save( TQIODevice* iodevice, const File* bibtexfile, TQStringList *errorLog = NULL );
+ bool save( TQIODevice* iodevice, const Element* element, TQStringList *errorLog = NULL );
- void setLaTeXLanguage( const QString& language );
- void setLaTeXBibliographyStyle( const QString& bibStyle );
- void setDocumentSearchPaths( const QStringList& searchPaths );
+ void setLaTeXLanguage( const TQString& language );
+ void setLaTeXBibliographyStyle( const TQString& bibStyle );
+ void setDocumentSearchPaths( const TQStringList& searchPaths );
private:
- QString laTeXFilename;
- QString bibTeXFilename;
- QString outputFilename;
- QString m_latexLanguage;
- QString m_latexBibStyle;
+ TQString laTeXFilename;
+ TQString bibTeXFilename;
+ TQString outputFilename;
+ TQString m_latexLanguage;
+ TQString m_latexBibStyle;
bool m_embedFiles;
- QStringList m_embeddedFileList;
- QStringList m_searchPaths;
+ TQStringList m_embeddedFileList;
+ TQStringList m_searchPaths;
- bool generatePDF( QIODevice* iodevice, QStringList *errorLog );
- bool writeLatexFile( const QString &filename );
+ bool generatePDF( TQIODevice* iodevice, TQStringList *errorLog );
+ bool writeLatexFile( const TQString &filename );
void fillEmbeddedFileList( const File* bibtexfile );
void fillEmbeddedFileList( const Element* element );
};
diff --git a/src/fileexporterps.cpp b/src/fileexporterps.cpp
index 8627836..1da2601 100644
--- a/src/fileexporterps.cpp
+++ b/src/fileexporterps.cpp
@@ -17,8 +17,8 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qfile.h>
-#include <qstringlist.h>
+#include <ntqfile.h>
+#include <ntqstringlist.h>
#include <settings.h>
#include <element.h>
@@ -31,9 +31,9 @@ namespace BibTeX
FileExporterPS::FileExporterPS()
: FileExporterToolchain(), m_latexLanguage( "english" ), m_latexBibStyle( "plain" )
{
- laTeXFilename = QString( workingDir ).append( "/bibtex-to-ps.tex" );
- bibTeXFilename = QString( workingDir ).append( "/bibtex-to-ps.bib" );
- outputFilename = QString( workingDir ).append( "/bibtex-to-ps.ps" );
+ laTeXFilename = TQString( workingDir ).append( "/bibtex-to-ps.tex" );
+ bibTeXFilename = TQString( workingDir ).append( "/bibtex-to-ps.bib" );
+ outputFilename = TQString( workingDir ).append( "/bibtex-to-ps.ps" );
}
FileExporterPS::~FileExporterPS()
@@ -41,12 +41,12 @@ namespace BibTeX
// nothing
}
- bool FileExporterPS::save( QIODevice* iodevice, const File* bibtexfile, QStringList *errorLog )
+ bool FileExporterPS::save( TQIODevice* iodevice, const File* bibtexfile, TQStringList *errorLog )
{
m_mutex.lock();
bool result = FALSE;
- QFile bibtexFile( bibTeXFilename );
+ TQFile bibtexFile( bibTeXFilename );
if ( bibtexFile.open( IO_WriteOnly ) )
{
FileExporter * bibtexExporter = new FileExporterBibTeX();
@@ -62,12 +62,12 @@ namespace BibTeX
return result;
}
- bool FileExporterPS::save( QIODevice* iodevice, const Element* element, QStringList *errorLog )
+ bool FileExporterPS::save( TQIODevice* iodevice, const Element* element, TQStringList *errorLog )
{
m_mutex.lock();
bool result = FALSE;
- QFile bibtexFile( bibTeXFilename );
+ TQFile bibtexFile( bibTeXFilename );
if ( bibtexFile.open( IO_WriteOnly ) )
{
FileExporter * bibtexExporter = new FileExporterBibTeX();
@@ -83,19 +83,19 @@ namespace BibTeX
return result;
}
- void FileExporterPS::setLaTeXLanguage( const QString& language )
+ void FileExporterPS::setLaTeXLanguage( const TQString& language )
{
m_latexLanguage = language;
}
- void FileExporterPS::setLaTeXBibliographyStyle( const QString& bibStyle )
+ void FileExporterPS::setLaTeXBibliographyStyle( const TQString& bibStyle )
{
m_latexBibStyle = bibStyle;
}
- bool FileExporterPS::generatePS( QIODevice* iodevice, QStringList *errorLog )
+ bool FileExporterPS::generatePS( TQIODevice* iodevice, TQStringList *errorLog )
{
- QStringList cmdLines = QStringList::split( '|', "latex -halt-on-error bibtex-to-ps.tex|bibtex bibtex-to-ps|latex -halt-on-error bibtex-to-ps.tex|latex -halt-on-error bibtex-to-ps.tex|dvips -o bibtex-to-ps.ps bibtex-to-ps.dvi" );
+ TQStringList cmdLines = TQStringList::split( '|', "latex -halt-on-error bibtex-to-ps.tex|bibtex bibtex-to-ps|latex -halt-on-error bibtex-to-ps.tex|latex -halt-on-error bibtex-to-ps.tex|dvips -o bibtex-to-ps.ps bibtex-to-ps.dvi" );
if ( writeLatexFile( laTeXFilename ) && runProcesses( cmdLines, errorLog ) && writeFileToIODevice( outputFilename, iodevice ) )
return TRUE;
@@ -103,13 +103,13 @@ namespace BibTeX
return FALSE;
}
- bool FileExporterPS::writeLatexFile( const QString &filename )
+ bool FileExporterPS::writeLatexFile( const TQString &filename )
{
- QFile latexFile( filename );
+ TQFile latexFile( filename );
if ( latexFile.open( IO_WriteOnly ) )
{
- QTextStream ts( &latexFile );
- ts.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream ts( &latexFile );
+ ts.setEncoding( TQTextStream::UnicodeUTF8 );
ts << "\\documentclass{article}\n";
if ( kpsewhich( "t1enc.dfu" ) )
ts << "\\usepackage[T1]{fontenc}\n";
diff --git a/src/fileexporterps.h b/src/fileexporterps.h
index b252fd7..0393e7e 100644
--- a/src/fileexporterps.h
+++ b/src/fileexporterps.h
@@ -22,7 +22,7 @@
#include <fileexportertoolchain.h>
-class QStringList;
+class TQStringList;
namespace BibTeX
{
@@ -36,21 +36,21 @@ namespace BibTeX
FileExporterPS();
~FileExporterPS();
- bool save( QIODevice* iodevice, const File* bibtexfile, QStringList *errorLog = NULL );
- bool save( QIODevice* iodevice, const Element* element, QStringList *errorLog = NULL );
+ bool save( TQIODevice* iodevice, const File* bibtexfile, TQStringList *errorLog = NULL );
+ bool save( TQIODevice* iodevice, const Element* element, TQStringList *errorLog = NULL );
- void setLaTeXLanguage( const QString& language );
- void setLaTeXBibliographyStyle( const QString& bibStyle );
+ void setLaTeXLanguage( const TQString& language );
+ void setLaTeXBibliographyStyle( const TQString& bibStyle );
private:
- QString laTeXFilename;
- QString bibTeXFilename;
- QString outputFilename;
- QString m_latexLanguage;
- QString m_latexBibStyle;
-
- bool generatePS( QIODevice* iodevice, QStringList *errorLog );
- bool writeLatexFile( const QString &filename );
+ TQString laTeXFilename;
+ TQString bibTeXFilename;
+ TQString outputFilename;
+ TQString m_latexLanguage;
+ TQString m_latexBibStyle;
+
+ bool generatePS( TQIODevice* iodevice, TQStringList *errorLog );
+ bool writeLatexFile( const TQString &filename );
};
}
diff --git a/src/fileexporterris.cpp b/src/fileexporterris.cpp
index 37908a7..88ff33c 100644
--- a/src/fileexporterris.cpp
+++ b/src/fileexporterris.cpp
@@ -17,7 +17,7 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qregexp.h>
+#include <ntqregexp.h>
#include <entry.h>
@@ -36,11 +36,11 @@ namespace BibTeX
// nothing
}
- bool FileExporterRIS::save( QIODevice* iodevice, const Element* element, QStringList* /*errorLog*/ )
+ bool FileExporterRIS::save( TQIODevice* iodevice, const Element* element, TQStringList* /*errorLog*/ )
{
m_mutex.lock();
bool result = FALSE;
- QTextStream stream( iodevice );
+ TQTextStream stream( iodevice );
const Entry *entry = dynamic_cast<const Entry*>( element );
if ( entry != NULL )
@@ -50,12 +50,12 @@ namespace BibTeX
return result && !m_cancelFlag;
}
- bool FileExporterRIS::save( QIODevice* iodevice, const File* bibtexfile, QStringList* /*errorLog*/ )
+ bool FileExporterRIS::save( TQIODevice* iodevice, const File* bibtexfile, TQStringList* /*errorLog*/ )
{
m_mutex.lock();
bool result = TRUE;
m_cancelFlag = FALSE;
- QTextStream stream( iodevice );
+ TQTextStream stream( iodevice );
int numElements = (int) bibtexfile->count(), i = 0;
emit progress( 0, numElements );
@@ -80,10 +80,10 @@ namespace BibTeX
m_cancelFlag = TRUE;
}
- bool FileExporterRIS::writeEntry( QTextStream &stream, const Entry* entry )
+ bool FileExporterRIS::writeEntry( TQTextStream &stream, const Entry* entry )
{
bool result = TRUE;
- qDebug( "Writing Entry" );
+ tqDebug( "Writing Entry" );
switch ( entry->entryType() )
{
@@ -109,8 +109,8 @@ namespace BibTeX
writeKeyValue( stream, "TY", "GEN" );
}
- QString year = "";
- QString month = "";
+ TQString year = "";
+ TQString month = "";
for ( Entry::EntryFields::ConstIterator it = entry->begin(); result && it != entry->end(); it++ )
{
@@ -120,14 +120,14 @@ namespace BibTeX
result &= writeKeyValue( stream, field->fieldTypeName().right( 2 ), field->value()->simplifiedText() );
else if ( field->fieldType() == EntryField::ftAuthor )
{
- QStringList authors = QStringList::split( QRegExp( "\\s+(,|and|&)\\s+", FALSE ), field->value() ->simplifiedText() );
- for ( QStringList::Iterator it = authors.begin(); result && it != authors.end(); ++it )
+ TQStringList authors = TQStringList::split( TQRegExp( "\\s+(,|and|&)\\s+", FALSE ), field->value() ->simplifiedText() );
+ for ( TQStringList::Iterator it = authors.begin(); result && it != authors.end(); ++it )
result &= writeKeyValue( stream, "AU", *it );
}
else if ( field->fieldType() == EntryField::ftEditor )
{
- QStringList authors = QStringList::split( QRegExp( "\\s+(,|and|&)\\s+", FALSE ), field->value() ->simplifiedText() );
- for ( QStringList::Iterator it = authors.begin(); result && it != authors.end(); ++it )
+ TQStringList authors = TQStringList::split( TQRegExp( "\\s+(,|and|&)\\s+", FALSE ), field->value() ->simplifiedText() );
+ for ( TQStringList::Iterator it = authors.begin(); result && it != authors.end(); ++it )
result &= writeKeyValue( stream, "ED", *it );
}
else if ( field->fieldType() == EntryField::ftTitle )
@@ -164,7 +164,7 @@ namespace BibTeX
result &= writeKeyValue( stream, "UR", field->value() ->simplifiedText() );
else if ( field->fieldType() == EntryField::ftPages )
{
- QStringList pageRange = QStringList::split( QRegExp( QString( "--|-|%1" ).arg( QChar( 0x2013 ) ) ), field->value() ->simplifiedText() );
+ TQStringList pageRange = TQStringList::split( TQRegExp( TQString( "--|-|%1" ).arg( TQChar( 0x2013 ) ) ), field->value() ->simplifiedText() );
if ( pageRange.count() == 2 )
{
result &= writeKeyValue( stream, "SP", pageRange[ 0 ] );
@@ -177,22 +177,22 @@ namespace BibTeX
if ( !year.isEmpty() || !month.isEmpty() )
{
- result &= writeKeyValue( stream, "PY", QString( "%1/%2//" ).arg( year ).arg( month ) );
+ result &= writeKeyValue( stream, "PY", TQString( "%1/%2//" ).arg( year ).arg( month ) );
}
- result &= writeKeyValue( stream, "ER", QString() );
+ result &= writeKeyValue( stream, "ER", TQString() );
stream << endl;
return result;
}
- bool FileExporterRIS::writeKeyValue( QTextStream &stream, const QString& key, const QString&value )
+ bool FileExporterRIS::writeKeyValue( TQTextStream &stream, const TQString& key, const TQString&value )
{
stream << key << " - ";
if ( !value.isEmpty() )
stream << value;
stream << endl;
- qDebug( "%s - %s", key.latin1(), value.latin1() );
+ tqDebug( "%s - %s", key.latin1(), value.latin1() );
return TRUE;
}
diff --git a/src/fileexporterris.h b/src/fileexporterris.h
index d38107f..0063c21 100644
--- a/src/fileexporterris.h
+++ b/src/fileexporterris.h
@@ -32,8 +32,8 @@ namespace BibTeX
~FileExporterRIS();
- bool save( QIODevice* iodevice, const Element* element, QStringList* errorLog = NULL );
- bool save( QIODevice* iodevice, const File* bibtexfile, QStringList* errorLog = NULL );
+ bool save( TQIODevice* iodevice, const Element* element, TQStringList* errorLog = NULL );
+ bool save( TQIODevice* iodevice, const File* bibtexfile, TQStringList* errorLog = NULL );
public slots:
void cancel();
@@ -41,8 +41,8 @@ namespace BibTeX
private:
bool m_cancelFlag;
- bool writeEntry( QTextStream &stream, const Entry* entry );
- bool writeKeyValue( QTextStream &stream, const QString& key, const QString&value );
+ bool writeEntry( TQTextStream &stream, const Entry* entry );
+ bool writeKeyValue( TQTextStream &stream, const TQString& key, const TQString&value );
};
}
diff --git a/src/fileexporterrtf.cpp b/src/fileexporterrtf.cpp
index 2ed0c49..77b541a 100644
--- a/src/fileexporterrtf.cpp
+++ b/src/fileexporterrtf.cpp
@@ -17,8 +17,8 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qfile.h>
-#include <qstringlist.h>
+#include <ntqfile.h>
+#include <ntqstringlist.h>
#include <settings.h>
#include <element.h>
@@ -30,9 +30,9 @@ namespace BibTeX
FileExporterRTF::FileExporterRTF() : FileExporterToolchain(), m_latexLanguage( "english" ), m_latexBibStyle( "plain" )
{
- laTeXFilename = QString( workingDir ).append( "/bibtex-to-rtf.tex" );
- bibTeXFilename = QString( workingDir ).append( "/bibtex-to-rtf.bib" );
- outputFilename = QString( workingDir ).append( "/bibtex-to-rtf.rtf" );
+ laTeXFilename = TQString( workingDir ).append( "/bibtex-to-rtf.tex" );
+ bibTeXFilename = TQString( workingDir ).append( "/bibtex-to-rtf.bib" );
+ outputFilename = TQString( workingDir ).append( "/bibtex-to-rtf.rtf" );
}
FileExporterRTF::~FileExporterRTF()
@@ -40,12 +40,12 @@ namespace BibTeX
// nothing
}
- bool FileExporterRTF::save( QIODevice* iodevice, const File* bibtexfile, QStringList *errorLog )
+ bool FileExporterRTF::save( TQIODevice* iodevice, const File* bibtexfile, TQStringList *errorLog )
{
m_mutex.lock();
bool result = FALSE;
- QFile bibtexFile( bibTeXFilename );
+ TQFile bibtexFile( bibTeXFilename );
if ( bibtexFile.open( IO_WriteOnly ) )
{
FileExporter * bibtexExporter = new FileExporterBibTeX();
@@ -61,12 +61,12 @@ namespace BibTeX
return result;
}
- bool FileExporterRTF::save( QIODevice* iodevice, const Element* element, QStringList *errorLog )
+ bool FileExporterRTF::save( TQIODevice* iodevice, const Element* element, TQStringList *errorLog )
{
m_mutex.lock();
bool result = FALSE;
- QFile bibtexFile( bibTeXFilename );
+ TQFile bibtexFile( bibTeXFilename );
if ( bibtexFile.open( IO_WriteOnly ) )
{
FileExporter * bibtexExporter = new FileExporterBibTeX();
@@ -82,19 +82,19 @@ namespace BibTeX
return result;
}
- void FileExporterRTF::setLaTeXLanguage( const QString& language )
+ void FileExporterRTF::setLaTeXLanguage( const TQString& language )
{
m_latexLanguage = language;
}
- void FileExporterRTF::setLaTeXBibliographyStyle( const QString& bibStyle )
+ void FileExporterRTF::setLaTeXBibliographyStyle( const TQString& bibStyle )
{
m_latexBibStyle = bibStyle;
}
- bool FileExporterRTF::generateRTF( QIODevice* iodevice, QStringList *errorLog )
+ bool FileExporterRTF::generateRTF( TQIODevice* iodevice, TQStringList *errorLog )
{
- QStringList cmdLines = QStringList::split( '|', "latex bibtex-to-rtf.tex|bibtex bibtex-to-rtf|latex bibtex-to-rtf.tex|latex2rtf bibtex-to-rtf.tex" );
+ TQStringList cmdLines = TQStringList::split( '|', "latex bibtex-to-rtf.tex|bibtex bibtex-to-rtf|latex bibtex-to-rtf.tex|latex2rtf bibtex-to-rtf.tex" );
if ( writeLatexFile( laTeXFilename ) && runProcesses( cmdLines, errorLog ) && writeFileToIODevice( outputFilename, iodevice ) )
return TRUE;
@@ -102,13 +102,13 @@ namespace BibTeX
return FALSE;
}
- bool FileExporterRTF::writeLatexFile( const QString &filename )
+ bool FileExporterRTF::writeLatexFile( const TQString &filename )
{
- QFile latexFile( filename );
+ TQFile latexFile( filename );
if ( latexFile.open( IO_WriteOnly ) )
{
- QTextStream ts( &latexFile );
- ts.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream ts( &latexFile );
+ ts.setEncoding( TQTextStream::UnicodeUTF8 );
ts << "\\documentclass{article}\n";
if ( kpsewhich( "t1enc.dfu" ) )
ts << "\\usepackage[T1]{fontenc}\n";
diff --git a/src/fileexporterrtf.h b/src/fileexporterrtf.h
index bb916e0..69bf098 100644
--- a/src/fileexporterrtf.h
+++ b/src/fileexporterrtf.h
@@ -34,21 +34,21 @@ namespace BibTeX
FileExporterRTF();
~FileExporterRTF();
- bool save( QIODevice* iodevice, const File* bibtexfile, QStringList *errorLog = NULL );
- bool save( QIODevice* iodevice, const Element* element, QStringList *errorLog = NULL );
+ bool save( TQIODevice* iodevice, const File* bibtexfile, TQStringList *errorLog = NULL );
+ bool save( TQIODevice* iodevice, const Element* element, TQStringList *errorLog = NULL );
- void setLaTeXLanguage( const QString& language );
- void setLaTeXBibliographyStyle( const QString& bibStyle );
+ void setLaTeXLanguage( const TQString& language );
+ void setLaTeXBibliographyStyle( const TQString& bibStyle );
private:
- QString laTeXFilename;
- QString bibTeXFilename;
- QString outputFilename;
- QString m_latexLanguage;
- QString m_latexBibStyle;
-
- bool generateRTF( QIODevice* iodevice, QStringList *errorLog );
- bool writeLatexFile( const QString &filename );
+ TQString laTeXFilename;
+ TQString bibTeXFilename;
+ TQString outputFilename;
+ TQString m_latexLanguage;
+ TQString m_latexBibStyle;
+
+ bool generateRTF( TQIODevice* iodevice, TQStringList *errorLog );
+ bool writeLatexFile( const TQString &filename );
};
}
diff --git a/src/fileexportertoolchain.cpp b/src/fileexportertoolchain.cpp
index 8e51431..0883e60 100644
--- a/src/fileexportertoolchain.cpp
+++ b/src/fileexportertoolchain.cpp
@@ -18,10 +18,10 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qprocess.h>
-#include <qwaitcondition.h>
-#include <qapplication.h>
-#include <qstringlist.h>
+#include <ntqprocess.h>
+#include <ntqwaitcondition.h>
+#include <ntqapplication.h>
+#include <ntqstringlist.h>
#include "fileexportertoolchain.h"
@@ -31,7 +31,7 @@ namespace BibTeX
FileExporterToolchain::FileExporterToolchain()
: FileExporter(), m_errorLog( NULL )
{
- m_waitCond = new QWaitCondition();
+ m_waitCond = new TQWaitCondition();
workingDir = createTempDir();
}
@@ -41,29 +41,29 @@ namespace BibTeX
deleteTempDir( workingDir );
}
- bool FileExporterToolchain::runProcesses( const QStringList &progs, QStringList *errorLog )
+ bool FileExporterToolchain::runProcesses( const TQStringList &progs, TQStringList *errorLog )
{
bool result = TRUE;
int i = 0;
emit progress( 0, progs.size() );
- for ( QStringList::ConstIterator it = progs.begin(); result && it != progs.end(); it++ )
+ for ( TQStringList::ConstIterator it = progs.begin(); result && it != progs.end(); it++ )
{
- qApp->processEvents();
- QStringList args = QStringList::split( ' ', *it );
+ tqApp->processEvents();
+ TQStringList args = TQStringList::split( ' ', *it );
result &= runProcess( args, errorLog );
emit progress( i++, progs.size() );
}
- qApp->processEvents();
+ tqApp->processEvents();
return result;
}
- bool FileExporterToolchain::runProcess( const QStringList &args, QStringList *errorLog )
+ bool FileExporterToolchain::runProcess( const TQStringList &args, TQStringList *errorLog )
{
bool result = FALSE;
- QApplication::setOverrideCursor( Qt::waitCursor );
+ TQApplication::setOverrideCursor( TQt::waitCursor );
- m_process = new QProcess( args );
+ m_process = new TQProcess( args );
m_process->setWorkingDirectory( workingDir );
connect( m_process, SIGNAL( processExited() ), this, SLOT( slotProcessExited() ) );
connect( m_process, SIGNAL( readyReadStdout() ), this, SLOT( slotReadProcessOutput() ) );
@@ -73,11 +73,11 @@ namespace BibTeX
{
m_errorLog = errorLog;
int counter = 0;
- qApp->processEvents();
+ tqApp->processEvents();
while ( m_process->isRunning() )
{
m_waitCond->wait( 250 );
- qApp->processEvents();
+ tqApp->processEvents();
counter++;
if ( counter > 400 )
@@ -86,10 +86,10 @@ namespace BibTeX
result = m_process->normalExit() && counter < 400;
if ( !result )
- errorLog->append( QString( "Process '%1' failed." ).arg( args.join( " " ) ) );
+ errorLog->append( TQString( "Process '%1' failed." ).arg( args.join( " " ) ) );
}
else
- errorLog->append( QString( "Process '%1' was not started." ).arg( args.join( " " ) ) );
+ errorLog->append( TQString( "Process '%1' was not started." ).arg( args.join( " " ) ) );
disconnect( m_process, SIGNAL( readyReadStdout() ), this, SLOT( slotReadProcessOutput() ) );
@@ -98,18 +98,18 @@ namespace BibTeX
delete( m_process );
m_process = NULL;
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
return result;
}
- bool FileExporterToolchain::writeFileToIODevice( const QString &filename, QIODevice *device )
+ bool FileExporterToolchain::writeFileToIODevice( const TQString &filename, TQIODevice *device )
{
- QFile file( filename );
+ TQFile file( filename );
if ( file.open( IO_ReadOnly ) )
{
bool result = TRUE;
- Q_ULONG buffersize = 0x10000;
- Q_LONG amount = 0;
+ TQ_ULONG buffersize = 0x10000;
+ TQ_LONG amount = 0;
char* buffer = new char[ buffersize ];
do
{
@@ -125,20 +125,20 @@ namespace BibTeX
return FALSE;
}
- QString FileExporterToolchain::createTempDir()
+ TQString FileExporterToolchain::createTempDir()
{
- QString result = QString::null;
- QFile *devrandom = new QFile( "/dev/random" );
+ TQString result = TQString::null;
+ TQFile *devrandom = new TQFile( "/dev/random" );
if ( devrandom->open( IO_ReadOnly ) )
{
- Q_UINT32 randomNumber;
+ TQ_UINT32 randomNumber;
if ( devrandom->readBlock(( char* ) & randomNumber, sizeof( randomNumber ) ) > 0 )
{
randomNumber |= 0x10000000;
- result = QString( "/tmp/bibtex-%1" ).arg( randomNumber, sizeof( randomNumber ) * 2, 16 );
- if ( !QDir().mkdir( result ) )
- result = QString::null;
+ result = TQString( "/tmp/bibtex-%1" ).arg( randomNumber, sizeof( randomNumber ) * 2, 16 );
+ if ( !TQDir().mkdir( result ) )
+ result = TQString::null;
}
devrandom->close();
}
@@ -148,20 +148,20 @@ namespace BibTeX
return result;
}
- void FileExporterToolchain::deleteTempDir( const QString& directory )
+ void FileExporterToolchain::deleteTempDir( const TQString& directory )
{
- QDir dir = QDir( directory );
- QStringList subDirs = dir.entryList( QDir::Dirs );
- for ( QStringList::Iterator it = subDirs.begin(); it != subDirs.end(); it++ )
+ TQDir dir = TQDir( directory );
+ TQStringList subDirs = dir.entryList( TQDir::Dirs );
+ for ( TQStringList::Iterator it = subDirs.begin(); it != subDirs.end(); it++ )
{
- if (( QString::compare( *it, "." ) != 0 ) && ( QString::compare( *it, ".." ) != 0 ) )
+ if (( TQString::compare( *it, "." ) != 0 ) && ( TQString::compare( *it, ".." ) != 0 ) )
deleteTempDir( *it );
}
- QStringList allEntries = dir.entryList( QDir::All );
- for ( QStringList::Iterator it = allEntries.begin(); it != allEntries.end(); it++ )
+ TQStringList allEntries = dir.entryList( TQDir::All );
+ for ( TQStringList::Iterator it = allEntries.begin(); it != allEntries.end(); it++ )
dir.remove( *it );
- QDir().rmdir( directory );
+ TQDir().rmdir( directory );
}
void FileExporterToolchain::slotProcessExited()
@@ -173,7 +173,7 @@ namespace BibTeX
{
if ( m_process != NULL )
{
- qDebug( "Canceling process" );
+ tqDebug( "Canceling process" );
m_process->tryTerminate();
m_process->kill();
m_waitCond->wakeAll();
@@ -186,35 +186,35 @@ namespace BibTeX
{
while ( m_process->canReadLineStdout() )
{
- QString line = m_process->readLineStdout();
+ TQString line = m_process->readLineStdout();
if ( m_errorLog != NULL )
m_errorLog->append( line );
}
while ( m_process->canReadLineStderr() )
{
- QString line = m_process->readLineStderr();
+ TQString line = m_process->readLineStderr();
if ( m_errorLog != NULL )
m_errorLog->append( line );
}
}
}
- bool FileExporterToolchain::kpsewhich( const QString& filename )
+ bool FileExporterToolchain::kpsewhich( const TQString& filename )
{
bool result = FALSE;
int counter = 0;
- QWaitCondition waitCond;
- QProcess kpsewhich;
+ TQWaitCondition waitCond;
+ TQProcess kpsewhich;
kpsewhich.addArgument( "kpsewhich" );
kpsewhich.addArgument( filename );
if ( kpsewhich.start() )
{
- qApp->processEvents();
+ tqApp->processEvents();
while ( kpsewhich.isRunning() )
{
waitCond.wait( 250 );
- qApp->processEvents();
+ tqApp->processEvents();
counter++;
if ( counter > 50 )
diff --git a/src/fileexportertoolchain.h b/src/fileexportertoolchain.h
index 76000a1..7ea4cfb 100644
--- a/src/fileexportertoolchain.h
+++ b/src/fileexportertoolchain.h
@@ -22,10 +22,10 @@
#include <fileexporter.h>
-class QString;
-class QWaitCondition;
-class QProcess;
-class QStringList;
+class TQString;
+class TQWaitCondition;
+class TQProcess;
+class TQStringList;
namespace BibTeX
{
@@ -44,20 +44,20 @@ namespace BibTeX
void cancel();
protected:
- QString workingDir;
+ TQString workingDir;
- bool runProcesses( const QStringList &progs, QStringList *errorLog = NULL );
- bool runProcess( const QStringList &args, QStringList *errorLog = NULL );
- bool writeFileToIODevice( const QString &filename, QIODevice *device );
- bool kpsewhich( const QString& filename );
+ bool runProcesses( const TQStringList &progs, TQStringList *errorLog = NULL );
+ bool runProcess( const TQStringList &args, TQStringList *errorLog = NULL );
+ bool writeFileToIODevice( const TQString &filename, TQIODevice *device );
+ bool kpsewhich( const TQString& filename );
private:
- QWaitCondition *m_waitCond;
- QProcess *m_process;
- QStringList *m_errorLog;
+ TQWaitCondition *m_waitCond;
+ TQProcess *m_process;
+ TQStringList *m_errorLog;
- QString createTempDir();
- void deleteTempDir( const QString& directory );
+ TQString createTempDir();
+ void deleteTempDir( const TQString& directory );
private slots:
void slotProcessExited();
diff --git a/src/fileexporterxml.cpp b/src/fileexporterxml.cpp
index 4dcbee4..ff2814e 100644
--- a/src/fileexporterxml.cpp
+++ b/src/fileexporterxml.cpp
@@ -17,8 +17,8 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qregexp.h>
-#include <qstringlist.h>
+#include <ntqregexp.h>
+#include <ntqstringlist.h>
#include <file.h>
#include <element.h>
@@ -42,13 +42,13 @@ namespace BibTeX
// nothing
}
- bool FileExporterXML::save( QIODevice* iodevice, const File* bibtexfile, QStringList * /*errorLog*/ )
+ bool FileExporterXML::save( TQIODevice* iodevice, const File* bibtexfile, TQStringList * /*errorLog*/ )
{
m_mutex.lock();
bool result = TRUE;
m_cancelFlag = FALSE;
- QTextStream stream( iodevice );
- stream.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream stream( iodevice );
+ stream.setEncoding( TQTextStream::UnicodeUTF8 );
stream << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl;
stream << "<bibliography>" << endl;
@@ -68,10 +68,10 @@ namespace BibTeX
return result && !m_cancelFlag;
}
- bool FileExporterXML::save( QIODevice* iodevice, const Element* element, QStringList * /*errorLog*/ )
+ bool FileExporterXML::save( TQIODevice* iodevice, const Element* element, TQStringList * /*errorLog*/ )
{
- QTextStream stream( iodevice );
- stream.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream stream( iodevice );
+ stream.setEncoding( TQTextStream::UnicodeUTF8 );
stream << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl;
return write( stream, element );
@@ -82,7 +82,7 @@ namespace BibTeX
m_cancelFlag = TRUE;
}
- bool FileExporterXML::write( QTextStream&stream, const Element *element, const File* bibtexfile )
+ bool FileExporterXML::write( TQTextStream&stream, const Element *element, const File* bibtexfile )
{
bool result = FALSE;
@@ -117,7 +117,7 @@ namespace BibTeX
return result;
}
- bool FileExporterXML::writeEntry( QTextStream &stream, const Entry* entry )
+ bool FileExporterXML::writeEntry( TQTextStream &stream, const Entry* entry )
{
stream << " <entry id=\"" << EncoderXML::currentEncoderXML() ->encode( entry->id() ) << "\" type=\"" << entry->entryTypeString().lower() << "\">" << endl;
for ( Entry::EntryFields::const_iterator it = entry->begin(); it != entry->end(); it++ )
@@ -128,10 +128,10 @@ namespace BibTeX
case EntryField::ftAuthor:
case EntryField::ftEditor:
{
- QString tag = field->fieldTypeName().lower();
+ TQString tag = field->fieldTypeName().lower();
stream << " <" << tag << "s>" << endl;
- QStringList persons = QStringList::split( QRegExp( "\\s+(,|and|&)+\\s+", FALSE ), EncoderXML::currentEncoderXML() ->encode( valueToString( field->value() ) ) );
- for ( QStringList::Iterator it = persons.begin(); it != persons.end(); it++ )
+ TQStringList persons = TQStringList::split( TQRegExp( "\\s+(,|and|&)+\\s+", FALSE ), EncoderXML::currentEncoderXML() ->encode( valueToString( field->value() ) ) );
+ for ( TQStringList::Iterator it = persons.begin(); it != persons.end(); it++ )
stream << " <person>" << *it << "</person>" << endl;
stream << " </" << tag << "s>" << endl;
}
@@ -142,14 +142,14 @@ namespace BibTeX
bool ok = FALSE;
int month = -1;
- QString tag = "";
- QString content = "";
- for ( QValueList<ValueItem*>::ConstIterator it = field->value()->items.begin(); it != field->value()->items.end(); ++it )
+ TQString tag = "";
+ TQString content = "";
+ for ( TQValueList<ValueItem*>::ConstIterator it = field->value()->items.begin(); it != field->value()->items.end(); ++it )
{
if ( dynamic_cast<MacroKey*>( *it ) != NULL )
{
for ( int i = 0; i < 12; i++ )
- if ( QString::compare(( *it )->text(), MonthsTriple[ i ] ) == 0 )
+ if ( TQString::compare(( *it )->text(), MonthsTriple[ i ] ) == 0 )
{
if ( month < 1 )
{
@@ -177,7 +177,7 @@ namespace BibTeX
break;
default:
{
- QString tag = field->fieldTypeName().lower();
+ TQString tag = field->fieldTypeName().lower();
stream << " <" << tag << ">" << EncoderXML::currentEncoderXML() ->encode( valueToString( field->value() ) ) << "</" << tag << ">" << endl;
}
break;
@@ -189,7 +189,7 @@ namespace BibTeX
return TRUE;
}
- bool FileExporterXML::writeMacro( QTextStream &stream, const Macro *macro )
+ bool FileExporterXML::writeMacro( TQTextStream &stream, const Macro *macro )
{
stream << " <string key=\"" << macro->key() << "\">";
stream << EncoderXML::currentEncoderXML() ->encode( valueToString( macro->value() ) );
@@ -198,7 +198,7 @@ namespace BibTeX
return TRUE;
}
- bool FileExporterXML::writeComment( QTextStream &stream, const Comment *comment )
+ bool FileExporterXML::writeComment( TQTextStream &stream, const Comment *comment )
{
stream << " <comment>" ;
stream << EncoderXML::currentEncoderXML() ->encode( comment->text() );
@@ -207,12 +207,12 @@ namespace BibTeX
return TRUE;
}
- QString FileExporterXML::valueToString( Value *value )
+ TQString FileExporterXML::valueToString( Value *value )
{
- QString result;
+ TQString result;
bool isFirst = TRUE;
- for ( QValueList<ValueItem*>::ConstIterator it = value->items.begin(); it != value->items.end(); it++ )
+ for ( TQValueList<ValueItem*>::ConstIterator it = value->items.begin(); it != value->items.end(); it++ )
{
if ( !isFirst )
result.append( ' ' );
diff --git a/src/fileexporterxml.h b/src/fileexporterxml.h
index a4eff65..88f64f3 100644
--- a/src/fileexporterxml.h
+++ b/src/fileexporterxml.h
@@ -39,8 +39,8 @@ namespace BibTeX
FileExporterXML();
~FileExporterXML();
- bool save( QIODevice* iodevice, const File* bibtexfile, QStringList *errorLog = NULL );
- bool save( QIODevice* iodevice, const Element* element, QStringList *errorLog = NULL );
+ bool save( TQIODevice* iodevice, const File* bibtexfile, TQStringList *errorLog = NULL );
+ bool save( TQIODevice* iodevice, const Element* element, TQStringList *errorLog = NULL );
public slots:
void cancel();
@@ -48,12 +48,12 @@ namespace BibTeX
private:
bool m_cancelFlag;
- bool write( QTextStream&stream, const Element *element, const File* bibtexfile = NULL );
- bool writeEntry( QTextStream &stream, const Entry* entry );
- bool writeMacro( QTextStream &stream, const Macro *macro );
- bool writeComment( QTextStream &stream, const Comment *comment );
+ bool write( TQTextStream&stream, const Element *element, const File* bibtexfile = NULL );
+ bool writeEntry( TQTextStream &stream, const Entry* entry );
+ bool writeMacro( TQTextStream &stream, const Macro *macro );
+ bool writeComment( TQTextStream &stream, const Comment *comment );
- QString valueToString( Value *value );
+ TQString valueToString( Value *value );
};
}
diff --git a/src/fileexporterxslt.cpp b/src/fileexporterxslt.cpp
index a5a3255..14991e6 100644
--- a/src/fileexporterxslt.cpp
+++ b/src/fileexporterxslt.cpp
@@ -17,7 +17,7 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qbuffer.h>
+#include <ntqbuffer.h>
#include <fileexporterxml.h>
#include <xsltransform.h>
@@ -40,23 +40,23 @@ namespace BibTeX
delete m_exporterXML;
}
- bool FileExporterXSLT::save( QIODevice* iodevice, const File* bibtexfile, QStringList *errorLog )
+ bool FileExporterXSLT::save( TQIODevice* iodevice, const File* bibtexfile, TQStringList *errorLog )
{
m_mutex.lock();
- QBuffer buffer;
+ TQBuffer buffer;
buffer.open( IO_WriteOnly );
if ( m_exporterXML->save( &buffer, bibtexfile, errorLog ) )
{
buffer.close();
buffer.open( IO_ReadOnly );
- QTextStream ts( &buffer );
- ts.setEncoding( QTextStream::UnicodeUTF8 );
- QString xml = ts.read();
+ TQTextStream ts( &buffer );
+ ts.setEncoding( TQTextStream::UnicodeUTF8 );
+ TQString xml = ts.read();
buffer.close();
- QString html = m_transformer->transform( xml );
- QTextStream htmlTS( iodevice );
- htmlTS.setEncoding( QTextStream::UnicodeUTF8 );
+ TQString html = m_transformer->transform( xml );
+ TQTextStream htmlTS( iodevice );
+ htmlTS.setEncoding( TQTextStream::UnicodeUTF8 );
htmlTS << html << endl;
m_mutex.unlock();
return TRUE;
@@ -66,23 +66,23 @@ namespace BibTeX
return FALSE;
}
- bool FileExporterXSLT::save( QIODevice* iodevice, const Element* element, QStringList *errorLog )
+ bool FileExporterXSLT::save( TQIODevice* iodevice, const Element* element, TQStringList *errorLog )
{
m_mutex.lock();
- QBuffer buffer;
+ TQBuffer buffer;
buffer.open( IO_WriteOnly );
if ( m_exporterXML->save( &buffer, element, errorLog ) )
{
buffer.close();
buffer.open( IO_ReadOnly );
- QTextStream xmlTS( &buffer );
- xmlTS.setEncoding( QTextStream::UnicodeUTF8 );
- QString xml = xmlTS.read();
+ TQTextStream xmlTS( &buffer );
+ xmlTS.setEncoding( TQTextStream::UnicodeUTF8 );
+ TQString xml = xmlTS.read();
buffer.close();
- QString html = m_transformer->transform( xml );
- QTextStream output( iodevice );
- output.setEncoding( QTextStream::UnicodeUTF8 );
+ TQString html = m_transformer->transform( xml );
+ TQTextStream output( iodevice );
+ output.setEncoding( TQTextStream::UnicodeUTF8 );
output << html << endl;
m_mutex.unlock();
return TRUE;
diff --git a/src/fileexporterxslt.h b/src/fileexporterxslt.h
index 0d11e58..a41c8f9 100644
--- a/src/fileexporterxslt.h
+++ b/src/fileexporterxslt.h
@@ -37,8 +37,8 @@ namespace BibTeX
FileExporterXSLT( XSLTransform *transformer );
~FileExporterXSLT();
- bool save( QIODevice* iodevice, const File* bibtexfile, QStringList *errorLog = NULL );
- bool save( QIODevice* iodevice, const Element* element, QStringList *errorLog = NULL );
+ bool save( TQIODevice* iodevice, const File* bibtexfile, TQStringList *errorLog = NULL );
+ bool save( TQIODevice* iodevice, const Element* element, TQStringList *errorLog = NULL );
private:
XSLTransform *m_transformer;
diff --git a/src/fileimporter.cpp b/src/fileimporter.cpp
index 65ee792..2633d35 100644
--- a/src/fileimporter.cpp
+++ b/src/fileimporter.cpp
@@ -17,14 +17,14 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qbuffer.h>
+#include <ntqbuffer.h>
#include "fileimporter.h"
namespace BibTeX
{
- FileImporter::FileImporter() : QObject()
+ FileImporter::FileImporter() : TQObject()
{
// nothing
}
@@ -34,15 +34,15 @@ namespace BibTeX
// nothing
}
- File* FileImporter::load( const QString& text )
+ File* FileImporter::load( const TQString& text )
{
if ( text.isNull() || text.isEmpty() )
return NULL;
- QBuffer buffer;
+ TQBuffer buffer;
buffer.open( IO_WriteOnly );
- QTextStream stream( &buffer );
- stream.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream stream( &buffer );
+ stream.setEncoding( TQTextStream::UnicodeUTF8 );
stream << text;
buffer.close();
diff --git a/src/fileimporter.h b/src/fileimporter.h
index 6dfdb2d..d99ade7 100644
--- a/src/fileimporter.h
+++ b/src/fileimporter.h
@@ -20,10 +20,10 @@
#ifndef BIBTEXFILEIMPORTER_H
#define BIBTEXFILEIMPORTER_H
-#include <qobject.h>
-#include <qmutex.h>
+#include <ntqobject.h>
+#include <ntqmutex.h>
-class QIODevice;
+class TQIODevice;
namespace BibTeX
{
@@ -32,17 +32,17 @@ namespace BibTeX
/**
@author Thomas Fischer
*/
- class FileImporter : public QObject
+ class FileImporter : public TQObject
{
Q_OBJECT
public:
FileImporter();
~FileImporter();
- File* load( const QString& text );
- virtual File* load( QIODevice *iodevice ) = 0;
+ File* load( const TQString& text );
+ virtual File* load( TQIODevice *iodevice ) = 0;
- static bool guessCanDecode( const QString & )
+ static bool guessCanDecode( const TQString & )
{
return FALSE;
};
@@ -58,7 +58,7 @@ namespace BibTeX
};
protected:
- QMutex m_mutex;
+ TQMutex m_mutex;
};
}
diff --git a/src/fileimporterbibtex.cpp b/src/fileimporterbibtex.cpp
index 5312f0c..f1d3c2e 100644
--- a/src/fileimporterbibtex.cpp
+++ b/src/fileimporterbibtex.cpp
@@ -17,9 +17,9 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qiodevice.h>
-#include <qregexp.h>
-#include <qapplication.h>
+#include <ntqiodevice.h>
+#include <ntqregexp.h>
+#include <ntqapplication.h>
#include <file.h>
#include <comment.h>
@@ -36,10 +36,10 @@
namespace BibTeX
{
- const QString extraAlphaNumChars = QString( "?'`-_:.+/$\\\"&" );
- const QRegExp htmlRegExp = QRegExp( "</?(a|pre)[^>]*>", false );
+ const TQString extraAlphaNumChars = TQString( "?'`-_:.+/$\\\"&" );
+ const TQRegExp htmlRegExp = TQRegExp( "</?(a|pre)[^>]*>", false );
- FileImporterBibTeX::FileImporterBibTeX( bool personFirstNameFirst, QString encoding ) : FileImporter(), m_personFirstNameFirst( personFirstNameFirst ), m_currentChar( ' ' ), m_ignoreComments( FALSE ), m_lineBufferSize( 4096 ), m_encoding( encoding )
+ FileImporterBibTeX::FileImporterBibTeX( bool personFirstNameFirst, TQString encoding ) : FileImporter(), m_personFirstNameFirst( personFirstNameFirst ), m_currentChar( ' ' ), m_ignoreComments( FALSE ), m_lineBufferSize( 4096 ), m_encoding( encoding )
{
cancelFlag = FALSE;
m_lineBuffer = new char[m_lineBufferSize];
@@ -52,12 +52,12 @@ namespace BibTeX
delete[] m_lineBuffer;
}
- File* FileImporterBibTeX::load( QIODevice *iodevice )
+ File* FileImporterBibTeX::load( TQIODevice *iodevice )
{
m_mutex.lock();
cancelFlag = FALSE;
- QString rawText;
+ TQString rawText;
const char *encodingFrom = m_encoding == "latex" ? "utf-8\0" : m_encoding.append( "\0" ).ascii();
iconv_t iconvHandle = iconv_open( "utf-8", encodingFrom );
char *convertedLine = new char[m_lineBufferSize * 4];
@@ -72,19 +72,19 @@ namespace BibTeX
size_t encLen = m_lineBufferSize, rawLen = ( size_t )len;
size_t result = iconv( iconvHandle, &raw, &rawLen, &enc, &encLen );
- qApp->processEvents();
+ tqApp->processEvents();
if ( result != 0 )
{
- QString problematic = QString( m_lineBuffer ).mid( max( 0, m_lineBufferSize - encLen - 15 ), 30 );
- if ( problematic.isNull() || problematic.isEmpty() ) problematic = QString( m_lineBuffer );
- qDebug( "iconv resulted in error code %i for source encoding %s, maybe file is in different encoding? Problem is somewhere here: \"%s\"", result, encodingFrom, problematic.latin1() );
+ TQString problematic = TQString( m_lineBuffer ).mid( max( 0, m_lineBufferSize - encLen - 15 ), 30 );
+ if ( problematic.isNull() || problematic.isEmpty() ) problematic = TQString( m_lineBuffer );
+ tqDebug( "iconv resulted in error code %i for source encoding %s, maybe file is in different encoding? Problem is somewhere here: \"%s\"", result, encodingFrom, problematic.latin1() );
encodingOk = false;
break;
}
if ( rawLen > 0 )
{
- qDebug( "iconv could not convert complete string, only %i out of %i chars", len - rawLen, len );
+ tqDebug( "iconv could not convert complete string, only %i out of %i chars", len - rawLen, len );
encodingOk = false;
break;
}
@@ -95,7 +95,7 @@ namespace BibTeX
while (((( unsigned char )convertedLine[offset] ) == 0xef || (( unsigned char )convertedLine[offset] ) == 0xbb || (( unsigned char )convertedLine[offset] ) == 0xbf ) && offset < 4 )
++offset;
- QString line = QString::fromUtf8( convertedLine + offset );
+ TQString line = TQString::fromUtf8( convertedLine + offset );
rawText.append( line );
}
iconv_close( iconvHandle );
@@ -103,7 +103,7 @@ namespace BibTeX
if ( !encodingOk )
{
- qDebug( "Decoding failed, cannot load file. Please fix encoding manually." );
+ tqDebug( "Decoding failed, cannot load file. Please fix encoding manually." );
m_mutex.unlock();
return NULL;
}
@@ -112,18 +112,18 @@ namespace BibTeX
rawText = rawText.replace( htmlRegExp, "" );
rawText = EncoderLaTeX::currentEncoderLaTeX() ->decode( rawText );
unescapeLaTeXChars( rawText );
- m_textStream = new QTextStream( rawText, IO_ReadOnly );
- m_textStream->setEncoding( QTextStream::UnicodeUTF8 );
+ m_textStream = new TQTextStream( rawText, IO_ReadOnly );
+ m_textStream->setEncoding( TQTextStream::UnicodeUTF8 );
m_currentLineNumber = 0;
m_posIntCurrentLine = 0;
m_currentLine = "";
File *result = new File();
- QIODevice *streamDevice = m_textStream->device();
+ TQIODevice *streamDevice = m_textStream->device();
while ( !cancelFlag && !m_textStream->atEnd() )
{
emit progress( streamDevice->at(), streamDevice->size() );
- qApp->processEvents();
+ tqApp->processEvents();
Element * element = nextElement();
if ( element != NULL )
{
@@ -133,13 +133,13 @@ namespace BibTeX
else
delete element;
}
- qApp->processEvents();
+ tqApp->processEvents();
}
emit progress( streamDevice->size(), streamDevice->size() );
if ( cancelFlag )
{
- qDebug( "Loading file has been canceled" );
+ tqDebug( "Loading file has been canceled" );
delete result;
result = NULL;
}
@@ -150,10 +150,10 @@ namespace BibTeX
return result;
}
- bool FileImporterBibTeX::guessCanDecode( const QString & rawText )
+ bool FileImporterBibTeX::guessCanDecode( const TQString & rawText )
{
- QString text = EncoderLaTeX::currentEncoderLaTeX() ->decode( rawText );
- return text.find( QRegExp( "@\\w+\\{.+\\}" ) ) >= 0;
+ TQString text = EncoderLaTeX::currentEncoderLaTeX() ->decode( rawText );
+ return text.find( TQRegExp( "@\\w+\\{.+\\}" ) ) >= 0;
}
void FileImporterBibTeX::setIgnoreComments( bool ignoreComments )
@@ -172,7 +172,7 @@ namespace BibTeX
if ( token == tAt )
{
- QString elementType = readSimpleString();
+ TQString elementType = readSimpleString();
if ( elementType.lower() == "comment" )
return readCommentElement();
else if ( elementType.lower() == "string" )
@@ -183,18 +183,18 @@ namespace BibTeX
return readEntryElement( elementType );
else
{
- qDebug( "ElementType is empty" );
+ tqDebug( "ElementType is empty" );
return NULL;
}
}
else if ( token == tUnknown )
{
- qDebug( "Unknown token near line %i, treating as comment", m_currentLineNumber );
+ tqDebug( "Unknown token near line %i, treating as comment", m_currentLineNumber );
return readPlainCommentElement();
}
if ( token != tEOF )
- qDebug( "Don't know how to parse next token near line %i: %s", m_currentLineNumber, tokenidToString( token ).latin1() );
+ tqDebug( "Don't know how to parse next token near line %i: %s", m_currentLineNumber, tokenidToString( token ).latin1() );
return NULL;
}
@@ -209,7 +209,7 @@ namespace BibTeX
Comment *FileImporterBibTeX::readPlainCommentElement()
{
- QString result = m_currentChar;
+ TQString result = m_currentChar;
result += readLine();
m_currentChar = nextChar();
while ( !m_textStream->atEnd() && m_currentChar != '@' && !m_currentChar.isSpace() )
@@ -229,16 +229,16 @@ namespace BibTeX
{
if ( token == tEOF )
{
- qDebug( "Error in parsing unknown macro (near line %i): Opening curly brace ({) expected", m_currentLineNumber );
+ tqDebug( "Error in parsing unknown macro (near line %i): Opening curly brace ({) expected", m_currentLineNumber );
return NULL;
}
token = nextToken();
}
- QString key = readSimpleString();
+ TQString key = readSimpleString();
if ( nextToken() != tAssign )
{
- qDebug( "Error in parsing macro '%s' (near line %i): Assign symbol (=) expected", key.latin1(), m_currentLineNumber );
+ tqDebug( "Error in parsing macro '%s' (near line %i): Assign symbol (=) expected", key.latin1(), m_currentLineNumber );
return NULL;
}
@@ -246,7 +246,7 @@ namespace BibTeX
do
{
bool isStringKey = FALSE;
- QString text = readString( isStringKey ).replace( QRegExp( "\\s+" ), " " );
+ TQString text = readString( isStringKey ).replace( TQRegExp( "\\s+" ), " " );
if ( isStringKey )
macro->value()->items.append( new MacroKey( text ) );
else
@@ -266,7 +266,7 @@ namespace BibTeX
{
if ( token == tEOF )
{
- qDebug( "Error in parsing unknown preamble (near line %i): Opening curly brace ({) expected", m_currentLineNumber );
+ tqDebug( "Error in parsing unknown preamble (near line %i): Opening curly brace ({) expected", m_currentLineNumber );
return NULL;
}
token = nextToken();
@@ -276,7 +276,7 @@ namespace BibTeX
do
{
bool isStringKey = FALSE;
- QString text = readString( isStringKey ).replace( QRegExp( "\\s+" ), " " );
+ TQString text = readString( isStringKey ).replace( TQRegExp( "\\s+" ), " " );
if ( isStringKey )
preamble->value()->items.append( new MacroKey( text ) );
else
@@ -289,20 +289,20 @@ namespace BibTeX
return preamble;
}
- Entry *FileImporterBibTeX::readEntryElement( const QString& typeString )
+ Entry *FileImporterBibTeX::readEntryElement( const TQString& typeString )
{
Token token = nextToken();
while ( token != tBracketOpen )
{
if ( token == tEOF )
{
- qDebug( "Error in parsing unknown entry (near line %i): Opening curly brace ({) expected", m_currentLineNumber );
+ tqDebug( "Error in parsing unknown entry (near line %i): Opening curly brace ({) expected", m_currentLineNumber );
return NULL;
}
token = nextToken();
}
- QString key = readSimpleString();
+ TQString key = readSimpleString();
Entry *entry = new Entry( typeString, key );
token = nextToken();
@@ -312,21 +312,21 @@ namespace BibTeX
break;
else if ( token != tComma )
{
- qDebug( "Error in parsing entry '%s' (near line %i): Comma symbol (,) expected but got 0x%x (token %s)", key.latin1(), m_currentLineNumber, m_currentChar.unicode(), tokenidToString( token ).latin1() );
+ tqDebug( "Error in parsing entry '%s' (near line %i): Comma symbol (,) expected but got 0x%x (token %s)", key.latin1(), m_currentLineNumber, m_currentChar.unicode(), tokenidToString( token ).latin1() );
delete entry;
return NULL;
}
- QString fieldTypeName = readSimpleString();
+ TQString fieldTypeName = readSimpleString();
token = nextToken();
- if ( fieldTypeName == QString::null || token == tBracketClose )
+ if ( fieldTypeName == TQString::null || token == tBracketClose )
{
// entry is buggy, but we still accept it
break;
}
else if ( token != tAssign )
{
- qDebug( "Error in parsing entry '%s' (near line %i): Assign symbol (=) expected after field name '%s'", key.latin1(), m_currentLineNumber, fieldTypeName.latin1() );
+ tqDebug( "Error in parsing entry '%s' (near line %i): Assign symbol (=) expected after field name '%s'", key.latin1(), m_currentLineNumber, fieldTypeName.latin1() );
delete entry;
return NULL;
}
@@ -335,11 +335,11 @@ namespace BibTeX
if ( entry->getField( fieldTypeName ) != NULL )
{
int i = 1;
- QString appendix = QString::number( i );
+ TQString appendix = TQString::number( i );
while ( entry->getField( fieldTypeName + appendix ) != NULL )
{
++i;
- appendix = QString::number( i );
+ appendix = TQString::number( i );
}
fieldTypeName += appendix;
}
@@ -398,7 +398,7 @@ namespace BibTeX
return curToken;
}
- QString FileImporterBibTeX::readString( bool &isStringKey )
+ TQString FileImporterBibTeX::readString( bool &isStringKey )
{
while ( m_currentChar.isSpace() )
m_currentChar = nextChar();
@@ -417,9 +417,9 @@ namespace BibTeX
}
}
- QString FileImporterBibTeX::readSimpleString( QChar until )
+ TQString FileImporterBibTeX::readSimpleString( TQChar until )
{
- QString result;
+ TQString result;
while ( m_currentChar.isSpace() )
m_currentChar = nextChar();
@@ -446,7 +446,7 @@ namespace BibTeX
break;
else
{
- qDebug( "Unknown letter or number: 0x%x", m_currentChar.unicode() );
+ tqDebug( "Unknown letter or number: 0x%x", m_currentChar.unicode() );
// break;
}
m_currentChar = nextChar();
@@ -454,10 +454,10 @@ namespace BibTeX
return result;
}
- QString FileImporterBibTeX::readQuotedString()
+ TQString FileImporterBibTeX::readQuotedString()
{
- QString result;
- QChar lastChar = m_currentChar;
+ TQString result;
+ TQChar lastChar = m_currentChar;
m_currentChar = nextChar();
while ( !m_textStream->atEnd() )
{
@@ -475,17 +475,17 @@ namespace BibTeX
return result;
}
- QString FileImporterBibTeX::readLine()
+ TQString FileImporterBibTeX::readLine()
{
- QString result = m_currentLine.mid( m_posIntCurrentLine );
+ TQString result = m_currentLine.mid( m_posIntCurrentLine );
m_posIntCurrentLine = m_currentLine.length() + 2;
return result;
}
- QString FileImporterBibTeX::readBracketString( const QChar openingBracket )
+ TQString FileImporterBibTeX::readBracketString( const TQChar openingBracket )
{
- QString result;
- QChar closingBracket = '}';
+ TQString result;
+ TQChar closingBracket = '}';
if ( openingBracket == '(' )
closingBracket = ')';
int counter = 1;
@@ -514,14 +514,14 @@ namespace BibTeX
do
{
bool isStringKey = FALSE;
- QString text = readString( isStringKey ).replace( QRegExp( "\\s+" ), " " );
+ TQString text = readString( isStringKey ).replace( TQRegExp( "\\s+" ), " " );
switch ( fieldType )
{
case EntryField::ftKeywords:
{
if ( isStringKey )
- qDebug( "WARNING: Cannot handle keywords that are macros" );
+ tqDebug( "WARNING: Cannot handle keywords that are macros" );
else
value->items.append( new KeywordContainer( text ) );
}
@@ -530,20 +530,20 @@ namespace BibTeX
case EntryField::ftEditor:
{
if ( isStringKey )
- qDebug( "WARNING: Cannot handle authors/editors that are macros" );
+ tqDebug( "WARNING: Cannot handle authors/editors that are macros" );
else
{
- QStringList persons;
+ TQStringList persons;
splitPersons( text, persons );
PersonContainer *container = new PersonContainer( m_personFirstNameFirst );
- for ( QStringList::ConstIterator pit = persons.constBegin(); pit != persons.constEnd(); ++pit )
+ for ( TQStringList::ConstIterator pit = persons.constBegin(); pit != persons.constEnd(); ++pit )
container->persons.append( new Person( *pit, m_personFirstNameFirst ) );
value->items.append( container );
}
}
break;
case EntryField::ftPages:
- text.replace( QRegExp( "\\s*--?\\s*" ), QChar( 0x2013 ) );
+ text.replace( TQRegExp( "\\s*--?\\s*" ), TQChar( 0x2013 ) );
default:
{
if ( isStringKey )
@@ -560,15 +560,15 @@ namespace BibTeX
return token;
}
- void FileImporterBibTeX::unescapeLaTeXChars( QString &text )
+ void FileImporterBibTeX::unescapeLaTeXChars( TQString &text )
{
text.replace( "\\&", "&" );
}
- void FileImporterBibTeX::splitPersons( const QString& text, QStringList &persons )
+ void FileImporterBibTeX::splitPersons( const TQString& text, TQStringList &persons )
{
- QStringList wordList;
- QString word;
+ TQStringList wordList;
+ TQString word;
int bracketCounter = 0;
for ( unsigned int pos = 0;pos < text.length();++pos )
@@ -600,15 +600,15 @@ namespace BibTeX
void FileImporterBibTeX::evaluateParameterComments( iconv_t &iconvHandle, const char *cline )
{
- /** simple preliminary checks before expensive conversion to QString */
+ /** simple preliminary checks before expensive conversion to TQString */
if ( cline[0] == '@' && cline[1] == 'c' )
{
- QString line = QString( cline ).lower();
+ TQString line = TQString( cline ).lower();
/** check if this file requests a special encoding */
if ( line.startsWith( "@comment{x-kbibtex-encoding=" ) && line.endsWith( "}\n" ) )
{
- QString newEncoding = line.mid( 28, line.length() - 30 );
- qDebug( "x-kbibtex-encoding=<%s>", newEncoding.latin1() );
+ TQString newEncoding = line.mid( 28, line.length() - 30 );
+ tqDebug( "x-kbibtex-encoding=<%s>", newEncoding.latin1() );
if ( newEncoding == "latex" ) newEncoding = "utf-8";
iconv_close( iconvHandle );
iconvHandle = iconv_open( "utf-8", newEncoding.append( '\0' ).ascii() );
@@ -616,7 +616,7 @@ namespace BibTeX
}
}
- QChar FileImporterBibTeX::nextChar()
+ TQChar FileImporterBibTeX::nextChar()
{
bool atEndOfLine = m_posIntCurrentLine >= m_currentLine.length();
@@ -628,31 +628,31 @@ namespace BibTeX
}
if ( atEndOfLine )
- return QChar( ' ' );
+ return TQChar( ' ' );
else if ( m_posIntCurrentLine < m_currentLine.length() )
{
- QChar result = m_currentLine[m_posIntCurrentLine];
+ TQChar result = m_currentLine[m_posIntCurrentLine];
++m_posIntCurrentLine;
return result;
}
- return QChar();
+ return TQChar();
}
- QString FileImporterBibTeX::tokenidToString( Token token )
+ TQString FileImporterBibTeX::tokenidToString( Token token )
{
switch ( token )
{
- case tAt: return QString( "At" );
- case tBracketClose: return QString( "BracketClose" );
- case tBracketOpen: return QString( "BracketOpen" );
- case tAlphaNumText: return QString( "AlphaNumText" );
- case tAssign: return QString( "Assign" );
- case tComma: return QString( "Comma" );
- case tDoublecross: return QString( "Doublecross" );
- case tEOF: return QString( "EOF" );
- case tUnknown: return QString( "Unknown" );
- default: return QString( "<Unknown>" );
+ case tAt: return TQString( "At" );
+ case tBracketClose: return TQString( "BracketClose" );
+ case tBracketOpen: return TQString( "BracketOpen" );
+ case tAlphaNumText: return TQString( "AlphaNumText" );
+ case tAssign: return TQString( "Assign" );
+ case tComma: return TQString( "Comma" );
+ case tDoublecross: return TQString( "Doublecross" );
+ case tEOF: return TQString( "EOF" );
+ case tUnknown: return TQString( "Unknown" );
+ default: return TQString( "<Unknown>" );
}
}
}
diff --git a/src/fileimporterbibtex.h b/src/fileimporterbibtex.h
index 39ab911..a1dd89f 100644
--- a/src/fileimporterbibtex.h
+++ b/src/fileimporterbibtex.h
@@ -41,11 +41,11 @@ namespace BibTeX
class FileImporterBibTeX : public FileImporter
{
public:
- FileImporterBibTeX( bool personFirstNameFirst = FALSE, QString encoding = "latex" );
+ FileImporterBibTeX( bool personFirstNameFirst = FALSE, TQString encoding = "latex" );
~FileImporterBibTeX();
- File* load( QIODevice *iodevice );
- static bool guessCanDecode( const QString & text );
+ File* load( TQIODevice *iodevice );
+ static bool guessCanDecode( const TQString & text );
void setIgnoreComments( bool ignoreComments );
@@ -59,14 +59,14 @@ namespace BibTeX
};
bool cancelFlag;
- QTextStream *m_textStream;
+ TQTextStream *m_textStream;
bool m_personFirstNameFirst;
- QChar m_currentChar;
+ TQChar m_currentChar;
bool m_ignoreComments;
char *m_lineBuffer;
const int m_lineBufferSize;
- QString m_encoding;
- QString m_currentLine;
+ TQString m_encoding;
+ TQString m_currentLine;
unsigned int m_posIntCurrentLine;
int m_currentLineNumber;
@@ -74,21 +74,21 @@ namespace BibTeX
Comment *readPlainCommentElement();
Macro *readMacroElement();
Preamble *readPreambleElement();
- Entry *readEntryElement( const QString& typeString );
+ Entry *readEntryElement( const TQString& typeString );
Element *nextElement();
Token nextToken();
- QString readString( bool &isStringKey );
- QString readSimpleString( QChar until = '\0' );
- QString readQuotedString();
- QString readLine();
- QString readBracketString( const QChar openingBracket );
+ TQString readString( bool &isStringKey );
+ TQString readSimpleString( TQChar until = '\0' );
+ TQString readQuotedString();
+ TQString readLine();
+ TQString readBracketString( const TQChar openingBracket );
Token readValue( Value *value, EntryField::FieldType fieldType );
- void unescapeLaTeXChars( QString &text );
- void splitPersons( const QString& test, QStringList &persons );
+ void unescapeLaTeXChars( TQString &text );
+ void splitPersons( const TQString& test, TQStringList &persons );
void evaluateParameterComments( iconv_t &iconvHandle, const char *line );
- QChar nextChar();
- QString tokenidToString( Token token );
+ TQChar nextChar();
+ TQString tokenidToString( Token token );
};
}
diff --git a/src/fileimporterbibutils.cpp b/src/fileimporterbibutils.cpp
index bd2b622..52195b3 100644
--- a/src/fileimporterbibutils.cpp
+++ b/src/fileimporterbibutils.cpp
@@ -19,13 +19,13 @@
***************************************************************************/
#include <stdio.h>
-#include <qfile.h>
-#include <qdir.h>
-#include <qprocess.h>
-#include <qstringlist.h>
-#include <qbuffer.h>
-#include <qwaitcondition.h>
-#include <qapplication.h>
+#include <ntqfile.h>
+#include <ntqdir.h>
+#include <ntqprocess.h>
+#include <ntqstringlist.h>
+#include <ntqbuffer.h>
+#include <ntqwaitcondition.h>
+#include <ntqapplication.h>
#include <file.h>
#include <encoderlatex.h>
@@ -37,7 +37,7 @@ namespace BibTeX
FileImporterBibUtils::FileImporterBibUtils( BibTeX::File::FileFormat inputFormat )
: FileImporter(), m_workingDir( createTempDir() ), m_inputFormat( inputFormat ), m_bibTeXImporter( new FileImporterBibTeX( false, "utf-8" ) )
{
- m_processBuffer = new QBuffer();
+ m_processBuffer = new TQBuffer();
}
FileImporterBibUtils::~FileImporterBibUtils()
@@ -47,17 +47,17 @@ namespace BibTeX
delete m_bibTeXImporter;
}
- File* FileImporterBibUtils::load( QIODevice *iodevice )
+ File* FileImporterBibUtils::load( TQIODevice *iodevice )
{
m_cancelFlag = false;
if ( !iodevice->isReadable() )
{
- qDebug( "iodevice is not readable" );
+ tqDebug( "iodevice is not readable" );
return NULL;
}
if ( !iodevice->isOpen() )
{
- qDebug( "iodevice is not open" );
+ tqDebug( "iodevice is not open" );
return NULL;
}
@@ -67,12 +67,12 @@ namespace BibTeX
return xmlBufferToBibTeXFile();
}
- bool FileImporterBibUtils::guessCanDecode( const QString & text )
+ bool FileImporterBibUtils::guessCanDecode( const TQString & text )
{
return guessInputFormat( text ) != BibTeX::File::formatUndefined;
}
- File::FileFormat FileImporterBibUtils::guessInputFormat( const QString &text )
+ File::FileFormat FileImporterBibUtils::guessInputFormat( const TQString &text )
{
if ( text.find( "TY - " ) >= 0 )
return BibTeX::File::formatRIS;
@@ -90,37 +90,37 @@ namespace BibTeX
m_cancelFlag = true;
}
- bool FileImporterBibUtils::iodeviceToXMLbuffer( QIODevice *iodevice )
+ bool FileImporterBibUtils::iodeviceToXMLbuffer( TQIODevice *iodevice )
{
- QWaitCondition wc;
+ TQWaitCondition wc;
m_processBuffer->open( IO_WriteOnly );
m_process = NULL;
switch ( m_inputFormat )
{
case BibTeX::File::formatISI:
- m_process = new QProcess( QStringList::split( ' ', "isi2xml -i utf8 -u" ) );
+ m_process = new TQProcess( TQStringList::split( ' ', "isi2xml -i utf8 -u" ) );
break;
case BibTeX::File::formatWordBib:
- m_process = new QProcess( QStringList::split( ' ', "wordbib2xml -i utf8 -u" ) );
+ m_process = new TQProcess( TQStringList::split( ' ', "wordbib2xml -i utf8 -u" ) );
break;
case BibTeX::File::formatAds:
- m_process = new QProcess( QStringList::split( ' ', "ads2xml -i utf8 -u" ) );
+ m_process = new TQProcess( TQStringList::split( ' ', "ads2xml -i utf8 -u" ) );
break;
case BibTeX::File::formatEndNote:
- m_process = new QProcess( QStringList::split( ' ', "end2xml -i utf8 -u" ) );
+ m_process = new TQProcess( TQStringList::split( ' ', "end2xml -i utf8 -u" ) );
break;
case BibTeX::File::formatEndNoteXML:
- m_process = new QProcess( QStringList::split( ' ', "endx2xml -i utf8 -u" ) );
+ m_process = new TQProcess( TQStringList::split( ' ', "endx2xml -i utf8 -u" ) );
break;
case BibTeX::File::formatRIS:
- m_process = new QProcess( QStringList::split( ' ', "ris2xml -i utf8 -u" ) );
+ m_process = new TQProcess( TQStringList::split( ' ', "ris2xml -i utf8 -u" ) );
break;
case BibTeX::File::formatMODS:
/* m_process = NULL; */
break;
default:
- qDebug( "Cannot handle input format %i", m_inputFormat );
+ tqDebug( "Cannot handle input format %i", m_inputFormat );
return false;
}
@@ -134,16 +134,16 @@ namespace BibTeX
m_process->start();
if ( m_process->isRunning() )
{
- QByteArray inData = iodevice->readAll();
+ TQByteArray inData = iodevice->readAll();
m_process->writeToStdin( inData );
- qApp->processEvents();
+ tqApp->processEvents();
m_process->closeStdin();
int nothingHappens = 20;
while ( m_waiting )
{
wc.wait( 250 );
- qApp->processEvents();
+ tqApp->processEvents();
--nothingHappens;
}
@@ -152,14 +152,14 @@ namespace BibTeX
if ( !m_process->normalExit() )
{
- qDebug( "%s did not exit in a clean fashion", m_process->arguments()[0].latin1() );
+ tqDebug( "%s did not exit in a clean fashion", m_process->arguments()[0].latin1() );
delete m_process;
return false;
}
}
else
{
- qDebug( "%s did not start", m_process->arguments()[0].latin1() );
+ tqDebug( "%s did not start", m_process->arguments()[0].latin1() );
delete m_process;
return false;
}
@@ -177,22 +177,22 @@ namespace BibTeX
BibTeX::File* FileImporterBibUtils::xmlBufferToBibTeXFile()
{
- QWaitCondition wc;
+ TQWaitCondition wc;
m_waiting = true;
- m_process = new QProcess( QStringList::split( ' ', "xml2bib -i utf8 -o utf8 -sk" ) );
+ m_process = new TQProcess( TQStringList::split( ' ', "xml2bib -i utf8 -o utf8 -sk" ) );
connect( m_process, SIGNAL( processExited() ), this, SLOT( wakeUp() ) );
connect( m_process, SIGNAL( readyReadStdout() ), this, SLOT( slotReadyStdout() ) );
connect( m_process, SIGNAL( readyReadStderr() ), this, SLOT( slotReadyStderr() ) );
if ( m_process->start() )
{
- QBuffer *tempBuffer = m_processBuffer;
- m_processBuffer = new QBuffer();
+ TQBuffer *tempBuffer = m_processBuffer;
+ m_processBuffer = new TQBuffer();
tempBuffer->open( IO_ReadOnly );
m_process->writeToStdin( tempBuffer->readAll() );
- qApp->processEvents();
+ tqApp->processEvents();
m_process->closeStdin();
tempBuffer->close();
@@ -201,7 +201,7 @@ namespace BibTeX
while ( m_waiting )
{
wc.wait( 250 );
- qApp->processEvents();
+ tqApp->processEvents();
--nothingHappens;
}
m_processBuffer->close();
@@ -234,20 +234,20 @@ namespace BibTeX
return NULL;
}
- QString FileImporterBibUtils::createTempDir()
+ TQString FileImporterBibUtils::createTempDir()
{
- QString result = QString::null;
- QFile *devrandom = new QFile( "/dev/random" );
+ TQString result = TQString::null;
+ TQFile *devrandom = new TQFile( "/dev/random" );
if ( devrandom->open( IO_ReadOnly ) )
{
- Q_UINT32 randomNumber;
+ TQ_UINT32 randomNumber;
if ( devrandom->readBlock(( char* ) & randomNumber, sizeof( randomNumber ) ) > 0 )
{
randomNumber |= 0x10000000;
- result = QString( "/tmp/bibtex-%1" ).arg( randomNumber, sizeof( randomNumber ) * 2, 16 );
- if ( !QDir().mkdir( result ) )
- result = QString::null;
+ result = TQString( "/tmp/bibtex-%1" ).arg( randomNumber, sizeof( randomNumber ) * 2, 16 );
+ if ( !TQDir().mkdir( result ) )
+ result = TQString::null;
}
devrandom->close();
}
@@ -257,20 +257,20 @@ namespace BibTeX
return result;
}
- void FileImporterBibUtils::deleteTempDir( const QString& directory )
+ void FileImporterBibUtils::deleteTempDir( const TQString& directory )
{
- QDir dir = QDir( directory );
- QStringList subDirs = dir.entryList( QDir::Dirs );
- for ( QStringList::Iterator it = subDirs.begin(); it != subDirs.end(); it++ )
+ TQDir dir = TQDir( directory );
+ TQStringList subDirs = dir.entryList( TQDir::Dirs );
+ for ( TQStringList::Iterator it = subDirs.begin(); it != subDirs.end(); it++ )
{
- if (( QString::compare( *it, "." ) != 0 ) && ( QString::compare( *it, ".." ) != 0 ) )
+ if (( TQString::compare( *it, "." ) != 0 ) && ( TQString::compare( *it, ".." ) != 0 ) )
deleteTempDir( *it );
}
- QStringList allEntries = dir.entryList( QDir::All );
- for ( QStringList::Iterator it = allEntries.begin(); it != allEntries.end(); it++ )
+ TQStringList allEntries = dir.entryList( TQDir::All );
+ for ( TQStringList::Iterator it = allEntries.begin(); it != allEntries.end(); it++ )
dir.remove( *it );
- QDir().rmdir( directory );
+ TQDir().rmdir( directory );
}
void FileImporterBibUtils::wakeUp()
@@ -285,10 +285,10 @@ namespace BibTeX
void FileImporterBibUtils::slotReadyStderr()
{
- QByteArray ba = m_process->readStderr();
- QTextStream bats( ba, IO_ReadOnly );
- bats.setEncoding( QTextStream::UnicodeUTF8 );
- qDebug( "%s", bats.read().latin1() );
+ TQByteArray ba = m_process->readStderr();
+ TQTextStream bats( ba, IO_ReadOnly );
+ bats.setEncoding( TQTextStream::UnicodeUTF8 );
+ tqDebug( "%s", bats.read().latin1() );
}
}
diff --git a/src/fileimporterbibutils.h b/src/fileimporterbibutils.h
index 8fd0635..11d06e7 100644
--- a/src/fileimporterbibutils.h
+++ b/src/fileimporterbibutils.h
@@ -24,7 +24,7 @@
#include <fileimporter.h>
#include <fileimporterbibtex.h>
-class QBuffer;
+class TQBuffer;
namespace BibTeX
{
@@ -39,27 +39,27 @@ namespace BibTeX
FileImporterBibUtils( BibTeX::File::FileFormat inputFormat );
~FileImporterBibUtils();
- File* load( QIODevice *iodevice );
- static bool guessCanDecode( const QString & text );
- static File::FileFormat guessInputFormat( const QString &text );
+ File* load( TQIODevice *iodevice );
+ static bool guessCanDecode( const TQString & text );
+ static File::FileFormat guessInputFormat( const TQString &text );
public slots:
void cancel();
private:
bool m_cancelFlag;
- QString m_workingDir;
+ TQString m_workingDir;
BibTeX::File::FileFormat m_inputFormat;
FileImporterBibTeX *m_bibTeXImporter;
bool m_waiting;
- QProcess *m_process;
- QBuffer *m_processBuffer;
+ TQProcess *m_process;
+ TQBuffer *m_processBuffer;
- bool iodeviceToXMLbuffer( QIODevice *iodevice );
+ bool iodeviceToXMLbuffer( TQIODevice *iodevice );
File* xmlBufferToBibTeXFile();
- QString createTempDir();
- void deleteTempDir( const QString& directory );
+ TQString createTempDir();
+ void deleteTempDir( const TQString& directory );
private slots:
void wakeUp();
diff --git a/src/fileimporterexternal.cpp b/src/fileimporterexternal.cpp
index 3b23946..814f81d 100644
--- a/src/fileimporterexternal.cpp
+++ b/src/fileimporterexternal.cpp
@@ -17,10 +17,10 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qprocess.h>
-#include <qwaitcondition.h>
-#include <qapplication.h>
-#include <qbuffer.h>
+#include <ntqprocess.h>
+#include <ntqwaitcondition.h>
+#include <ntqapplication.h>
+#include <ntqbuffer.h>
#include <fileimporterbibtex.h>
#include "fileimporterexternal.h"
@@ -31,7 +31,7 @@ namespace BibTeX
FileImporterExternal::FileImporterExternal( Importer importer, File::FileFormat fileformat )
: FileImporter(), m_importer( importer ), m_fileformat( fileformat )
{
- wc = new QWaitCondition();
+ wc = new TQWaitCondition();
}
@@ -40,11 +40,11 @@ namespace BibTeX
delete wc;
}
- File* FileImporterExternal::load( QIODevice *iodevice )
+ File* FileImporterExternal::load( TQIODevice *iodevice )
{
m_mutex.lock();
File * result = NULL;
- QBuffer buffer;
+ TQBuffer buffer;
if ( fetchInput( iodevice, buffer ) )
{
@@ -65,25 +65,25 @@ namespace BibTeX
process->kill();
}
- bool FileImporterExternal::fetchInput( QIODevice *input, QBuffer &output )
+ bool FileImporterExternal::fetchInput( TQIODevice *input, TQBuffer &output )
{
bool result = FALSE;
- QString commandLine;
+ TQString commandLine;
switch ( m_fileformat )
{
default:
return FALSE;
}
- QStringList args = QStringList::split( ' ', commandLine );
+ TQStringList args = TQStringList::split( ' ', commandLine );
output.open( IO_WriteOnly );
- writeTo = new QTextStream( &output );
- writeTo->setEncoding( QTextStream::UnicodeUTF8 );
+ writeTo = new TQTextStream( &output );
+ writeTo->setEncoding( TQTextStream::UnicodeUTF8 );
- QApplication::setOverrideCursor( Qt::waitCursor );
+ TQApplication::setOverrideCursor( TQt::waitCursor );
- process = new QProcess( args );
+ process = new TQProcess( args );
connect( process, SIGNAL( processExited() ), this, SLOT( slotProcessExited() ) );
connect( process, SIGNAL( readyReadStdout() ), this, SLOT( slotReadProcessOutput() ) );
connect( process, SIGNAL( readyReadStderr() ), this, SLOT( slotReadProcessOutput() ) );
@@ -94,16 +94,16 @@ namespace BibTeX
while ( !process->isRunning() )
{
wc->wait( 250 );
- qApp->processEvents();
+ tqApp->processEvents();
}
- qApp->processEvents();
- QByteArray buf = input->readAll();
+ tqApp->processEvents();
+ TQByteArray buf = input->readAll();
process->writeToStdin( buf );
- qApp->processEvents();
+ tqApp->processEvents();
while ( process->isRunning() )
{
wc->wait( 250 );
- qApp->processEvents();
+ tqApp->processEvents();
}
result = process->normalExit();
@@ -119,7 +119,7 @@ namespace BibTeX
writeTo = NULL;
output.close();
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
return result;
}
@@ -133,8 +133,8 @@ namespace BibTeX
if ( writeTo != NULL )
while ( process->canReadLineStdout() )
{
- QString line = process->readLineStdout();
- // qDebug( "line=%s", line.latin1() );
+ TQString line = process->readLineStdout();
+ // tqDebug( "line=%s", line.latin1() );
( *writeTo ) << line.latin1();
( *writeTo ) << endl;
}
diff --git a/src/fileimporterexternal.h b/src/fileimporterexternal.h
index 423ee45..e9de4a5 100644
--- a/src/fileimporterexternal.h
+++ b/src/fileimporterexternal.h
@@ -24,8 +24,8 @@
#include <file.h>
#include <settings.h>
-class QWaitCondition;
-class QProcess;
+class TQWaitCondition;
+class TQProcess;
namespace BibTeX
{
@@ -42,9 +42,9 @@ namespace BibTeX
FileImporterExternal( Importer importer, File::FileFormat fileformat );
~FileImporterExternal();
- File* load( QIODevice *iodevice );
+ File* load( TQIODevice *iodevice );
// FIXME: this is a stub:
- static bool guessCanDecode( const QString & )
+ static bool guessCanDecode( const TQString & )
{
return TRUE;
};
@@ -53,13 +53,13 @@ namespace BibTeX
void cancel();
private:
- QWaitCondition *wc;
- QProcess *process;
- QTextStream *writeTo;
+ TQWaitCondition *wc;
+ TQProcess *process;
+ TQTextStream *writeTo;
Importer m_importer;
File::FileFormat m_fileformat;
- bool fetchInput( QIODevice *input, QBuffer &output );
+ bool fetchInput( TQIODevice *input, TQBuffer &output );
private slots:
void slotProcessExited();
diff --git a/src/fileimporterris.cpp b/src/fileimporterris.cpp
index 0e5e3da..2970095 100644
--- a/src/fileimporterris.cpp
+++ b/src/fileimporterris.cpp
@@ -17,9 +17,9 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qapplication.h>
-#include <qtextstream.h>
-#include <qregexp.h>
+#include <ntqapplication.h>
+#include <ntqtextstream.h>
+#include <ntqregexp.h>
#include <entry.h>
@@ -39,23 +39,23 @@ namespace BibTeX
// TODO
}
- File* FileImporterRIS::load( QIODevice *iodevice )
+ File* FileImporterRIS::load( TQIODevice *iodevice )
{
m_mutex.lock();
cancelFlag = FALSE;
m_refNr = 0;
- QTextStream textStream( iodevice );
+ TQTextStream textStream( iodevice );
File *result = new File();
- QIODevice *streamDevice = textStream.device();
+ TQIODevice *streamDevice = textStream.device();
while ( !cancelFlag && !textStream.atEnd() )
{
emit progress( streamDevice->at(), streamDevice->size() );
- qApp->processEvents();
+ tqApp->processEvents();
Element * element = nextElement( textStream );
if ( element != NULL )
result->appendElement( element );
- qApp->processEvents();
+ tqApp->processEvents();
}
emit progress( streamDevice->size(), streamDevice->size() );
@@ -69,7 +69,7 @@ namespace BibTeX
return result;
}
- bool FileImporterRIS::guessCanDecode( const QString & text )
+ bool FileImporterRIS::guessCanDecode( const TQString & text )
{
return text.find( "TY - " ) >= 0;
}
@@ -79,16 +79,16 @@ namespace BibTeX
cancelFlag = TRUE;
}
- Element *FileImporterRIS::nextElement( QTextStream &textStream )
+ Element *FileImporterRIS::nextElement( TQTextStream &textStream )
{
RISitemList list = readElement( textStream );
if ( list.empty() )
return NULL;
Entry::EntryType entryType = Entry::etMisc;
- Entry *entry = new Entry( entryType, QString( "RIS_%1" ).arg( m_refNr++ ) );
- QStringList authorList, editorList, keywordList;
- QString journalName, abstract, startPage, endPage, date;
+ Entry *entry = new Entry( entryType, TQString( "RIS_%1" ).arg( m_refNr++ ) );
+ TQStringList authorList, editorList, keywordList;
+ TQString journalName, abstract, startPage, endPage, date;
int fieldNr = 0;
for ( RISitemList::iterator it = list.begin(); it != list.end(); ++it )
@@ -153,16 +153,16 @@ namespace BibTeX
}
else if (( *it ).key == "KW" )
{
- QString text = ( *it ).value;
- QRegExp splitRegExp;
+ TQString text = ( *it ).value;
+ TQRegExp splitRegExp;
if ( text.contains( ";" ) )
- splitRegExp = QRegExp( "\\s*[;\\n]\\s*" );
+ splitRegExp = TQRegExp( "\\s*[;\\n]\\s*" );
else if ( text.contains( "," ) )
- splitRegExp = QRegExp( "\\s*[,\\n]\\s*" );
+ splitRegExp = TQRegExp( "\\s*[,\\n]\\s*" );
else
- splitRegExp = QRegExp( "\\n" );
- QStringList newKeywords = QStringList::split( splitRegExp, text, FALSE );
- for ( QStringList::Iterator it = newKeywords.begin(); it != newKeywords.end();
+ splitRegExp = TQRegExp( "\\n" );
+ TQStringList newKeywords = TQStringList::split( splitRegExp, text, FALSE );
+ for ( TQStringList::Iterator it = newKeywords.begin(); it != newKeywords.end();
++it )
keywordList.append( *it );
}
@@ -331,7 +331,7 @@ namespace BibTeX
}
else
{
- QString fieldName = QString( "RISfield_%1_%2" ).arg( fieldNr++ ).arg(( *it ).key.left( 2 ) );
+ TQString fieldName = TQString( "RISfield_%1_%2" ).arg( fieldNr++ ).arg(( *it ).key.left( 2 ) );
BibTeX::EntryField * field = new BibTeX::EntryField( fieldName );
entry->addField( field );
BibTeX::Value *value = new BibTeX::Value();
@@ -351,7 +351,7 @@ namespace BibTeX
BibTeX::Value *value = new BibTeX::Value();
BibTeX::PersonContainer *container = new BibTeX::PersonContainer();
value->items.append( container );
- for ( QStringList::Iterator pit = authorList.begin(); pit != authorList.end();++pit )
+ for ( TQStringList::Iterator pit = authorList.begin(); pit != authorList.end();++pit )
container->persons.append( new BibTeX::Person( *pit ) );
field->setValue( value );
}
@@ -367,7 +367,7 @@ namespace BibTeX
BibTeX::Value *value = new BibTeX::Value();
BibTeX::PersonContainer *container = new BibTeX::PersonContainer();
value->items.append( container );
- for ( QStringList::Iterator pit = authorList.begin(); pit != authorList.end();++pit )
+ for ( TQStringList::Iterator pit = authorList.begin(); pit != authorList.end();++pit )
container->persons.append( new BibTeX::Person( *pit ) );
field->setValue( value );
}
@@ -383,7 +383,7 @@ namespace BibTeX
BibTeX::Value *value = new BibTeX::Value();
BibTeX::KeywordContainer *container = new BibTeX::KeywordContainer();
value->items.append( container );
- for ( QStringList::Iterator pit = keywordList.begin(); pit != keywordList.end();++pit )
+ for ( TQStringList::Iterator pit = keywordList.begin(); pit != keywordList.end();++pit )
container->keywords.append( new BibTeX::Keyword( *pit ) );
field->setValue( value );
}
@@ -422,20 +422,20 @@ namespace BibTeX
field = new BibTeX::EntryField( BibTeX::EntryField::ftPages );
entry->addField( field );
}
- QString page;
+ TQString page;
if ( startPage.isEmpty() )
page = endPage;
else if ( endPage.isEmpty() )
page = startPage;
else
- page = startPage + QChar( 0x2013 ) + endPage;
+ page = startPage + TQChar( 0x2013 ) + endPage;
BibTeX::Value *value = new BibTeX::Value();
value->items.append( new BibTeX::PlainText( page ) );
field->setValue( value );
}
- QStringList dateFragments = QStringList::split( "/", date );
+ TQStringList dateFragments = TQStringList::split( "/", date );
if ( dateFragments.count() > 0 )
{
bool ok;
@@ -449,7 +449,7 @@ namespace BibTeX
entry->addField( field );
}
BibTeX::Value *value = new BibTeX::Value();
- value->items.append( new BibTeX::PlainText( QString::number( year ) ) );
+ value->items.append( new BibTeX::PlainText( TQString::number( year ) ) );
field->setValue( value );
}
}
@@ -466,7 +466,7 @@ namespace BibTeX
entry->addField( field );
}
BibTeX::Value *value = new BibTeX::Value();
- value->items.append( new BibTeX::PlainText( QString::number( month ) ) );
+ value->items.append( new BibTeX::PlainText( TQString::number( month ) ) );
field->setValue( value );
}
}
@@ -474,16 +474,16 @@ namespace BibTeX
return entry;
}
- FileImporterRIS::RISitemList FileImporterRIS::readElement( QTextStream &textStream )
+ FileImporterRIS::RISitemList FileImporterRIS::readElement( TQTextStream &textStream )
{
RISitemList result;
- QString line = textStream.readLine();
+ TQString line = textStream.readLine();
while ( !line.startsWith( "TY - " ) && !textStream.eof() )
line = textStream.readLine();
if ( textStream.eof() )
return result;
- QString key, value;
+ TQString key, value;
while ( !line.startsWith( "ER -" ) && !textStream.eof() )
{
if ( line.mid( 2, 3 ) == " -" )
diff --git a/src/fileimporterris.h b/src/fileimporterris.h
index 11c52e9..ba204f1 100644
--- a/src/fileimporterris.h
+++ b/src/fileimporterris.h
@@ -23,7 +23,7 @@
#include <fileimporter.h>
#include <entry.h>
-class QTextStream;
+class TQTextStream;
namespace BibTeX
{
@@ -37,8 +37,8 @@ namespace BibTeX
FileImporterRIS();
~FileImporterRIS();
- File* load( QIODevice *iodevice );
- static bool guessCanDecode( const QString & text );
+ File* load( TQIODevice *iodevice );
+ static bool guessCanDecode( const TQString & text );
public slots:
void cancel();
@@ -46,17 +46,17 @@ namespace BibTeX
private:
typedef struct
{
- QString key;
- QString value;
+ TQString key;
+ TQString value;
}
RISitem;
- typedef QValueList<RISitem> RISitemList;
+ typedef TQValueList<RISitem> RISitemList;
bool cancelFlag;
int m_refNr;
- Element *nextElement( QTextStream &textStream );
- RISitemList readElement( QTextStream &textStream );
+ Element *nextElement( TQTextStream &textStream );
+ RISitemList readElement( TQTextStream &textStream );
};
}
diff --git a/src/findduplicates.cpp b/src/findduplicates.cpp
index ddcf5a8..0fd937b 100644
--- a/src/findduplicates.cpp
+++ b/src/findduplicates.cpp
@@ -19,10 +19,10 @@
***************************************************************************/
#include <math.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qregexp.h>
-#include <qapplication.h>
+#include <ntqstring.h>
+#include <ntqstringlist.h>
+#include <ntqregexp.h>
+#include <ntqapplication.h>
#include <kdebug.h>
#include <klocale.h>
@@ -43,8 +43,8 @@ namespace KBibTeX
{
const unsigned int FindDuplicates::maxDistance = 0xffffff;
- FindDuplicates::FindDuplicates( DuplicateCliqueList &result, unsigned int sensitivity, BibTeX::File *file, QWidget *parent )
- : QObject( NULL, NULL ), m_doCancel( false )
+ FindDuplicates::FindDuplicates( DuplicateCliqueList &result, unsigned int sensitivity, BibTeX::File *file, TQWidget *parent )
+ : TQObject( NULL, NULL ), m_doCancel( false )
{
if ( file->count() < 2 )
return;
@@ -52,9 +52,9 @@ namespace KBibTeX
int len = file->count() * ( file->count() - 1 ) / 2;
unsigned int *distVector = new unsigned int[len];
memset( distVector, 0xff, sizeof( unsigned int )*len );
- QMap<BibTeX::Element*, int> mapElementToIndex;
+ TQMap<BibTeX::Element*, int> mapElementToIndex;
- QApplication::setOverrideCursor( Qt::waitCursor );
+ TQApplication::setOverrideCursor( TQt::waitCursor );
KProgressDialog *progDlg = new KProgressDialog( parent, NULL, i18n( "Find Duplicates" ), i18n( "Searching for duplicates..." ), true );
connect( progDlg, SIGNAL( cancelClicked() ), this, SLOT( slotCancel() ) );
progDlg->progressBar()->setTotalSteps( len );
@@ -67,7 +67,7 @@ namespace KBibTeX
delete progDlg;
delete[] distVector;
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
/**
@@ -79,7 +79,7 @@ namespace KBibTeX
* @param mapElementToIndex map from elements to indices (will be written)
* @param progDlg progress dialog to write status information to
*/
- void FindDuplicates::determineDistances( BibTeX::File *file, unsigned int *distVector, QMap<BibTeX::Element*, int> &mapElementToIndex, KProgressDialog *progDlg )
+ void FindDuplicates::determineDistances( BibTeX::File *file, unsigned int *distVector, TQMap<BibTeX::Element*, int> &mapElementToIndex, KProgressDialog *progDlg )
{
int progress = 0, i = 0;
for ( BibTeX::File::ElementList::ConstIterator it1 = file->constBegin(); !m_doCancel && it1 != file->constEnd(); ++it1, ++i )
@@ -99,7 +99,7 @@ namespace KBibTeX
distVector[arrayOffset( i, j )] = d;
progDlg->progressBar()->setValue( ++progress );
- qApp->processEvents();
+ tqApp->processEvents();
}
}
else
@@ -118,7 +118,7 @@ namespace KBibTeX
distVector[arrayOffset( i, j )] = macroDistance( macroA, macroB );
progDlg->progressBar()->setValue( ++progress );
- qApp->processEvents();
+ tqApp->processEvents();
}
}
else
@@ -137,7 +137,7 @@ namespace KBibTeX
distVector[arrayOffset( i, j )] = preambleDistance( preambleA, preambleB );
progDlg->progressBar()->setValue( ++progress );
- qApp->processEvents();
+ tqApp->processEvents();
}
}
}
@@ -155,12 +155,12 @@ namespace KBibTeX
* @param mapElementToIndex map from elements to indices
* @param sensitivity sensitivity threshold value
*/
- void FindDuplicates::buildClique( DuplicateCliqueList &cliqueList, BibTeX::File *file, unsigned int *distVector, QMap<BibTeX::Element*, int> &mapElementToIndex, unsigned int sensitivity )
+ void FindDuplicates::buildClique( DuplicateCliqueList &cliqueList, BibTeX::File *file, unsigned int *distVector, TQMap<BibTeX::Element*, int> &mapElementToIndex, unsigned int sensitivity )
{
int usedLen = file->count();
bool* used = new bool[usedLen];
memset( used, false, sizeof( bool ) * usedLen );
- QValueList<BibTeX::Element*> queue;
+ TQValueList<BibTeX::Element*> queue;
for ( BibTeX::File::ElementList::ConstIterator it1 = file->constBegin(); it1 != file->constEnd(); ++it1 )
{
/** current element must be either entry, preamble, or macro */
@@ -258,11 +258,11 @@ namespace KBibTeX
* @param t second sentence
* @return distance between both sentences
*/
- double FindDuplicates::levenshteinDistance( const QString &s, const QString &t )
+ double FindDuplicates::levenshteinDistance( const TQString &s, const TQString &t )
{
- const QRegExp nonWordRegExp( "[^a-zA-Z']+" );
- if ( s == QString::null || t == QString::null ) return 1.0;
- return levenshteinDistance( QStringList::split( nonWordRegExp, s ), QStringList::split( nonWordRegExp, t ) );
+ const TQRegExp nonWordRegExp( "[^a-zA-Z']+" );
+ if ( s == TQString::null || t == TQString::null ) return 1.0;
+ return levenshteinDistance( TQStringList::split( nonWordRegExp, s ), TQStringList::split( nonWordRegExp, t ) );
}
/**
@@ -272,9 +272,9 @@ namespace KBibTeX
* @param t second word
* @return distance between both words
*/
- double FindDuplicates::levenshteinDistanceWord( const QString &s, const QString &t )
+ double FindDuplicates::levenshteinDistanceWord( const TQString &s, const TQString &t )
{
- QString mys = s.lower(), myt = t.lower();
+ TQString mys = s.lower(), myt = t.lower();
int m = s.length(), n = t.length();
if ( m < 1 && n < 1 ) return 0.0;
if ( m < 1 || n < 1 ) return 1.0;
@@ -309,7 +309,7 @@ namespace KBibTeX
* @param t second sentence
* @return distance between both sentences
*/
- double FindDuplicates::levenshteinDistance( const QStringList &s, const QStringList &t )
+ double FindDuplicates::levenshteinDistance( const TQStringList &s, const TQStringList &t )
{
int m = s.size(), n = t.size();
if ( m < 1 && n < 1 ) return 0.0;
@@ -358,17 +358,17 @@ namespace KBibTeX
/**
* Determine title for a given entry
*/
- QString FindDuplicates::extractTitle( BibTeX::Entry *entry )
+ TQString FindDuplicates::extractTitle( BibTeX::Entry *entry )
{
/** retrieve field holding title information for entry */
BibTeX::EntryField *field = entry->getField( BibTeX::EntryField::ftTitle );
if ( field == NULL )
- return QString::null; /** no title field available */
+ return TQString::null; /** no title field available */
/** *fetch value item holding title */
BibTeX::ValueItem *valueItem = field->value()->items.isEmpty() ? NULL : field->value()->items.first();
if ( valueItem == NULL )
- return QString::null; /** no value item found or is empty */
+ return TQString::null; /** no value item found or is empty */
return valueItem->text(); // TODO: Perform some postprocessing?
}
@@ -376,9 +376,9 @@ namespace KBibTeX
/**
* Determine list of authors for a given entry
*/
- QStringList FindDuplicates::authorsLastName( BibTeX::Entry *entry )
+ TQStringList FindDuplicates::authorsLastName( BibTeX::Entry *entry )
{
- QStringList result;
+ TQStringList result;
/** retrieve field holding authors information for entry */
BibTeX::EntryField *field = entry->getField( BibTeX::EntryField::ftAuthor );
@@ -391,7 +391,7 @@ namespace KBibTeX
return result; /** container not found or is empty */
/** iterate through container and fetch each author's last name */
- for ( QValueList<BibTeX::Person*>::ConstIterator it = personContainer->persons.begin(); it != personContainer->persons.end(); ++it )
+ for ( TQValueList<BibTeX::Person*>::ConstIterator it = personContainer->persons.begin(); it != personContainer->persons.end(); ++it )
result.append(( *it )->lastName() );
return result;
@@ -414,7 +414,7 @@ namespace KBibTeX
/** parse value item's text */
bool ok = FALSE;
- int year = QString( valueItem->text() ).toInt( &ok );
+ int year = TQString( valueItem->text() ).toInt( &ok );
if ( !ok ) year = -1;
return year;
@@ -423,7 +423,7 @@ namespace KBibTeX
/**
* Determine key from a given macro
*/
- QString FindDuplicates::extractMacroKey( BibTeX::Macro *macro )
+ TQString FindDuplicates::extractMacroKey( BibTeX::Macro *macro )
{
return macro->key();
}
@@ -431,7 +431,7 @@ namespace KBibTeX
/**
* Determine key from a given macro
*/
- QString FindDuplicates::extractMacroValue( BibTeX::Macro *macro )
+ TQString FindDuplicates::extractMacroValue( BibTeX::Macro *macro )
{
return macro->value()->text();
}
diff --git a/src/findduplicates.h b/src/findduplicates.h
index e1a2fce..c11dcf3 100644
--- a/src/findduplicates.h
+++ b/src/findduplicates.h
@@ -20,10 +20,10 @@
#ifndef KBIBTEXFINDDUPLICATES_H
#define KBIBTEXFINDDUPLICATES_H
-#include <qobject.h>
+#include <ntqobject.h>
class KProgressDialog;
-class QWidget;
+class TQWidget;
namespace KBibTeX
{
@@ -31,12 +31,12 @@ namespace KBibTeX
/**
@author Thomas Fischer <fischer@unix-ag.uni-kl.de>
*/
- class FindDuplicates : public QObject
+ class FindDuplicates : public TQObject
{
Q_OBJECT
public:
- typedef QValueList<BibTeX::Element*> DuplicateClique;
- typedef QValueList<DuplicateClique> DuplicateCliqueList;
+ typedef TQValueList<BibTeX::Element*> DuplicateClique;
+ typedef TQValueList<DuplicateClique> DuplicateCliqueList;
/**
* Find duplicates in a given BibTeX file. The sensitivity parameter controls the distance between two elements where both elements are considered to be duplicates. The parent object is used as a progress dialog's parent.
@@ -45,7 +45,7 @@ namespace KBibTeX
* @param parent
* @return
*/
- FindDuplicates( DuplicateCliqueList &result, unsigned int sensitivity, BibTeX::File *file, QWidget *parent );
+ FindDuplicates( DuplicateCliqueList &result, unsigned int sensitivity, BibTeX::File *file, TQWidget *parent );
~FindDuplicates();
@@ -55,24 +55,24 @@ namespace KBibTeX
static const unsigned int maxDistance;
protected:
- void determineDistances( BibTeX::File *file, unsigned int *distVector, QMap<BibTeX::Element*, int> &mapElementToIndex, KProgressDialog *progDlg );
- void buildClique( DuplicateCliqueList &result, BibTeX::File *file, unsigned int *distVector, QMap<BibTeX::Element*, int> &mapElementToIndex, unsigned int sensitivity );
+ void determineDistances( BibTeX::File *file, unsigned int *distVector, TQMap<BibTeX::Element*, int> &mapElementToIndex, KProgressDialog *progDlg );
+ void buildClique( DuplicateCliqueList &result, BibTeX::File *file, unsigned int *distVector, TQMap<BibTeX::Element*, int> &mapElementToIndex, unsigned int sensitivity );
unsigned int entryDistance( BibTeX::Entry *entryA, BibTeX::Entry *entryB );
unsigned int macroDistance( BibTeX::Macro *macroA, BibTeX::Macro *macroB );
unsigned int preambleDistance( BibTeX::Preamble *preambleA, BibTeX::Preamble *preambleB );
- static QString extractTitle( BibTeX::Entry *entry );
- static QStringList authorsLastName( BibTeX::Entry *entry );
+ static TQString extractTitle( BibTeX::Entry *entry );
+ static TQStringList authorsLastName( BibTeX::Entry *entry );
static int extractYear( BibTeX::Entry *entry );
- static QString extractMacroKey( BibTeX::Macro *macro );
- static QString extractMacroValue( BibTeX::Macro *macro );
+ static TQString extractMacroKey( BibTeX::Macro *macro );
+ static TQString extractMacroValue( BibTeX::Macro *macro );
private:
bool m_doCancel;
- double levenshteinDistance( const QStringList &s, const QStringList &t );
- double levenshteinDistance( const QString &s, const QString &t );
- double levenshteinDistanceWord( const QString &s, const QString &t );
+ double levenshteinDistance( const TQStringList &s, const TQStringList &t );
+ double levenshteinDistance( const TQString &s, const TQString &t );
+ double levenshteinDistanceWord( const TQString &s, const TQString &t );
int arrayOffset( int a, int b );
void sort( unsigned int *array, int len );
diff --git a/src/idsuggestions.cpp b/src/idsuggestions.cpp
index 5704c1e..05d8a11 100644
--- a/src/idsuggestions.cpp
+++ b/src/idsuggestions.cpp
@@ -17,7 +17,7 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qregexp.h>
+#include <ntqregexp.h>
#include <klocale.h>
@@ -29,7 +29,7 @@
namespace KBibTeX
{
- const QRegExp IdSuggestions::unwantedChars = QRegExp( "[^-_:/=+a-zA-Z0-9]+" );
+ const TQRegExp IdSuggestions::unwantedChars = TQRegExp( "[^-_:/=+a-zA-Z0-9]+" );
IdSuggestions::IdSuggestions()
{
@@ -45,9 +45,9 @@ namespace KBibTeX
/**
* Determine list of authors or editors for a given entry
*/
- QStringList IdSuggestions::authorsLastName( BibTeX::Entry *entry )
+ TQStringList IdSuggestions::authorsLastName( BibTeX::Entry *entry )
{
- QStringList result;
+ TQStringList result;
/** retrieve field holding authors information for entry */
BibTeX::EntryField *field = entry->getField( BibTeX::EntryField::ftAuthor );
@@ -68,7 +68,7 @@ namespace KBibTeX
return result; /** container not found or is empty */
/** iterate through container and fetch each author's last name */
- for ( QValueList<BibTeX::Person*>::ConstIterator it = personContainer->persons.begin(); it != personContainer->persons.end(); ++it )
+ for ( TQValueList<BibTeX::Person*>::ConstIterator it = personContainer->persons.begin(); it != personContainer->persons.end(); ++it )
{
result.append( normalizeText(( *it )->lastName() ) );
}
@@ -80,26 +80,26 @@ namespace KBibTeX
* Normalize a given text by removing spaces or other unwanted characters,
* replace some accented and special characters by plain ASCII transliterations
*/
- QString IdSuggestions::normalizeText( const QString& text )
+ TQString IdSuggestions::normalizeText( const TQString& text )
{
- QString result = text;
+ TQString result = text;
for ( int i = text.length() - 1; i >= 0; --i )
- result[i] = QChar( BibTeX::EncoderLaTeX::unicodeToASCII( result[i].unicode() ) );
+ result[i] = TQChar( BibTeX::EncoderLaTeX::unicodeToASCII( result[i].unicode() ) );
return result.replace( unwantedChars, "" );
}
- QString IdSuggestions::resolveConflict( BibTeX::File *file, const QString &id, BibTeX::Element *element )
+ TQString IdSuggestions::resolveConflict( BibTeX::File *file, const TQString &id, BibTeX::Element *element )
{
- QString result = id;
+ TQString result = id;
BibTeX::Element *hit = file->containsKey( id ) ;
if ( hit != NULL && hit != element )
{
int i = 0;
do
{
- result = QString( "%1-%2" ).arg( id ).arg( ++i );
+ result = TQString( "%1-%2" ).arg( id ).arg( ++i );
hit = file->containsKey( result );
}
while ( hit != NULL && hit != element );
@@ -124,9 +124,9 @@ namespace KBibTeX
/** parse value item's text */
bool ok = FALSE;
- QRegExp yearRegExp( "\\b(\\d{2})?\\d{2}\\b" );
+ TQRegExp yearRegExp( "\\b(\\d{2})?\\d{2}\\b" );
yearRegExp.search( valueItem->text() );
- int year = QString( yearRegExp.cap( 0 ) ).toInt( &ok );
+ int year = TQString( yearRegExp.cap( 0 ) ).toInt( &ok );
if ( !ok ) year = -1;
return year;
@@ -135,34 +135,34 @@ namespace KBibTeX
/**
* Determine title for a given entry
*/
- QString IdSuggestions::extractTitle( BibTeX::Entry *entry )
+ TQString IdSuggestions::extractTitle( BibTeX::Entry *entry )
{
/** retrieve field holding title information for entry */
BibTeX::EntryField *field = entry->getField( BibTeX::EntryField::ftTitle );
if ( field == NULL )
- return QString::null; /** no title field available */
+ return TQString::null; /** no title field available */
/** *fetch value item holding title */
BibTeX::ValueItem *valueItem = field->value()->items.isEmpty() ? NULL : field->value()->items.first();
if ( valueItem == NULL )
- return QString::null; /** no value item found or is empty */
+ return TQString::null; /** no value item found or is empty */
return valueItem->text();
}
- QStringList IdSuggestions::createSuggestions( BibTeX::File *file, BibTeX::Entry *entry )
+ TQStringList IdSuggestions::createSuggestions( BibTeX::File *file, BibTeX::Entry *entry )
{
Settings * settings = Settings::self();
- const QStringList& formatStrList = settings->idSuggestions_formatStrList;
- QStringList result;
- QStringList allKeys = file != NULL ? file->allKeys() : QStringList();
+ const TQStringList& formatStrList = settings->idSuggestions_formatStrList;
+ TQStringList result;
+ TQStringList allKeys = file != NULL ? file->allKeys() : TQStringList();
entry = new BibTeX::Entry( entry );
if ( file != NULL )
file->completeReferencedFields( entry );
- for ( QStringList::ConstIterator it = formatStrList.begin(); it != formatStrList.end(); ++it )
+ for ( TQStringList::ConstIterator it = formatStrList.begin(); it != formatStrList.end(); ++it )
{
- QString id = formatId( entry, *it );
+ TQString id = formatId( entry, *it );
if ( id.isEmpty() || result.contains( id ) )
continue;
if ( !result.contains( id ) )
@@ -174,33 +174,33 @@ namespace KBibTeX
return result;
}
- QString IdSuggestions::createDefaultSuggestion( BibTeX::File *file, BibTeX::Entry *entry )
+ TQString IdSuggestions::createDefaultSuggestion( BibTeX::File *file, BibTeX::Entry *entry )
{
Settings * settings = Settings::self();
if ( settings->idSuggestions_default < 0 || settings->idSuggestions_default >= ( int )settings->idSuggestions_formatStrList.size() )
- return QString::null;
+ return TQString::null;
entry = new BibTeX::Entry( entry );
if ( file != NULL )
file->completeReferencedFields( entry );
- QString result = formatId( entry, settings->idSuggestions_formatStrList[settings->idSuggestions_default] );
+ TQString result = formatId( entry, settings->idSuggestions_formatStrList[settings->idSuggestions_default] );
delete entry;
return result;
}
- QString IdSuggestions::formatId( BibTeX::Entry *entry, const QString& formatStr )
+ TQString IdSuggestions::formatId( BibTeX::Entry *entry, const TQString& formatStr )
{
- QString id;
- QStringList tokenList = QStringList::split( '|', formatStr );
- for ( QStringList::ConstIterator tit = tokenList.begin(); tit != tokenList.end(); ++tit )
+ TQString id;
+ TQStringList tokenList = TQStringList::split( '|', formatStr );
+ for ( TQStringList::ConstIterator tit = tokenList.begin(); tit != tokenList.end(); ++tit )
id.append( translateToken( entry, *tit ) );
return id;
}
- QString IdSuggestions::translateToken( BibTeX::Entry *entry, const QString& token )
+ TQString IdSuggestions::translateToken( BibTeX::Entry *entry, const TQString& token )
{
switch ( token[0] )
{
@@ -211,34 +211,34 @@ namespace KBibTeX
{
int year = extractYear( entry );
if ( year > -1 )
- return QString::number( year % 100 + 100 ).mid( 1 );
+ return TQString::number( year % 100 + 100 ).mid( 1 );
else
- return QString::null;
+ return TQString::null;
}
case 'Y':
{
int year = extractYear( entry );
if ( year > -1 )
- return QString::number( year % 10000 + 10000 ).mid( 1 );
+ return TQString::number( year % 10000 + 10000 ).mid( 1 );
else
- return QString::null;
+ return TQString::null;
}
case 't': return translateTitleToken( entry, token.mid( 1 ), FALSE );
case 'T': return translateTitleToken( entry, token.mid( 1 ), TRUE );
case '"': return token.mid( 1 );
- default: return QString::null;
+ default: return TQString::null;
}
}
- QString IdSuggestions::translateAuthorsToken( BibTeX::Entry *entry, const QString& token, Authors selectAuthors )
+ TQString IdSuggestions::translateAuthorsToken( BibTeX::Entry *entry, const TQString& token, Authors selectAuthors )
{
struct IdSuggestionTokenInfo ati = evalToken( token );
- QString result;
+ TQString result;
bool first = true, firstInserted = true;
- QStringList authors = authorsLastName( entry );
- for ( QStringList::ConstIterator it = authors.begin(); it != authors.end(); ++it )
+ TQStringList authors = authorsLastName( entry );
+ for ( TQStringList::ConstIterator it = authors.begin(); it != authors.end(); ++it )
{
- QString author = normalizeText( *it ).left( ati.len );
+ TQString author = normalizeText( *it ).left( ati.len );
if ( selectAuthors == aAll || ( selectAuthors == aOnlyFirst && first ) || ( selectAuthors == aNotFirst && !first ) )
{
if ( !firstInserted )
@@ -257,14 +257,14 @@ namespace KBibTeX
return result;
}
- struct IdSuggestionTokenInfo IdSuggestions::evalToken( const QString& token )
+ struct IdSuggestionTokenInfo IdSuggestions::evalToken( const TQString& token )
{
unsigned int pos = 0;
struct IdSuggestionTokenInfo result;
result.len = 0x00ffffff;
result.toLower = FALSE;
result.toUpper = FALSE;
- result.inBetween = QString::null;
+ result.inBetween = TQString::null;
if ( token.length() > pos )
{
@@ -290,23 +290,23 @@ namespace KBibTeX
return result;
}
- QString IdSuggestions::translateTitleToken( BibTeX::Entry *entry, const QString& token, bool removeSmallWords )
+ TQString IdSuggestions::translateTitleToken( BibTeX::Entry *entry, const TQString& token, bool removeSmallWords )
{
struct IdSuggestionTokenInfo tti = evalToken( token );
Settings * settings = Settings::self();
- const QStringList smallWords = settings->idSuggestions_smallWords;
+ const TQStringList smallWords = settings->idSuggestions_smallWords;
- QString result;
+ TQString result;
bool first = TRUE;
- QStringList titleWords = QStringList::split( QRegExp( "\\s+" ), extractTitle( entry ) );
- for ( QStringList::ConstIterator it = titleWords.begin(); it != titleWords.end(); ++it )
+ TQStringList titleWords = TQStringList::split( TQRegExp( "\\s+" ), extractTitle( entry ) );
+ for ( TQStringList::ConstIterator it = titleWords.begin(); it != titleWords.end(); ++it )
{
if ( first )
first = FALSE;
else
result.append( tti.inBetween );
- QString lowerText = ( *it ).lower();
+ TQString lowerText = ( *it ).lower();
if ( !removeSmallWords || !smallWords.contains( lowerText ) )
result.append( normalizeText( *it ).left( tti.len ) );
}
@@ -320,12 +320,12 @@ namespace KBibTeX
}
/** convert a formatting string into a human readable version (even translated) */
- QString IdSuggestions::formatStrToHuman( const QString& formatStr )
+ TQString IdSuggestions::formatStrToHuman( const TQString& formatStr )
{
bool first = TRUE;
- QString text;
- QStringList elements = QStringList::split( '|', formatStr );
- for ( QStringList::iterator it = elements.begin();it != elements.end();++it )
+ TQString text;
+ TQStringList elements = TQStringList::split( '|', formatStr );
+ for ( TQStringList::iterator it = elements.begin();it != elements.end();++it )
{
if ( first ) first = FALSE; else text.append( "\n" );
if (( *it )[0] == 'a' || ( *it )[0] == 'A' || ( *it )[0] == 'z' )
@@ -339,7 +339,7 @@ namespace KBibTeX
if ( info.len < 0x00ffffff ) text.append( i18n( ", but only first letter of each last name", ", but only first %n letters of each last name", n ) );
if ( info.toUpper ) text.append( i18n( ", in upper case" ) );
else if ( info.toLower ) text.append( i18n( ", in lower case" ) );
- if ( info.inBetween != QString::null ) text.append( QString( i18n( ", with '%1' in between" ) ).arg( info.inBetween ) );
+ if ( info.inBetween != TQString::null ) text.append( TQString( i18n( ", with '%1' in between" ) ).arg( info.inBetween ) );
}
else if (( *it )[0] == 'y' ) text.append( i18n( "Year (2 digits)" ) );
else if (( *it )[0] == 'Y' ) text.append( i18n( "Year (4 digits)" ) );
@@ -351,10 +351,10 @@ namespace KBibTeX
if ( info.len < 0x00ffffff ) text.append( i18n( ", but only first letter of each word", ", but only first %n letters of each word", n ) );
if ( info.toUpper ) text.append( i18n( ", in upper case" ) );
else if ( info.toLower ) text.append( i18n( ", in lower case" ) );
- if ( info.inBetween != QString::null ) text.append( QString( i18n( ", with '%1' in between" ) ).arg( info.inBetween ) );
+ if ( info.inBetween != TQString::null ) text.append( TQString( i18n( ", with '%1' in between" ) ).arg( info.inBetween ) );
if (( *it )[0] == 'T' ) text.append( i18n( ", small words removed" ) );
}
- else if (( *it )[0] == '"' ) text.append( QString( i18n( "Text: '%1'" ) ).arg(( *it ).mid( 1 ) ) );
+ else if (( *it )[0] == '"' ) text.append( TQString( i18n( "Text: '%1'" ) ).arg(( *it ).mid( 1 ) ) );
else text.append( "?" );
}
diff --git a/src/idsuggestions.h b/src/idsuggestions.h
index a1bd022..d4d110f 100644
--- a/src/idsuggestions.h
+++ b/src/idsuggestions.h
@@ -20,7 +20,7 @@
#ifndef KBIBTEXIDSUGGESTIONS_H
#define KBIBTEXIDSUGGESTIONS_H
-#include <qstringlist.h>
+#include <ntqstringlist.h>
#include <file.h>
#include <entry.h>
@@ -32,7 +32,7 @@ namespace KBibTeX
unsigned int len;
bool toLower;
bool toUpper;
- QString inBetween;
+ TQString inBetween;
};
/**
@@ -41,33 +41,33 @@ namespace KBibTeX
class IdSuggestions
{
public:
- static QStringList createSuggestions( BibTeX::File *file, BibTeX::Entry *entry );
- static QString createDefaultSuggestion( BibTeX::File *file, BibTeX::Entry *entry );
- static QString formatStrToHuman( const QString& formatStr );
- static struct IdSuggestionTokenInfo evalToken( const QString& token );
- static QString formatId( BibTeX::Entry *entry, const QString& formatStr );
- static QString resolveConflict( BibTeX::File *file, const QString &id, BibTeX::Element *element = NULL );
+ static TQStringList createSuggestions( BibTeX::File *file, BibTeX::Entry *entry );
+ static TQString createDefaultSuggestion( BibTeX::File *file, BibTeX::Entry *entry );
+ static TQString formatStrToHuman( const TQString& formatStr );
+ static struct IdSuggestionTokenInfo evalToken( const TQString& token );
+ static TQString formatId( BibTeX::Entry *entry, const TQString& formatStr );
+ static TQString resolveConflict( BibTeX::File *file, const TQString &id, BibTeX::Element *element = NULL );
- static const QStringList smallWords;
+ static const TQStringList smallWords;
private:
enum Authors {aAll, aOnlyFirst, aNotFirst};
- static const QRegExp unwantedChars;
- static const QChar asciiizeSource[];
- static const QString asciiizeTarget[];
+ static const TQRegExp unwantedChars;
+ static const TQChar asciiizeSource[];
+ static const TQString asciiizeTarget[];
IdSuggestions();
~IdSuggestions();
- static QStringList authorsLastName( BibTeX::Entry *entry );
- static QString normalizeText( const QString& text );
- static QString asciiizeText( const QString& text );
+ static TQStringList authorsLastName( BibTeX::Entry *entry );
+ static TQString normalizeText( const TQString& text );
+ static TQString asciiizeText( const TQString& text );
static int extractYear( BibTeX::Entry *entry );
- static QString extractTitle( BibTeX::Entry *entry );
- static QString translateToken( BibTeX::Entry *entry, const QString& token );
- static QString translateAuthorsToken( BibTeX::Entry *entry, const QString& token, Authors selectAuthors );
- static QString translateTitleToken( BibTeX::Entry *entry, const QString& token, bool removeSmallWords );
+ static TQString extractTitle( BibTeX::Entry *entry );
+ static TQString translateToken( BibTeX::Entry *entry, const TQString& token );
+ static TQString translateAuthorsToken( BibTeX::Entry *entry, const TQString& token, Authors selectAuthors );
+ static TQString translateTitleToken( BibTeX::Entry *entry, const TQString& token, bool removeSmallWords );
};
}
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 ) );
}
}
diff --git a/src/idsuggestionswidget.h b/src/idsuggestionswidget.h
index 103029c..dc2a675 100644
--- a/src/idsuggestionswidget.h
+++ b/src/idsuggestionswidget.h
@@ -20,24 +20,24 @@
#ifndef KBIBTEXIDSUGGESTIONSWIDGET_H
#define KBIBTEXIDSUGGESTIONSWIDGET_H
-#include <qwidget.h>
-#include <qdialog.h>
+#include <ntqwidget.h>
+#include <ntqdialog.h>
-class QCheckBox;
-class QScrollView;
-class QSpinBox;
+class TQCheckBox;
+class TQScrollView;
+class TQSpinBox;
class KComboBox;
class KLineEdit;
class KPushButton;
namespace KBibTeX
{
- class IdSuggestionComponent: public QFrame
+ class IdSuggestionComponent: public TQFrame
{
Q_OBJECT
public:
- IdSuggestionComponent( const QString& title, QWidget *parent );
- virtual QString text() const = 0;
+ IdSuggestionComponent( const TQString& title, TQWidget *parent );
+ virtual TQString text() const = 0;
void setEnableUpDown( bool enableUp, bool enableDown );
signals:
@@ -46,11 +46,11 @@ namespace KBibTeX
void deleted();
protected:
- QWidget *moveWidgets( QWidget *parent );
+ TQWidget *moveWidgets( TQWidget *parent );
bool m_toBeDeleted;
- QString m_title;
- QWidget *m_parent;
+ TQString m_title;
+ TQWidget *m_parent;
KPushButton *m_pushButtonDel;
KPushButton *m_pushButtonUp;
KPushButton *m_pushButtonDown;
@@ -64,32 +64,32 @@ namespace KBibTeX
class IdSuggestionComponentAuthor: public IdSuggestionComponent
{
public:
- IdSuggestionComponentAuthor( const QString &text, QWidget *parent );
- QString text() const;
+ IdSuggestionComponentAuthor( const TQString &text, TQWidget *parent );
+ TQString text() const;
protected:
KComboBox *m_comboBoxWhichAuthors;
KComboBox *m_comboBoxCasing;
KLineEdit *m_lineEditInBetween;
- QSpinBox *m_spinBoxLen;
+ TQSpinBox *m_spinBoxLen;
};
class IdSuggestionComponentTitle: public IdSuggestionComponent
{
public:
- IdSuggestionComponentTitle( const QString &text, QWidget *parent );
- QString text() const;
+ IdSuggestionComponentTitle( const TQString &text, TQWidget *parent );
+ TQString text() const;
protected:
- QCheckBox *m_checkBoxRemoveSmallWords;
+ TQCheckBox *m_checkBoxRemoveSmallWords;
KComboBox *m_comboBoxCasing;
KLineEdit *m_lineEditInBetween;
- QSpinBox *m_spinBoxLen;
+ TQSpinBox *m_spinBoxLen;
};
class IdSuggestionComponentYear: public IdSuggestionComponent
{
public:
- IdSuggestionComponentYear( const QString &text, QWidget *parent );
- QString text() const;
+ IdSuggestionComponentYear( const TQString &text, TQWidget *parent );
+ TQString text() const;
protected:
KComboBox *m_comboBoxDigits;
};
@@ -97,55 +97,55 @@ namespace KBibTeX
class IdSuggestionComponentText: public IdSuggestionComponent
{
public:
- IdSuggestionComponentText( const QString &text, QWidget *parent );
- QString text() const;
+ IdSuggestionComponentText( const TQString &text, TQWidget *parent );
+ TQString text() const;
protected:
KLineEdit *m_lineEditInBetween;
};
- class IdSuggestionsScrollView : public QScrollView
+ class IdSuggestionsScrollView : public TQScrollView
{
Q_OBJECT
public:
- IdSuggestionsScrollView( QWidget *parent, const char*name = NULL );
+ IdSuggestionsScrollView( TQWidget *parent, const char*name = NULL );
~IdSuggestionsScrollView();
- void setMainWidget( QWidget *widget ) {m_widget = widget;}
+ void setMainWidget( TQWidget *widget ) {m_widget = widget;}
protected:
- void viewportResizeEvent( QResizeEvent * );
+ void viewportResizeEvent( TQResizeEvent * );
private:
- QWidget *m_widget;
+ TQWidget *m_widget;
};
/**
@author Thomas Fischer <fischer@unix-ag.uni-kl.de>
*/
- class IdSuggestionsWidget : public QWidget
+ class IdSuggestionsWidget : public TQWidget
{
Q_OBJECT
public:
~IdSuggestionsWidget();
int numComponents();
- static QDialog::DialogCode execute( QString &formatStr, QWidget *parent = 0, const char *name = 0 );
+ static TQDialog::DialogCode execute( TQString &formatStr, TQWidget *parent = 0, const char *name = 0 );
protected:
- IdSuggestionsWidget( const QString &formatStr, KDialogBase *parent, const char *name = 0 );
+ IdSuggestionsWidget( const TQString &formatStr, KDialogBase *parent, const char *name = 0 );
- QString m_originalFormatStr;
+ TQString m_originalFormatStr;
int m_componentCount;
- void reset( const QString& formatStr );
- void apply( QString& formatStr );
+ void reset( const TQString& formatStr );
+ void apply( TQString& formatStr );
private:
- static QString exampleBibTeXEntry;
+ static TQString exampleBibTeXEntry;
BibTeX::Entry *m_example;
IdSuggestionsScrollView *m_scrollViewComponents;
- QLabel *m_labelExample;
- QWidget *m_listOfComponents;
+ TQLabel *m_labelExample;
+ TQWidget *m_listOfComponents;
KPushButton *m_pushButtonAdd;
KDialogBase *m_parent;
diff --git a/src/iso5426converter.cpp b/src/iso5426converter.cpp
index 3b40d5d..9dda16f 100644
--- a/src/iso5426converter.cpp
+++ b/src/iso5426converter.cpp
@@ -33,13 +33,13 @@
#include "iso5426converter.h"
#include <kdebug.h>
-#include <qstring.h>
+#include <ntqstring.h>
using KBibTeX::Iso5426Converter;
-QString Iso5426Converter::toUtf8(const QCString& text_) {
+TQString Iso5426Converter::toUtf8(const TQCString& text_) {
const uint len = text_.length();
- QString result;
+ TQString result;
result.reserve(len);
uint pos = 0;
for(uint i = 0; i < len; ++i) {
@@ -53,7 +53,7 @@ QString Iso5426Converter::toUtf8(const QCString& text_) {
if(c == 0xC9) {
c = 0xC8;
}
- QChar d = getCombiningChar(c * 256 + text_[i + 1]);
+ TQChar d = getCombiningChar(c * 256 + text_[i + 1]);
if(!d.isNull()) {
result[pos++] = d;
++i;
@@ -84,7 +84,7 @@ bool Iso5426Converter::isCombining(uchar c) {
}
// Source : http://www.itscj.ipsj.or.jp/ISO-IR/053.pdf
-QChar Iso5426Converter::getChar(uchar c) {
+TQChar Iso5426Converter::getChar(uchar c) {
switch(c) {
case 0xA1:
return 0x00A1; // 2/1 inverted exclamation mark
@@ -199,7 +199,7 @@ QChar Iso5426Converter::getChar(uchar c) {
}
}
-QChar Iso5426Converter::getCombiningChar(uint c) {
+TQChar Iso5426Converter::getCombiningChar(uint c) {
switch(c) {
// 4/0 low rising tone mark
case 0xC041:
@@ -887,6 +887,6 @@ QChar Iso5426Converter::getCombiningChar(uint c) {
default:
kdDebug() << "Iso5426Converter::getCombiningChar() - no match for " << c << endl;
- return QChar();
+ return TQChar();
}
}
diff --git a/src/iso5426converter.h b/src/iso5426converter.h
index f13873b..442863e 100644
--- a/src/iso5426converter.h
+++ b/src/iso5426converter.h
@@ -23,11 +23,11 @@
#ifndef KBIBTEX_ISO5426CONVERTER_H
#define KBIBTEX_ISO5426CONVERTER_H
-class QCString;
-class QString;
-class QChar;
+class TQCString;
+class TQString;
+class TQChar;
-#include <qglobal.h>
+#include <ntqglobal.h>
namespace KBibTeX {
@@ -36,15 +36,15 @@ namespace KBibTeX {
*/
class Iso5426Converter {
public:
- static QString toUtf8(const QCString& text);
+ static TQString toUtf8(const TQCString& text);
private:
static bool hasNext(uint pos, uint len);
static bool isAscii(uchar c);
static bool isCombining(uchar c);
- static QChar getChar(uchar c);
- static QChar getCombiningChar(uint i);
+ static TQChar getChar(uchar c);
+ static TQChar getCombiningChar(uint i);
};
} // end namespace
diff --git a/src/iso6937converter.cpp b/src/iso6937converter.cpp
index 66a5154..d55b310 100644
--- a/src/iso6937converter.cpp
+++ b/src/iso6937converter.cpp
@@ -33,13 +33,13 @@
#include "iso6937converter.h"
#include <kdebug.h>
-#include <qstring.h>
+#include <ntqstring.h>
using KBibTeX::Iso6937Converter;
-QString Iso6937Converter::toUtf8(const QCString& text_) {
+TQString Iso6937Converter::toUtf8(const TQCString& text_) {
const uint len = text_.length();
- QString result;
+ TQString result;
result.reserve(len);
uint pos = 0;
for(uint i = 0; i < len; ++i) {
@@ -47,7 +47,7 @@ QString Iso6937Converter::toUtf8(const QCString& text_) {
if(isAscii(c)) {
result[pos++] = c;
} else if(isCombining(c) && hasNext(i, len)) {
- QChar d = getCombiningChar(c * 256 + text_[i + 1]);
+ TQChar d = getCombiningChar(c * 256 + text_[i + 1]);
if(!d.isNull()) {
result[pos++] = d;
++i;
@@ -78,7 +78,7 @@ bool Iso6937Converter::isCombining(uchar c) {
}
// Source : http://anubis.dkuug.dk/JTC1/SC2/WG3/docs/6937cd.pdf
-QChar Iso6937Converter::getChar(uchar c) {
+TQChar Iso6937Converter::getChar(uchar c) {
switch(c) {
case 0xA0:
return 0x00A0; // 10/00 NO-BREAK SPACE
@@ -240,7 +240,7 @@ QChar Iso6937Converter::getChar(uchar c) {
}
}
-QChar Iso6937Converter::getCombiningChar(uint c) {
+TQChar Iso6937Converter::getCombiningChar(uint c) {
switch(c) {
// 12/00 (This position shall not be used)
@@ -601,6 +601,6 @@ QChar Iso6937Converter::getCombiningChar(uint c) {
default:
kdDebug() << "Iso6937Converter::getCombiningChar() - no match for " << c << endl;
- return QChar();
+ return TQChar();
}
}
diff --git a/src/iso6937converter.h b/src/iso6937converter.h
index a72efcd..9645fba 100644
--- a/src/iso6937converter.h
+++ b/src/iso6937converter.h
@@ -23,9 +23,9 @@
#ifndef KBIBTEX_ISO6937CONVERTER_H
#define KBIBTEX_ISO6937CONVERTER_H
-class QCString;
-class QString;
-class QChar;
+class TQCString;
+class TQString;
+class TQChar;
namespace KBibTeX {
@@ -34,15 +34,15 @@ namespace KBibTeX {
*/
class Iso6937Converter {
public:
- static QString toUtf8(const QCString& text);
+ static TQString toUtf8(const TQCString& text);
private:
static bool hasNext(unsigned int pos, unsigned int len);
static bool isAscii(unsigned char c);
static bool isCombining(unsigned char c);
- static QChar getChar(unsigned char c);
- static QChar getCombiningChar(unsigned int c);
+ static TQChar getChar(unsigned char c);
+ static TQChar getCombiningChar(unsigned int c);
};
} // end namespace
diff --git a/src/kbibtex_part.cpp b/src/kbibtex_part.cpp
index 3a5f16a..eaf72b8 100644
--- a/src/kbibtex_part.cpp
+++ b/src/kbibtex_part.cpp
@@ -20,18 +20,18 @@
#include <string>
#include <fcntl.h>
-#include <qstring.h>
-#include <qsplitter.h>
-#include <qtimer.h>
-#include <qvaluelist.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qbuffer.h>
-#include <qtoolbutton.h>
-#include <qtabwidget.h>
-#include <qlabel.h>
-#include <qtextedit.h>
-#include <qclipboard.h>
+#include <ntqstring.h>
+#include <ntqsplitter.h>
+#include <ntqtimer.h>
+#include <ntqvaluelist.h>
+#include <ntqlayout.h>
+#include <ntqlineedit.h>
+#include <ntqbuffer.h>
+#include <ntqtoolbutton.h>
+#include <ntqtabwidget.h>
+#include <ntqlabel.h>
+#include <ntqtextedit.h>
+#include <ntqclipboard.h>
#include <kinstance.h>
#include <kaction.h>
#include <kstdaction.h>
@@ -70,10 +70,10 @@
#include <encoderlatex.h>
#include "kbibtex_part.h"
-const QString inPipeFilename = QDir::homeDirPath() + "/.kbibtex.in";
+const TQString inPipeFilename = TQDir::homeDirPath() + "/.kbibtex.in";
-KBibTeXPart::KBibTeXPart( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name )
+KBibTeXPart::KBibTeXPart( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name )
: KParts::ReadWritePart( parent, name ), m_defInitCounter( 0 ), m_settingsDlg( NULL ), m_initializationDone( FALSE ), m_inPipe( NULL )
{
m_mainWindow = dynamic_cast<KMainWindow*>( parent );
@@ -101,7 +101,7 @@ KBibTeXPart::KBibTeXPart( QWidget *parentWidget, const char *widgetName,
// read configuration
readSettings();
- QTimer::singleShot( 100, this, SLOT( slotDeferredInitialization() ) );
+ TQTimer::singleShot( 100, this, SLOT( slotDeferredInitialization() ) );
}
KBibTeXPart::~KBibTeXPart()
@@ -151,7 +151,7 @@ bool KBibTeXPart::queryClose()
if ( !isReadWrite() || !isModified() )
return TRUE;
- QString docName = url().fileName();
+ TQString docName = url().fileName();
if ( docName.isEmpty() ) docName = i18n( "Untitled" );
int res = KMessageBox::warningYesNoCancel( widget(),
@@ -223,9 +223,9 @@ bool KBibTeXPart::saveFile()
tempBibFile.close();
if ( success )
{
- QString usedFileName = m_file;
- QFileInfo fi( usedFileName );
- if ( !fi.readLink().isNull() && KMessageBox::questionYesNo( widget(), QString( i18n( "The selected filename \"%1\" is a symbolic link pointing to \"%2\".\nReplace the link with a new file or overwrite the existing file the link points to?" ) ).arg( usedFileName ).arg(KBibTeX::Settings::resolveLink( m_file, fi.readLink() ) ), i18n( "Symbolic Link" ), KGuiItem( i18n( "Replace link" ) ), KGuiItem( i18n( "Overwrite file the link points to" ) ) ) == KMessageBox::No )
+ TQString usedFileName = m_file;
+ TQFileInfo fi( usedFileName );
+ if ( !fi.readLink().isNull() && KMessageBox::questionYesNo( widget(), TQString( i18n( "The selected filename \"%1\" is a symbolic link pointing to \"%2\".\nReplace the link with a new file or overwrite the existing file the link points to?" ) ).arg( usedFileName ).arg(KBibTeX::Settings::resolveLink( m_file, fi.readLink() ) ), i18n( "Symbolic Link" ), KGuiItem( i18n( "Replace link" ) ), KGuiItem( i18n( "Overwrite file the link points to" ) ) ) == KMessageBox::No )
usedFileName = KBibTeX::Settings::resolveLink( m_file, fi.readLink() );
m_documentWidget->dirWatch().stopScan();
@@ -247,13 +247,13 @@ bool KBibTeXPart::saveAs()
bool result = FALSE;
KBibTeX::Settings * settings = KBibTeX::Settings::self( NULL );
- QString startDir = ! url().isEmpty() ? url().url() : QDir::currentDirPath();
+ TQString startDir = ! url().isEmpty() ? url().url() : TQDir::currentDirPath();
KURL saveURL = KFileDialog::getSaveURL( startDir, "*.bib|" + i18n( "BibTeX (*.bib)" ) + "\n*.ris|" + i18n( "Reference Manager (*.ris)" ) +
( settings->external_xml2bibAvailable ? "\n*.ref *.refer *.rfr *.txt|" + i18n( "EndNote (Refer format) (*.ref *.refer *.rfr *.txt)" ) + "\n*.isi *.cgi|" + i18n( "ISI Web of Knowledge (*.isi *.cgi)" ) : "" ) + "\n*.xml|" + ( settings->external_xml2bibAvailable ? i18n( "DocBook 5 or MODS (*.xml)" ) : i18n( "DocBook 5 (*.xml)" ) ), widget() );
if ( saveURL.isValid() && !saveURL.isEmpty() )
{
- if ( KIO::NetAccess::exists( saveURL, FALSE, widget() ) && KMessageBox::warningContinueCancel( widget(), i18n( "A file named '%1' already exists. Are you sure you want to overwrite it?" ).arg( saveURL.filename() ), QString::null, i18n( "Overwrite" ) ) != KMessageBox::Continue )
+ if ( KIO::NetAccess::exists( saveURL, FALSE, widget() ) && KMessageBox::warningContinueCancel( widget(), i18n( "A file named '%1' already exists. Are you sure you want to overwrite it?" ).arg( saveURL.filename() ), TQString::null, i18n( "Overwrite" ) ) != KMessageBox::Continue )
return result;
if ( ReadWritePart::saveAs( saveURL ) )
@@ -269,14 +269,14 @@ bool KBibTeXPart::saveAs()
void KBibTeXPart::slotFileExport()
{
KBibTeX::Settings * settings = KBibTeX::Settings::self( NULL );
- QString startDir = ! url().isEmpty() ? url().url() : QDir::currentDirPath();
+ TQString startDir = ! url().isEmpty() ? url().url() : TQDir::currentDirPath();
KURL exportURL = KFileDialog::getSaveURL( startDir, "*.pdf|" + i18n( "Portable Document File (*.pdf)" ) + "\n*.ps|" + i18n( "PostScript (*.ps)" ) + "\n*.ris|" + i18n( "Reference Manager (*.ris)" ) + ( settings->external_xml2bibAvailable ? "\n*.ref *.refer *.rfr *.txt|" + i18n( "EndNote (Refer format) (*.ref *.refer *.rfr *.txt)" ) + "\n*.isi *.cgi|" + i18n( "ISI Web of Knowledge (*.isi *.cgi)" ) : "" ) + "\n*.xml|" + ( settings->external_xml2bibAvailable ? i18n( "DocBook 5 or MODS (*.xml)" ) : i18n( "DocBook 5 (*.xml)" ) ) + "\n*.html|" + i18n( "Hypertext Markup Langage (*.html)" ) + "\n*.rtf|" + i18n( "Rich Text Format (*.rtf)" ), widget() );
if ( exportURL.isValid() && !exportURL.isEmpty() )
{
if ( KIO::NetAccess::exists( exportURL, FALSE, widget() ) )
{
- if ( KMessageBox::warningContinueCancel( widget(), i18n( "A file named '%1' already exists. Are you sure you want to overwrite it?" ).arg( exportURL.filename() ), QString::null, i18n( "Overwrite" ) ) != KMessageBox::Continue )
+ if ( KMessageBox::warningContinueCancel( widget(), i18n( "A file named '%1' already exists. Are you sure you want to overwrite it?" ).arg( exportURL.filename() ), TQString::null, i18n( "Overwrite" ) ) != KMessageBox::Continue )
return ;
/** make backup if defined by the user */
@@ -301,9 +301,9 @@ void KBibTeXPart::slotFileExport()
format = BibTeX::File::formatRIS;
else if ( exportURL.fileName().endsWith( ".xml", FALSE ) )
{
- QStringList options = QStringList::split( '|', ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable ? "DocBook5|MODS|internal XML" : "DocBook5|internal XML" ) );
+ TQStringList options = TQStringList::split( '|', ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable ? "DocBook5|MODS|internal XML" : "DocBook5|internal XML" ) );
bool ok = false;
- QString answer = KInputDialog::getItem( i18n( "Choose file format" ), QString( i18n( "Choose file format of file '%1':" ) ).arg( exportURL.fileName() ), options, 0, false, &ok, widget() );
+ TQString answer = KInputDialog::getItem( i18n( "Choose file format" ), TQString( i18n( "Choose file format of file '%1':" ) ).arg( exportURL.fileName() ), options, 0, false, &ok, widget() );
if ( ok && !answer.isNull() && answer == "DocBook5" )
format = BibTeX::File::formatDocBook5;
else if ( ok && !answer.isNull() && answer == "MODS" )
@@ -315,9 +315,9 @@ void KBibTeXPart::slotFileExport()
format = BibTeX::File::formatHTML;
else
{
- QStringList options = QStringList::split( '|', ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable ? "BibTeX|EndNote|ISI|RIS" : "BibTeX|RIS" ) );
+ TQStringList options = TQStringList::split( '|', ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable ? "BibTeX|EndNote|ISI|RIS" : "BibTeX|RIS" ) );
bool ok = false;
- QString answer = KInputDialog::getItem( i18n( "Choose file format" ), QString( i18n( "Choose file format of file '%1':" ) ).arg( exportURL.fileName() ), options, 0, false, &ok, widget() );
+ TQString answer = KInputDialog::getItem( i18n( "Choose file format" ), TQString( i18n( "Choose file format of file '%1':" ) ).arg( exportURL.fileName() ), options, 0, false, &ok, widget() );
if ( ok && !answer.isNull() && answer == "BibTeX" )
format = BibTeX::File::formatBibTeX;
else if ( ok && !answer.isNull() && answer == "EndNote" )
@@ -328,7 +328,7 @@ void KBibTeXPart::slotFileExport()
format = BibTeX::File::formatRIS;
}
- QStringList errorLog;
+ TQStringList errorLog;
bool error = !m_documentWidget->save( tempBibFile.file(), format, i18n( "Exporting" ), &errorLog ) ;
if ( !error )
@@ -341,10 +341,10 @@ void KBibTeXPart::slotFileExport()
{
#if (KDE_VERSION_MINOR>=4) && (KDE_VERSION_MAJOR>=3)
if ( !errorLog.empty() )
- KMessageBox::errorList( widget(), QString( i18n( "File could not be exported in '%1'." ) ).arg( exportURL.prettyURL() ).append( i18n( "\n\nSee the following error log for details." ) ), errorLog, i18n( "Exporting failed" ) );
+ KMessageBox::errorList( widget(), TQString( i18n( "File could not be exported in '%1'." ) ).arg( exportURL.prettyURL() ).append( i18n( "\n\nSee the following error log for details." ) ), errorLog, i18n( "Exporting failed" ) );
else
#endif
- KMessageBox::error( widget(), QString( i18n( "File could not be exported to '%1'." ) ).arg( exportURL.prettyURL() ), i18n( "Exporting failed" ) );
+ KMessageBox::error( widget(), TQString( i18n( "File could not be exported to '%1'." ) ).arg( exportURL.prettyURL() ), i18n( "Exporting failed" ) );
}
}
@@ -364,15 +364,15 @@ void KBibTeXPart::slotFileFindDups()
void KBibTeXPart::slotFileMerge()
{
KBibTeX::Settings * settings = KBibTeX::Settings::self( NULL );
- QString startDir = ! url().isEmpty() ? url().url() : QDir::currentDirPath();
- KURL mergeURL = KFileDialog::getOpenURL( startDir, QString( "*.bib *.ris" ) +
+ TQString startDir = ! url().isEmpty() ? url().url() : TQDir::currentDirPath();
+ KURL mergeURL = KFileDialog::getOpenURL( startDir, TQString( "*.bib *.ris" ) +
( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable ? " *.xml *.ref *.refer *.rfr *.txt *.isi *.cgi" : "" ) + "|" + i18n( "Supported Bibliographies" ) + "\n*.bib|" + i18n( "BibTeX (*.bib)" ) + "\n*.ris|" + i18n( "Reference Manager (*.ris)" ) + ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable ? "\n*.ref *.refer *.rfr *.txt|" + i18n( "EndNote (Refer format) (*.ref *.refer *.rfr *.txt)" ) + "\n*.isi *.cgi|" + i18n( "ISI Web of Knowledge (*.isi *.cgi)" ) + "\n*.xml|" + i18n( "MODS or EndNote XML (*.xml)" ) : "" ) + "\n*|" + i18n( "All files (*.*)" )
, widget() );
if ( !mergeURL.isValid() || mergeURL.isEmpty() )
return;
- QString extension = mergeURL.fileName();
+ TQString extension = mergeURL.fileName();
int extPos = extension.find( '.' );
if ( extPos < 0 )
return;
@@ -408,11 +408,11 @@ void KBibTeXPart::slotPreferences()
m_settingsDlg = new KBibTeX::SettingsDlg( widget(), "settings_dlg" );
m_documentWidget->saveState();
- if ( m_settingsDlg->exec() == QDialog::Accepted )
+ if ( m_settingsDlg->exec() == TQDialog::Accepted )
m_documentWidget->restoreState();
}
-void KBibTeXPart::setupGUI( QWidget *parentWidget, const char *name )
+void KBibTeXPart::setupGUI( TQWidget *parentWidget, const char *name )
{
m_documentWidget = new KBibTeX::DocumentWidget( !isReadWrite(), parentWidget, name );
@@ -473,9 +473,9 @@ void KBibTeXPart::setupActions()
m_actionViewDocument->setToolTip( i18n( "View the documents associated with this BibTeX entry" ) );
m_actionViewDocument->setEnabled( FALSE );
m_actionViewFirstDocument = new KAction( i18n( "View Primary Document" ), 0, m_documentWidget, SLOT( slotViewFirstDocument() ), actionCollection(), "view_first_document" );
- m_actionViewFirstDocument->setShortcut( Qt::Key_F4 );
+ m_actionViewFirstDocument->setShortcut( TQt::Key_F4 );
m_actionViewDocumentOnlineRef = new KAction( i18n( "View Primary Online Reference" ), 0, m_documentWidget, SLOT( slotViewFirstDocumentsOnlineRef() ), actionCollection(), "view_first_documents_online_ref" );
- m_actionViewDocumentOnlineRef->setShortcut( Qt::Key_F5 );
+ m_actionViewDocumentOnlineRef->setShortcut( TQt::Key_F5 );
m_actionAssignKeywords = new KActionMenu( i18n( "Assign Keywords" ), actionCollection(), "assign_keywords" );
m_actionAssignKeywords->setToolTip( i18n( "Assign keywords to this entry" ) );
m_actionAssignKeywords->setEnabled( FALSE );
@@ -527,14 +527,14 @@ void KBibTeXPart::setupActions()
KStatusBar * statusBar = m_mainWindow->statusBar();
if ( statusBar != NULL )
{
- connect( actionCollection(), SIGNAL( actionStatusText( const QString & ) ), statusBar, SLOT( message( const QString & ) ) );
+ connect( actionCollection(), SIGNAL( actionStatusText( const TQString & ) ), statusBar, SLOT( message( const TQString & ) ) );
connect( actionCollection(), SIGNAL( clearStatusText() ), statusBar, SLOT( clear() ) );
}
}
actionCollection() ->setHighlightingEnabled( true );
- KActionMenu *acmElementNew = new KActionMenu( i18n( "&New" ), QIconSet( SmallIcon( "filenew" ) ), actionCollection(), "element_new" );
+ KActionMenu *acmElementNew = new KActionMenu( i18n( "&New" ), TQIconSet( SmallIcon( "filenew" ) ), actionCollection(), "element_new" );
acmElementNew->setToolTip( i18n( "Add a new element to this BibTeX document" ) );
acmElementNew->setEnabled( FALSE );
}
@@ -543,10 +543,10 @@ bool KBibTeXPart::slotNewElement()
{
if ( isReadWrite() && sender() )
{
- QString elementType;
+ TQString elementType;
if ( strncmp( sender() ->name(), "element_new_entry_", 18 ) == 0 )
- elementType = QString( sender() ->name() + 18 );
+ elementType = TQString( sender() ->name() + 18 );
else if ( strcmp( sender() ->name(), "element_new_comment" ) == 0 )
elementType = "comment";
else if ( strcmp( sender() ->name(), "element_new_macro" ) == 0 )
@@ -617,9 +617,9 @@ void KBibTeXPart::slotUndoChanged( bool undoAvailable )
void KBibTeXPart::slotUseInPipe()
{
- if ( m_inPipe == NULL && QFile::exists( inPipeFilename ) )
+ if ( m_inPipe == NULL && TQFile::exists( inPipeFilename ) )
{
- KMessageBox::error( widget(), QString( i18n( "Some other KBibTeX instance is using the pipe.\nIf this assumption is wrong, please delete '%1'." ) ).arg( inPipeFilename ), i18n( "Pipe already in use" ) );
+ KMessageBox::error( widget(), TQString( i18n( "Some other KBibTeX instance is using the pipe.\nIf this assumption is wrong, please delete '%1'." ) ).arg( inPipeFilename ), i18n( "Pipe already in use" ) );
}
else
{
@@ -630,25 +630,25 @@ void KBibTeXPart::slotUseInPipe()
m_inPipe->remove();
delete m_inPipe;
m_inPipe = NULL;
- QFile::remove( inPipeFilename );
+ TQFile::remove( inPipeFilename );
}
else
{
// create pipe
if ( ::mkfifo( inPipeFilename.latin1(), 0600 ) == 0 )
{
- m_inPipe = new QFile( inPipeFilename );
+ m_inPipe = new TQFile( inPipeFilename );
if ( !m_inPipe->open( IO_ReadOnly ) || fcntl( m_inPipe->handle(), F_SETFL, O_NONBLOCK ) < 0 )
{
m_inPipe->close();
m_inPipe = NULL;
}
if ( m_inPipe == NULL )
- QFile::remove( inPipeFilename );
+ TQFile::remove( inPipeFilename );
}
if ( m_inPipe == NULL )
- KMessageBox::error( widget(), QString( i18n( "Could not create pipe at '%1'." ) ).arg( inPipeFilename ), i18n( "Error creating pipe" ) );
+ KMessageBox::error( widget(), TQString( i18n( "Could not create pipe at '%1'." ) ).arg( inPipeFilename ), i18n( "Error creating pipe" ) );
}
}
@@ -695,7 +695,7 @@ void KBibTeXPart::slotDeferredInitialization()
KMessageBox::sorry( widget(), i18n( "The KBibTeX part has problems to initialize itself. Only limited functionality will be available." ), i18n( "KBibTeX Part" ) );
return ;
}
- QTimer::singleShot( 250, this, SLOT( slotDeferredInitialization() ) );
+ TQTimer::singleShot( 250, this, SLOT( slotDeferredInitialization() ) );
}
}
@@ -721,15 +721,15 @@ KBibTeXPartFactory::~KBibTeXPartFactory()
s_instance = 0L;
}
-KParts::Part* KBibTeXPartFactory::createPartObject( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
- const char *classname, const QStringList & /* args */ )
+KParts::Part* KBibTeXPartFactory::createPartObject( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
+ const char *classname, const TQStringList & /* args */ )
{
// Create an instance of our Part
KBibTeXPart * obj = new KBibTeXPart( parentWidget, widgetName, parent, name );
// See if we are to be read-write or not
- if ( QCString( classname ) == "KParts::ReadOnlyPart" )
+ if ( TQCString( classname ) == "KParts::ReadOnlyPart" )
obj->setReadWrite( false );
return obj;
diff --git a/src/kbibtex_part.h b/src/kbibtex_part.h
index f9a045a..05031e8 100644
--- a/src/kbibtex_part.h
+++ b/src/kbibtex_part.h
@@ -29,14 +29,14 @@
#include <documentwidget.h>
#include <settingsdlg.h>
-class QWidget;
-class QTextEdit;
-class QFile;
-class QLabel;
-class QTabWidget;
-class QPainter;
-class QListViewItem;
-class QProgressDialog;
+class TQWidget;
+class TQTextEdit;
+class TQFile;
+class TQLabel;
+class TQTabWidget;
+class TQPainter;
+class TQListViewItem;
+class TQProgressDialog;
class KURL;
class KListView;
class KAction;
@@ -49,8 +49,8 @@ class KBibTeXPart : public KParts::ReadWritePart
Q_OBJECT
public:
- KBibTeXPart( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name );
+ KBibTeXPart( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name );
virtual ~KBibTeXPart();
@@ -100,8 +100,8 @@ private:
};
int m_defInitCounter;
- QLabel *m_preview;
- QProgressDialog *m_progressDialog;
+ TQLabel *m_preview;
+ TQProgressDialog *m_progressDialog;
KBibTeX::DocumentWidget *m_documentWidget;
KBibTeX::SettingsDlg *m_settingsDlg;
KAction *m_actionFileMerge;
@@ -133,14 +133,14 @@ private:
KToggleAction *m_actionShowComments;
KToggleAction *m_actionShowMacros;
KMainWindow *m_mainWindow;
- QValueList<KBibTeX::WebQuery*> webQueryList;
+ TQValueList<KBibTeX::WebQuery*> webQueryList;
bool m_initializationDone;
- QFile *m_inPipe;
+ TQFile *m_inPipe;
void readSettings();
void writeSettings();
- void setupGUI( QWidget *parentWidget, const char *name );
+ void setupGUI( TQWidget *parentWidget, const char *name );
void setupActions();
signals:
@@ -156,9 +156,9 @@ class KBibTeXPartFactory : public KParts::Factory
public:
KBibTeXPartFactory();
virtual ~KBibTeXPartFactory();
- virtual KParts::Part* createPartObject( QWidget * parentWidget, const char * widgetName,
- QObject * parent, const char * name,
- const char * classname, const QStringList & /* args */ );
+ virtual KParts::Part* createPartObject( TQWidget * parentWidget, const char * widgetName,
+ TQObject * parent, const char * name,
+ const char * classname, const TQStringList & /* args */ );
static KInstance* instance();
private:
diff --git a/src/kbibtexshell.cpp b/src/kbibtexshell.cpp
index e3182dd..531d4e2 100644
--- a/src/kbibtexshell.cpp
+++ b/src/kbibtexshell.cpp
@@ -17,7 +17,7 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qprocess.h>
+#include <ntqprocess.h>
#include <kkeydialog.h>
#include <kencodingfiledialog.h>
@@ -37,7 +37,7 @@
#include <kbibtex_part.h>
#include "kbibtexshell.h"
-KBibTeXShell::KBibTeXShell( QWidget* parentWidget, const char* name )
+KBibTeXShell::KBibTeXShell( TQWidget* parentWidget, const char* name )
: KParts::MainWindow( parentWidget, name ), m_part( NULL ), m_parentWidget( parentWidget )
{
// set the shell's ui resource file
@@ -164,7 +164,7 @@ void KBibTeXShell::writeConfig()
writeConfig( config );
}
-QString KBibTeXShell::encoding()
+TQString KBibTeXShell::encoding()
{
return "utf8";
}
@@ -198,11 +198,11 @@ void KBibTeXShell::setupActions()
KStdAction::keyBindings( this, SLOT( optionsConfigureKeys() ), actionCollection() ) ->setToolTip( i18n( "Configure key bindings for KBibTeX" ) );
KStdAction::configureToolbars( this, SLOT( optionsConfigureToolbars() ), actionCollection() ) ->setToolTip( i18n( "Configure the tool bar for KBibTeX" ) );
- connect( actionCollection(), SIGNAL( actionStatusText( const QString & ) ), this, SLOT( slotActionStatusText( const QString & ) ) );
+ connect( actionCollection(), SIGNAL( actionStatusText( const TQString & ) ), this, SLOT( slotActionStatusText( const TQString & ) ) );
connect( actionCollection(), SIGNAL( clearStatusText( ) ), statusBar(), SLOT( clear() ) );
}
-void KBibTeXShell::slotActionStatusText( const QString &text )
+void KBibTeXShell::slotActionStatusText( const TQString &text )
{
KStatusBar * stb = statusBar();
@@ -238,8 +238,8 @@ void KBibTeXShell::optionsShowStatusbar()
void KBibTeXShell::optionsConfigureKeys()
{
KKeyDialog dlg( false, this );
- QPtrList<KXMLGUIClient> clients = guiFactory()->clients();
- for ( QPtrListIterator<KXMLGUIClient> it( clients ); it.current(); ++it )
+ TQPtrList<KXMLGUIClient> clients = guiFactory()->clients();
+ for ( TQPtrListIterator<KXMLGUIClient> it( clients ); it.current(); ++it )
{
dlg.insert(( *it )->actionCollection() );
}
@@ -311,8 +311,8 @@ void KBibTeXShell::slotFileNew()
void KBibTeXShell::slotFileOpen()
{
bool bibUtilsAvailable = checkExternalToolAvailable( "xml2bib" ) && checkExternalToolAvailable( "end2xml" );
- QString startDir = ! m_part->url().isEmpty() ? m_part->url().url() : QDir::currentDirPath();
- KURL mergeURL = KFileDialog::getOpenURL( startDir, QString( "*.bib *.ris" ) +
+ TQString startDir = ! m_part->url().isEmpty() ? m_part->url().url() : TQDir::currentDirPath();
+ KURL mergeURL = KFileDialog::getOpenURL( startDir, TQString( "*.bib *.ris" ) +
( bibUtilsAvailable ? " *.xml *.ref *.refer *.rfr *.txt *.isi *.cgi" : "" ) + "|" + i18n( "Supported Bibliographies" ) + "\n*.bib|" + i18n( "BibTeX (*.bib)" ) + "\n*.ris|" + i18n( "Reference Manager (*.ris)" ) + ( bibUtilsAvailable ? "\n*.ref *.refer *.rfr *.txt|" + i18n( "EndNote (Refer format) (*.ref *.refer *.rfr *.txt)" ) + "\n*.isi *.cgi|" + i18n( "ISI Web of Knowledge (*.isi *.cgi)" ) + "\n*.xml|" + i18n( "MODS or EndNote XML (*.xml)" ) : "" ) + "\n*|" + i18n( "All files (*.*)" )
, widget() );
slotFileOpen( mergeURL );
@@ -369,9 +369,9 @@ void KBibTeXShell::initializePart( KParts::ReadWritePart* part )
}
}
-bool KBibTeXShell::checkExternalToolAvailable( const QString &binary )
+bool KBibTeXShell::checkExternalToolAvailable( const TQString &binary )
{
- QProcess *process = new QProcess( binary );
+ TQProcess *process = new TQProcess( binary );
bool ok = process->start();
ok &= process->normalExit();
if ( process->isRunning() )
diff --git a/src/kbibtexshell.h b/src/kbibtexshell.h
index b52d577..bbf7a54 100644
--- a/src/kbibtexshell.h
+++ b/src/kbibtexshell.h
@@ -28,8 +28,8 @@
#include <kapplication.h>
#include <kparts/mainwindow.h>
-class QWidget;
-class QFrame;
+class TQWidget;
+class TQFrame;
class KToggleAction;
class KConfig;
@@ -40,7 +40,7 @@ class KBibTeXShell : public KParts::MainWindow
Q_OBJECT
public:
- KBibTeXShell( QWidget* parentWidget = 0, const char* name = 0 );
+ KBibTeXShell( TQWidget* parentWidget = 0, const char* name = 0 );
virtual ~KBibTeXShell();
@@ -57,7 +57,7 @@ public:
void writeConfig();
public:
- static QString encoding();
+ static TQString encoding();
public slots:
void slotAddRecentURL( const KURL& );
@@ -76,11 +76,11 @@ private slots:
void applyNewToolbarConfig();
- void slotActionStatusText( const QString &text );
+ void slotActionStatusText( const TQString &text );
private:
KParts::ReadWritePart *m_part;
- QWidget* m_parentWidget;
+ TQWidget* m_parentWidget;
KToggleAction *m_statusbarAction;
@@ -94,7 +94,7 @@ private:
void initializePart( KParts::ReadWritePart* );
- bool checkExternalToolAvailable( const QString &binary );
+ bool checkExternalToolAvailable( const TQString &binary );
};
#endif // _KBIBTEXSHELL_H_
diff --git a/src/latin1literal.h b/src/latin1literal.h
index 97c4cfc..1abcf6d 100644
--- a/src/latin1literal.h
+++ b/src/latin1literal.h
@@ -27,18 +27,18 @@
#ifndef LATIN1LITERAL_H
#define LATIN1LITERAL_H
-#include <qstring.h>
+#include <ntqstring.h>
namespace KBibTeX {
/**
* A class for explicit marking of string literals encoded in the ISO
* 8859-1 character set. Allows for efficient, still (in terms of the
- * chosen encoding) safe comparison with QString instances. To be used
+ * chosen encoding) safe comparison with TQString instances. To be used
* like this:
*
* \code
- * QString s = .....
+ * TQString s = .....
* if (s == Latin1Literal("o")) { ..... }
* \endcode
*
@@ -61,8 +61,8 @@ public:
} // end namespace
inline
-bool operator==(const QString& s1, const KBibTeX::Latin1LiteralInternal& s2) {
- const QChar* uc = s1.unicode();
+bool operator==(const TQString& s1, const KBibTeX::Latin1LiteralInternal& s2) {
+ const TQChar* uc = s1.unicode();
const char* c = s2.str;
if(!c || !uc) {
return (!c && !uc);
@@ -82,17 +82,17 @@ bool operator==(const QString& s1, const KBibTeX::Latin1LiteralInternal& s2) {
}
inline
-bool operator!=(const QString& s1, const KBibTeX::Latin1LiteralInternal& s2) {
+bool operator!=(const TQString& s1, const KBibTeX::Latin1LiteralInternal& s2) {
return !(s1 == s2);
}
inline
-bool operator==(const KBibTeX::Latin1LiteralInternal& s1, const QString& s2) {
+bool operator==(const KBibTeX::Latin1LiteralInternal& s1, const TQString& s2) {
return s2 == s1;
}
inline
-bool operator!=(const KBibTeX::Latin1LiteralInternal& s1, const QString& s2) {
+bool operator!=(const KBibTeX::Latin1LiteralInternal& s1, const TQString& s2) {
return !(s2 == s1);
}
diff --git a/src/macro.cpp b/src/macro.cpp
index 4958e6f..a25d4d8 100644
--- a/src/macro.cpp
+++ b/src/macro.cpp
@@ -17,15 +17,15 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qregexp.h>
-#include <qstringlist.h>
+#include <ntqregexp.h>
+#include <ntqstringlist.h>
#include "macro.h"
namespace BibTeX
{
- Macro::Macro( const QString &key )
+ Macro::Macro( const TQString &key )
: Element(), m_key( key ), m_value( new Value() )
{
// nothing
@@ -42,12 +42,12 @@ namespace BibTeX
delete m_value;
}
- void Macro::setKey( const QString &key )
+ void Macro::setKey( const TQString &key )
{
m_key = key;
}
- QString Macro::key() const
+ TQString Macro::key() const
{
return m_key;
}
@@ -70,9 +70,9 @@ namespace BibTeX
}
}
- bool Macro::containsPattern( const QString& pattern, EntryField::FieldType fieldType, FilterType filterType, bool caseSensitive ) const
+ bool Macro::containsPattern( const TQString& pattern, EntryField::FieldType fieldType, FilterType filterType, bool caseSensitive ) const
{
- QString text = QString( m_key ).append( m_value->simplifiedText() );
+ TQString text = TQString( m_key ).append( m_value->simplifiedText() );
if ( filterType == ftExact )
{
@@ -82,9 +82,9 @@ namespace BibTeX
else
{
/** for each word in the search pattern ... */
- QStringList words = QStringList::split( QRegExp( "\\s+" ), pattern );
+ TQStringList words = TQStringList::split( TQRegExp( "\\s+" ), pattern );
unsigned int hits = 0;
- for ( QStringList::Iterator it = words.begin(); it != words.end(); ++it )
+ for ( TQStringList::Iterator it = words.begin(); it != words.end(); ++it )
{
/** check if word is contained in text */
if ( fieldType == EntryField::ftUnknown && text.contains( *it, caseSensitive ) )
@@ -108,7 +108,7 @@ namespace BibTeX
m_value = new Value( other->m_value );
}
- QString Macro::text() const
+ TQString Macro::text() const
{
return m_key + "=" + m_value->text();
}
diff --git a/src/macro.h b/src/macro.h
index ae42bdc..13168eb 100644
--- a/src/macro.h
+++ b/src/macro.h
@@ -24,31 +24,31 @@
#include <entryfield.h>
#include <value.h>
-class QString;
+class TQString;
namespace BibTeX
{
class Macro : public Element
{
public:
- Macro( const QString &key );
+ Macro( const TQString &key );
Macro( Macro *other );
virtual ~Macro();
- void setKey( const QString &key );
- QString key() const;
+ void setKey( const TQString &key );
+ TQString key() const;
Value *value() const;
void setValue( Value *value );
- bool containsPattern( const QString& pattern, EntryField::FieldType fieldType = EntryField::ftUnknown, FilterType filterType = BibTeX::Element::ftExact, bool caseSensitive = FALSE ) const;
+ bool containsPattern( const TQString& pattern, EntryField::FieldType fieldType = EntryField::ftUnknown, FilterType filterType = BibTeX::Element::ftExact, bool caseSensitive = FALSE ) const;
Element* clone();
void copyFrom( Macro *other );
- QString text() const;
+ TQString text() const;
private:
- QString m_key;
+ TQString m_key;
Value *m_value;
};
diff --git a/src/macrowidget.cpp b/src/macrowidget.cpp
index 5acca02..ce89e14 100644
--- a/src/macrowidget.cpp
+++ b/src/macrowidget.cpp
@@ -17,8 +17,8 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qlabel.h>
-#include <qlayout.h>
+#include <ntqlabel.h>
+#include <ntqlayout.h>
#include <klineedit.h>
#include <kdialogbase.h>
@@ -34,7 +34,7 @@
namespace KBibTeX
{
- QDialog::DialogCode MacroWidget::execute( BibTeX::Macro *macro, bool isReadOnly, QWidget *parent, const char *name )
+ TQDialog::DialogCode MacroWidget::execute( BibTeX::Macro *macro, bool isReadOnly, TQWidget *parent, const char *name )
{
KDialogBase * dlg = new KDialogBase( parent, name, TRUE, i18n( "Edit BibTeX Macro" ), KDialogBase::Ok | KDialogBase::Cancel );
MacroWidget* macroWidget = new MacroWidget( macro, isReadOnly, dlg, "MacroWidget" );
@@ -42,7 +42,7 @@ namespace KBibTeX
dlg->setMainWidget( macroWidget );
connect( dlg, SIGNAL( okClicked() ), macroWidget, SLOT( apply() ) );
- QDialog::DialogCode result = ( QDialog::DialogCode ) dlg->exec();
+ TQDialog::DialogCode result = ( TQDialog::DialogCode ) dlg->exec();
delete( macroWidget );
delete( dlg );
@@ -50,8 +50,8 @@ namespace KBibTeX
return result;
}
- MacroWidget::MacroWidget( BibTeX::Macro *bibtexmacro, bool isReadOnly, QWidget *parent, const char *name )
- : QWidget( parent, name ), m_isReadOnly( isReadOnly ), m_bibtexmacro( bibtexmacro )
+ MacroWidget::MacroWidget( BibTeX::Macro *bibtexmacro, bool isReadOnly, TQWidget *parent, const char *name )
+ : TQWidget( parent, name ), m_isReadOnly( isReadOnly ), m_bibtexmacro( bibtexmacro )
{
setupGUI();
reset();
@@ -79,16 +79,16 @@ namespace KBibTeX
{
setMinimumWidth( 384 );
- QVBoxLayout * layout = new QVBoxLayout( this, 0, KDialog::spacingHint() );
+ TQVBoxLayout * layout = new TQVBoxLayout( this, 0, KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "Macro &id:" ), this );
+ TQLabel *label = new TQLabel( i18n( "Macro &id:" ), this );
layout->addWidget( label );
m_lineEditMacroId = new KLineEdit( this, "m_lineEditMacroId" );
m_lineEditMacroId->setReadOnly( m_isReadOnly );
layout->addWidget( m_lineEditMacroId );
label->setBuddy( m_lineEditMacroId );
- label = new QLabel( i18n( "Macro &value:" ), this );
+ label = new TQLabel( i18n( "Macro &value:" ), this );
layout->addWidget( label );
m_fieldLineEditMacroValue = new KBibTeX::FieldLineEdit( i18n( "Macro" ), KBibTeX::FieldLineEdit::itMultiLine, m_isReadOnly, this, "m_fieldLineEditMacroValue" );
layout->addWidget( m_fieldLineEditMacroValue );
diff --git a/src/macrowidget.h b/src/macrowidget.h
index 38d65ec..00fb9ff 100644
--- a/src/macrowidget.h
+++ b/src/macrowidget.h
@@ -20,7 +20,7 @@
#ifndef MACROWIDGET_H
#define MACROWIDGET_H
-#include <qwidget.h>
+#include <ntqwidget.h>
#include <macro.h>
#include <fieldlineedit.h>
@@ -29,11 +29,11 @@ class KLineEdit;
namespace KBibTeX
{
- class MacroWidget : public QWidget
+ class MacroWidget : public TQWidget
{
Q_OBJECT
public:
- static QDialog::DialogCode execute( BibTeX::Macro *macro, bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+ static TQDialog::DialogCode execute( BibTeX::Macro *macro, bool isReadOnly, TQWidget *parent = 0, const char *name = 0 );
private slots:
void apply();
@@ -45,7 +45,7 @@ namespace KBibTeX
KLineEdit *m_lineEditMacroId;
KBibTeX::FieldLineEdit *m_fieldLineEditMacroValue;
- MacroWidget( BibTeX::Macro *bibtexmacro, bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+ MacroWidget( BibTeX::Macro *bibtexmacro, bool isReadOnly, TQWidget *parent = 0, const char *name = 0 );
~MacroWidget();
void setupGUI();
diff --git a/src/main.cpp b/src/main.cpp
index ecec2b0..b4fc9df 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -20,8 +20,8 @@
// #define UNIQUEAPP 1
-#include <qframe.h>
-#include <qpixmap.h>
+#include <ntqframe.h>
+#include <ntqpixmap.h>
#ifdef UNIQUEAPP
#include <kuniqueapplication.h>
#else // UNIQUEAPP
diff --git a/src/mergeelements.cpp b/src/mergeelements.cpp
index 9ad05d7..3bb1083 100644
--- a/src/mergeelements.cpp
+++ b/src/mergeelements.cpp
@@ -19,10 +19,10 @@
***************************************************************************/
#include <cmath>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qprogressbar.h>
-#include <qtimer.h>
+#include <ntqlayout.h>
+#include <ntqlabel.h>
+#include <ntqprogressbar.h>
+#include <ntqtimer.h>
#include <klocale.h>
#include <kpushbutton.h>
@@ -45,8 +45,8 @@
namespace KBibTeX
{
- MergeElementsCliqueItem::MergeElementsCliqueItem( BibTeX::Entry* _entry, BibTeX::Macro* _macro, BibTeX::Preamble* _preamble, QListView *parent )
- : QCheckListItem( parent, _entry == NULL ?( _macro == NULL ? _preamble->value()->text() : _macro->key() ) : _entry->id(), QCheckListItem::CheckBox ), entry( _entry ), macro( _macro ), preamble( _preamble )
+ MergeElementsCliqueItem::MergeElementsCliqueItem( BibTeX::Entry* _entry, BibTeX::Macro* _macro, BibTeX::Preamble* _preamble, TQListView *parent )
+ : TQCheckListItem( parent, _entry == NULL ?( _macro == NULL ? _preamble->value()->text() : _macro->key() ) : _entry->id(), TQCheckListItem::CheckBox ), entry( _entry ), macro( _macro ), preamble( _preamble )
{
// nothing
}
@@ -56,71 +56,71 @@ namespace KBibTeX
emit stateChanged( this );
};
- MergeEntriesAlternativesController::MergeEntriesAlternativesController( const QString &label, QListView *parent )
- : QCheckListItem( parent, label, QCheckListItem::RadioButtonController ), fieldType( BibTeX::EntryField::ftUnknown ), fieldName( label )
+ MergeEntriesAlternativesController::MergeEntriesAlternativesController( const TQString &label, TQListView *parent )
+ : TQCheckListItem( parent, label, TQCheckListItem::RadioButtonController ), fieldType( BibTeX::EntryField::ftUnknown ), fieldName( label )
{
// nothing
}
- MergeEntriesAlternativesController::MergeEntriesAlternativesController( BibTeX::EntryField::FieldType _fieldType, QListView *parent )
- : QCheckListItem( parent, BibTeX::EntryField::fieldTypeToString( _fieldType ), QCheckListItem::RadioButtonController ), fieldType( _fieldType ), fieldName( BibTeX::EntryField::fieldTypeToString( _fieldType ) )
+ MergeEntriesAlternativesController::MergeEntriesAlternativesController( BibTeX::EntryField::FieldType _fieldType, TQListView *parent )
+ : TQCheckListItem( parent, BibTeX::EntryField::fieldTypeToString( _fieldType ), TQCheckListItem::RadioButtonController ), fieldType( _fieldType ), fieldName( BibTeX::EntryField::fieldTypeToString( _fieldType ) )
{
// nothing
}
- MergeMacrosAlternativesController::MergeMacrosAlternativesController( bool isKey, QListView *parent )
- : QCheckListItem( parent, isKey ? i18n( "Key" ) : i18n( "Value" ), QCheckListItem::RadioButtonController )
+ MergeMacrosAlternativesController::MergeMacrosAlternativesController( bool isKey, TQListView *parent )
+ : TQCheckListItem( parent, isKey ? i18n( "Key" ) : i18n( "Value" ), TQCheckListItem::RadioButtonController )
{
// nothing
}
MergeEntriesAlternativesItem::MergeEntriesAlternativesItem( BibTeX::EntryField *_field, MergeEntriesAlternativesController *parent )
- : QCheckListItem( parent, _field->value()->text(), QCheckListItem::RadioButton ), field( _field )
+ : TQCheckListItem( parent, _field->value()->text(), TQCheckListItem::RadioButton ), field( _field )
{
// nothing
}
MergeMacrosAlternativesItem::MergeMacrosAlternativesItem( BibTeX::Value *_value, MergeMacrosAlternativesController *parent )
- : QCheckListItem( parent, _value->text(), QCheckListItem::RadioButton ), value( _value )
+ : TQCheckListItem( parent, _value->text(), TQCheckListItem::RadioButton ), value( _value )
{
// nothing
}
- MergeElementsAlternativesId::MergeElementsAlternativesId( const QString & _id, MergeEntriesAlternativesController *parent ) : QCheckListItem( parent, _id, QCheckListItem::RadioButton ), id( _id )
+ MergeElementsAlternativesId::MergeElementsAlternativesId( const TQString & _id, MergeEntriesAlternativesController *parent ) : TQCheckListItem( parent, _id, TQCheckListItem::RadioButton ), id( _id )
{
// nothing
}
- MergeMacroAlternativesKey::MergeMacroAlternativesKey( const QString & _key, MergeMacrosAlternativesController *parent ) : QCheckListItem( parent, _key, QCheckListItem::RadioButton ), key( _key )
+ MergeMacroAlternativesKey::MergeMacroAlternativesKey( const TQString & _key, MergeMacrosAlternativesController *parent ) : TQCheckListItem( parent, _key, TQCheckListItem::RadioButton ), key( _key )
{
// nothing
}
- MergeEntriesAlternativesEntryType::MergeEntriesAlternativesEntryType( const QString & _typeString, MergeEntriesAlternativesController *parent )
- : QCheckListItem( parent, _typeString, QCheckListItem::RadioButton ), typeString( _typeString ), type( BibTeX::Entry::entryTypeFromString( _typeString ) )
+ MergeEntriesAlternativesEntryType::MergeEntriesAlternativesEntryType( const TQString & _typeString, MergeEntriesAlternativesController *parent )
+ : TQCheckListItem( parent, _typeString, TQCheckListItem::RadioButton ), typeString( _typeString ), type( BibTeX::Entry::entryTypeFromString( _typeString ) )
{
// nothing
}
MergeEntriesAlternativesEntryType::MergeEntriesAlternativesEntryType( BibTeX::Entry::EntryType _type, MergeEntriesAlternativesController *parent )
- : QCheckListItem( parent, BibTeX::Entry::entryTypeToString( _type ), QCheckListItem::RadioButton ), typeString( BibTeX::Entry::entryTypeToString( _type ) ), type( _type )
+ : TQCheckListItem( parent, BibTeX::Entry::entryTypeToString( _type ), TQCheckListItem::RadioButton ), typeString( BibTeX::Entry::entryTypeToString( _type ) ), type( _type )
{
// nothing
}
- MergePreambleAlternativesController::MergePreambleAlternativesController( QListView *parent )
- : QCheckListItem( parent, i18n( "Preamble text" ), QCheckListItem::RadioButtonController )
+ MergePreambleAlternativesController::MergePreambleAlternativesController( TQListView *parent )
+ : TQCheckListItem( parent, i18n( "Preamble text" ), TQCheckListItem::RadioButtonController )
{
// nothing
}
- MergePreambleAlternatives::MergePreambleAlternatives( const QString &_text, MergePreambleAlternativesController *parent )
- :QCheckListItem( parent, _text, QCheckListItem::RadioButton ), text( _text )
+ MergePreambleAlternatives::MergePreambleAlternatives( const TQString &_text, MergePreambleAlternativesController *parent )
+ :TQCheckListItem( parent, _text, TQCheckListItem::RadioButton ), text( _text )
{
// nothing
}
- MergeElements::MergeElements( QWidget *parent )
+ MergeElements::MergeElements( TQWidget *parent )
: KDialogBase( parent, "MergeElements", true, "undefined", Ok | Cancel | User1 | User2, User1, true, KGuiItem( i18n( "Next" ), "next" ), KGuiItem( i18n( "Previous" ), "previous" ) ), m_currentCliqueIndex( 0 )
{
setupGUI();
@@ -135,13 +135,13 @@ namespace KBibTeX
void MergeElements::setupGUI()
{
- QWidget *vboxContainer = new QWidget( this );
+ TQWidget *vboxContainer = new TQWidget( this );
setMainWidget( vboxContainer );
- QBoxLayout *vboxLayout = new QVBoxLayout( vboxContainer, 0, KDialog::spacingHint() );
- vboxLayout->setResizeMode( QLayout::Minimum );
+ TQBoxLayout *vboxLayout = new TQVBoxLayout( vboxContainer, 0, KDialog::spacingHint() );
+ vboxLayout->setResizeMode( TQLayout::Minimum );
- QLabel *label = new QLabel( i18n( "Select elements to merge. At least two elements must be checked to perform a merge operation. Checked entries will be replaced by the merged element, unchecked elements will be kept." ), vboxContainer );
- label->setAlignment( Qt::WordBreak );
+ TQLabel *label = new TQLabel( i18n( "Select elements to merge. At least two elements must be checked to perform a merge operation. Checked entries will be replaced by the merged element, unchecked elements will be kept." ), vboxContainer );
+ label->setAlignment( TQt::WordBreak );
vboxLayout->addWidget( label );
m_listViewClique = new KListView( vboxContainer );
m_listViewClique->addColumn( i18n( "Entry/Macro Id" ) );
@@ -151,13 +151,13 @@ namespace KBibTeX
vboxLayout->setStretchFactor( m_listViewClique, 1 );
label->setBuddy( m_listViewClique );
- m_progressBar = new QProgressBar( vboxContainer );
+ m_progressBar = new TQProgressBar( vboxContainer );
vboxLayout->addWidget( m_progressBar );
vboxLayout->addSpacing( KDialog::spacingHint() * 2 );
- label = new QLabel( i18n( "Choose from this list which alternatives you want to keep in the merged element." ), vboxContainer );
- label->setAlignment( Qt::WordBreak );
+ label = new TQLabel( i18n( "Choose from this list which alternatives you want to keep in the merged element." ), vboxContainer );
+ label->setAlignment( TQt::WordBreak );
vboxLayout->addWidget( label );
m_listViewAlternatives = new KListView( vboxContainer );
m_listViewAlternatives->addColumn( i18n( "Field/Key" ) );
@@ -167,7 +167,7 @@ namespace KBibTeX
vboxLayout->setStretchFactor( m_listViewAlternatives, 3 );
label->setBuddy( m_listViewAlternatives );
- connect( m_listViewClique, SIGNAL( doubleClicked( QListViewItem * ) ), this, SLOT( slotPreviewElement( QListViewItem * ) ) );
+ connect( m_listViewClique, SIGNAL( doubleClicked( TQListViewItem * ) ), this, SLOT( slotPreviewElement( TQListViewItem * ) ) );
connect( this, SIGNAL( user1Clicked() ), this, SLOT( slotNextClique() ) );
connect( this, SIGNAL( user2Clicked() ), this, SLOT( slotPreviousClique() ) );
connect( this, SIGNAL( okClicked() ), this, SLOT( saveCurrentMergeSet() ) );
@@ -226,13 +226,13 @@ namespace KBibTeX
m_mergeSetList[m_currentCliqueIndex]->fields.clear();
}
m_mergeSetList[m_currentCliqueIndex]->type = BibTeX::Entry::etUnknown;
- m_mergeSetList[m_currentCliqueIndex]->typeString = QString::null;
- m_mergeSetList[m_currentCliqueIndex]->id = QString::null;
- m_mergeSetList[m_currentCliqueIndex]->macroKey = QString::null;
+ m_mergeSetList[m_currentCliqueIndex]->typeString = TQString::null;
+ m_mergeSetList[m_currentCliqueIndex]->id = TQString::null;
+ m_mergeSetList[m_currentCliqueIndex]->macroKey = TQString::null;
m_mergeSetList[m_currentCliqueIndex]->macroValue = NULL;
- m_mergeSetList[m_currentCliqueIndex]->preambleText=QString::null;
+ m_mergeSetList[m_currentCliqueIndex]->preambleText=TQString::null;
- for ( QListViewItemIterator it( m_listViewClique, QListViewItemIterator::Checked ); it.current(); ++it )
+ for ( TQListViewItemIterator it( m_listViewClique, TQListViewItemIterator::Checked ); it.current(); ++it )
{
MergeElementsCliqueItem *eci = dynamic_cast<MergeElementsCliqueItem*>( *it );
BibTeX::Entry *entry = eci->entry;
@@ -246,7 +246,7 @@ namespace KBibTeX
m_mergeSetList[m_currentCliqueIndex]->preambles.append( preamble );
}
- for ( QListViewItemIterator it( m_listViewAlternatives, QListViewItemIterator::Checked ); it.current(); ++it )
+ for ( TQListViewItemIterator it( m_listViewAlternatives, TQListViewItemIterator::Checked ); it.current(); ++it )
{
MergeEntriesAlternativesItem *item = dynamic_cast<MergeEntriesAlternativesItem*>( *it );
if ( item != NULL )
@@ -298,14 +298,14 @@ namespace KBibTeX
return;
}
- for ( QListViewItemIterator it( m_listViewClique ); it.current(); ++it )
+ for ( TQListViewItemIterator it( m_listViewClique ); it.current(); ++it )
{
MergeElementsCliqueItem *item = dynamic_cast<MergeElementsCliqueItem*>( *it );
BibTeX::Entry *entry = item->entry;
BibTeX::Macro *macro = item->macro;
BibTeX::Preamble *preamble = item->preamble;
if ( entry != NULL )
- for ( QValueList<BibTeX::Entry*>::Iterator it2 = m_mergeSetList[m_currentCliqueIndex]->entries.begin(); it2 != m_mergeSetList[m_currentCliqueIndex]->entries.end(); ++it2 )
+ for ( TQValueList<BibTeX::Entry*>::Iterator it2 = m_mergeSetList[m_currentCliqueIndex]->entries.begin(); it2 != m_mergeSetList[m_currentCliqueIndex]->entries.end(); ++it2 )
{
if ( entry->id() == ( *it2 )->id() )
{
@@ -315,7 +315,7 @@ namespace KBibTeX
}
else if ( macro != NULL )
{
- for ( QValueList<BibTeX::Macro*>::Iterator it2 = m_mergeSetList[m_currentCliqueIndex]->macros.begin(); it2 != m_mergeSetList[m_currentCliqueIndex]->macros.end(); ++it2 )
+ for ( TQValueList<BibTeX::Macro*>::Iterator it2 = m_mergeSetList[m_currentCliqueIndex]->macros.begin(); it2 != m_mergeSetList[m_currentCliqueIndex]->macros.end(); ++it2 )
if ( macro->key() == ( *it2 )->key() )
{
item->setOn( true );
@@ -323,7 +323,7 @@ namespace KBibTeX
}
}
else if ( preamble!=NULL )
- for ( QValueList<BibTeX::Preamble*>::Iterator it2 = m_mergeSetList[m_currentCliqueIndex]->preambles.begin(); it2 != m_mergeSetList[m_currentCliqueIndex]->preambles.end(); ++it2 )
+ for ( TQValueList<BibTeX::Preamble*>::Iterator it2 = m_mergeSetList[m_currentCliqueIndex]->preambles.begin(); it2 != m_mergeSetList[m_currentCliqueIndex]->preambles.end(); ++it2 )
if ( preamble->value()->text() == ( *it2 )->value()->text() )
{
item->setOn( true );
@@ -333,12 +333,12 @@ namespace KBibTeX
slotRefreshAlternatives();
- for ( QListViewItemIterator it( m_listViewAlternatives ); it.current(); ++it )
+ for ( TQListViewItemIterator it( m_listViewAlternatives ); it.current(); ++it )
{
MergeEntriesAlternativesItem *item = dynamic_cast<MergeEntriesAlternativesItem*>( *it );
if ( item != NULL )
{
- for ( QValueList<BibTeX::EntryField*>::Iterator it2 = m_mergeSetList[m_currentCliqueIndex]->fields.begin(); it2 != m_mergeSetList[m_currentCliqueIndex]->fields.end(); ++it2 )
+ for ( TQValueList<BibTeX::EntryField*>::Iterator it2 = m_mergeSetList[m_currentCliqueIndex]->fields.begin(); it2 != m_mergeSetList[m_currentCliqueIndex]->fields.end(); ++it2 )
if ( item->field->fieldTypeName().lower() == ( *it2 )->fieldTypeName().lower() && item->field->value()->text() == ( *it2 )->value()->text() )
{
item->setOn( true );
@@ -386,7 +386,7 @@ namespace KBibTeX
mpa->setOn( true );
}
else
- qDebug( "Item is of unknown type" );
+ tqDebug( "Item is of unknown type" );
}
}
}
@@ -404,12 +404,12 @@ namespace KBibTeX
if ( !m_mergeSetList[i]->entries.isEmpty() )
{
- QString id = m_mergeSetList[i]->id == QString::null ? ( *m_mergeSetList[i]->entries.begin() )->id() : m_mergeSetList[i]->id;
+ TQString id = m_mergeSetList[i]->id == TQString::null ? ( *m_mergeSetList[i]->entries.begin() )->id() : m_mergeSetList[i]->id;
BibTeX::Entry *newEntry = NULL;
if ( m_mergeSetList[i]->type == BibTeX::Entry::etUnknown )
{
- if ( m_mergeSetList[i]->typeString == QString::null )
+ if ( m_mergeSetList[i]->typeString == TQString::null )
{
BibTeX::Entry *firstEntry = *m_mergeSetList[i]->entries.begin();
if ( firstEntry->entryType() == BibTeX::Entry::etUnknown )
@@ -423,19 +423,19 @@ namespace KBibTeX
else
newEntry = new BibTeX::Entry( m_mergeSetList[i]->type, id );
- for ( QValueList<BibTeX::EntryField*>::Iterator it = m_mergeSetList[i]->fields.begin(); it != m_mergeSetList[i]->fields.end(); ++it )
+ for ( TQValueList<BibTeX::EntryField*>::Iterator it = m_mergeSetList[i]->fields.begin(); it != m_mergeSetList[i]->fields.end(); ++it )
{
newEntry->addField( new BibTeX::EntryField( *it ) );
}
- for ( QValueList<BibTeX::Entry*>::Iterator it = m_mergeSetList[i]->entries.begin(); it != m_mergeSetList[i]->entries.end(); ++it )
- for ( QValueList<BibTeX::EntryField*>::ConstIterator fIt = ( *it )->begin(); fIt != ( *it )->end(); ++fIt )
+ for ( TQValueList<BibTeX::Entry*>::Iterator it = m_mergeSetList[i]->entries.begin(); it != m_mergeSetList[i]->entries.end(); ++it )
+ for ( TQValueList<BibTeX::EntryField*>::ConstIterator fIt = ( *it )->begin(); fIt != ( *it )->end(); ++fIt )
if ( newEntry->getField(( *fIt )->fieldTypeName() ) == NULL )
{
newEntry->addField( new BibTeX::EntryField( *fIt ) );
}
- for ( QValueList<BibTeX::Entry*>::Iterator it = m_mergeSetList[i]->entries.begin(); it != m_mergeSetList[i]->entries.end(); ++it )
+ for ( TQValueList<BibTeX::Entry*>::Iterator it = m_mergeSetList[i]->entries.begin(); it != m_mergeSetList[i]->entries.end(); ++it )
{
BibTeX::Entry *entry = dynamic_cast<BibTeX::Entry*>( bibTeXFile->containsKey(( *it )->id() ) );
if ( entry != NULL )
@@ -454,7 +454,7 @@ namespace KBibTeX
BibTeX::Macro *newMacro = new BibTeX::Macro( m_mergeSetList[i]->macroKey );
newMacro->setValue( m_mergeSetList[i]->macroValue );
- for ( QValueList<BibTeX::Macro*>::Iterator it = m_mergeSetList[i]->macros.begin(); it != m_mergeSetList[i]->macros.end(); ++it )
+ for ( TQValueList<BibTeX::Macro*>::Iterator it = m_mergeSetList[i]->macros.begin(); it != m_mergeSetList[i]->macros.end(); ++it )
{
bibTeXFile->deleteElement( *it );
if ( otherBibTeXFile != NULL )
@@ -467,7 +467,7 @@ namespace KBibTeX
{
BibTeX::Preamble *newPreamble = new BibTeX::Preamble( m_mergeSetList[i]->preambleText );
- for ( QValueList<BibTeX::Preamble*>::Iterator it = m_mergeSetList[i]->preambles.begin(); it != m_mergeSetList[i]->preambles.end(); ++it )
+ for ( TQValueList<BibTeX::Preamble*>::Iterator it = m_mergeSetList[i]->preambles.begin(); it != m_mergeSetList[i]->preambles.end(); ++it )
{
bibTeXFile->deleteElement( *it );
if ( otherBibTeXFile != NULL )
@@ -484,23 +484,23 @@ namespace KBibTeX
setCaption( i18n( "Find Duplicates" ) );
Settings * settings = Settings::self( NULL );
int sensitivity = ( int )( FindDuplicates::maxDistance / exp( log( 10 ) * settings->editing_findDuplicatesSensitivity / 10.0 ) );
- qDebug( "sensitivity= %i / %i", sensitivity, FindDuplicates::maxDistance );
+ tqDebug( "sensitivity= %i / %i", sensitivity, FindDuplicates::maxDistance );
FindDuplicates findDuplicates( m_duplicateCliqueList, sensitivity, bibTeXFile, parentWidget( true ) );
if ( m_duplicateCliqueList.isEmpty() )
{
KMessageBox::information( parentWidget( true ), i18n( "No duplicates found." ), i18n( "Find Duplicates" ) );
- return QDialog::Rejected;
+ return TQDialog::Rejected;
}
m_mergeSetList = new MergeSet*[m_duplicateCliqueList.size()];
memset( m_mergeSetList, 0, sizeof( MergeSet* )*m_duplicateCliqueList.size() );
- qDebug( "%i cliques", m_duplicateCliqueList.size() );
+ tqDebug( "%i cliques", m_duplicateCliqueList.size() );
setClique( 0 );
int result = exec();
- if ( result == QDialog::Accepted )
+ if ( result == TQDialog::Accepted )
applyMergeSet( bibTeXFile );
delete[] m_mergeSetList;
@@ -510,24 +510,24 @@ namespace KBibTeX
void MergeElements::slotRefreshAlternatives()
{
- QMap<BibTeX::EntryField::FieldType, MergeEntriesAlternativesController*> mapFieldToController;
- QMap<BibTeX::EntryField::FieldType, First> firstEntryData;
+ TQMap<BibTeX::EntryField::FieldType, MergeEntriesAlternativesController*> mapFieldToController;
+ TQMap<BibTeX::EntryField::FieldType, First> firstEntryData;
bool first = true;
MergePreambleAlternativesController* preambleController = NULL;
MergeMacrosAlternativesController* macroKeyController = NULL;
MergeMacrosAlternativesController* macroValueController = NULL;
MergeEntriesAlternativesController *idController = NULL;
MergeEntriesAlternativesController *typeController = NULL;
- QString firstId = QString::null;
- QString firstMacroKey = QString::null;
+ TQString firstId = TQString::null;
+ TQString firstMacroKey = TQString::null;
BibTeX::Value *firstMacroValue = NULL;
- QString firstPreambleText = QString::null;
+ TQString firstPreambleText = TQString::null;
BibTeX::Entry::EntryType firstType = BibTeX::Entry::etUnknown;
- QString firstTypeString = QString::null;
+ TQString firstTypeString = TQString::null;
m_listViewAlternatives->clear();
- for ( QListViewItemIterator it( m_listViewClique, QListViewItemIterator::Checked ); it.current(); ++it )
+ for ( TQListViewItemIterator it( m_listViewClique, TQListViewItemIterator::Checked ); it.current(); ++it )
{
MergeElementsCliqueItem *meci = dynamic_cast<MergeElementsCliqueItem*>( *it );
BibTeX::Entry *entry = NULL;
@@ -563,9 +563,9 @@ namespace KBibTeX
}
else
{
- QString thisText = entry->id();
+ TQString thisText = entry->id();
bool isNew = true;
- for ( QListViewItem *cur = idController->firstChild(); isNew && cur != NULL; cur = cur->nextSibling() )
+ for ( TQListViewItem *cur = idController->firstChild(); isNew && cur != NULL; cur = cur->nextSibling() )
{
MergeElementsAlternativesId *meai = dynamic_cast<MergeElementsAlternativesId*>( cur );
isNew = meai->id != thisText;
@@ -590,10 +590,10 @@ namespace KBibTeX
}
else
{
- QString typeString = entry->entryTypeString();
+ TQString typeString = entry->entryTypeString();
BibTeX::Entry::EntryType type = entry->entryType();
bool isNew = true;
- for ( QListViewItem *cur = typeController->firstChild(); isNew && cur != NULL; cur = cur->nextSibling() )
+ for ( TQListViewItem *cur = typeController->firstChild(); isNew && cur != NULL; cur = cur->nextSibling() )
{
MergeEntriesAlternativesEntryType *meat = dynamic_cast<MergeEntriesAlternativesEntryType*>( cur );
isNew = type == BibTeX::Entry::etUnknown && meat->typeString != typeString || meat->type != type;
@@ -611,9 +611,9 @@ namespace KBibTeX
if ( mapFieldToController.contains(( *efi )->fieldType() ) )
{
MergeEntriesAlternativesController *controller = mapFieldToController[( *efi )->fieldType()];
- QString thisText = ( *efi )->value()->text();
+ TQString thisText = ( *efi )->value()->text();
bool isNew = true;
- for ( QListViewItem *cur = controller->firstChild(); isNew && cur != NULL; cur = cur->nextSibling() )
+ for ( TQListViewItem *cur = controller->firstChild(); isNew && cur != NULL; cur = cur->nextSibling() )
{
MergeEntriesAlternativesItem *meai = dynamic_cast<MergeEntriesAlternativesItem*>( cur );
isNew = meai->field->value()->text() != thisText;
@@ -623,8 +623,8 @@ namespace KBibTeX
}
else if ( firstEntryData.contains(( *efi )->fieldType() ) )
{
- QString firstText = firstEntryData[( *efi )->fieldType()].field->value()->text();
- QString thisText = ( *efi )->value()->text();
+ TQString firstText = firstEntryData[( *efi )->fieldType()].field->value()->text();
+ TQString thisText = ( *efi )->value()->text();
if ( firstText != thisText )
{
MergeEntriesAlternativesController *controller = new MergeEntriesAlternativesController(( *efi )->fieldType(), m_listViewAlternatives );
@@ -666,9 +666,9 @@ namespace KBibTeX
}
else
{
- QString thisText = macro->key();
+ TQString thisText = macro->key();
bool isNew = true;
- for ( QListViewItem *cur = macroKeyController->firstChild(); isNew && cur != NULL; cur = cur->nextSibling() )
+ for ( TQListViewItem *cur = macroKeyController->firstChild(); isNew && cur != NULL; cur = cur->nextSibling() )
{
MergeMacroAlternativesKey *mak = dynamic_cast<MergeMacroAlternativesKey*>( cur );
isNew = mak->key != thisText;
@@ -691,9 +691,9 @@ namespace KBibTeX
}
else
{
- QString macroString = macro->value()->text();
+ TQString macroString = macro->value()->text();
bool isNew = true;
- for ( QListViewItem *cur = macroValueController->firstChild(); isNew && cur != NULL; cur = cur->nextSibling() )
+ for ( TQListViewItem *cur = macroValueController->firstChild(); isNew && cur != NULL; cur = cur->nextSibling() )
{
MergeMacrosAlternativesItem *mai = dynamic_cast<MergeMacrosAlternativesItem*>( cur );
isNew = macroString != mai->value->text();
@@ -721,9 +721,9 @@ namespace KBibTeX
}
else
{
- QString thisText = preamble->value()->text();
+ TQString thisText = preamble->value()->text();
bool isNew = true;
- for ( QListViewItem *cur = preambleController->firstChild(); isNew && cur != NULL; cur = cur->nextSibling() )
+ for ( TQListViewItem *cur = preambleController->firstChild(); isNew && cur != NULL; cur = cur->nextSibling() )
{
MergePreambleAlternatives *mpa = dynamic_cast<MergePreambleAlternatives*>( cur );
isNew = mpa->text != thisText;
@@ -757,7 +757,7 @@ namespace KBibTeX
enableButton( User2, false );
}
- void MergeElements::slotPreviewElement( QListViewItem *item )
+ void MergeElements::slotPreviewElement( TQListViewItem *item )
{
MergeElementsCliqueItem *meci = dynamic_cast<MergeElementsCliqueItem*>( item );
if ( meci != NULL && meci->entry != NULL )
@@ -771,8 +771,8 @@ namespace KBibTeX
/* This function was taken form KMainWindow of KDE 3.5 and modified to fit KBibTeX */
void MergeElements::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
@@ -787,10 +787,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
@@ -802,15 +802,15 @@ namespace KBibTeX
config->writeEntry( heightString, h );
}
- void MergeElements::showEvent( QShowEvent * )
+ void MergeElements::showEvent( TQShowEvent * )
{
- qDebug( "showEvent" );
- QTimer::singleShot( 10, this, SLOT( slotRestore() ) );
+ tqDebug( "showEvent" );
+ TQTimer::singleShot( 10, this, SLOT( slotRestore() ) );
}
void MergeElements::slotRestore()
{
- qDebug( "slotRestore" );
+ tqDebug( "slotRestore" );
KConfig * config = kapp->config();
config->setGroup( "MergeElements" );
restoreWindowSize( config );
@@ -820,20 +820,20 @@ namespace KBibTeX
void MergeElements::restoreWindowSize( KConfig *config )
{
// restore the size
- int scnum = QApplication::desktop()->screenNumber( parentWidget() );
- QRect desk = QApplication::desktop()->screenGeometry( scnum );
- QSize size( config->readNumEntry( QString::fromLatin1( "Width %1" ).arg( desk.width() ), 0 ),
- config->readNumEntry( QString::fromLatin1( "Height %1" ).arg( desk.height() ), 0 ) );
+ int scnum = TQApplication::desktop()->screenNumber( parentWidget() );
+ TQRect desk = TQApplication::desktop()->screenGeometry( scnum );
+ 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() )
@@ -849,7 +849,7 @@ namespace KBibTeX
resize( size.width(), height() );
else
resize( size );
- // QWidget::showMaximized() is both insufficient and broken
+ // TQWidget::showMaximized() is both insufficient and broken
KWin::setState( winId(), state );
#else
if ( size.width() > desk.width() || size.height() > desk.height() )
diff --git a/src/mergeelements.h b/src/mergeelements.h
index 88c011e..4752175 100644
--- a/src/mergeelements.h
+++ b/src/mergeelements.h
@@ -29,15 +29,15 @@
class KPushButton;
class KTextEdit;
class KListView;
-class QProgressBar;
+class TQProgressBar;
namespace KBibTeX
{
- class MergeElementsCliqueItem : public QObject, public QCheckListItem
+ class MergeElementsCliqueItem : public TQObject, public TQCheckListItem
{
Q_OBJECT
public:
- MergeElementsCliqueItem( BibTeX::Entry* entry, BibTeX::Macro* macro, BibTeX::Preamble* preamble, QListView *parent );
+ MergeElementsCliqueItem( BibTeX::Entry* entry, BibTeX::Macro* macro, BibTeX::Preamble* preamble, TQListView *parent );
BibTeX::Entry* entry;
BibTeX::Macro* macro;
BibTeX::Preamble* preamble;
@@ -49,71 +49,71 @@ namespace KBibTeX
void stateChanged( MergeElementsCliqueItem* );
};
- class MergeEntriesAlternativesController: public QCheckListItem
+ class MergeEntriesAlternativesController: public TQCheckListItem
{
public:
- MergeEntriesAlternativesController( const QString &label, QListView *parent );
- MergeEntriesAlternativesController( BibTeX::EntryField::FieldType fieldType, QListView *parent );
+ MergeEntriesAlternativesController( const TQString &label, TQListView *parent );
+ MergeEntriesAlternativesController( BibTeX::EntryField::FieldType fieldType, TQListView *parent );
BibTeX::EntryField::FieldType fieldType;
- const QString fieldName;
+ const TQString fieldName;
};
- class MergeMacrosAlternativesController: public QCheckListItem
+ class MergeMacrosAlternativesController: public TQCheckListItem
{
public:
- MergeMacrosAlternativesController( bool isKey, QListView *parent );
+ MergeMacrosAlternativesController( bool isKey, TQListView *parent );
};
- class MergeEntriesAlternativesItem: public QCheckListItem
+ class MergeEntriesAlternativesItem: public TQCheckListItem
{
public:
MergeEntriesAlternativesItem( BibTeX::EntryField *field, MergeEntriesAlternativesController *parent );
BibTeX::EntryField *field;
};
- class MergeMacrosAlternativesItem: public QCheckListItem
+ class MergeMacrosAlternativesItem: public TQCheckListItem
{
public:
MergeMacrosAlternativesItem( BibTeX::Value *value, MergeMacrosAlternativesController *parent );
BibTeX::Value *value;
};
- class MergeElementsAlternativesId: public QCheckListItem
+ class MergeElementsAlternativesId: public TQCheckListItem
{
public:
- MergeElementsAlternativesId( const QString &id, MergeEntriesAlternativesController *parent );
- QString id;
+ MergeElementsAlternativesId( const TQString &id, MergeEntriesAlternativesController *parent );
+ TQString id;
};
- class MergeMacroAlternativesKey: public QCheckListItem
+ class MergeMacroAlternativesKey: public TQCheckListItem
{
public:
- MergeMacroAlternativesKey( const QString &key, MergeMacrosAlternativesController *parent );
- QString key;
+ MergeMacroAlternativesKey( const TQString &key, MergeMacrosAlternativesController *parent );
+ TQString key;
};
- class MergeEntriesAlternativesEntryType: public QCheckListItem
+ class MergeEntriesAlternativesEntryType: public TQCheckListItem
{
public:
- MergeEntriesAlternativesEntryType( const QString &typeString, MergeEntriesAlternativesController *parent );
+ MergeEntriesAlternativesEntryType( const TQString &typeString, MergeEntriesAlternativesController *parent );
MergeEntriesAlternativesEntryType( BibTeX::Entry::EntryType type, MergeEntriesAlternativesController *parent );
- QString typeString;
+ TQString typeString;
BibTeX::Entry::EntryType type;
};
- class MergePreambleAlternativesController: public QCheckListItem
+ class MergePreambleAlternativesController: public TQCheckListItem
{
public:
- MergePreambleAlternativesController( QListView *parent );
+ MergePreambleAlternativesController( TQListView *parent );
};
- class MergePreambleAlternatives: public QCheckListItem
+ class MergePreambleAlternatives: public TQCheckListItem
{
public:
- MergePreambleAlternatives( const QString &text, MergePreambleAlternativesController *parent );
- QString text;
+ MergePreambleAlternatives( const TQString &text, MergePreambleAlternativesController *parent );
+ TQString text;
};
/**
@@ -123,18 +123,18 @@ namespace KBibTeX
{
Q_OBJECT
public:
- MergeElements( QWidget *parent );
+ MergeElements( TQWidget *parent );
~MergeElements();
int mergeDuplicates( BibTeX::File *bibTeXFile );
protected:
- void showEvent( QShowEvent * );
+ void showEvent( TQShowEvent * );
protected slots:
void slotRefreshAlternatives();
void slotNextClique();
void slotPreviousClique();
- void slotPreviewElement( QListViewItem *item );
+ void slotPreviewElement( TQListViewItem *item );
void saveCurrentMergeSet();
void slotRestore();
@@ -148,20 +148,20 @@ namespace KBibTeX
typedef struct
{
- QValueList<BibTeX::Macro*> macros;
- QValueList<BibTeX::Entry*> entries;
- QValueList<BibTeX::EntryField*> fields;
- QValueList<BibTeX::Preamble*> preambles;
- QString macroKey;
+ TQValueList<BibTeX::Macro*> macros;
+ TQValueList<BibTeX::Entry*> entries;
+ TQValueList<BibTeX::EntryField*> fields;
+ TQValueList<BibTeX::Preamble*> preambles;
+ TQString macroKey;
BibTeX::Value *macroValue;
- QString id, typeString;
+ TQString id, typeString;
BibTeX::Entry::EntryType type;
- QString preambleText;
+ TQString preambleText;
} MergeSet;
KListView *m_listViewClique;
KListView *m_listViewAlternatives;
- QProgressBar *m_progressBar;
+ TQProgressBar *m_progressBar;
FindDuplicates::DuplicateCliqueList m_duplicateCliqueList;
MergeSet **m_mergeSetList;
int m_currentCliqueIndex;
diff --git a/src/messagehandler.cpp b/src/messagehandler.cpp
index 273a5eb..941b53d 100644
--- a/src/messagehandler.cpp
+++ b/src/messagehandler.cpp
@@ -27,7 +27,7 @@
namespace KBibTeX {
// all messages go to manager
-void ManagerMessage::send(const QString& message_, Type type_) {
+void ManagerMessage::send(const TQString& message_, Type type_) {
// Fetch::Manager::self()->updateStatus(message_);
// plus errors get a message box
if(type_ == Error) {
@@ -37,7 +37,7 @@ void ManagerMessage::send(const QString& message_, Type type_) {
}
}
-void ManagerMessage::infoList(const QString& message_, const QStringList& list_) {
+void ManagerMessage::infoList(const TQString& message_, const TQStringList& list_) {
KMessageBox::informationList(NULL, message_, list_); // FIXME: some widget instead of NULL
}
diff --git a/src/messagehandler.h b/src/messagehandler.h
index 00fcbe9..c76e7ea 100644
--- a/src/messagehandler.h
+++ b/src/messagehandler.h
@@ -23,8 +23,8 @@
#ifndef KBIBTEX_MESSAGEHANDLER_H
#define KBIBTEX_MESSAGEHANDLER_H
-class QString;
-class QStringList;
+class TQString;
+class TQStringList;
namespace KBibTeX {
@@ -38,8 +38,8 @@ public:
MessageHandler() {}
virtual ~MessageHandler() {}
- virtual void send(const QString& message, Type type) = 0;
- virtual void infoList(const QString& message, const QStringList& list) = 0;
+ virtual void send(const TQString& message, Type type) = 0;
+ virtual void infoList(const TQString& message, const TQStringList& list) = 0;
};
class ManagerMessage : public MessageHandler {
@@ -47,8 +47,8 @@ public:
ManagerMessage() : MessageHandler() {}
virtual ~ManagerMessage() {}
- virtual void send(const QString& message, Type type);
- virtual void infoList(const QString& message, const QStringList& list);
+ virtual void send(const TQString& message, Type type);
+ virtual void infoList(const TQString& message, const TQStringList& list);
};
} // end namespace
diff --git a/src/preamble.cpp b/src/preamble.cpp
index 1b03a0f..3df04f8 100644
--- a/src/preamble.cpp
+++ b/src/preamble.cpp
@@ -17,8 +17,8 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qregexp.h>
-#include <qstringlist.h>
+#include <ntqregexp.h>
+#include <ntqstringlist.h>
#include "preamble.h"
@@ -30,7 +30,7 @@ namespace BibTeX
// TODO
}
- Preamble::Preamble( const QString& text ) : Element()
+ Preamble::Preamble( const TQString& text ) : Element()
{
m_value = new Value( text, false );
}
@@ -63,9 +63,9 @@ namespace BibTeX
}
}
- bool Preamble::containsPattern( const QString& pattern, EntryField::FieldType fieldType, FilterType filterType, bool caseSensitive ) const
+ bool Preamble::containsPattern( const TQString& pattern, EntryField::FieldType fieldType, FilterType filterType, bool caseSensitive ) const
{
- QString text = m_value->simplifiedText();
+ TQString text = m_value->simplifiedText();
if ( filterType == ftExact )
{
@@ -75,9 +75,9 @@ namespace BibTeX
else
{
/** for each word in the search pattern ... */
- QStringList words = QStringList::split( QRegExp( "\\s+" ), pattern );
+ TQStringList words = TQStringList::split( TQRegExp( "\\s+" ), pattern );
unsigned int hits = 0;
- for ( QStringList::Iterator it = words.begin(); it != words.end(); ++it )
+ for ( TQStringList::Iterator it = words.begin(); it != words.end(); ++it )
{
/** check if word is contained in text */
if ( fieldType == EntryField::ftUnknown && text.contains( *it, caseSensitive ) )
@@ -100,7 +100,7 @@ namespace BibTeX
m_value = new Value( other->m_value );
}
- QString Preamble::text() const
+ TQString Preamble::text() const
{
return "Preamble: " + m_value->text();
}
diff --git a/src/preamble.h b/src/preamble.h
index fc6da9d..506096c 100644
--- a/src/preamble.h
+++ b/src/preamble.h
@@ -32,18 +32,18 @@ namespace BibTeX
{
public:
Preamble( );
- Preamble( const QString& text );
+ Preamble( const TQString& text );
Preamble( Preamble *other );
virtual ~Preamble();
Value *value() const;
void setValue( Value *value );
- bool containsPattern( const QString& pattern, EntryField::FieldType fieldType = EntryField::ftUnknown, FilterType filterType = BibTeX::Element::ftExact, bool caseSensitive = FALSE ) const;
+ bool containsPattern( const TQString& pattern, EntryField::FieldType fieldType = EntryField::ftUnknown, FilterType filterType = BibTeX::Element::ftExact, bool caseSensitive = FALSE ) const;
Element* clone();
void copyFrom( Preamble *other );
- QString text() const;
+ TQString text() const;
private:
Value *m_value;
diff --git a/src/preamblewidget.cpp b/src/preamblewidget.cpp
index a1cc0c1..6b74ece 100644
--- a/src/preamblewidget.cpp
+++ b/src/preamblewidget.cpp
@@ -17,8 +17,8 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qlabel.h>
-#include <qlayout.h>
+#include <ntqlabel.h>
+#include <ntqlayout.h>
#include <kdialogbase.h>
#include <klocale.h>
@@ -28,7 +28,7 @@
namespace KBibTeX
{
- QDialog::DialogCode PreambleWidget::execute( BibTeX::Preamble *preamble, bool isReadOnly, QWidget *parent, const char *name )
+ TQDialog::DialogCode PreambleWidget::execute( BibTeX::Preamble *preamble, bool isReadOnly, TQWidget *parent, const char *name )
{
KDialogBase * dlg = new KDialogBase( parent, name, TRUE, i18n( "Edit BibTeX Preamble" ), KDialogBase::Ok | KDialogBase::Cancel );
PreambleWidget* preambleWidget = new PreambleWidget( preamble, isReadOnly, dlg, "PreambleWidget" );
@@ -36,7 +36,7 @@ namespace KBibTeX
dlg->setMainWidget( preambleWidget );
connect( dlg, SIGNAL( okClicked() ), preambleWidget, SLOT( apply() ) );
- QDialog::DialogCode result = ( QDialog::DialogCode ) dlg->exec();
+ TQDialog::DialogCode result = ( TQDialog::DialogCode ) dlg->exec();
delete( preambleWidget );
delete( dlg );
@@ -44,7 +44,7 @@ namespace KBibTeX
return result;
}
- PreambleWidget::PreambleWidget( BibTeX::Preamble *bibtexpreamble, bool isReadOnly, QWidget *parent, const char *name ) : QWidget( parent, name ), m_isReadOnly( isReadOnly ), m_bibtexpreamble( bibtexpreamble )
+ PreambleWidget::PreambleWidget( BibTeX::Preamble *bibtexpreamble, bool isReadOnly, TQWidget *parent, const char *name ) : TQWidget( parent, name ), m_isReadOnly( isReadOnly ), m_bibtexpreamble( bibtexpreamble )
{
setupGUI();
reset();
@@ -71,9 +71,9 @@ namespace KBibTeX
{
setMinimumWidth( 384 );
- QVBoxLayout * layout = new QVBoxLayout( this, 0, KDialog::spacingHint() );
+ TQVBoxLayout * layout = new TQVBoxLayout( this, 0, KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "&Preamble:" ), this );
+ TQLabel *label = new TQLabel( i18n( "&Preamble:" ), this );
layout->addWidget( label );
m_fieldLineEditPreambleValue = new KBibTeX::FieldLineEdit( i18n( "Preamble" ), KBibTeX::FieldLineEdit::itMultiLine, m_isReadOnly, this, "m_fieldLineEditPreambleValue" );
layout->addWidget( m_fieldLineEditPreambleValue );
diff --git a/src/preamblewidget.h b/src/preamblewidget.h
index f08ba47..779f6b0 100644
--- a/src/preamblewidget.h
+++ b/src/preamblewidget.h
@@ -20,8 +20,8 @@
#ifndef KBIBTEXPREAMBLEWIDGET_H
#define KBIBTEXPREAMBLEWIDGET_H
-#include <qwidget.h>
-#include <qdialog.h>
+#include <ntqwidget.h>
+#include <ntqdialog.h>
#include <preamble.h>
#include <fieldlineedit.h>
@@ -32,11 +32,11 @@ namespace KBibTeX
/**
@author Thomas Fischer <fischer@unix-ag.uni-kl.de>
*/
- class PreambleWidget : public QWidget
+ class PreambleWidget : public TQWidget
{
Q_OBJECT
public:
- static QDialog::DialogCode execute( BibTeX::Preamble *preamble, bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+ static TQDialog::DialogCode execute( BibTeX::Preamble *preamble, bool isReadOnly, TQWidget *parent = 0, const char *name = 0 );
private slots:
void apply();
@@ -47,7 +47,7 @@ namespace KBibTeX
BibTeX::Preamble* m_bibtexpreamble;
KBibTeX::FieldLineEdit *m_fieldLineEditPreambleValue;
- PreambleWidget( BibTeX::Preamble *bibtexpreamble, bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+ PreambleWidget( BibTeX::Preamble *bibtexpreamble, bool isReadOnly, TQWidget *parent = 0, const char *name = 0 );
~PreambleWidget();
void setupGUI();
diff --git a/src/searchbar.cpp b/src/searchbar.cpp
index 113bb4d..a77cf51 100644
--- a/src/searchbar.cpp
+++ b/src/searchbar.cpp
@@ -17,12 +17,12 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qlineedit.h>
-#include <qlayout.h>
-#include <qlistbox.h>
-#include <qtimer.h>
-#include <qtooltip.h>
-#include <qlabel.h>
+#include <ntqlineedit.h>
+#include <ntqlayout.h>
+#include <ntqlistbox.h>
+#include <ntqtimer.h>
+#include <ntqtooltip.h>
+#include <ntqlabel.h>
#include <kcombobox.h>
#include <kpushbutton.h>
@@ -38,10 +38,10 @@
namespace KBibTeX
{
- SearchBar::SearchBar( QWidget *parent, const char *name )
- : QWidget( parent, name )
+ SearchBar::SearchBar( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
- m_timerInput = new QTimer( this );
+ m_timerInput = new TQTimer( this );
connect( m_timerInput, SIGNAL( timeout() ), SLOT( slotTimeout() ) );
setupGUI();
@@ -69,7 +69,7 @@ namespace KBibTeX
m_comboboxFilter->setFont( KGlobalSettings::generalFont() );
}
- void SearchBar::setSearch( const QString&text, BibTeX::Element::FilterType filterType, BibTeX::EntryField::FieldType fieldType )
+ void SearchBar::setSearch( const TQString&text, BibTeX::Element::FilterType filterType, BibTeX::EntryField::FieldType fieldType )
{
m_comboboxFilter->setCurrentText( text );
switch ( filterType )
@@ -83,39 +83,39 @@ namespace KBibTeX
void SearchBar::setupGUI()
{
- QBoxLayout * layout = new QHBoxLayout( this, 3 /* KDialog::marginHint()*/, KDialog::spacingHint() );
+ TQBoxLayout * layout = new TQHBoxLayout( this, 3 /* KDialog::marginHint()*/, KDialog::spacingHint() );
KIconLoader iconLoader = KIconLoader( "kbibtex" );
m_pushButtonAddElement = new KPushButton( this );
- m_pushButtonAddElement->setIconSet( QIconSet( BarIcon( "add" ) ) );
+ m_pushButtonAddElement->setIconSet( TQIconSet( BarIcon( "add" ) ) );
layout->addWidget( m_pushButtonAddElement );
- QToolTip::add( m_pushButtonAddElement, i18n( "Add a new BibTeX entry, comment or macro to this file" ) );
+ TQToolTip::add( m_pushButtonAddElement, i18n( "Add a new BibTeX entry, comment or macro to this file" ) );
m_pushButtonSearchOnlineDatabases = new KPushButton( this );
- m_pushButtonSearchOnlineDatabases->setIconSet( QIconSet( BarIcon( "network" ) ) );
+ m_pushButtonSearchOnlineDatabases->setIconSet( TQIconSet( BarIcon( "network" ) ) );
layout->addWidget( m_pushButtonSearchOnlineDatabases );
- QToolTip::add( m_pushButtonSearchOnlineDatabases, i18n( "Add a new BibTeX entry from an online database" ) );
+ TQToolTip::add( m_pushButtonSearchOnlineDatabases, i18n( "Add a new BibTeX entry from an online database" ) );
connect( m_pushButtonSearchOnlineDatabases, SIGNAL( clicked() ), this, SIGNAL( onlineSearch() ) );
layout->insertSpacing( 2, KDialog::spacingHint() );
m_pushButtonClearSearchText = new KPushButton( this );
- m_pushButtonClearSearchText->setIconSet( QIconSet( BarIcon( "locationbar_erase" ) ) );
+ m_pushButtonClearSearchText->setIconSet( TQIconSet( BarIcon( "locationbar_erase" ) ) );
layout->addWidget( m_pushButtonClearSearchText );
- QToolTip::add( m_pushButtonClearSearchText, i18n( "Erase current search pattern" ) );
- m_pushButtonClearSearchText->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred );
+ TQToolTip::add( m_pushButtonClearSearchText, i18n( "Erase current search pattern" ) );
+ m_pushButtonClearSearchText->setSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Preferred );
- QLabel *label = new QLabel( i18n( "&Search:" ), this );
+ TQLabel *label = new TQLabel( i18n( "&Search:" ), this );
layout->addWidget( label );
m_comboboxFilter = new KHistoryCombo( TRUE, this, "search_combobox" );
layout->addWidget( m_comboboxFilter );
label->setBuddy( m_comboboxFilter );
- m_comboboxFilter->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Preferred );
+ m_comboboxFilter->setSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::Preferred );
m_comboboxFilter->setMaxCount( 256 );
m_comboboxFilterType = new KComboBox( FALSE, this );
- m_comboboxFilterType->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Preferred );
+ m_comboboxFilterType->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Preferred );
layout->addWidget( m_comboboxFilterType );
m_comboboxFilterType->insertItem( i18n( "Exact" ) );
@@ -123,10 +123,10 @@ namespace KBibTeX
m_comboboxFilterType->insertItem( i18n( "Any word" ) );
m_comboboxFilterType->setCurrentItem( 1 );
- label = new QLabel( i18n( "Restrict to:" ), this );
+ label = new TQLabel( i18n( "Restrict to:" ), this );
layout->addWidget( label );
m_comboboxRestrictTo = new KComboBox( FALSE, this );
- m_comboboxRestrictTo->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Preferred );
+ m_comboboxRestrictTo->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Preferred );
layout->addWidget( m_comboboxRestrictTo );
label->setBuddy( m_comboboxRestrictTo );
@@ -137,16 +137,16 @@ namespace KBibTeX
m_comboboxRestrictTo->insertItem( Settings::fieldTypeToI18NString( fieldType ) );
}
- connect( m_comboboxFilter->lineEdit(), SIGNAL( textChanged( const QString & ) ), this, SLOT( slotKeyPressed() ) );
- connect( m_comboboxFilter, SIGNAL( activated( const QString& ) ), m_comboboxFilter, SLOT( addToHistory( const QString& ) ) );