Initial TQt conversion

pull/1/head
Slávek Banko 10 years ago
parent 251c9a4397
commit 5f5e7c5455
  1. 48
      acinclude.m4
  2. 16
      src/comment.cpp
  3. 10
      src/comment.h
  4. 26
      src/commentwidget.cpp
  5. 18
      src/commentwidget.h
  6. 172
      src/documentlistview.cpp
  7. 30
      src/documentlistview.h
  8. 14
      src/documentlistviewitem.cpp
  9. 4
      src/documentlistviewitem.h
  10. 38
      src/documentsourceview.cpp
  11. 14
      src/documentsourceview.h
  12. 354
      src/documentwidget.cpp
  13. 58
      src/documentwidget.h
  14. 6
      src/element.cpp
  15. 8
      src/element.h
  16. 14
      src/encoder.h
  17. 140
      src/encoderlatex.cpp
  18. 30
      src/encoderlatex.h
  19. 26
      src/encoderxml.cpp
  20. 22
      src/encoderxml.h
  21. 86
      src/entry.cpp
  22. 40
      src/entry.h
  23. 78
      src/entryfield.cpp
  24. 14
      src/entryfield.h
  25. 170
      src/entrywidget.cpp
  26. 78
      src/entrywidget.h
  27. 14
      src/entrywidgetauthor.cpp
  28. 8
      src/entrywidgetauthor.h
  29. 82
      src/entrywidgetexternal.cpp
  30. 8
      src/entrywidgetexternal.h
  31. 72
      src/entrywidgetkeyword.cpp
  32. 30
      src/entrywidgetkeyword.h
  33. 20
      src/entrywidgetmisc.cpp
  34. 4
      src/entrywidgetmisc.h
  35. 84
      src/entrywidgetother.cpp
  36. 30
      src/entrywidgetother.h
  37. 86
      src/entrywidgetpublication.cpp
  38. 12
      src/entrywidgetpublication.h
  39. 34
      src/entrywidgetsource.cpp
  40. 12
      src/entrywidgetsource.h
  41. 20
      src/entrywidgettab.cpp
  42. 16
      src/entrywidgettab.h
  43. 16
      src/entrywidgettitle.cpp
  44. 4
      src/entrywidgettitle.h
  45. 24
      src/entrywidgetuserdefined.cpp
  46. 6
      src/entrywidgetuserdefined.h
  47. 6
      src/entrywidgetwarningsitem.cpp
  48. 12
      src/entrywidgetwarningsitem.h
  49. 70
      src/fieldlineedit.cpp
  50. 20
      src/fieldlineedit.h
  51. 120
      src/fieldlistview.cpp
  52. 40
      src/fieldlistview.h
  53. 66
      src/file.cpp
  54. 46
      src/file.h
  55. 2
      src/fileexporter.cpp
  56. 14
      src/fileexporter.h
  57. 108
      src/fileexporterbibtex.cpp
  58. 36
      src/fileexporterbibtex.h
  59. 76
      src/fileexporterbibutils.cpp
  60. 20
      src/fileexporterbibutils.h
  61. 22
      src/fileexporterdocbook5.cpp
  62. 18
      src/fileexporterdocbook5.h
  63. 54
      src/fileexporterexternal.cpp
  64. 18
      src/fileexporterexternal.h
  65. 66
      src/fileexporterpdf.cpp
  66. 28
      src/fileexporterpdf.h
  67. 34
      src/fileexporterps.cpp
  68. 26
      src/fileexporterps.h
  69. 36
      src/fileexporterris.cpp
  70. 8
      src/fileexporterris.h
  71. 34
      src/fileexporterrtf.cpp
  72. 24
      src/fileexporterrtf.h
  73. 90
      src/fileexportertoolchain.cpp
  74. 28
      src/fileexportertoolchain.h
  75. 46
      src/fileexporterxml.cpp
  76. 14
      src/fileexporterxml.h
  77. 34
      src/fileexporterxslt.cpp
  78. 4
      src/fileexporterxslt.h
  79. 12
      src/fileimporter.cpp
  80. 16
      src/fileimporter.h
  81. 170
      src/fileimporterbibtex.cpp
  82. 34
      src/fileimporterbibtex.h
  83. 104
      src/fileimporterbibutils.cpp
  84. 20
      src/fileimporterbibutils.h
  85. 44
      src/fileimporterexternal.cpp
  86. 16
      src/fileimporterexternal.h
  87. 64
      src/fileimporterris.cpp
  88. 16
      src/fileimporterris.h
  89. 62
      src/findduplicates.cpp
  90. 30
      src/findduplicates.h
  91. 110
      src/idsuggestions.cpp
  92. 38
      src/idsuggestions.h
  93. 192
      src/idsuggestionswidget.cpp
  94. 72
      src/idsuggestionswidget.h
  95. 14
      src/iso5426converter.cpp
  96. 14
      src/iso5426converter.h
  97. 14
      src/iso6937converter.cpp
  98. 12
      src/iso6937converter.h
  99. 106
      src/kbibtex_part.cpp
  100. 36
      src/kbibtex_part.h
  101. 22
      src/kbibtexshell.cpp
  102. 14
      src/kbibtexshell.h
  103. 16
      src/latin1literal.h
  104. 20
      src/macro.cpp
  105. 14
      src/macro.h
  106. 18
      src/macrowidget.cpp
  107. 8
      src/macrowidget.h
  108. 4
      src/main.cpp
  109. 196
      src/mergeelements.cpp
  110. 72
      src/mergeelements.h
  111. 4
      src/messagehandler.cpp
  112. 12
      src/messagehandler.h
  113. 16
      src/preamble.cpp
  114. 6
      src/preamble.h
  115. 14
      src/preamblewidget.cpp
  116. 10
      src/preamblewidget.h
  117. 56
      src/searchbar.cpp
  118. 14
      src/searchbar.h
  119. 344
      src/settings.cpp
  120. 98
      src/settings.h
  121. 22
      src/settingsdlg.cpp
  122. 2
      src/settingsdlg.h
  123. 142
      src/settingsediting.cpp
  124. 52
      src/settingsediting.h
  125. 130
      src/settingsfileio.cpp
  126. 34
      src/settingsfileio.h
  127. 102
      src/settingsidsuggestions.cpp
  128. 34
      src/settingsidsuggestions.h
  129. 54
      src/settingskeyword.cpp
  130. 24
      src/settingskeyword.h
  131. 64
      src/settingssearchurl.cpp
  132. 12
      src/settingssearchurl.h
  133. 66
      src/settingsuserdefinedinput.cpp
  134. 8
      src/settingsuserdefinedinput.h
  135. 90
      src/settingsz3950.cpp
  136. 24
      src/settingsz3950.h
  137. 74
      src/sidebar.cpp
  138. 36
      src/sidebar.h
  139. 140
      src/value.cpp
  140. 88
      src/value.h
  141. 100
      src/valuewidget.cpp
  142. 30
      src/valuewidget.h
  143. 186
      src/webquery.cpp
  144. 64
      src/webquery.h
  145. 34
      src/webqueryamatex.cpp
  146. 10
      src/webqueryamatex.h
  147. 106
      src/webqueryarxiv.cpp
  148. 28
      src/webqueryarxiv.h
  149. 32
      src/webquerybibsonomy.cpp
  150. 10
      src/webquerybibsonomy.h
  151. 30
      src/webquerycitebase.cpp
  152. 10
      src/webquerycitebase.h
  153. 58
      src/webqueryciteseerx.cpp
  154. 26
      src/webqueryciteseerx.h
  155. 118
      src/webquerycsb.cpp
  156. 20
      src/webquerycsb.h
  157. 64
      src/webquerydblp.cpp
  158. 14
      src/webquerydblp.h
  159. 118
      src/webquerygooglescholar.cpp
  160. 32
      src/webquerygooglescholar.h
  161. 54
      src/webqueryieeexplore.cpp
  162. 26
      src/webqueryieeexplore.h
  163. 66
      src/webquerymathscinet.cpp
  164. 10
      src/webquerymathscinet.h
  165. 176
      src/webquerypubmed.cpp
  166. 54
      src/webquerypubmed.h
  167. 126
      src/webquerysciencedirect.cpp
  168. 18
      src/webquerysciencedirect.h
  169. 76
      src/webqueryspireshep.cpp
  170. 16
      src/webqueryspireshep.h
  171. 98
      src/webqueryz3950.cpp
  172. 28
      src/webqueryz3950.h
  173. 28
      src/webqueryzmath.cpp
  174. 10
      src/webqueryzmath.h
  175. 24
      src/xsltransform.cpp
  176. 6
      src/xsltransform.h
  177. 146
      src/z3950connection.cpp
  178. 78
      src/z3950connection.h

@ -1060,7 +1060,7 @@ elif test "$kde_use_qt_emb" = "yes"; then
x_includes=""
x_libraries=""
elif test "$kde_use_qt_mac" = "yes"; then
dnl We're using QT/Mac (I use QT_MAC so that qglobal.h doesn't *have* to
dnl We're using QT/Mac (I use QT_MAC so that ntqglobal.h doesn't *have* to
dnl be included to get the information) --Sam
CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp"
CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp"
@ -1092,19 +1092,19 @@ AC_DEFUN([KDE_PRINT_QT_PROGRAM],
AC_REQUIRE([KDE_USE_QT])
cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
#include <qglobal.h>
#include <qapplication.h>
#include <ntqglobal.h>
#include <ntqapplication.h>
EOF
if test "$kde_qtver" = "2"; then
cat >> conftest.$ac_ext <<EOF
#include <qevent.h>
#include <qstring.h>
#include <qstyle.h>
#include <ntqevent.h>
#include <ntqstring.h>
#include <ntqstyle.h>
EOF
if test $kde_qtsubver -gt 0; then
cat >> conftest.$ac_ext <<EOF
#if QT_VERSION < 210
#if TQT_VERSION < 210
#error 1
#endif
EOF
@ -1113,8 +1113,8 @@ fi
if test "$kde_qtver" = "3"; then
cat >> conftest.$ac_ext <<EOF
#include <qcursor.h>
#include <qstylefactory.h>
#include <ntqcursor.h>
#include <ntqstylefactory.h>
#include <private/qucomextra_p.h>
EOF
fi
@ -1201,22 +1201,22 @@ fi
if test -z "$3"; then
if test $kde_qtver = 3; then
if test $kde_qtsubver -gt 0; then
kde_qt_verstring="QT_VERSION >= 0x03@VER@00 && QT_VERSION < 0x040000"
kde_qt_verstring="TQT_VERSION >= 0x03@VER@00 && TQT_VERSION < 0x040000"
qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'`
kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"`
else
kde_qt_verstring="QT_VERSION >= 300 && QT_VERSION < 0x040000"
kde_qt_verstring="TQT_VERSION >= 300 && TQT_VERSION < 0x040000"
fi
fi
if test $kde_qtver = 2; then
if test $kde_qtsubver -gt 0; then
kde_qt_verstring="QT_VERSION >= 222"
kde_qt_verstring="TQT_VERSION >= 222"
else
kde_qt_verstring="QT_VERSION >= 200"
kde_qt_verstring="TQT_VERSION >= 200"
fi
fi
if test $kde_qtver = 1; then
kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
kde_qt_verstring="TQT_VERSION >= 142 && TQT_VERSION < 200"
fi
else
kde_qt_verstring="$3"
@ -1325,7 +1325,7 @@ AC_ARG_ENABLE(
USING_QT_MT=""
dnl ------------------------------------------------------------------------
dnl If we not get --disable-qt-mt then adjust some vars for the host.
dnl If we not get --disable-tqt-mt then adjust some vars for the host.
dnl ------------------------------------------------------------------------
KDE_MT_LDFLAGS=
@ -1383,7 +1383,7 @@ dnl ------------------------------------------------------------
fi
dnl ------------------------------------------------------------------------
dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
dnl If we got --enable-tqt-mt then adjust the Qt library name for the host.
dnl ------------------------------------------------------------------------
if test "x$kde_use_qt_mt" = "xyes"; then
@ -1449,9 +1449,9 @@ if test ! "$ac_qt_includes" = "NO"; then
fi
if test "$kde_qtver" != "1"; then
kde_qt_header=qstyle.h
kde_qt_header=ntqstyle.h
else
kde_qt_header=qglobal.h
kde_qt_header=ntqglobal.h
fi
AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
@ -2034,7 +2034,7 @@ AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
AC_TRY_LINK([
#include <qdom.h>
#include <ntqdom.h>
],
[
QDomDocument doc;
@ -2595,7 +2595,7 @@ LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
AC_TRY_LINK(
[#include <qapplication.h>],
[#include <ntqapplication.h>],
[
int argc;
char** argv;
@ -3439,7 +3439,7 @@ AC_DEFUN([KDE_ENABLE_HIDDEN_VISIBILITY],
AC_TRY_COMPILE(
[
#include <qglobal.h>
#include <ntqglobal.h>
#if Q_EXPORT - 0 != 0
/* if this compiles, then Q_EXPORT is undefined */
/* if Q_EXPORT is nonempty, this will break compilation */
@ -4689,7 +4689,7 @@ CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
AC_TRY_RUN(dnl
[
#include <qimageio.h>
#include <qstring.h>
#include <ntqstring.h>
int main() {
QString t = "hallo";
t.fill('t');
@ -5534,7 +5534,7 @@ if test "${with_qt_dir+set}" = set; then
kde_qtdir="$with_qt_dir"
fi
AC_FIND_FILE(qsql.html, [ $kde_qtdir/doc/html $QTDIR/doc/html /usr/share/doc/packages/qt3/html /usr/lib/qt/doc /usr/lib/qt3/doc /usr/lib/qt3/doc/html /usr/doc/qt3/html /usr/doc/qt3 /usr/share/doc/qt3-doc /usr/share/qt3/doc/html /usr/X11R6/share/doc/qt/html ], QTDOCDIR)
AC_FIND_FILE(ntqsql.html, [ $kde_qtdir/doc/html $QTDIR/doc/html /usr/share/doc/packages/qt3/html /usr/lib/qt/doc /usr/lib/qt3/doc /usr/lib/qt3/doc/html /usr/doc/qt3/html /usr/doc/qt3 /usr/share/doc/qt3-doc /usr/share/qt3/doc/html /usr/X11R6/share/doc/qt/html ], QTDOCDIR)
AC_MSG_RESULT($QTDOCDIR)
AC_SUBST(QTDOCDIR)
@ -5555,7 +5555,7 @@ AC_SUBST(DOXYGEN_PROJECT_NAME)
AC_SUBST(DOXYGEN_PROJECT_NUMBER)
KDE_HAS_DOXYGEN=no
if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then
if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/ntqsql.html; then
KDE_HAS_DOXYGEN=yes
fi
AC_SUBST(KDE_HAS_DOXYGEN)

@ -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 ) )

@ -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;
};

@ -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 );

@ -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();

@ -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 );
}
}

@ -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 );

@ -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 );
}

@ -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;

@ -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 );