Initial TQt conversion

remotes/origin/feat/cmakeConv
Slávek Banko 11 years ago
parent 57d8bb3d12
commit 84f5a315c3

@ -1060,7 +1060,7 @@ elif test "$kde_use_qt_emb" = "yes"; then
x_includes="" x_includes=""
x_libraries="" x_libraries=""
elif test "$kde_use_qt_mac" = "yes"; then 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 dnl be included to get the information) --Sam
CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp" CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp"
CFLAGS="$CFLAGS -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]) AC_REQUIRE([KDE_USE_QT])
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#include "confdefs.h" #include "confdefs.h"
#include <qglobal.h> #include <ntqglobal.h>
#include <qapplication.h> #include <ntqapplication.h>
EOF EOF
if test "$kde_qtver" = "2"; then if test "$kde_qtver" = "2"; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#include <qevent.h> #include <ntqevent.h>
#include <qstring.h> #include <ntqstring.h>
#include <qstyle.h> #include <ntqstyle.h>
EOF EOF
if test $kde_qtsubver -gt 0; then if test $kde_qtsubver -gt 0; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#if QT_VERSION < 210 #if TQT_VERSION < 210
#error 1 #error 1
#endif #endif
EOF EOF
@ -1113,8 +1113,8 @@ fi
if test "$kde_qtver" = "3"; then if test "$kde_qtver" = "3"; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#include <qcursor.h> #include <ntqcursor.h>
#include <qstylefactory.h> #include <ntqstylefactory.h>
#include <private/qucomextra_p.h> #include <private/qucomextra_p.h>
EOF EOF
fi fi
@ -1201,22 +1201,22 @@ fi
if test -z "$3"; then if test -z "$3"; then
if test $kde_qtver = 3; then if test $kde_qtver = 3; then
if test $kde_qtsubver -gt 0; 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,'` qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'`
kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"` kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"`
else else
kde_qt_verstring="QT_VERSION >= 300 && QT_VERSION < 0x040000" kde_qt_verstring="TQT_VERSION >= 300 && TQT_VERSION < 0x040000"
fi fi
fi fi
if test $kde_qtver = 2; then if test $kde_qtver = 2; then
if test $kde_qtsubver -gt 0; then if test $kde_qtsubver -gt 0; then
kde_qt_verstring="QT_VERSION >= 222" kde_qt_verstring="TQT_VERSION >= 222"
else else
kde_qt_verstring="QT_VERSION >= 200" kde_qt_verstring="TQT_VERSION >= 200"
fi fi
fi fi
if test $kde_qtver = 1; then 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 fi
else else
kde_qt_verstring="$3" kde_qt_verstring="$3"
@ -1325,7 +1325,7 @@ AC_ARG_ENABLE(
USING_QT_MT="" USING_QT_MT=""
dnl ------------------------------------------------------------------------ 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 ------------------------------------------------------------------------ dnl ------------------------------------------------------------------------
KDE_MT_LDFLAGS= KDE_MT_LDFLAGS=
@ -1383,7 +1383,7 @@ dnl ------------------------------------------------------------
fi fi
dnl ------------------------------------------------------------------------ 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 ------------------------------------------------------------------------ dnl ------------------------------------------------------------------------
if test "x$kde_use_qt_mt" = "xyes"; then if test "x$kde_use_qt_mt" = "xyes"; then
@ -1449,9 +1449,9 @@ if test ! "$ac_qt_includes" = "NO"; then
fi fi
if test "$kde_qtver" != "1"; then if test "$kde_qtver" != "1"; then
kde_qt_header=qstyle.h kde_qt_header=ntqstyle.h
else else
kde_qt_header=qglobal.h kde_qt_header=ntqglobal.h
fi fi
AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir) 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" LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
AC_TRY_LINK([ AC_TRY_LINK([
#include <qdom.h> #include <ntqdom.h>
], ],
[ [
QDomDocument doc; QDomDocument doc;
@ -2595,7 +2595,7 @@ LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
ac_save_CXXFLAGS="$CXXFLAGS" ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES" CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
AC_TRY_LINK( AC_TRY_LINK(
[#include <qapplication.h>], [#include <ntqapplication.h>],
[ [
int argc; int argc;
char** argv; char** argv;
@ -3397,7 +3397,7 @@ AC_DEFUN([KDE_ENABLE_HIDDEN_VISIBILITY],
AC_TRY_COMPILE( AC_TRY_COMPILE(
[ [
#include <qglobal.h> #include <ntqglobal.h>
#if Q_EXPORT - 0 != 0 #if Q_EXPORT - 0 != 0
/* if this compiles, then Q_EXPORT is undefined */ /* if this compiles, then Q_EXPORT is undefined */
/* if Q_EXPORT is nonempty, this will break compilation */ /* if Q_EXPORT is nonempty, this will break compilation */
@ -4635,7 +4635,7 @@ CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
AC_TRY_RUN(dnl AC_TRY_RUN(dnl
[ [
#include <qimageio.h> #include <qimageio.h>
#include <qstring.h> #include <ntqstring.h>
int main() { int main() {
QString t = "hallo"; QString t = "hallo";
t.fill('t'); t.fill('t');
@ -5480,7 +5480,7 @@ if test "${with_qt_dir+set}" = set; then
kde_qtdir="$with_qt_dir" kde_qtdir="$with_qt_dir"
fi 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_MSG_RESULT($QTDOCDIR)
AC_SUBST(QTDOCDIR) AC_SUBST(QTDOCDIR)
@ -5501,7 +5501,7 @@ AC_SUBST(DOXYGEN_PROJECT_NAME)
AC_SUBST(DOXYGEN_PROJECT_NUMBER) AC_SUBST(DOXYGEN_PROJECT_NUMBER)
KDE_HAS_DOXYGEN=no 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 KDE_HAS_DOXYGEN=yes
fi fi
AC_SUBST(KDE_HAS_DOXYGEN) AC_SUBST(KDE_HAS_DOXYGEN)

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>AutoCompletionLayout</class> <class>AutoCompletionLayout</class>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>AutoCompletionLayout</cstring> <cstring>AutoCompletionLayout</cstring>
</property> </property>
@ -19,7 +19,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout20</cstring> <cstring>layout20</cstring>
</property> </property>
@ -27,7 +27,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel1</cstring> <cstring>textLabel1</cstring>
</property> </property>
@ -52,14 +52,14 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QSpinBox"> <widget class="TQSpinBox">
<property name="name"> <property name="name">
<cstring>m_pMinCharsSpin</cstring> <cstring>m_pMinCharsSpin</cstring>
</property> </property>
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout21</cstring> <cstring>layout21</cstring>
</property> </property>
@ -67,7 +67,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel2</cstring> <cstring>textLabel2</cstring>
</property> </property>
@ -92,7 +92,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QSpinBox"> <widget class="TQSpinBox">
<property name="name"> <property name="name">
<cstring>m_pDelaySpin</cstring> <cstring>m_pDelaySpin</cstring>
</property> </property>
@ -105,7 +105,7 @@
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout22</cstring> <cstring>layout22</cstring>
</property> </property>
@ -113,7 +113,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel3</cstring> <cstring>textLabel3</cstring>
</property> </property>
@ -138,7 +138,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QSpinBox"> <widget class="TQSpinBox">
<property name="name"> <property name="name">
<cstring>m_pMaxEntriesSpin</cstring> <cstring>m_pMaxEntriesSpin</cstring>
</property> </property>
@ -168,7 +168,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout23</cstring> <cstring>layout23</cstring>
</property> </property>
@ -193,7 +193,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pOKButton</cstring> <cstring>m_pOKButton</cstring>
</property> </property>
@ -201,7 +201,7 @@
<string>OK</string> <string>OK</string>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pCancelButton</cstring> <cstring>m_pCancelButton</cstring>
</property> </property>

@ -28,28 +28,28 @@
#include "bookmarksdlg.h" #include "bookmarksdlg.h"
#include "queryview.h" #include "queryview.h"
BookmarksDlg::BookmarksDlg(QWidget* pParent, const char* szName) : BookmarksDlg::BookmarksDlg(TQWidget* pParent, const char* szName) :
BookmarksLayout (pParent, szName, true) BookmarksLayout (pParent, szName, true)
{ {
// Do not show the "Function" column // Do not show the "Function" column
m_pView->setColumnWidth(0, 0); m_pView->setColumnWidth(0, 0);
// Handle requests for source locations // Handle requests for source locations
connect(m_pView, SIGNAL(lineRequested(const QString&, uint)), this, connect(m_pView, SIGNAL(lineRequested(const TQString&, uint)), this,
SLOT(slotLineRequested(const QString&, uint))); SLOT(slotLineRequested(const TQString&, uint)));
} }
BookmarksDlg::~BookmarksDlg() BookmarksDlg::~BookmarksDlg()
{ {
} }
void BookmarksDlg::getBookmark(QString& sPath, uint& nLine) void BookmarksDlg::getBookmark(TQString& sPath, uint& nLine)
{ {
sPath = m_sPath; sPath = m_sPath;
nLine = m_nLine; nLine = m_nLine;
} }
void BookmarksDlg::slotLineRequested(const QString& sPath, uint nLine) void BookmarksDlg::slotLineRequested(const TQString& sPath, uint nLine)
{ {
m_sPath = sPath; m_sPath = sPath;
m_nLine = nLine; m_nLine = nLine;

@ -35,18 +35,18 @@ class BookmarksDlg : public BookmarksLayout
Q_OBJECT Q_OBJECT
public: public:
BookmarksDlg(QWidget* pParent = 0, const char* szName = 0); BookmarksDlg(TQWidget* pParent = 0, const char* szName = 0);
~BookmarksDlg(); ~BookmarksDlg();
QueryView* getView() { return m_pView; } QueryView* getView() { return m_pView; }
void getBookmark(QString&, uint&); void getBookmark(TQString&, uint&);
private: private:
QString m_sPath; TQString m_sPath;
uint m_nLine; uint m_nLine;
private slots: private slots:
void slotLineRequested(const QString&, uint); void slotLineRequested(const TQString&, uint);
}; };
#endif #endif

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>BookmarksLayout</class> <class>BookmarksLayout</class>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>BookmarksLayout</cstring> <cstring>BookmarksLayout</cstring>
</property> </property>
@ -38,7 +38,7 @@
<enum>Horizontal</enum> <enum>Horizontal</enum>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout1</cstring> <cstring>layout1</cstring>
</property> </property>
@ -63,7 +63,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pCloseButton</cstring> <cstring>m_pCloseButton</cstring>
</property> </property>

@ -25,10 +25,10 @@
* *
***************************************************************************/ ***************************************************************************/
#include <qfile.h> #include <ntqfile.h>
#include <qtoolbutton.h> #include <ntqtoolbutton.h>
#include <qbuttongroup.h> #include <ntqbuttongroup.h>
#include <qwidgetstack.h> #include <ntqwidgetstack.h>
#include <klocale.h> #include <klocale.h>
#include <kfiledialog.h> #include <kfiledialog.h>
#include "calltreedlg.h" #include "calltreedlg.h"
@ -56,7 +56,7 @@ int CallTreeDlg::s_nFileNameIndex = 0;
* @param pParent The parent widget * @param pParent The parent widget
* @param szName The widget's name * @param szName The widget's name
*/ */
CallTreeDlg::CallTreeDlg(QWidget* pParent, const char* szName) : CallTreeDlg::CallTreeDlg(TQWidget* pParent, const char* szName) :
CallTreeLayout(pParent, szName, CALL_TREE_W_FLAGS) CallTreeLayout(pParent, szName, CALL_TREE_W_FLAGS)
{ {
// Set button pixmaps // Set button pixmaps
@ -70,12 +70,12 @@ CallTreeDlg::CallTreeDlg(QWidget* pParent, const char* szName) :
m_pPrefButton->setPixmap(GET_PIXMAP(ButtonPref)); m_pPrefButton->setPixmap(GET_PIXMAP(ButtonPref));
// Open the location of a call // Open the location of a call
connect(m_pGraphWidget, SIGNAL(lineRequested(const QString&, uint)), connect(m_pGraphWidget, SIGNAL(lineRequested(const TQString&, uint)),
this, SIGNAL(lineRequested(const QString&, uint))); this, SIGNAL(lineRequested(const TQString&, uint)));
connect(m_pCalledWidget, SIGNAL(lineRequested(const QString&, uint)), connect(m_pCalledWidget, SIGNAL(lineRequested(const TQString&, uint)),
this, SIGNAL(lineRequested(const QString&, uint))); this, SIGNAL(lineRequested(const TQString&, uint)));
connect(m_pCallingWidget, SIGNAL(lineRequested(const QString&, uint)), connect(m_pCallingWidget, SIGNAL(lineRequested(const TQString&, uint)),
this, SIGNAL(lineRequested(const QString&, uint))); this, SIGNAL(lineRequested(const TQString&, uint)));
m_pCallingWidget->setMode(TreeWidget::Calling); m_pCallingWidget->setMode(TreeWidget::Calling);
@ -93,14 +93,14 @@ CallTreeDlg::~CallTreeDlg()
/** /**
* @param sFunc The function to use as the root of the call tree * @param sFunc The function to use as the root of the call tree
*/ */
void CallTreeDlg::setRoot(const QString& sFunc) void CallTreeDlg::setRoot(const TQString& sFunc)
{ {
m_sRoot = sFunc; m_sRoot = sFunc;
// Generate unique file name to save call tree later // Generate unique file name to save call tree later
m_sFileName = sFunc; m_sFileName = sFunc;
m_sFileName.replace(' ', '_'); m_sFileName.replace(' ', '_');
m_sFileName += QString::number(++s_nFileNameIndex); m_sFileName += TQString::number(++s_nFileNameIndex);
// Set the root item in all views // Set the root item in all views
m_pGraphWidget->setRoot(sFunc); m_pGraphWidget->setRoot(sFunc);
@ -129,13 +129,13 @@ void CallTreeDlg::show()
* is therefore safe to delete the graph file at this point. * is therefore safe to delete the graph file at this point.
* @param pEvent Information on the closing event * @param pEvent Information on the closing event
*/ */
void CallTreeDlg::closeEvent(QCloseEvent* pEvent) void CallTreeDlg::closeEvent(TQCloseEvent* pEvent)
{ {
if (!m_sFilePath.isEmpty()) if (!m_sFilePath.isEmpty())
QFile::remove(m_sFilePath); TQFile::remove(m_sFilePath);
emit closed(this); emit closed(this);
QWidget::closeEvent(pEvent); TQWidget::closeEvent(pEvent);
} }
extern void yyinit(CallTreeDlg*, FILE*, Encoder*); extern void yyinit(CallTreeDlg*, FILE*, Encoder*);
@ -148,9 +148,9 @@ extern int yyparse();
* @param sFileName The name of the call tree file to load * @param sFileName The name of the call tree file to load
* @return true if successful, false otherwise * @return true if successful, false otherwise
*/ */
bool CallTreeDlg::load(const QString& sProjPath, const QString& sFileName) bool CallTreeDlg::load(const TQString& sProjPath, const TQString& sFileName)
{ {
QString sPath; TQString sPath;
FILE* pFile; FILE* pFile;
int nVersion, nView, nResult; int nVersion, nView, nResult;
Encoder enc; Encoder enc;
@ -203,9 +203,9 @@ bool CallTreeDlg::load(const QString& sProjPath, const QString& sFileName)
* closed. * closed.
* @param sProjPath The full path of the project directory * @param sProjPath The full path of the project directory
*/ */
void CallTreeDlg::store(const QString& sProjPath) void CallTreeDlg::store(const TQString& sProjPath)
{ {
QString sPath; TQString sPath;
FILE* pFile; FILE* pFile;
// Create the full file path // Create the full file path
@ -238,7 +238,7 @@ void CallTreeDlg::store(const QString& sProjPath)
*/ */
void CallTreeDlg::slotSaveClicked() void CallTreeDlg::slotSaveClicked()
{ {
QString sFile; TQString sFile;
// Prompt the user for a file name // Prompt the user for a file name
sFile = KFileDialog::getSaveFileName(":kscope"); sFile = KFileDialog::getSaveFileName(":kscope");
@ -287,7 +287,7 @@ void CallTreeDlg::slotPrefClicked()
GraphPrefDlg dlg(this); GraphPrefDlg dlg(this);
int nMaxNodeDegree; int nMaxNodeDegree;
if (dlg.exec() == QDialog::Accepted) { if (dlg.exec() == TQDialog::Accepted) {
nMaxNodeDegree = dlg.getMaxNodeDegree(); nMaxNodeDegree = dlg.getMaxNodeDegree();
Config().setGraphMaxNodeDegree(nMaxNodeDegree); Config().setGraphMaxNodeDegree(nMaxNodeDegree);
m_pGraphWidget->setMaxNodeDegree(nMaxNodeDegree); m_pGraphWidget->setMaxNodeDegree(nMaxNodeDegree);

@ -28,8 +28,8 @@
#ifndef CALLTREEDLG_H #ifndef CALLTREEDLG_H
#define CALLTREEDLG_H #define CALLTREEDLG_H
#include <qwidget.h> #include <ntqwidget.h>
#include <qlistview.h> #include <ntqlistview.h>
#include <calltreelayout.h> #include <calltreelayout.h>
/** /**
@ -38,7 +38,7 @@
* - Call graph, showing both calling and call functions * - Call graph, showing both calling and call functions
* - Called functions tree * - Called functions tree
* - Calling functions tree * - Calling functions tree
* NOTE: This is class is now derived from QWidget instead of QDialog. This * NOTE: This is class is now derived from TQWidget instead of TQDialog. This
* means that call-trees are independent windows, which can be maximised or * means that call-trees are independent windows, which can be maximised or
* minimised. * minimised.
* @author Elad Lahav * @author Elad Lahav
@ -48,15 +48,15 @@ class CallTreeDlg : public CallTreeLayout
Q_OBJECT Q_OBJECT
public: public:
CallTreeDlg(QWidget* pParent = 0, const char* szName = 0); CallTreeDlg(TQWidget* pParent = 0, const char* szName = 0);
~CallTreeDlg(); ~CallTreeDlg();
void setRoot(const QString&); void setRoot(const TQString&);
bool load(const QString&, const QString&); bool load(const TQString&, const TQString&);
void store(const QString&); void store(const TQString&);
/** Returns Call Tree filename */ /** Returns Call Tree filename */
QString getFileName() { return m_sFileName; } TQString getFileName() { return m_sFileName; }
public slots: public slots:
virtual void show(); virtual void show();
@ -70,7 +70,7 @@ signals:
* @param sPath The full path of the file to show * @param sPath The full path of the file to show
* @param nLine The line number in this file * @param nLine The line number in this file
*/ */
void lineRequested(const QString& sPath, uint nLine); void lineRequested(const TQString& sPath, uint nLine);
/** /**
* Emitted when the user closes the tree view. * Emitted when the user closes the tree view.
@ -78,7 +78,7 @@ signals:
void closed(const CallTreeDlg*); void closed(const CallTreeDlg*);
protected: protected:
virtual void closeEvent(QCloseEvent*); virtual void closeEvent(TQCloseEvent*);
protected slots: protected slots:
virtual void slotSaveClicked(); virtual void slotSaveClicked();
@ -90,16 +90,16 @@ protected slots:
private: private:
/** The root function. */ /** The root function. */
QString m_sRoot; TQString m_sRoot;
/** A unique file name used for storing the call tree on a file. /** A unique file name used for storing the call tree on a file.
The name is a combination of the root function and an incremented The name is a combination of the root function and an incremented
index. */ index. */
QString m_sFileName; TQString m_sFileName;
/** The full path of the file on which the call tree was saved /** The full path of the file on which the call tree was saved
(empty if this graph was never stored). */ (empty if this graph was never stored). */
QString m_sFilePath; TQString m_sFilePath;
/** The view to show when the dialogue is first displayed. */ /** The view to show when the dialogue is first displayed. */
int m_nDefView; int m_nDefView;

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>CallTreeLayout</class> <class>CallTreeLayout</class>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>CallTreeLayout</cstring> <cstring>CallTreeLayout</cstring>
</property> </property>
@ -19,7 +19,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout2</cstring> <cstring>layout2</cstring>
</property> </property>
@ -27,7 +27,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QButtonGroup"> <widget class="TQButtonGroup">
<property name="name"> <property name="name">
<cstring>m_pViewGroup</cstring> <cstring>m_pViewGroup</cstring>
</property> </property>
@ -50,7 +50,7 @@
<property name="margin"> <property name="margin">
<number>0</number> <number>0</number>
</property> </property>
<widget class="QToolButton"> <widget class="TQToolButton">
<property name="name"> <property name="name">
<cstring>m_pGraphButton</cstring> <cstring>m_pGraphButton</cstring>
</property> </property>
@ -67,7 +67,7 @@
<string>Call Graph</string> <string>Call Graph</string>
</property> </property>
</widget> </widget>
<widget class="QToolButton"> <widget class="TQToolButton">
<property name="name"> <property name="name">
<cstring>m_pCalledButton</cstring> <cstring>m_pCalledButton</cstring>
</property> </property>
@ -84,7 +84,7 @@
<string>Called Functions Tree</string> <string>Called Functions Tree</string>
</property> </property>
</widget> </widget>
<widget class="QToolButton"> <widget class="TQToolButton">
<property name="name"> <property name="name">
<cstring>m_pCallingButton</cstring> <cstring>m_pCallingButton</cstring>
</property> </property>
@ -117,7 +117,7 @@
<enum>Vertical</enum> <enum>Vertical</enum>
</property> </property>
</widget> </widget>
<widget class="QButtonGroup"> <widget class="TQButtonGroup">
<property name="name"> <property name="name">
<cstring>m_pGraphGroup</cstring> <cstring>m_pGraphGroup</cstring>
</property> </property>
@ -140,7 +140,7 @@
<property name="margin"> <property name="margin">
<number>0</number> <number>0</number>
</property> </property>
<widget class="QToolButton"> <widget class="TQToolButton">
<property name="name"> <property name="name">
<cstring>m_pSaveButton</cstring> <cstring>m_pSaveButton</cstring>
</property> </property>
@ -154,7 +154,7 @@
<string>Save As...</string> <string>Save As...</string>
</property> </property>
</widget> </widget>
<widget class="QToolButton"> <widget class="TQToolButton">
<property name="name"> <property name="name">
<cstring>m_pZoomInButton</cstring> <cstring>m_pZoomInButton</cstring>
</property> </property>
@ -171,7 +171,7 @@
<string>Zoom In</string> <string>Zoom In</string>
</property> </property>
</widget> </widget>
<widget class="QToolButton"> <widget class="TQToolButton">
<property name="name"> <property name="name">
<cstring>m_pZoomOutButton</cstring> <cstring>m_pZoomOutButton</cstring>
</property> </property>
@ -188,7 +188,7 @@
<string>Zoom Out</string> <string>Zoom Out</string>
</property> </property>
</widget> </widget>
<widget class="QToolButton"> <widget class="TQToolButton">
<property name="name"> <property name="name">
<cstring>m_pRotateButton</cstring> <cstring>m_pRotateButton</cstring>
</property> </property>
@ -205,7 +205,7 @@
<string>Rotate</string> <string>Rotate</string>
</property> </property>
</widget> </widget>
<widget class="QToolButton"> <widget class="TQToolButton">
<property name="name"> <property name="name">
<cstring>m_pPrefButton</cstring> <cstring>m_pPrefButton</cstring>
</property> </property>
@ -243,7 +243,7 @@
</spacer> </spacer>
</hbox> </hbox>
</widget> </widget>
<widget class="QWidgetStack"> <widget class="TQWidgetStack">
<property name="name"> <property name="name">
<cstring>m_pStack</cstring> <cstring>m_pStack</cstring>
</property> </property>
@ -255,7 +255,7 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>WStackPage</cstring> <cstring>WStackPage</cstring>
</property> </property>
@ -276,7 +276,7 @@
</widget> </widget>
</vbox> </vbox>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>WStackPage</cstring> <cstring>WStackPage</cstring>
</property> </property>
@ -297,7 +297,7 @@
</widget> </widget>
</vbox> </vbox>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>WStackPage</cstring> <cstring>WStackPage</cstring>
</property> </property>
@ -319,7 +319,7 @@
</vbox> </vbox>
</widget> </widget>
</widget> </widget>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>m_pHelpLabel</cstring> <cstring>m_pHelpLabel</cstring>
</property> </property>
@ -418,7 +418,7 @@
<slot access="protected">slotZoomOutClicked()</slot> <slot access="protected">slotZoomOutClicked()</slot>
<slot access="protected">slotRotateClicked()</slot> <slot access="protected">slotRotateClicked()</slot>
<slot access="protected">slotViewChanged(int)</slot> <slot access="protected">slotViewChanged(int)</slot>
<slot access="protected">slotViewChanged(QWidget*)</slot> <slot access="protected">slotViewChanged(TQWidget*)</slot>
<slot access="protected">slotPrefClicked()</slot> <slot access="protected">slotPrefClicked()</slot>
</slots> </slots>
<layoutdefaults spacing="6" margin="11"/> <layoutdefaults spacing="6" margin="11"/>

@ -34,7 +34,7 @@
* @param pParent The widget to use as the parent of all Call Tree * @param pParent The widget to use as the parent of all Call Tree
* dialogues * dialogues
*/ */
CallTreeManager::CallTreeManager(QWidget* pParent) : QObject(pParent) CallTreeManager::CallTreeManager(TQWidget* pParent) : TQObject(pParent)
{ {
// Delete dialogue objects when they are removed from the list // Delete dialogue objects when they are removed from the list
m_lstDialogs.setAutoDelete(true); m_lstDialogs.setAutoDelete(true);
@ -52,8 +52,8 @@ CallTreeManager::~CallTreeManager()
* @param sProjPath The project's directory * @param sProjPath The project's directory
* @param slFiles Holds a list of saved file names, upon return * @param slFiles Holds a list of saved file names, upon return
*/ */
void CallTreeManager::saveOpenDialogs(const QString& sProjPath, void CallTreeManager::saveOpenDialogs(const TQString& sProjPath,
QStringList& slFiles) TQStringList& slFiles)
{ {
CallTreeDlg *pDlg; CallTreeDlg *pDlg;
@ -70,10 +70,10 @@ void CallTreeManager::saveOpenDialogs(const QString& sProjPath,
* @param sProjPath The project's directory * @param sProjPath The project's directory
* @param slFiles A list of file names to open * @param slFiles A list of file names to open
*/ */
void CallTreeManager::loadOpenDialogs(const QString& sProjPath, void CallTreeManager::loadOpenDialogs(const TQString& sProjPath,
const QStringList& slFiles) const TQStringList& slFiles)
{ {
QStringList::ConstIterator itr; TQStringList::ConstIterator itr;
CallTreeDlg *pDlg; CallTreeDlg *pDlg;
for (itr = slFiles.begin(); itr != slFiles.end(); ++itr) { for (itr = slFiles.begin(); itr != slFiles.end(); ++itr) {
@ -104,8 +104,8 @@ CallTreeDlg* CallTreeManager::addDialog()
m_lstDialogs.append(pDlg); m_lstDialogs.append(pDlg);
// Open an editor whenever a function name is double-clicked // Open an editor whenever a function name is double-clicked
connect(pDlg, SIGNAL(lineRequested(const QString&, uint)), connect(pDlg, SIGNAL(lineRequested(const TQString&, uint)),
this, SIGNAL(lineRequested(const QString&, uint))); this, SIGNAL(lineRequested(const TQString&, uint)));
// Track the closing of the call tree dialog // Track the closing of the call tree dialog
connect(pDlg, SIGNAL(closed(const CallTreeDlg*)), this, connect(pDlg, SIGNAL(closed(const CallTreeDlg*)), this,

@ -28,8 +28,8 @@
#ifndef CALLTREEMANAGER_H #ifndef CALLTREEMANAGER_H
#define CALLTREEMANAGER_H #define CALLTREEMANAGER_H
#include <qwidget.h> #include <ntqwidget.h>
#include <qptrlist.h> #include <ntqptrlist.h>
class CallTreeDlg; class CallTreeDlg;
@ -38,16 +38,16 @@ class CallTreeDlg;
* Responsible for saving/loading of the call tree dialogs. * Responsible for saving/loading of the call tree dialogs.
* @author Albert Yosher * @author Albert Yosher
*/ */
class CallTreeManager : public QObject class CallTreeManager : public TQObject
{ {
Q_OBJECT Q_OBJECT
public: public:
CallTreeManager(QWidget*); CallTreeManager(TQWidget*);
~CallTreeManager(); ~CallTreeManager();
void saveOpenDialogs(const QString&, QStringList&); void saveOpenDialogs(const TQString&, TQStringList&);
void loadOpenDialogs(const QString&, const QStringList&); void loadOpenDialogs(const TQString&, const TQStringList&);
CallTreeDlg* addDialog(); CallTreeDlg* addDialog();
void closeAll(); void closeAll();
@ -58,11 +58,11 @@ signals:
* @param sPath The full path of the file to show * @param sPath The full path of the file to show
* @param nLine The line number in this file * @param nLine The line number in this file
*/ */
void lineRequested(const QString& sPath, uint nLine); void lineRequested(const TQString& sPath, uint nLine);
private: private:
/** The list of open call tree dialogues. */ /** The list of open call tree dialogues. */
QPtrList<CallTreeDlg> m_lstDialogs; TQPtrList<CallTreeDlg> m_lstDialogs;
private slots: private slots:
void slotRemoveDialog(const CallTreeDlg*); void slotRemoveDialog(const CallTreeDlg*);

@ -56,13 +56,13 @@ ConfigFrontend::~ConfigFrontend()
* @param bCscopeOptsOnly Only verify cscope's path and options * @param bCscopeOptsOnly Only verify cscope's path and options
* @return true if successful, false otherwise * @return true if successful, false otherwise
*/ */
bool ConfigFrontend::run(const QString& sCscopePath, bool ConfigFrontend::run(const TQString& sCscopePath,
const QString& sCtagsPath, const QString& sDotPath, const TQString& sCtagsPath, const TQString& sDotPath,
bool bCscopeOptsOnly) bool bCscopeOptsOnly)
{ {
QStringList slArgs; TQStringList slArgs;
KStandardDirs sd; KStandardDirs sd;
QString sScript; TQString sScript;
// Execute using the user's shell // Execute using the user's shell
setUseShell(true); setUseShell(true);
@ -101,7 +101,7 @@ bool ConfigFrontend::run(const QString& sCscopePath,
* a different test. * a different test.
* @param sToken The generated token * @param sToken The generated token
*/ */
Frontend::ParseResult ConfigFrontend::parseStdout(QString& sToken, Frontend::ParseResult ConfigFrontend::parseStdout(TQString& sToken,
ParserDelim) ParserDelim)
{ {
uint nResult; uint nResult;

@ -43,7 +43,7 @@ public:
ConfigFrontend(bool bAutoDelete = false); ConfigFrontend(bool bAutoDelete = false);
~ConfigFrontend(); ~ConfigFrontend();
bool run(const QString&, const QString&, const QString&, bool run(const TQString&, const TQString&, const TQString&,
bool bCscopeOptsOnly = false); bool bCscopeOptsOnly = false);
/** /**
@ -64,10 +64,10 @@ signals:
* @param nType The type of test executed * @param nType The type of test executed
* @param sResult The obtained result * @param sResult The obtained result
*/ */
void result(uint nType, const QString& sResult); void result(uint nType, const TQString& sResult);
protected: protected:
virtual ParseResult parseStdout(QString&, ParserDelim); virtual ParseResult parseStdout(TQString&, ParserDelim);
private: private:
/** The type of test whose result is expected next. */ /** The type of test whose result is expected next. */

@ -25,8 +25,8 @@
* *
***************************************************************************/ ***************************************************************************/
#include <qfileinfo.h> #include <ntqfileinfo.h>
#include <qtimer.h> #include <ntqtimer.h>
#include <kconfig.h> #include <kconfig.h>
#include <kmessagebox.h> #include <kmessagebox.h>
#include <klocale.h> #include <klocale.h>
@ -41,7 +41,7 @@
#define REGEXP_STR "Symbols matched %d of %d" #define REGEXP_STR "Symbols matched %d of %d"
#define SEARCHEND_STR "%d lines" #define SEARCHEND_STR "%d lines"
QString CscopeFrontend::s_sProjPath; TQString CscopeFrontend::s_sProjPath;
uint CscopeFrontend::s_nProjArgs; uint CscopeFrontend::s_nProjArgs;
uint CscopeFrontend::s_nSupArgs; uint CscopeFrontend::s_nSupArgs;
@ -72,9 +72,9 @@ CscopeFrontend::~CscopeFrontend()
* @param slArgs Command line arguments for Cscope * @param slArgs Command line arguments for Cscope
* @return true if successful, false otherwise * @return true if successful, false otherwise
*/ */
bool CscopeFrontend::run(const QStringList& slArgs) bool CscopeFrontend::run(const TQStringList& slArgs)
{ {
QStringList slCmdLine; TQStringList slCmdLine;
// Set the command line arguments // Set the command line arguments
slCmdLine.append(Config().getCscopePath()); slCmdLine.append(Config().getCscopePath());
@ -113,16 +113,16 @@ bool CscopeFrontend::run(const QStringList& slArgs)
* @param nMaxRecords The maximal number of records to return (abort if this * @param nMaxRecords The maximal number of records to return (abort if this
* number is exceeded) * number is exceeded)
*/ */
void CscopeFrontend::query(uint nType, const QString& sText, bool bCase, void CscopeFrontend::query(uint nType, const TQString& sText, bool bCase,
uint nMaxRecords) uint nMaxRecords)
{ {
QString sQuery; TQString sQuery;
QStringList slArgs; TQStringList slArgs;
m_nMaxRecords = nMaxRecords; m_nMaxRecords = nMaxRecords;
// Create the Cscope command line // Create the Cscope command line
slArgs.append(QString("-L") + QString::number(nType)); slArgs.append(TQString("-L") + TQString::number(nType));
slArgs.append(sText); slArgs.append(sText);
slArgs.append("-d"); slArgs.append("-d");
if (!bCase) if (!bCase)
@ -142,7 +142,7 @@ void CscopeFrontend::query(uint nType, const QString& sText, bool bCase,
*/ */
void CscopeFrontend::rebuild() void CscopeFrontend::rebuild()
{ {
QStringList slArgs; TQStringList slArgs;
// If a process is already running, kill it start a new one // If a process is already running, kill it start a new one
if (isRunning()) { if (isRunning()) {
@ -168,7 +168,7 @@ void CscopeFrontend::rebuild()
* @param sProjPath The full path of the project's directory * @param sProjPath The full path of the project's directory
* @param nArgs Project-specific command-line arguments * @param nArgs Project-specific command-line arguments
*/ */
void CscopeFrontend::init(const QString& sProjPath, uint nArgs) void CscopeFrontend::init(const TQString& sProjPath, uint nArgs)
{ {
s_sProjPath = sProjPath; s_sProjPath = sProjPath;
s_nProjArgs = nArgs; s_nProjArgs = nArgs;
@ -191,7 +191,7 @@ void CscopeFrontend::slotCancel()
* @return A value indicating the way this token should be treated: dropped, * @return A value indicating the way this token should be treated: dropped,
* added to the token queue, or finishes a new record * added to the token queue, or finishes a new record
*/ */
Frontend::ParseResult CscopeFrontend::parseStdout(QString& sToken, Frontend::ParseResult CscopeFrontend::parseStdout(TQString& sToken,
ParserDelim /* ignored */) ParserDelim /* ignored */)
{ {
int nFiles, nTotal, nRecords; int nFiles, nTotal, nRecords;
@ -345,7 +345,7 @@ Frontend::ParseResult CscopeFrontend::parseStdout(QString& sToken,
* Handles Cscope messages sent to the standard error stream. * Handles Cscope messages sent to the standard error stream.
* @param sText The error message text * @param sText The error message text
*/ */
void CscopeFrontend::parseStderr(const QString& sText) void CscopeFrontend::parseStderr(const TQString& sText)
{ {
// Wait for a complete line to arrive // Wait for a complete line to arrive
m_sErrMsg += sText; m_sErrMsg += sText;
@ -381,7 +381,7 @@ void CscopeFrontend::finalize()
* @param pMainWidget The parent widget to use for the progress bar and * @param pMainWidget The parent widget to use for the progress bar and
* label * label
*/ */
CscopeProgress::CscopeProgress(QWidget* pMainWidget) : QObject(), CscopeProgress::CscopeProgress(TQWidget* pMainWidget) : TQObject(),
m_pMainWidget(pMainWidget), m_pMainWidget(pMainWidget),
m_pProgressBar(NULL), m_pProgressBar(NULL),
m_pLabel(NULL) m_pLabel(NULL)
@ -415,9 +415,9 @@ void CscopeProgress::setProgress(int nProgress, int nTotal)
// Show the "Please wait..." label // Show the "Please wait..." label
if (m_pLabel == NULL) { if (m_pLabel == NULL) {
m_pLabel = new QLabel(i18n("Processing query results, " m_pLabel = new TQLabel(i18n("Processing query results, "
"please wait..."), m_pMainWidget); "please wait..."), m_pMainWidget);
m_pLabel->setFrameStyle(QFrame::Box | QFrame::Plain); m_pLabel->setFrameStyle(TQFrame::Box | TQFrame::Plain);
m_pLabel->setLineWidth(1); m_pLabel->setLineWidth(1);
m_pLabel->adjustSize(); m_pLabel->adjustSize();
@ -426,7 +426,7 @@ void CscopeProgress::setProgress(int nProgress, int nTotal)
m_pLabel->setPaletteForegroundColor( m_pLabel->setPaletteForegroundColor(
KGlobalSettings::highlightedTextColor()); KGlobalSettings::highlightedTextColor());
QTimer::singleShot(1000, this, SLOT(slotShowLabel())); TQTimer::singleShot(1000, this, SLOT(slotShowLabel()));
} }
return; return;
@ -437,8 +437,8 @@ void CscopeProgress::setProgress(int nProgress, int nTotal)
// first progress signal is received. Thus the bar will not be displayed // first progress signal is received. Thus the bar will not be displayed
// on very short queries. // on very short queries.
if (m_pProgressBar == NULL) { if (m_pProgressBar == NULL) {
m_pProgressBar = new QProgressBar(m_pMainWidget); m_pProgressBar = new TQProgressBar(m_pMainWidget);
QTimer::singleShot(1000, this, SLOT(slotShowProgressBar())); TQTimer::singleShot(1000, this, SLOT(slotShowProgressBar()));
} }
// Set the current progress value // Set the current progress value
@ -490,14 +490,14 @@ void CscopeVerifier::verify()
ConfigFrontend* pConf; ConfigFrontend* pConf;
pConf = new ConfigFrontend(true); pConf = new ConfigFrontend(true);
connect(pConf, SIGNAL(result(uint, const QString&)), this, connect(pConf, SIGNAL(result(uint, const TQString&)), this,
SLOT(slotConfigResult(uint, const QString&))); SLOT(slotConfigResult(uint, const TQString&)));
connect(pConf, SIGNAL(finished(uint)), this, SLOT(slotFinished())); connect(pConf, SIGNAL(finished(uint)), this, SLOT(slotFinished()));
pConf->run(Config().getCscopePath(), "", "", true); pConf->run(Config().getCscopePath(), "", "", true);
} }
void CscopeVerifier::slotConfigResult(uint nType, const QString& sResult) void CscopeVerifier::slotConfigResult(uint nType, const TQString& sResult)
{ {
switch (nType) { switch (nType) {
case ConfigFrontend::CscopeVerbose: case ConfigFrontend::CscopeVerbose:

@ -28,9 +28,9 @@
#ifndef CSCOPEFRONTEND_H #ifndef CSCOPEFRONTEND_H
#define CSCOPEFRONTEND_H #define CSCOPEFRONTEND_H
#include <qstringlist.h> #include <ntqstringlist.h>
#include <qprogressbar.h> #include <ntqprogressbar.h>
#include <qlabel.h> #include <ntqlabel.h>
#include "frontend.h" #include "frontend.h"
#define CSCOPE_RECORD_SIZE 4 #define CSCOPE_RECORD_SIZE 4
@ -71,10 +71,10 @@ public:
enum Options { VerboseOut = 0x01, SlowPathDef = 0x02, enum Options { VerboseOut = 0x01, SlowPathDef = 0x02,
Kernel = 0x04, InvIndex = 0x08, NoCompression = 0x10 }; Kernel = 0x04, InvIndex = 0x08, NoCompression = 0x10 };
void query(uint, const QString&, bool bCase = true, uint nMaxRecords = 0); void query(uint, const TQString&, bool bCase = true, uint nMaxRecords = 0);
void rebuild(); void rebuild();
static void init(const QString&, uint); static void init(const TQString&, uint);
/** /**
* @param nArgs The command-line arguments supported by the version of * @param nArgs The command-line arguments supported by the version of
@ -92,8 +92,8 @@ signals:
void buildInvIndex(); void buildInvIndex();
protected: protected:
virtual ParseResult parseStdout(QString&, ParserDelim); virtual ParseResult parseStdout(TQString&, ParserDelim);
virtual void parseStderr(const QString&); virtual void parseStderr(const TQString&);
virtual void finalize(); virtual void finalize();
private: private:
@ -107,7 +107,7 @@ private:
ParserState m_state; ParserState m_state;
/** Accumulates text sent by Cscope to the standard error stream. */ /** Accumulates text sent by Cscope to the standard error stream. */
QString m_sErrMsg; TQString m_sErrMsg;
/** If true, the rebuild process will be restarted when the process /** If true, the rebuild process will be restarted when the process
exits. */ exits. */
@ -118,7 +118,7 @@ private:
int m_nMaxRecords; int m_nMaxRecords;
/** The full path of the directory holding the project files. */ /** The full path of the directory holding the project files. */
static QString s_sProjPath; static TQString s_sProjPath;
/** Project-specific options for the command-line arguments. */ /** Project-specific options for the command-line arguments. */
static uint s_nProjArgs; static uint s_nProjArgs;
@ -126,7 +126,7 @@ private:
/** The command line arguments supported by this version of Cscope. */ /** The command line arguments supported by this version of Cscope. */
static uint s_nSupArgs; static uint s_nSupArgs;
bool run(const QStringList&); bool run(const TQStringList&);
}; };
/** /**
@ -136,12 +136,12 @@ private:
* output is being processed. * output is being processed.
* @author Elad Lahav * @author Elad Lahav
*/ */
class CscopeProgress : public QObject class CscopeProgress : public TQObject
{ {
Q_OBJECT Q_OBJECT
public: public:
CscopeProgress(QWidget*); CscopeProgress(TQWidget*);
~CscopeProgress(); ~CscopeProgress();
void setProgress(int, int); void setProgress(int, int);
@ -149,20 +149,20 @@ public:
private: private:
/** The parent widget for the progress bar and label. */ /** The parent widget for the progress bar and label. */
QWidget* m_pMainWidget; TQWidget* m_pMainWidget;
/** A bar used to display query progress information. */ /** A bar used to display query progress information. */
QProgressBar* m_pProgressBar; TQProgressBar* m_pProgressBar;
/** A label used to display a "Please wait..." message. */ /** A label used to display a "Please wait..." message. */
QLabel* m_pLabel; TQLabel* m_pLabel;
private slots: private slots:
void slotShowProgressBar(); void slotShowProgressBar();
void slotShowLabel(); void slotShowLabel();
}; };
class CscopeVerifier : public QObject class CscopeVerifier : public TQObject
{ {
Q_OBJECT Q_OBJECT
@ -179,7 +179,7 @@ private:
uint m_nArgs; uint m_nArgs;
private slots: private slots:
void slotConfigResult(uint, const QString&); void slotConfigResult(uint, const TQString&);
void slotFinished(); void slotFinished();
}; };

@ -25,8 +25,8 @@
* *
***************************************************************************/ ***************************************************************************/
#include <qtextedit.h> #include <ntqtextedit.h>
#include <qpushbutton.h> #include <ntqpushbutton.h>
#include "cscopemsgdlg.h" #include "cscopemsgdlg.h"
/** /**
@ -34,7 +34,7 @@
* @param pParent The parent widget * @param pParent The parent widget
* @param szName The widget's name * @param szName The widget's name
*/ */
CscopeMsgDlg::CscopeMsgDlg(QWidget* pParent, const char* szName) CscopeMsgDlg::CscopeMsgDlg(TQWidget* pParent, const char* szName)
: CscopeMsgLayout(pParent, szName, false, 0) : CscopeMsgLayout(pParent, szName, false, 0)
{ {
// Hide the dialog when the "Hide" button is clicked // Hide the dialog when the "Hide" button is clicked
@ -56,7 +56,7 @@ CscopeMsgDlg::~CscopeMsgDlg()
* After a new messsage is added, the dialog becomes visible. * After a new messsage is added, the dialog becomes visible.
* @param sText The text of the message to add * @param sText The text of the message to add
*/ */
void CscopeMsgDlg::addText(const QString& sText) void CscopeMsgDlg::addText(const TQString& sText)
{ {
m_pMsgText->append(sText); m_pMsgText->append(sText);
show(); show();

@ -39,10 +39,10 @@ class CscopeMsgDlg : public CscopeMsgLayout
Q_OBJECT Q_OBJECT
public: public:
CscopeMsgDlg(QWidget* pParent = 0, const char* szName = 0); CscopeMsgDlg(TQWidget* pParent = 0, const char* szName = 0);
~CscopeMsgDlg(); ~CscopeMsgDlg();
void addText(const QString&); void addText(const TQString&);
}; };
#endif #endif

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>CscopeMsgLayout</class> <class>CscopeMsgLayout</class>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>CscopeMsgLayout</cstring> <cstring>CscopeMsgLayout</cstring>
</property> </property>
@ -19,7 +19,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QTextEdit"> <widget class="TQTextEdit">
<property name="name"> <property name="name">
<cstring>m_pMsgText</cstring> <cstring>m_pMsgText</cstring>
</property> </property>
@ -30,7 +30,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout1</cstring> <cstring>layout1</cstring>
</property> </property>
@ -55,7 +55,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pClearButton</cstring> <cstring>m_pClearButton</cstring>
</property> </property>
@ -63,7 +63,7 @@
<string>Clear</string> <string>Clear</string>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pHideButton</cstring> <cstring>m_pHideButton</cstring>
</property> </property>

@ -25,14 +25,14 @@
* *
***************************************************************************/ ***************************************************************************/
#include <qfileinfo.h> #include <ntqfileinfo.h>
#include <kmessagebox.h> #include <kmessagebox.h>
#include <klocale.h> #include <klocale.h>
#include <kshell.h> #include <kshell.h>
#include "ctagsfrontend.h" #include "ctagsfrontend.h"
#include "kscopeconfig.h" #include "kscopeconfig.h"
QStringList CtagsFrontend::s_slExtraArgs; TQStringList CtagsFrontend::s_slExtraArgs;
/** /**
* Class constructor. * Class constructor.
@ -53,10 +53,10 @@ CtagsFrontend::~CtagsFrontend()
* @param sFileName The full path to the source file * @param sFileName The full path to the source file
* @return true if successful, false otherwise * @return true if successful, false otherwise
*/ */
bool CtagsFrontend::run(const QString& sFileName) bool CtagsFrontend::run(const TQString& sFileName)
{ {
QString sPath; TQString sPath;
QStringList slArgs; TQStringList slArgs;
// Make sure the executable exists // Make sure the executable exists
sPath = Config().getCtagsPath(); sPath = Config().getCtagsPath();
@ -90,9 +90,9 @@ bool CtagsFrontend::run(const QString& sFileName)
* @return true if the file in the given path exists and has executable * @return true if the file in the given path exists and has executable
* permissions, false otherwise * permissions, false otherwise
*/ */
bool CtagsFrontend::verify(const QString& sPath) bool CtagsFrontend::verify(const TQString& sPath)
{ {
QFileInfo fi(sPath); TQFileInfo fi(sPath);
if (!fi.exists() || !fi.isFile() || !fi.isExecutable() || if (!fi.exists() || !fi.isFile() || !fi.isExecutable() ||
fi.fileName().find("ctags", 0, false) == -1) { fi.fileName().find("ctags", 0, false) == -1) {
@ -109,7 +109,7 @@ bool CtagsFrontend::verify(const QString& sPath)
* command-line arguments. * command-line arguments.
* @param sArgs The per-project command string * @param sArgs The per-project command string
*/ */
void CtagsFrontend::setExtraArgs(const QString& sArgs) void CtagsFrontend::setExtraArgs(const TQString& sArgs)
{ {
s_slExtraArgs = KShell::splitArgs(sArgs); s_slExtraArgs = KShell::splitArgs(sArgs);
} }
@ -122,7 +122,7 @@ void CtagsFrontend::setExtraArgs(const QString& sArgs)
* @return A value indicating the way this token should be treated: dropped, * @return A value indicating the way this token should be treated: dropped,
* added to the token queue, or finishes a new record * added to the token queue, or finishes a new record
*/ */
Frontend::ParseResult CtagsFrontend::parseStdout(QString& sToken, Frontend::ParseResult CtagsFrontend::parseStdout(TQString& sToken,
ParserDelim delim) ParserDelim delim)
{ {
ParseResult result = DiscardToken; ParseResult result = DiscardToken;

@ -55,13 +55,13 @@ public:
CtagsFrontend(); CtagsFrontend();
~CtagsFrontend(); ~CtagsFrontend();
bool run(const QString&); bool run(const TQString&);
static bool verify(const QString&); static bool verify(const TQString&);
static void setExtraArgs(const QString&); static void setExtraArgs(const TQString&);
protected: protected:
virtual ParseResult parseStdout(QString&, ParserDelim); virtual ParseResult parseStdout(TQString&, ParserDelim);
private: private:
/** State values for the parser state machine. */ /** State values for the parser state machine. */
@ -71,7 +71,7 @@ private:
ParserState m_state; ParserState m_state;
/** Additional ommand-line arguments (per-project). */ /** Additional ommand-line arguments (per-project). */
static QStringList s_slExtraArgs; static TQStringList s_slExtraArgs;
}; };
#endif #endif

@ -25,7 +25,7 @@
* *
***************************************************************************/ ***************************************************************************/
#include <qheader.h> #include <ntqheader.h>
#include <klocale.h> #include <klocale.h>
#include "ctagslist.h" #include "ctagslist.h"
#include "kscopeconfig.h" #include "kscopeconfig.h"
@ -40,7 +40,7 @@
* correct sorting. * correct sorting.
* @author Elad Lahav * @author Elad Lahav
*/ */
class CtagsListItem : public QListViewItem class CtagsListItem : public TQListViewItem
{ {
public: public:
/** /**
@ -50,8 +50,8 @@ public:
* @param sLine The line in which the tag is defined * @param sLine The line in which the tag is defined
* @param sType The type of the tag * @param sType The type of the tag
*/ */
CtagsListItem(QListView* pParent, QString sName, QString sLine, CtagsListItem(TQListView* pParent, TQString sName, TQString sLine,
QString sType) : QListViewItem(pParent, sName, sLine, sType), TQString sType) : TQListViewItem(pParent, sName, sLine, sType),
m_nPendLine (sLine.toUInt()) {} m_nPendLine (sLine.toUInt()) {}
/** /**
@ -65,7 +65,7 @@ public:
* @return 0 if the items are equal, 1 if the local item is greater, -1 * @return 0 if the items are equal, 1 if the local item is greater, -1
* if the local item is lesser * if the local item is lesser
*/ */
virtual int compare(QListViewItem* pItem, int nCol, bool bAscend) const { virtual int compare(TQListViewItem* pItem, int nCol, bool bAscend) const {
if (nCol == 1) { if (nCol == 1) {
uint nLineCur, nLineOther; uint nLineCur, nLineOther;
int nResult; int nResult;
@ -85,7 +85,7 @@ public:
} }
// Use default comparison for text columns // Use default comparison for text columns
return QListViewItem::compare(pItem, nCol, bAscend); return TQListViewItem::compare(pItem, nCol, bAscend);
} }
/** /**
@ -103,7 +103,7 @@ private:
* @param pParent The parent widget * @param pParent The parent widget
* @param szName The widget's name * @param szName The widget's name
*/ */
CtagsList::CtagsList(QWidget* pParent, const char* szName) : CtagsList::CtagsList(TQWidget* pParent, const char* szName) :
SearchList(0, pParent, szName), SearchList(0, pParent, szName),
m_arrLines(16), m_arrLines(16),
m_nItems(0), m_nItems(0),
@ -147,7 +147,7 @@ CtagsList::CtagsList(QWidget* pParent, const char* szName) :
m_pList->addColumn(i18n("Name")); m_pList->addColumn(i18n("Name"));
m_pList->addColumn(i18n("Line")); m_pList->addColumn(i18n("Line"));
m_pList->addColumn(i18n("Type")); m_pList->addColumn(i18n("Type"));
m_pList->setColumnAlignment(1, Qt::AlignRight); m_pList->setColumnAlignment(1, TQt::AlignRight);
// Set colours and font // Set colours and font
applyPrefs(); applyPrefs();
@ -167,7 +167,7 @@ CtagsList::~CtagsList()
*/ */
void CtagsList::slotDataReady(FrontendToken* pToken) void CtagsList::slotDataReady(FrontendToken* pToken)
{ {
QString sName, sType, sLine; TQString sName, sType, sLine;
CtagsListItem* pItem; CtagsListItem* pItem;
KScopePixmaps::PixName pix; KScopePixmaps::PixName pix;
@ -247,7 +247,7 @@ void CtagsList::slotDataReady(FrontendToken* pToken)
// Resize the line array, if required // Resize the line array, if required
if (m_arrLines.size() < m_nItems) if (m_arrLines.size() < m_nItems)
m_arrLines.resize(m_nItems, QGArray::SpeedOptim); m_arrLines.resize(m_nItems, TQGArray::SpeedOptim);
// Add the new item to the line array // Add the new item to the line array
m_arrLines[m_nItems - 1] = pItem; m_arrLines[m_nItems - 1] = pItem;
@ -258,7 +258,7 @@ void CtagsList::slotDataReady(FrontendToken* pToken)
* changes. * changes.
* @param pEvent The event data * @param pEvent The event data
*/ */
void CtagsList::resizeEvent(QResizeEvent* pEvent) void CtagsList::resizeEvent(TQResizeEvent* pEvent)
{ {
SearchList::resizeEvent(pEvent); SearchList::resizeEvent(pEvent);
emit resized(); emit resized();
@ -270,9 +270,9 @@ void CtagsList::resizeEvent(QResizeEvent* pEvent)
* highlighted and the ENTER key is pressed. * highlighted and the ENTER key is pressed.
* @param pItem The selected list item * @param pItem The selected list item
*/ */
void CtagsList::processItemSelected(QListViewItem* pItem) void CtagsList::processItemSelected(TQListViewItem* pItem)
{ {
QString sLine; TQString sLine;
sLine = pItem->text(1); sLine = pItem->text(1);
emit lineRequested(sLine.toUInt()); emit lineRequested(sLine.toUInt());
@ -284,9 +284,9 @@ void CtagsList::processItemSelected(QListViewItem* pItem)
* @param sTip The constructed tip string (on return) * @param sTip The constructed tip string (on return)
* @return Always true * @return Always true
*/ */
bool CtagsList::getTip(QListViewItem* pItem, QString& sTip) bool CtagsList::getTip(TQListViewItem* pItem, TQString& sTip)
{ {
sTip = QString("Type: <b>%1</b><br>Name: <b>%2</b><br>Line: <b>%3</b>"). sTip = TQString("Type: <b>%1</b><br>Name: <b>%2</b><br>Line: <b>%3</b>").
arg(pItem->text(2)).arg(pItem->text(0)).arg(pItem->text(1)); arg(pItem->text(2)).arg(pItem->text(0)).arg(pItem->text(1));
return true; return true;
} }
@ -416,7 +416,7 @@ void CtagsList::slotCtagsFinished(uint nRecords)
*/ */
void CtagsList::slotSortChanged(int nSection) void CtagsList::slotSortChanged(int nSection)
{ {
Qt::SortOrder order; TQt::SortOrder order;
// Determine whether the new order is ascending or descending // Determine whether the new order is ascending or descending
order = m_pList->sortOrder(); order = m_pList->sortOrder();
@ -425,19 +425,19 @@ void CtagsList::slotSortChanged(int nSection)
switch (nSection) { switch (nSection) {
case 0: case 0:
// Sort by name // Sort by name
Config().setCtagSortOrder(order == Qt::Ascending ? Config().setCtagSortOrder(order == TQt::Ascending ?
KScopeConfig::NameAsc : KScopeConfig::NameDes); KScopeConfig::NameAsc : KScopeConfig::NameDes);
break; break;
case 1: case 1:
// Sort by line // Sort by line
Config().setCtagSortOrder(order == Qt::Ascending ? Config().setCtagSortOrder(order == TQt::Ascending ?
KScopeConfig::LineAsc : KScopeConfig::LineDes); KScopeConfig::LineAsc : KScopeConfig::LineDes);
break; break;
case 2: case 2:
// Sort by type // Sort by type
Config().setCtagSortOrder(order == Qt::Ascending ? Config().setCtagSortOrder(order == TQt::Ascending ?
KScopeConfig::TypeAsc : KScopeConfig::TypeDes); KScopeConfig::TypeAsc : KScopeConfig::TypeDes);
break; break;
} }

@ -28,9 +28,9 @@
#ifndef CTAGSLIST_H #ifndef CTAGSLIST_H
#define CTAGSLIST_H #define CTAGSLIST_H
#include <qwidget.h> #include <ntqwidget.h>
#include <qpixmap.h> #include <ntqpixmap.h>
#include <qmemarray.h> #include <ntqmemarray.h>
#include "searchlist.h" #include "searchlist.h"
#include "frontend.h" #include "frontend.h"
@ -51,14 +51,14 @@ class CtagsList : public SearchList
Q_OBJECT Q_OBJECT
public: public:
CtagsList(QWidget* pParent = 0, const char* szName = 0); CtagsList(TQWidget* pParent = 0, const char* szName = 0);
~CtagsList(); ~CtagsList();
void applyPrefs(); void applyPrefs();
void gotoLine(uint); void gotoLine(uint);
void clear(); void clear();
virtual bool getTip(QListViewItem*, QString&); virtual bool getTip(TQListViewItem*, TQString&);
public slots: public slots:
void slotDataReady(FrontendToken*); void slotDataReady(FrontendToken*);
@ -78,13 +78,13 @@ signals:
void lineRequested(uint nLine); void lineRequested(uint nLine);
protected: protected:
virtual void resizeEvent(QResizeEvent*); virtual void resizeEvent(TQResizeEvent*);
virtual void processItemSelected(QListViewItem*); virtual void processItemSelected(TQListViewItem*);
private: private:
/** An array of pointers to the tag list items, sorted by the line /** An array of pointers to the tag list items, sorted by the line
number. */ number. */
QMemArray<CtagsListItem*> m_arrLines; TQMemArray<CtagsListItem*> m_arrLines;
/** The number of items in the tag list. */ /** The number of items in the tag list. */
uint m_nItems; uint m_nItems;

@ -25,7 +25,7 @@
* *
***************************************************************************/ ***************************************************************************/
#include <qapplication.h> #include <ntqapplication.h>
#include "dirscanner.h" #include "dirscanner.h"
/** /**
@ -34,7 +34,7 @@
* @param bFinished true if all files were scanned, false otherwise * @param bFinished true if all files were scanned, false otherwise
*/ */
DirScanEvent::DirScanEvent(int nFiles, bool bFinished) DirScanEvent::DirScanEvent(int nFiles, bool bFinished)
: QCustomEvent(EventId), : TQCustomEvent(EventId),
m_nFiles(nFiles), m_nFiles(nFiles),
m_bFinished(bFinished) m_bFinished(bFinished)
{ {
@ -47,8 +47,8 @@ DirScanEvent::DirScanEvent(int nFiles, bool bFinished)
* @param pDicFiles Pointer to a map of current project files (to * @param pDicFiles Pointer to a map of current project files (to
avoid duplication) avoid duplication)
*/ */
DirScanner::DirScanner(QObject* pEventReceiver, DirScanner::DirScanner(TQObject* pEventReceiver,
QDict<QListViewItem>* pDicFiles) : QThread(), TQDict<TQListViewItem>* pDicFiles) : TQThread(),
m_pEventReceiver(pEventReceiver), m_pEventReceiver(pEventReceiver),
m_pDicFiles(pDicFiles) m_pDicFiles(pDicFiles)
{ {
@ -70,18 +70,18 @@ DirScanner::~DirScanner()
* @param sNameFilter Defines the search pattern * @param sNameFilter Defines the search pattern
* @param bRecursive true to descend into sub-dorectories, false otherwise * @param bRecursive true to descend into sub-dorectories, false otherwise
*/ */
void DirScanner::start(const QString& sDir, const QString& sNameFilter, void DirScanner::start(const TQString& sDir, const TQString& sNameFilter,
bool bRecursive) bool bRecursive)
{ {
// Initialise the search parameters // Initialise the search parameters
m_dir = QDir(sDir); m_dir = TQDir(sDir);
m_sNameFilter = sNameFilter; m_sNameFilter = sNameFilter;
m_bCancel = false; m_bCancel = false;
m_bRecursive = bRecursive; m_bRecursive = bRecursive;
m_slFiles.clear(); m_slFiles.clear();
// Invoke the thread // Invoke the thread
QThread::start(); TQThread::start();
} }
/** /**
@ -93,7 +93,7 @@ void DirScanner::run()
int nFiles; int nFiles;
nFiles = scanDir(m_dir); nFiles = scanDir(m_dir);
QApplication::postEvent(m_pEventReceiver, TQApplication::postEvent(m_pEventReceiver,
new DirScanEvent(nFiles, true)); new DirScanEvent(nFiles, true));
m_setScanned.clear(); m_setScanned.clear();
@ -105,12 +105,12 @@ void DirScanner::run()
* added * added
* @return The total number of files added * @return The total number of files added
*/ */
int DirScanner::scanDir(QDir& dir) int DirScanner::scanDir(TQDir& dir)
{ {
QString sCanon; TQString sCanon;
QStringList slDirFiles, slDirs; TQStringList slDirFiles, slDirs;
QStringList::const_iterator itr; TQStringList::const_iterator itr;
QString sFile; TQString sFile;
int nFiles = 0; int nFiles = 0;
if (m_bCancel) if (m_bCancel)
@ -125,7 +125,7 @@ int DirScanner::scanDir(QDir& dir)
m_setScanned.insert(sCanon); m_setScanned.insert(sCanon);
// Add all files in this directory // Add all files in this directory
slDirFiles = dir.entryList(m_sNameFilter, QDir::Files); slDirFiles = dir.entryList(m_sNameFilter, TQDir::Files);
for (itr = slDirFiles.begin(); itr != slDirFiles.end(); ++itr) { for (itr = slDirFiles.begin(); itr != slDirFiles.end(); ++itr) {
sFile = dir.absPath() + "/" + *itr; sFile = dir.absPath() + "/" + *itr;
@ -136,14 +136,14 @@ int DirScanner::scanDir(QDir& dir)
} }
} }
QApplication::postEvent(m_pEventReceiver, TQApplication::postEvent(m_pEventReceiver,
new DirScanEvent(nFiles, false)); new DirScanEvent(nFiles, false));
// Recurse into sub-directories, if requested // Recurse into sub-directories, if requested
if (!m_bRecursive) if (!m_bRecursive)
return nFiles; return nFiles;
slDirs = dir.entryList(QDir::Dirs); slDirs = dir.entryList(TQDir::Dirs);
// Iterate the list of sub-directories // Iterate the list of sub-directories
for (itr = slDirs.begin(); itr != slDirs.end(); ++itr) { for (itr = slDirs.begin(); itr != slDirs.end(); ++itr) {
@ -155,7 +155,7 @@ int DirScanner::scanDir(QDir& dir)
continue; continue;
// Add the files in each sub-directory // Add the files in each sub-directory
QDir dirSub(dir); TQDir dirSub(dir);
if (dirSub.cd(*itr)) if (dirSub.cd(*itr))
nFiles += scanDir(dirSub); nFiles += scanDir(dirSub);
} }

@ -28,13 +28,13 @@
#ifndef DIRSCANNER_H #ifndef DIRSCANNER_H
#define DIRSCANNER_H #define DIRSCANNER_H
#include <qobject.h> #include <ntqobject.h>
#include <qevent.h> #include <ntqevent.h>
#include <qthread.h> #include <ntqthread.h>
#include <qdir.h> #include <ntqdir.h>
#include <qstringlist.h> #include <ntqstringlist.h>
#include <qdict.h> #include <ntqdict.h>
#include <qlistview.h> #include <ntqlistview.h>
class DirScanner; class DirScanner;
@ -43,7 +43,7 @@ class DirScanner;
* dir scanning thread to the main application thread. * dir scanning thread to the main application thread.
* @author Elad Lahav * @author Elad Lahav
*/ */
class DirScanEvent : public QCustomEvent class DirScanEvent : public TQCustomEvent
{ {
public: public:
/** The event's unique ID. */ /** The event's unique ID. */
@ -60,21 +60,21 @@ public:
/** /**
* A set of unique strings. * A set of unique strings.
* Qt3 does not have a set class, so this is a simple implementation based on * TQt3 does not have a set class, so this is a simple implementation based on
* a QDict of dummy int pointers. * a TQDict of dummy int pointers.
* @author Elad Lahav * @author Elad Lahav
*/ */
class StringSet : public QDict<int> class StringSet : public TQDict<int>
{ {
public: public:
StringSet() : QDict<int>() {} StringSet() : TQDict<int>() {}
void insert(const QString& sItem) { void insert(const TQString& sItem) {
static int nDummy = 0; static int nDummy = 0;
QDict<int>::insert(sItem, &nDummy); TQDict<int>::insert(sItem, &nDummy);
} }
bool exists(const QString& sItem) { bool exists(const TQString& sItem) {
return find(sItem) != NULL; return find(sItem) != NULL;
} }
}; };
@ -83,18 +83,18 @@ public:
* Scans a directory for files matching a given pattern, using a separate thread. * Scans a directory for files matching a given pattern, using a separate thread.
* @author Elad Lahav * @author Elad Lahav
*/ */
class DirScanner : public QThread class DirScanner : public TQThread
{ {
public: public:
DirScanner(QObject*, QDict<QListViewItem>*); DirScanner(TQObject*, TQDict<TQListViewItem>*);
~DirScanner(); ~DirScanner();
void start(const QString&, const QString&, bool); void start(const TQString&, const TQString&, bool);
/** /**
* @return The list of files scanned by this thread. * @return The list of files scanned by this thread.
*/ */
const QStringList& getFiles() { return m_slFiles; } const TQStringList& getFiles() { return m_slFiles; }
/** /**
* Stops a scanning process, by setting the object's cancel flag. * Stops a scanning process, by setting the object's cancel flag.
@ -111,10 +111,10 @@ protected:
private: private:
/** Pointer to an object that receives the scanner update events. */ /** Pointer to an object that receives the scanner update events. */
QObject* m_pEventReceiver; TQObject* m_pEventReceiver;
/** Currently scanned directory. */ /** Currently scanned directory. */
QDir m_dir; TQDir m_dir;
/** /**
* A set of already-scanned directories (prevents infinite loops in case * A set of already-scanned directories (prevents infinite loops in case
@ -124,13 +124,13 @@ private:
/** Pointer to a list of files indexed by the file path (used to identify /** Pointer to a list of files indexed by the file path (used to identify
files that should not appear in the scan results.) */ files that should not appear in the scan results.) */
QDict<QListViewItem>* m_pDicFiles; TQDict<TQListViewItem>* m_pDicFiles;
/** Regular expression for scanning source files. */ /** Regular expression for scanning source files. */
QString m_sNameFilter; TQString m_sNameFilter;
/** The list of scanned file paths. */ /** The list of scanned file paths. */
QStringList m_slFiles; TQStringList m_slFiles;
/** A cancellation flag. Stops the scanning process when raised. */ /** A cancellation flag. Stops the scanning process when raised. */
bool m_bCancel; bool m_bCancel;
@ -138,7 +138,7 @@ private:
/** true to descend to child directories, false otherwise. */ /** true to descend to child directories, false otherwise. */
bool m_bRecursive; bool m_bRecursive;
int scanDir(QDir&); int scanDir(TQDir&);
}; };
#endif #endif

@ -25,8 +25,8 @@
* *
***************************************************************************/ ***************************************************************************/
#include <qfileinfo.h> #include <ntqfileinfo.h>
#include <qpaintdevicemetrics.h> #include <ntqpaintdevicemetrics.h>
#include <kmessagebox.h> #include <kmessagebox.h>
#include <klocale.h> #include <klocale.h>
#include "dotfrontend.h" #include "dotfrontend.h"
@ -55,11 +55,11 @@ DotFrontend::~DotFrontend()
* description * description
* @return true if successful, false otherwise * @return true if successful, false otherwise
*/ */
bool DotFrontend::run(const QString& sFile) bool DotFrontend::run(const TQString& sFile)
{ {
QString sPath; TQString sPath;
QStringList slArgs; TQStringList slArgs;
QPaintDeviceMetrics pdm(m_pGraph); TQPaintDeviceMetrics pdm(m_pGraph);
// Set the horizontal and vertical DPI values // Set the horizontal and vertical DPI values
m_dDpiX = (double)pdm.logicalDpiX(); m_dDpiX = (double)pdm.logicalDpiX();
@ -90,9 +90,9 @@ bool DotFrontend::run(const QString& sFile)
* @return true if the file in the given path exists and has executable * @return true if the file in the given path exists and has executable
* permissions, false otherwise * permissions, false otherwise
*/ */
bool DotFrontend::verify(const QString& sPath) bool DotFrontend::verify(const TQString& sPath)
{ {
QFileInfo fi(sPath); TQFileInfo fi(sPath);
if (!fi.exists() || !fi.isFile() || !fi.isExecutable() || if (!fi.exists() || !fi.isFile() || !fi.isExecutable() ||
fi.fileName() != "dot") { fi.fileName() != "dot") {
@ -114,12 +114,12 @@ bool DotFrontend::verify(const QString& sPath)
* @return A value indicating the way this token should be treated: dropped, * @return A value indicating the way this token should be treated: dropped,
* added to the token queue, or finishes a new record * added to the token queue, or finishes a new record
*/ */
Frontend::ParseResult DotFrontend::parseStdout(QString& sToken, Frontend::ParseResult DotFrontend::parseStdout(TQString& sToken,
ParserDelim delim) ParserDelim delim)
{ {
static int nWidth, nHeight, nXpos, nYpos, nCurveSize, nCurveCount; static int nWidth, nHeight, nXpos, nYpos, nCurveSize, nCurveCount;
static QPointArray arrCurve; static TQPointArray arrCurve;
static QString sNode, sEdgeHead, sEdgeTail; static TQString sNode, sEdgeHead, sEdgeTail;
ParseResult result = DiscardToken; ParseResult result = DiscardToken;
double dVal; double dVal;
bool bOK; bool bOK;
@ -214,7 +214,7 @@ Frontend::ParseResult DotFrontend::parseStdout(QString& sToken,
nHeight = (int)(dVal * m_dDpiY); nHeight = (int)(dVal * m_dDpiY);
// Create the bounding rectangle of the node // Create the bounding rectangle of the node
QRect rect; TQRect rect;
rect.setX(nXpos - (nWidth / 2)); rect.setX(nXpos - (nWidth / 2));
rect.setY(nYpos - (nHeight / 2)); rect.setY(nYpos - (nHeight / 2));
rect.setWidth(nWidth); rect.setWidth(nWidth);
@ -272,7 +272,7 @@ Frontend::ParseResult DotFrontend::parseStdout(QString& sToken,
// Draw the edge // Draw the edge
m_pGraph->drawEdge(sEdgeHead, sEdgeTail, arrCurve); m_pGraph->drawEdge(sEdgeHead, sEdgeTail, arrCurve);
// Must detach from contents since a QPointArray shares data // Must detach from contents since a TQPointArray shares data
arrCurve.detach(); arrCurve.detach();
m_state = EndNodeEdge; m_state = EndNodeEdge;

@ -28,7 +28,7 @@
#define DOTFRONTEND_H #define DOTFRONTEND_H
#include <frontend.h> #include <frontend.h>
#include <qpointarray.h> #include <ntqpointarray.h>
class GraphWidget; class GraphWidget;
@ -46,12 +46,12 @@ public:
DotFrontend(GraphWidget*); DotFrontend(GraphWidget*);
~DotFrontend(); ~DotFrontend();
bool run(const QString&); bool run(const TQString&);
static bool verify(const QString&); static bool verify(const TQString&);
protected: protected:
virtual ParseResult parseStdout(QString&, ParserDelim); virtual ParseResult parseStdout(TQString&, ParserDelim);
private: private:
/** The owner graph widget on which to draw. */ /** The owner graph widget on which to draw. */

@ -1,9 +1,9 @@
/* dot.y */ /* dot.y */
%{ %{
#include <qdict.h> #include <ntqdict.h>
#include <qptrstack.h> #include <ntqptrstack.h>
#include <qlistview.h> #include <ntqlistview.h>
#include "calltreedlg.h" #include "calltreedlg.h"
#include "graphwidget.h" #include "graphwidget.h"
#include "treewidget.h" #include "treewidget.h"
@ -14,9 +14,9 @@ int yylex();
void yyinit(CallTreeDlg*, FILE*, Encoder*); void yyinit(CallTreeDlg*, FILE*, Encoder*);
void yyerror(const char*); void yyerror(const char*);
static QMap<QString, QString> s_pMapAttr; static TQMap<TQString, TQString> s_pMapAttr;
static QStack<QListViewItem> s_pParentStack; static TQStack<TQListViewItem> s_pParentStack;
static QListView* s_pTree; static TQListView* s_pTree;
static GraphWidget* s_pGraph; static GraphWidget* s_pGraph;
static TreeWidget* s_pCallTree; static TreeWidget* s_pCallTree;
@ -31,7 +31,7 @@ static Encoder* s_pEncoder;
%} %}
%union { %union {
QString* pText; TQString* pText;
} }
%token GRAPH DIGRAPH NODE NAME STRING NUMBER DIR_EDGE UNDIR_EDGE %token GRAPH DIGRAPH NODE NAME STRING NUMBER DIR_EDGE UNDIR_EDGE
@ -159,7 +159,7 @@ calling_tree_prepare
root_node root_node
: root_tree_node '{' child_list '}' : root_tree_node '{' child_list '}'
{ {
QListViewItem* pItem; TQListViewItem* pItem;
pItem = s_pParentStack.pop(); pItem = s_pParentStack.pop();
if (pItem->firstChild() != NULL) if (pItem->firstChild() != NULL)
@ -170,9 +170,9 @@ root_node
root_tree_node root_tree_node
: NAME : NAME
{ {
QListViewItem* pItem; TQListViewItem* pItem;
pItem = new QListViewItem(s_pTree, *$1); pItem = new TQListViewItem(s_pTree, *$1);
s_pParentStack.push(pItem); s_pParentStack.push(pItem);
delete $1; delete $1;
} }
@ -186,7 +186,7 @@ child_list
child_node child_node
: tree_node tree_attributes '{' child_list '}' : tree_node tree_attributes '{' child_list '}'
{ {
QListViewItem* pItem; TQListViewItem* pItem;
pItem = s_pParentStack.pop(); pItem = s_pParentStack.pop();
if (pItem->firstChild() != NULL) if (pItem->firstChild() != NULL)
@ -197,9 +197,9 @@ child_node
tree_node tree_node
: NAME : NAME
{ {
QListViewItem* pItem; TQListViewItem* pItem;
pItem = new QListViewItem(s_pParentStack.top(), *$1); pItem = new TQListViewItem(s_pParentStack.top(), *$1);
s_pParentStack.push(pItem); s_pParentStack.push(pItem);
delete $1; delete $1;
} }
@ -208,7 +208,7 @@ tree_node
tree_attributes tree_attributes
: attributes : attributes
{ {
QListViewItem* pItem; TQListViewItem* pItem;
pItem = s_pParentStack.top(); pItem = s_pParentStack.top();
pItem->setText(1, s_pMapAttr["kscope_file"]); pItem->setText(1, s_pMapAttr["kscope_file"]);

@ -1,7 +1,7 @@
/* dot.l */ /* dot.l */
%{ %{
#include <qstring.h> #include <ntqstring.h>
#include "dotparse.hpp" #include "dotparse.hpp"
%} %}

@ -35,7 +35,7 @@
* @param pParent The parent widget * @param pParent The parent widget
* @param szName The widget's name * @param szName The widget's name
*/ */
EditorManager::EditorManager(QWidget* pParent, const char* szName) : EditorManager::EditorManager(TQWidget* pParent, const char* szName) :
KParts::PartManager(pParent, szName) KParts::PartManager(pParent, szName)
{ {
applyPrefs(); applyPrefs();

@ -28,7 +28,7 @@
#ifndef EDITORMANAGER_H #ifndef EDITORMANAGER_H
#define EDITORMANAGER_H #define EDITORMANAGER_H
#include <qwidget.h> #include <ntqwidget.h>
#include <kparts/partmanager.h> #include <kparts/partmanager.h>
#include <klibloader.h> #include <klibloader.h>
#include <ktexteditor/document.h> #include <ktexteditor/document.h>
@ -45,7 +45,7 @@ class EditorManager : public KParts::PartManager
Q_OBJECT Q_OBJECT
public: public:
EditorManager(QWidget* pParent = 0, const char* szName = 0); EditorManager(TQWidget* pParent = 0, const char* szName = 0);
~EditorManager(); ~EditorManager();
KTextEditor::Document* add(); KTextEditor::Document* add();

@ -25,7 +25,7 @@
* *
***************************************************************************/ ***************************************************************************/
#include <qfileinfo.h> #include <ntqfileinfo.h>
#include <kdeversion.h> #include <kdeversion.h>
#include <ktexteditor/selectioninterface.h> #include <ktexteditor/selectioninterface.h>
#include <ktexteditor/viewcursorinterface.h> #include <ktexteditor/viewcursorinterface.h>
@ -43,8 +43,8 @@
* @param pParent The parent widget * @param pParent The parent widget
* @param szName The widget's name * @param szName The widget's name
*/ */
EditorPage::EditorPage(KTextEditor::Document* pDoc, QPopupMenu* pMenu, EditorPage::EditorPage(KTextEditor::Document* pDoc, TQPopupMenu* pMenu,
QTabWidget* pParent, const char* szName) : QHBox(pParent, szName), TQTabWidget* pParent, const char* szName) : TQHBox(pParent, szName),
m_pParentTab(pParent), m_pParentTab(pParent),
m_pDoc(pDoc), m_pDoc(pDoc),
m_bOpen(false), m_bOpen(false),
@ -58,7 +58,7 @@ EditorPage::EditorPage(KTextEditor::Document* pDoc, QPopupMenu* pMenu,
KTextEditor::PopupMenuInterface* pMenuIf; KTextEditor::PopupMenuInterface* pMenuIf;
KTextEditor::ViewCursorInterface* pCursorIf; KTextEditor::ViewCursorInterface* pCursorIf;
// Create code-completion objects (will be deleted by QObject destructor) // Create code-completion objects (will be deleted by TQObject destructor)
m_pCompletion = new SymbolCompletion(this, this); m_pCompletion = new SymbolCompletion(this, this);
// Set read-only mode, if required // Set read-only mode, if required
@ -66,10 +66,10 @@ EditorPage::EditorPage(KTextEditor::Document* pDoc, QPopupMenu* pMenu,
m_pDoc->setReadWrite(false); m_pDoc->setReadWrite(false);
// Create the child widgets // Create the child widgets
m_pSplit = new QSplitter(this); m_pSplit = new TQSplitter(this);
m_pCtagsList = new CtagsList(m_pSplit); m_pCtagsList = new CtagsList(m_pSplit);
m_pView = m_pDoc->createView(m_pSplit); m_pView = m_pDoc->createView(m_pSplit);
m_pSplit->setResizeMode(m_pCtagsList, QSplitter::KeepSize); m_pSplit->setResizeMode(m_pCtagsList, TQSplitter::KeepSize);
// Perform tasks only when the document has been loaded completely // Perform tasks only when the document has been loaded completely
connect(m_pDoc, SIGNAL(completed()), this, SLOT(slotFileOpened())); connect(m_pDoc, SIGNAL(completed()), this, SLOT(slotFileOpened()));
@ -137,7 +137,7 @@ KTextEditor::View* EditorPage::getView()
* @return The path of the file associated with the Document object, empty * @return The path of the file associated with the Document object, empty
* string if no file is currently open * string if no file is currently open
*/ */
QString EditorPage::getFilePath() TQString EditorPage::getFilePath()
{ {
return m_pDoc->url().path(); return m_pDoc->url().path();
} }
@ -147,7 +147,7 @@ QString EditorPage::getFilePath()
* @return The name of the file associated with the Document object, empty * @return The name of the file associated with the Document object, empty
* string if no file is currently open * string if no file is currently open
*/ */
QString EditorPage::getFileName() TQString EditorPage::getFileName()
{ {
return m_sName; return m_sName;
} }
@ -181,7 +181,7 @@ bool EditorPage::isModified()
* Opens a file for editing. * Opens a file for editing.
* @param sFileName The full path name of the file to edit. * @param sFileName The full path name of the file to edit.
*/ */
void EditorPage::open(const QString& sFileName) void EditorPage::open(const TQString& sFileName)
{ {
// Open the given file // Open the given file
m_bOpen = false; m_bOpen = false;
@ -214,7 +214,7 @@ void EditorPage::save()
*/ */
bool EditorPage::close(bool bForce) bool EditorPage::close(bool bForce)
{ {
QString sPath; TQString sPath;
// To override the prompt-on-close behaviour, we need to mark the file // To override the prompt-on-close behaviour, we need to mark the file
// as unmodified // as unmodified
@ -282,7 +282,7 @@ void EditorPage::addBookmark(uint nLine)
void EditorPage::getBookmarks(FileLocationList& fll) void EditorPage::getBookmarks(FileLocationList& fll)
{ {
KTextEditor::MarkInterface* pMarkIf; KTextEditor::MarkInterface* pMarkIf;
QPtrList<KTextEditor::Mark> plMarks; TQPtrList<KTextEditor::Mark> plMarks;
KTextEditor::Mark* pMark; KTextEditor::Mark* pMark;
// Get the marks interface // Get the marks interface
@ -303,14 +303,14 @@ void EditorPage::getBookmarks(FileLocationList& fll)
* @return The selected text, or a null string if no text is currently * @return The selected text, or a null string if no text is currently
* selected * selected
*/ */
QString EditorPage::getSelection() TQString EditorPage::getSelection()
{ {
KTextEditor::SelectionInterface* pSelect; KTextEditor::SelectionInterface* pSelect;
// Get the selected text // Get the selected text
pSelect = dynamic_cast<KTextEditor::SelectionInterface*>(m_pDoc); pSelect = dynamic_cast<KTextEditor::SelectionInterface*>(m_pDoc);
if (!pSelect || !pSelect->hasSelection()) if (!pSelect || !pSelect->hasSelection())
return QString::null; return TQString::null;
// Return the selected text // Return the selected text
return pSelect->selection(); return pSelect->selection();
@ -320,25 +320,25 @@ QString EditorPage::getSelection()
* Attempts to extract a valid C symbol from the location of the cursor, by * Attempts to extract a valid C symbol from the location of the cursor, by
* starting at the current line and column, and looking forward and backward * starting at the current line and column, and looking forward and backward
* for non-symbol characters. * for non-symbol characters.
* @return A C symbol under the cursor, if any, or QString::null otherwise * @return A C symbol under the cursor, if any, or TQString::null otherwise
*/ */
QString EditorPage::getWordUnderCursor(uint* pPosInWord) TQString EditorPage::getWordUnderCursor(uint* pPosInWord)
{ {
KTextEditor::ViewCursorInterface* pCursor; KTextEditor::ViewCursorInterface* pCursor;
KTextEditor::EditInterface* pEditIf; KTextEditor::EditInterface* pEditIf;
QString sLine; TQString sLine;
uint nLine, nCol, nFrom, nTo, nLast, nLength; uint nLine, nCol, nFrom, nTo, nLast, nLength;
QChar ch; TQChar ch;
// Get a cursor object // Get a cursor object
pCursor = dynamic_cast<KTextEditor::ViewCursorInterface*>(m_pView); pCursor = dynamic_cast<KTextEditor::ViewCursorInterface*>(m_pView);
if (pCursor == NULL) if (pCursor == NULL)
return QString::null; return TQString::null;
// Get a pointer to the edit interface // Get a pointer to the edit interface
pEditIf = dynamic_cast<KTextEditor::EditInterface*>(m_pDoc); pEditIf = dynamic_cast<KTextEditor::EditInterface*>(m_pDoc);
if (!pEditIf) if (!pEditIf)
return QString::null; return TQString::null;
// Get the line on which the cursor is positioned // Get the line on which the cursor is positioned
pCursor->cursorPositionReal(&nLine, &nCol); pCursor->cursorPositionReal(&nLine, &nCol);
@ -366,7 +366,7 @@ QString EditorPage::getWordUnderCursor(uint* pPosInWord)
// Mark empty words // Mark empty words
nLength = nTo - nFrom; nLength = nTo - nFrom;
if (nLength == 0) if (nLength == 0)
return QString::null; return TQString::null;
// Return the in-word position, if required // Return the in-word position, if required
if (pPosInWord != NULL) if (pPosInWord != NULL)
@ -383,14 +383,14 @@ QString EditorPage::getWordUnderCursor(uint* pPosInWord)
* is returned. Otherwise, the word under the cursor location is returned, if * is returned. Otherwise, the word under the cursor location is returned, if
* one exists. * one exists.
* @return Either the currently selected text, or the word under the cursor, * @return Either the currently selected text, or the word under the cursor,
* or QString::null if both options fail * or TQString::null if both options fail
*/ */
QString EditorPage::getSuggestedText() TQString EditorPage::getSuggestedText()
{ {
QString sText; TQString sText;
sText = getSelection(); sText = getSelection();
if (sText == QString::null) if (sText == TQString::null)
sText = getWordUnderCursor(); sText = getWordUnderCursor();
return sText; return sText;
@ -400,22 +400,22 @@ QString EditorPage::getSuggestedText()
* Returns the contents of the requested line. * Returns the contents of the requested line.
* Truncates the leading and trailing white spaces. * Truncates the leading and trailing white spaces.
* @param nLine The line number * @param nLine The line number
* @return The text of the requested line, if successful, QString::null * @return The text of the requested line, if successful, TQString::null
* otherwise * otherwise
*/ */
QString EditorPage::getLineContents(uint nLine) TQString EditorPage::getLineContents(uint nLine)
{ {
KTextEditor::EditInterface* pEditIf; KTextEditor::EditInterface* pEditIf;
QString sLine; TQString sLine;
// Cannot accept line 0 // Cannot accept line 0
if (nLine == 0) if (nLine == 0)
return QString::null; return TQString::null;
// Get a pointer to the edit interface // Get a pointer to the edit interface
pEditIf = dynamic_cast<KTextEditor::EditInterface*>(m_pDoc); pEditIf = dynamic_cast<KTextEditor::EditInterface*>(m_pDoc);
if (!pEditIf) if (!pEditIf)
return QString::null; return TQString::null;
// Get the line on which the cursor is positioned // Get the line on which the cursor is positioned
sLine = pEditIf->textLine(nLine - 1); sLine = pEditIf->textLine(nLine - 1);
@ -599,7 +599,7 @@ void EditorPage::setTabWidth(uint nTabWidth)
{ {
Kate::Document* pKateDoc; Kate::Document* pKateDoc;
Kate::Command* pKateCmd; Kate::Command* pKateCmd;
QString sCmd, sResult; TQString sCmd, sResult;
pKateDoc = dynamic_cast<Kate::Document*>(m_pDoc); pKateDoc = dynamic_cast<Kate::Document*>(m_pDoc);
if ((pKateDoc) && if ((pKateDoc) &&
@ -619,7 +619,7 @@ void EditorPage::setTabWidth(uint nTabWidth)
*/ */
void EditorPage::slotFileOpened() void EditorPage::slotFileOpened()
{ {
QFileInfo fi(m_pDoc->url().path()); TQFileInfo fi(m_pDoc->url().path());
// Get file information // Get file information
m_sName = fi.fileName(); m_sName = fi.fileName();

@ -28,11 +28,11 @@
#ifndef EDITORPAGE_H #ifndef EDITORPAGE_H
#define EDITORPAGE_H #define EDITORPAGE_H
#include <qwidget.h> #include <ntqwidget.h>
#include <qhbox.h> #include <ntqhbox.h>
#include <qsplitter.h> #include <ntqsplitter.h>
#include <qtabwidget.h> #include <ntqtabwidget.h>
#include <qpopupmenu.h> #include <ntqpopupmenu.h>
#include <ktexteditor/document.h> #include <ktexteditor/document.h>
#include <ktexteditor/view.h> #include <ktexteditor/view.h>
#include <ktexteditor/markinterfaceextension.h> #include <ktexteditor/markinterfaceextension.h>
@ -53,16 +53,16 @@
* @author Elad Lahav * @author Elad Lahav
*/ */
class EditorPage : public QHBox, SymbolCompletion::Interface class EditorPage : public TQHBox, SymbolCompletion::Interface
{ {
Q_OBJECT Q_OBJECT
public: public:
EditorPage(KTextEditor::Document*, QPopupMenu*, QTabWidget* pParent = 0, EditorPage(KTextEditor::Document*, TQPopupMenu*, TQTabWidget* pParent = 0,
const char* szName = 0); const char* szName = 0);
~EditorPage(); ~EditorPage();
void open(const QString&); void open(const TQString&);
void setNewFile(); void setNewFile();
void save(); void save();
bool close(bool bForce = false); bool close(bool bForce = false);
@ -74,26 +74,26 @@ public:
KTextEditor::Document* getDocument(); KTextEditor::Document* getDocument();
KTextEditor::View* getView(); KTextEditor::View* getView();
QString getFilePath(); TQString getFilePath();
QString getFileName(); TQString getFileName();
bool isWritable(); bool isWritable();
bool isModified(); bool isModified();
QString getSelection(); TQString getSelection();
QString getSuggestedText(); TQString getSuggestedText();
QString getLineContents(uint); TQString getLineContents(uint);
void setLayout(bool bShowTagList, const SPLIT_SIZES&); void setLayout(bool bShowTagList, const SPLIT_SIZES&);
bool getCursorPos(uint&, uint&); bool getCursorPos(uint&, uint&);
bool setCursorPos(uint, uint nCol = 1); bool setCursorPos(uint, uint nCol = 1);
void setTabWidth(uint); void setTabWidth(uint);
virtual QString getWordUnderCursor(uint* pPosInWord = NULL); virtual TQString getWordUnderCursor(uint* pPosInWord = NULL);
/** /**
* Implements the SymbolCompletion interface method for returning an * Implements the SymbolCompletion interface method for returning an
* object that supports KTextEditor::CodeCompletionInterface. * object that supports KTextEditor::CodeCompletionInterface.
* @return A pointer to the View object of the editor * @return A pointer to the View object of the editor
*/ */
virtual QObject* getCCObject() { return m_pView; } virtual TQObject* getCCObject() { return m_pView; }
/** /**
* @return true if a previously unsaved file is currently being edited, * @return true if a previously unsaved file is currently being edited,
@ -115,7 +115,7 @@ signals:
* @param pPage The emitting object * @param pPage The emitting object
* @param sPath The full path of the loaded file * @param sPath The full path of the loaded file
*/ */
void fileOpened(EditorPage* pPage, const QString& sPath); void fileOpened(EditorPage* pPage, const TQString& sPath);
/** /**
* Emitted when an editor is opened for editing a new file. * Emitted when an editor is opened for editing a new file.
@ -146,24 +146,24 @@ signals:
* @param sPath The full path of the saved file * @param sPath The full path of the saved file
* @param bIsNew true if this is a new file, false otherwise * @param bIsNew true if this is a new file, false otherwise
*/ */
void fileSaved(const QString& sPath, bool bIsNew); void fileSaved(const TQString& sPath, bool bIsNew);
/** /**
* Emitted when a file is closed. * Emitted when a file is closed.
* @param sPath The full path of the closed file * @param sPath The full path of the closed file
*/ */
void fileClosed(const QString& sPath); void fileClosed(const TQString& sPath);
private: private:
/** The tab widget holding this page. */ /** The tab widget holding this page. */
QTabWidget* m_pParentTab; TQTabWidget* m_pParentTab;
/** A Ctags process to use on the edited source file. */ /** A Ctags process to use on the edited source file. */
CtagsFrontend m_ctags; CtagsFrontend m_ctags;
/** An adjustable splitter for separating the tag list from the editor /** An adjustable splitter for separating the tag list from the editor
part. */ part. */
QSplitter* m_pSplit; TQSplitter* m_pSplit;
/** A list view for displaying Ctags results. */ /** A list view for displaying Ctags results. */
CtagsList* m_pCtagsList; CtagsList* m_pCtagsList;
@ -182,7 +182,7 @@ private:
bool m_bNewFile; bool m_bNewFile;
/** The name of the file being edited. */ /** The name of the file being edited. */
QString m_sName; TQString m_sName;
/** true if the file system allows this file to be modified, false /** true if the file system allows this file to be modified, false
otherwise. */ otherwise. */

@ -25,7 +25,7 @@
* *
***************************************************************************/ ***************************************************************************/
#include <qfileinfo.h> #include <ntqfileinfo.h>
#include <klocale.h> #include <klocale.h>
#include <kmessagebox.h> #include <kmessagebox.h>
#include <kurldrag.h> #include <kurldrag.h>
@ -39,7 +39,7 @@
* @param pParent The parent widget * @param pParent The parent widget
* @param szName The widget's name * @param szName The widget's name
*/ */
EditorTabs::EditorTabs(QWidget* pParent, const char* szName) : EditorTabs::EditorTabs(TQWidget* pParent, const char* szName) :
TabWidget(pParent, szName), TabWidget(pParent, szName),
m_pCurPage(NULL), m_pCurPage(NULL),
m_pWindowMenu(NULL), m_pWindowMenu(NULL),
@ -53,16 +53,16 @@ EditorTabs::EditorTabs(QWidget* pParent, const char* szName) :
setAcceptDrops(true); setAcceptDrops(true);
// Close an editor page when its close button is clicked // Close an editor page when its close button is clicked
connect(this, SIGNAL(closeRequest(QWidget*)), this, connect(this, SIGNAL(closeRequest(TQWidget*)), this,
SLOT(slotRemovePage(QWidget*))); SLOT(slotRemovePage(TQWidget*)));
// Set an editor page as the active part, when its tab is selected // Set an editor page as the active part, when its tab is selected
connect(this, SIGNAL(currentChanged(QWidget*)), this, connect(this, SIGNAL(currentChanged(TQWidget*)), this,
SLOT(slotCurrentChanged(QWidget*))); SLOT(slotCurrentChanged(TQWidget*)));
// Start dragging a file from a tab // Start dragging a file from a tab
connect(this, SIGNAL(initiateDrag(QWidget*)), this, connect(this, SIGNAL(initiateDrag(TQWidget*)), this,
SLOT(slotInitiateDrag(QWidget*))); SLOT(slotInitiateDrag(TQWidget*)));
} }
/** /**
@ -76,7 +76,7 @@ EditorTabs::~EditorTabs()
* @param pWindowMenu Pointer to the main window's "Window" menu (used to * @param pWindowMenu Pointer to the main window's "Window" menu (used to
* add an activation menu item for each editor page) * add an activation menu item for each editor page)
*/ */
void EditorTabs::setWindowMenu(QPopupMenu* pWindowMenu) void EditorTabs::setWindowMenu(TQPopupMenu* pWindowMenu)
{ {
m_pWindowMenu = pWindowMenu; m_pWindowMenu = pWindowMenu;
connect(pWindowMenu, SIGNAL(aboutToShow()), this, connect(pWindowMenu, SIGNAL(aboutToShow()), this,
@ -97,8 +97,8 @@ void EditorTabs::addEditorPage(EditorPage* pNewPage)
// Add the file edited by this page to the map, and display its name, // Add the file edited by this page to the map, and display its name,
// once the file is opened // once the file is opened
connect(pNewPage, SIGNAL(fileOpened(EditorPage*, const QString&)), this, connect(pNewPage, SIGNAL(fileOpened(EditorPage*, const TQString&)), this,
SLOT(slotAttachFile(EditorPage*, const QString&))); SLOT(slotAttachFile(EditorPage*, const TQString&)));
// Handle new unnamed files // Handle new unnamed files
connect(pNewPage, SIGNAL(newFile(EditorPage*)), this, connect(pNewPage, SIGNAL(newFile(EditorPage*)), this,
@ -124,7 +124,7 @@ void EditorTabs::addEditorPage(EditorPage* pNewPage)
* current one * current one
* @return The editor page object, if found, NULL otherwise * @return The editor page object, if found, NULL otherwise
*/ */
EditorPage* EditorTabs::findEditorPage(const QString& sFileName, EditorPage* EditorTabs::findEditorPage(const TQString& sFileName,
bool bForceChange) bool bForceChange)
{ {
EditorMap::iterator itr; EditorMap::iterator itr;
@ -164,7 +164,7 @@ EditorPage* EditorTabs::getCurrentPage()
*/ */
void EditorTabs::removeCurrentPage() void EditorTabs::removeCurrentPage()
{ {
QWidget* pPage; TQWidget* pPage;
// Get the active page, if any // Get the active page, if any
pPage = currentPage(); pPage = currentPage();
@ -181,7 +181,7 @@ void EditorTabs::removeCurrentPage()
*/ */
bool EditorTabs::removeAllPages() bool EditorTabs::removeAllPages()
{ {
QWidget* pPage; TQWidget* pPage;
// Check if there are any modified files // Check if there are any modified files
if (getModifiedFilesCount()) { if (getModifiedFilesCount()) {
@ -222,11 +222,11 @@ bool EditorTabs::removeAllPages()
/** /**
* Keeps track of the currently active editor page, and notifies on a change * Keeps track of the currently active editor page, and notifies on a change
* in the active page. * in the active page.
* This slot is connected to the currentChanged() signal of the QTabWidget * This slot is connected to the currentChanged() signal of the TQTabWidget
* object. * object.
* @param pWidget The new active page * @param pWidget The new active page
*/ */
void EditorTabs::slotCurrentChanged(QWidget* pWidget) void EditorTabs::slotCurrentChanged(TQWidget* pWidget)
{ {
EditorPage* pOldPage; EditorPage* pOldPage;
@ -261,7 +261,7 @@ void EditorTabs::slotCurrentChanged(QWidget* pWidget)
* @param sFilePath The full path of the file edited in this page * @param sFilePath The full path of the file edited in this page
*/ */
void EditorTabs::slotAttachFile(EditorPage* pEditPage, void EditorTabs::slotAttachFile(EditorPage* pEditPage,
const QString& sFilePath) const TQString& sFilePath)
{ {
// Set the appropriate tab icon, according to the file permissions // Set the appropriate tab icon, according to the file permissions
if (pEditPage->isWritable()) if (pEditPage->isWritable())
@ -288,11 +288,11 @@ void EditorTabs::slotAttachFile(EditorPage* pEditPage,
*/ */
void EditorTabs::slotNewFile(EditorPage* pEditPage) void EditorTabs::slotNewFile(EditorPage* pEditPage)
{ {
QString sCaption; TQString sCaption;
// Set the tab caption to mark a new file // Set the tab caption to mark a new file
m_nNewFiles++; m_nNewFiles++;
sCaption = i18n("Untitled ") + QString::number(m_nNewFiles); sCaption = i18n("Untitled ") + TQString::number(m_nNewFiles);
changeTab(pEditPage, changeTab(pEditPage,
Pixmaps().getPixmap(KScopePixmaps::TabRW), Pixmaps().getPixmap(KScopePixmaps::TabRW),
sCaption); sCaption);
@ -403,7 +403,7 @@ void EditorTabs::showBookmarks(QueryView* pView)
// Populate the view // Populate the view
for (pLoc = fll.first(); pLoc; pLoc = fll.next()) { for (pLoc = fll.first(); pLoc; pLoc = fll.next()) {
pView->addRecord("", pLoc->m_sPath, pView->addRecord("", pLoc->m_sPath,
QString::number(pLoc->m_nLine + 1), TQString::number(pLoc->m_nLine + 1),
pPage->getLineContents(pLoc->m_nLine + 1)); pPage->getLineContents(pLoc->m_nLine + 1));
} }
@ -418,7 +418,7 @@ void EditorTabs::showBookmarks(QueryView* pView)
* This slot is connected to the clicked() signal of the tab's close button. * This slot is connected to the clicked() signal of the tab's close button.
* @param pPage The EditorPage object to remove * @param pPage The EditorPage object to remove
*/ */
void EditorTabs::slotRemovePage(QWidget* pPage) void EditorTabs::slotRemovePage(TQWidget* pPage)
{ {
removePage(pPage, false); removePage(pPage, false);
} }
@ -447,7 +447,7 @@ void EditorTabs::slotToggleTagList()
* The event is accepted if the dragged object is a list of file paths. * The event is accepted if the dragged object is a list of file paths.
* @param pEvent The drag move event object * @param pEvent The drag move event object
*/ */
void EditorTabs::dragMoveEvent(QDragMoveEvent* pEvent) void EditorTabs::dragMoveEvent(TQDragMoveEvent* pEvent)
{ {
KURL::List list; KURL::List list;
bool bAccept; bool bAccept;
@ -460,7 +460,7 @@ void EditorTabs::dragMoveEvent(QDragMoveEvent* pEvent)
* Handles file drops over an empty tab widget, or over the tab bar. * Handles file drops over an empty tab widget, or over the tab bar.
* @param pEvent The drop event object * @param pEvent The drop event object
*/ */
void EditorTabs::dropEvent(QDropEvent* pEvent) void EditorTabs::dropEvent(TQDropEvent* pEvent)
{ {
emit filesDropped(pEvent); emit filesDropped(pEvent);
} }
@ -473,7 +473,7 @@ void EditorTabs::dropEvent(QDropEvent* pEvent)
* widget. * widget.
* @param pWidget The page whose tab is being dragged * @param pWidget The page whose tab is being dragged
*/ */
void EditorTabs::slotInitiateDrag(QWidget* pWidget) void EditorTabs::slotInitiateDrag(TQWidget* pWidget)
{ {
KURL url; KURL url;
KURLDrag* pDrag; KURLDrag* pDrag;
@ -565,7 +565,7 @@ void EditorTabs::slotGoRight()
*/ */
void EditorTabs::slotFillWindowMenu() void EditorTabs::slotFillWindowMenu()
{ {
QString sLabel; TQString sLabel;
int i; int i;
// Delete old menu items // Delete old menu items
@ -576,7 +576,7 @@ void EditorTabs::slotFillWindowMenu()
// Add new items // Add new items
for (i = 0; i < count(); i++) { for (i = 0; i < count(); i++) {
sLabel = (i < 10) ? QString("&%1 %2").arg(i).arg(label(i)) : label(i); sLabel = (i < 10) ? TQString("&%1 %2").arg(i).arg(label(i)) : label(i);
m_pWindowMenu->insertItem(sLabel, i); m_pWindowMenu->insertItem(sLabel, i);
} }
@ -609,10 +609,10 @@ void EditorTabs::slotSetCurrentPage(int nId)
* false otherwise * false otherwise
* @return true if the page was removed, false otherwise * @return true if the page was removed, false otherwise
*/ */
bool EditorTabs::removePage(QWidget* pPage, bool bForce) bool EditorTabs::removePage(TQWidget* pPage, bool bForce)
{ {
EditorPage* pEditPage; EditorPage* pEditPage;
QString sFilePath; TQString sFilePath;
// Store the file path for later // Store the file path for later
pEditPage = (EditorPage*)pPage; pEditPage = (EditorPage*)pPage;

@ -28,13 +28,13 @@
#ifndef EDITORTABS_H #ifndef EDITORTABS_H
#define EDITORTABS_H #define EDITORTABS_H
#include <qwidget.h> #include <ntqwidget.h>
#include <qpopupmenu.h> #include <ntqpopupmenu.h>
#include "tabwidget.h" #include "tabwidget.h"
#include "editorpage.h" #include "editorpage.h"
#include "projectmanager.h" #include "projectmanager.h"
typedef QMap<QString, EditorPage*> EditorMap; typedef TQMap<TQString, EditorPage*> EditorMap;
class QueryView; class QueryView;
/** /**
@ -49,12 +49,12 @@ class EditorTabs : public TabWidget
Q_OBJECT Q_OBJECT
public: public:
EditorTabs(QWidget* pParent = 0, const char* szName = 0); EditorTabs(TQWidget* pParent = 0, const char* szName = 0);
~EditorTabs(); ~EditorTabs();
void setWindowMenu(QPopupMenu*); void setWindowMenu(TQPopupMenu*);
void addEditorPage(EditorPage*); void addEditorPage(EditorPage*);
EditorPage* findEditorPage(const QString&, bool bForceChange = false); EditorPage* findEditorPage(const TQString&, bool bForceChange = false);
EditorPage* getCurrentPage(); EditorPage* getCurrentPage();
void removeCurrentPage(); void removeCurrentPage();
bool removeAllPages(); bool removeAllPages();
@ -65,7 +65,7 @@ public:
void showBookmarks(QueryView*); void showBookmarks(QueryView*);
public slots: public slots:
void slotRemovePage(QWidget*); void slotRemovePage(TQWidget*);
void slotToggleTagList(); void slotToggleTagList();
void slotSaveAll(); void slotSaveAll();
void slotGoLeft(); void slotGoLeft();
@ -89,11 +89,11 @@ signals:
* Indicates that files were dragged and dropped over the tab widget. * Indicates that files were dragged and dropped over the tab widget.
* @param pEvent The drop event information * @param pEvent The drop event information
*/ */
void filesDropped(QDropEvent* pEvent); void filesDropped(TQDropEvent* pEvent);
protected: protected:
virtual void dragMoveEvent(QDragMoveEvent*); virtual void dragMoveEvent(TQDragMoveEvent*);
virtual void dropEvent(QDropEvent*); virtual void dropEvent(TQDropEvent*);
private: private:
/** Links a file name with an editor page that has this file open. */ /** Links a file name with an editor page that has this file open. */
@ -104,7 +104,7 @@ private:
EditorPage* m_pCurPage; EditorPage* m_pCurPage;
/** A popup menu with Cscope operations for the editor windows. */ /** A popup menu with Cscope operations for the editor windows. */
QPopupMenu* m_pWindowMenu; TQPopupMenu* m_pWindowMenu;
/** The number of items added to the window menu (used for removing old /** The number of items added to the window menu (used for removing old
items). */ items). */
@ -114,14 +114,14 @@ private:
int m_nNewFiles; int m_nNewFiles;
int getModifiedFilesCount(); int getModifiedFilesCount();
bool removePage(QWidget*, bool); bool removePage(TQWidget*, bool);
private slots: private slots:
void slotCurrentChanged(QWidget*); void slotCurrentChanged(TQWidget*);
void slotAttachFile(EditorPage*, const QString&); void slotAttachFile(EditorPage*, const TQString&);
void slotNewFile(EditorPage*); void slotNewFile(EditorPage*);
void slotFileModified(EditorPage*, bool); void slotFileModified(EditorPage*, bool);
void slotInitiateDrag(QWidget*); void slotInitiateDrag(TQWidget*);
void slotFillWindowMenu(); void slotFillWindowMenu();
void slotSetCurrentPage(int); void slotSetCurrentPage(int);
}; };

@ -25,7 +25,7 @@
* *
***************************************************************************/ ***************************************************************************/
#include "qstring.h" #include "ntqstring.h"
#include "encoder.h" #include "encoder.h"
#define CHAR_TO_HEX(c) ((c) < 0xA ? '0' + (c) : ('A' - 0xA) + (c)) #define CHAR_TO_HEX(c) ((c) < 0xA ? '0' + (c) : ('A' - 0xA) + (c))
@ -51,7 +51,7 @@ Encoder::~Encoder() {
* @param str The string to encode * @param str The string to encode
* @return The hex-encoded ASCII string * @return The hex-encoded ASCII string
*/ */
const char* Encoder::encode(const QString& str) const char* Encoder::encode(const TQString& str)
{ {
const char* szStr; const char* szStr;
int nLen, i, j; int nLen, i, j;
@ -77,7 +77,7 @@ const char* Encoder::encode(const QString& str)
* @param str The string to decode * @param str The string to decode
* @return The decoded string. * @return The decoded string.
*/ */
const char* Encoder::decode(const QString& str) const char* Encoder::decode(const TQString& str)
{ {
const char* szStr; const char* szStr;
int nLen, i, j; int nLen, i, j;

@ -37,8 +37,8 @@ class Encoder
public: public:
Encoder(); Encoder();
~Encoder(); ~Encoder();
const char* encode(const QString&); const char* encode(const TQString&);
const char* decode(const QString&); const char* decode(const TQString&);
private: private:
/** A buffer to contain the result of encoding/decoding. */ /** A buffer to contain the result of encoding/decoding. */

@ -25,8 +25,8 @@
* *
***************************************************************************/ ***************************************************************************/
#include <qlineedit.h> #include <ntqlineedit.h>
#include <qfileinfo.h> #include <ntqfileinfo.h>
#include <klocale.h> #include <klocale.h>
#include "filelist.h" #include "filelist.h"
#include "kscope.h" #include "kscope.h"
@ -37,7 +37,7 @@
* @param pParent The parent widget * @param pParent The parent widget
* @param szName The widget's name * @param szName The widget's name
*/ */
FileList::FileList(QWidget* pParent, const char* szName) : FileList::FileList(TQWidget* pParent, const char* szName) :
SearchList(1, pParent, szName), SearchList(1, pParent, szName),
m_sRoot("/") m_sRoot("/")
{ {
@ -74,9 +74,9 @@ FileList::~FileList()
* path, and is added to the list. * path, and is added to the list.
* @param sFilePath The full path of a source file * @param sFilePath The full path of a source file
*/ */
void FileList::addItem(const QString& sFilePath) void FileList::addItem(const TQString& sFilePath)
{ {
QString sFileType, sFileName, sPath; TQString sFileType, sFileName, sPath;
int nTypePos; int nTypePos;
// Extract the file name // Extract the file name
@ -95,7 +95,7 @@ void FileList::addItem(const QString& sFilePath)
sPath.replace(m_sRoot, "$"); sPath.replace(m_sRoot, "$");
// Create the list item // Create the list item
new QListViewItem(m_pList, sFileType, sFileName, sPath); new TQListViewItem(m_pList, sFileType, sFileName, sPath);
} }
/** /**
@ -103,9 +103,9 @@ void FileList::addItem(const QString& sFilePath)
* @param sPath The full path of the file to find * @param sPath The full path of the file to find
* @return true if the file was found in the list, false otherwise * @return true if the file was found in the list, false otherwise
*/ */
bool FileList::findFile(const QString& sPath) bool FileList::findFile(const TQString& sPath)
{ {
QString sFindPath(sPath); TQString sFindPath(sPath);
if (m_sRoot != "/") if (m_sRoot != "/")
sFindPath.replace(m_sRoot, "$"); sFindPath.replace(m_sRoot, "$");
@ -126,9 +126,9 @@ void FileList::clear()
* Opens a file for editing when its entry is clicked in the file list. * Opens a file for editing when its entry is clicked in the file list.
* @param pItem The clicked list item * @param pItem The clicked list item
*/ */
void FileList::processItemSelected(QListViewItem* pItem) void FileList::processItemSelected(TQListViewItem* pItem)
{ {
QString sPath; TQString sPath;
// Get the file path (replace the root symbol, if required) // Get the file path (replace the root symbol, if required)
sPath = pItem->text(2); sPath = pItem->text(2);
@ -158,10 +158,10 @@ void FileList::applyPrefs()
* is replaced with a $ sign. * is replaced with a $ sign.
* @param sRoot The new root path * @param sRoot The new root path
*/ */
void FileList::setRoot(const QString& sRoot) void FileList::setRoot(const TQString& sRoot)
{ {
QListViewItem* pItem; TQListViewItem* pItem;
QString sPath; TQString sPath;
// Update all items in the list // Update all items in the list
for (pItem = m_pList->firstChild(); pItem != NULL; for (pItem = m_pList->firstChild(); pItem != NULL;
@ -188,7 +188,7 @@ void FileList::setRoot(const QString& sRoot)
* @param sTip The constructed tip string (on return) * @param sTip The constructed tip string (on return)
* @return Always true * @return Always true
*/ */
bool FileList::getTip(QListViewItem* pItem, QString& sTip) bool FileList::getTip(TQListViewItem* pItem, TQString& sTip)
{ {
sTip = pItem->text(2); sTip = pItem->text(2);
return true; return true;

@ -28,7 +28,7 @@
#ifndef FILELIST_H #ifndef FILELIST_H
#define FILELIST_H #define FILELIST_H
#include <qwidget.h> #include <ntqwidget.h>
#include "searchlist.h" #include "searchlist.h"
#include "projectmanager.h" #include "projectmanager.h"
@ -45,15 +45,15 @@ class FileList : public SearchList, public FileListTarget
Q_OBJECT Q_OBJECT
public: public:
FileList(QWidget* pParent = 0, const char* szName = 0); FileList(TQWidget* pParent = 0, const char* szName = 0);
~FileList(); ~FileList();
virtual void addItem(const QString&); virtual void addItem(const TQString&);
bool findFile(const QString&); bool findFile(const TQString&);
void clear(); void clear();
void applyPrefs(); void applyPrefs();
void setRoot(const QString&); void setRoot(const TQString&);
virtual bool getTip(QListViewItem*, QString&); virtual bool getTip(TQListViewItem*, TQString&);
signals: signals:
/** /**
@ -62,14 +62,14 @@ signals:
* @param sPath The full path of the selected file * @param sPath The full path of the selected file
* @param nLine Line number, always set to 0 * @param nLine Line number, always set to 0
*/ */
void fileRequested(const QString& sPath, uint nLine); void fileRequested(const TQString& sPath, uint nLine);
protected: protected:
virtual void processItemSelected(QListViewItem*); virtual void processItemSelected(TQListViewItem*);
private: private:
/** A common root path for all items in the list. */ /** A common root path for all items in the list. */
QString m_sRoot; TQString m_sRoot;
}; };
#endif #endif

@ -25,9 +25,9 @@
* *
***************************************************************************/ ***************************************************************************/
#include <qpushbutton.h> #include <ntqpushbutton.h>
#include <qfileinfo.h> #include <ntqfileinfo.h>
#include <qtabwidget.h> #include <ntqtabwidget.h>
#include <kfiledialog.h> #include <kfiledialog.h>
#include "fileview.h" #include "fileview.h"
#include "filelist.h" #include "filelist.h"
@ -39,12 +39,12 @@
* @param szName The widget's name * @param szName The widget's name
* @param fl Widget creation flags * @param fl Widget creation flags
*/ */
FileView::FileView(QWidget* pParent, const char* szName, WFlags fl) : FileView::FileView(TQWidget* pParent, const char* szName, WFlags fl) :
FileViewLayout(pParent, szName, fl), FileViewLayout(pParent, szName, fl),
m_pCurBranch(0), m_pCurBranch(0),
m_sRoot("") m_sRoot("")
{ {
QWidget* pPage; TQWidget* pPage;
// Set the tab widget icons // Set the tab widget icons
pPage = m_pTabWidget->page(0); pPage = m_pTabWidget->page(0);
@ -57,12 +57,12 @@ FileView::FileView(QWidget* pParent, const char* szName, WFlags fl) :
// Send the fileRequested() signal whenever a file is selected in either // Send the fileRequested() signal whenever a file is selected in either
// the list or the tree // the list or the tree
connect(m_pFileList, SIGNAL(fileRequested(const QString&, uint)), this, connect(m_pFileList, SIGNAL(fileRequested(const TQString&, uint)), this,
SIGNAL(fileRequested(const QString&, uint))); SIGNAL(fileRequested(const TQString&, uint)));
connect(m_pFileTree, SIGNAL(doubleClicked(QListViewItem*)), connect(m_pFileTree, SIGNAL(doubleClicked(TQListViewItem*)),
this, SLOT(slotTreeItemSelected(QListViewItem*))); this, SLOT(slotTreeItemSelected(TQListViewItem*)));
connect(m_pFileTree, SIGNAL(returnPressed(QListViewItem*)), this, connect(m_pFileTree, SIGNAL(returnPressed(TQListViewItem*)), this,
SLOT(slotTreeItemSelected(QListViewItem*))); SLOT(slotTreeItemSelected(TQListViewItem*)));
} }
/** /**
@ -76,7 +76,7 @@ FileView::~FileView()
* Sets a new common root path to both the file list and the tree. * Sets a new common root path to both the file list and the tree.
* @param sRoot The full path of the new root * @param sRoot The full path of the new root
*/ */
void FileView::setRoot(const QString& sRoot) void FileView::setRoot(const TQString& sRoot)
{ {
// Nothing to do if the given root is the same as the old one // Nothing to do if the given root is the same as the old one
if (sRoot == m_sRoot) if (sRoot == m_sRoot)
@ -96,7 +96,7 @@ void FileView::setRoot(const QString& sRoot)
return; return;
// Create and open a new branch, with the newly specified root // Create and open a new branch, with the newly specified root
QFileInfo fi(sRoot); TQFileInfo fi(sRoot);
m_pCurBranch = m_pFileTree->addBranch(KURL(sRoot), fi.fileName()); m_pCurBranch = m_pFileTree->addBranch(KURL(sRoot), fi.fileName());
m_pCurBranch->setChildRecurse(false); m_pCurBranch->setChildRecurse(false);
m_pFileTree->setOpen(m_pCurBranch->root(), true); m_pFileTree->setOpen(m_pCurBranch->root(), true);
@ -119,7 +119,7 @@ void FileView::clear()
* of the KFileTreeView object. * of the KFileTreeView object.
* @param pItem The selected tree item * @param pItem The selected tree item
*/ */
void FileView::slotTreeItemSelected(QListViewItem* pItem) void FileView::slotTreeItemSelected(TQListViewItem* pItem)
{ {
KFileTreeViewItem* pTreeItem; KFileTreeViewItem* pTreeItem;

@ -45,7 +45,7 @@ class FileView : public FileViewLayout
Q_OBJECT Q_OBJECT
public: public:
FileView(QWidget* pParent = 0, const char* szName = 0, WFlags fl = 0); FileView(TQWidget* pParent = 0, const char* szName = 0, WFlags fl = 0);
~FileView(); ~FileView();
/** /**
@ -53,7 +53,7 @@ public:
*/ */
FileList* getFileList() { return m_pFileList; } FileList* getFileList() { return m_pFileList; }
void setRoot(const QString&); void setRoot(const TQString&);
void clear(); void clear();
signals: signals:
@ -63,17 +63,17 @@ signals:
* @param sPath The full path of the selected file * @param sPath The full path of the selected file
* @param nLine Line number, always set to 0 * @param nLine Line number, always set to 0
*/ */
void fileRequested(const QString& sPath, uint nLine); void fileRequested(const TQString& sPath, uint nLine);
private: private:
/** The current branch in the file tree. */ /** The current branch in the file tree. */
KFileTreeBranch* m_pCurBranch; KFileTreeBranch* m_pCurBranch;
/** The current root of the file tree. */ /** The current root of the file tree. */
QString m_sRoot; TQString m_sRoot;
private slots: private slots:
void slotTreeItemSelected(QListViewItem*); void slotTreeItemSelected(TQListViewItem*);
}; };
#endif #endif

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>FileViewLayout</class> <class>FileViewLayout</class>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>FileViewLayout</cstring> <cstring>FileViewLayout</cstring>
</property> </property>
@ -25,14 +25,14 @@
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
<widget class="QTabWidget"> <widget class="TQTabWidget">
<property name="name"> <property name="name">
<cstring>m_pTabWidget</cstring> <cstring>m_pTabWidget</cstring>
</property> </property>
<property name="toolTip" stdset="0"> <property name="toolTip" stdset="0">
<string></string> <string></string>
</property> </property>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>tab</cstring> <cstring>tab</cstring>
</property> </property>
@ -59,7 +59,7 @@
</widget> </widget>
</vbox> </vbox>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>tab</cstring> <cstring>tab</cstring>
</property> </property>

@ -25,8 +25,8 @@
* *
***************************************************************************/ ***************************************************************************/
#include <qfileinfo.h> #include <ntqfileinfo.h>
#include <qdir.h> #include <ntqdir.h>
#include <klocale.h> #include <klocale.h>
#include "frontend.h" #include "frontend.h"
@ -76,8 +76,8 @@ Frontend::~Frontend()
* @param bBlock (Optional) true to block, false otherwise * @param bBlock (Optional) true to block, false otherwise
* @return true if the process was executed successfully, false otherwise * @return true if the process was executed successfully, false otherwise
*/ */
bool Frontend::run(const QString& sName, const QStringList& slArgs, bool Frontend::run(const TQString& sName, const TQStringList& slArgs,
const QString& sWorkDir, bool bBlock) const TQString& sWorkDir, bool bBlock)
{ {
// Cannot start if another controlled process is currently running // Cannot start if another controlled process is currently running
if (isRunning()) { if (isRunning()) {
@ -182,7 +182,7 @@ void Frontend::removeRecord()
* @return true if a token was extracted up to the given delimter(s), false * @return true if a token was extracted up to the given delimter(s), false
* if the buffer ended before a delimiter could be identified * if the buffer ended before a delimiter could be identified
*/ */
bool Frontend::tokenize(char** ppBuf, int* pBufSize, QString& sResult, bool Frontend::tokenize(char** ppBuf, int* pBufSize, TQString& sResult,
ParserDelim& delim) ParserDelim& delim)
{ {
int nSize; int nSize;
@ -236,10 +236,10 @@ bool Frontend::tokenize(char** ppBuf, int* pBufSize, QString& sResult,
*pBufSize = nSize; *pBufSize = nSize;
} }
else if (m_bInToken) { else if (m_bInToken) {
sResult = QString::fromLatin1(*ppBuf, *pBufSize); sResult = TQString::fromLatin1(*ppBuf, *pBufSize);
} }
else { else {
sResult = QString::null; sResult = TQString::null;
} }
return bFoundToken; return bFoundToken;
@ -250,7 +250,7 @@ bool Frontend::tokenize(char** ppBuf, int* pBufSize, QString& sResult,
* By default, this method emits the error() signal with the given text. * By default, this method emits the error() signal with the given text.
* @param sText The text sent to the standard error stream * @param sText The text sent to the standard error stream
*/ */
void Frontend::parseStderr(const QString& sText) void Frontend::parseStderr(const TQString& sText)
{ {
emit error(sText); emit error(sText);
} }
@ -282,7 +282,7 @@ void Frontend::slotProcessExit(KProcess*)
void Frontend::slotReadStdout(KProcess*, char* pBuffer, int nSize) void Frontend::slotReadStdout(KProcess*, char* pBuffer, int nSize)
{ {
char* pLocalBuf; char* pLocalBuf;
QString sToken; TQString sToken;
bool bTokenEnded; bool bTokenEnded;
ParserDelim delim; ParserDelim delim;
@ -352,7 +352,7 @@ void Frontend::slotReadStdout(KProcess*, char* pBuffer, int nSize)
*/ */
void Frontend::slotReadStderr(KProcess*, char* pBuffer, int nSize) void Frontend::slotReadStderr(KProcess*, char* pBuffer, int nSize)
{ {
QString sBuf; TQString sBuf;
// Do nothing if waiting for process to die // Do nothing if waiting for process to die
if (m_bKilled) if (m_bKilled)

@ -28,7 +28,7 @@
#ifndef FRONTEND_H #ifndef FRONTEND_H
#define FRONTEND_H #define FRONTEND_H
#include <qobject.h> #include <ntqobject.h>
#include <kprocess.h> #include <kprocess.h>
@ -48,7 +48,7 @@ public:
/** /**
* @return The text associated with this token * @return The text associated with this token
*/ */
const QString& getData() const { return m_sData; } const TQString& getData() const { return m_sData; }
/** /**
* @return A pointer to the next token in the strem. * @return A pointer to the next token in the strem.
@ -57,7 +57,7 @@ public:
protected: protected:
/** Free text associated with the token. */ /** Free text associated with the token. */
QString m_sData; TQString m_sData;
/** A pointer to the next token in the stream. */ /** A pointer to the next token in the stream. */
FrontendToken* m_pNext; FrontendToken* m_pNext;
@ -81,14 +81,14 @@ public:
Frontend(uint, bool bAutoDelete = false); Frontend(uint, bool bAutoDelete = false);
~Frontend(); ~Frontend();
virtual bool run(const QString&, const QStringList&, virtual bool run(const TQString&, const TQStringList&,
const QString& sWorkDir = "", bool bBlock = false); const TQString& sWorkDir = "", bool bBlock = false);
void kill(); void kill();
/** /**
* @return An string describing the error which made run() fail * @return An string describing the error which made run() fail
*/ */
const QString& getRunError() { return m_sError; } const TQString& getRunError() { return m_sError; }
signals: signals:
/** /**
@ -122,7 +122,7 @@ signals:
/** /**
* Emitted when an error message is produced by the back-end process. * Emitted when an error message is produced by the back-end process.
*/ */
void error(const QString& sMsg); void error(const TQString& sMsg);
protected: protected:
/** A set of possible delimiters for parsing process output. */ /** A set of possible delimiters for parsing process output. */
@ -154,7 +154,7 @@ protected:
ParserDelim m_delim; ParserDelim m_delim;
/** An error string produced if run() fails. */ /** An error string produced if run() fails. */
QString m_sError; TQString m_sError;
/** /**
* Handles a text token received on the Standard Output stream of the * Handles a text token received on the Standard Output stream of the
@ -168,9 +168,9 @@ protected:
* @result A ParseResult value, indicating what should be done with the * @result A ParseResult value, indicating what should be done with the
* new token * new token
*/ */
virtual ParseResult parseStdout(QString& sToken, ParserDelim delim) = 0; virtual ParseResult parseStdout(TQString& sToken, ParserDelim delim) = 0;
virtual void parseStderr(const QString&); virtual void parseStderr(const TQString&);
/** /**
* Called when the process exits. * Called when the process exits.
@ -202,7 +202,7 @@ private:
void addToken(FrontendToken*); void addToken(FrontendToken*);
void removeToken(); void removeToken();
void removeRecord(); void removeRecord();
bool tokenize(char**, int*, QString&, ParserDelim&); bool tokenize(char**, int*, TQString&, ParserDelim&);
private slots: private slots:
void slotReadStdout(KProcess*, char*, int); void slotReadStdout(KProcess*, char*, int);

@ -27,7 +27,7 @@
#include <math.h> #include <math.h>
#include <stdlib.h> #include <stdlib.h>
#include <qpainter.h> #include <ntqpainter.h>
#include "graphedge.h" #include "graphedge.h"
#include "graphnode.h" #include "graphnode.h"
@ -46,24 +46,24 @@ typedef int (*CompFunc)(const void*, const void*);
/** /**
* An array of QPoint objects that can compute the convex hull surrounding all * An array of TQPoint objects that can compute the convex hull surrounding all
* points in the array. * points in the array.
* @author Elad Lahav * @author Elad Lahav
*/ */
class ConvexHull : public QPointArray class ConvexHull : public TQPointArray
{ {
public: public:
/** /**
* Class constructor. * Class constructor.
*/ */
ConvexHull() : QPointArray() {} ConvexHull() : TQPointArray() {}
/** /**
* Computes the convex hull of the points stored in the array, using * Computes the convex hull of the points stored in the array, using
* Graham's scan. * Graham's scan.
* @param arrHull Holds the coordinates of the convex hull, upon return * @param arrHull Holds the coordinates of the convex hull, upon return
*/ */
void compute(QPointArray& arrHull) { void compute(TQPointArray& arrHull) {
uint i, nPivot, nTop; uint i, nPivot, nTop;
// Find the pivot point // Find the pivot point
@ -82,7 +82,7 @@ public:
s_ptPivot = (*this)[nPivot]; s_ptPivot = (*this)[nPivot];
(*this)[nPivot] = (*this)[0]; (*this)[nPivot] = (*this)[0];
(*this)[0] = s_ptPivot; (*this)[0] = s_ptPivot;
qsort(&(*this).data()[1], (*this).size() - 1, sizeof(QPoint), qsort(&(*this).data()[1], (*this).size() - 1, sizeof(TQPoint),
(CompFunc)compRadial); (CompFunc)compRadial);
// Initialise Graham's scan algorithm // Initialise Graham's scan algorithm
@ -112,7 +112,7 @@ public:
private: private:
/** The current pivot point, required by compRadial. */ /** The current pivot point, required by compRadial. */
static QPoint s_ptPivot; static TQPoint s_ptPivot;
/** /**
* Compares two points based on their angle relative to the current * Compares two points based on their angle relative to the current
@ -122,7 +122,7 @@ private:
* @param pPt2 A pointer to the second point * @param pPt2 A pointer to the second point
* @return >0 if the first point is to the left of the second, <0 otherwise * @return >0 if the first point is to the left of the second, <0 otherwise
*/ */
static int compRadial(const QPoint* pPt1, const QPoint* pPt2) { static int compRadial(const TQPoint* pPt1, const TQPoint* pPt2) {
int nResult; int nResult;
// Determine which point is to the left of the other. If the angle is // Determine which point is to the left of the other. If the angle is
@ -135,7 +135,7 @@ private:
} }
}; };
QPoint ConvexHull::s_ptPivot; TQPoint ConvexHull::s_ptPivot;
/** /**
* Class constructor. * Class constructor.
@ -143,8 +143,8 @@ QPoint ConvexHull::s_ptPivot;
* @param pHead The edge's starting point * @param pHead The edge's starting point
* @param pTail The edge's end point * @param pTail The edge's end point
*/ */
GraphEdge::GraphEdge(QCanvas* pCanvas, GraphNode* pHead, GraphNode* pTail) : GraphEdge::GraphEdge(TQCanvas* pCanvas, GraphNode* pHead, GraphNode* pTail) :
QCanvasPolygonalItem(pCanvas), TQCanvasPolygonalItem(pCanvas),
m_pHead(pHead), m_pHead(pHead),
m_pTail(pTail), m_pTail(pTail),
m_arrPoly(4) m_arrPoly(4)
@ -156,8 +156,8 @@ GraphEdge::GraphEdge(QCanvas* pCanvas, GraphNode* pHead, GraphNode* pTail) :
*/ */
GraphEdge::~GraphEdge() GraphEdge::~GraphEdge()
{ {
// Classes derived from QCanvasPolygonalItem must call hide() in their // Classes derived from TQCanvasPolygonalItem must call hide() in their
// detructor (according to the Qt documentation) // detructor (according to the TQt documentation)
hide(); hide();
} }
@ -165,14 +165,14 @@ GraphEdge::~GraphEdge()
* Calculates the area surrounding the edge, and the bounding rectangle of * Calculates the area surrounding the edge, and the bounding rectangle of
* the edge's polygonal head. * the edge's polygonal head.
* The calculated area is used to find items on the canvas and to display * The calculated area is used to find items on the canvas and to display
* tips. The bounding rectangle defines the tip's region (@see QToolTip). * tips. The bounding rectangle defines the tip's region (@see TQToolTip).
* TODO: The function assumes that the we can simply append the polygon's * TODO: The function assumes that the we can simply append the polygon's
* array to that of the splines. Is this always the case, or should we sort * array to that of the splines. Is this always the case, or should we sort
* the points of the polygon in radial order? * the points of the polygon in radial order?
* @param arrCurve The control points of the edge's spline * @param arrCurve The control points of the edge's spline
* @param ai Used to calculate the arrow head polygon * @param ai Used to calculate the arrow head polygon
*/ */
void GraphEdge::setPoints(const QPointArray& arrCurve, const ArrowInfo& ai) void GraphEdge::setPoints(const TQPointArray& arrCurve, const ArrowInfo& ai)
{ {
ConvexHull ch; ConvexHull ch;
uint i; uint i;
@ -195,7 +195,7 @@ void GraphEdge::setPoints(const QPointArray& arrCurve, const ArrowInfo& ai)
ch.compute(m_arrArea); ch.compute(m_arrArea);
// Calculate the head's bounding rectangle // Calculate the head's bounding rectangle
m_rcTip = QRect(m_arrPoly[0], m_arrPoly[0]); m_rcTip = TQRect(m_arrPoly[0], m_arrPoly[0]);
for (i = 1; i < m_arrPoly.size(); i++) { for (i = 1; i < m_arrPoly.size(); i++) {
nXpos = m_arrPoly[i].x(); nXpos = m_arrPoly[i].x();
if (nXpos < m_rcTip.left()) if (nXpos < m_rcTip.left())
@ -217,8 +217,8 @@ void GraphEdge::setPoints(const QPointArray& arrCurve, const ArrowInfo& ai)
* @param sLine The call's line number * @param sLine The call's line number
* @param sText The call's text * @param sText The call's text
*/ */
void GraphEdge::setCallInfo(const QString& sFile, const QString& sLine, void GraphEdge::setCallInfo(const TQString& sFile, const TQString& sLine,
const QString& sText) const TQString& sText)
{ {
m_sFile = sFile; m_sFile = sFile;
m_sLine = sLine; m_sLine = sLine;
@ -229,9 +229,9 @@ void GraphEdge::setCallInfo(const QString& sFile, const QString& sLine,
* Constructs a tool-tip string for this edge. * Constructs a tool-tip string for this edge.
* @return The tool-tip text * @return The tool-tip text
*/ */
QString GraphEdge::getTip() const TQString GraphEdge::getTip() const
{ {
QString sTip; TQString sTip;
sTip = m_sText + "<br><i>" + m_sFile + "</i>:" + m_sLine; sTip = m_sText + "<br><i>" + m_sFile + "</i>:" + m_sLine;
return sTip; return sTip;
@ -241,7 +241,7 @@ QString GraphEdge::getTip() const
* Draws the spline as a sequence of cubic Bezier curves. * Draws the spline as a sequence of cubic Bezier curves.
* @param painter Used for drawing the item on the canvas view * @param painter Used for drawing the item on the canvas view
*/ */
void GraphEdge::drawShape(QPainter& painter) void GraphEdge::drawShape(TQPainter& painter)
{ {
uint i; uint i;
@ -254,10 +254,10 @@ void GraphEdge::drawShape(QPainter& painter)
#if 0 #if 0
// Draws the convex hull of the edge // Draws the convex hull of the edge
QPen pen = painter.pen(); TQPen pen = painter.pen();
QBrush br = painter.brush(); TQBrush br = painter.brush();
painter.setPen(QPen(QColor(255, 0, 0))); painter.setPen(TQPen(TQColor(255, 0, 0)));
painter.setBrush(QBrush()); painter.setBrush(TQBrush());
painter.drawPolygon(m_arrArea); painter.drawPolygon(m_arrArea);
painter.setPen(pen); painter.setPen(pen);
painter.setBrush(br); painter.setBrush(br);
@ -270,7 +270,7 @@ void GraphEdge::drawShape(QPainter& painter)
*/ */
void GraphEdge::makeArrowhead(const ArrowInfo& ai) void GraphEdge::makeArrowhead(const ArrowInfo& ai)
{ {
QPoint ptLast, ptPrev; TQPoint ptLast, ptPrev;
double dX1, dY1, dX0, dY0, dX, dY, dDeltaX, dDeltaY, dNormLen; double dX1, dY1, dX0, dY0, dX, dY, dDeltaX, dDeltaY, dNormLen;
// The arrowhead follows the line from the second last to the last points // The arrowhead follows the line from the second last to the last points

@ -28,7 +28,7 @@
#ifndef GRAPHEDGE_H #ifndef GRAPHEDGE_H
#define GRAPHEDGE_H #define GRAPHEDGE_H
#include <qcanvas.h> #include <ntqcanvas.h>
class GraphNode; class GraphNode;
@ -53,20 +53,20 @@ struct ArrowInfo
* is its head. * is its head.
* @author Elad Lahav * @author Elad Lahav
*/ */
class GraphEdge : public QCanvasPolygonalItem class GraphEdge : public TQCanvasPolygonalItem
{ {
public: public:
GraphEdge(QCanvas*, GraphNode*, GraphNode*); GraphEdge(TQCanvas*, GraphNode*, GraphNode*);
~GraphEdge(); ~GraphEdge();
void setCallInfo(const QString&, const QString&, const QString&); void setCallInfo(const TQString&, const TQString&, const TQString&);
void setPoints(const QPointArray&, const ArrowInfo&); void setPoints(const TQPointArray&, const ArrowInfo&);
QString getTip() const; TQString getTip() const;
/** /**
* @return The coordinates of the convex hull surrounding the edge * @return The coordinates of the convex hull surrounding the edge
*/ */
virtual QPointArray areaPoints() const { return m_arrArea; } virtual TQPointArray areaPoints() const { return m_arrArea; }
/** /**
* @return The head node of the edge * @return The head node of the edge
@ -81,12 +81,12 @@ public:
/** /**
* @return The bounding rectangle of the edge's head * @return The bounding rectangle of the edge's head
*/ */
QRect tipRect() const { return m_rcTip; } TQRect tipRect() const { return m_rcTip; }
/** /**
* @return The file path for this call * @return The file path for this call
*/ */
const QString& getFile() const { return m_sFile; } const TQString& getFile() const { return m_sFile; }
/** /**
* @return The line number for this call * @return The line number for this call
@ -96,9 +96,9 @@ public:
/** /**
* @return The call's text * @return The call's text
*/ */
const QString& getText() const { return m_sText; } const TQString& getText() const { return m_sText; }
/** Identifies this class among other QCanvasItem classes. */ /** Identifies this class among other TQCanvasItem classes. */
static int RTTI; static int RTTI;
/** /**
@ -107,7 +107,7 @@ public:
virtual int rtti() const { return RTTI; } virtual int rtti() const { return RTTI; }
protected: protected:
virtual void drawShape(QPainter&); virtual void drawShape(TQPainter&);
private: private:
/** The edge's starting point. */ /** The edge's starting point. */
@ -117,25 +117,25 @@ private:
GraphNode* m_pTail; GraphNode* m_pTail;
/** The points of the polygon part of the edge. */ /** The points of the polygon part of the edge. */
QPointArray m_arrPoly; TQPointArray m_arrPoly;
/** Control points for the spline part of the edge. */ /** Control points for the spline part of the edge. */
QPointArray m_arrCurve; TQPointArray m_arrCurve;
QPointArray m_arrArea; TQPointArray m_arrArea;
/** The bounding rectangle of the edge's head, used for displaying the /** The bounding rectangle of the edge's head, used for displaying the
edge's tool-tip. */ edge's tool-tip. */
QRect m_rcTip; TQRect m_rcTip;
/** The call's source file. */ /** The call's source file. */
QString m_sFile; TQString m_sFile;
/** The call's line number. */ /** The call's line number. */
QString m_sLine; TQString m_sLine;
/** The call's text. */ /** The call's text. */
QString m_sText; TQString m_sText;
void makeArrowhead(const ArrowInfo&); void makeArrowhead(const ArrowInfo&);
}; };

@ -25,8 +25,8 @@
* *
***************************************************************************/ ***************************************************************************/
#include <qpainter.h> #include <ntqpainter.h>
#include <qfontmetrics.h> #include <ntqfontmetrics.h>
#include "graphnode.h" #include "graphnode.h"
int GraphNode::RTTI = 1001; int GraphNode::RTTI = 1001;
@ -37,8 +37,8 @@ int GraphNode::RTTI = 1001;
* @param sFunc The node's function * @param sFunc The node's function
* @param bMultiCall Whether this node represents multiple calls * @param bMultiCall Whether this node represents multiple calls
*/ */
GraphNode::GraphNode(QCanvas* pCanvas, const QString& sFunc, bool bMultiCall) : GraphNode::GraphNode(TQCanvas* pCanvas, const TQString& sFunc, bool bMultiCall) :
QCanvasPolygon(pCanvas), TQCanvasPolygon(pCanvas),
m_sFunc(sFunc), m_sFunc(sFunc),
m_bMultiCall(bMultiCall), m_bMultiCall(bMultiCall),
m_bDfsFlag(false) m_bDfsFlag(false)
@ -90,12 +90,12 @@ void GraphNode::dfs()
m_bDfsFlag = true; m_bDfsFlag = true;
// Continue along outgoing edges // Continue along outgoing edges
QDictIterator<GraphEdge> itrOut(m_dictOutEdges); TQDictIterator<GraphEdge> itrOut(m_dictOutEdges);
for (; itrOut.current(); ++itrOut) for (; itrOut.current(); ++itrOut)
(*itrOut)->getTail()->dfs(); (*itrOut)->getTail()->dfs();
// Continue along incoming edges // Continue along incoming edges
QDictIterator<GraphEdge> itrIn(m_dictInEdges); TQDictIterator<GraphEdge> itrIn(m_dictInEdges);
for (; itrIn.current(); ++itrIn) for (; itrIn.current(); ++itrIn)
(*itrIn)->getHead()->dfs(); (*itrIn)->getHead()->dfs();
} }
@ -116,7 +116,7 @@ void GraphNode::removeOutEdges()
*/ */
void GraphNode::removeInEdges() void GraphNode::removeInEdges()
{ {
QDictIterator<GraphEdge> itr(m_dictInEdges); TQDictIterator<GraphEdge> itr(m_dictInEdges);
// Delete edges through their head nodes // Delete edges through their head nodes
for (; itr.current(); ++itr) for (; itr.current(); ++itr)
@ -134,8 +134,8 @@ void GraphNode::removeInEdges()
*/ */
void GraphNode::getFirstNeighbour(GraphNode*& pNode, bool& bCalled) void GraphNode::getFirstNeighbour(GraphNode*& pNode, bool& bCalled)
{ {
QDictIterator<GraphEdge> itrIn(m_dictInEdges); TQDictIterator<GraphEdge> itrIn(m_dictInEdges);
QDictIterator<GraphEdge> itrOut(m_dictOutEdges); TQDictIterator<GraphEdge> itrOut(m_dictOutEdges);
if (itrIn.current()) { if (itrIn.current()) {
pNode = itrIn.current()->getHead(); pNode = itrIn.current()->getHead();
@ -154,9 +154,9 @@ void GraphNode::getFirstNeighbour(GraphNode*& pNode, bool& bCalled)
* Modifies the bounding rectangle of the node. * Modifies the bounding rectangle of the node.
* @param rect The new coordinates to set * @param rect The new coordinates to set
*/ */
void GraphNode::setRect(const QRect& rect) void GraphNode::setRect(const TQRect& rect)
{ {
QPointArray arr(4); TQPointArray arr(4);
m_rect = rect; m_rect = rect;
@ -171,22 +171,22 @@ void GraphNode::setRect(const QRect& rect)
* Draws the node. * Draws the node.
* @param painter Used for drawing the item on the canvas view * @param painter Used for drawing the item on the canvas view
*/ */
void GraphNode::drawShape(QPainter& painter) void GraphNode::drawShape(TQPainter& painter)
{ {
const QPen& pen = painter.pen(); const TQPen& pen = painter.pen();
const QFont& font = painter.font(); const TQFont& font = painter.font();
// Draw the rectangle // Draw the rectangle
painter.setPen(QPen(Qt::black)); painter.setPen(TQPen(TQt::black));
painter.drawRect(m_rect); painter.drawRect(m_rect);
// Draw the text // Draw the text
painter.setPen(pen); painter.setPen(pen);
painter.setFont(m_font); painter.setFont(m_font);
if (m_bMultiCall) if (m_bMultiCall)
painter.drawText(m_rect, Qt::AlignCenter, "..."); painter.drawText(m_rect, TQt::AlignCenter, "...");
else else
painter.drawText(m_rect, Qt::AlignCenter, m_sFunc); painter.drawText(m_rect, TQt::AlignCenter, m_sFunc);
painter.setFont(font); painter.setFont(font);
} }

@ -28,8 +28,8 @@
#ifndef GRAPHNODE_H #ifndef GRAPHNODE_H
#define GRAPHNODE_H #define GRAPHNODE_H
#include <qcanvas.h> #include <ntqcanvas.h>
#include <qdict.h> #include <ntqdict.h>
#include "graphedge.h" #include "graphedge.h"
/** /**
@ -37,10 +37,10 @@
* This item represents a function in the call graph. * This item represents a function in the call graph.
* @author Elad Lahav * @author Elad Lahav
*/ */
class GraphNode : public QCanvasPolygon class GraphNode : public TQCanvasPolygon
{ {
public: public:
GraphNode(QCanvas* pCanvas, const QString&, bool bMultiCall = false); GraphNode(TQCanvas* pCanvas, const TQString&, bool bMultiCall = false);
~GraphNode(); ~GraphNode();
GraphEdge* addOutEdge(GraphNode*); GraphEdge* addOutEdge(GraphNode*);
@ -52,17 +52,17 @@ public:
/** /**
* @param rect The bounding rectangle of the node * @param rect The bounding rectangle of the node
*/ */
void setRect(const QRect& rect); void setRect(const TQRect& rect);
/** /**
* @param font The font to use for drawing the text * @param font The font to use for drawing the text
*/ */
void setFont(const QFont& font) { m_font = font; } void setFont(const TQFont& font) { m_font = font; }
/** /**
* @return The name of the function * @return The name of the function
*/ */
const QString& getFunc() const { return m_sFunc; } const TQString& getFunc() const { return m_sFunc; }
/** /**
* @return true for a multiple-call node, false otherwise * @return true for a multiple-call node, false otherwise
@ -72,7 +72,7 @@ public:
/** /**
* @return The set of outgoing edges * @return The set of outgoing edges
*/ */
QDict<GraphEdge>& getOutEdges() { return m_dictOutEdges; } TQDict<GraphEdge>& getOutEdges() { return m_dictOutEdges; }
/** /**
* @return true if this node was already visited during the current DFS, * @return true if this node was already visited during the current DFS,
@ -85,7 +85,7 @@ public:
*/ */
void dfsReset() { m_bDfsFlag = false; } void dfsReset() { m_bDfsFlag = false; }
/** Identifies this class among other QCanvasItem classes. */ /** Identifies this class among other TQCanvasItem classes. */
static int RTTI; static int RTTI;
/** /**
@ -94,23 +94,23 @@ public:
virtual int rtti() const { return RTTI; } virtual int rtti() const { return RTTI; }
protected: protected:
virtual void drawShape(QPainter&); virtual void drawShape(TQPainter&);
private: private:
/** Function name. */ /** Function name. */
QString m_sFunc; TQString m_sFunc;
/** A list of outgoing edges indexed by destination. */ /** A list of outgoing edges indexed by destination. */
QDict<GraphEdge> m_dictOutEdges; TQDict<GraphEdge> m_dictOutEdges;
/** A list of incoming edges indexed by destination. */ /** A list of incoming edges indexed by destination. */
QDict<GraphEdge> m_dictInEdges; TQDict<GraphEdge> m_dictInEdges;
/** The bounding rectangle for the node. */ /** The bounding rectangle for the node. */
QRect m_rect; TQRect m_rect;
/** The font to use for drawing the text. */ /** The font to use for drawing the text. */
QFont m_font; TQFont m_font;
/** true for a multiple-call node, false otherwise. */ /** true for a multiple-call node, false otherwise. */
bool m_bMultiCall; bool m_bMultiCall;

@ -25,7 +25,7 @@
* *
***************************************************************************/ ***************************************************************************/
#include <qspinbox.h> #include <ntqspinbox.h>
#include "graphprefdlg.h" #include "graphprefdlg.h"
#include "preferencesdlg.h" #include "preferencesdlg.h"
#include "kscopeconfig.h" #include "kscopeconfig.h"
@ -35,7 +35,7 @@
* @param pParent The parent widget * @param pParent The parent widget
* @param szName The widget's name * @param szName The widget's name
*/ */
GraphPrefDlg::GraphPrefDlg(QWidget* pParent, const char* szName) : GraphPrefDlg::GraphPrefDlg(TQWidget* pParent, const char* szName) :
GraphPrefLayout(pParent, szName, true, 0) GraphPrefLayout(pParent, szName, true, 0)
{ {
m_pMaxDegSpin->setValue(Config().getGraphMaxNodeDegree()); m_pMaxDegSpin->setValue(Config().getGraphMaxNodeDegree());

@ -40,7 +40,7 @@ class GraphPrefDlg : public GraphPrefLayout
Q_OBJECT Q_OBJECT
public: public:
GraphPrefDlg(QWidget* pParent = 0, const char* szName = 0); GraphPrefDlg(TQWidget* pParent = 0, const char* szName = 0);
~GraphPrefDlg(); ~GraphPrefDlg();
int getMaxNodeDegree(); int getMaxNodeDegree();

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>GraphPrefLayout</class> <class>GraphPrefLayout</class>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>GraphPrefLayout</cstring> <cstring>GraphPrefLayout</cstring>
</property> </property>
@ -22,7 +22,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout6</cstring> <cstring>layout6</cstring>
</property> </property>
@ -30,7 +30,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel1</cstring> <cstring>textLabel1</cstring>
</property> </property>
@ -55,14 +55,14 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QSpinBox"> <widget class="TQSpinBox">
<property name="name"> <property name="name">
<cstring>m_pMaxDegSpin</cstring> <cstring>m_pMaxDegSpin</cstring>
</property> </property>
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout7</cstring> <cstring>layout7</cstring>
</property> </property>
@ -70,7 +70,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel2</cstring> <cstring>textLabel2</cstring>
</property> </property>
@ -95,7 +95,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pColorButton</cstring> <cstring>m_pColorButton</cstring>
</property> </property>
@ -105,7 +105,7 @@
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout8</cstring> <cstring>layout8</cstring>
</property> </property>
@ -113,7 +113,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel3</cstring> <cstring>textLabel3</cstring>
</property> </property>
@ -138,7 +138,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pFontButton</cstring> <cstring>m_pFontButton</cstring>
</property> </property>
@ -162,7 +162,7 @@
<enum>Horizontal</enum> <enum>Horizontal</enum>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>Layout1</cstring> <cstring>Layout1</cstring>
</property> </property>
@ -193,7 +193,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>buttonOk</cstring> <cstring>buttonOk</cstring>
</property> </property>
@ -210,7 +210,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>buttonCancel</cstring> <cstring>buttonCancel</cstring>
</property> </property>

@ -27,9 +27,9 @@
#include <math.h> #include <math.h>
#include <stdlib.h> #include <stdlib.h>
#include <qfile.h> #include <ntqfile.h>
#include <qpainter.h> #include <ntqpainter.h>
#include <qtooltip.h> #include <ntqtooltip.h>
#include <klocale.h> #include <klocale.h>
#include <kmessagebox.h> #include <kmessagebox.h>
#include "graphwidget.h" #include "graphwidget.h"
@ -51,14 +51,14 @@ const char TMP_TMPL[] = "/tmp/kscope_dot.XXXXXX";
* items are neither rectangular nor is their position known in advance. * items are neither rectangular nor is their position known in advance.
* @author Elad Lahav * @author Elad Lahav
*/ */
class GraphTip : public QToolTip class GraphTip : public TQToolTip
{ {
public: public:
/** /**
* Class constructor. * Class constructor.
* @param pWidget Owner graph widget * @param pWidget Owner graph widget
*/ */
GraphTip(GraphWidget* pWidget) : QToolTip(pWidget->viewport()), GraphTip(GraphWidget* pWidget) : TQToolTip(pWidget->viewport()),
m_pGraphWidget(pWidget) {} m_pGraphWidget(pWidget) {}
/** /**
@ -73,13 +73,13 @@ protected:
* the tool tip. * the tool tip.
* @param ptPos Current mouse position * @param ptPos Current mouse position
*/ */
virtual void maybeTip(const QPoint& ptPos) { virtual void maybeTip(const TQPoint& ptPos) {
QString sText; TQString sText;
QRect rc; TQRect rc;
// Display a tip, if required by the owner // Display a tip, if required by the owner
sText = m_pGraphWidget->getTip(ptPos, rc); sText = m_pGraphWidget->getTip(ptPos, rc);
if (sText != QString::null) if (sText != TQString::null)
tip(rc, sText); tip(rc, sText);
} }
@ -90,10 +90,10 @@ private:
/** /**
* Provides a menu separator with text. * Provides a menu separator with text.
* The separator is added with QMenuData::insertItem(QWidget*). * The separator is added with TQMenuData::insertItem(TQWidget*).
* @author Elad Lahav * @author Elad Lahav
*/ */
class MenuLabel : public QLabel class MenuLabel : public TQLabel
{ {
public: public:
/** /**
@ -101,8 +101,8 @@ public:
* @param sText The text to display * @param sText The text to display
* @param pParent The parent widget * @param pParent The parent widget
*/ */
MenuLabel(const QString& sText, QWidget* pParent) : MenuLabel(const TQString& sText, TQWidget* pParent) :
QLabel(sText, pParent) { TQLabel(sText, pParent) {
// Set the appropriate visual properties // Set the appropriate visual properties
setFrameShape(MenuBarPanel); setFrameShape(MenuBarPanel);
setAlignment(AlignHCenter | AlignVCenter); setAlignment(AlignHCenter | AlignVCenter);
@ -117,8 +117,8 @@ ArrowInfo GraphWidget::s_ai;
* @param pParent The parent widget * @param pParent The parent widget
* @param szName The widget's name * @param szName The widget's name
*/ */
GraphWidget::GraphWidget(QWidget* pParent, const char* szName) : GraphWidget::GraphWidget(TQWidget* pParent, const char* szName) :
QCanvasView(pParent, szName), TQCanvasView(pParent, szName),
m_progress(this), m_progress(this),
m_dot(this), m_dot(this),
m_dZoom(1.0), m_dZoom(1.0),
@ -130,7 +130,7 @@ GraphWidget::GraphWidget(QWidget* pParent, const char* szName) :
m_dictNodes.setAutoDelete(true); m_dictNodes.setAutoDelete(true);
// Create a canvas // Create a canvas
setCanvas(new QCanvas(this)); setCanvas(new TQCanvas(this));
canvas()->setBackgroundColor(Config().getColor(KScopeConfig::GraphBack)); canvas()->setBackgroundColor(Config().getColor(KScopeConfig::GraphBack));
// Create a persistent Cscope process // Create a persistent Cscope process
@ -156,7 +156,7 @@ GraphWidget::GraphWidget(QWidget* pParent, const char* szName) :
connect(&m_dot, SIGNAL(finished(uint)), this, SLOT(slotDotFinished())); connect(&m_dot, SIGNAL(finished(uint)), this, SLOT(slotDotFinished()));
// Create the node popup menu // Create the node popup menu
m_pNodePopup = new QPopupMenu(this); m_pNodePopup = new TQPopupMenu(this);
m_pNodePopup->insertItem(new MenuLabel(i18n("<b>Called Functions</b>"), m_pNodePopup->insertItem(new MenuLabel(i18n("<b>Called Functions</b>"),
m_pNodePopup)); m_pNodePopup));
@ -183,7 +183,7 @@ GraphWidget::GraphWidget(QWidget* pParent, const char* szName) :
m_pNodePopup->insertItem(i18n("Remove"), this, SLOT(slotRemoveNode())); m_pNodePopup->insertItem(i18n("Remove"), this, SLOT(slotRemoveNode()));
// Create the multi-call node popup menu // Create the multi-call node popup menu
m_pMultiCallPopup = new QPopupMenu(this); m_pMultiCallPopup = new TQPopupMenu(this);
m_pMultiCallPopup->insertItem(i18n("List..."), this, m_pMultiCallPopup->insertItem(i18n("List..."), this,
SLOT(slotMultiCallDetails())); SLOT(slotMultiCallDetails()));
m_pMultiCallPopup->insertSeparator(); m_pMultiCallPopup->insertSeparator();
@ -191,7 +191,7 @@ GraphWidget::GraphWidget(QWidget* pParent, const char* szName) :
SLOT(slotRemoveNode())); SLOT(slotRemoveNode()));
// Create the edge menu // Create the edge menu
m_pEdgePopup = new QPopupMenu(this); m_pEdgePopup = new TQPopupMenu(this);
m_pEdgePopup->insertItem(i18n("Open Call"), this, SLOT(slotOpenCall())); m_pEdgePopup->insertItem(i18n("Open Call"), this, SLOT(slotOpenCall()));
(void)new GraphTip(this); (void)new GraphTip(this);
@ -211,7 +211,7 @@ GraphWidget::~GraphWidget()
* strongly connected to the root). * strongly connected to the root).
* @param sFunc The function name for the root node * @param sFunc The function name for the root node
*/ */
void GraphWidget::setRoot(const QString& sFunc) void GraphWidget::setRoot(const TQString& sFunc)
{ {
// Insert a new node to the graph // Insert a new node to the graph
addNode(sFunc); addNode(sFunc);
@ -223,7 +223,7 @@ void GraphWidget::setRoot(const QString& sFunc)
* @param sFunc The name of a function * @param sFunc The name of a function
* @return The node corresponding to the given name * @return The node corresponding to the given name
*/ */
GraphNode* GraphWidget::addNode(const QString& sFunc, bool bMultiCall) GraphNode* GraphWidget::addNode(const TQString& sFunc, bool bMultiCall)
{ {
GraphNode* pNode; GraphNode* pNode;
@ -267,9 +267,9 @@ void GraphWidget::addCall(const CallData& data)
* @param bCalled true if the multiple calls are called from that function, * @param bCalled true if the multiple calls are called from that function,
* false if they are calling the function * false if they are calling the function
*/ */
void GraphWidget::addMultiCall(const QString& sFunc, bool bCalled) void GraphWidget::addMultiCall(const TQString& sFunc, bool bCalled)
{ {
QString sMulti; TQString sMulti;
GraphNode* pCaller, * pCallee; GraphNode* pCaller, * pCallee;
GraphEdge* pEdge; GraphEdge* pEdge;
@ -301,7 +301,7 @@ void GraphWidget::addMultiCall(const QString& sFunc, bool bCalled)
*/ */
void GraphWidget::draw() void GraphWidget::draw()
{ {
QWMatrix mtx; TQWMatrix mtx;
char szTempFile[TMP_TMPL_SIZE]; char szTempFile[TMP_TMPL_SIZE];
int nFd; int nFd;
FILE* pFile; FILE* pFile;
@ -328,7 +328,7 @@ void GraphWidget::draw()
// Write the graph contents to the temporary file // Write the graph contents to the temporary file
{ {
QTextStream str(pFile, IO_WriteOnly); TQTextStream str(pFile, IO_WriteOnly);
write(str, "graph", "--", false); write(str, "graph", "--", false);
} }
@ -359,7 +359,7 @@ void GraphWidget::draw()
void GraphWidget::save(FILE* pFile) void GraphWidget::save(FILE* pFile)
{ {
// Write the graph using the dot language // Write the graph using the dot language
QTextStream str(pFile, IO_WriteOnly); TQTextStream str(pFile, IO_WriteOnly);
write(str, "digraph", "->", true); write(str, "digraph", "->", true);
} }
@ -367,15 +367,15 @@ void GraphWidget::save(FILE* pFile)
* Exports a graph to a dot file. * Exports a graph to a dot file.
* @param sFile The full path of the file to export to * @param sFile The full path of the file to export to
*/ */
void GraphWidget::save(const QString& sFile) void GraphWidget::save(const TQString& sFile)
{ {
QFile file(sFile); TQFile file(sFile);
// Open/create the file // Open/create the file
if (!file.open(IO_WriteOnly)) if (!file.open(IO_WriteOnly))
return; return;
QTextStream str(&file); TQTextStream str(&file);
write(str, "digraph", "->", false); write(str, "digraph", "->", false);
} }
@ -385,7 +385,7 @@ void GraphWidget::save(const QString& sFile)
*/ */
void GraphWidget::zoom(bool bIn) void GraphWidget::zoom(bool bIn)
{ {
QWMatrix mtx; TQWMatrix mtx;
// Set the new zoom factor // Set the new zoom factor
if (bIn) if (bIn)
@ -414,7 +414,7 @@ void GraphWidget::setZoom(double dZoom)
*/ */
void GraphWidget::rotate() void GraphWidget::rotate()
{ {
QString sDir; TQString sDir;
int i; int i;
// Get the current direction // Get the current direction
@ -437,15 +437,15 @@ void GraphWidget::rotate()
* NOTE: We currently return a tool tip for edges only * NOTE: We currently return a tool tip for edges only
* @param ptPos The position to query * @param ptPos The position to query
* @param rc Holds the tip's rectangle, upon return * @param rc Holds the tip's rectangle, upon return
* @return The tip's text, or QString::null if no tip is required * @return The tip's text, or TQString::null if no tip is required
*/ */
QString GraphWidget::getTip(const QPoint& ptPos, QRect& rc) TQString GraphWidget::getTip(const TQPoint& ptPos, TQRect& rc)
{ {
QPoint ptRealPos, ptTopLeft, ptBottomRight; TQPoint ptRealPos, ptTopLeft, ptBottomRight;
QCanvasItemList il; TQCanvasItemList il;
QCanvasItemList::Iterator itr; TQCanvasItemList::Iterator itr;
GraphEdge* pEdge; GraphEdge* pEdge;
QString sText, sFile, sLine; TQString sText, sFile, sLine;
ptRealPos = viewportToContents(ptPos); ptRealPos = viewportToContents(ptPos);
ptRealPos /= m_dZoom; ptRealPos /= m_dZoom;
@ -461,7 +461,7 @@ QString GraphWidget::getTip(const QPoint& ptPos, QRect& rc)
// No tip if no edge was found // No tip if no edge was found
if (pEdge == NULL) if (pEdge == NULL)
return QString::null; return TQString::null;
// Set the rectangle for the tip (the tip is closed when the mouse leaves // Set the rectangle for the tip (the tip is closed when the mouse leaves
// this area) // this area)
@ -472,7 +472,7 @@ QString GraphWidget::getTip(const QPoint& ptPos, QRect& rc)
ptBottomRight *= m_dZoom; ptBottomRight *= m_dZoom;
ptTopLeft = contentsToViewport(ptTopLeft); ptTopLeft = contentsToViewport(ptTopLeft);
ptBottomRight = contentsToViewport(ptBottomRight); ptBottomRight = contentsToViewport(ptBottomRight);
rc = QRect(ptTopLeft, ptBottomRight); rc = TQRect(ptTopLeft, ptBottomRight);
// Create a tip for this edge // Create a tip for this edge
return pEdge->getTip(); return pEdge->getTip();
@ -494,7 +494,7 @@ void GraphWidget::resize(int nWidth, int nHeight)
* @param sFunc The function corresponding to the node to draw * @param sFunc The function corresponding to the node to draw
* @param rect The coordinates of the node's rectangle * @param rect The coordinates of the node's rectangle
*/ */
void GraphWidget::drawNode(const QString& sFunc, const QRect& rect) void GraphWidget::drawNode(const TQString& sFunc, const TQRect& rect)
{ {
GraphNode* pNode; GraphNode* pNode;
@ -504,7 +504,7 @@ void GraphWidget::drawNode(const QString& sFunc, const QRect& rect)
// Set the visual aspects of the node // Set the visual aspects of the node
pNode->setRect(rect); pNode->setRect(rect);
pNode->setZ(2.0); pNode->setZ(2.0);
pNode->setPen(QPen(Qt::black)); pNode->setPen(TQPen(TQt::black));
pNode->setFont(Config().getFont(KScopeConfig::Graph)); pNode->setFont(Config().getFont(KScopeConfig::Graph));
if (pNode->isMultiCall()) if (pNode->isMultiCall())
@ -523,8 +523,8 @@ void GraphWidget::drawNode(const QString& sFunc, const QRect& rect)
* @param sCallee Identifies the edge's tail node * @param sCallee Identifies the edge's tail node
* @param arrCurve Control points for the edge's spline * @param arrCurve Control points for the edge's spline
*/ */
void GraphWidget::drawEdge(const QString& sCaller, const QString& sCallee, void GraphWidget::drawEdge(const TQString& sCaller, const TQString& sCallee,
const QPointArray& arrCurve) const TQPointArray& arrCurve)
{ {
GraphNode* pCaller, * pCallee; GraphNode* pCaller, * pCallee;
GraphEdge* pEdge; GraphEdge* pEdge;
@ -537,8 +537,8 @@ void GraphWidget::drawEdge(const QString& sCaller, const QString& sCallee,
// Set the visual aspects of the edge // Set the visual aspects of the edge
pEdge->setPoints(arrCurve, s_ai); pEdge->setPoints(arrCurve, s_ai);
pEdge->setZ(1.0); pEdge->setZ(1.0);
pEdge->setPen(QPen(Qt::black)); pEdge->setPen(TQPen(TQt::black));
pEdge->setBrush(QBrush(Qt::black)); pEdge->setBrush(TQBrush(TQt::black));
// Draw the edge // Draw the edge
pEdge->show(); pEdge->show();
@ -567,7 +567,7 @@ void GraphWidget::setArrowInfo(int nLength, int nDegrees)
/** /**
* Draws the contents of the canvas on this view. * Draws the contents of the canvas on this view.
* NOTE: This method is overriden to fix a strange bug in Qt that leaves * NOTE: This method is overriden to fix a strange bug in TQt that leaves
* a border around the canvas part of the view. It should be deleted once * a border around the canvas part of the view. It should be deleted once
* this bug is fixed. * this bug is fixed.
* TODO: Is there a better way of erasing the border? * TODO: Is there a better way of erasing the border?
@ -577,16 +577,16 @@ void GraphWidget::setArrowInfo(int nLength, int nDegrees)
* @param nWidth The width of the area to draw * @param nWidth The width of the area to draw
* @param nHeight The height of the area to draw * @param nHeight The height of the area to draw
*/ */
void GraphWidget::drawContents(QPainter* pPainter, int nX, int nY, void GraphWidget::drawContents(TQPainter* pPainter, int nX, int nY,
int nWidth, int nHeight) int nWidth, int nHeight)
{ {
// Draw the contents of the canvas // Draw the contents of the canvas
QCanvasView::drawContents(pPainter, nX, nY, nWidth, nHeight); TQCanvasView::drawContents(pPainter, nX, nY, nWidth, nHeight);
// Erase the canvas's area border // Erase the canvas's area border
if (canvas() != NULL) { if (canvas() != NULL) {
QRect rect = canvas()->rect(); TQRect rect = canvas()->rect();
pPainter->setBrush(QBrush()); // Null brush pPainter->setBrush(TQBrush()); // Null brush
pPainter->setPen(Config().getColor(KScopeConfig::GraphBack)); pPainter->setPen(Config().getColor(KScopeConfig::GraphBack));
pPainter->drawRect(-1, -1, rect.width() + 2, rect.height() + 2); pPainter->drawRect(-1, -1, rect.width() + 2, rect.height() + 2);
} }
@ -596,12 +596,12 @@ void GraphWidget::drawContents(QPainter* pPainter, int nX, int nY,
* Handles mouse clicks over the graph view. * Handles mouse clicks over the graph view.
* @param pEvent Includes information on the mouse press event * @param pEvent Includes information on the mouse press event
*/ */
void GraphWidget::contentsMousePressEvent(QMouseEvent* pEvent) void GraphWidget::contentsMousePressEvent(TQMouseEvent* pEvent)
{ {
QPoint ptRealPos; TQPoint ptRealPos;
QCanvasItemList il; TQCanvasItemList il;
QCanvasItemList::Iterator itr; TQCanvasItemList::Iterator itr;
QString sFunc; TQString sFunc;
GraphNode* pNode; GraphNode* pNode;
GraphEdge* pEdge; GraphEdge* pEdge;
@ -609,8 +609,8 @@ void GraphWidget::contentsMousePressEvent(QMouseEvent* pEvent)
pEdge = NULL; pEdge = NULL;
// Handle right-clicks only // Handle right-clicks only
if (pEvent->button() != Qt::RightButton) { if (pEvent->button() != TQt::RightButton) {
QCanvasView::contentsMousePressEvent(pEvent); TQCanvasView::contentsMousePressEvent(pEvent);
return; return;
} }
@ -638,7 +638,7 @@ void GraphWidget::contentsMousePressEvent(QMouseEvent* pEvent)
} }
else { else {
// Take the default action // Take the default action
QCanvasView::contentsMousePressEvent(pEvent); TQCanvasView::contentsMousePressEvent(pEvent);
} }
} }
@ -653,11 +653,11 @@ void GraphWidget::contentsMousePressEvent(QMouseEvent* pEvent)
* @param sEdge The edge connector ("--" or "->") * @param sEdge The edge connector ("--" or "->")
* @param bWriteCall true to write call information, false otherwise * @param bWriteCall true to write call information, false otherwise
*/ */
void GraphWidget::write(QTextStream& str, const QString& sType, void GraphWidget::write(TQTextStream& str, const TQString& sType,
const QString& sEdge, bool bWriteCall) const TQString& sEdge, bool bWriteCall)
{ {
QFont font; TQFont font;
QDictIterator<GraphNode> itr(m_dictNodes); TQDictIterator<GraphNode> itr(m_dictNodes);
GraphEdge* pEdge; GraphEdge* pEdge;
Encoder enc; Encoder enc;
@ -678,7 +678,7 @@ void GraphWidget::write(QTextStream& str, const QString& sType,
<< "fontcolor=\"" << Config().getColor(KScopeConfig::GraphText).name() << "fontcolor=\"" << Config().getColor(KScopeConfig::GraphText).name()
<< "\", " << "\", "
<< "fontname=\"" << font.family() << "\", " << "fontname=\"" << font.family() << "\", "
<< "fontsize=" << QString::number(font.pointSize()) << "fontsize=" << TQString::number(font.pointSize())
<< "];\n"; << "];\n";
// Iterate over all nodes // Iterate over all nodes
@ -687,7 +687,7 @@ void GraphWidget::write(QTextStream& str, const QString& sType,
str << "\t" << itr.current()->getFunc() << ";\n"; str << "\t" << itr.current()->getFunc() << ";\n";
// Iterate over all edges leaving this node // Iterate over all edges leaving this node
QDictIterator<GraphEdge> itrEdge(itr.current()->getOutEdges()); TQDictIterator<GraphEdge> itrEdge(itr.current()->getOutEdges());
for (; itrEdge.current(); ++itrEdge) { for (; itrEdge.current(); ++itrEdge) {
pEdge = itrEdge.current(); pEdge = itrEdge.current();
str << "\t" << pEdge->getHead()->getFunc() << sEdge str << "\t" << pEdge->getHead()->getFunc() << sEdge
@ -737,7 +737,7 @@ void GraphWidget::removeEdges(GraphNode* pNode, bool bOut)
*/ */
void GraphWidget::removeDisconnected(GraphNode* pNode) void GraphWidget::removeDisconnected(GraphNode* pNode)
{ {
QDictIterator<GraphNode> itr(m_dictNodes); TQDictIterator<GraphNode> itr(m_dictNodes);
// Find all weakly connected components attached to this node // Find all weakly connected components attached to this node
pNode->dfs(); pNode->dfs();
@ -760,7 +760,7 @@ void GraphWidget::removeDisconnected(GraphNode* pNode)
* @param pNode The node for which to show the menu * @param pNode The node for which to show the menu
* @param ptPos The position of the menu * @param ptPos The position of the menu
*/ */
void GraphWidget::showNodeMenu(GraphNode* pNode, const QPoint& ptPos) void GraphWidget::showNodeMenu(GraphNode* pNode, const TQPoint& ptPos)
{ {
// Remember the node // Remember the node
m_pMenuItem = pNode; m_pMenuItem = pNode;
@ -778,7 +778,7 @@ void GraphWidget::showNodeMenu(GraphNode* pNode, const QPoint& ptPos)
* @param pEdge The edge for which to show the menu * @param pEdge The edge for which to show the menu
* @param ptPos The position of the menu * @param ptPos The position of the menu
*/ */
void GraphWidget::showEdgeMenu(GraphEdge* pEdge, const QPoint& ptPos) void GraphWidget::showEdgeMenu(GraphEdge* pEdge, const TQPoint& ptPos)
{ {
// Remember the edge // Remember the edge
m_pMenuItem = pEdge; m_pMenuItem = pEdge;
@ -796,7 +796,7 @@ void GraphWidget::slotDotFinished()
{ {
// Delete the temporary file // Delete the temporary file
if (m_sDrawFilePath != "") { if (m_sDrawFilePath != "") {
QFile::remove(m_sDrawFilePath); TQFile::remove(m_sDrawFilePath);
m_sDrawFilePath = ""; m_sDrawFilePath = "";
} }
@ -820,7 +820,7 @@ void GraphWidget::slotDotFinished()
void GraphWidget::slotDataReady(FrontendToken* pToken) void GraphWidget::slotDataReady(FrontendToken* pToken)
{ {
CallData data; CallData data;
QString sFunc; TQString sFunc;
// Get the file name // Get the file name
data.m_sFile = pToken->getData(); data.m_sFile = pToken->getData();
@ -932,11 +932,11 @@ void GraphWidget::slotListCalled()
if (pNode == NULL) if (pNode == NULL)
return; return;
QueryViewDlg dlg(0, (QWidget*)parent()); QueryViewDlg dlg(0, (TQWidget*)parent());
// Show the query view dialogue // Show the query view dialogue
dlg.query(CscopeFrontend::Called, pNode->getFunc()); dlg.query(CscopeFrontend::Called, pNode->getFunc());
if (dlg.exec() != QDialog::Accepted) if (dlg.exec() != TQDialog::Accepted)
return; return;
// The OK button was clicked, replace current calls with the listed ones // The OK button was clicked, replace current calls with the listed ones
@ -1018,11 +1018,11 @@ void GraphWidget::slotListCalling()
if (pNode == NULL) if (pNode == NULL)
return; return;
QueryViewDlg dlg(0, (QWidget*)parent()); QueryViewDlg dlg(0, (TQWidget*)parent());
// Show the query view dialogue // Show the query view dialogue
dlg.query(CscopeFrontend::Calling, pNode->getFunc()); dlg.query(CscopeFrontend::Calling, pNode->getFunc());
if (dlg.exec() != QDialog::Accepted) if (dlg.exec() != TQDialog::Accepted)
return; return;
// The OK button was clicked, replace current calls with the listed ones // The OK button was clicked, replace current calls with the listed ones
@ -1085,8 +1085,8 @@ void GraphWidget::slotFindDef()
pDlg = new QueryViewDlg(QueryViewDlg::DestroyOnSelect, this); pDlg = new QueryViewDlg(QueryViewDlg::DestroyOnSelect, this);
// Display a line when it is selected in the dialogue // Display a line when it is selected in the dialogue
connect(pDlg, SIGNAL(lineRequested(const QString&, uint)), this, connect(pDlg, SIGNAL(lineRequested(const TQString&, uint)), this,
SIGNAL(lineRequested(const QString&, uint))); SIGNAL(lineRequested(const TQString&, uint)));
// Start the query // Start the query
pDlg->query(CscopeFrontend::Definition, pNode->getFunc()); pDlg->query(CscopeFrontend::Definition, pNode->getFunc());
@ -1136,7 +1136,7 @@ void GraphWidget::slotMultiCallDetails()
if (!pParent) if (!pParent)
return; return;
QueryViewDlg dlg(0, (QWidget*)parent()); QueryViewDlg dlg(0, (TQWidget*)parent());
dlg.query(bCalled ? CscopeFrontend::Calling : CscopeFrontend::Called, dlg.query(bCalled ? CscopeFrontend::Calling : CscopeFrontend::Called,
pParent->getFunc()); pParent->getFunc());
@ -1151,7 +1151,7 @@ void GraphWidget::slotMultiCallDetails()
void GraphWidget::slotOpenCall() void GraphWidget::slotOpenCall()
{ {
GraphEdge* pEdge; GraphEdge* pEdge;
QString sFile, sLine; TQString sFile, sLine;
// Make sure the menu item is an edge // Make sure the menu item is an edge
pEdge = dynamic_cast<GraphEdge*>(m_pMenuItem); pEdge = dynamic_cast<GraphEdge*>(m_pMenuItem);

@ -28,9 +28,9 @@
#ifndef GRAPHWIDGET_H #ifndef GRAPHWIDGET_H
#define GRAPHWIDGET_H #define GRAPHWIDGET_H
#include <qcanvas.h> #include <ntqcanvas.h>
#include <qpopupmenu.h> #include <ntqpopupmenu.h>
#include <qdict.h> #include <ntqdict.h>
#include "cscopefrontend.h" #include "cscopefrontend.h"
#include "graphnode.h" #include "graphnode.h"
#include "dotfrontend.h" #include "dotfrontend.h"
@ -39,7 +39,7 @@ class ProgressDlg;
/** /**
* A widget that displays call tree graphs generated by graphviz. * A widget that displays call tree graphs generated by graphviz.
* This class is based on a QCanvasView widget, and displays two types of * This class is based on a TQCanvasView widget, and displays two types of
* canvas items: GraphNode, which draws the name of a function inside a * canvas items: GraphNode, which draws the name of a function inside a
* polygon, and ArrowEdge, which is a directed graph edge shaped like an * polygon, and ArrowEdge, which is a directed graph edge shaped like an
* arrow. * arrow.
@ -58,12 +58,12 @@ class ProgressDlg;
* any of these widgets. * any of these widgets.
* @author Elad Lahav * @author Elad Lahav
*/ */
class GraphWidget : public QCanvasView class GraphWidget : public TQCanvasView
{ {
Q_OBJECT Q_OBJECT
public: public:
GraphWidget(QWidget* pParent = 0, const char* szName = 0); GraphWidget(TQWidget* pParent = 0, const char* szName = 0);
~GraphWidget(); ~GraphWidget();
/** /**
@ -74,39 +74,39 @@ public:
struct CallData struct CallData
{ {
/** The name of the calling function. */ /** The name of the calling function. */
QString m_sCaller; TQString m_sCaller;
/** The name of the called function. */ /** The name of the called function. */
QString m_sCallee; TQString m_sCallee;
/** Path of the file in which the call appears. */ /** Path of the file in which the call appears. */
QString m_sFile; TQString m_sFile;
/** The line number of the call. */ /** The line number of the call. */
QString m_sLine; TQString m_sLine;
/** The call's text. */ /** The call's text. */
QString m_sText; TQString m_sText;
}; };
/** Graph orientation values. */ /** Graph orientation values. */
enum Orientation { Portrait, Landscape }; enum Orientation { Portrait, Landscape };
void setRoot(const QString&); void setRoot(const TQString&);
GraphNode* addNode(const QString&, bool bMultiCall = false); GraphNode* addNode(const TQString&, bool bMultiCall = false);
void addCall(const CallData&); void addCall(const CallData&);
void addMultiCall(const QString&, bool); void addMultiCall(const TQString&, bool);
void draw(); void draw();
void save(FILE*); void save(FILE*);
void save(const QString&); void save(const TQString&);
void zoom(bool); void zoom(bool);
void setZoom(double); void setZoom(double);
void rotate(); void rotate();
QString getTip(const QPoint&, QRect&); TQString getTip(const TQPoint&, TQRect&);
void resize(int, int); void resize(int, int);
void drawNode(const QString&, const QRect&); void drawNode(const TQString&, const TQRect&);
void drawEdge(const QString&, const QString&, const QPointArray&); void drawEdge(const TQString&, const TQString&, const TQPointArray&);
/** /**
* Adjusts the maximal number of calling/called functions shown for * Adjusts the maximal number of calling/called functions shown for
@ -127,16 +127,16 @@ signals:
* @param sPath The full path of the file to show * @param sPath The full path of the file to show
* @param nLine The line number in this file * @param nLine The line number in this file
*/ */
void lineRequested(const QString& sPath, uint nLine); void lineRequested(const TQString& sPath, uint nLine);
protected: protected:
virtual void drawContents(QPainter*, int, int, int, int); virtual void drawContents(TQPainter*, int, int, int, int);
virtual void contentsMousePressEvent(QMouseEvent*); virtual void contentsMousePressEvent(TQMouseEvent*);
private: private:
/** The graph is stored as a map of nodes indexed by their names. /** The graph is stored as a map of nodes indexed by their names.
Each node holds a list of outgoing edges. */ Each node holds a list of outgoing edges. */
QDict<GraphNode> m_dictNodes; TQDict<GraphNode> m_dictNodes;
/** A Cscope process to use for running queries. */ /** A Cscope process to use for running queries. */
CscopeFrontend* m_pCscope; CscopeFrontend* m_pCscope;
@ -149,23 +149,23 @@ private:
/** Remembers the function the was last queried for calling/called /** Remembers the function the was last queried for calling/called
functions. */ functions. */
QString m_sQueriedFunc; TQString m_sQueriedFunc;
/** Remembers whether the last query was for calling or called /** Remembers whether the last query was for calling or called
functions. */ functions. */
bool m_bCalled; bool m_bCalled;
/** The node over which the popup menu has been invoked. */ /** The node over which the popup menu has been invoked. */
QCanvasPolygonalItem* m_pMenuItem; TQCanvasPolygonalItem* m_pMenuItem;
/** A popup menu that appears when a node is right-clicked. */ /** A popup menu that appears when a node is right-clicked. */
QPopupMenu* m_pNodePopup; TQPopupMenu* m_pNodePopup;
/** A popup menu that appears when a node is right-clicked. */ /** A popup menu that appears when a node is right-clicked. */
QPopupMenu* m_pMultiCallPopup; TQPopupMenu* m_pMultiCallPopup;
/** A popup menu that appears when an edge is right-clicked. */ /** A popup menu that appears when an edge is right-clicked. */
QPopupMenu* m_pEdgePopup; TQPopupMenu* m_pEdgePopup;
/** The zoom factor for the graph. */ /** The zoom factor for the graph. */
double m_dZoom; double m_dZoom;
@ -181,16 +181,16 @@ private:
uint m_nMultiCallNum; uint m_nMultiCallNum;
/** Holds the path of the temporary dot file used for drawing the graph. */ /** Holds the path of the temporary dot file used for drawing the graph. */
QString m_sDrawFilePath; TQString m_sDrawFilePath;
/** Allows lengthy drawing operations to be cancelled. */ /** Allows lengthy drawing operations to be cancelled. */
ProgressDlg* m_pProgressDlg; ProgressDlg* m_pProgressDlg;
void write(QTextStream&, const QString&, const QString&, bool); void write(TQTextStream&, const TQString&, const TQString&, bool);
void removeEdges(GraphNode*, bool); void removeEdges(GraphNode*, bool);
void removeDisconnected(GraphNode*); void removeDisconnected(GraphNode*);
void showNodeMenu(GraphNode*, const QPoint&); void showNodeMenu(GraphNode*, const TQPoint&);
void showEdgeMenu(GraphEdge*, const QPoint&); void showEdgeMenu(GraphEdge*, const TQPoint&);
private slots: private slots:
void slotDotFinished(); void slotDotFinished();

@ -36,14 +36,14 @@ int HistoryPage::s_nMaxPageID = 0;
* @param pParent The parent widget * @param pParent The parent widget
* @param szName The widget's name * @param szName The widget's name
*/ */
HistoryPage::HistoryPage(QWidget* pParent, const char* szName) : HistoryPage::HistoryPage(TQWidget* pParent, const char* szName) :
QueryPageBase(pParent, szName), QueryPageBase(pParent, szName),
m_nPageID(++s_nMaxPageID) m_nPageID(++s_nMaxPageID)
{ {
m_pView = new HistoryView(this); m_pView = new HistoryView(this);
connect(m_pView, SIGNAL(lineRequested(const QString&, uint)), this, connect(m_pView, SIGNAL(lineRequested(const TQString&, uint)), this,
SIGNAL(lineRequested(const QString&, uint))); SIGNAL(lineRequested(const TQString&, uint)));
// Set colours and font // Set colours and font
applyPrefs(); applyPrefs();
@ -64,8 +64,8 @@ HistoryPage::~HistoryPage()
* @param nLine The line number * @param nLine The line number
* @param sText The text of the file at the given line * @param sText The text of the file at the given line
*/ */
void HistoryPage::addRecord(const QString& sFile, uint nLine, void HistoryPage::addRecord(const TQString& sFile, uint nLine,
const QString& sText) const TQString& sText)
{ {
HistoryItem* pItem, * pNextItem; HistoryItem* pItem, * pNextItem;
@ -86,7 +86,7 @@ void HistoryPage::addRecord(const QString& sFile, uint nLine,
} }
// Create the new item at the top of the list // Create the new item at the top of the list
m_pView->addRecord("", sFile, QString::number(nLine), sText, NULL); m_pView->addRecord("", sFile, TQString::number(nLine), sText, NULL);
} }
/** /**
@ -96,8 +96,8 @@ void HistoryPage::addRecord(const QString& sFile, uint nLine,
* @param sLine The line number * @param sLine The line number
* @param sText The contents of the line * @param sText The contents of the line
*/ */
void HistoryPage::addRecord(const QString&, const QString& sFile, void HistoryPage::addRecord(const TQString&, const TQString& sFile,
const QString& sLine, const QString& sText) const TQString& sLine, const TQString& sText)
{ {
m_pView->addRecord("", sFile, sLine, sText, NULL); m_pView->addRecord("", sFile, sLine, sText, NULL);
} }
@ -106,19 +106,19 @@ void HistoryPage::addRecord(const QString&, const QString& sFile,
* Creates a tab caption for this page, based on the unique page ID. * Creates a tab caption for this page, based on the unique page ID.
* @param bBrief true to use brief caption names, false otherwise * @param bBrief true to use brief caption names, false otherwise
*/ */
QString HistoryPage::getCaption(bool bBrief) const TQString HistoryPage::getCaption(bool bBrief) const
{ {
return (bBrief ? QString(i18n("HIS ")) : QString(i18n("History "))) + return (bBrief ? TQString(i18n("HIS ")) : TQString(i18n("History "))) +
QString::number(m_nPageID); TQString::number(m_nPageID);
} }
/** /**
* Creates a unique file name for saving the contents of the history page. * Creates a unique file name for saving the contents of the history page.
* @return The unique file name to use * @return The unique file name to use
*/ */
QString HistoryPage::getFileName(const QString&) const TQString HistoryPage::getFileName(const TQString&) const
{ {
return QString("History_") + QString::number(m_nPageID); return TQString("History_") + TQString::number(m_nPageID);
} }
#include "historypage.moc" #include "historypage.moc"

@ -39,27 +39,27 @@ class HistoryPage : public QueryPageBase
Q_OBJECT Q_OBJECT
public: public:
HistoryPage(QWidget* pParent = 0, const char* szName = 0); HistoryPage(TQWidget* pParent = 0, const char* szName = 0);
~HistoryPage(); ~HistoryPage();
void addRecord(const QString&, uint, const QString&); void addRecord(const TQString&, uint, const TQString&);
virtual QString getCaption(bool bBrief = false) const; virtual TQString getCaption(bool bBrief = false) const;
protected: protected:
virtual void addRecord(const QString&, const QString&, const QString&, virtual void addRecord(const TQString&, const TQString&, const TQString&,
const QString&); const TQString&);
virtual QString getFileName(const QString&) const; virtual TQString getFileName(const TQString&) const;
/** /**
* @return Always true, since History files do not contain a header * @return Always true, since History files do not contain a header
*/ */
virtual bool readHeader(QTextStream&) { return true; } virtual bool readHeader(TQTextStream&) { return true; }
/** /**
* This method does nothing, since History files do not contain a header. * This method does nothing, since History files do not contain a header.
*/ */
virtual void writeHeader(QTextStream&) {} virtual void writeHeader(TQTextStream&) {}
private: private:
/** A unique ID used to create a tab caption for this page. */ /** A unique ID used to create a tab caption for this page. */

@ -32,14 +32,14 @@
* @param pParent The parent widget * @param pParent The parent widget
* @param szName The widget's name * @param szName The widget's name
*/ */
HistoryView::HistoryView(QWidget* pParent, const char* szName) : HistoryView::HistoryView(TQWidget* pParent, const char* szName) :
QueryView(pParent, szName) QueryView(pParent, szName)
{ {
// Disable sorting // Disable sorting
setSortColumn(-1); setSortColumn(-1);
// Don't show the "Function" column // Don't show the "Function" column
setColumnWidthMode(0, QListView::Manual); setColumnWidthMode(0, TQListView::Manual);
setColumnWidth(0, 0); setColumnWidth(0, 0);
} }
@ -57,8 +57,8 @@ HistoryView::~HistoryView()
* @param sLine The line number in the above file * @param sLine The line number in the above file
* @param sText The line's text * @param sText The line's text
*/ */
void HistoryView::addRecord(const QString& /* sFunc */, const QString& sFile, void HistoryView::addRecord(const TQString& /* sFunc */, const TQString& sFile,
const QString& sLine, const QString& sText, QListViewItem*) const TQString& sLine, const TQString& sText, TQListViewItem*)
{ {
HistoryItem* pItem; HistoryItem* pItem;
@ -73,7 +73,7 @@ void HistoryView::addRecord(const QString& /* sFunc */, const QString& sFile,
*/ */
void HistoryView::selectPrev() void HistoryView::selectPrev()
{ {
QListViewItem* pItem; TQListViewItem* pItem;
// Get the current item // Get the current item
pItem = currentItem(); pItem = currentItem();
@ -110,7 +110,7 @@ void HistoryView::selectNext()
* object. * object.
* @param pItem The item to remove * @param pItem The item to remove
*/ */
void HistoryView::slotRemoveItem(QListViewItem* pItem) void HistoryView::slotRemoveItem(TQListViewItem* pItem)
{ {
HistoryItem* pCurItem, * pNextItem; HistoryItem* pCurItem, * pNextItem;

@ -32,14 +32,14 @@
/** /**
* A list view item for holding position history records. * A list view item for holding position history records.
* A QListViewItem cannot reference its preceding item, which is required to * A TQListViewItem cannot reference its preceding item, which is required to
* create a stack-like history list. Therefore a HistoryItem object * create a stack-like history list. Therefore a HistoryItem object
* stores a pointer to the item just above it in the list. The pointer is * stores a pointer to the item just above it in the list. The pointer is
* persistent, since the list cannot be sorted. * persistent, since the list cannot be sorted.
* @author Elad Lahav * @author Elad Lahav
*/ */
class HistoryItem : public QListViewItem class HistoryItem : public TQListViewItem
{ {
public: public:
/** /**
@ -49,9 +49,9 @@ public:
* @param sLine The line number * @param sLine The line number
* @param sText The contents of the line in the given file * @param sText The contents of the line in the given file
*/ */
HistoryItem(QListView* pList, QString sFile, QString sLine, HistoryItem(TQListView* pList, TQString sFile, TQString sLine,
QString sText) : TQString sText) :
QListViewItem(pList, "", sFile, sLine, sText), TQListViewItem(pList, "", sFile, sLine, sText),
m_pPrevSibling(NULL) { m_pPrevSibling(NULL) {
HistoryItem* pNext; HistoryItem* pNext;
@ -76,16 +76,16 @@ class HistoryView : public QueryView
{ {
Q_OBJECT Q_OBJECT
public: public:
HistoryView(QWidget* pParent = 0, const char* szName = 0); HistoryView(TQWidget* pParent = 0, const char* szName = 0);
~HistoryView(); ~HistoryView();
virtual void addRecord(const QString&, const QString&, const QString&, virtual void addRecord(const TQString&, const TQString&, const TQString&,
const QString&, QListViewItem*); const TQString&, TQListViewItem*);
virtual void selectNext(); virtual void selectNext();
virtual void selectPrev(); virtual void selectPrev();
protected slots: protected slots:
virtual void slotRemoveItem(QListViewItem*); virtual void slotRemoveItem(TQListViewItem*);
}; };
#endif #endif

@ -25,7 +25,7 @@
* *
***************************************************************************/ ***************************************************************************/
#include <qfile.h> #include <ntqfile.h>
#include <kfiledialog.h> #include <kfiledialog.h>
#include <kmenubar.h> #include <kmenubar.h>
#include <klocale.h> #include <klocale.h>
@ -71,7 +71,7 @@
* @param pParent The parent widget * @param pParent The parent widget
* @param szName The widget's name * @param szName The widget's name
*/ */
KScope::KScope(QWidget* pParent, const char* szName) : KScope::KScope(TQWidget* pParent, const char* szName) :
KParts::DockMainWindow(pParent, szName), KParts::DockMainWindow(pParent, szName),
m_pCscopeBuild(NULL), m_pCscopeBuild(NULL),
m_sCurFilePath(""), m_sCurFilePath(""),
@ -82,7 +82,7 @@ KScope::KScope(QWidget* pParent, const char* szName) :
m_bRebuildDB(false), m_bRebuildDB(false),
m_pMakeDlg(NULL) m_pMakeDlg(NULL)
{ {
QString sPath; TQString sPath;
// Load configuration // Load configuration
Config().load(); Config().load();
@ -93,8 +93,8 @@ KScope::KScope(QWidget* pParent, const char* szName) :
m_pFileView = new FileView(this); m_pFileView = new FileView(this);
m_pFileList = m_pFileView->getFileList(); m_pFileList = m_pFileView->getFileList();
m_pMsgDlg = new CscopeMsgDlg(this); m_pMsgDlg = new CscopeMsgDlg(this);
m_pQueryDock = createDockWidget("Query Window", QPixmap()); m_pQueryDock = createDockWidget("Query Window", TQPixmap());
m_pFileViewDock = createDockWidget("File List Window", QPixmap()); m_pFileViewDock = createDockWidget("File List Window", TQPixmap());
// Connect menu and toolbar items with the object's slots // Connect menu and toolbar items with the object's slots
m_pActions = new KScopeActions(this); m_pActions = new KScopeActions(this);
@ -121,23 +121,23 @@ KScope::KScope(QWidget* pParent, const char* szName) :
// Open a file for editing when selected in the project's file list or the // Open a file for editing when selected in the project's file list or the
// file tree // file tree
connect(m_pFileView, SIGNAL(fileRequested(const QString&, uint)), this, connect(m_pFileView, SIGNAL(fileRequested(const TQString&, uint)), this,
SLOT(slotShowEditor(const QString&, uint))); SLOT(slotShowEditor(const TQString&, uint)));
// Delete an editor page object after it is removed // Delete an editor page object after it is removed
connect(m_pEditTabs, SIGNAL(editorRemoved(EditorPage*)), connect(m_pEditTabs, SIGNAL(editorRemoved(EditorPage*)),
this, SLOT(slotDeleteEditor(EditorPage*))); this, SLOT(slotDeleteEditor(EditorPage*)));
connect(m_pEditTabs, SIGNAL(filesDropped(QDropEvent*)), this, connect(m_pEditTabs, SIGNAL(filesDropped(TQDropEvent*)), this,
SLOT(slotDropEvent(QDropEvent*))); SLOT(slotDropEvent(TQDropEvent*)));
// Set an editor as the active part whenever its owner tab is selected // Set an editor as the active part whenever its owner tab is selected
connect(m_pEditTabs, SIGNAL(editorChanged(EditorPage*, EditorPage*)), connect(m_pEditTabs, SIGNAL(editorChanged(EditorPage*, EditorPage*)),
this, SLOT(slotChangeEditor(EditorPage*, EditorPage*))); this, SLOT(slotChangeEditor(EditorPage*, EditorPage*)));
// Display a file at a specific line when selected in a query list // Display a file at a specific line when selected in a query list
connect(m_pQueryWidget, SIGNAL(lineRequested(const QString&, uint)), connect(m_pQueryWidget, SIGNAL(lineRequested(const TQString&, uint)),
this, SLOT(slotQueryShowEditor(const QString&, uint))); this, SLOT(slotQueryShowEditor(const TQString&, uint)));
// Display the symbol dialogue when the user opens a new query page // Display the symbol dialogue when the user opens a new query page
connect(m_pQueryWidget, SIGNAL(newQuery()), connect(m_pQueryWidget, SIGNAL(newQuery()),
@ -148,8 +148,8 @@ KScope::KScope(QWidget* pParent, const char* szName) :
connect(&m_timerRebuild, SIGNAL(timeout()), this, SLOT(slotRebuildDB())); connect(&m_timerRebuild, SIGNAL(timeout()), this, SLOT(slotRebuildDB()));
// Display a file at a specific line when selected in a call tree dialogue // Display a file at a specific line when selected in a call tree dialogue
connect(m_pCallTreeMgr, SIGNAL(lineRequested(const QString&, uint)), connect(m_pCallTreeMgr, SIGNAL(lineRequested(const TQString&, uint)),
this, SLOT(slotQueryShowEditor(const QString&, uint))); this, SLOT(slotQueryShowEditor(const TQString&, uint)));
// Store main window settings when closed // Store main window settings when closed
setAutoSaveSettings(); setAutoSaveSettings();
@ -203,14 +203,14 @@ void KScope::initMainWindow()
{ {
KStatusBar* pStatus; KStatusBar* pStatus;
KDockWidget* pMainDock; KDockWidget* pMainDock;
QPopupMenu* pPopup; TQPopupMenu* pPopup;
// Create the status bar // Create the status bar
pStatus = statusBar(); pStatus = statusBar();
pStatus->insertItem(i18n(" Line: N/A Col: N/A "), 0, 0, true); pStatus->insertItem(i18n(" Line: N/A Col: N/A "), 0, 0, true);
// Create the main dock for the editor tabs widget // Create the main dock for the editor tabs widget
pMainDock = createDockWidget("Editors Window", QPixmap()); pMainDock = createDockWidget("Editors Window", TQPixmap());
pMainDock->setWidget(m_pEditTabs); pMainDock->setWidget(m_pEditTabs);
pMainDock->setDockSite(KDockWidget::DockCorner); pMainDock->setDockSite(KDockWidget::DockCorner);
setMainDockWidget(pMainDock); setMainDockWidget(pMainDock);
@ -236,11 +236,11 @@ void KScope::initMainWindow()
SLOT(slotFileViewDockClosed())); SLOT(slotFileViewDockClosed()));
// Associate the "Window" menu with the editor tabs widdget // Associate the "Window" menu with the editor tabs widdget
pPopup = (QPopupMenu*)factory()->container("window", this); pPopup = (TQPopupMenu*)factory()->container("window", this);
m_pEditTabs->setWindowMenu(pPopup); m_pEditTabs->setWindowMenu(pPopup);
// Associate the "Query" popup menu with the query widget // Associate the "Query" popup menu with the query widget
pPopup = (QPopupMenu*)factory()->container("query_popup", this); pPopup = (TQPopupMenu*)factory()->container("query_popup", this);
m_pQueryWidget->setPageMenu(pPopup, m_pActions->getLockAction()); m_pQueryWidget->setPageMenu(pPopup, m_pActions->getLockAction());
// Restore dock configuration // Restore dock configuration
@ -284,7 +284,7 @@ void KScope::slotCreateProject()
{ {
NewProjectDlg dlg(true, this); NewProjectDlg dlg(true, this);
ProjectBase::Options opt; ProjectBase::Options opt;
QString sProjPath; TQString sProjPath;
// Prompt the user to close any active projects // Prompt the user to close any active projects
if (m_pProjMgr->curProject()) { if (m_pProjMgr->curProject()) {
@ -301,7 +301,7 @@ void KScope::slotCreateProject()
} }
// Display the "New Project" dialog // Display the "New Project" dialog
if (dlg.exec() != QDialog::Accepted) if (dlg.exec() != TQDialog::Accepted)
return; return;
// Create and open the new project // Create and open the new project
@ -318,15 +318,15 @@ void KScope::slotCreateProject()
void KScope::slotOpenProject() void KScope::slotOpenProject()
{ {
OpenProjectDlg dlg; OpenProjectDlg dlg;
QString sPath; TQString sPath;
if (dlg.exec() == QDialog::Rejected) if (dlg.exec() == TQDialog::Rejected)
return; return;
sPath = dlg.getPath(); sPath = dlg.getPath();
// Check if the path refers to a permanent or temporary project // Check if the path refers to a permanent or temporary project
if (QFileInfo(sPath).isDir()) if (TQFileInfo(sPath).isDir())
openProject(sPath); openProject(sPath);
else else
openCscopeOut(sPath); openCscopeOut(sPath);
@ -355,7 +355,7 @@ void KScope::slotProjectFiles()
// Display the files dialog // Display the files dialog
ProjectFilesDlg dlg((Project*)pProj, this); ProjectFilesDlg dlg((Project*)pProj, this);
if (dlg.exec() != QDialog::Accepted) if (dlg.exec() != TQDialog::Accepted)
return; return;
// Update the project's file list // Update the project's file list
@ -392,7 +392,7 @@ void KScope::slotProjectProps()
dlg.setProperties(pProj->getName(), pProj->getPath(), opt); dlg.setProperties(pProj->getName(), pProj->getPath(), opt);
// Display the properties dialog // Display the properties dialog
if (dlg.exec() != QDialog::Accepted) if (dlg.exec() != TQDialog::Accepted)
return; return;
// Set new properties // Set new properties
@ -420,7 +420,7 @@ void KScope::slotProjectProps()
*/ */
void KScope::slotProjectCscopeOut() void KScope::slotProjectCscopeOut()
{ {
QString sFilePath; TQString sFilePath;
// Prompt for a Cscope.out file // Prompt for a Cscope.out file
sFilePath = KFileDialog::getOpenFileName(); sFilePath = KFileDialog::getOpenFileName();
@ -520,7 +520,7 @@ void KScope::slotQueryIncluding()
*/ */
void KScope::slotQueryQuickDef() void KScope::slotQueryQuickDef()
{ {
QString sSymbol; TQString sSymbol;
QueryViewDlg* pDlg; QueryViewDlg* pDlg;
uint nType; uint nType;
bool bCase; bool bCase;
@ -534,8 +534,8 @@ void KScope::slotQueryQuickDef()
pDlg = new QueryViewDlg(QueryViewDlg::DestroyOnSelect, this); pDlg = new QueryViewDlg(QueryViewDlg::DestroyOnSelect, this);
// Display a line when it is selected in the dialogue // Display a line when it is selected in the dialogue
connect(pDlg, SIGNAL(lineRequested(const QString&, uint)), this, connect(pDlg, SIGNAL(lineRequested(const TQString&, uint)), this,
SLOT(slotShowEditor(const QString&, uint))); SLOT(slotShowEditor(const TQString&, uint)));
// Start the query // Start the query
pDlg->query(nType, sSymbol); pDlg->query(nType, sSymbol);
@ -596,7 +596,7 @@ void KScope::slotConfigure()
connect(&dlg, SIGNAL(applyPref()), this, SLOT(slotApplyPref())); connect(&dlg, SIGNAL(applyPref()), this, SLOT(slotApplyPref()));
// Show the dialog // Show the dialog
if (dlg.exec() == QDialog::Accepted) { if (dlg.exec() == TQDialog::Accepted) {
// Verify Cscope's installation // Verify Cscope's installation
verifyCscope(); verifyCscope();
} }
@ -610,7 +610,7 @@ void KScope::slotConfigure()
*/ */
void KScope::slotProjectFilesChanged() void KScope::slotProjectFilesChanged()
{ {
QStringList slArgs; TQStringList slArgs;
// Refresh the file list // Refresh the file list
m_pFileList->setUpdatesEnabled(false); m_pFileList->setUpdatesEnabled(false);
@ -630,9 +630,9 @@ void KScope::slotProjectFilesChanged()
* file list, and the project's database is rebuilt. * file list, and the project's database is rebuilt.
* @param slFiles The list of file paths added to the project * @param slFiles The list of file paths added to the project
*/ */
void KScope::slotFilesAdded(const QStringList& slFiles) void KScope::slotFilesAdded(const TQStringList& slFiles)
{ {
QStringList::const_iterator itr; TQStringList::const_iterator itr;
// Add the file paths to the project's file list // Add the file paths to the project's file list
for (itr = slFiles.begin(); itr != slFiles.end(); ++itr) for (itr = slFiles.begin(); itr != slFiles.end(); ++itr)
@ -651,7 +651,7 @@ void KScope::slotFilesAdded(const QStringList& slFiles)
*/ */
void KScope::slotQuery(uint nType, bool bPrompt) void KScope::slotQuery(uint nType, bool bPrompt)
{ {
QString sSymbol; TQString sSymbol;
CallTreeDlg* pCallTreeDlg; CallTreeDlg* pCallTreeDlg;
bool bCase; bool bCase;
@ -680,13 +680,13 @@ void KScope::slotQuery(uint nType, bool bPrompt)
* If another project is currently active, it is closed first. * If another project is currently active, it is closed first.
* @param sDir The directory of the project to open. * @param sDir The directory of the project to open.
*/ */
void KScope::openProject(const QString& sDir) void KScope::openProject(const TQString& sDir)
{ {
QString sProjDir; TQString sProjDir;
ProjectBase* pProj; ProjectBase* pProj;
QStringList slQueryFiles; TQStringList slQueryFiles;
QStringList slCallTreeFiles; TQStringList slCallTreeFiles;
QStringList slArgs; TQStringList slArgs;
ProjectBase::Options opt; ProjectBase::Options opt;
// Close the current project (may return false if the user clicks on the // Close the current project (may return false if the user clicks on the
@ -695,7 +695,7 @@ void KScope::openProject(const QString& sDir)
return; return;
// Open the project in the project manager // Open the project in the project manager
sProjDir = QDir::cleanDirPath(sDir); sProjDir = TQDir::cleanDirPath(sDir);
if (!m_pProjMgr->open(sProjDir)) if (!m_pProjMgr->open(sProjDir))
return; return;
@ -754,7 +754,7 @@ void KScope::openProject(const QString& sDir)
* @param sFilePath The full path of the Cscope.out file * @param sFilePath The full path of the Cscope.out file
* @return true if successful, false otherwise * @return true if successful, false otherwise
*/ */
bool KScope::openCscopeOut(const QString& sFilePath) bool KScope::openCscopeOut(const TQString& sFilePath)
{ {
ProjectBase* pProj; ProjectBase* pProj;
@ -798,8 +798,8 @@ bool KScope::openCscopeOut(const QString& sFilePath)
*/ */
void KScope::openLastProject() void KScope::openLastProject()
{ {
const QStringList slProjects = Config().getRecentProjects(); const TQStringList slProjects = Config().getRecentProjects();
QString sPath; TQString sPath;
if (slProjects.empty()) if (slProjects.empty())
return; return;
@ -808,7 +808,7 @@ void KScope::openLastProject()
sPath = *slProjects.begin(); sPath = *slProjects.begin();
// Check if the path refers to a temporary project // Check if the path refers to a temporary project
if (!QFileInfo(sPath).isDir()) { if (!TQFileInfo(sPath).isDir()) {
openCscopeOut(sPath); openCscopeOut(sPath);
return; return;
} }
@ -846,7 +846,7 @@ void KScope::restoreSession()
for (pLoc = sess.fllOpenFiles.first(); pLoc != NULL; for (pLoc = sess.fllOpenFiles.first(); pLoc != NULL;
pLoc = sess.fllOpenFiles.next()) { pLoc = sess.fllOpenFiles.next()) {
if (QFile::exists(pLoc->m_sPath)) { if (TQFile::exists(pLoc->m_sPath)) {
pPage = addEditor(pLoc->m_sPath); pPage = addEditor(pLoc->m_sPath);
pPage->setCursorPos(pLoc->m_nLine, pLoc->m_nCol); pPage->setCursorPos(pLoc->m_nLine, pLoc->m_nCol);
} }
@ -901,8 +901,8 @@ void KScope::toggleQueryWindow(bool bShow)
*/ */
void KScope::parseCmdLine(KCmdLineArgs* pArgs) void KScope::parseCmdLine(KCmdLineArgs* pArgs)
{ {
QString sArg; TQString sArg;
QFileInfo fi; TQFileInfo fi;
int i; int i;
// Loop over all arguments // Loop over all arguments
@ -981,8 +981,8 @@ void KScope::initCscope()
SLOT(slotBuildAborted())); SLOT(slotBuildAborted()));
// Show errors in a modeless dialogue // Show errors in a modeless dialogue
connect(m_pCscopeBuild, SIGNAL(error(const QString&)), this, connect(m_pCscopeBuild, SIGNAL(error(const TQString&)), this,
SLOT(slotCscopeError(const QString&))); SLOT(slotCscopeError(const TQString&)));
} }
/** /**
@ -1052,7 +1052,7 @@ bool KScope::slotCloseProject()
m_pProjMgr->close(); m_pProjMgr->close();
delete m_pCscopeBuild; delete m_pCscopeBuild;
m_pCscopeBuild = NULL; m_pCscopeBuild = NULL;
setCaption(QString::null); setCaption(TQString::null);
// Clear the contents of the file list // Clear the contents of the file list
m_pFileView->clear(); m_pFileView->clear();
@ -1072,13 +1072,13 @@ bool KScope::slotCloseProject()
*/ */
void KScope::slotExtEdit() void KScope::slotExtEdit()
{ {
QString sCmdLine; TQString sCmdLine;
KProcess proc; KProcess proc;
// Create the command line for the external editor // Create the command line for the external editor
sCmdLine = Config().getExtEditor(); sCmdLine = Config().getExtEditor();
sCmdLine.replace("%F", m_sCurFilePath); sCmdLine.replace("%F", m_sCurFilePath);
sCmdLine.replace("%L", QString::number(m_nCurLine)); sCmdLine.replace("%L", TQString::number(m_nCurLine));
// Run the external editor // Run the external editor
proc.setUseShell(true); proc.setUseShell(true);
@ -1161,7 +1161,7 @@ void KScope::slotCscopeVerified(bool bResult, uint nArgs)
*/ */
void KScope::slotProjectMake() void KScope::slotProjectMake()
{ {
QString sCmd, sDir; TQString sCmd, sDir;
// Create the make dialogue, if it does not exist // Create the make dialogue, if it does not exist
if (m_pMakeDlg == NULL) { if (m_pMakeDlg == NULL) {
@ -1174,8 +1174,8 @@ void KScope::slotProjectMake()
m_pMakeDlg->setDir(sDir); m_pMakeDlg->setDir(sDir);
// Show the relevant source location when an error link is clicked // Show the relevant source location when an error link is clicked
connect(m_pMakeDlg, SIGNAL(fileRequested(const QString&, uint)), this, connect(m_pMakeDlg, SIGNAL(fileRequested(const TQString&, uint)), this,
SLOT(slotShowEditor(const QString&, uint))); SLOT(slotShowEditor(const TQString&, uint)));
// Show the dialogue // Show the dialogue
m_pMakeDlg->show(); m_pMakeDlg->show();
@ -1212,14 +1212,14 @@ void KScope::slotProjectRemake()
void KScope::slotShowBookmarks() void KScope::slotShowBookmarks()
{ {
BookmarksDlg dlg; BookmarksDlg dlg;
QString sPath; TQString sPath;
uint nLine; uint nLine;
// Load the bookmark list // Load the bookmark list
m_pEditTabs->showBookmarks(dlg.getView()); m_pEditTabs->showBookmarks(dlg.getView());
// Show the dialogue // Show the dialogue
if (dlg.exec() != QDialog::Accepted) if (dlg.exec() != TQDialog::Accepted)
return; return;
// Go to the selected bookmark // Go to the selected bookmark
@ -1239,11 +1239,11 @@ void KScope::slotShowBookmarks()
* determined automatically * determined automatically
* @return true if the user hs enetered a symbol, false otherwise * @return true if the user hs enetered a symbol, false otherwise
*/ */
bool KScope::getSymbol(uint& nType, QString& sSymbol, bool& bCase, bool KScope::getSymbol(uint& nType, TQString& sSymbol, bool& bCase,
bool bPrompt) bool bPrompt)
{ {
EditorPage* pPage; EditorPage* pPage;
QString sSuggested; TQString sSuggested;
// Set the currently selected text, if any // Set the currently selected text, if any
if ((pPage = m_pEditTabs->getCurrentPage()) != NULL) if ((pPage = m_pEditTabs->getCurrentPage()) != NULL)
@ -1272,10 +1272,10 @@ bool KScope::getSymbol(uint& nType, QString& sSymbol, bool& bCase,
* @param sFilePath The path of the file to open * @param sFilePath The path of the file to open
* @return A pointer to the found or newly created editor page * @return A pointer to the found or newly created editor page
*/ */
EditorPage* KScope::addEditor(const QString& sFilePath) EditorPage* KScope::addEditor(const TQString& sFilePath)
{ {
EditorPage* pPage; EditorPage* pPage;
QString sAbsFilePath; TQString sAbsFilePath;
ProjectBase* pProj; ProjectBase* pProj;
// If the file name is given using a relative path, we need to convert // If the file name is given using a relative path, we need to convert
@ -1283,11 +1283,11 @@ EditorPage* KScope::addEditor(const QString& sFilePath)
// TODO: Project needs a translatePath() method // TODO: Project needs a translatePath() method
pProj = m_pProjMgr->curProject(); pProj = m_pProjMgr->curProject();
if (sFilePath[0] != '/' && pProj) { if (sFilePath[0] != '/' && pProj) {
sAbsFilePath = QDir::cleanDirPath(pProj->getSourceRoot() + "/" + sAbsFilePath = TQDir::cleanDirPath(pProj->getSourceRoot() + "/" +
sFilePath); sFilePath);
} }
else { else {
sAbsFilePath = QDir::cleanDirPath(sFilePath); sAbsFilePath = TQDir::cleanDirPath(sFilePath);
} }
// Do not open a new editor if one exists for this file // Do not open a new editor if one exists for this file
@ -1312,7 +1312,7 @@ EditorPage* KScope::createEditorPage()
{ {
KTextEditor::Document* pDoc; KTextEditor::Document* pDoc;
EditorPage* pPage; EditorPage* pPage;
QPopupMenu* pMenu; TQPopupMenu* pMenu;
ProjectBase* pProj; ProjectBase* pProj;
// Load a new document part // Load a new document part
@ -1321,26 +1321,26 @@ EditorPage* KScope::createEditorPage()
return NULL; return NULL;
// Create the new editor page // Create the new editor page
pMenu = (QPopupMenu*)factory()->container(Config().getEditorPopupName(), pMenu = (TQPopupMenu*)factory()->container(Config().getEditorPopupName(),
this); this);
pPage = new EditorPage(pDoc, pMenu, m_pEditTabs); pPage = new EditorPage(pDoc, pMenu, m_pEditTabs);
m_pEditTabs->addEditorPage(pPage); m_pEditTabs->addEditorPage(pPage);
// Show the file's path in the main title // Show the file's path in the main title
connect(pPage, SIGNAL(fileOpened(EditorPage*, const QString&)), this, connect(pPage, SIGNAL(fileOpened(EditorPage*, const TQString&)), this,
SLOT(slotFileOpened(EditorPage*, const QString&))); SLOT(slotFileOpened(EditorPage*, const TQString&)));
// Show cursor position in the status bar // Show cursor position in the status bar
connect(pPage, SIGNAL(cursorPosChanged(uint, uint)), this, connect(pPage, SIGNAL(cursorPosChanged(uint, uint)), this,
SLOT(slotShowCursorPos(uint, uint))); SLOT(slotShowCursorPos(uint, uint)));
// Rebuild the database after a file has changed // Rebuild the database after a file has changed
connect(pPage, SIGNAL(fileSaved(const QString&, bool)), this, connect(pPage, SIGNAL(fileSaved(const TQString&, bool)), this,
SLOT(slotFileSaved(const QString&, bool))); SLOT(slotFileSaved(const TQString&, bool)));
// Handle file drops // Handle file drops
connect(pPage->getView(), SIGNAL(dropEventPass(QDropEvent*)), this, connect(pPage->getView(), SIGNAL(dropEventPass(TQDropEvent*)), this,
SLOT(slotDropEvent(QDropEvent*))); SLOT(slotDropEvent(TQDropEvent*)));
// Apply per-project configuration // Apply per-project configuration
pProj = m_pProjMgr->curProject(); pProj = m_pProjMgr->curProject();
@ -1416,7 +1416,7 @@ void KScope::slotChangeEditor(EditorPage* pOldPage, EditorPage* pNewPage)
* cursor, or 0 to maintain the cursor in its current * cursor, or 0 to maintain the cursor in its current
* position (which does not affect the position history) * position (which does not affect the position history)
*/ */
void KScope::slotShowEditor(const QString& sFilePath, uint nLine) void KScope::slotShowEditor(const TQString& sFilePath, uint nLine)
{ {
EditorPage* pPage; EditorPage* pPage;
@ -1453,7 +1453,7 @@ void KScope::slotShowEditor(const QString& sFilePath, uint nLine)
* @param sFilePath The full path of the file to open for editing * @param sFilePath The full path of the file to open for editing
* @param nLine The number of the line on which to position the cursor * @param nLine The number of the line on which to position the cursor
*/ */
void KScope::slotQueryShowEditor(const QString& sFilePath, uint nLine) void KScope::slotQueryShowEditor(const TQString& sFilePath, uint nLine)
{ {
// Hide the query window, if it was hidden before a query was initiated // Hide the query window, if it was hidden before a query was initiated
if (m_bHideQueryOnSelection) if (m_bHideQueryOnSelection)
@ -1496,13 +1496,13 @@ void KScope::slotNewFile()
void KScope::slotOpenFile() void KScope::slotOpenFile()
{ {
ProjectBase* pProj; ProjectBase* pProj;
QStringList slFiles; TQStringList slFiles;
QStringList::Iterator itr; TQStringList::Iterator itr;
// Prompt the user for the file(s) to open. // Prompt the user for the file(s) to open.
pProj = m_pProjMgr->curProject(); pProj = m_pProjMgr->curProject();
slFiles = KFileDialog::getOpenFileNames(pProj ? pProj->getSourceRoot() : slFiles = KFileDialog::getOpenFileNames(pProj ? pProj->getSourceRoot() :
QString::null); TQString::null);
// Open all selected files. // Open all selected files.
for (itr = slFiles.begin(); itr != slFiles.end(); ++itr) { for (itr = slFiles.begin(); itr != slFiles.end(); ++itr) {
@ -1537,7 +1537,7 @@ void KScope::slotCloseAllWindows()
* Cscope process. * Cscope process.
* @param sMsg The error message * @param sMsg The error message
*/ */
void KScope::slotCscopeError(const QString& sMsg) void KScope::slotCscopeError(const TQString& sMsg)
{ {
m_pMsgDlg->addText(sMsg); m_pMsgDlg->addText(sMsg);
} }
@ -1553,7 +1553,7 @@ void KScope::slotCscopeError(const QString& sMsg)
*/ */
void KScope::slotBuildProgress(int nFiles, int nTotal) void KScope::slotBuildProgress(int nFiles, int nTotal)
{ {
QString sMsg; TQString sMsg;
// Use the progress dialogue, if it exists (first time builds) // Use the progress dialogue, if it exists (first time builds)
if (m_pProgressDlg) { if (m_pProgressDlg) {
@ -1563,7 +1563,7 @@ void KScope::slotBuildProgress(int nFiles, int nTotal)
// Show progress information // Show progress information
sMsg = i18n("Rebuilding the cross reference database...") + " " + sMsg = i18n("Rebuilding the cross reference database...") + " " +
QString::number((nFiles * 100) / nTotal) + "%"; TQString::number((nFiles * 100) / nTotal) + "%";
statusBar()->message(sMsg); statusBar()->message(sMsg);
} }
@ -1654,10 +1654,10 @@ void KScope::slotApplyPref()
void KScope::slotShowCursorPos(uint nLine, uint nCol) void KScope::slotShowCursorPos(uint nLine, uint nCol)
{ {
KStatusBar* pStatus = statusBar(); KStatusBar* pStatus = statusBar();
QString sText; TQString sText;
/* Show the line and column numbers. */ /* Show the line and column numbers. */
QTextOStream(&sText) << " Line: " << nLine << " Col: " << nCol << " "; TQTextOStream(&sText) << " Line: " << nLine << " Col: " << nCol << " ";
pStatus->changeItem(sText, 0); pStatus->changeItem(sText, 0);
/* Store the current line. */ /* Store the current line. */
@ -1670,7 +1670,7 @@ void KScope::slotShowCursorPos(uint nLine, uint nCol)
* EditorPage object. * EditorPage object.
* @param sFilePath The full path of the opened file * @param sFilePath The full path of the opened file
*/ */
void KScope::slotFileOpened(EditorPage*, const QString& sFilePath) void KScope::slotFileOpened(EditorPage*, const TQString& sFilePath)
{ {
m_sCurFilePath = sFilePath; m_sCurFilePath = sFilePath;
setCaption(m_pProjMgr->getProjName() + " - " + m_sCurFilePath); setCaption(m_pProjMgr->getProjName() + " - " + m_sCurFilePath);
@ -1684,7 +1684,7 @@ void KScope::slotFileOpened(EditorPage*, const QString& sFilePath)
* @param sPath The full path of the modified file that caused this event * @param sPath The full path of the modified file that caused this event
* @param bIsNew true if this is a new file, false otherwise * @param bIsNew true if this is a new file, false otherwise
*/ */
void KScope::slotFileSaved(const QString& sPath, bool bIsNew) void KScope::slotFileSaved(const TQString& sPath, bool bIsNew)
{ {
ProjectBase* pProj; ProjectBase* pProj;
int nTime; int nTime;
@ -1741,7 +1741,7 @@ void KScope::slotFileSaved(const QString& sPath, bool bIsNew)
* Opens all files dropped over the widget. * Opens all files dropped over the widget.
* @param pEvent Pointer to an object containing the list of dropped files * @param pEvent Pointer to an object containing the list of dropped files
*/ */
void KScope::slotDropEvent(QDropEvent* pEvent) void KScope::slotDropEvent(TQDropEvent* pEvent)
{ {
KURL::List list; KURL::List list;
KURL::List::Iterator itr; KURL::List::Iterator itr;

@ -32,7 +32,7 @@
#include <config.h> #include <config.h>
#endif #endif
#include <qtimer.h> #include <ntqtimer.h>
#include <kcmdlineargs.h> #include <kcmdlineargs.h>
#include <kapp.h> #include <kapp.h>
#include <kparts/dockmainwindow.h> #include <kparts/dockmainwindow.h>
@ -73,12 +73,12 @@ class KScope : public KParts::DockMainWindow
Q_OBJECT Q_OBJECT
public: public:
KScope(QWidget* pParent = 0, const char* szName = 0); KScope(TQWidget* pParent = 0, const char* szName = 0);
~KScope(); ~KScope();
void openProject(const QString&); void openProject(const TQString&);
void openLastProject(); void openLastProject();
bool openCscopeOut(const QString&); bool openCscopeOut(const TQString&);
void parseCmdLine(KCmdLineArgs *pArgs); void parseCmdLine(KCmdLineArgs *pArgs);
void verifyCscope(); void verifyCscope();
@ -113,7 +113,7 @@ private:
CscopeFrontend* m_pCscopeBuild; CscopeFrontend* m_pCscopeBuild;
/** A timer for rebuilding the database after a file has been saved. */ /** A timer for rebuilding the database after a file has been saved. */
QTimer m_timerRebuild; TQTimer m_timerRebuild;
/** Whether the query window should be hidden after the user selects an /** Whether the query window should be hidden after the user selects an
item. */ item. */
@ -129,7 +129,7 @@ private:
CscopeMsgDlg* m_pMsgDlg; CscopeMsgDlg* m_pMsgDlg;
/** The path of the file currently being edited. */ /** The path of the file currently being edited. */
QString m_sCurFilePath; TQString m_sCurFilePath;
/** The line number of the current cursor position. */ /** The line number of the current cursor position. */
int m_nCurLine; int m_nCurLine;
@ -168,8 +168,8 @@ private:
void initMainWindow(); void initMainWindow();
void initCscope(); void initCscope();
bool getSymbol(uint&, QString&, bool&, bool bPrompt = true); bool getSymbol(uint&, TQString&, bool&, bool bPrompt = true);
EditorPage* addEditor(const QString&s); EditorPage* addEditor(const TQString&s);
EditorPage* createEditorPage(); EditorPage* createEditorPage();
inline bool isAutoRebuildEnabled(); inline bool isAutoRebuildEnabled();
void restoreSession(); void restoreSession();
@ -213,22 +213,22 @@ private slots:
// Other slots // Other slots
void slotProjectFilesChanged(); void slotProjectFilesChanged();
void slotFilesAdded(const QStringList&); void slotFilesAdded(const TQStringList&);
void slotQuery(uint, bool); void slotQuery(uint, bool);
void slotDeleteEditor(EditorPage*); void slotDeleteEditor(EditorPage*);
void slotChangeEditor(EditorPage*, EditorPage*); void slotChangeEditor(EditorPage*, EditorPage*);
void slotShowEditor(const QString&, uint); void slotShowEditor(const TQString&, uint);
void slotFileOpened(EditorPage*, const QString&); void slotFileOpened(EditorPage*, const TQString&);
void slotFileSaved(const QString&, bool); void slotFileSaved(const TQString&, bool);
void slotCscopeError(const QString&); void slotCscopeError(const TQString&);
void slotBuildProgress(int, int); void slotBuildProgress(int, int);
void slotBuildInvIndex(); void slotBuildInvIndex();
void slotBuildFinished(uint); void slotBuildFinished(uint);
void slotBuildAborted(); void slotBuildAborted();
void slotApplyPref(); void slotApplyPref();
void slotShowCursorPos(uint, uint); void slotShowCursorPos(uint, uint);
void slotQueryShowEditor(const QString&, uint); void slotQueryShowEditor(const TQString&, uint);
void slotDropEvent(QDropEvent*); void slotDropEvent(TQDropEvent*);
void slotCscopeVerified(bool, uint); void slotCscopeVerified(bool, uint);
}; };

@ -33,7 +33,7 @@
#include "editortabs.h" #include "editortabs.h"
#include "querywidget.h" #include "querywidget.h"
KScopeActions::KScopeActions(KScope* pWindow) : QObject(), KScopeActions::KScopeActions(KScope* pWindow) : TQObject(),
m_pWindow(pWindow), m_pWindow(pWindow),
m_pCollection(pWindow->actionCollection()) m_pCollection(pWindow->actionCollection())
{ {
@ -474,8 +474,8 @@ void KScopeActions::slotEnableFileActions(bool bEnable)
* the action * the action
* @return The newly created action object * @return The newly created action object
*/ */
KAction* KScopeActions::addAction(const QString& sCaption, const char* szIcon, KAction* KScopeActions::addAction(const TQString& sCaption, const char* szIcon,
const char* szShortcut, QWidget* pReceiver, const char* szSlot, const char* szShortcut, TQWidget* pReceiver, const char* szSlot,
const char* szName, const char* szSignal) const char* szName, const char* szSignal)
{ {
KAction* pAction; KAction* pAction;
@ -508,8 +508,8 @@ KAction* KScopeActions::addAction(const QString& sCaption, const char* szIcon,
* the action * the action
* @return The newly created action object * @return The newly created action object
*/ */
KToggleAction* KScopeActions::addToggle(const QString& sCaption, KToggleAction* KScopeActions::addToggle(const TQString& sCaption,
const char* szIcon, const char* szShortcut, QWidget* pReceiver, const char* szIcon, const char* szShortcut, TQWidget* pReceiver,
const char* szSlot, const char* szName, const char* szSignal) const char* szSlot, const char* szName, const char* szSignal)
{ {
KToggleAction* pAction; KToggleAction* pAction;

@ -32,13 +32,13 @@
class KScope; class KScope;
typedef QPtrList<KAction> ActionList; typedef TQPtrList<KAction> ActionList;
/** /**
* A helper class for managing KScope's menu commands. * A helper class for managing KScope's menu commands.
* @author Elad Lahav * @author Elad Lahav
*/ */
class KScopeActions : public QObject class KScopeActions : public TQObject
{ {
Q_OBJECT Q_OBJECT
@ -89,10 +89,10 @@ private:
/** The "Show/Hide Tag List" menu command. */ /** The "Show/Hide Tag List" menu command. */
KToggleAction* m_pToggleTagListAction; KToggleAction* m_pToggleTagListAction;
KAction* addAction(const QString&, const char*, const char*, QWidget*, KAction* addAction(const TQString&, const char*, const char*, TQWidget*,
const char*, const char*, const char*); const char*, const char*, const char*);
KToggleAction* addToggle(const QString&, const char*, const char*, KToggleAction* addToggle(const TQString&, const char*, const char*,
QWidget*, const char*, const char*, const char*); TQWidget*, const char*, const char*, const char*);
}; };
#endif #endif

@ -88,22 +88,22 @@ KScopeConfig::ConfParams KScopeConfig::s_cpDef = {
true, // Show the tag list true, // Show the tag list
SPLIT_SIZES(), // Tag list width SPLIT_SIZES(), // Tag list width
{ {
QColor(black), // File list foreground TQColor(black), // File list foreground
QColor(white), // File list background TQColor(white), // File list background
QColor(black), // Tag list foreground TQColor(black), // Tag list foreground
QColor(white), // Tag list background TQColor(white), // Tag list background
QColor(black), // Query page foreground TQColor(black), // Query page foreground
QColor(white), // Query page background TQColor(white), // Query page background
QColor("#c0c0c0"), // Call graph background TQColor("#c0c0c0"), // Call graph background
QColor("#c0ff80"), // Call graph nodes TQColor("#c0ff80"), // Call graph nodes
QColor(black), // Call graph text TQColor(black), // Call graph text
QColor("#ff8000") TQColor("#ff8000")
}, },
{ {
QFont(), // Font definitions are overriden in load() TQFont(), // Font definitions are overriden in load()
QFont(), TQFont(),
QFont(), TQFont(),
QFont() TQFont()
}, },
NameAsc, // Ctags sort order NameAsc, // Ctags sort order
false, // Read-only mode false, // Read-only mode
@ -330,7 +330,7 @@ bool KScopeConfig::showWelcomeDlg()
/** /**
* @return The full path of the Cscope executable * @return The full path of the Cscope executable
*/ */
const QString& KScopeConfig::getCscopePath() const const TQString& KScopeConfig::getCscopePath() const
{ {
return m_cp.sCscopePath; return m_cp.sCscopePath;
} }
@ -338,7 +338,7 @@ const QString& KScopeConfig::getCscopePath() const
/** /**
* @param sPath The full path of the Cscope executable * @param sPath The full path of the Cscope executable
*/ */
void KScopeConfig::setCscopePath(const QString& sPath) void KScopeConfig::setCscopePath(const TQString& sPath)
{ {
m_cp.sCscopePath = sPath; m_cp.sCscopePath = sPath;
} }
@ -346,7 +346,7 @@ void KScopeConfig::setCscopePath(const QString& sPath)
/** /**
* @return The full path of the Ctags executable * @return The full path of the Ctags executable
*/ */
const QString& KScopeConfig::getCtagsPath() const const TQString& KScopeConfig::getCtagsPath() const
{ {
return m_cp.sCtagsPath; return m_cp.sCtagsPath;
} }
@ -354,7 +354,7 @@ const QString& KScopeConfig::getCtagsPath() const
/** /**
* @param sPath The full path of the Ctags executable * @param sPath The full path of the Ctags executable
*/ */
void KScopeConfig::setCtagsPath(const QString& sPath) void KScopeConfig::setCtagsPath(const TQString& sPath)
{ {
m_cp.sCtagsPath = sPath; m_cp.sCtagsPath = sPath;
} }
@ -362,7 +362,7 @@ void KScopeConfig::setCtagsPath(const QString& sPath)
/** /**
* @return The full path of the Dot executable * @return The full path of the Dot executable
*/ */
const QString& KScopeConfig::getDotPath() const const TQString& KScopeConfig::getDotPath() const
{ {
return m_cp.sDotPath; return m_cp.sDotPath;
} }
@ -370,7 +370,7 @@ const QString& KScopeConfig::getDotPath() const
/** /**
* @param sPath The full path of the Dot executable * @param sPath The full path of the Dot executable
*/ */
void KScopeConfig::setDotPath(const QString& sPath) void KScopeConfig::setDotPath(const TQString& sPath)
{ {
m_cp.sDotPath = sPath; m_cp.sDotPath = sPath;
} }
@ -378,7 +378,7 @@ void KScopeConfig::setDotPath(const QString& sPath)
/** /**
* @return A sorted list of recently used project paths. * @return A sorted list of recently used project paths.
*/ */
const QStringList& KScopeConfig::getRecentProjects() const const TQStringList& KScopeConfig::getRecentProjects() const
{ {
return m_slProjects; return m_slProjects;
} }
@ -388,9 +388,9 @@ const QStringList& KScopeConfig::getRecentProjects() const
* list. * list.
* @param sProjPath The path of the project to add * @param sProjPath The path of the project to add
*/ */
void KScopeConfig::addRecentProject(const QString& sProjPath) void KScopeConfig::addRecentProject(const TQString& sProjPath)
{ {
QStringList::Iterator itr; TQStringList::Iterator itr;
itr = m_slProjects.find(sProjPath); itr = m_slProjects.find(sProjPath);
if (itr != m_slProjects.end()) if (itr != m_slProjects.end())
@ -403,7 +403,7 @@ void KScopeConfig::addRecentProject(const QString& sProjPath)
* Removes the given project path from recently used projects list. * Removes the given project path from recently used projects list.
* @param sProjPath The path of the project to remove * @param sProjPath The path of the project to remove
*/ */
void KScopeConfig::removeRecentProject(const QString& sProjPath) void KScopeConfig::removeRecentProject(const TQString& sProjPath)
{ {
m_slProjects.remove(sProjPath); m_slProjects.remove(sProjPath);
} }
@ -447,7 +447,7 @@ void KScopeConfig::setEditorSizes(const SPLIT_SIZES& siEditor)
* @param ce Identifies the GUI element * @param ce Identifies the GUI element
* @return A reference to the colour object to use * @return A reference to the colour object to use
*/ */
const QColor& KScopeConfig::getColor(ColorElement ce) const const TQColor& KScopeConfig::getColor(ColorElement ce) const
{ {
return m_cp.clrs[ce]; return m_cp.clrs[ce];
} }
@ -457,7 +457,7 @@ const QColor& KScopeConfig::getColor(ColorElement ce) const
* @param ce The GUI element * @param ce The GUI element
* @return A name used in the colour configuration page * @return A name used in the colour configuration page
*/ */
QString KScopeConfig::getColorName(ColorElement ce) const TQString KScopeConfig::getColorName(ColorElement ce) const
{ {
return COLOR_NAME(ce); return COLOR_NAME(ce);
} }
@ -467,7 +467,7 @@ QString KScopeConfig::getColorName(ColorElement ce) const
* @param ce Identifies the GUI element * @param ce Identifies the GUI element
* @param clr The colour to use * @param clr The colour to use
*/ */
void KScopeConfig::setColor(ColorElement ce, const QColor& clr) void KScopeConfig::setColor(ColorElement ce, const TQColor& clr)
{ {
m_cp.clrs[ce] = clr; m_cp.clrs[ce] = clr;
} }
@ -477,7 +477,7 @@ void KScopeConfig::setColor(ColorElement ce, const QColor& clr)
* @param fe Identifies the GUI element * @param fe Identifies the GUI element
* @return A reference to the font object to use * @return A reference to the font object to use
*/ */
const QFont& KScopeConfig::getFont(FontElement fe) const const TQFont& KScopeConfig::getFont(FontElement fe) const
{ {
return m_cp.fonts[fe]; return m_cp.fonts[fe];
} }
@ -487,7 +487,7 @@ const QFont& KScopeConfig::getFont(FontElement fe) const
* @param ce The GUI element * @param ce The GUI element
* @return A name used in the font configuration page * @return A name used in the font configuration page
*/ */
QString KScopeConfig::getFontName(FontElement ce) const TQString KScopeConfig::getFontName(FontElement ce) const
{ {
return FONT_NAME(ce); return FONT_NAME(ce);
} }
@ -497,7 +497,7 @@ QString KScopeConfig::getFontName(FontElement ce) const
* @param fe Identifies the GUI element * @param fe Identifies the GUI element
* @param font The font to use * @param font The font to use
*/ */
void KScopeConfig::setFont(FontElement fe, const QFont& font) void KScopeConfig::setFont(FontElement fe, const TQFont& font)
{ {
m_bFontsChanged = true; m_bFontsChanged = true;
m_cp.fonts[fe] = font; m_cp.fonts[fe] = font;
@ -627,7 +627,7 @@ void KScopeConfig::setAutoSortFiles(bool bSort)
/** /**
* @return A command line for launching an external editor * @return A command line for launching an external editor
*/ */
const QString& KScopeConfig::getExtEditor() const TQString& KScopeConfig::getExtEditor()
{ {
return m_cp.sExtEditor; return m_cp.sExtEditor;
} }
@ -635,7 +635,7 @@ const QString& KScopeConfig::getExtEditor()
/** /**
* @param sExtEditor A command line for launching an external editor * @param sExtEditor A command line for launching an external editor
*/ */
void KScopeConfig::setExtEditor(const QString& sExtEditor) void KScopeConfig::setExtEditor(const TQString& sExtEditor)
{ {
m_cp.sExtEditor = sExtEditor; m_cp.sExtEditor = sExtEditor;
} }
@ -679,7 +679,7 @@ KScopeConfig::EditorPopup KScopeConfig::getEditorPopup() const
/** /**
* @return The name of the popup menu to use in the embedded editor * @return The name of the popup menu to use in the embedded editor
*/ */
QString KScopeConfig::getEditorPopupName() const TQString KScopeConfig::getEditorPopupName() const
{ {
switch (m_cp.popup) { switch (m_cp.popup) {
case Embedded: case Embedded:
@ -706,7 +706,7 @@ void KScopeConfig::setEditorPopup(KScopeConfig::EditorPopup popup)
/** /**
* @return The default orientation for call graphs * @return The default orientation for call graphs
*/ */
QString KScopeConfig::getGraphOrientation() const TQString KScopeConfig::getGraphOrientation() const
{ {
return m_cp.sGraphOrient; return m_cp.sGraphOrient;
} }
@ -714,7 +714,7 @@ QString KScopeConfig::getGraphOrientation() const
/** /**
* @param sOrient The default orientation for call graphs * @param sOrient The default orientation for call graphs
*/ */
void KScopeConfig::setGraphOrientation(const QString& sOrient) void KScopeConfig::setGraphOrientation(const TQString& sOrient)
{ {
m_cp.sGraphOrient = sOrient; m_cp.sGraphOrient = sOrient;
} }

@ -28,19 +28,19 @@
#ifndef KSCOPECONFIG_H #ifndef KSCOPECONFIG_H
#define KSCOPECONFIG_H #define KSCOPECONFIG_H
#include <qobject.h> #include <ntqobject.h>
#include <qstringlist.h> #include <ntqstringlist.h>
#include <qcolor.h> #include <ntqcolor.h>
#include <kdockwidget.h> #include <kdockwidget.h>
typedef QValueList<int> SPLIT_SIZES; typedef TQValueList<int> SPLIT_SIZES;
/** /**
* Loads and stores global configuration parameters. * Loads and stores global configuration parameters.
* @author Elad Lahav * @author Elad Lahav
*/ */
class KScopeConfig : public QObject class KScopeConfig : public TQObject
{ {
Q_OBJECT Q_OBJECT
@ -81,25 +81,25 @@ public:
bool isFirstTime(); bool isFirstTime();
bool showWelcomeDlg(); bool showWelcomeDlg();
const QString& getCscopePath() const; const TQString& getCscopePath() const;
void setCscopePath(const QString&); void setCscopePath(const TQString&);
const QString& getCtagsPath() const; const TQString& getCtagsPath() const;
void setCtagsPath(const QString&); void setCtagsPath(const TQString&);
const QString& getDotPath() const; const TQString& getDotPath() const;
void setDotPath(const QString&); void setDotPath(const TQString&);
const QStringList& getRecentProjects() const; const TQStringList& getRecentProjects() const;
void addRecentProject(const QString&); void addRecentProject(const TQString&);
void removeRecentProject(const QString&); void removeRecentProject(const TQString&);
bool getShowTagList() const; bool getShowTagList() const;
void setShowTagList(bool); void setShowTagList(bool);
const SPLIT_SIZES& getEditorSizes() const; const SPLIT_SIZES& getEditorSizes() const;
void setEditorSizes(const SPLIT_SIZES&); void setEditorSizes(const SPLIT_SIZES&);
const QColor& getColor(ColorElement) const; const TQColor& getColor(ColorElement) const;
QString getColorName(ColorElement) const; TQString getColorName(ColorElement) const;
void setColor(ColorElement, const QColor&); void setColor(ColorElement, const TQColor&);
const QFont& getFont(FontElement) const; const TQFont& getFont(FontElement) const;
QString getFontName(FontElement) const; TQString getFontName(FontElement) const;
void setFont(FontElement, const QFont&); void setFont(FontElement, const TQFont&);
CtagSort getCtagSortOrder(); CtagSort getCtagSortOrder();
void setCtagSortOrder(CtagSort); void setCtagSortOrder(CtagSort);
bool getReadOnlyMode(); bool getReadOnlyMode();
@ -114,16 +114,16 @@ public:
void setWarnModifiedOnDisk(bool); void setWarnModifiedOnDisk(bool);
bool getAutoSortFiles(); bool getAutoSortFiles();
void setAutoSortFiles(bool); void setAutoSortFiles(bool);
const QString& getExtEditor(); const TQString& getExtEditor();
void setExtEditor(const QString&); void setExtEditor(const TQString&);
bool useExtEditor(); bool useExtEditor();
SysProfile getSysProfile() const; SysProfile getSysProfile() const;
void setSysProfile(SysProfile); void setSysProfile(SysProfile);
EditorPopup getEditorPopup() const; EditorPopup getEditorPopup() const;
QString getEditorPopupName() const; TQString getEditorPopupName() const;
void setEditorPopup(EditorPopup); void setEditorPopup(EditorPopup);
QString getGraphOrientation() const; TQString getGraphOrientation() const;
void setGraphOrientation(const QString&); void setGraphOrientation(const TQString&);
int getGraphMaxNodeDegree() const; int getGraphMaxNodeDegree() const;
void setGraphMaxNodeDegree(int); void setGraphMaxNodeDegree(int);
int getDefGraphView() const; int getDefGraphView() const;
@ -131,19 +131,19 @@ public:
private: private:
/** A list of previously loaded projects. */ /** A list of previously loaded projects. */
QStringList m_slProjects; TQStringList m_slProjects;
/** Defines the list of all configurable parameters in KScope. /** Defines the list of all configurable parameters in KScope.
The use of a structure helps define default values (@see s_cpDef) */ The use of a structure helps define default values (@see s_cpDef) */
struct ConfParams { struct ConfParams {
/** The full path of the Cscope executable. */ /** The full path of the Cscope executable. */
QString sCscopePath; TQString sCscopePath;
/** The full path of the Ctags executable. */ /** The full path of the Ctags executable. */
QString sCtagsPath; TQString sCtagsPath;
/** The full path of the Dot executable. */ /** The full path of the Dot executable. */
QString sDotPath; TQString sDotPath;
/** Whether the tag list should be visible. */ /** Whether the tag list should be visible. */
bool bShowTagList; bool bShowTagList;
@ -153,10 +153,10 @@ private:
SPLIT_SIZES siEditor; SPLIT_SIZES siEditor;
/** Colours for GUI elements. */ /** Colours for GUI elements. */
QColor clrs[LAST_COLOR + 1]; TQColor clrs[LAST_COLOR + 1];
/** Fonts for GUI elements. */ /** Fonts for GUI elements. */
QFont fonts[LAST_FONT + 1]; TQFont fonts[LAST_FONT + 1];
/** Sort order of the tag lists. */ /** Sort order of the tag lists. */
CtagSort ctagSortOrder; CtagSort ctagSortOrder;
@ -184,7 +184,7 @@ private:
/** A command line pattern for an external editor (in read-only /** A command line pattern for an external editor (in read-only
mode.)*/ mode.)*/
QString sExtEditor; TQString sExtEditor;
/** How KScope should treat time-consuming operations. */ /** How KScope should treat time-consuming operations. */
SysProfile profile; SysProfile profile;
@ -193,7 +193,7 @@ private:
EditorPopup popup; EditorPopup popup;
/** The default orientation of call graphs. */ /** The default orientation of call graphs. */
QString sGraphOrient; TQString sGraphOrient;
/** Maximal number of called/calling functions per call graph node. */ /** Maximal number of called/calling functions per call graph node. */
int nGraphMaxNodeDegree; int nGraphMaxNodeDegree;

@ -253,27 +253,27 @@ KScopePixmaps::~KScopePixmaps()
/** /**
* Creates the array of embedded pixmaps. * Creates the array of embedded pixmaps.
* This function is separated from the constructor since QPixmap objects * This function is separated from the constructor since TQPixmap objects
* cannot be created at the time the static KScopePixmaps object is * cannot be created at the time the static KScopePixmaps object is
* allocated. * allocated.
*/ */
void KScopePixmaps::init() void KScopePixmaps::init()
{ {
// Create the pixmap array // Create the pixmap array
m_pPixArray = new QPixmap * [PIX_ARRAY_SIZE]; m_pPixArray = new TQPixmap * [PIX_ARRAY_SIZE];
// Create all pixmaps // Create all pixmaps
m_pPixArray[SymFunc] = new QPixmap(XPM_FUNC); m_pPixArray[SymFunc] = new TQPixmap(XPM_FUNC);
m_pPixArray[SymVar] = new QPixmap(XPM_VAR); m_pPixArray[SymVar] = new TQPixmap(XPM_VAR);
m_pPixArray[SymStruct] = new QPixmap(XPM_STRUCT); m_pPixArray[SymStruct] = new TQPixmap(XPM_STRUCT);
m_pPixArray[SymMacro] = new QPixmap(XPM_MACRO); m_pPixArray[SymMacro] = new TQPixmap(XPM_MACRO);
m_pPixArray[SymMember] = new QPixmap(XPM_MEMBER); m_pPixArray[SymMember] = new TQPixmap(XPM_MEMBER);
m_pPixArray[SymEnum] = new QPixmap(XPM_ENUM); m_pPixArray[SymEnum] = new TQPixmap(XPM_ENUM);
m_pPixArray[SymEnumerator] = new QPixmap(XPM_ENUMERATOR); m_pPixArray[SymEnumerator] = new TQPixmap(XPM_ENUMERATOR);
m_pPixArray[SymTypedef] = new QPixmap(XPM_TYPEDEF); m_pPixArray[SymTypedef] = new TQPixmap(XPM_TYPEDEF);
m_pPixArray[SymLabel] = new QPixmap(XPM_LABEL); m_pPixArray[SymLabel] = new TQPixmap(XPM_LABEL);
m_pPixArray[SymInclude] = new QPixmap(XPM_INCLUDE); m_pPixArray[SymInclude] = new TQPixmap(XPM_INCLUDE);
m_pPixArray[SymUnknown] = new QPixmap(XPM_UNKNOWN); m_pPixArray[SymUnknown] = new TQPixmap(XPM_UNKNOWN);
} }
/** /**
@ -281,7 +281,7 @@ void KScopePixmaps::init()
* @param name The pixmap's identifier * @param name The pixmap's identifier
* @return A reference to the requested pixmap * @return A reference to the requested pixmap
*/ */
const QPixmap& KScopePixmaps::getPixmap(PixName name) const const TQPixmap& KScopePixmaps::getPixmap(PixName name) const
{ {
return *m_pPixArray[name]; return *m_pPixArray[name];
} }
@ -291,7 +291,7 @@ const QPixmap& KScopePixmaps::getPixmap(PixName name) const
* @param name The pixmap's identifier * @param name The pixmap's identifier
* @return The requested pixmap * @return The requested pixmap
*/ */
QPixmap KScopePixmaps::getPixmap(LoadPixName name) TQPixmap KScopePixmaps::getPixmap(LoadPixName name)
{ {
switch (name) { switch (name) {
case TabUnlocked: case TabUnlocked:
@ -363,7 +363,7 @@ QPixmap KScopePixmaps::getPixmap(LoadPixName name)
0, false); 0, false);
} }
return QPixmap(); return TQPixmap();
} }
/** /**

@ -28,7 +28,7 @@
#ifndef KSCOPEPIXMAPS_H #ifndef KSCOPEPIXMAPS_H
#define KSCOPEPIXMAPS_H #define KSCOPEPIXMAPS_H
#include <qpixmap.h> #include <ntqpixmap.h>
#include <kiconloader.h> #include <kiconloader.h>
#define GET_PIXMAP(_pix) \ #define GET_PIXMAP(_pix) \
@ -61,12 +61,12 @@ public:
CallingTree, CallGraph }; CallingTree, CallGraph };
void init(); void init();
const QPixmap& getPixmap(PixName name) const; const TQPixmap& getPixmap(PixName name) const;
QPixmap getPixmap(LoadPixName name); TQPixmap getPixmap(LoadPixName name);
private: private:
/** An array of pointers to the embedded pixmaps. */ /** An array of pointers to the embedded pixmaps. */
QPixmap** m_pPixArray; TQPixmap** m_pPixArray;
/** An icon loader used to retrieve pixmaps through the KDE mechanism. */ /** An icon loader used to retrieve pixmaps through the KDE mechanism. */
KIconLoader m_loader; KIconLoader m_loader;

@ -25,7 +25,7 @@
* *
***************************************************************************/ ***************************************************************************/
#include <qtextcodec.h> #include <ntqtextcodec.h>
#include <ktextbrowser.h> #include <ktextbrowser.h>
#include <kcombobox.h> #include <kcombobox.h>
#include <kurlrequester.h> #include <kurlrequester.h>
@ -46,11 +46,11 @@
* @param pParent The parent widget * @param pParent The parent widget
* @param szName The widget's name * @param szName The widget's name
*/ */
MakeDlg::MakeDlg(QWidget* pParent, const char* szName) : MakeDlg::MakeDlg(TQWidget* pParent, const char* szName) :
MakeLayout(pParent, szName, MAKE_DLG_W_FLAGS) MakeLayout(pParent, szName, MAKE_DLG_W_FLAGS)
{ {
// Don't show the "Function" column // Don't show the "Function" column
m_pErrorView->setColumnWidthMode(0, QListView::Manual); m_pErrorView->setColumnWidthMode(0, TQListView::Manual);
m_pErrorView->setColumnWidth(0, 0); m_pErrorView->setColumnWidth(0, 0);
// Create a new make front-end // Create a new make front-end
@ -59,21 +59,21 @@ MakeDlg::MakeDlg(QWidget* pParent, const char* szName) :
SLOT(slotShowOutput(FrontendToken*))); SLOT(slotShowOutput(FrontendToken*)));
connect(m_pMake, SIGNAL(finished(uint)), this, SLOT(slotFinished(uint))); connect(m_pMake, SIGNAL(finished(uint)), this, SLOT(slotFinished(uint)));
connect(m_pMake, connect(m_pMake,
SIGNAL(error(const QString&, const QString&, const QString&)), SIGNAL(error(const TQString&, const TQString&, const TQString&)),
this, this,
SLOT(slotAddError(const QString&, const QString&, const QString&))); SLOT(slotAddError(const TQString&, const TQString&, const TQString&)));
// The Root URL control should browse directories // The Root URL control should browse directories
m_pRootURL->setMode(KFile::Directory); m_pRootURL->setMode(KFile::Directory);
// Handle URL links in the browser // Handle URL links in the browser
m_pOutputBrowser->setNotifyClick(true); m_pOutputBrowser->setNotifyClick(true);
connect(m_pOutputBrowser, SIGNAL(urlClick(const QString&)), this, connect(m_pOutputBrowser, SIGNAL(urlClick(const TQString&)), this,
SLOT(slotBrowserClicked(const QString&))); SLOT(slotBrowserClicked(const TQString&)));
// Handle selections in the error view // Handle selections in the error view
connect(m_pErrorView, SIGNAL(lineRequested(const QString& , uint)), this, connect(m_pErrorView, SIGNAL(lineRequested(const TQString& , uint)), this,
SIGNAL(fileRequested(const QString&, uint))); SIGNAL(fileRequested(const TQString&, uint)));
// Do not allow duplicates in the command history // Do not allow duplicates in the command history
m_pCommandHistory->setDuplicatesEnabled(false); m_pCommandHistory->setDuplicatesEnabled(false);
@ -90,7 +90,7 @@ MakeDlg::~ MakeDlg()
/** /**
* @return The currently set make command * @return The currently set make command
*/ */
QString MakeDlg::getCommand() const TQString MakeDlg::getCommand() const
{ {
return m_pCommandHistory->currentText(); return m_pCommandHistory->currentText();
} }
@ -98,7 +98,7 @@ QString MakeDlg::getCommand() const
/** /**
* @param sCmd The new make command to use * @param sCmd The new make command to use
*/ */
void MakeDlg::setCommand(const QString& sCmd) void MakeDlg::setCommand(const TQString& sCmd)
{ {
m_pCommandHistory->setCurrentText(sCmd); m_pCommandHistory->setCurrentText(sCmd);
m_pCommandHistory->addToHistory(sCmd); m_pCommandHistory->addToHistory(sCmd);
@ -107,7 +107,7 @@ void MakeDlg::setCommand(const QString& sCmd)
/** /**
* @return The directory in which to run the make command * @return The directory in which to run the make command
*/ */
QString MakeDlg::getDir() const TQString MakeDlg::getDir() const
{ {
return m_pRootURL->url(); return m_pRootURL->url();
} }
@ -115,7 +115,7 @@ QString MakeDlg::getDir() const
/** /**
* @param sURL The new root directory to use * @param sURL The new root directory to use
*/ */
void MakeDlg::setDir(const QString& sURL) void MakeDlg::setDir(const TQString& sURL)
{ {
m_pRootURL->setURL(sURL); m_pRootURL->setURL(sURL);
} }
@ -127,7 +127,7 @@ void MakeDlg::setDir(const QString& sURL)
* is killed. * is killed.
* @param pEvent The close event descriptor * @param pEvent The close event descriptor
*/ */
void MakeDlg::closeEvent(QCloseEvent* pEvent) void MakeDlg::closeEvent(TQCloseEvent* pEvent)
{ {
// Check if a process is currently running // Check if a process is currently running
if (m_pMake->isRunning()) { if (m_pMake->isRunning()) {
@ -151,7 +151,7 @@ void MakeDlg::closeEvent(QCloseEvent* pEvent)
} }
} }
QWidget::closeEvent(pEvent); TQWidget::closeEvent(pEvent);
} }
/** /**
@ -160,7 +160,7 @@ void MakeDlg::closeEvent(QCloseEvent* pEvent)
*/ */
void MakeDlg::slotMake() void MakeDlg::slotMake()
{ {
QString sCommand; TQString sCommand;
// Clear the current contents // Clear the current contents
m_pOutputBrowser->clear(); m_pOutputBrowser->clear();
@ -168,7 +168,7 @@ void MakeDlg::slotMake()
// Run the make command // Run the make command
sCommand = m_pCommandHistory->currentText(); sCommand = m_pCommandHistory->currentText();
if (!m_pMake->run("make", QStringList::split(" ", sCommand), if (!m_pMake->run("make", TQStringList::split(" ", sCommand),
m_pRootURL->url())) { m_pRootURL->url())) {
KMessageBox::error(this, m_pMake->getRunError()); KMessageBox::error(this, m_pMake->getRunError());
return; return;
@ -198,11 +198,11 @@ void MakeDlg::slotStop()
*/ */
void MakeDlg::slotShowOutput(FrontendToken* pToken) void MakeDlg::slotShowOutput(FrontendToken* pToken)
{ {
QString sData; TQString sData;
// GCC uses unicode quote characters - this should ensure that they are // GCC uses unicode quote characters - this should ensure that they are
// treated correctly by the text browser widget // treated correctly by the text browser widget
sData = QTextCodec::codecForLocale()->toUnicode(pToken->getData()); sData = TQTextCodec::codecForLocale()->toUnicode(pToken->getData());
m_pOutputBrowser->append(sData); m_pOutputBrowser->append(sData);
} }
@ -231,10 +231,10 @@ void MakeDlg::slotFinished(uint)
* This slot is connected to the urlClick() signal of the browser. * This slot is connected to the urlClick() signal of the browser.
* @param sURL The requested URL * @param sURL The requested URL
*/ */
void MakeDlg::slotBrowserClicked(const QString& sURL) void MakeDlg::slotBrowserClicked(const TQString& sURL)
{ {
QString sFile; TQString sFile;
QString sLine; TQString sLine;
// Exract the file name and the line number from the URL // Exract the file name and the line number from the URL
sFile = sURL.section('&', 0, 0); sFile = sURL.section('&', 0, 0);
@ -255,12 +255,12 @@ void MakeDlg::slotBrowserClicked(const QString& sURL)
* @param sLine The line number * @param sLine The line number
* @param sText An explanation of the error * @param sText An explanation of the error
*/ */
void MakeDlg::slotAddError(const QString& sFile, const QString& sLine, void MakeDlg::slotAddError(const TQString& sFile, const TQString& sLine,
const QString& sText) const TQString& sText)
{ {
QString sUniText; TQString sUniText;
sUniText = QTextCodec::codecForLocale()->toUnicode(sText); sUniText = TQTextCodec::codecForLocale()->toUnicode(sText);
m_pErrorView->addRecord("", sFile, sLine, sUniText); m_pErrorView->addRecord("", sFile, sLine, sUniText);
} }

@ -46,29 +46,29 @@ class MakeDlg: public MakeLayout
Q_OBJECT Q_OBJECT
public: public:
MakeDlg(QWidget* pParent = 0, const char* szName = 0); MakeDlg(TQWidget* pParent = 0, const char* szName = 0);
virtual ~MakeDlg(); virtual ~MakeDlg();
QString getCommand() const; TQString getCommand() const;
void setCommand(const QString&); void setCommand(const TQString&);
QString getDir() const; TQString getDir() const;
void setDir(const QString&); void setDir(const TQString&);
public slots: public slots:
virtual void slotMake(); virtual void slotMake();
signals: signals:
void fileRequested(const QString&, uint); void fileRequested(const TQString&, uint);
protected: protected:
virtual void closeEvent(QCloseEvent*); virtual void closeEvent(TQCloseEvent*);
protected slots: protected slots:
virtual void slotStop(); virtual void slotStop();
void slotShowOutput(FrontendToken*); void slotShowOutput(FrontendToken*);
void slotFinished(uint); void slotFinished(uint);
void slotBrowserClicked(const QString&); void slotBrowserClicked(const TQString&);
void slotAddError(const QString&, const QString&, const QString&); void slotAddError(const TQString&, const TQString&, const TQString&);
private: private:
/** Handles the make process. */ /** Handles the make process. */

@ -25,7 +25,7 @@
* *
***************************************************************************/ ***************************************************************************/
#include <qregexp.h> #include <ntqregexp.h>
#include "makefrontend.h" #include "makefrontend.h"
// TODO: // TODO:
@ -68,10 +68,10 @@ MakeFrontend::~MakeFrontend()
* @param bBlock (Optional) true to block, false otherwise * @param bBlock (Optional) true to block, false otherwise
* @return true if the process was executed successfully, false otherwise * @return true if the process was executed successfully, false otherwise
*/ */
bool MakeFrontend::run(const QString& sName, const QStringList& slArgs, bool MakeFrontend::run(const TQString& sName, const TQStringList& slArgs,
const QString& sWorkDir, bool bBlock) const TQString& sWorkDir, bool bBlock)
{ {
QStringList slShellArgs; TQStringList slShellArgs;
// Store the current build directory // Store the current build directory
m_slPathStack.push_back(sWorkDir); m_slPathStack.push_back(sWorkDir);
@ -89,14 +89,14 @@ bool MakeFrontend::run(const QString& sName, const QStringList& slArgs,
* Parses lines of output produced by the make command. * Parses lines of output produced by the make command.
* @param sToken A single line of output * @param sToken A single line of output
*/ */
Frontend::ParseResult MakeFrontend::parseStdout(QString& sToken, ParserDelim) Frontend::ParseResult MakeFrontend::parseStdout(TQString& sToken, ParserDelim)
{ {
static QRegExp reErrWarn(RE_FILE_LINE); static TQRegExp reErrWarn(RE_FILE_LINE);
static QRegExp reEntDir(RE_ENTER_DIR); static TQRegExp reEntDir(RE_ENTER_DIR);
static QRegExp reExtDir(RE_EXIT_DIR); static TQRegExp reExtDir(RE_EXIT_DIR);
QString sRep; TQString sRep;
int nPos; int nPos;
QString sFile, sLine, sText; TQString sFile, sLine, sText;
if ((nPos = reErrWarn.search(sToken)) >= 0) { if ((nPos = reErrWarn.search(sToken)) >= 0) {
// An error/warning message // An error/warning message
@ -112,18 +112,18 @@ Frontend::ParseResult MakeFrontend::parseStdout(QString& sToken, ParserDelim)
sText = reErrWarn.capturedTexts()[4]; sText = reErrWarn.capturedTexts()[4];
emit error(sFile, sLine, sText); emit error(sFile, sLine, sText);
sRep = QString("<a href=\"") + sFile + "&\\2\">\\1:\\2</a>\\3: \\4"; sRep = TQString("<a href=\"") + sFile + "&\\2\">\\1:\\2</a>\\3: \\4";
sToken.replace(reErrWarn, sRep); sToken.replace(reErrWarn, sRep);
} }
else if ((nPos = reEntDir.search(sToken)) >= 0) { else if ((nPos = reEntDir.search(sToken)) >= 0) {
// Recursing into a directory // Recursing into a directory
m_slPathStack.push_back(reEntDir.capturedTexts()[1]); m_slPathStack.push_back(reEntDir.capturedTexts()[1]);
sToken = QString("<b>Entering directory</b> ") + sToken = TQString("<b>Entering directory</b> ") +
m_slPathStack.last(); m_slPathStack.last();
} }
else if ((nPos = reExtDir.search(sToken)) >= 0) { else if ((nPos = reExtDir.search(sToken)) >= 0) {
// Leaving a directory // Leaving a directory
sToken = QString("<b>Leaving directory</b> ") + sToken = TQString("<b>Leaving directory</b> ") +
m_slPathStack.last(); m_slPathStack.last();
m_slPathStack.pop_back(); m_slPathStack.pop_back();
} }

@ -45,17 +45,17 @@ public:
MakeFrontend(bool bAutoDelete = false); MakeFrontend(bool bAutoDelete = false);
~MakeFrontend(); ~MakeFrontend();
virtual bool run(const QString&, const QStringList&, virtual bool run(const TQString&, const TQStringList&,
const QString&, bool bBlock = false); const TQString&, bool bBlock = false);
virtual ParseResult parseStdout(QString&, ParserDelim); virtual ParseResult parseStdout(TQString&, ParserDelim);
signals: signals:
void error(const QString& sFile, const QString& sLine, void error(const TQString& sFile, const TQString& sLine,
const QString& sText); const TQString& sText);
private: private:
/** A stack of paths used to track the current build directory. */ /** A stack of paths used to track the current build directory. */
QStringList m_slPathStack; TQStringList m_slPathStack;
}; };
#endif #endif

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>MakeLayout</class> <class>MakeLayout</class>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>MakeLayout</cstring> <cstring>MakeLayout</cstring>
</property> </property>
@ -19,7 +19,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout10</cstring> <cstring>layout10</cstring>
</property> </property>
@ -27,7 +27,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel" row="0" column="0"> <widget class="TQLabel" row="0" column="0">
<property name="name"> <property name="name">
<cstring>textLabel1</cstring> <cstring>textLabel1</cstring>
</property> </property>
@ -53,7 +53,7 @@
<cstring>m_pRootURL</cstring> <cstring>m_pRootURL</cstring>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="1" column="0"> <widget class="TQLabel" row="1" column="0">
<property name="name"> <property name="name">
<cstring>textLabel2</cstring> <cstring>textLabel2</cstring>
</property> </property>
@ -63,11 +63,11 @@
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QTabWidget"> <widget class="TQTabWidget">
<property name="name"> <property name="name">
<cstring>tabWidget2</cstring> <cstring>tabWidget2</cstring>
</property> </property>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>tab</cstring> <cstring>tab</cstring>
</property> </property>
@ -85,7 +85,7 @@
</widget> </widget>
</vbox> </vbox>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>tab</cstring> <cstring>tab</cstring>
</property> </property>
@ -104,7 +104,7 @@
</vbox> </vbox>
</widget> </widget>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout7</cstring> <cstring>layout7</cstring>
</property> </property>
@ -129,7 +129,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pMakeButton</cstring> <cstring>m_pMakeButton</cstring>
</property> </property>
@ -143,7 +143,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pStopButton</cstring> <cstring>m_pStopButton</cstring>
</property> </property>
@ -157,7 +157,7 @@
<string>Alt+S</string> <string>Alt+S</string>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pCloseButton</cstring> <cstring>m_pCloseButton</cstring>
</property> </property>

@ -25,11 +25,11 @@
* *
***************************************************************************/ ***************************************************************************/
#include <qregexp.h> #include <ntqregexp.h>
#include <qpushbutton.h> #include <ntqpushbutton.h>
#include <qspinbox.h> #include <ntqspinbox.h>
#include <qlabel.h> #include <ntqlabel.h>
#include <qtextedit.h> #include <ntqtextedit.h>
#include <kurlrequester.h> #include <kurlrequester.h>
#include <klineedit.h> #include <klineedit.h>
#include <kmessagebox.h> #include <kmessagebox.h>
@ -43,7 +43,7 @@
* @param pParent The parent widget * @param pParent The parent widget
* @param szName The widget's name * @param szName The widget's name
*/ */
NewProjectDlg::NewProjectDlg(bool bNewProj, QWidget* pParent, NewProjectDlg::NewProjectDlg(bool bNewProj, TQWidget* pParent,
const char* szName) : const char* szName) :
NewProjectLayout(pParent, szName), NewProjectLayout(pParent, szName),
m_bNewProj(bNewProj) m_bNewProj(bNewProj)
@ -98,10 +98,10 @@ NewProjectDlg::~NewProjectDlg()
* @param sPath The project's path * @param sPath The project's path
* @param opt Project parameters configurable in this dialogue * @param opt Project parameters configurable in this dialogue
*/ */
void NewProjectDlg::setProperties(const QString& sName, const QString& sPath, void NewProjectDlg::setProperties(const TQString& sName, const TQString& sPath,
const ProjectBase::Options& opt) const ProjectBase::Options& opt)
{ {
QStringList::ConstIterator itr; TQStringList::ConstIterator itr;
// Set values for current project // Set values for current project
m_pNameEdit->setText(sName); m_pNameEdit->setText(sName);
@ -143,7 +143,7 @@ void NewProjectDlg::setProperties(const QString& sName, const QString& sPath,
* box. * box.
* @return The name of the new project * @return The name of the new project
*/ */
QString NewProjectDlg::getName() TQString NewProjectDlg::getName()
{ {
return m_pNameEdit->text(); return m_pNameEdit->text();
} }
@ -155,10 +155,10 @@ QString NewProjectDlg::getName()
* directory, created under it using the project's name. * directory, created under it using the project's name.
* @return The full path of the parent directory for the new project * @return The full path of the parent directory for the new project
*/ */
QString NewProjectDlg::getPath() TQString NewProjectDlg::getPath()
{ {
if (m_pHiddenDirCheck->isChecked()) if (m_pHiddenDirCheck->isChecked())
return QString(m_pSrcRootRequester->url()) + "/.cscope"; return TQString(m_pSrcRootRequester->url()) + "/.cscope";
return m_pPathRequester->url(); return m_pPathRequester->url();
} }
@ -203,7 +203,7 @@ void NewProjectDlg::accept()
// Validate the name of a new project // Validate the name of a new project
if (m_bNewProj) { if (m_bNewProj) {
QRegExp re("[^ \\t\\n]+"); TQRegExp re("[^ \\t\\n]+");
if (!re.exactMatch(m_pNameEdit->text())) { if (!re.exactMatch(m_pNameEdit->text())) {
KMessageBox::error(0, i18n("Project names must not contain " KMessageBox::error(0, i18n("Project names must not contain "
"whitespace.")); "whitespace."));
@ -217,14 +217,14 @@ void NewProjectDlg::accept()
m_slTypes.append(m_pTypesList->text(i)); m_slTypes.append(m_pTypesList->text(i));
// Clean-up the source root // Clean-up the source root
QDir dir(m_pSrcRootRequester->url()); TQDir dir(m_pSrcRootRequester->url());
if (dir.exists()) if (dir.exists())
m_pSrcRootRequester->setURL(dir.absPath()); m_pSrcRootRequester->setURL(dir.absPath());
else else
m_pSrcRootRequester->setURL("/"); m_pSrcRootRequester->setURL("/");
// Close the dialog // Close the dialog
QDialog::accept(); TQDialog::accept();
} }
/** /**
@ -233,7 +233,7 @@ void NewProjectDlg::accept()
*/ */
void NewProjectDlg::slotAddType() void NewProjectDlg::slotAddType()
{ {
QString sType; TQString sType;
// Try the custom type edit-box first. // Try the custom type edit-box first.
sType = m_pTypesEdit->text(); sType = m_pTypesEdit->text();
@ -242,14 +242,14 @@ void NewProjectDlg::slotAddType()
return; return;
// Validate the type string // Validate the type string
QRegExp reg("[ \\t\\n\\|\\\\\\/]"); TQRegExp reg("[ \\t\\n\\|\\\\\\/]");
if (sType.contains(reg)) { if (sType.contains(reg)) {
KMessageBox::error(0, i18n("This is not a valid file type!")); KMessageBox::error(0, i18n("This is not a valid file type!"));
return; return;
} }
// Do not add an existing type. // Do not add an existing type.
if (m_pTypesList->findItem(sType, Qt::CaseSensitive | Qt::ExactMatch) != if (m_pTypesList->findItem(sType, TQt::CaseSensitive | TQt::ExactMatch) !=
NULL) { NULL) {
return; return;
} }
@ -266,7 +266,7 @@ void NewProjectDlg::slotAddType()
void NewProjectDlg::slotRemoveType() void NewProjectDlg::slotRemoveType()
{ {
int nItem; int nItem;
QString sType; TQString sType;
// Verify an item is selected // Verify an item is selected
nItem = m_pTypesList->currentItem(); nItem = m_pTypesList->currentItem();
@ -278,7 +278,7 @@ void NewProjectDlg::slotRemoveType()
m_pTypesList->removeItem(nItem); m_pTypesList->removeItem(nItem);
// Add to the list of available types. // Add to the list of available types.
if (m_pAvailTypesList->findItem(sType, Qt::CaseSensitive | Qt::ExactMatch) if (m_pAvailTypesList->findItem(sType, TQt::CaseSensitive | TQt::ExactMatch)
== NULL) { == NULL) {
m_pAvailTypesList->insertItem(sType); m_pAvailTypesList->insertItem(sType);
} }
@ -292,7 +292,7 @@ void NewProjectDlg::slotRemoveType()
* available types. * available types.
* @param sType The newly selected type * @param sType The newly selected type
*/ */
void NewProjectDlg::slotAvailTypesChanged(const QString& sType) void NewProjectDlg::slotAvailTypesChanged(const TQString& sType)
{ {
m_pTypesEdit->setText(sType); m_pTypesEdit->setText(sType);
} }
@ -302,7 +302,7 @@ void NewProjectDlg::slotAvailTypesChanged(const QString& sType)
* @param pParent The parent widget * @param pParent The parent widget
* @param szName The widget's name * @param szName The widget's name
*/ */
AutoCompletionDlg::AutoCompletionDlg(QWidget* pParent, AutoCompletionDlg::AutoCompletionDlg(TQWidget* pParent,
const char* szName ) : const char* szName ) :
AutoCompletionLayout(pParent, szName) AutoCompletionLayout(pParent, szName)
{ {
@ -331,7 +331,7 @@ int AutoCompletionDlg::exec()
m_pMaxEntriesSpin->setValue(m_nMaxEntries); m_pMaxEntriesSpin->setValue(m_nMaxEntries);
// Show the dialogue // Show the dialogue
return QDialog::exec(); return TQDialog::exec();
} }
/** /**
@ -347,7 +347,7 @@ void AutoCompletionDlg::accept()
m_nMaxEntries = m_pMaxEntriesSpin->value(); m_nMaxEntries = m_pMaxEntriesSpin->value();
// Close the dialogue, indicating acceptance // Close the dialogue, indicating acceptance
QDialog::accept(); TQDialog::accept();
} }

@ -28,8 +28,8 @@
#ifndef NEWPROJECTDLG_H #ifndef NEWPROJECTDLG_H
#define NEWPROJECTDLG_H #define NEWPROJECTDLG_H
#include <qlineedit.h> #include <ntqlineedit.h>
#include <qcheckbox.h> #include <ntqcheckbox.h>
#include <newprojectlayout.h> #include <newprojectlayout.h>
#include <autocompletionlayout.h> #include <autocompletionlayout.h>
#include "projectbase.h" #include "projectbase.h"
@ -44,7 +44,7 @@ class AutoCompletionDlg : public AutoCompletionLayout
Q_OBJECT Q_OBJECT
public: public:
AutoCompletionDlg(QWidget* pParent, const char* szName = NULL); AutoCompletionDlg(TQWidget* pParent, const char* szName = NULL);
~AutoCompletionDlg(); ~AutoCompletionDlg();
public slots: public slots:
@ -82,25 +82,25 @@ class NewProjectDlg : public NewProjectLayout
Q_OBJECT Q_OBJECT
public: public:
NewProjectDlg(bool, QWidget* pParent = NULL, const char* szName = NULL); NewProjectDlg(bool, TQWidget* pParent = NULL, const char* szName = NULL);
~NewProjectDlg(); ~NewProjectDlg();
void setProperties(const QString&, const QString&, void setProperties(const TQString&, const TQString&,
const ProjectBase::Options&); const ProjectBase::Options&);
QString getName(); TQString getName();
QString getPath(); TQString getPath();
void getOptions(ProjectBase::Options&); void getOptions(ProjectBase::Options&);
protected slots: protected slots:
virtual void accept(); virtual void accept();
virtual void slotAddType(); virtual void slotAddType();
virtual void slotRemoveType(); virtual void slotRemoveType();
virtual void slotAvailTypesChanged(const QString&); virtual void slotAvailTypesChanged(const TQString&);
private: private:
/** The file MIME-types associated with the new project. */ /** The file MIME-types associated with the new project. */
QStringList m_slTypes; TQStringList m_slTypes;
/** A sub-dialogue for configuring symbol auto-completion parameters. */ /** A sub-dialogue for configuring symbol auto-completion parameters. */
AutoCompletionDlg* m_pAutoCompDlg; AutoCompletionDlg* m_pAutoCompDlg;

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>NewProjectLayout</class> <class>NewProjectLayout</class>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>NewProjectLayout</cstring> <cstring>NewProjectLayout</cstring>
</property> </property>
@ -19,11 +19,11 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QTabWidget"> <widget class="TQTabWidget">
<property name="name"> <property name="name">
<cstring>tabWidget2</cstring> <cstring>tabWidget2</cstring>
</property> </property>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>tab</cstring> <cstring>tab</cstring>
</property> </property>
@ -34,7 +34,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout18</cstring> <cstring>layout18</cstring>
</property> </property>
@ -42,7 +42,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel" row="1" column="0"> <widget class="TQLabel" row="1" column="0">
<property name="name"> <property name="name">
<cstring>textLabel2</cstring> <cstring>textLabel2</cstring>
</property> </property>
@ -50,7 +50,7 @@
<string>Path</string> <string>Path</string>
</property> </property>
</widget> </widget>
<widget class="QLineEdit" row="0" column="1"> <widget class="TQLineEdit" row="0" column="1">
<property name="name"> <property name="name">
<cstring>m_pNameEdit</cstring> <cstring>m_pNameEdit</cstring>
</property> </property>
@ -59,7 +59,7 @@
The name must conform to the file system's naming conventions for directories (e.g., no spaces, exclamaion marks, etc.).</string> The name must conform to the file system's naming conventions for directories (e.g., no spaces, exclamaion marks, etc.).</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="0" column="0"> <widget class="TQLabel" row="0" column="0">
<property name="name"> <property name="name">
<cstring>textLabel1</cstring> <cstring>textLabel1</cstring>
</property> </property>
@ -79,7 +79,7 @@ This does not need to be the path in which the source files reside.</string>
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>m_pHiddenDirCheck</cstring> <cstring>m_pHiddenDirCheck</cstring>
</property> </property>
@ -90,7 +90,7 @@ This does not need to be the path in which the source files reside.</string>
<string>Alt+U</string> <string>Alt+U</string>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout19</cstring> <cstring>layout19</cstring>
</property> </property>
@ -98,7 +98,7 @@ This does not need to be the path in which the source files reside.</string>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel1_2</cstring> <cstring>textLabel1_2</cstring>
</property> </property>
@ -113,7 +113,7 @@ This does not need to be the path in which the source files reside.</string>
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel1_3</cstring> <cstring>textLabel1_3</cstring>
</property> </property>
@ -148,7 +148,7 @@ path for all source files, but is not required.&lt;/blockquote&gt;</string>
</spacer> </spacer>
</vbox> </vbox>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>tab</cstring> <cstring>tab</cstring>
</property> </property>
@ -159,7 +159,7 @@ path for all source files, but is not required.&lt;/blockquote&gt;</string>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QGroupBox"> <widget class="TQGroupBox">
<property name="name"> <property name="name">
<cstring>groupBox1</cstring> <cstring>groupBox1</cstring>
</property> </property>
@ -170,7 +170,7 @@ path for all source files, but is not required.&lt;/blockquote&gt;</string>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QListBox"> <widget class="TQListBox">
<property name="name"> <property name="name">
<cstring>m_pTypesList</cstring> <cstring>m_pTypesList</cstring>
</property> </property>
@ -180,7 +180,7 @@ path for all source files, but is not required.&lt;/blockquote&gt;</string>
</widget> </widget>
</vbox> </vbox>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout5</cstring> <cstring>layout5</cstring>
</property> </property>
@ -205,7 +205,7 @@ path for all source files, but is not required.&lt;/blockquote&gt;</string>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pAddButton</cstring> <cstring>m_pAddButton</cstring>
</property> </property>
@ -219,7 +219,7 @@ path for all source files, but is not required.&lt;/blockquote&gt;</string>
<string>Adds the selected file type to the current project.</string> <string>Adds the selected file type to the current project.</string>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pRemoveButton</cstring> <cstring>m_pRemoveButton</cstring>
</property> </property>
@ -252,7 +252,7 @@ path for all source files, but is not required.&lt;/blockquote&gt;</string>
</spacer> </spacer>
</vbox> </vbox>
</widget> </widget>
<widget class="QGroupBox"> <widget class="TQGroupBox">
<property name="name"> <property name="name">
<cstring>groupBox2</cstring> <cstring>groupBox2</cstring>
</property> </property>
@ -263,7 +263,7 @@ path for all source files, but is not required.&lt;/blockquote&gt;</string>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLineEdit"> <widget class="TQLineEdit">
<property name="name"> <property name="name">
<cstring>m_pTypesEdit</cstring> <cstring>m_pTypesEdit</cstring>
</property> </property>
@ -271,7 +271,7 @@ path for all source files, but is not required.&lt;/blockquote&gt;</string>
<string>You can enter custom file types here.</string> <string>You can enter custom file types here.</string>
</property> </property>
</widget> </widget>
<widget class="QListBox"> <widget class="TQListBox">
<item> <item>
<property name="text"> <property name="text">
<string>*.c</string> <string>*.c</string>
@ -365,7 +365,7 @@ path for all source files, but is not required.&lt;/blockquote&gt;</string>
</spacer> </spacer>
</hbox> </hbox>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>TabPage</cstring> <cstring>TabPage</cstring>
</property> </property>
@ -376,7 +376,7 @@ path for all source files, but is not required.&lt;/blockquote&gt;</string>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>m_pKernelCheck</cstring> <cstring>m_pKernelCheck</cstring>
</property> </property>
@ -390,7 +390,7 @@ path for all source files, but is not required.&lt;/blockquote&gt;</string>
<string>For kernel projects, symbols are not looked up in the standard include path.</string> <string>For kernel projects, symbols are not looked up in the standard include path.</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>m_pInvCheck</cstring> <cstring>m_pInvCheck</cstring>
</property> </property>
@ -404,7 +404,7 @@ path for all source files, but is not required.&lt;/blockquote&gt;</string>
<string>An inverted index may greatly speed up searches in a large project. The project's building process is longer, though.</string> <string>An inverted index may greatly speed up searches in a large project. The project's building process is longer, though.</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>m_pNoCompCheck</cstring> <cstring>m_pNoCompCheck</cstring>
</property> </property>
@ -415,7 +415,7 @@ path for all source files, but is not required.&lt;/blockquote&gt;</string>
<string></string> <string></string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>m_pSlowPathCheck</cstring> <cstring>m_pSlowPathCheck</cstring>
</property> </property>
@ -423,7 +423,7 @@ path for all source files, but is not required.&lt;/blockquote&gt;</string>
<string>Slower, but more accurate, function definition detection (-D)</string> <string>Slower, but more accurate, function definition detection (-D)</string>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout31</cstring> <cstring>layout31</cstring>
</property> </property>
@ -431,7 +431,7 @@ path for all source files, but is not required.&lt;/blockquote&gt;</string>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>m_pAutoRebuildCheck</cstring> <cstring>m_pAutoRebuildCheck</cstring>
</property> </property>
@ -462,7 +462,7 @@ path for all source files, but is not required.&lt;/blockquote&gt;</string>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>m_pAutoRebuildLabel</cstring> <cstring>m_pAutoRebuildLabel</cstring>
</property> </property>
@ -473,7 +473,7 @@ path for all source files, but is not required.&lt;/blockquote&gt;</string>
<string>(Seconds)</string> <string>(Seconds)</string>
</property> </property>
</widget> </widget>
<widget class="QSpinBox"> <widget class="TQSpinBox">
<property name="name"> <property name="name">
<cstring>m_pAutoRebuildSpin</cstring> <cstring>m_pAutoRebuildSpin</cstring>
</property> </property>
@ -486,7 +486,7 @@ path for all source files, but is not required.&lt;/blockquote&gt;</string>
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout30</cstring> <cstring>layout30</cstring>
</property> </property>
@ -494,7 +494,7 @@ path for all source files, but is not required.&lt;/blockquote&gt;</string>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>m_pACCheck</cstring> <cstring>m_pACCheck</cstring>
</property> </property>
@ -525,7 +525,7 @@ path for all source files, but is not required.&lt;/blockquote&gt;</string>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pACButton</cstring> <cstring>m_pACButton</cstring>
</property> </property>
@ -538,7 +538,7 @@ path for all source files, but is not required.&lt;/blockquote&gt;</string>
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout6</cstring> <cstring>layout6</cstring>
</property> </property>
@ -546,7 +546,7 @@ path for all source files, but is not required.&lt;/blockquote&gt;</string>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>m_pTabWidthCheck</cstring> <cstring>m_pTabWidthCheck</cstring>
</property> </property>
@ -574,7 +574,7 @@ path for all source files, but is not required.&lt;/blockquote&gt;</string>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QSpinBox"> <widget class="TQSpinBox">
<property name="name"> <property name="name">
<cstring>m_pTabWidthSpin</cstring> <cstring>m_pTabWidthSpin</cstring>
</property> </property>
@ -603,7 +603,7 @@ path for all source files, but is not required.&lt;/blockquote&gt;</string>
</spacer> </spacer>
</vbox> </vbox>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>TabPage</cstring> <cstring>TabPage</cstring>
</property> </property>
@ -614,7 +614,7 @@ path for all source files, but is not required.&lt;/blockquote&gt;</string>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel1_4</cstring> <cstring>textLabel1_4</cstring>
</property> </property>
@ -622,7 +622,7 @@ path for all source files, but is not required.&lt;/blockquote&gt;</string>
<string>Ctags command line (Do not change unless you know what you are doing!)</string> <string>Ctags command line (Do not change unless you know what you are doing!)</string>
</property> </property>
</widget> </widget>
<widget class="QTextEdit"> <widget class="TQTextEdit">
<property name="name"> <property name="name">
<cstring>m_pCtagsCmdEdit</cstring> <cstring>m_pCtagsCmdEdit</cstring>
</property> </property>
@ -636,7 +636,7 @@ path for all source files, but is not required.&lt;/blockquote&gt;</string>
</vbox> </vbox>
</widget> </widget>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout19</cstring> <cstring>layout19</cstring>
</property> </property>
@ -661,7 +661,7 @@ path for all source files, but is not required.&lt;/blockquote&gt;</string>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pCreateButton</cstring> <cstring>m_pCreateButton</cstring>
</property> </property>
@ -672,7 +672,7 @@ path for all source files, but is not required.&lt;/blockquote&gt;</string>
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pCancelButton</cstring> <cstring>m_pCancelButton</cstring>
</property> </property>
@ -711,9 +711,9 @@ path for all source files, but is not required.&lt;/blockquote&gt;</string>
</connection> </connection>
<connection> <connection>
<sender>m_pAvailTypesList</sender> <sender>m_pAvailTypesList</sender>
<signal>highlighted(const QString&amp;)</signal> <signal>highlighted(const TQString&amp;)</signal>
<receiver>NewProjectLayout</receiver> <receiver>NewProjectLayout</receiver>
<slot>slotAvailTypesChanged(const QString&amp;)</slot> <slot>slotAvailTypesChanged(const TQString&amp;)</slot>
</connection> </connection>
<connection> <connection>
<sender>m_pTabWidthCheck</sender> <sender>m_pTabWidthCheck</sender>
@ -764,7 +764,7 @@ path for all source files, but is not required.&lt;/blockquote&gt;</string>
<slot access="protected">slotRemoveType()</slot> <slot access="protected">slotRemoveType()</slot>
<slot access="protected">slotAutoRebuildChanged(bool)</slot> <slot access="protected">slotAutoRebuildChanged(bool)</slot>
<slot access="protected">slotAutoCompletionChanged(bool)</slot> <slot access="protected">slotAutoCompletionChanged(bool)</slot>
<slot access="protected">slotAvailTypesChanged(const QString&amp;)</slot> <slot access="protected">slotAvailTypesChanged(const TQString&amp;)</slot>
</slots> </slots>
<layoutdefaults spacing="6" margin="11"/> <layoutdefaults spacing="6" margin="11"/>
<includehints> <includehints>

@ -25,9 +25,9 @@
* *
***************************************************************************/ ***************************************************************************/
#include <qpushbutton.h> #include <ntqpushbutton.h>
#include <qlineedit.h> #include <ntqlineedit.h>
#include <qlistbox.h> #include <ntqlistbox.h>
#include <kurlrequester.h> #include <kurlrequester.h>
#include "openprojectdlg.h" #include "openprojectdlg.h"
#include "kscopeconfig.h" #include "kscopeconfig.h"
@ -37,7 +37,7 @@
* @param pParent The parent widget * @param pParent The parent widget
* @param szName The widget's name * @param szName The widget's name
*/ */
OpenProjectDlg::OpenProjectDlg(QWidget* pParent, const char* szName) : OpenProjectDlg::OpenProjectDlg(TQWidget* pParent, const char* szName) :
OpenProjectLayout(pParent, szName) OpenProjectLayout(pParent, szName)
{ {
loadRecent(); loadRecent();
@ -54,7 +54,7 @@ OpenProjectDlg::~OpenProjectDlg()
/** /**
* @return The selected project path * @return The selected project path
*/ */
QString OpenProjectDlg::getPath() const TQString OpenProjectDlg::getPath() const
{ {
return m_pProjPathRequester->url(); return m_pProjPathRequester->url();
} }
@ -64,9 +64,9 @@ QString OpenProjectDlg::getPath() const
* the cscope.proj file. * the cscope.proj file.
* @param sProjPath The full path of the selected cscope.proj file * @param sProjPath The full path of the selected cscope.proj file
*/ */
void OpenProjectDlg::slotProjectSelected(const QString& sProjPath) void OpenProjectDlg::slotProjectSelected(const TQString& sProjPath)
{ {
QFileInfo fi(sProjPath); TQFileInfo fi(sProjPath);
m_pProjPathRequester->setURL(fi.dirPath(true)); m_pProjPathRequester->setURL(fi.dirPath(true));
} }
@ -76,7 +76,7 @@ void OpenProjectDlg::slotProjectSelected(const QString& sProjPath)
*/ */
void OpenProjectDlg::slotRemoveRecent() void OpenProjectDlg::slotRemoveRecent()
{ {
QListBoxItem* pItem; TQListBoxItem* pItem;
// Remove the selected item, if any // Remove the selected item, if any
pItem = m_pRecentList->selectedItem(); pItem = m_pRecentList->selectedItem();
@ -93,7 +93,7 @@ void OpenProjectDlg::slotRemoveRecent()
* list box. * list box.
* @param pItem The selected project item * @param pItem The selected project item
*/ */
void OpenProjectDlg::slotSelectRecent(QListBoxItem* pItem) void OpenProjectDlg::slotSelectRecent(TQListBoxItem* pItem)
{ {
if (pItem != NULL) if (pItem != NULL)
m_pProjPathRequester->setURL(pItem->text()); m_pProjPathRequester->setURL(pItem->text());
@ -106,7 +106,7 @@ void OpenProjectDlg::slotSelectRecent(QListBoxItem* pItem)
* projects list box. * projects list box.
* @param pItem The selected project item * @param pItem The selected project item
*/ */
void OpenProjectDlg::slotOpenRecent(QListBoxItem* pItem) void OpenProjectDlg::slotOpenRecent(TQListBoxItem* pItem)
{ {
if (pItem != NULL) { if (pItem != NULL) {
m_pProjPathRequester->setURL(pItem->text()); m_pProjPathRequester->setURL(pItem->text());
@ -120,8 +120,8 @@ void OpenProjectDlg::slotOpenRecent(QListBoxItem* pItem)
*/ */
void OpenProjectDlg::loadRecent() void OpenProjectDlg::loadRecent()
{ {
const QStringList& slProjects = Config().getRecentProjects(); const TQStringList& slProjects = Config().getRecentProjects();
QStringList::const_iterator itr; TQStringList::const_iterator itr;
// Create a list item for each project in the list // Create a list item for each project in the list
for (itr = slProjects.begin(); itr != slProjects.end(); ++itr) for (itr = slProjects.begin(); itr != slProjects.end(); ++itr)

@ -28,7 +28,7 @@
#ifndef OPENPROJECTDLG_H #ifndef OPENPROJECTDLG_H
#define OPENPROJECTDLG_H #define OPENPROJECTDLG_H
#include <qwidget.h> #include <ntqwidget.h>
#include <openprojectlayout.h> #include <openprojectlayout.h>
/** /**
@ -43,16 +43,16 @@ class OpenProjectDlg : public OpenProjectLayout
Q_OBJECT Q_OBJECT
public: public:
OpenProjectDlg(QWidget* pParent = 0, const char* szName = 0); OpenProjectDlg(TQWidget* pParent = 0, const char* szName = 0);
~OpenProjectDlg(); ~OpenProjectDlg();
QString getPath() const; TQString getPath() const;
protected slots: protected slots:
virtual void slotProjectSelected(const QString&); virtual void slotProjectSelected(const TQString&);
virtual void slotRemoveRecent(); virtual void slotRemoveRecent();
virtual void slotSelectRecent(QListBoxItem*); virtual void slotSelectRecent(TQListBoxItem*);
virtual void slotOpenRecent(QListBoxItem*); virtual void slotOpenRecent(TQListBoxItem*);
private: private:
void loadRecent(); void loadRecent();

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>OpenProjectLayout</class> <class>OpenProjectLayout</class>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>OpenProjectLayout</cstring> <cstring>OpenProjectLayout</cstring>
</property> </property>
@ -19,7 +19,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QButtonGroup"> <widget class="TQButtonGroup">
<property name="name"> <property name="name">
<cstring>buttonGroup5</cstring> <cstring>buttonGroup5</cstring>
</property> </property>
@ -37,7 +37,7 @@
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QButtonGroup"> <widget class="TQButtonGroup">
<property name="name"> <property name="name">
<cstring>buttonGroup6</cstring> <cstring>buttonGroup6</cstring>
</property> </property>
@ -48,12 +48,12 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QListBox"> <widget class="TQListBox">
<property name="name"> <property name="name">
<cstring>m_pRecentList</cstring> <cstring>m_pRecentList</cstring>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout9</cstring> <cstring>layout9</cstring>
</property> </property>
@ -78,7 +78,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pRemoveButton</cstring> <cstring>m_pRemoveButton</cstring>
</property> </property>
@ -90,7 +90,7 @@
</widget> </widget>
</vbox> </vbox>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout9</cstring> <cstring>layout9</cstring>
</property> </property>
@ -115,7 +115,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pOpenButton</cstring> <cstring>m_pOpenButton</cstring>
</property> </property>
@ -129,7 +129,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pCancelButton</cstring> <cstring>m_pCancelButton</cstring>
</property> </property>
@ -164,34 +164,34 @@
</connection> </connection>
<connection> <connection>
<sender>m_pRecentList</sender> <sender>m_pRecentList</sender>
<signal>highlighted(QListBoxItem*)</signal> <signal>highlighted(TQListBoxItem*)</signal>
<receiver>OpenProjectLayout</receiver> <receiver>OpenProjectLayout</receiver>
<slot>slotSelectRecent(QListBoxItem*)</slot> <slot>slotSelectRecent(TQListBoxItem*)</slot>
</connection> </connection>
<connection> <connection>
<sender>m_pRecentList</sender> <sender>m_pRecentList</sender>
<signal>doubleClicked(QListBoxItem*)</signal> <signal>doubleClicked(TQListBoxItem*)</signal>
<receiver>OpenProjectLayout</receiver> <receiver>OpenProjectLayout</receiver>
<slot>slotOpenRecent(QListBoxItem*)</slot> <slot>slotOpenRecent(TQListBoxItem*)</slot>
</connection> </connection>
<connection> <connection>
<sender>m_pProjPathRequester</sender> <sender>m_pProjPathRequester</sender>
<signal>urlSelected(const QString&amp;)</signal> <signal>urlSelected(const TQString&amp;)</signal>
<receiver>OpenProjectLayout</receiver> <receiver>OpenProjectLayout</receiver>
<slot>slotProjectSelected(const QString&amp;)</slot> <slot>slotProjectSelected(const TQString&amp;)</slot>
</connection> </connection>
<connection> <connection>
<sender>m_pRecentList</sender> <sender>m_pRecentList</sender>
<signal>returnPressed(QListBoxItem*)</signal> <signal>returnPressed(TQListBoxItem*)</signal>
<receiver>OpenProjectLayout</receiver> <receiver>OpenProjectLayout</receiver>
<slot>slotOpenRecent(QListBoxItem*)</slot> <slot>slotOpenRecent(TQListBoxItem*)</slot>
</connection> </connection>
</connections> </connections>
<slots> <slots>
<slot access="protected">slotRemoveRecent()</slot> <slot access="protected">slotRemoveRecent()</slot>
<slot access="protected">slotSelectRecent(QListBoxItem*)</slot> <slot access="protected">slotSelectRecent(TQListBoxItem*)</slot>
<slot access="protected">slotOpenRecent(QListBoxItem*)</slot> <slot access="protected">slotOpenRecent(TQListBoxItem*)</slot>
<slot access="protected">slotProjectSelected(const QString&amp;)</slot> <slot access="protected">slotProjectSelected(const TQString&amp;)</slot>
</slots> </slots>
<layoutdefaults spacing="6" margin="11"/> <layoutdefaults spacing="6" margin="11"/>
<includehints> <includehints>

@ -25,8 +25,8 @@
* *
***************************************************************************/ ***************************************************************************/
#include <qlistview.h> #include <ntqlistview.h>
#include <qpainter.h> #include <ntqpainter.h>
#include <kcolordialog.h> #include <kcolordialog.h>
#include "prefcolor.h" #include "prefcolor.h"
#include "kscopeconfig.h" #include "kscopeconfig.h"
@ -38,7 +38,7 @@
* colour. * colour.
* @author Elad Lahav * @author Elad Lahav
*/ */
class ColorListItem : public QListViewItem class ColorListItem : public TQListViewItem
{ {
public: public:
/** /**
@ -46,8 +46,8 @@ public:
* @param pList The owner list view * @param pList The owner list view
* @param ce The GUI element shown by this item * @param ce The GUI element shown by this item
*/ */
ColorListItem(QListView* pList, KScopeConfig::ColorElement ce) : ColorListItem(TQListView* pList, KScopeConfig::ColorElement ce) :
QListViewItem(pList, Config().getColorName(ce), ""), TQListViewItem(pList, Config().getColorName(ce), ""),
m_ce(ce) { m_ce(ce) {
setColor(Config().getColor(ce)); setColor(Config().getColor(ce));
} }
@ -64,9 +64,9 @@ public:
* The colour set by this function is returned by getColor(). * The colour set by this function is returned by getColor().
* @param clr The colour to set * @param clr The colour to set
*/ */
void setColor(QColor clr) { void setColor(TQColor clr) {
QPixmap pix; TQPixmap pix;
QPainter painter; TQPainter painter;
int nWidth, nHeight; int nWidth, nHeight;
// Remember the colour // Remember the colour
@ -90,14 +90,14 @@ public:
/** /**
* @return The colour associated with this item * @return The colour associated with this item
*/ */
QColor getColor() { return m_clr; } TQColor getColor() { return m_clr; }
private: private:
/** The GUI element shown by this item. */ /** The GUI element shown by this item. */
KScopeConfig::ColorElement m_ce; KScopeConfig::ColorElement m_ce;
/** The colour associated with this item. */ /** The colour associated with this item. */
QColor m_clr; TQColor m_clr;
}; };
/** /**
@ -105,10 +105,10 @@ private:
* @param pParent The parent widget * @param pParent The parent widget
* @param szName The widget's name * @param szName The widget's name
*/ */
PrefColor::PrefColor(QWidget* pParent, const char* szName) : PrefColor::PrefColor(TQWidget* pParent, const char* szName) :
PrefColorLayout(pParent, szName) PrefColorLayout(pParent, szName)
{ {
m_pList->setColumnWidthMode(1, QListView::Manual); m_pList->setColumnWidthMode(1, TQListView::Manual);
// Set initial values // Set initial values
load(); load();
@ -156,14 +156,14 @@ void PrefColor::apply()
* signals of the list view. * signals of the list view.
* @param pItem The selected item * @param pItem The selected item
*/ */
void PrefColor::slotItemSelected(QListViewItem* pItem) void PrefColor::slotItemSelected(TQListViewItem* pItem)
{ {
ColorListItem* pClrItem; ColorListItem* pClrItem;
QColor clr; TQColor clr;
pClrItem = (ColorListItem*)pItem; pClrItem = (ColorListItem*)pItem;
if (KColorDialog::getColor(clr, pClrItem->getColor()) == if (KColorDialog::getColor(clr, pClrItem->getColor()) ==
QDialog::Accepted) { TQDialog::Accepted) {
pClrItem->setColor(clr); pClrItem->setColor(clr);
emit modified(); emit modified();
} }

@ -39,7 +39,7 @@ class PrefColor : public PrefColorLayout
Q_OBJECT Q_OBJECT
public: public:
PrefColor(QWidget* pParent = 0, const char* szName = 0); PrefColor(TQWidget* pParent = 0, const char* szName = 0);
~PrefColor(); ~PrefColor();
void load(); void load();
@ -53,7 +53,7 @@ signals:
void modified(); void modified();
protected slots: protected slots:
void slotItemSelected(QListViewItem*); void slotItemSelected(TQListViewItem*);
}; };
#endif #endif

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>PrefColorLayout</class> <class>PrefColorLayout</class>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>PrefColorLayout</cstring> <cstring>PrefColorLayout</cstring>
</property> </property>
@ -19,7 +19,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QListView"> <widget class="TQListView">
<column> <column>
<property name="text"> <property name="text">
<string>GUI Element</string> <string>GUI Element</string>
@ -51,19 +51,19 @@
<connections> <connections>
<connection> <connection>
<sender>m_pList</sender> <sender>m_pList</sender>
<signal>doubleClicked(QListViewItem*)</signal> <signal>doubleClicked(TQListViewItem*)</signal>
<receiver>PrefColorLayout</receiver> <receiver>PrefColorLayout</receiver>
<slot>slotItemSelected(QListViewItem*)</slot> <slot>slotItemSelected(TQListViewItem*)</slot>
</connection> </connection>
<connection> <connection>
<sender>m_pList</sender> <sender>m_pList</sender>
<signal>returnPressed(QListViewItem*)</signal> <signal>returnPressed(TQListViewItem*)</signal>
<receiver>PrefColorLayout</receiver> <receiver>PrefColorLayout</receiver>
<slot>slotItemSelected(QListViewItem*)</slot> <slot>slotItemSelected(TQListViewItem*)</slot>
</connection> </connection>
</connections> </connections>
<slots> <slots>
<slot access="protected">slotItemSelected(QListViewItem*)</slot> <slot access="protected">slotItemSelected(TQListViewItem*)</slot>
</slots> </slots>
<layoutdefaults spacing="6" margin="11"/> <layoutdefaults spacing="6" margin="11"/>
</UI> </UI>

@ -25,12 +25,12 @@
* *
***************************************************************************/ ***************************************************************************/
#include <qlayout.h> #include <ntqlayout.h>
#include <klocale.h> #include <klocale.h>
#include <kiconloader.h> #include <kiconloader.h>
#include <kurlrequester.h> #include <kurlrequester.h>
#include <klineedit.h> #include <klineedit.h>
#include <qcheckbox.h> #include <ntqcheckbox.h>
#include <kcolorbutton.h> #include <kcolorbutton.h>
#include <kmessagebox.h> #include <kmessagebox.h>
#include <kfontrequester.h> #include <kfontrequester.h>
@ -51,33 +51,33 @@
* @param pParent The parent widget * @param pParent The parent widget
* @param szName The widget's name * @param szName The widget's name
*/ */
PreferencesDlg::PreferencesDlg(uint nPage, QWidget* pParent, PreferencesDlg::PreferencesDlg(uint nPage, TQWidget* pParent,
const char* szName) : const char* szName) :
KDialogBase(IconList, i18n("Preferences"), Default | Ok | Apply | Cancel, KDialogBase(IconList, i18n("Preferences"), Default | Ok | Apply | Cancel,
Ok, pParent, szName, 0) Ok, pParent, szName, 0)
{ {
QFrame* pFrame; TQFrame* pFrame;
QVBoxLayout* pLayout; TQVBoxLayout* pLayout;
// Create and add the "Frontend" page // Create and add the "Frontend" page
pFrame = addPage(i18n("Programmes"), pFrame = addPage(i18n("Programmes"),
i18n("Paths to back-end programmes"), i18n("Paths to back-end programmes"),
KGlobal::iconLoader()->loadIcon("run", KIcon::Panel, 0, false)); KGlobal::iconLoader()->loadIcon("run", KIcon::Panel, 0, false));
pLayout = new QVBoxLayout(pFrame, 0, 0); pLayout = new TQVBoxLayout(pFrame, 0, 0);
m_pPrefFrontend = new PrefFrontend(pFrame); m_pPrefFrontend = new PrefFrontend(pFrame);
pLayout->addWidget(m_pPrefFrontend); pLayout->addWidget(m_pPrefFrontend);
// Create and add the "Colours" page // Create and add the "Colours" page
pFrame = addPage(i18n("Colours"), i18n("Window colours"), pFrame = addPage(i18n("Colours"), i18n("Window colours"),
KGlobal::iconLoader()->loadIcon("colors", KIcon::Panel, 0, false)); KGlobal::iconLoader()->loadIcon("colors", KIcon::Panel, 0, false));
pLayout = new QVBoxLayout(pFrame, 0, 0); pLayout = new TQVBoxLayout(pFrame, 0, 0);
m_pPrefColor = new PrefColor(pFrame); m_pPrefColor = new PrefColor(pFrame);
pLayout->addWidget(m_pPrefColor); pLayout->addWidget(m_pPrefColor);
// Create and add the "Fonts" page // Create and add the "Fonts" page
pFrame = addPage(i18n("Fonts"), i18n("Window fonts"), pFrame = addPage(i18n("Fonts"), i18n("Window fonts"),
KGlobal::iconLoader()->loadIcon("fonts", KIcon::Panel, 0, false)); KGlobal::iconLoader()->loadIcon("fonts", KIcon::Panel, 0, false));
pLayout = new QVBoxLayout(pFrame, 0, 0); pLayout = new TQVBoxLayout(pFrame, 0, 0);
m_pPrefFont = new PrefFont(pFrame); m_pPrefFont = new PrefFont(pFrame);
pLayout->addWidget(m_pPrefFont); pLayout->addWidget(m_pPrefFont);
@ -85,7 +85,7 @@ PreferencesDlg::PreferencesDlg(uint nPage, QWidget* pParent,
pFrame = addPage(i18n("Options"), i18n("Misc. Options"), pFrame = addPage(i18n("Options"), i18n("Misc. Options"),
KGlobal::iconLoader()->loadIcon("package_settings", KGlobal::iconLoader()->loadIcon("package_settings",
KIcon::Panel, 0, false)); KIcon::Panel, 0, false));
pLayout = new QVBoxLayout(pFrame, 0, 0); pLayout = new TQVBoxLayout(pFrame, 0, 0);
m_pPrefOpt = new PrefOpt(pFrame); m_pPrefOpt = new PrefOpt(pFrame);
pLayout->addWidget(m_pPrefOpt); pLayout->addWidget(m_pPrefOpt);

@ -28,7 +28,7 @@
#ifndef PREFERENCESDLG_H #ifndef PREFERENCESDLG_H
#define PREFERENCESDLG_H #define PREFERENCESDLG_H
#include <qwidget.h> #include <ntqwidget.h>
#include <kdialogbase.h> #include <kdialogbase.h>
class PrefFrontend; class PrefFrontend;
@ -50,7 +50,7 @@ class PreferencesDlg : public KDialogBase
Q_OBJECT Q_OBJECT
public: public:
PreferencesDlg(uint nPage = Frontend, QWidget* pParent = 0, const char* PreferencesDlg(uint nPage = Frontend, TQWidget* pParent = 0, const char*
szName = 0); szName = 0);
~PreferencesDlg(); ~PreferencesDlg();

@ -25,8 +25,8 @@
* *
***************************************************************************/ ***************************************************************************/
#include <qlistview.h> #include <ntqlistview.h>
#include <qpainter.h> #include <ntqpainter.h>
#include <kfontdialog.h> #include <kfontdialog.h>
#include <klocale.h> #include <klocale.h>
#include "preffont.h" #include "preffont.h"
@ -38,7 +38,7 @@
* The font is presented in the form of a sample text drawn using this font. * The font is presented in the form of a sample text drawn using this font.
* @author Elad Lahav * @author Elad Lahav
*/ */
class FontListItem : public QListViewItem class FontListItem : public TQListViewItem
{ {
public: public:
/** /**
@ -46,8 +46,8 @@ public:
* @param pList The owner list view * @param pList The owner list view
* @param fe The GUI element shown by this item * @param fe The GUI element shown by this item
*/ */
FontListItem(QListView* pList, KScopeConfig::FontElement fe) : FontListItem(TQListView* pList, KScopeConfig::FontElement fe) :
QListViewItem(pList, Config().getFontName(fe), ""), TQListViewItem(pList, Config().getFontName(fe), ""),
m_fe(fe) { m_fe(fe) {
setFont(Config().getFont(fe)); setFont(Config().getFont(fe));
} }
@ -64,18 +64,18 @@ public:
* The font set by this function is returned by getFont(). * The font set by this function is returned by getFont().
* @param font The font to set * @param font The font to set
*/ */
void setFont(QFont font) { void setFont(TQFont font) {
QPixmap pix; TQPixmap pix;
QFontMetrics fm(font); TQFontMetrics fm(font);
QPainter painter; TQPainter painter;
QRect rc; TQRect rc;
// Remember the font // Remember the font
m_font = font; m_font = font;
// Set the pixmap's size so it can contain the sample text // Set the pixmap's size so it can contain the sample text
rc = fm.boundingRect(i18n("Sample")); rc = fm.boundingRect(i18n("Sample"));
rc.moveTopLeft(QPoint(0, 0)); rc.moveTopLeft(TQPoint(0, 0));
pix.resize(rc.width(), rc.height()); pix.resize(rc.width(), rc.height());
// Draw on the pixmap // Draw on the pixmap
@ -83,7 +83,7 @@ public:
painter.begin(&pix); painter.begin(&pix);
painter.setFont(font); painter.setFont(font);
painter.setPen(black); painter.setPen(black);
painter.drawText(rc, Qt::AlignHCenter | Qt::AlignVCenter, painter.drawText(rc, TQt::AlignHCenter | TQt::AlignVCenter,
i18n("Sample")); i18n("Sample"));
painter.end(); painter.end();
@ -94,14 +94,14 @@ public:
/** /**
* @return The font associated with this item * @return The font associated with this item
*/ */
QFont getFont() { return m_font; } TQFont getFont() { return m_font; }
private: private:
/** The GUI element shown by this item. */ /** The GUI element shown by this item. */
KScopeConfig::FontElement m_fe; KScopeConfig::FontElement m_fe;
/** The font associated with this item. */ /** The font associated with this item. */
QFont m_font; TQFont m_font;
}; };
/** /**
@ -109,7 +109,7 @@ private:
* @param pParent The parent widget * @param pParent The parent widget
* @param szName The widget's name * @param szName The widget's name
*/ */
PrefFont::PrefFont(QWidget* pParent, const char* szName) : PrefFont::PrefFont(TQWidget* pParent, const char* szName) :
PrefFontLayout(pParent, szName) PrefFontLayout(pParent, szName)
{ {
// Set initial values // Set initial values
@ -158,14 +158,14 @@ void PrefFont::apply()
* signals of the list view. * signals of the list view.
* @param pItem The selected item * @param pItem The selected item
*/ */
void PrefFont::slotItemSelected(QListViewItem* pItem) void PrefFont::slotItemSelected(TQListViewItem* pItem)
{ {
FontListItem* pFontItem; FontListItem* pFontItem;
QFont font; TQFont font;
pFontItem = (FontListItem*)pItem; pFontItem = (FontListItem*)pItem;
font = pFontItem->getFont(); font = pFontItem->getFont();
if (KFontDialog::getFont(font) == QDialog::Accepted) { if (KFontDialog::getFont(font) == TQDialog::Accepted) {
pFontItem->setFont(font); pFontItem->setFont(font);
emit modified(); emit modified();
} }

@ -40,7 +40,7 @@ class PrefFont : public PrefFontLayout
Q_OBJECT Q_OBJECT
public: public:
PrefFont(QWidget* pParent = 0, const char* szName = 0); PrefFont(TQWidget* pParent = 0, const char* szName = 0);
~PrefFont(); ~PrefFont();
void load(); void load();
@ -54,7 +54,7 @@ signals:
void modified(); void modified();
protected slots: protected slots:
void slotItemSelected(QListViewItem*); void slotItemSelected(TQListViewItem*);
}; };
#endif #endif

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>PrefFontLayout</class> <class>PrefFontLayout</class>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>PrefFontLayout</cstring> <cstring>PrefFontLayout</cstring>
</property> </property>
@ -19,7 +19,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QListView"> <widget class="TQListView">
<column> <column>
<property name="text"> <property name="text">
<string>GUI Element</string> <string>GUI Element</string>
@ -51,19 +51,19 @@
<connections> <connections>
<connection> <connection>
<sender>m_pList</sender> <sender>m_pList</sender>
<signal>doubleClicked(QListViewItem*)</signal> <signal>doubleClicked(TQListViewItem*)</signal>
<receiver>PrefFontLayout</receiver> <receiver>PrefFontLayout</receiver>
<slot>slotItemSelected(QListViewItem*)</slot> <slot>slotItemSelected(TQListViewItem*)</slot>
</connection> </connection>
<connection> <connection>
<sender>m_pList</sender> <sender>m_pList</sender>
<signal>returnPressed(QListViewItem*)</signal> <signal>returnPressed(TQListViewItem*)</signal>
<receiver>PrefFontLayout</receiver> <receiver>PrefFontLayout</receiver>
<slot>slotItemSelected(QListViewItem*)</slot> <slot>slotItemSelected(TQListViewItem*)</slot>
</connection> </connection>
</connections> </connections>
<slots> <slots>
<slot access="protected">slotItemSelected(QListViewItem*)</slot> <slot access="protected">slotItemSelected(TQListViewItem*)</slot>
</slots> </slots>
<layoutdefaults spacing="6" margin="11"/> <layoutdefaults spacing="6" margin="11"/>
</UI> </UI>

@ -25,8 +25,8 @@
* *
***************************************************************************/ ***************************************************************************/
#include <qcheckbox.h> #include <ntqcheckbox.h>
#include <qtextedit.h> #include <ntqtextedit.h>
#include <kurlrequester.h> #include <kurlrequester.h>
#include <klineedit.h> #include <klineedit.h>
#include <kstandarddirs.h> #include <kstandarddirs.h>
@ -40,7 +40,7 @@
* @param pParent The parent widget * @param pParent The parent widget
* @param szName The widget's name * @param szName The widget's name
*/ */
PrefFrontend::PrefFrontend(QWidget* pParent, const char* szName) : PrefFrontend::PrefFrontend(TQWidget* pParent, const char* szName) :
PrefFrontendLayout(pParent, szName) PrefFrontendLayout(pParent, szName)
{ {
// Set initial values // Set initial values
@ -51,11 +51,11 @@ PrefFrontend::PrefFrontend(QWidget* pParent, const char* szName) :
SLOT(slotGuessPaths())); SLOT(slotGuessPaths()));
// Emit the modified() signal when a new path is set // Emit the modified() signal when a new path is set
connect(m_pCscopeURL, SIGNAL(textChanged(const QString&)), this, connect(m_pCscopeURL, SIGNAL(textChanged(const TQString&)), this,
SIGNAL(modified())); SIGNAL(modified()));
connect(m_pCtagsURL, SIGNAL(textChanged(const QString&)), this, connect(m_pCtagsURL, SIGNAL(textChanged(const TQString&)), this,
SIGNAL(modified())); SIGNAL(modified()));
connect(m_pDotURL, SIGNAL(textChanged(const QString&)), this, connect(m_pDotURL, SIGNAL(textChanged(const TQString&)), this,
SIGNAL(modified())); SIGNAL(modified()));
} }
@ -94,7 +94,7 @@ void PrefFrontend::apply()
* edit widgets. By emitting the modified() signal, the widget notifies the * edit widgets. By emitting the modified() signal, the widget notifies the
* parent dialog it should enable the "Apply" button. * parent dialog it should enable the "Apply" button.
*/ */
void PrefFrontend::slotChanged(const QString&) void PrefFrontend::slotChanged(const TQString&)
{ {
emit modified(); emit modified();
} }
@ -117,8 +117,8 @@ void PrefFrontend::slotGuessPaths()
// Show tests and results in the text widget // Show tests and results in the text widget
connect(pConf, SIGNAL(test(uint)), this, connect(pConf, SIGNAL(test(uint)), this,
SLOT(slotAutoConfigTest(uint))); SLOT(slotAutoConfigTest(uint)));
connect(pConf, SIGNAL(result(uint, const QString&)), this, connect(pConf, SIGNAL(result(uint, const TQString&)), this,
SLOT(slotAutoConfigResult(uint, const QString&))); SLOT(slotAutoConfigResult(uint, const TQString&)));
// Run the script // Run the script
pConf->run(m_pCscopeURL->url(), m_pCtagsURL->url(), pConf->run(m_pCscopeURL->url(), m_pCtagsURL->url(),
@ -175,9 +175,9 @@ void PrefFrontend::slotAutoConfigTest(uint nType)
* @param nType The type of test that was executed * @param nType The type of test that was executed
* @param sResult The test's result * @param sResult The test's result
*/ */
void PrefFrontend::slotAutoConfigResult(uint nType, const QString& sResult) void PrefFrontend::slotAutoConfigResult(uint nType, const TQString& sResult)
{ {
QString sLine; TQString sLine;
sLine = sResult + "\n"; sLine = sResult + "\n";

@ -28,7 +28,7 @@
#ifndef PREFFRONTENDDLG_H #ifndef PREFFRONTENDDLG_H
#define PREFFRONTENDDLG_H #define PREFFRONTENDDLG_H
#include <qwidget.h> #include <ntqwidget.h>
#include <preffrontendlayout.h> #include <preffrontendlayout.h>
/** /**
@ -42,7 +42,7 @@ class PrefFrontend : public PrefFrontendLayout
Q_OBJECT Q_OBJECT
public: public:
PrefFrontend(QWidget* pParent = 0, const char* szName = 0); PrefFrontend(TQWidget* pParent = 0, const char* szName = 0);
~PrefFrontend(); ~PrefFrontend();
void load(); void load();
@ -56,10 +56,10 @@ signals:
void modified(); void modified();
private slots: private slots:
void slotChanged(const QString&); void slotChanged(const TQString&);
void slotGuessPaths(); void slotGuessPaths();
void slotAutoConfigTest(uint); void slotAutoConfigTest(uint);
void slotAutoConfigResult(uint, const QString&); void slotAutoConfigResult(uint, const TQString&);
}; };
#endif #endif

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>PrefFrontendLayout</class> <class>PrefFrontendLayout</class>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>PrefFrontendLayout</cstring> <cstring>PrefFrontendLayout</cstring>
</property> </property>
@ -19,7 +19,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout20</cstring> <cstring>layout20</cstring>
</property> </property>
@ -27,7 +27,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout19</cstring> <cstring>layout19</cstring>
</property> </property>
@ -35,7 +35,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel1</cstring> <cstring>textLabel1</cstring>
</property> </property>
@ -51,7 +51,7 @@
<string>Cscope path:</string> <string>Cscope path:</string>
</property> </property>
</widget> </widget>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel2</cstring> <cstring>textLabel2</cstring>
</property> </property>
@ -67,7 +67,7 @@
<string>Ctags path:</string> <string>Ctags path:</string>
</property> </property>
</widget> </widget>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel1_2</cstring> <cstring>textLabel1_2</cstring>
</property> </property>
@ -77,7 +77,7 @@
</widget> </widget>
</vbox> </vbox>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout18</cstring> <cstring>layout18</cstring>
</property> </property>
@ -126,7 +126,7 @@
<enum>Horizontal</enum> <enum>Horizontal</enum>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout4</cstring> <cstring>layout4</cstring>
</property> </property>
@ -151,7 +151,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pGuessButton</cstring> <cstring>m_pGuessButton</cstring>
</property> </property>
@ -161,7 +161,7 @@
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QTextEdit"> <widget class="TQTextEdit">
<property name="name"> <property name="name">
<cstring>m_pScriptText</cstring> <cstring>m_pScriptText</cstring>
</property> </property>

@ -25,10 +25,10 @@
* *
***************************************************************************/ ***************************************************************************/
#include <qcheckbox.h> #include <ntqcheckbox.h>
#include <qradiobutton.h> #include <ntqradiobutton.h>
#include <qlineedit.h> #include <ntqlineedit.h>
#include <qlabel.h> #include <ntqlabel.h>
#include "prefopt.h" #include "prefopt.h"
#include "kscopeconfig.h" #include "kscopeconfig.h"
@ -37,7 +37,7 @@
* @param pParent The parent widget * @param pParent The parent widget
* @param szName The widget's name * @param szName The widget's name
*/ */
PrefOpt::PrefOpt(QWidget* pParent, const char* szName) PrefOpt::PrefOpt(TQWidget* pParent, const char* szName)
: PrefOptLayout(pParent, szName) : PrefOptLayout(pParent, szName)
{ {
// Set initial values // Set initial values
@ -58,7 +58,7 @@ PrefOpt::PrefOpt(QWidget* pParent, const char* szName)
SIGNAL(modified())); SIGNAL(modified()));
connect(m_pAutoSortCheck, SIGNAL(toggled(bool)), this, connect(m_pAutoSortCheck, SIGNAL(toggled(bool)), this,
SIGNAL(modified())); SIGNAL(modified()));
connect(m_pExtEditorEdit, SIGNAL(textChanged(const QString&)), this, connect(m_pExtEditorEdit, SIGNAL(textChanged(const TQString&)), this,
SIGNAL(modified())); SIGNAL(modified()));
connect(m_pSysProfileCB, SIGNAL(activated(int)), this, connect(m_pSysProfileCB, SIGNAL(activated(int)), this,
SIGNAL(modified())); SIGNAL(modified()));

@ -40,7 +40,7 @@ class PrefOpt : public PrefOptLayout
Q_OBJECT Q_OBJECT
public: public:
PrefOpt(QWidget* pParent = 0, const char* szName = 0); PrefOpt(TQWidget* pParent = 0, const char* szName = 0);
~PrefOpt(); ~PrefOpt();
void load(); void load();

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>PrefOptLayout</class> <class>PrefOptLayout</class>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>PrefOptLayout</cstring> <cstring>PrefOptLayout</cstring>
</property> </property>
@ -22,7 +22,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout7</cstring> <cstring>layout7</cstring>
</property> </property>
@ -30,7 +30,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>m_pExtEditorLabel</cstring> <cstring>m_pExtEditorLabel</cstring>
</property> </property>
@ -41,7 +41,7 @@
<string>External Editor</string> <string>External Editor</string>
</property> </property>
</widget> </widget>
<widget class="QLineEdit"> <widget class="TQLineEdit">
<property name="name"> <property name="name">
<cstring>m_pExtEditorEdit</cstring> <cstring>m_pExtEditorEdit</cstring>
</property> </property>
@ -59,7 +59,7 @@
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>m_pReadOnlyCheck</cstring> <cstring>m_pReadOnlyCheck</cstring>
</property> </property>
@ -73,7 +73,7 @@
<string>Forces all editor windows to work in a read-only mode, so that the user cannot modify the displayed files.</string> <string>Forces all editor windows to work in a read-only mode, so that the user cannot modify the displayed files.</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>m_pLastProjCheck</cstring> <cstring>m_pLastProjCheck</cstring>
</property> </property>
@ -81,7 +81,7 @@
<string>Open Last Project on Start-Up</string> <string>Open Last Project on Start-Up</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>m_pTagHlCheck</cstring> <cstring>m_pTagHlCheck</cstring>
</property> </property>
@ -92,7 +92,7 @@
<string>Determines whether the tag list should highlight the relevant tag based on the cursor's position.</string> <string>Determines whether the tag list should highlight the relevant tag based on the cursor's position.</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>m_pBriefQueryCaptCheck</cstring> <cstring>m_pBriefQueryCaptCheck</cstring>
</property> </property>
@ -103,7 +103,7 @@
<string>If set, the tab captions for query pages will be shortened, by using aliases for the query types.</string> <string>If set, the tab captions for query pages will be shortened, by using aliases for the query types.</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>m_pWarnModifiedOnDiskCheck</cstring> <cstring>m_pWarnModifiedOnDiskCheck</cstring>
</property> </property>
@ -114,7 +114,7 @@
<string>If set, the user is prompted whenever the currently edited file is changed by an external programme.</string> <string>If set, the user is prompted whenever the currently edited file is changed by an external programme.</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>m_pAutoSortCheck</cstring> <cstring>m_pAutoSortCheck</cstring>
</property> </property>
@ -128,7 +128,7 @@
<string>Sorts files in the project's file list when a project is loaded. This may be too slow for large projects on older machines.</string> <string>Sorts files in the project's file list when a project is loaded. This may be too slow for large projects on older machines.</string>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout2</cstring> <cstring>layout2</cstring>
</property> </property>
@ -136,7 +136,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel1</cstring> <cstring>textLabel1</cstring>
</property> </property>
@ -144,7 +144,7 @@
<string>System Profile</string> <string>System Profile</string>
</property> </property>
</widget> </widget>
<widget class="QComboBox"> <widget class="TQComboBox">
<item> <item>
<property name="text"> <property name="text">
<string>Fast</string> <string>Fast</string>
@ -161,7 +161,7 @@
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout3</cstring> <cstring>layout3</cstring>
</property> </property>
@ -169,7 +169,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel2</cstring> <cstring>textLabel2</cstring>
</property> </property>
@ -177,7 +177,7 @@
<string>Editor Popup Menu</string> <string>Editor Popup Menu</string>
</property> </property>
</widget> </widget>
<widget class="QComboBox"> <widget class="TQComboBox">
<item> <item>
<property name="text"> <property name="text">
<string>Embedded</string> <string>Embedded</string>

@ -34,8 +34,8 @@
* @param pParent The parent widget * @param pParent The parent widget
* @param szName The widget's name * @param szName The widget's name
*/ */
ProgressDlg::ProgressDlg(const QString& sCaption, const QString& sText, ProgressDlg::ProgressDlg(const TQString& sCaption, const TQString& sText,
QWidget* pParent, const char* szName) : TQWidget* pParent, const char* szName) :
KProgressDialog(pParent, szName, sCaption, sText, true), KProgressDialog(pParent, szName, sCaption, sText, true),
m_nIdleValue(-1) m_nIdleValue(-1)
{ {
@ -43,7 +43,7 @@ ProgressDlg::ProgressDlg(const QString& sCaption, const QString& sText,
setAllowCancel(false); setAllowCancel(false);
// Create the idle-progress timer // Create the idle-progress timer
m_pIdleTimer = new QTimer(this); m_pIdleTimer = new TQTimer(this);
// Display a busy indicator by increasing the value of the idle counter // Display a busy indicator by increasing the value of the idle counter
connect (m_pIdleTimer, SIGNAL(timeout()), this, SLOT(slotShowBusy())); connect (m_pIdleTimer, SIGNAL(timeout()), this, SLOT(slotShowBusy()));

@ -28,8 +28,8 @@
#ifndef PROGRESSDLG_H #ifndef PROGRESSDLG_H
#define PROGRESSDLG_H #define PROGRESSDLG_H
#include <qwidget.h> #include <ntqwidget.h>
#include <qtimer.h> #include <ntqtimer.h>
#include <kprogress.h> #include <kprogress.h>
/** /**
@ -44,7 +44,7 @@ class ProgressDlg : public KProgressDialog
Q_OBJECT Q_OBJECT
public: public:
ProgressDlg(const QString&, const QString&, QWidget* pParent = 0, const ProgressDlg(const TQString&, const TQString&, TQWidget* pParent = 0, const
char* szName = 0); char* szName = 0);
~ProgressDlg(); ~ProgressDlg();
@ -54,7 +54,7 @@ public:
private: private:
/** When the value is 0, this timer initiates value changes that cause /** When the value is 0, this timer initiates value changes that cause
the progress-bar to move. */ the progress-bar to move. */
QTimer* m_pIdleTimer; TQTimer* m_pIdleTimer;
/** A dummy value used to move the progress-bar while the value is 0. */ /** A dummy value used to move the progress-bar while the value is 0. */
int m_nIdleValue; int m_nIdleValue;

@ -36,10 +36,10 @@
#define PROJECT_CONFIG_VER 2 #define PROJECT_CONFIG_VER 2
inline void flListFromStringList(FileLocationList& fll, const QStringList& sl) inline void flListFromStringList(FileLocationList& fll, const TQStringList& sl)
{ {
QStringList::ConstIterator itr; TQStringList::ConstIterator itr;
QString sPath; TQString sPath;
uint nLine, nCol; uint nLine, nCol;
// Transform the string into a list of file locations // Transform the string into a list of file locations
@ -51,11 +51,11 @@ inline void flListFromStringList(FileLocationList& fll, const QStringList& sl)
} }
} }
inline void stringListFromFlList(QStringList& sl, const FileLocationList& fll) inline void stringListFromFlList(TQStringList& sl, const FileLocationList& fll)
{ {
FileLocationList* pList; FileLocationList* pList;
FileLocation* pLoc; FileLocation* pLoc;
QString sLoc; TQString sLoc;
// Nasty... // Nasty...
pList = (FileLocationList*)&fll; pList = (FileLocationList*)&fll;
@ -65,7 +65,7 @@ inline void stringListFromFlList(QStringList& sl, const FileLocationList& fll)
// the configuration file // the configuration file
for (pLoc = pList->first(); pLoc != NULL; pLoc = pList->next()) { for (pLoc = pList->first(); pLoc != NULL; pLoc = pList->next()) {
sLoc = ""; sLoc = "";
QTextOStream(&sLoc) << pLoc->m_sPath << ":" << pLoc->m_nLine << ":" TQTextOStream(&sLoc) << pLoc->m_sPath << ":" << pLoc->m_nLine << ":"
<< pLoc->m_nCol; << pLoc->m_nCol;
sl.append(sLoc); sl.append(sLoc);
} }
@ -87,9 +87,9 @@ Project::~Project()
/** /**
*/ */
bool Project::open(const QString& sPath) bool Project::open(const TQString& sPath)
{ {
QString sConfFile; TQString sConfFile;
Options opt; Options opt;
// Associate the object with the project directory // Associate the object with the project directory
@ -116,7 +116,7 @@ bool Project::open(const QString& sPath)
// Get the project name // Get the project name
m_pConf->setGroup("Project"); m_pConf->setGroup("Project");
m_sName = m_pConf->readEntry("Name"); m_sName = m_pConf->readEntry("Name");
if (m_sName == QString::null) { if (m_sName == TQString::null) {
KMessageBox::error(0, i18n("Cannot read project name")); KMessageBox::error(0, i18n("Cannot read project name"));
return false; return false;
} }
@ -146,9 +146,9 @@ void Project::close()
* Returns a semi-colon separated list of the file types included in the * Returns a semi-colon separated list of the file types included in the
* current project. * current project.
*/ */
QString Project::getFileTypes() const TQString Project::getFileTypes() const
{ {
QString sTypes; TQString sTypes;
m_pConf->setGroup("Project"); m_pConf->setGroup("Project");
return m_pConf->readEntry("FileTypes"); return m_pConf->readEntry("FileTypes");
@ -199,7 +199,7 @@ void Project::setOptions(const Options& opt)
*/ */
void Project::loadSession(Session& sess) void Project::loadSession(Session& sess)
{ {
QStringList slEntry; TQStringList slEntry;
m_pConf->setGroup("Session"); m_pConf->setGroup("Session");
@ -233,7 +233,7 @@ void Project::loadSession(Session& sess)
*/ */
void Project::storeSession(const Session& sess) void Project::storeSession(const Session& sess)
{ {
QStringList slEntry; TQStringList slEntry;
m_pConf->setGroup("Session"); m_pConf->setGroup("Session");
@ -271,15 +271,15 @@ void Project::storeSession(const Session& sess)
*/ */
bool Project::loadFileList(FileListTarget* pList) bool Project::loadFileList(FileListTarget* pList)
{ {
QString sFilePath; TQString sFilePath;
// Open the 'cscope.files' file // Open the 'cscope.files' file
if (!m_fiFileList.open(IO_ReadOnly)) if (!m_fiFileList.open(IO_ReadOnly))
return false; return false;
// Read all file names from the file // Read all file names from the file
QTextStream str(&m_fiFileList); TQTextStream str(&m_fiFileList);
while ((sFilePath = str.readLine()) != QString::null) { while ((sFilePath = str.readLine()) != TQString::null) {
// Skip option lines // Skip option lines
if (sFilePath.at(0) == '-') if (sFilePath.at(0) == '-')
continue; continue;
@ -299,13 +299,13 @@ bool Project::loadFileList(FileListTarget* pList)
*/ */
bool Project::storeFileList(FileListSource* pList) bool Project::storeFileList(FileListSource* pList)
{ {
QString sFilePath; TQString sFilePath;
// Open the 'cscope.files' file // Open the 'cscope.files' file
if (!m_fiFileList.open(IO_WriteOnly | IO_Truncate)) if (!m_fiFileList.open(IO_WriteOnly | IO_Truncate))
return false; return false;
QTextStream str(&m_fiFileList); TQTextStream str(&m_fiFileList);
// Write all file names // Write all file names
if (pList->firstItem(sFilePath)) { if (pList->firstItem(sFilePath)) {
@ -323,14 +323,14 @@ bool Project::storeFileList(FileListSource* pList)
* @param sPath The path of the file to add * @param sPath The path of the file to add
* @return true if successful, false otherwise * @return true if successful, false otherwise
*/ */
bool Project::addFile(const QString& sPath) bool Project::addFile(const TQString& sPath)
{ {
// Open the 'cscope.files' file // Open the 'cscope.files' file
if (!m_fiFileList.open(IO_WriteOnly | IO_Append)) if (!m_fiFileList.open(IO_WriteOnly | IO_Append))
return false; return false;
// Write the file path // Write the file path
QTextStream str(&m_fiFileList); TQTextStream str(&m_fiFileList);
str << sPath << "\n"; str << sPath << "\n";
m_fiFileList.close(); m_fiFileList.close();
@ -347,7 +347,7 @@ bool Project::addFile(const QString& sPath)
*/ */
bool Project::isEmpty() bool Project::isEmpty()
{ {
QString sPath, sFileName; TQString sPath, sFileName;
bool bResult = true; bool bResult = true;
// Open the 'cscope.files' file // Open the 'cscope.files' file
@ -355,8 +355,8 @@ bool Project::isEmpty()
return true; return true;
// Find at least one file name entry in the file // Find at least one file name entry in the file
QTextStream str(&m_fiFileList); TQTextStream str(&m_fiFileList);
while ((sPath = str.readLine()) != QString::null) { while ((sPath = str.readLine()) != TQString::null) {
if (sPath.at(0) != '-') { if (sPath.at(0) != '-') {
bResult = false; bResult = false;
break; break;
@ -371,7 +371,7 @@ bool Project::isEmpty()
* Copies the list of previously queried symbols to the target object. * Copies the list of previously queried symbols to the target object.
* @param slSymHistory The list object to copy into * @param slSymHistory The list object to copy into
*/ */
void Project::getSymHistory(QStringList& slSymHistory) const void Project::getSymHistory(TQStringList& slSymHistory) const
{ {
slSymHistory = m_slSymHistory; slSymHistory = m_slSymHistory;
} }
@ -380,12 +380,12 @@ void Project::getSymHistory(QStringList& slSymHistory) const
* Copies the list of previously queried symbols from the target object. * Copies the list of previously queried symbols from the target object.
* @param slSymHistory The list object to copy from * @param slSymHistory The list object to copy from
*/ */
void Project::setSymHistory(QStringList& slSymHistory) void Project::setSymHistory(TQStringList& slSymHistory)
{ {
m_slSymHistory = slSymHistory; m_slSymHistory = slSymHistory;
} }
void Project::getMakeParams(QString& sCmd, QString& sDir) const void Project::getMakeParams(TQString& sCmd, TQString& sDir) const
{ {
sCmd = m_sMakeCmd; sCmd = m_sMakeCmd;
sDir = m_sMakeRoot; sDir = m_sMakeRoot;
@ -398,7 +398,7 @@ void Project::getMakeParams(QString& sCmd, QString& sDir) const
* @param sPath The full path of the project's directory * @param sPath The full path of the project's directory
* @param opt Project options * @param opt Project options
*/ */
bool Project::create(const QString& sName, const QString& sPath, bool Project::create(const TQString& sName, const TQString& sPath,
const Options& opt) const Options& opt)
{ {
// Prepare the project's files // Prepare the project's files

@ -41,29 +41,29 @@ public:
struct Session { struct Session {
FileLocationList fllOpenFiles; FileLocationList fllOpenFiles;
QString sLastFile; TQString sLastFile;
QStringList slQueryFiles; TQStringList slQueryFiles;
QStringList slCallTreeFiles; TQStringList slCallTreeFiles;
FileLocationList fllBookmarks; FileLocationList fllBookmarks;
QString sMakeCmd; TQString sMakeCmd;
QString sMakeRoot; TQString sMakeRoot;
}; };
virtual bool open(const QString&); virtual bool open(const TQString&);
virtual bool loadFileList(FileListTarget*); virtual bool loadFileList(FileListTarget*);
virtual bool storeFileList(FileListSource*); virtual bool storeFileList(FileListSource*);
virtual bool addFile(const QString&); virtual bool addFile(const TQString&);
virtual bool isEmpty(); virtual bool isEmpty();
virtual void close(); virtual void close();
virtual QString getFileTypes() const; virtual TQString getFileTypes() const;
virtual void getOptions(Options&) const; virtual void getOptions(Options&) const;
virtual void setOptions(const Options&); virtual void setOptions(const Options&);
virtual void loadSession(Session&); virtual void loadSession(Session&);
virtual void storeSession(const Session&); virtual void storeSession(const Session&);
virtual void getSymHistory(QStringList&) const; virtual void getSymHistory(TQStringList&) const;
virtual void setSymHistory(QStringList&); virtual void setSymHistory(TQStringList&);
virtual void getMakeParams(QString&, QString&) const; virtual void getMakeParams(TQString&, TQString&) const;
/** /**
* Determines whether a project is based on a Cscope.out file, and is * Determines whether a project is based on a Cscope.out file, and is
@ -72,7 +72,7 @@ public:
*/ */
virtual bool isTemporary() { return false; } virtual bool isTemporary() { return false; }
static bool create(const QString&, const QString&, const Options&); static bool create(const TQString&, const TQString&, const Options&);
private: private:
/** The configuration file ("cscope.proj") */ /** The configuration file ("cscope.proj") */
@ -80,11 +80,11 @@ private:
/** The file that holds the paths of all source files in this project /** The file that holds the paths of all source files in this project
("cscope.files") */ ("cscope.files") */
QFile m_fiFileList; TQFile m_fiFileList;
QString m_sMakeCmd; TQString m_sMakeCmd;
QString m_sMakeRoot; TQString m_sMakeRoot;
static void writeOptions(KConfig*, const Options&); static void writeOptions(KConfig*, const Options&);
}; };

@ -37,9 +37,9 @@ ProjectBase::~ProjectBase()
{ {
} }
bool ProjectBase::open(const QString& sPath) bool ProjectBase::open(const TQString& sPath)
{ {
QFileInfo fi(sPath); TQFileInfo fi(sPath);
// Make sure the file exists, and that is is a cross-reference file // Make sure the file exists, and that is is a cross-reference file
if (!fi.exists() || !isCscopeOut(fi.absFilePath())) if (!fi.exists() || !isCscopeOut(fi.absFilePath()))
@ -73,7 +73,7 @@ void ProjectBase::getOptions(Options& opt) const
getDefOptions(opt); getDefOptions(opt);
} }
void ProjectBase::getMakeParams(QString& sCmd, QString& sDir) const void ProjectBase::getMakeParams(TQString& sCmd, TQString& sDir) const
{ {
sCmd = "make"; sCmd = "make";
sDir = getSourceRoot(); sDir = getSourceRoot();
@ -136,10 +136,10 @@ void ProjectBase::initOptions()
* @param sPath The full path of the file to check * @param sPath The full path of the file to check
* @return true if the given file is a cscope.out file, false otherwise * @return true if the given file is a cscope.out file, false otherwise
*/ */
bool ProjectBase::isCscopeOut(const QString& sPath) bool ProjectBase::isCscopeOut(const TQString& sPath)
{ {
QFile file(sPath); TQFile file(sPath);
QString sLine; TQString sLine;
int nVer; int nVer;
char szDir[PATH_MAX]; char szDir[PATH_MAX];
@ -148,7 +148,7 @@ bool ProjectBase::isCscopeOut(const QString& sPath)
return false; return false;
// Check if the first line matches the expected format // Check if the first line matches the expected format
sLine = QTextStream(&file).readLine(); sLine = TQTextStream(&file).readLine();
return sscanf(sLine.latin1(), "cscope %d %s", &nVer, szDir) == 2; return sscanf(sLine.latin1(), "cscope %d %s", &nVer, szDir) == 2;
} }
@ -162,8 +162,8 @@ bool ProjectBase::isCscopeOut(const QString& sPath)
*/ */
bool ProjectBase::loadFileList(FileListTarget* pList) bool ProjectBase::loadFileList(FileListTarget* pList)
{ {
QString sFilePath; TQString sFilePath;
QFile file; TQFile file;
// Make sure the file exists // Make sure the file exists
if (!m_dir.exists("cscope.files")) if (!m_dir.exists("cscope.files"))
@ -175,8 +175,8 @@ bool ProjectBase::loadFileList(FileListTarget* pList)
return false; return false;
// Read all file names from the file // Read all file names from the file
QTextStream str(&file); TQTextStream str(&file);
while ((sFilePath = str.readLine()) != QString::null) { while ((sFilePath = str.readLine()) != TQString::null) {
// Skip option lines // Skip option lines
if (sFilePath.at(0) == '-') if (sFilePath.at(0) == '-')
continue; continue;

@ -28,9 +28,9 @@
#ifndef PROJECTBASE_H #ifndef PROJECTBASE_H
#define PROJECTBASE_H #define PROJECTBASE_H
#include <qstringlist.h> #include <ntqstringlist.h>
#include <qdir.h> #include <ntqdir.h>
#include <qfile.h> #include <ntqfile.h>
#include <kconfig.h> #include <kconfig.h>
#define DEF_IS_KERNEL false #define DEF_IS_KERNEL false
@ -75,7 +75,7 @@ public:
* Appends a file to the list. * Appends a file to the list.
* @param sFilePath The full path of the file to add * @param sFilePath The full path of the file to add
*/ */
virtual void addItem(const QString& sFilePath) = 0; virtual void addItem(const TQString& sFilePath) = 0;
}; };
/** /**
@ -106,14 +106,14 @@ public:
* @param sFilePath Holds the path of the first file, upon return * @param sFilePath Holds the path of the first file, upon return
* @return true if there are more files, false otherwise * @return true if there are more files, false otherwise
*/ */
virtual bool firstItem(QString& sFilePath) = 0; virtual bool firstItem(TQString& sFilePath) = 0;
/** /**
* Returns the next file in the list. * Returns the next file in the list.
* @param sFilePath Holds the path of the file, upon return * @param sFilePath Holds the path of the file, upon return
* @return true if there are more files, false otherwise * @return true if there are more files, false otherwise
*/ */
virtual bool nextItem(QString& sFilePath) = 0; virtual bool nextItem(TQString& sFilePath) = 0;
}; };
/** /**
@ -129,11 +129,11 @@ struct FileLocation
* @param nLine The line position of the cursor * @param nLine The line position of the cursor
* @param nCol The column position of the cursor * @param nCol The column position of the cursor
*/ */
FileLocation(QString sPath, uint nLine, uint nCol) : m_sPath(sPath), FileLocation(TQString sPath, uint nLine, uint nCol) : m_sPath(sPath),
m_nLine(nLine), m_nCol(nCol) {} m_nLine(nLine), m_nCol(nCol) {}
/** The full path of the file. */ /** The full path of the file. */
QString m_sPath; TQString m_sPath;
/** The line position of the cursor. */ /** The line position of the cursor. */
uint m_nLine; uint m_nLine;
@ -145,7 +145,7 @@ struct FileLocation
/** /**
* A list of file locations used for restoring a session. * A list of file locations used for restoring a session.
*/ */
typedef QPtrList<FileLocation> FileLocationList; typedef TQPtrList<FileLocation> FileLocationList;
class FileSemaphore; class FileSemaphore;
@ -162,11 +162,11 @@ public:
* Configurable project options. * Configurable project options.
*/ */
struct Options { struct Options {
QString sSrcRootPath; TQString sSrcRootPath;
/** A list of MIME-types that determines which files are included in /** A list of MIME-types that determines which files are included in
the project. */ the project. */
QStringList slFileTypes; TQStringList slFileTypes;
/** true if the -k option for CScope should be used. */ /** true if the -k option for CScope should be used. */
bool bKernel; bool bKernel;
@ -201,22 +201,22 @@ public:
uint nTabWidth; uint nTabWidth;
/** Ctags command line. */ /** Ctags command line. */
QString sCtagsCmd; TQString sCtagsCmd;
}; };
virtual bool open(const QString&); virtual bool open(const TQString&);
virtual bool loadFileList(FileListTarget*); virtual bool loadFileList(FileListTarget*);
virtual bool storeFileList(FileListSource*) { return false; } virtual bool storeFileList(FileListSource*) { return false; }
virtual bool isEmpty() { return false; } virtual bool isEmpty() { return false; }
bool dbExists(); bool dbExists();
virtual void close() {} virtual void close() {}
virtual QString getFileTypes() const { return QString::null; } virtual TQString getFileTypes() const { return TQString::null; }
virtual void getOptions(Options&) const; virtual void getOptions(Options&) const;
virtual void setOptions(const Options&) {} virtual void setOptions(const Options&) {}
virtual void getSymHistory(QStringList&) const {} virtual void getSymHistory(TQStringList&) const {}
virtual void setSymHistory(QStringList&) {} virtual void setSymHistory(TQStringList&) {}
virtual void getMakeParams(QString&, QString&) const; virtual void getMakeParams(TQString&, TQString&) const;
/** /**
* Determines whether a project is based on a Cscope.out file, and is * Determines whether a project is based on a Cscope.out file, and is
@ -228,12 +228,12 @@ public:
/** /**
* @return The name of the current project * @return The name of the current project
*/ */
QString getName() const { return m_sName; } TQString getName() const { return m_sName; }
/** /**
* @return The full path of the project's directory * @return The full path of the project's directory
*/ */
QString getPath() const { return m_dir.absPath(); } TQString getPath() const { return m_dir.absPath(); }
/** /**
* @return Command-line arguments to pass to a Cscope object, based on * @return Command-line arguments to pass to a Cscope object, based on
@ -241,7 +241,7 @@ public:
*/ */
uint getArgs() const { return m_nArgs; } uint getArgs() const { return m_nArgs; }
const QString& getSourceRoot() const { return m_opt.sSrcRootPath; } const TQString& getSourceRoot() const { return m_opt.sSrcRootPath; }
/** /**
* @return The time, in seconds, to wait before rebuilding the * @return The time, in seconds, to wait before rebuilding the
@ -258,10 +258,10 @@ public:
protected: protected:
/** The name of the project, as written in the configuration file */ /** The name of the project, as written in the configuration file */
QString m_sName; TQString m_sName;
/** The directory associated with the project */ /** The directory associated with the project */
QDir m_dir; TQDir m_dir;
/** A cached version of the project's options. */ /** A cached version of the project's options. */
Options m_opt; Options m_opt;
@ -271,11 +271,11 @@ protected:
uint m_nArgs; uint m_nArgs;
/** A list of symbols previously queried. */ /** A list of symbols previously queried. */
QStringList m_slSymHistory; TQStringList m_slSymHistory;
void initOptions(); void initOptions();
static bool isCscopeOut(const QString&); static bool isCscopeOut(const TQString&);
}; };
#endif #endif

@ -25,10 +25,10 @@
* *
***************************************************************************/ ***************************************************************************/
#include <qpushbutton.h> #include <ntqpushbutton.h>
#include <qlistview.h> #include <ntqlistview.h>
#include <qlineedit.h> #include <ntqlineedit.h>
#include <qregexp.h> #include <ntqregexp.h>
#include <klocale.h> #include <klocale.h>
#include <kmessagebox.h> #include <kmessagebox.h>
#include <kfiledialog.h> #include <kfiledialog.h>
@ -43,7 +43,7 @@
* @param pParent The parent widget * @param pParent The parent widget
* @param szName The widget's name * @param szName The widget's name
*/ */
ProjectFilesDlg::ProjectFilesDlg(Project* pProj, QWidget* pParent, ProjectFilesDlg::ProjectFilesDlg(Project* pProj, TQWidget* pParent,
const char* szName) : const char* szName) :
ProjectFilesLayout(pParent, szName), ProjectFilesLayout(pParent, szName),
m_pProj(pProj), m_pProj(pProj),
@ -55,7 +55,7 @@ ProjectFilesDlg::ProjectFilesDlg(Project* pProj, QWidget* pParent,
m_pScanner = new DirScanner(this, &m_dicFiles); m_pScanner = new DirScanner(this, &m_dicFiles);
// Initialise the list view // Initialise the list view
m_pFileList->setSelectionMode(QListView::Extended); m_pFileList->setSelectionMode(TQListView::Extended);
m_pFileList->addColumn("File Path"); m_pFileList->addColumn("File Path");
// Sort only when asked to by the user // Sort only when asked to by the user
@ -108,11 +108,11 @@ ProjectFilesDlg::~ProjectFilesDlg()
* and is added to the list. * and is added to the list.
* @param sFilePath The full path of a source file * @param sFilePath The full path of a source file
*/ */
void ProjectFilesDlg::addItem(const QString& sFilePath) void ProjectFilesDlg::addItem(const TQString& sFilePath)
{ {
QListViewItem* pItem; TQListViewItem* pItem;
pItem = new QListViewItem(m_pFileList, m_pLastItem); pItem = new TQListViewItem(m_pFileList, m_pLastItem);
pItem->setText(0, sFilePath); pItem->setText(0, sFilePath);
m_pLastItem = pItem; m_pLastItem = pItem;
m_dicFiles.insert(sFilePath, pItem); m_dicFiles.insert(sFilePath, pItem);
@ -125,7 +125,7 @@ void ProjectFilesDlg::addItem(const QString& sFilePath)
* @param sFilePath Contains the file path, upon successful return * @param sFilePath Contains the file path, upon successful return
* @return bool true if successful, false if the list is empty * @return bool true if successful, false if the list is empty
*/ */
bool ProjectFilesDlg::firstItem(QString& sFilePath) bool ProjectFilesDlg::firstItem(TQString& sFilePath)
{ {
m_pItrItem = m_pFileList->firstChild(); m_pItrItem = m_pFileList->firstChild();
return nextItem(sFilePath); return nextItem(sFilePath);
@ -140,7 +140,7 @@ bool ProjectFilesDlg::firstItem(QString& sFilePath)
* @return bool true if successful, false if no more items are * @return bool true if successful, false if no more items are
* available * available
*/ */
bool ProjectFilesDlg::nextItem(QString& sFilePath) bool ProjectFilesDlg::nextItem(TQString& sFilePath)
{ {
if (m_pItrItem == NULL) if (m_pItrItem == NULL)
return false; return false;
@ -156,10 +156,10 @@ bool ProjectFilesDlg::nextItem(QString& sFilePath)
* project. * project.
* @param pEvent The event object * @param pEvent The event object
*/ */
void ProjectFilesDlg::customEvent(QCustomEvent* pEvent) void ProjectFilesDlg::customEvent(TQCustomEvent* pEvent)
{ {
DirScanEvent* pDSE; DirScanEvent* pDSE;
QString sMsg; TQString sMsg;
// Process only directory scan progress events // Process only directory scan progress events
if (((uint)pEvent->type()) != DirScanEvent::EventId) if (((uint)pEvent->type()) != DirScanEvent::EventId)
@ -207,8 +207,8 @@ void ProjectFilesDlg::customEvent(QCustomEvent* pEvent)
return; return;
// Add the files to the list // Add the files to the list
const QStringList& slFiles = m_pScanner->getFiles(); const TQStringList& slFiles = m_pScanner->getFiles();
QStringList::const_iterator itr; TQStringList::const_iterator itr;
for (itr = slFiles.begin(); itr != slFiles.end(); ++itr) for (itr = slFiles.begin(); itr != slFiles.end(); ++itr)
addItem(*itr); addItem(*itr);
@ -217,7 +217,7 @@ void ProjectFilesDlg::customEvent(QCustomEvent* pEvent)
/** /**
* Removes a single item from the file list. * Removes a single item from the file list.
*/ */
void ProjectFilesDlg::removeItem(QListViewItem* pItem) void ProjectFilesDlg::removeItem(TQListViewItem* pItem)
{ {
m_dicFiles.remove(pItem->text(0)); m_dicFiles.remove(pItem->text(0));
delete pItem; delete pItem;
@ -230,8 +230,8 @@ void ProjectFilesDlg::removeItem(QListViewItem* pItem)
*/ */
void ProjectFilesDlg::slotAddFiles() void ProjectFilesDlg::slotAddFiles()
{ {
QStringList slFiles; TQStringList slFiles;
QStringList::const_iterator itr; TQStringList::const_iterator itr;
// Prompt the user // Prompt the user
slFiles = KFileDialog::getOpenFileNames(m_pProj->getSourceRoot(), slFiles = KFileDialog::getOpenFileNames(m_pProj->getSourceRoot(),
@ -253,9 +253,9 @@ void ProjectFilesDlg::slotAddFiles()
*/ */
void ProjectFilesDlg::slotAddDir() void ProjectFilesDlg::slotAddDir()
{ {
QString sDir; TQString sDir;
QStringList slFiles; TQStringList slFiles;
QStringList::const_iterator itr; TQStringList::const_iterator itr;
// Prompt the user for a directory // Prompt the user for a directory
sDir = KFileDialog::getExistingDirectory(m_pProj->getSourceRoot()); sDir = KFileDialog::getExistingDirectory(m_pProj->getSourceRoot());
@ -275,9 +275,9 @@ void ProjectFilesDlg::slotAddDir()
*/ */
void ProjectFilesDlg::slotAddTree() void ProjectFilesDlg::slotAddTree()
{ {
QString sDir; TQString sDir;
QStringList slFiles; TQStringList slFiles;
QStringList::const_iterator itr; TQStringList::const_iterator itr;
// Prompt the user for a directory // Prompt the user for a directory
sDir = KFileDialog::getExistingDirectory(m_pProj->getSourceRoot()); sDir = KFileDialog::getExistingDirectory(m_pProj->getSourceRoot());
@ -293,7 +293,7 @@ void ProjectFilesDlg::slotAddTree()
*/ */
void ProjectFilesDlg::slotRemSel() void ProjectFilesDlg::slotRemSel()
{ {
QListViewItem* pItem, * pPrevItem; TQListViewItem* pItem, * pPrevItem;
// Prompt the user before removing the files // Prompt the user before removing the files
if (KMessageBox::questionYesNo(0, i18n("Are you sure you want to remove " if (KMessageBox::questionYesNo(0, i18n("Are you sure you want to remove "
@ -317,8 +317,8 @@ void ProjectFilesDlg::slotRemSel()
*/ */
void ProjectFilesDlg::slotRemDir() void ProjectFilesDlg::slotRemDir()
{ {
QString sDir, sFilePath; TQString sDir, sFilePath;
QListViewItem* pItem, * pPrevItem; TQListViewItem* pItem, * pPrevItem;
// Prompt the user for a directory // Prompt the user for a directory
sDir = KFileDialog::getExistingDirectory(m_pProj->getSourceRoot()); sDir = KFileDialog::getExistingDirectory(m_pProj->getSourceRoot());
@ -350,8 +350,8 @@ void ProjectFilesDlg::slotRemDir()
*/ */
void ProjectFilesDlg::slotRemTree() void ProjectFilesDlg::slotRemTree()
{ {
QString sDir, sFilePath; TQString sDir, sFilePath;
QListViewItem* pItem, * pPrevItem; TQListViewItem* pItem, * pPrevItem;
// Prompt the user for a directory // Prompt the user for a directory
sDir = KFileDialog::getExistingDirectory(m_pProj->getSourceRoot()); sDir = KFileDialog::getExistingDirectory(m_pProj->getSourceRoot());
@ -385,8 +385,8 @@ void ProjectFilesDlg::slotRemTree()
*/ */
void ProjectFilesDlg::slotFilter() void ProjectFilesDlg::slotFilter()
{ {
QString sFilter; TQString sFilter;
QListViewItem* pItem; TQListViewItem* pItem;
// Get the user's filter string // Get the user's filter string
sFilter = m_pFilterEdit->text().stripWhiteSpace(); sFilter = m_pFilterEdit->text().stripWhiteSpace();
@ -394,7 +394,7 @@ void ProjectFilesDlg::slotFilter()
return; return;
// Create the regular expression // Create the regular expression
QRegExp reFilter(sFilter); TQRegExp reFilter(sFilter);
reFilter.setWildcard(true); reFilter.setWildcard(true);
// Iterate over the list entries, and hide all items not matching the // Iterate over the list entries, and hide all items not matching the
@ -415,7 +415,7 @@ void ProjectFilesDlg::slotFilter()
*/ */
void ProjectFilesDlg::slotShowAll() void ProjectFilesDlg::slotShowAll()
{ {
QListViewItem* pItem; TQListViewItem* pItem;
// Iterate over the list entries, and make all items visible // Iterate over the list entries, and make all items visible
pItem = m_pFileList->firstChild(); pItem = m_pFileList->firstChild();

@ -28,9 +28,9 @@
#ifndef PROJECTFILESDLG_H #ifndef PROJECTFILESDLG_H
#define PROJECTFILESDLG_H #define PROJECTFILESDLG_H
#include <qwidget.h> #include <ntqwidget.h>
#include <projectfileslayout.h> #include <projectfileslayout.h>
#include <qdict.h> #include <ntqdict.h>
#include "project.h" #include "project.h"
class DirScanner; class DirScanner;
@ -44,7 +44,7 @@ class ScanProgressDlg;
* removed, this list view is updated. The project, however, is only modified * removed, this list view is updated. The project, however, is only modified
* if the user closes the dialog using the "OK" button. * if the user closes the dialog using the "OK" button.
* Since searches through a list view are very slow, the class also maintains * Since searches through a list view are very slow, the class also maintains
* a QDict object, that connects file names with their respective list items. * a TQDict object, that connects file names with their respective list items.
* This dictionary is used to ensure duplicated items are not added to the * This dictionary is used to ensure duplicated items are not added to the
* list. * list.
* @author Elad Lahav * @author Elad Lahav
@ -56,15 +56,15 @@ class ProjectFilesDlg : public ProjectFilesLayout, public FileListTarget,
Q_OBJECT Q_OBJECT
public: public:
ProjectFilesDlg(Project*, QWidget* pParent = 0, const char* szName = 0); ProjectFilesDlg(Project*, TQWidget* pParent = 0, const char* szName = 0);
~ProjectFilesDlg(); ~ProjectFilesDlg();
virtual void addItem(const QString&); virtual void addItem(const TQString&);
virtual bool firstItem(QString&); virtual bool firstItem(TQString&);
virtual bool nextItem(QString&); virtual bool nextItem(TQString&);
protected: protected:
virtual void customEvent(QCustomEvent*); virtual void customEvent(TQCustomEvent*);
private: private:
/** The project to manipulate. */ /** The project to manipulate. */
@ -72,7 +72,7 @@ private:
/** Holds all file paths in a quickly searchable format (for duplicate /** Holds all file paths in a quickly searchable format (for duplicate
entries lookup). */ entries lookup). */
QDict<QListViewItem> m_dicFiles; TQDict<TQListViewItem> m_dicFiles;
/** A thread object to a-synchronously scan directories for source files /** A thread object to a-synchronously scan directories for source files
to add to the project. */ to add to the project. */
@ -82,12 +82,12 @@ private:
ScanProgressDlg* m_pScanDlg; ScanProgressDlg* m_pScanDlg;
/** A file list item that serves as an iterator. */ /** A file list item that serves as an iterator. */
QListViewItem* m_pItrItem; TQListViewItem* m_pItrItem;
/** The last item added. */ /** The last item added. */
QListViewItem* m_pLastItem; TQListViewItem* m_pLastItem;
void removeItem(QListViewItem*); void removeItem(TQListViewItem*);
private slots: private slots:
void slotAddFiles(); void slotAddFiles();

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.1" stdsetdef="1"> <!DOCTYPE UI><UI version="3.1" stdsetdef="1">
<class>ProjectFilesLayout</class> <class>ProjectFilesLayout</class>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>ProjectFilesLayout</cstring> <cstring>ProjectFilesLayout</cstring>
</property> </property>
@ -19,7 +19,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout5</cstring> <cstring>layout5</cstring>
</property> </property>
@ -27,7 +27,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout4</cstring> <cstring>layout4</cstring>
</property> </property>
@ -35,12 +35,12 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLineEdit"> <widget class="TQLineEdit">
<property name="name"> <property name="name">
<cstring>m_pFilterEdit</cstring> <cstring>m_pFilterEdit</cstring>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pFilterButton</cstring> <cstring>m_pFilterButton</cstring>
</property> </property>
@ -48,7 +48,7 @@
<string>Filter</string> <string>Filter</string>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pShowAllButton</cstring> <cstring>m_pShowAllButton</cstring>
</property> </property>
@ -58,14 +58,14 @@
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QListView"> <widget class="TQListView">
<property name="name"> <property name="name">
<cstring>m_pFileList</cstring> <cstring>m_pFileList</cstring>
</property> </property>
</widget> </widget>
</vbox> </vbox>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout5</cstring> <cstring>layout5</cstring>
</property> </property>
@ -73,7 +73,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QGroupBox"> <widget class="TQGroupBox">
<property name="name"> <property name="name">
<cstring>groupBox1</cstring> <cstring>groupBox1</cstring>
</property> </property>
@ -84,7 +84,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pAddFilesButton</cstring> <cstring>m_pAddFilesButton</cstring>
</property> </property>
@ -92,7 +92,7 @@
<string>Files...</string> <string>Files...</string>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pAddDirButton</cstring> <cstring>m_pAddDirButton</cstring>
</property> </property>
@ -100,7 +100,7 @@
<string>Directory...</string> <string>Directory...</string>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pAddTreeButton</cstring> <cstring>m_pAddTreeButton</cstring>
</property> </property>
@ -110,7 +110,7 @@
</widget> </widget>
</vbox> </vbox>
</widget> </widget>
<widget class="QGroupBox"> <widget class="TQGroupBox">
<property name="name"> <property name="name">
<cstring>groupBox2</cstring> <cstring>groupBox2</cstring>
</property> </property>
@ -121,7 +121,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pRemSelButton</cstring> <cstring>m_pRemSelButton</cstring>
</property> </property>
@ -129,7 +129,7 @@
<string>Selected</string> <string>Selected</string>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pRemDirButton</cstring> <cstring>m_pRemDirButton</cstring>
</property> </property>
@ -137,7 +137,7 @@
<string>Directory...</string> <string>Directory...</string>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pRemTreeButton</cstring> <cstring>m_pRemTreeButton</cstring>
</property> </property>
@ -164,7 +164,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QGroupBox"> <widget class="TQGroupBox">
<property name="name"> <property name="name">
<cstring>groupBox3</cstring> <cstring>groupBox3</cstring>
</property> </property>
@ -175,7 +175,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pOKButton</cstring> <cstring>m_pOKButton</cstring>
</property> </property>
@ -183,7 +183,7 @@
<string>OK</string> <string>OK</string>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pCancelButton</cstring> <cstring>m_pCancelButton</cstring>
</property> </property>

@ -58,17 +58,17 @@ ProjectManager::~ProjectManager()
* @param opt A structure containing project options * @param opt A structure containing project options
* @return true if successful, false otherwise * @return true if successful, false otherwise
*/ */
bool ProjectManager::create(const QString& sName, const QString& sPath, bool ProjectManager::create(const TQString& sName, const TQString& sPath,
const ProjectBase::Options& opt, QString& sProjDir) const ProjectBase::Options& opt, TQString& sProjDir)
{ {
QDir dir(sPath); TQDir dir(sPath);
QString sParentPath; TQString sParentPath;
QString sDirName = sName; TQString sDirName = sName;
QString sMsg; TQString sMsg;
// Handle requests for a hidden .cscope directory // Handle requests for a hidden .cscope directory
if (dir.dirName() == ".cscope") { if (dir.dirName() == ".cscope") {
sParentPath = QDir::cleanDirPath(dir.absPath()); sParentPath = TQDir::cleanDirPath(dir.absPath());
sParentPath = sParentPath.section('/', 0, -2); sParentPath = sParentPath.section('/', 0, -2);
dir.cd(sParentPath); dir.cd(sParentPath);
sDirName = ".cscope"; sDirName = ".cscope";
@ -110,7 +110,7 @@ bool ProjectManager::create(const QString& sName, const QString& sPath,
* @param sPath The directory containing the project's files * @param sPath The directory containing the project's files
* @return true if successful, false otherwise * @return true if successful, false otherwise
*/ */
bool ProjectManager::open(const QString& sPath) bool ProjectManager::open(const TQString& sPath)
{ {
Project* pProj; Project* pProj;
@ -137,7 +137,7 @@ bool ProjectManager::open(const QString& sPath)
* @param sFilePath The full path of the Cscope.out file * @param sFilePath The full path of the Cscope.out file
* @return true if successful, false otherwise * @return true if successful, false otherwise
*/ */
bool ProjectManager::openCscopeOut(const QString& sFilePath) bool ProjectManager::openCscopeOut(const TQString& sFilePath)
{ {
ProjectBase* pProj; ProjectBase* pProj;
@ -171,7 +171,7 @@ void ProjectManager::close()
} }
} }
QString ProjectManager::getProjName() const TQString ProjectManager::getProjName() const
{ {
if (!m_pCurProj) if (!m_pCurProj)
return i18n("No Project"); return i18n("No Project");

@ -33,18 +33,18 @@
/** /**
* @author Elad Lahav * @author Elad Lahav
*/ */
class ProjectManager : public QObject class ProjectManager : public TQObject
{ {
public: public:
ProjectManager(); ProjectManager();
virtual ~ProjectManager(); virtual ~ProjectManager();
bool create(const QString&, const QString&, const ProjectBase::Options&, bool create(const TQString&, const TQString&, const ProjectBase::Options&,
QString&); TQString&);
bool open(const QString&); bool open(const TQString&);
bool openCscopeOut(const QString&); bool openCscopeOut(const TQString&);
void close(); void close();
QString getProjName() const; TQString getProjName() const;
ProjectBase* curProject() const { return m_pCurProj; } ProjectBase* curProject() const { return m_pCurProj; }

@ -25,7 +25,7 @@
* *
***************************************************************************/ ***************************************************************************/
#include <qfile.h> #include <ntqfile.h>
#include <klocale.h> #include <klocale.h>
#include "querypage.h" #include "querypage.h"
#include "queryview.h" #include "queryview.h"
@ -49,15 +49,15 @@ const char* QUERY_TYPES[][2] = {
* @param pParent The parent widget * @param pParent The parent widget
* @param szName The widget's name * @param szName The widget's name
*/ */
QueryPage::QueryPage(QWidget* pParent, const char * szName) : QueryPage::QueryPage(TQWidget* pParent, const char * szName) :
QueryPageBase(pParent, szName), QueryPageBase(pParent, szName),
m_nType(CscopeFrontend::None) m_nType(CscopeFrontend::None)
{ {
m_pView = new QueryView(this); m_pView = new QueryView(this);
m_pDriver = new QueryViewDriver(m_pView, this); m_pDriver = new QueryViewDriver(m_pView, this);
connect(m_pView, SIGNAL(lineRequested(const QString&, uint)), this, connect(m_pView, SIGNAL(lineRequested(const TQString&, uint)), this,
SIGNAL(lineRequested(const QString&, uint))); SIGNAL(lineRequested(const TQString&, uint)));
// Set colours and font // Set colours and font
applyPrefs(); applyPrefs();
@ -76,7 +76,7 @@ QueryPage::~QueryPage()
* @param sText The text of the query * @param sText The text of the query
* @param bCase true for case-sensitive queries, false otherwise * @param bCase true for case-sensitive queries, false otherwise
*/ */
void QueryPage::query(uint nType, const QString& sText, bool bCase) void QueryPage::query(uint nType, const TQString& sText, bool bCase)
{ {
m_nType = nType; m_nType = nType;
m_sText = sText; m_sText = sText;
@ -103,8 +103,8 @@ void QueryPage::clear()
{ {
m_pView->clear(); m_pView->clear();
m_nType = CscopeFrontend::None; m_nType = CscopeFrontend::None;
m_sText = QString(); m_sText = TQString();
m_sName = QString(); m_sName = TQString();
} }
/** /**
@ -121,9 +121,9 @@ bool QueryPage::isRunning()
* (default) for the full version * (default) for the full version
* @return The caption for this page * @return The caption for this page
*/ */
QString QueryPage::getCaption(bool bBrief) const TQString QueryPage::getCaption(bool bBrief) const
{ {
return QString(QUERY_TYPES[m_nType][bBrief ? 1 : 0] + m_sText); return TQString(QUERY_TYPES[m_nType][bBrief ? 1 : 0] + m_sText);
} }
/** /**
@ -133,10 +133,10 @@ QString QueryPage::getCaption(bool bBrief) const
* @param sLine The line number * @param sLine The line number
* @param sText The contents of the line * @param sText The contents of the line
*/ */
void QueryPage::addRecord(const QString& sFile, const QString& sFunc, void QueryPage::addRecord(const TQString& sFile, const TQString& sFunc,
const QString& sLine, const QString& sText) const TQString& sLine, const TQString& sText)
{ {
new QListViewItem(m_pView, sFile, sFunc, sLine, sText); new TQListViewItem(m_pView, sFile, sFunc, sLine, sText);
} }
/** /**
@ -144,9 +144,9 @@ void QueryPage::addRecord(const QString& sFile, const QString& sFunc,
* @param sProjPath The full path of the project directory * @param sProjPath The full path of the project directory
* @return The unique file name to use * @return The unique file name to use
*/ */
QString QueryPage::getFileName(const QString& sProjPath) const TQString QueryPage::getFileName(const TQString& sProjPath) const
{ {
QString sFileName, sFileNameBase; TQString sFileName, sFileNameBase;
int i = 0; int i = 0;
// Do nothing if not initialised // Do nothing if not initialised
@ -157,8 +157,8 @@ QString QueryPage::getFileName(const QString& sProjPath) const
sFileNameBase = m_sName; sFileNameBase = m_sName;
sFileNameBase.replace(' ', '_'); sFileNameBase.replace(' ', '_');
do { do {
sFileName = sFileNameBase + QString::number(++i); sFileName = sFileNameBase + TQString::number(++i);
} while (QFile(sProjPath + "/" + sFileName).exists()); } while (TQFile(sProjPath + "/" + sFileName).exists());
return sFileName; return sFileName;
} }
@ -169,18 +169,18 @@ QString QueryPage::getFileName(const QString& sProjPath) const
* @param str A text stream set to the correct place in the file * @param str A text stream set to the correct place in the file
* @return true if successful, false otherwise * @return true if successful, false otherwise
*/ */
bool QueryPage::readHeader(QTextStream& str) bool QueryPage::readHeader(TQTextStream& str)
{ {
QString sTemp; TQString sTemp;
// Read the query name // Read the query name
m_sName = str.readLine(); m_sName = str.readLine();
if (m_sName == QString::null || m_sName.isEmpty()) if (m_sName == TQString::null || m_sName.isEmpty())
return false; return false;
// Read the query's type // Read the query's type
sTemp = str.readLine(); sTemp = str.readLine();
if (sTemp == QString::null || sTemp.isEmpty()) if (sTemp == TQString::null || sTemp.isEmpty())
return false; return false;
// Convert the type string to an integer // Convert the type string to an integer
@ -192,7 +192,7 @@ bool QueryPage::readHeader(QTextStream& str)
// Read the query's text // Read the query's text
m_sText = str.readLine(); m_sText = str.readLine();
if (m_sText == QString::null || m_sText.isEmpty()) if (m_sText == TQString::null || m_sText.isEmpty())
return false; return false;
return true; return true;
@ -203,7 +203,7 @@ bool QueryPage::readHeader(QTextStream& str)
* This mehtod is used as part of the storing process. * This mehtod is used as part of the storing process.
* @param str A text stream set to the correct place in the file * @param str A text stream set to the correct place in the file
*/ */
void QueryPage::writeHeader(QTextStream& str) void QueryPage::writeHeader(TQTextStream& str)
{ {
str << m_sName << "\n" << m_nType << "\n" << m_sText << "\n"; str << m_sName << "\n" << m_nType << "\n" << m_sText << "\n";
} }

@ -28,9 +28,9 @@
#ifndef QUERYPAGE_H #ifndef QUERYPAGE_H
#define QUERYPAGE_H #define QUERYPAGE_H
#include <qwidget.h> #include <ntqwidget.h>
#include <qlistview.h> #include <ntqlistview.h>
#include <qregexp.h> #include <ntqregexp.h>
#include "querypagebase.h" #include "querypagebase.h"
#include "cscopefrontend.h" #include "cscopefrontend.h"
@ -47,36 +47,36 @@ class QueryPage : public QueryPageBase
Q_OBJECT Q_OBJECT
public: public:
QueryPage(QWidget* pParent = 0, const char* szName = 0); QueryPage(TQWidget* pParent = 0, const char* szName = 0);
~QueryPage(); ~QueryPage();
void query(uint, const QString&, bool); void query(uint, const TQString&, bool);
void refresh(); void refresh();
void clear(); void clear();
bool isRunning(); bool isRunning();
virtual QString getCaption(bool bBrief = false) const; virtual TQString getCaption(bool bBrief = false) const;
protected: protected:
virtual void addRecord(const QString&, const QString&, const QString&, virtual void addRecord(const TQString&, const TQString&, const TQString&,
const QString&); const TQString&);
virtual QString getFileName(const QString&) const; virtual TQString getFileName(const TQString&) const;
virtual bool readHeader(QTextStream&); virtual bool readHeader(TQTextStream&);
virtual void writeHeader(QTextStream&); virtual void writeHeader(TQTextStream&);
private: private:
/** The type of query whose results are listed on this page. */ /** The type of query whose results are listed on this page. */
uint m_nType; uint m_nType;
/** The text given as a parameter to the query. */ /** The text given as a parameter to the query. */
QString m_sText; TQString m_sText;
/** Whether the query is case-sensitive. */ /** Whether the query is case-sensitive. */
bool m_bCase; bool m_bCase;
/** A formatted caption for this query, including the type of query and /** A formatted caption for this query, including the type of query and
its text. */ its text. */
QString m_sName; TQString m_sName;
private: private:
/** Runs Cscope queries whose results are displayed in this page. */ /** Runs Cscope queries whose results are displayed in this page. */

@ -25,7 +25,7 @@
* *
***************************************************************************/ ***************************************************************************/
#include <qfile.h> #include <ntqfile.h>
#include "querypagebase.h" #include "querypagebase.h"
#include "queryview.h" #include "queryview.h"
#include "kscopeconfig.h" #include "kscopeconfig.h"
@ -37,8 +37,8 @@
* @param pParent The parent widget * @param pParent The parent widget
* @param szName The widget's name * @param szName The widget's name
*/ */
QueryPageBase::QueryPageBase(QWidget* pParent, const char* szName) : QueryPageBase::QueryPageBase(TQWidget* pParent, const char* szName) :
QHBox(pParent, szName), TQHBox(pParent, szName),
m_bLocked(false) m_bLocked(false)
{ {
} }
@ -70,20 +70,20 @@ void QueryPageBase::applyPrefs()
* @param sFileName The name of the query file to load * @param sFileName The name of the query file to load
* @return true if successful, false otherwise * @return true if successful, false otherwise
*/ */
bool QueryPageBase::load(const QString& sProjPath, const QString& sFileName) bool QueryPageBase::load(const TQString& sProjPath, const TQString& sFileName)
{ {
QString sTemp, sFile, sFunc, sLine, sText; TQString sTemp, sFile, sFunc, sLine, sText;
int nState; int nState;
// Try to open the query file for reading // Try to open the query file for reading
QFile file(sProjPath + "/" + sFileName); TQFile file(sProjPath + "/" + sFileName);
if (!file.open(IO_ReadOnly)) if (!file.open(IO_ReadOnly))
return false; return false;
{ {
// Use a new scope for the QTextStream object, to ensure its // Use a new scope for the TQTextStream object, to ensure its
// destruction before the file is deleted // destruction before the file is deleted
QTextStream str(&file); TQTextStream str(&file);
// Make sure the file's version is correct // Make sure the file's version is correct
sTemp = str.readLine(); sTemp = str.readLine();
@ -99,7 +99,7 @@ bool QueryPageBase::load(const QString& sProjPath, const QString& sFileName)
// Read query records // Read query records
sTemp = str.readLine(); sTemp = str.readLine();
nState = 0; nState = 0;
while (sTemp != QString::null) { while (sTemp != TQString::null) {
switch (nState) { switch (nState) {
// File path // File path
case 0: case 0:
@ -143,9 +143,9 @@ bool QueryPageBase::load(const QString& sProjPath, const QString& sFileName)
* return * return
* @return true if successful, false otherwise * @return true if successful, false otherwise
*/ */
bool QueryPageBase::save(const QString& sProjPath, QString& sFileName) bool QueryPageBase::save(const TQString& sProjPath, TQString& sFileName)
{ {
QListViewItemIterator itr(m_pView); TQListViewItemIterator itr(m_pView);
// Get the file name to use // Get the file name to use
sFileName = getFileName(sProjPath); sFileName = getFileName(sProjPath);
@ -153,11 +153,11 @@ bool QueryPageBase::save(const QString& sProjPath, QString& sFileName)
return false; return false;
// Open the query file for writing // Open the query file for writing
QFile file(sProjPath + "/" + sFileName); TQFile file(sProjPath + "/" + sFileName);
if (!file.open(IO_WriteOnly)) if (!file.open(IO_WriteOnly))
return false; return false;
QTextStream str(&file); TQTextStream str(&file);
// Write the version string // Write the version string
str << FILE_VERSION << "\n"; str << FILE_VERSION << "\n";

@ -28,7 +28,7 @@
#ifndef QUERYPAGEBASE_H #ifndef QUERYPAGEBASE_H
#define QUERYPAGEBASE_H #define QUERYPAGEBASE_H
#include <qhbox.h> #include <ntqhbox.h>
class QueryView; class QueryView;
@ -42,16 +42,16 @@ class QueryView;
* of widget is defined by the different page classes. * of widget is defined by the different page classes.
* @author Elad Lahav * @author Elad Lahav
*/ */
class QueryPageBase : public QHBox class QueryPageBase : public TQHBox
{ {
Q_OBJECT Q_OBJECT
public: public:
QueryPageBase(QWidget* pParent = 0, const char* szName = 0); QueryPageBase(TQWidget* pParent = 0, const char* szName = 0);
~QueryPageBase(); ~QueryPageBase();
void applyPrefs(); void applyPrefs();
bool load(const QString&, const QString&); bool load(const TQString&, const TQString&);
bool save(const QString&, QString&); bool save(const TQString&, TQString&);
void selectNext(); void selectNext();
void selectPrev(); void selectPrev();
@ -89,7 +89,7 @@ public:
* @param bBrief true to generate a brief caption, false otherwise * @param bBrief true to generate a brief caption, false otherwise
* @return The page's title * @return The page's title
*/ */
virtual QString getCaption(bool bBrief = false) const = 0; virtual TQString getCaption(bool bBrief = false) const = 0;
signals: signals:
/** /**
@ -97,7 +97,7 @@ signals:
* @param sFile The "File" field of the selected record * @param sFile The "File" field of the selected record
* @param nLine The "Line" field of the selected record * @param nLine The "Line" field of the selected record
*/ */
void lineRequested(const QString& sFile, uint nLine); void lineRequested(const TQString& sFile, uint nLine);
protected: protected:
/** The embedded list. */ /** The embedded list. */
@ -116,8 +116,8 @@ protected:
* @param sLine The "Line" field of the record * @param sLine The "Line" field of the record
* @param sText The "Text" field of the record * @param sText The "Text" field of the record
*/ */
virtual void addRecord(const QString& sFile, const QString& sFunc, virtual void addRecord(const TQString& sFile, const TQString& sFunc,
const QString& sLine, const QString& sText) = 0; const TQString& sLine, const TQString& sText) = 0;
/** /**
* Creates a file path to store this page. * Creates a file path to store this page.
@ -126,7 +126,7 @@ protected:
* @param sProjPath The project's directory * @param sProjPath The project's directory
* @return The page's file path * @return The page's file path
*/ */
virtual QString getFileName(const QString& sProjPath) const = 0; virtual TQString getFileName(const TQString& sProjPath) const = 0;
/** /**
* Tries to read the file header of a stored page. * Tries to read the file header of a stored page.
@ -135,14 +135,14 @@ protected:
* @return true if the header was read successfully and contains the * @return true if the header was read successfully and contains the
* expected information, false otherwise * expected information, false otherwise
*/ */
virtual bool readHeader(QTextStream& str) = 0; virtual bool readHeader(TQTextStream& str) = 0;
/** /**
* Writes a header to a page's file. * Writes a header to a page's file.
* The contents of the header differ among inheriting classes. * The contents of the header differ among inheriting classes.
* @param str A text stream initialised to the open page file * @param str A text stream initialised to the open page file
*/ */
virtual void writeHeader(QTextStream& str) = 0; virtual void writeHeader(TQTextStream& str) = 0;
}; };
#endif #endif

@ -33,8 +33,8 @@
* @param pParent Parent widget * @param pParent Parent widget
* @param szName Optional object name * @param szName Optional object name
*/ */
QueryResultsMenu::QueryResultsMenu(QWidget* pParent, const char* szName) : QueryResultsMenu::QueryResultsMenu(TQWidget* pParent, const char* szName) :
QPopupMenu(pParent, szName), TQPopupMenu(pParent, szName),
m_pItem(NULL) m_pItem(NULL)
{ {
// Create the menu // Create the menu
@ -65,7 +65,7 @@ QueryResultsMenu::~QueryResultsMenu()
* @param nCol The column over which the menu was requested, -1 if no * @param nCol The column over which the menu was requested, -1 if no
* column is associated with the request * column is associated with the request
*/ */
void QueryResultsMenu::slotShow(QListViewItem* pItem, const QPoint& ptPos, void QueryResultsMenu::slotShow(TQListViewItem* pItem, const TQPoint& ptPos,
int nCol) int nCol)
{ {
// Save the requested item and column number to use in signals // Save the requested item and column number to use in signals

@ -28,9 +28,9 @@
#ifndef QUERYRESULTSMENU_H #ifndef QUERYRESULTSMENU_H
#define QUERYRESULTSMENU_H #define QUERYRESULTSMENU_H
#include <qpopupmenu.h> #include <ntqpopupmenu.h>
#include <qlistview.h> #include <ntqlistview.h>
#include <qregexp.h> #include <ntqregexp.h>
/** /**
* Provides a popup-menu for list views containing query results. * Provides a popup-menu for list views containing query results.
@ -41,36 +41,36 @@
* constructing the object. * constructing the object.
* @author Elad Lahav * @author Elad Lahav
*/ */
class QueryResultsMenu : public QPopupMenu class QueryResultsMenu : public TQPopupMenu
{ {
Q_OBJECT Q_OBJECT
public: public:
QueryResultsMenu(QWidget* pParent = 0, const char* szName = 0); QueryResultsMenu(TQWidget* pParent = 0, const char* szName = 0);
~QueryResultsMenu(); ~QueryResultsMenu();
public slots: public slots:
void slotShow(QListViewItem*, const QPoint&, int nCol); void slotShow(TQListViewItem*, const TQPoint&, int nCol);
signals: signals:
/** /**
* Indicates that the "View Source" menu item was selected. * Indicates that the "View Source" menu item was selected.
* @param pItem The item for which the menu was displayed * @param pItem The item for which the menu was displayed
*/ */
void viewSource(QListViewItem* pItem); void viewSource(TQListViewItem* pItem);
/** /**
* Indicates that the "Find Definition" menu item was selected. * Indicates that the "Find Definition" menu item was selected.
* @param sFunc The function to look for * @param sFunc The function to look for
*/ */
void findDef(const QString& sFunc); void findDef(const TQString& sFunc);
/** /**
* Indicates that the "Copy [Column]" menu item was selected. * Indicates that the "Copy [Column]" menu item was selected.
* @param pItem The item for which the menu was displayed * @param pItem The item for which the menu was displayed
* @param nCol The requested column * @param nCol The requested column
*/ */
void copy(QListViewItem* pItem, int nCol); void copy(TQListViewItem* pItem, int nCol);
/** /**
* Indicates that the "Filter..." menu item was selected. * Indicates that the "Filter..." menu item was selected.
@ -87,14 +87,14 @@ signals:
* Indicates that the "Remove Item" menu item was selected. * Indicates that the "Remove Item" menu item was selected.
* @param pItem The item for which the menu was displayed * @param pItem The item for which the menu was displayed
*/ */
void remove(QListViewItem* pItem); void remove(TQListViewItem* pItem);
private: private:
/** Menu item IDs. */ /** Menu item IDs. */
enum { ViewSource, FindDef, Copy, Filter, ShowAll, Remove }; enum { ViewSource, FindDef, Copy, Filter, ShowAll, Remove };
/** The item for which the popup menu is provided (cannot be NULL). */ /** The item for which the popup menu is provided (cannot be NULL). */
QListViewItem* m_pItem; TQListViewItem* m_pItem;
/** The list column for which the query was invoked. */ /** The list column for which the query was invoked. */
int m_nCol; int m_nCol;

@ -25,8 +25,8 @@
* *
***************************************************************************/ ***************************************************************************/
#include <qapplication.h> #include <ntqapplication.h>
#include <qclipboard.h> #include <ntqclipboard.h>
#include <klocale.h> #include <klocale.h>
#include "queryview.h" #include "queryview.h"
#include "queryresultsmenu.h" #include "queryresultsmenu.h"
@ -39,8 +39,8 @@
* @param pParent The parent widget * @param pParent The parent widget
* @param szName The name of the widget * @param szName The name of the widget
*/ */
QueryView::QueryView(QWidget* pParent, const char* szName) : QueryView::QueryView(TQWidget* pParent, const char* szName) :
QListView(pParent, szName), TQListView(pParent, szName),
m_pLastItem(NULL) m_pLastItem(NULL)
{ {
// Create the popup-menu // Create the popup-menu
@ -52,34 +52,34 @@ QueryView::QueryView(QWidget* pParent, const char* szName) :
addColumn(i18n("File")); addColumn(i18n("File"));
addColumn(i18n("Line")); addColumn(i18n("Line"));
addColumn(i18n("Text")); addColumn(i18n("Text"));
setColumnAlignment(2, Qt::AlignRight); setColumnAlignment(2, TQt::AlignRight);
setShowSortIndicator(true); setShowSortIndicator(true);
// A record is selected if it is either double-clicked, or the ENTER // A record is selected if it is either double-clicked, or the ENTER
// key is pressed while the record is highlighted // key is pressed while the record is highlighted
connect(this, SIGNAL(doubleClicked(QListViewItem*)), this, connect(this, SIGNAL(doubleClicked(TQListViewItem*)), this,
SLOT(slotRecordSelected(QListViewItem*))); SLOT(slotRecordSelected(TQListViewItem*)));
connect(this, SIGNAL(returnPressed(QListViewItem*)), this, connect(this, SIGNAL(returnPressed(TQListViewItem*)), this,
SLOT(slotRecordSelected(QListViewItem*))); SLOT(slotRecordSelected(TQListViewItem*)));
// Show the popup-menu when requested // Show the popup-menu when requested
connect(this, connect(this,
SIGNAL(contextMenuRequested(QListViewItem*, const QPoint&, int)), SIGNAL(contextMenuRequested(TQListViewItem*, const TQPoint&, int)),
m_pQueryMenu, SLOT(slotShow(QListViewItem*, const QPoint&, int))); m_pQueryMenu, SLOT(slotShow(TQListViewItem*, const TQPoint&, int)));
// Handle popup-menu commands // Handle popup-menu commands
connect(m_pQueryMenu, SIGNAL(viewSource(QListViewItem*)), this, connect(m_pQueryMenu, SIGNAL(viewSource(TQListViewItem*)), this,
SLOT(slotRecordSelected(QListViewItem*))); SLOT(slotRecordSelected(TQListViewItem*)));
connect(m_pQueryMenu, SIGNAL(findDef(const QString&)), this, connect(m_pQueryMenu, SIGNAL(findDef(const TQString&)), this,
SLOT(slotFindDef(const QString&))); SLOT(slotFindDef(const TQString&)));
connect(m_pQueryMenu, SIGNAL(copy(QListViewItem*, int)), this, connect(m_pQueryMenu, SIGNAL(copy(TQListViewItem*, int)), this,
SLOT(slotCopy(QListViewItem*, int))); SLOT(slotCopy(TQListViewItem*, int)));
connect(m_pQueryMenu, SIGNAL(filter(int)), this, SLOT(slotFilter(int))); connect(m_pQueryMenu, SIGNAL(filter(int)), this, SLOT(slotFilter(int)));
connect(m_pQueryMenu, SIGNAL(showAll()), this, connect(m_pQueryMenu, SIGNAL(showAll()), this,
SLOT(slotShowAll())); SLOT(slotShowAll()));
connect(m_pQueryMenu, SIGNAL(remove(QListViewItem*)), this, connect(m_pQueryMenu, SIGNAL(remove(TQListViewItem*)), this,
SLOT(slotRemoveItem(QListViewItem*))); SLOT(slotRemoveItem(TQListViewItem*)));
} }
/** /**
@ -97,10 +97,10 @@ QueryView::~QueryView()
* @param sText The line's text * @param sText The line's text
* @param pParent The parent item (ignored) * @param pParent The parent item (ignored)
*/ */
void QueryView::addRecord(const QString& sFunc, const QString& sFile, void QueryView::addRecord(const TQString& sFunc, const TQString& sFile,
const QString& sLine, const QString& sText, QListViewItem* /* pParent */) const TQString& sLine, const TQString& sText, TQListViewItem* /* pParent */)
{ {
QListViewItem* pItem; TQListViewItem* pItem;
pItem = new QueryViewItem(this, m_pLastItem, 2); pItem = new QueryViewItem(this, m_pLastItem, 2);
pItem->setText(0, sFunc); pItem->setText(0, sFunc);
@ -119,7 +119,7 @@ void QueryView::addRecord(const QString& sFunc, const QString& sFile,
* selectNext() for example). It has nothing to do with user selection. * selectNext() for example). It has nothing to do with user selection.
* @param pItem The list item to select * @param pItem The list item to select
*/ */
void QueryView::select(QListViewItem* pItem) void QueryView::select(TQListViewItem* pItem)
{ {
ensureItemVisible(pItem); ensureItemVisible(pItem);
setSelected(pItem, true); setSelected(pItem, true);
@ -135,7 +135,7 @@ void QueryView::select(QListViewItem* pItem)
*/ */
void QueryView::selectNext() void QueryView::selectNext()
{ {
QListViewItem* pItem; TQListViewItem* pItem;
// Do nothing if the list is empty // Do nothing if the list is empty
if (firstChild() == NULL) if (firstChild() == NULL)
@ -165,7 +165,7 @@ void QueryView::selectNext()
*/ */
void QueryView::selectPrev() void QueryView::selectPrev()
{ {
QListViewItem* pItem; TQListViewItem* pItem;
// Do nothing if the list is empty // Do nothing if the list is empty
if (firstChild() == NULL) if (firstChild() == NULL)
@ -201,7 +201,7 @@ void QueryView::queryProgress()
* Called when a query using this view terminates. * Called when a query using this view terminates.
* @param nRecords Number of records generated by the query * @param nRecords Number of records generated by the query
*/ */
void QueryView::queryFinished(uint nRecords, QListViewItem*) void QueryView::queryFinished(uint nRecords, TQListViewItem*)
{ {
// Auto-select a single record (no need to emit the show() signal in // Auto-select a single record (no need to emit the show() signal in
// that case) // that case)
@ -225,7 +225,7 @@ void QueryView::queryFinished(uint nRecords, QListViewItem*)
*/ */
QueryView::Iterator QueryView::getIterator() QueryView::Iterator QueryView::getIterator()
{ {
QListViewItem* pItem; TQListViewItem* pItem;
for (pItem = firstChild(); pItem != NULL && !pItem->isVisible(); for (pItem = firstChild(); pItem != NULL && !pItem->isVisible();
pItem = pItem->nextSibling()); pItem = pItem->nextSibling());
@ -235,14 +235,14 @@ QueryView::Iterator QueryView::getIterator()
/** /**
* Handles double-click events over the view. * Handles double-click events over the view.
* NOTE: We override this method since the QListView implementation opens * NOTE: We override this method since the TQListView implementation opens
* expandable items. This is undesired for tree-like query views (such as the * expandable items. This is undesired for tree-like query views (such as the
* call tree. * call tree.
* @param pEvent Event description object * @param pEvent Event description object
*/ */
void QueryView::contentsMouseDoubleClickEvent(QMouseEvent* pEvent) void QueryView::contentsMouseDoubleClickEvent(TQMouseEvent* pEvent)
{ {
QListViewItem* pItem; TQListViewItem* pItem;
// Handle only left button double-clicks // Handle only left button double-clicks
if (pEvent == NULL || pEvent->button() != LeftButton) if (pEvent == NULL || pEvent->button() != LeftButton)
@ -263,9 +263,9 @@ void QueryView::contentsMouseDoubleClickEvent(QMouseEvent* pEvent)
* signals of the list view. * signals of the list view.
* @param pItem The selected item * @param pItem The selected item
*/ */
void QueryView::slotRecordSelected(QListViewItem* pItem) void QueryView::slotRecordSelected(TQListViewItem* pItem)
{ {
QString sFileName, sLine; TQString sFileName, sLine;
// Get the file name and line number // Get the file name and line number
sFileName = pItem->text(1); sFileName = pItem->text(1);
@ -282,7 +282,7 @@ void QueryView::slotRecordSelected(QListViewItem* pItem)
* This slot is connected to the findDef() signal emitted by the results menu. * This slot is connected to the findDef() signal emitted by the results menu.
* @param sFunc The function to look for * @param sFunc The function to look for
*/ */
void QueryView::slotFindDef(const QString& sFunc) void QueryView::slotFindDef(const TQString& sFunc)
{ {
QueryViewDlg* pDlg; QueryViewDlg* pDlg;
@ -290,8 +290,8 @@ void QueryView::slotFindDef(const QString& sFunc)
pDlg = new QueryViewDlg(QueryViewDlg::DestroyOnSelect, this); pDlg = new QueryViewDlg(QueryViewDlg::DestroyOnSelect, this);
// Display a line when it is selected in the dialogue // Display a line when it is selected in the dialogue
connect(pDlg, SIGNAL(lineRequested(const QString&, uint)), this, connect(pDlg, SIGNAL(lineRequested(const TQString&, uint)), this,
SIGNAL(lineRequested(const QString&, uint))); SIGNAL(lineRequested(const TQString&, uint)));
// Start the query // Start the query
pDlg->query(CscopeFrontend::Definition, sFunc); pDlg->query(CscopeFrontend::Definition, sFunc);
@ -303,10 +303,10 @@ void QueryView::slotFindDef(const QString& sFunc)
* @param pItem The item from which to copy * @param pItem The item from which to copy
* @param nCol The index of the item field to copy * @param nCol The index of the item field to copy
*/ */
void QueryView::slotCopy(QListViewItem* pItem, int nCol) void QueryView::slotCopy(TQListViewItem* pItem, int nCol)
{ {
QApplication::clipboard()->setText(pItem->text(nCol), TQApplication::clipboard()->setText(pItem->text(nCol),
QClipboard::Clipboard); TQClipboard::Clipboard);
} }
/** /**
@ -320,15 +320,15 @@ void QueryView::slotCopy(QListViewItem* pItem, int nCol)
void QueryView::slotFilter(int nCol) void QueryView::slotFilter(int nCol)
{ {
SearchResultsDlg dlg(this); SearchResultsDlg dlg(this);
QRegExp re; TQRegExp re;
QListViewItem* pItem; TQListViewItem* pItem;
bool bNegate; bool bNegate;
// Prepare the dialogue // Prepare the dialogue
dlg.setColumn(nCol); dlg.setColumn(nCol);
// Show the dialogue // Show the dialogue
if (dlg.exec() != QDialog::Accepted) if (dlg.exec() != TQDialog::Accepted)
return; return;
// Get the selected regular expression // Get the selected regular expression
@ -362,7 +362,7 @@ void QueryView::slotFilter(int nCol)
*/ */
void QueryView::slotShowAll() void QueryView::slotShowAll()
{ {
QListViewItem* pItem; TQListViewItem* pItem;
// Iterate over all items in the list // Iterate over all items in the list
pItem = firstChild(); pItem = firstChild();
@ -378,7 +378,7 @@ void QueryView::slotShowAll()
* object. * object.
* @param pItem The item to remove * @param pItem The item to remove
*/ */
void QueryView::slotRemoveItem(QListViewItem* pItem) void QueryView::slotRemoveItem(TQListViewItem* pItem)
{ {
delete pItem; delete pItem;
} }
@ -399,7 +399,7 @@ void QueryView::Iterator::next()
/** /**
* @return The function associated with the list item the iterator points to * @return The function associated with the list item the iterator points to
*/ */
QString QueryView::Iterator::getFunc() TQString QueryView::Iterator::getFunc()
{ {
if (m_pItem == NULL) if (m_pItem == NULL)
return ""; return "";
@ -410,7 +410,7 @@ QString QueryView::Iterator::getFunc()
/** /**
* @return The file associated with the list item the iterator points to * @return The file associated with the list item the iterator points to
*/ */
QString QueryView::Iterator::getFile() TQString QueryView::Iterator::getFile()
{ {
if (m_pItem == NULL) if (m_pItem == NULL)
return ""; return "";
@ -422,7 +422,7 @@ QString QueryView::Iterator::getFile()
* @return The line number associated with the list item the iterator points * @return The line number associated with the list item the iterator points
* to * to
*/ */
QString QueryView::Iterator::getLine() TQString QueryView::Iterator::getLine()
{ {
if (m_pItem == NULL) if (m_pItem == NULL)
return ""; return "";
@ -433,7 +433,7 @@ QString QueryView::Iterator::getLine()
/** /**
* @return The text associated with the list item the iterator points to * @return The text associated with the list item the iterator points to
*/ */
QString QueryView::Iterator::getText() TQString QueryView::Iterator::getText()
{ {
if (m_pItem == NULL) if (m_pItem == NULL)
return ""; return "";

@ -28,8 +28,8 @@
#ifndef QUERYVIEW_H #ifndef QUERYVIEW_H
#define QUERYVIEW_H #define QUERYVIEW_H
#include <qlistview.h> #include <ntqlistview.h>
#include <qregexp.h> #include <ntqregexp.h>
class QueryResultsMenu; class QueryResultsMenu;
@ -39,7 +39,7 @@ class QueryResultsMenu;
* results numerically by line number. * results numerically by line number.
* @author Elad Lahav * @author Elad Lahav
*/ */
class QueryViewItem : public QListViewItem class QueryViewItem : public TQListViewItem
{ {
public: public:
/** /**
@ -49,8 +49,8 @@ public:
* @param pAfter The item to preceed the new one * @param pAfter The item to preceed the new one
* @param nLineCol The index of the line column * @param nLineCol The index of the line column
*/ */
QueryViewItem(QListView* pView, QListViewItem* pAfter, QueryViewItem(TQListView* pView, TQListViewItem* pAfter,
int nLineCol) : QListViewItem(pView, pAfter), m_nLineCol(nLineCol) int nLineCol) : TQListViewItem(pView, pAfter), m_nLineCol(nLineCol)
{} {}
/** /**
@ -60,8 +60,8 @@ public:
* @param pAfter The item to preceed the new one * @param pAfter The item to preceed the new one
* @param nLineCol The index of the line column * @param nLineCol The index of the line column
*/ */
QueryViewItem(QListViewItem* pParent, QListViewItem* pAfter, QueryViewItem(TQListViewItem* pParent, TQListViewItem* pAfter,
int nLineCol) : QListViewItem(pParent, pAfter), m_nLineCol(nLineCol) int nLineCol) : TQListViewItem(pParent, pAfter), m_nLineCol(nLineCol)
{} {}
/** /**
@ -75,7 +75,7 @@ public:
* @return 0 if the items are equal, 1 if the current item is greater, * @return 0 if the items are equal, 1 if the current item is greater,
* -1 if the current item is smaller * -1 if the current item is smaller
*/ */
virtual int compare(QListViewItem* pItem, int nCol, bool bAscend) const { virtual int compare(TQListViewItem* pItem, int nCol, bool bAscend) const {
if (nCol == m_nLineCol) { if (nCol == m_nLineCol) {
uint nLineCur, nLineOther; uint nLineCur, nLineOther;
int nResult; int nResult;
@ -94,7 +94,7 @@ public:
return -1; // The second item is greater return -1; // The second item is greater
} }
return QListViewItem::compare(pItem, nCol, bAscend); return TQListViewItem::compare(pItem, nCol, bAscend);
} }
private: private:
@ -115,21 +115,21 @@ private:
* from records, filter records, and more. * from records, filter records, and more.
* @author Elad Lahav * @author Elad Lahav
*/ */
class QueryView : public QListView class QueryView : public TQListView
{ {
Q_OBJECT Q_OBJECT
public: public:
QueryView(QWidget* pParent = 0, const char* szName = 0); QueryView(TQWidget* pParent = 0, const char* szName = 0);
~QueryView(); ~QueryView();
virtual void addRecord(const QString&, const QString&, const QString&, virtual void addRecord(const TQString&, const TQString&, const TQString&,
const QString&, QListViewItem* pParent = NULL); const TQString&, TQListViewItem* pParent = NULL);
virtual void select(QListViewItem*); virtual void select(TQListViewItem*);
virtual void selectNext(); virtual void selectNext();
virtual void selectPrev(); virtual void selectPrev();
virtual void queryProgress(); virtual void queryProgress();
virtual void queryFinished(uint, QListViewItem* pParent = NULL); virtual void queryFinished(uint, TQListViewItem* pParent = NULL);
/** /**
* Provides an iterator over the list of query results. * Provides an iterator over the list of query results.
@ -157,21 +157,21 @@ public:
void next(); void next();
QString getFunc(); TQString getFunc();
QString getFile(); TQString getFile();
QString getLine(); TQString getLine();
QString getText(); TQString getText();
private: private:
/** Points to the current list item. */ /** Points to the current list item. */
QListViewItem* m_pItem; TQListViewItem* m_pItem;
/** /**
* Private constructor used to return initialised iterators. * Private constructor used to return initialised iterators.
* This constructor can only be called from within QueryView. * This constructor can only be called from within QueryView.
* @param pItem The initial list item * @param pItem The initial list item
*/ */
Iterator(QListViewItem* pItem) : m_pItem(pItem) {} Iterator(TQListViewItem* pItem) : m_pItem(pItem) {}
friend class QueryView; friend class QueryView;
}; };
@ -194,24 +194,24 @@ signals:
* @param sFile The "File" field of the selected record * @param sFile The "File" field of the selected record
* @param nLine The "Line" field of the selected record * @param nLine The "Line" field of the selected record
*/ */
void lineRequested(const QString& sFile, uint nLine); void lineRequested(const TQString& sFile, uint nLine);
protected: protected:
/** A popup-menu for manipulating query result items. */ /** A popup-menu for manipulating query result items. */
QueryResultsMenu* m_pQueryMenu; QueryResultsMenu* m_pQueryMenu;
/** A pointer to the last item (used for appending results). */ /** A pointer to the last item (used for appending results). */
QListViewItem* m_pLastItem; TQListViewItem* m_pLastItem;
void contentsMouseDoubleClickEvent(QMouseEvent*); void contentsMouseDoubleClickEvent(TQMouseEvent*);
protected slots: protected slots:
virtual void slotRecordSelected(QListViewItem*); virtual void slotRecordSelected(TQListViewItem*);
virtual void slotFindDef(const QString&); virtual void slotFindDef(const TQString&);
virtual void slotCopy(QListViewItem*, int); virtual void slotCopy(TQListViewItem*, int);
virtual void slotFilter(int); virtual void slotFilter(int);
virtual void slotShowAll(); virtual void slotShowAll();
virtual void slotRemoveItem(QListViewItem*); virtual void slotRemoveItem(TQListViewItem*);
}; };
#endif #endif

@ -34,7 +34,7 @@
* @param pParent The parent widget * @param pParent The parent widget
* @param szName The widget's name * @param szName The widget's name
*/ */
QueryViewDlg::QueryViewDlg(uint nFlags, QWidget* pParent, QueryViewDlg::QueryViewDlg(uint nFlags, TQWidget* pParent,
const char* szName) : const char* szName) :
QueryViewLayout(pParent, szName), QueryViewLayout(pParent, szName),
m_nFlags(nFlags) m_nFlags(nFlags)
@ -50,8 +50,8 @@ QueryViewDlg::QueryViewDlg(uint nFlags, QWidget* pParent,
connect(m_pView, SIGNAL(needToShow()), this, SLOT(slotShow())); connect(m_pView, SIGNAL(needToShow()), this, SLOT(slotShow()));
// Propagate the lineRequested() signal from the QueryView object // Propagate the lineRequested() signal from the QueryView object
connect(m_pView, SIGNAL(lineRequested(const QString&, uint)), this, connect(m_pView, SIGNAL(lineRequested(const TQString&, uint)), this,
SLOT(slotLineRequested(const QString&, uint))); SLOT(slotLineRequested(const TQString&, uint)));
// Make the dialogue modal // Make the dialogue modal
setModal(true); setModal(true);
@ -70,7 +70,7 @@ QueryViewDlg::~QueryViewDlg()
* @param sText The query's text * @param sText The query's text
* @param bCase true for case-sensitive queries, false otherwise * @param bCase true for case-sensitive queries, false otherwise
*/ */
void QueryViewDlg::query(uint nType, const QString& sText, bool bCase) void QueryViewDlg::query(uint nType, const TQString& sText, bool bCase)
{ {
m_pDriver->query(nType, sText, bCase); m_pDriver->query(nType, sText, bCase);
} }
@ -91,7 +91,7 @@ void QueryViewDlg::slotShow()
* This slot is connected to the lineRequested() signal emitted by the * This slot is connected to the lineRequested() signal emitted by the
* QueryView widget. * QueryView widget.
*/ */
void QueryViewDlg::slotLineRequested(const QString& sFileName, uint nLine) void QueryViewDlg::slotLineRequested(const TQString& sFileName, uint nLine)
{ {
emit lineRequested(sFileName, nLine); emit lineRequested(sFileName, nLine);

@ -50,7 +50,7 @@ class QueryViewDlg : public QueryViewLayout
Q_OBJECT Q_OBJECT
public: public:
QueryViewDlg(uint nFlags = 0, QWidget* pParent = 0, QueryViewDlg(uint nFlags = 0, TQWidget* pParent = 0,
const char* szName = 0); const char* szName = 0);
~QueryViewDlg(); ~QueryViewDlg();
@ -58,7 +58,7 @@ public:
enum { CloseOnSelect = 0x1, DestroyOnClose = 0x2, enum { CloseOnSelect = 0x1, DestroyOnClose = 0x2,
DestroyOnSelect = CloseOnSelect | DestroyOnClose }; DestroyOnSelect = CloseOnSelect | DestroyOnClose };
void query(uint, const QString&, bool bCase = true); void query(uint, const TQString&, bool bCase = true);
QueryView::Iterator getIterator(); QueryView::Iterator getIterator();
@ -69,7 +69,7 @@ signals:
* @param sFile The "File" field of the selected record * @param sFile The "File" field of the selected record
* @param nLine The "Line" field of the selected record * @param nLine The "Line" field of the selected record
*/ */
void lineRequested(const QString& sFile, uint nLine); void lineRequested(const TQString& sFile, uint nLine);
private: private:
/** Flags the control the behaviour of the dialogue. */ /** Flags the control the behaviour of the dialogue. */
@ -81,7 +81,7 @@ private:
private slots: private slots:
void slotShow(); void slotShow();
void slotLineRequested(const QString&, uint); void slotLineRequested(const TQString&, uint);
}; };
#endif #endif

@ -36,8 +36,8 @@
* @param pParent The parent object of the driver * @param pParent The parent object of the driver
* @param szName The name of the object * @param szName The name of the object
*/ */
QueryViewDriver::QueryViewDriver(QueryView* pView, QObject* pParent, QueryViewDriver::QueryViewDriver(QueryView* pView, TQObject* pParent,
const char* szName) : QObject(pParent, szName), const char* szName) : TQObject(pParent, szName),
m_pView(pView), m_pView(pView),
m_pItem(NULL), m_pItem(NULL),
m_progress(pView), m_progress(pView),
@ -76,8 +76,8 @@ QueryViewDriver::~QueryViewDriver()
* @param pItem If non-null, represents an view item passed back to * @param pItem If non-null, represents an view item passed back to
* the view in a call to addRecord() * the view in a call to addRecord()
*/ */
void QueryViewDriver::query(uint nType, const QString& sText, bool bCase, void QueryViewDriver::query(uint nType, const TQString& sText, bool bCase,
QListViewItem* pItem) TQListViewItem* pItem)
{ {
m_pItem = pItem; m_pItem = pItem;
@ -99,7 +99,7 @@ void QueryViewDriver::query(uint nType, const QString& sText, bool bCase,
*/ */
void QueryViewDriver::slotDataReady(FrontendToken* pToken) void QueryViewDriver::slotDataReady(FrontendToken* pToken)
{ {
QString sFile, sFunc, sLine, sText; TQString sFile, sFunc, sLine, sText;
// Get the file name // Get the file name
sFile = pToken->getData(); sFile = pToken->getData();

@ -28,8 +28,8 @@
#ifndef QUERYVIEWDRIVER_H #ifndef QUERYVIEWDRIVER_H
#define QUERYVIEWDRIVER_H #define QUERYVIEWDRIVER_H
#include <qobject.h> #include <ntqobject.h>
#include <qlistview.h> #include <ntqlistview.h>
#include "cscopefrontend.h" #include "cscopefrontend.h"
class QueryView; class QueryView;
@ -42,15 +42,15 @@ class QueryView;
* query progress bar. * query progress bar.
* @author Elad Lahav * @author Elad Lahav
*/ */
class QueryViewDriver : public QObject class QueryViewDriver : public TQObject
{ {
Q_OBJECT Q_OBJECT
public: public:
QueryViewDriver(QueryView*, QObject* pParent = 0, const char* szName = 0); QueryViewDriver(QueryView*, TQObject* pParent = 0, const char* szName = 0);
~QueryViewDriver(); ~QueryViewDriver();
void query(uint, const QString&, bool bCase, QListViewItem* pItem = NULL); void query(uint, const TQString&, bool bCase, TQListViewItem* pItem = NULL);
/** /**
* @return true if a query is currently running, false otherwise * @return true if a query is currently running, false otherwise
@ -65,7 +65,7 @@ private:
QueryView* m_pView; QueryView* m_pView;
/** QueryView item passed to addRecord(). */ /** QueryView item passed to addRecord(). */
QListViewItem* m_pItem; TQListViewItem* m_pItem;
/** Displays query progress information. */ /** Displays query progress information. */
CscopeProgress m_progress; CscopeProgress m_progress;

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>QueryViewLayout</class> <class>QueryViewLayout</class>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>QueryViewLayout</cstring> <cstring>QueryViewLayout</cstring>
</property> </property>
@ -27,7 +27,7 @@
<cstring>m_pView</cstring> <cstring>m_pView</cstring>
</property> </property>
</widget> </widget>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel1</cstring> <cstring>textLabel1</cstring>
</property> </property>
@ -57,7 +57,7 @@
<enum>Horizontal</enum> <enum>Horizontal</enum>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>Layout1</cstring> <cstring>Layout1</cstring>
</property> </property>
@ -88,7 +88,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>buttonOk</cstring> <cstring>buttonOk</cstring>
</property> </property>
@ -105,7 +105,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>buttonCancel</cstring> <cstring>buttonCancel</cstring>
</property> </property>

@ -25,8 +25,8 @@
* *
***************************************************************************/ ***************************************************************************/
#include <qtoolbutton.h> #include <ntqtoolbutton.h>
#include <qtooltip.h> #include <ntqtooltip.h>
#include <klocale.h> #include <klocale.h>
#include <kmessagebox.h> #include <kmessagebox.h>
#include "querywidget.h" #include "querywidget.h"
@ -38,7 +38,7 @@
* @param pParent The parent widget * @param pParent The parent widget
* @param szName The widget's name * @param szName The widget's name
*/ */
QueryWidget::QueryWidget(QWidget* pParent, const char* szName) : QueryWidget::QueryWidget(TQWidget* pParent, const char* szName) :
QueryWidgetLayout(pParent, szName), QueryWidgetLayout(pParent, szName),
m_pPageMenu(NULL), m_pPageMenu(NULL),
m_pLockAction(NULL), m_pLockAction(NULL),
@ -50,18 +50,18 @@ QueryWidget::QueryWidget(QWidget* pParent, const char* szName) :
m_pQueryTabs->setHoverCloseButton(true); m_pQueryTabs->setHoverCloseButton(true);
// Change the lock action state according to the current page // Change the lock action state according to the current page
connect(m_pQueryTabs, SIGNAL(currentChanged(QWidget*)), this, connect(m_pQueryTabs, SIGNAL(currentChanged(TQWidget*)), this,
SLOT(slotCurrentChanged(QWidget*))); SLOT(slotCurrentChanged(TQWidget*)));
// Close a query when its tab button is clicked // Close a query when its tab button is clicked
connect(m_pQueryTabs, SIGNAL(closeRequest(QWidget*)), this, connect(m_pQueryTabs, SIGNAL(closeRequest(TQWidget*)), this,
SLOT(slotClosePage(QWidget*))); SLOT(slotClosePage(TQWidget*)));
// Show the menu when requested // Show the menu when requested
connect(m_pQueryTabs, SIGNAL(contextMenu(const QPoint&)), this, connect(m_pQueryTabs, SIGNAL(contextMenu(const TQPoint&)), this,
SLOT(slotContextMenu(const QPoint&))); SLOT(slotContextMenu(const TQPoint&)));
connect(m_pQueryTabs, SIGNAL(contextMenu(QWidget*, const QPoint&)), this, connect(m_pQueryTabs, SIGNAL(contextMenu(TQWidget*, const TQPoint&)), this,
SLOT(slotContextMenu(QWidget*, const QPoint&))); SLOT(slotContextMenu(TQWidget*, const TQPoint&)));
} }
/** /**
@ -79,7 +79,7 @@ QueryWidget::~QueryWidget()
* @param sText The query's text, as entered by the user * @param sText The query's text, as entered by the user
* @param bCase true for case-sensitive queries, false otherwise * @param bCase true for case-sensitive queries, false otherwise
*/ */
void QueryWidget::initQuery(uint nType, const QString& sText, bool bCase) void QueryWidget::initQuery(uint nType, const TQString& sText, bool bCase)
{ {
QueryPage* pPage; QueryPage* pPage;
@ -123,12 +123,12 @@ void QueryWidget::applyPrefs()
* @param sProjPath The full path of the project directory * @param sProjPath The full path of the project directory
* @param slFiles The list of query file names to load * @param slFiles The list of query file names to load
*/ */
void QueryWidget::loadPages(const QString& sProjPath, void QueryWidget::loadPages(const TQString& sProjPath,
const QStringList& slFiles) const TQStringList& slFiles)
{ {
QStringList::ConstIterator itr; TQStringList::ConstIterator itr;
QueryPageBase* pPage; QueryPageBase* pPage;
QString sName; TQString sName;
// Iterate through query files // Iterate through query files
for (itr = slFiles.begin(); itr != slFiles.end(); ++itr) { for (itr = slFiles.begin(); itr != slFiles.end(); ++itr) {
@ -155,11 +155,11 @@ void QueryWidget::loadPages(const QString& sProjPath,
* @param sProjPath The full path of the project directory * @param sProjPath The full path of the project directory
* @param slFiles Holds a list of query file names, upon return * @param slFiles Holds a list of query file names, upon return
*/ */
void QueryWidget::savePages(const QString& sProjPath, QStringList& slFiles) void QueryWidget::savePages(const TQString& sProjPath, TQStringList& slFiles)
{ {
int nPageCount, i; int nPageCount, i;
QueryPage* pPage; QueryPage* pPage;
QString sFileName; TQString sFileName;
// Iterate pages // Iterate pages
nPageCount = m_pQueryTabs->count(); nPageCount = m_pQueryTabs->count();
@ -180,8 +180,8 @@ void QueryWidget::savePages(const QString& sProjPath, QStringList& slFiles)
* @param sText The contents of the line pointed to by the file path and * @param sText The contents of the line pointed to by the file path and
* line number * line number
*/ */
void QueryWidget::addHistoryRecord(const QString& sFile, uint nLine, void QueryWidget::addHistoryRecord(const TQString& sFile, uint nLine,
const QString& sText) const TQString& sText)
{ {
// Validate file name and line number // Validate file name and line number
if (sFile.isEmpty() || nLine == 0) if (sFile.isEmpty() || nLine == 0)
@ -216,7 +216,7 @@ void QueryWidget::setPageCaption(QueryPageBase* pPage)
void QueryWidget::addQueryPage() void QueryWidget::addQueryPage()
{ {
QueryPage* pPage; QueryPage* pPage;
QString sTitle; TQString sTitle;
// Create the page // Create the page
pPage = new QueryPage(this); pPage = new QueryPage(this);
@ -228,8 +228,8 @@ void QueryWidget::addQueryPage()
// Emit the lineRequested() signal when a query record is selected on // Emit the lineRequested() signal when a query record is selected on
// this page // this page
connect(pPage, SIGNAL(lineRequested(const QString&, uint)), this, connect(pPage, SIGNAL(lineRequested(const TQString&, uint)), this,
SLOT(slotRequestLine(const QString&, uint))); SLOT(slotRequestLine(const TQString&, uint)));
} }
/** /**
@ -316,7 +316,7 @@ void QueryWidget::slotPrevResult()
*/ */
void QueryWidget::slotCloseCurrent() void QueryWidget::slotCloseCurrent()
{ {
QWidget* pPage; TQWidget* pPage;
// Close the current page // Close the current page
pPage = currentPage(); pPage = currentPage();
@ -385,7 +385,7 @@ void QueryWidget::selectActiveHistory()
* @param pMenu Pointer to the popup menu * @param pMenu Pointer to the popup menu
* @param pAction Pointer to the "Lock/Unlock" toggle action * @param pAction Pointer to the "Lock/Unlock" toggle action
*/ */
void QueryWidget::setPageMenu(QPopupMenu* pMenu, KToggleAction* pAction) void QueryWidget::setPageMenu(TQPopupMenu* pMenu, KToggleAction* pAction)
{ {
m_pPageMenu = pMenu; m_pPageMenu = pMenu;
m_pLockAction = pAction; m_pLockAction = pAction;
@ -400,7 +400,7 @@ void QueryWidget::setPageMenu(QPopupMenu* pMenu, KToggleAction* pAction)
* @param sFileName The file's path * @param sFileName The file's path
* @param nLine The requested line in the file * @param nLine The requested line in the file
*/ */
void QueryWidget::slotRequestLine(const QString& sFileName, uint nLine) void QueryWidget::slotRequestLine(const TQString& sFileName, uint nLine)
{ {
// Disable history if the request came from the active history page // Disable history if the request came from the active history page
if (currentPage() == m_pHistPage) if (currentPage() == m_pHistPage)
@ -418,7 +418,7 @@ void QueryWidget::slotRequestLine(const QString& sFileName, uint nLine)
* Update the lock button when the current query page changes. * Update the lock button when the current query page changes.
* @param pWidget The new current page * @param pWidget The new current page
*/ */
void QueryWidget::slotCurrentChanged(QWidget* pWidget) void QueryWidget::slotCurrentChanged(TQWidget* pWidget)
{ {
QueryPage* pPage; QueryPage* pPage;
@ -431,7 +431,7 @@ void QueryWidget::slotCurrentChanged(QWidget* pWidget)
* This slot is connected to the closeRequest() signal of the KTabBar object. * This slot is connected to the closeRequest() signal of the KTabBar object.
* @param pPage The page to close * @param pPage The page to close
*/ */
void QueryWidget::slotClosePage(QWidget* pPage) void QueryWidget::slotClosePage(TQWidget* pPage)
{ {
// Prompt the user before closing a locked query // Prompt the user before closing a locked query
if (((QueryPage*)pPage)->isLocked()) { if (((QueryPage*)pPage)->isLocked()) {
@ -461,7 +461,7 @@ void QueryWidget::slotClosePage(QWidget* pPage)
* @param pt The point over which the mouse was clicked in request for the * @param pt The point over which the mouse was clicked in request for the
* context menu * context menu
*/ */
void QueryWidget::slotContextMenu(const QPoint& pt) void QueryWidget::slotContextMenu(const TQPoint& pt)
{ {
uint i; uint i;
@ -481,7 +481,7 @@ void QueryWidget::slotContextMenu(const QPoint& pt)
* @param pt The point over which the mouse was clicked in request for * @param pt The point over which the mouse was clicked in request for
* the context menu * the context menu
*/ */
void QueryWidget::slotContextMenu(QWidget* pWidget, const QPoint& pt) void QueryWidget::slotContextMenu(TQWidget* pWidget, const TQPoint& pt)
{ {
uint i; uint i;
@ -569,7 +569,7 @@ void QueryWidget::findHistoryPage()
{ {
HistoryPage* pPage; HistoryPage* pPage;
int nPages, i; int nPages, i;
QString sTitle; TQString sTitle;
// First check if the active history page is unlocked // First check if the active history page is unlocked
if (m_pHistPage != NULL && !m_pHistPage->isLocked()) if (m_pHistPage != NULL && !m_pHistPage->isLocked())
@ -594,8 +594,8 @@ void QueryWidget::findHistoryPage()
// Emit the lineRequested() signal when a query record is selected on // Emit the lineRequested() signal when a query record is selected on
// this page // this page
connect(m_pHistPage, SIGNAL(lineRequested(const QString&, uint)), this, connect(m_pHistPage, SIGNAL(lineRequested(const TQString&, uint)), this,
SLOT(slotRequestLine(const QString&, uint))); SLOT(slotRequestLine(const TQString&, uint)));
} }
#include "querywidget.moc" #include "querywidget.moc"

@ -28,8 +28,8 @@
#ifndef QUERYWIDGET_H #ifndef QUERYWIDGET_H
#define QUERYWIDGET_H #define QUERYWIDGET_H
#include <qlistview.h> #include <ntqlistview.h>
#include <qpopupmenu.h> #include <ntqpopupmenu.h>
#include <kaction.h> #include <kaction.h>
#include "querywidgetlayout.h" #include "querywidgetlayout.h"
#include "tabwidget.h" #include "tabwidget.h"
@ -47,17 +47,17 @@ class QueryWidget : public QueryWidgetLayout
Q_OBJECT Q_OBJECT
public: public:
QueryWidget(QWidget* pParent = 0, const char* szName = 0); QueryWidget(TQWidget* pParent = 0, const char* szName = 0);
~QueryWidget(); ~QueryWidget();
void addQueryPage(); void addQueryPage();
void initQuery(uint, const QString&, bool); void initQuery(uint, const TQString&, bool);
void applyPrefs(); void applyPrefs();
void loadPages(const QString&, const QStringList&); void loadPages(const TQString&, const TQStringList&);
void savePages(const QString&, QStringList&); void savePages(const TQString&, TQStringList&);
void addHistoryRecord(const QString&, uint, const QString&); void addHistoryRecord(const TQString&, uint, const TQString&);
void selectActiveHistory(); void selectActiveHistory();
void setPageMenu(QPopupMenu*, KToggleAction*); void setPageMenu(TQPopupMenu*, KToggleAction*);
void getBookmarks(FileLocationList&); void getBookmarks(FileLocationList&);
/** /**
@ -86,7 +86,7 @@ signals:
* @param sPath The full path of the requested source file * @param sPath The full path of the requested source file
* @param nLine The requested line number * @param nLine The requested line number
*/ */
void lineRequested(const QString& sPath, uint nLine); void lineRequested(const TQString& sPath, uint nLine);
/** /**
* Emitted when new query page is requested by user * Emitted when new query page is requested by user
@ -96,7 +96,7 @@ signals:
private: private:
/** A popup menu with query page commands (new query, lock/unlock, close /** A popup menu with query page commands (new query, lock/unlock, close
query, etc.). */ query, etc.). */
QPopupMenu* m_pPageMenu; TQPopupMenu* m_pPageMenu;
/** A toggle-like action for changing the locked state of a query. */ /** A toggle-like action for changing the locked state of a query. */
KToggleAction* m_pLockAction; KToggleAction* m_pLockAction;
@ -123,7 +123,7 @@ private:
/** /**
* @param pWidget A query page to set as the current one * @param pWidget A query page to set as the current one
*/ */
inline void setCurrentPage(QWidget* pWidget) { inline void setCurrentPage(TQWidget* pWidget) {
if (pWidget) if (pWidget)
m_pQueryTabs->setCurrentPage(m_pQueryTabs->indexOf(pWidget)); m_pQueryTabs->setCurrentPage(m_pQueryTabs->indexOf(pWidget));
} }
@ -133,7 +133,7 @@ private:
* @param pPage The page to check * @param pPage The page to check
* @return true if the given page is a history page * @return true if the given page is a history page
*/ */
inline bool isHistoryPage(QWidget* pPage) { inline bool isHistoryPage(TQWidget* pPage) {
return (dynamic_cast<HistoryPage*>(pPage) != NULL); return (dynamic_cast<HistoryPage*>(pPage) != NULL);
} }
@ -142,11 +142,11 @@ private:
void findHistoryPage(); void findHistoryPage();
private slots: private slots:
void slotRequestLine(const QString&, uint); void slotRequestLine(const TQString&, uint);
void slotCurrentChanged(QWidget*); void slotCurrentChanged(TQWidget*);
void slotClosePage(QWidget*); void slotClosePage(TQWidget*);
void slotContextMenu(const QPoint&); void slotContextMenu(const TQPoint&);
void slotContextMenu(QWidget*, const QPoint&); void slotContextMenu(TQWidget*, const TQPoint&);
}; };
#endif #endif

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>QueryWidgetLayout</class> <class>QueryWidgetLayout</class>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>QueryWidgetLayout</cstring> <cstring>QueryWidgetLayout</cstring>
</property> </property>

@ -25,8 +25,8 @@
* *
***************************************************************************/ ***************************************************************************/
#include <qlabel.h> #include <ntqlabel.h>
#include <qpushbutton.h> #include <ntqpushbutton.h>
#include <klocale.h> #include <klocale.h>
#include "scanprogressdlg.h" #include "scanprogressdlg.h"
@ -35,7 +35,7 @@
* @param pParent The parent widget * @param pParent The parent widget
* @param szName The widget's name * @param szName The widget's name
*/ */
ScanProgressDlg::ScanProgressDlg(QWidget* pParent, const char* szName) : ScanProgressDlg::ScanProgressDlg(TQWidget* pParent, const char* szName) :
ScanProgressLayout(pParent, szName), ScanProgressLayout(pParent, szName),
m_nFiles(0), m_nFiles(0),
m_nCurFiles(0) m_nCurFiles(0)
@ -61,7 +61,7 @@ ScanProgressDlg::~ScanProgressDlg()
*/ */
void ScanProgressDlg::addFiles(int nFiles) void ScanProgressDlg::addFiles(int nFiles)
{ {
QString sText; TQString sText;
// Do nothing if no files were scanned // Do nothing if no files were scanned
if (nFiles <= 0) if (nFiles <= 0)

@ -28,7 +28,7 @@
#ifndef SCANPROGRESSDLG_H #ifndef SCANPROGRESSDLG_H
#define SCANPROGRESSDLG_H #define SCANPROGRESSDLG_H
#include <qwidget.h> #include <ntqwidget.h>
#include <scanprogresslayout.h> #include <scanprogresslayout.h>
/** /**
@ -44,7 +44,7 @@ class ScanProgressDlg : public ScanProgressLayout
Q_OBJECT Q_OBJECT
public: public:
ScanProgressDlg(QWidget* pParent = 0, const char* szName = 0); ScanProgressDlg(TQWidget* pParent = 0, const char* szName = 0);
~ScanProgressDlg(); ~ScanProgressDlg();
void addFiles(int); void addFiles(int);

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.1" stdsetdef="1"> <!DOCTYPE UI><UI version="3.1" stdsetdef="1">
<class>ScanProgressLayout</class> <class>ScanProgressLayout</class>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>ScanProgressLayout</cstring> <cstring>ScanProgressLayout</cstring>
</property> </property>
@ -19,7 +19,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout4</cstring> <cstring>layout4</cstring>
</property> </property>
@ -27,7 +27,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>m_pText</cstring> <cstring>m_pText</cstring>
</property> </property>
@ -52,7 +52,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout2</cstring> <cstring>layout2</cstring>
</property> </property>
@ -77,7 +77,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pCancelButton</cstring> <cstring>m_pCancelButton</cstring>
</property> </property>

@ -25,25 +25,25 @@
* *
***************************************************************************/ ***************************************************************************/
#include <qheader.h> #include <ntqheader.h>
#include "searchlist.h" #include "searchlist.h"
/** /**
* Intercepting additional key events of QLineEdit to browse the list * Intercepting additional key events of TQLineEdit to browse the list
* @param pKey The pressed key event * @param pKey The pressed key event
*/ */
void SearchLineEdit::keyPressEvent(QKeyEvent* pKey) void SearchLineEdit::keyPressEvent(TQKeyEvent* pKey)
{ {
switch(pKey->key()) { switch(pKey->key()) {
case Qt::Key_Up: case TQt::Key_Up:
case Qt::Key_Down: case TQt::Key_Down:
case Qt::Key_PageUp: case TQt::Key_PageUp:
case Qt::Key_PageDown: case TQt::Key_PageDown:
emit keyPressed(pKey); emit keyPressed(pKey);
break; break;
default: default:
QLineEdit::keyPressEvent(pKey); TQLineEdit::keyPressEvent(pKey);
break; break;
} }
} }
@ -53,7 +53,7 @@ void SearchLineEdit::keyPressEvent(QKeyEvent* pKey)
* @param pParent Owner list view widget * @param pParent Owner list view widget
*/ */
ListToolTip::ListToolTip(SearchList* pParent) : ListToolTip::ListToolTip(SearchList* pParent) :
QToolTip(pParent->getList()->viewport()), TQToolTip(pParent->getList()->viewport()),
m_pList(pParent) m_pList(pParent)
{ {
} }
@ -63,11 +63,11 @@ ListToolTip::ListToolTip(SearchList* pParent) :
* pointer. * pointer.
* @param pt The mouse pointer coordinates * @param pt The mouse pointer coordinates
*/ */
void ListToolTip::maybeTip(const QPoint& pt) void ListToolTip::maybeTip(const TQPoint& pt)
{ {
QString str; TQString str;
QListView* pList; TQListView* pList;
QListViewItem* pItem; TQListViewItem* pItem;
// Get the item at the given point // Get the item at the given point
pList = m_pList->getList(); pList = m_pList->getList();
@ -80,17 +80,17 @@ void ListToolTip::maybeTip(const QPoint& pt)
return; return;
// Get the bounding rectangle of the item // Get the bounding rectangle of the item
const QRect rcItem = pList->itemRect(pItem); const TQRect rcItem = pList->itemRect(pItem);
if (!rcItem.isValid()) if (!rcItem.isValid())
return; return;
// Get the header coordinates // Get the header coordinates
const QRect rcHead = pList->header()->rect(); const TQRect rcHead = pList->header()->rect();
if (!rcHead.isValid()) if (!rcHead.isValid())
return; return;
// Calculate the tool-tip rectangle // Calculate the tool-tip rectangle
QRect rcCell(rcHead.left(), rcItem.top(), rcItem.width(), rcItem.height()); TQRect rcCell(rcHead.left(), rcItem.top(), rcItem.width(), rcItem.height());
// Display the tool-tip // Display the tool-tip
tip(rcCell, str); tip(rcCell, str);
@ -102,28 +102,28 @@ void ListToolTip::maybeTip(const QPoint& pt)
* @param pParent The parent widget * @param pParent The parent widget
* @param szName The widget's name * @param szName The widget's name
*/ */
SearchList::SearchList(int nSearchCol, QWidget* pParent, const char* szName) : SearchList::SearchList(int nSearchCol, TQWidget* pParent, const char* szName) :
QVBox(pParent, szName), TQVBox(pParent, szName),
m_nSearchCol(nSearchCol) m_nSearchCol(nSearchCol)
{ {
// Create the child widgets // Create the child widgets
m_pEdit = new SearchLineEdit(this); m_pEdit = new SearchLineEdit(this);
m_pList = new QListView(this); m_pList = new TQListView(this);
// Set up the tooltip generator // Set up the tooltip generator
QToolTip::remove(m_pList); TQToolTip::remove(m_pList);
m_pToolTip = new ListToolTip(this); m_pToolTip = new ListToolTip(this);
connect(m_pEdit, SIGNAL(textChanged(const QString&)), this, connect(m_pEdit, SIGNAL(textChanged(const TQString&)), this,
SLOT(slotFindItem(const QString&))); SLOT(slotFindItem(const TQString&)));
connect(m_pList, SIGNAL(doubleClicked(QListViewItem*)), this, connect(m_pList, SIGNAL(doubleClicked(TQListViewItem*)), this,
SLOT(slotItemSelected(QListViewItem*))); SLOT(slotItemSelected(TQListViewItem*)));
connect(m_pList, SIGNAL(returnPressed(QListViewItem*)), this, connect(m_pList, SIGNAL(returnPressed(TQListViewItem*)), this,
SLOT(slotItemSelected(QListViewItem*))); SLOT(slotItemSelected(TQListViewItem*)));
connect(m_pEdit, SIGNAL(returnPressed()), this, connect(m_pEdit, SIGNAL(returnPressed()), this,
SLOT(slotItemSelected())); SLOT(slotItemSelected()));
connect(m_pEdit, SIGNAL(keyPressed(QKeyEvent*)), this, connect(m_pEdit, SIGNAL(keyPressed(TQKeyEvent*)), this,
SLOT(slotKeyPressed(QKeyEvent*))); SLOT(slotKeyPressed(TQKeyEvent*)));
} }
/** /**
@ -148,9 +148,9 @@ void SearchList::slotSetFocus()
* This slot is connected to the textChanged() signal of the line edit widget. * This slot is connected to the textChanged() signal of the line edit widget.
* @param sText The new text in the edit widget * @param sText The new text in the edit widget
*/ */
void SearchList::slotFindItem(const QString& sText) void SearchList::slotFindItem(const TQString& sText)
{ {
QListViewItem* pItem; TQListViewItem* pItem;
// Try to find an item that contains this text // Try to find an item that contains this text
// Priority to exactly matched, // Priority to exactly matched,
@ -172,7 +172,7 @@ void SearchList::slotFindItem(const QString& sText)
* This slot is connected to the doubleClicked() and returnPressed() * This slot is connected to the doubleClicked() and returnPressed()
* signals of the list widget. * signals of the list widget.
*/ */
void SearchList::slotItemSelected(QListViewItem* pItem) void SearchList::slotItemSelected(TQListViewItem* pItem)
{ {
processItemSelected(pItem); processItemSelected(pItem);
m_pEdit->setText(""); m_pEdit->setText("");
@ -185,7 +185,7 @@ void SearchList::slotItemSelected(QListViewItem* pItem)
*/ */
void SearchList::slotItemSelected() void SearchList::slotItemSelected()
{ {
QListViewItem* pItem; TQListViewItem* pItem;
if ((pItem = m_pList->selectedItem()) != NULL) { if ((pItem = m_pList->selectedItem()) != NULL) {
m_pEdit->setText(pItem->text(m_nSearchCol)); m_pEdit->setText(pItem->text(m_nSearchCol));
@ -203,9 +203,9 @@ void SearchList::slotItemSelected()
* This slot is connected to the keyPressed() signal of the edit widget. * This slot is connected to the keyPressed() signal of the edit widget.
* @param pKey The key evant passed by the edit box * @param pKey The key evant passed by the edit box
*/ */
void SearchList::slotKeyPressed(QKeyEvent* pKey) void SearchList::slotKeyPressed(TQKeyEvent* pKey)
{ {
QListViewItem* pItem, * pNewItem; TQListViewItem* pItem, * pNewItem;
int nPageSize, nPos; int nPageSize, nPos;
// Select the current item, or the first one if there is no current item // Select the current item, or the first one if there is no current item
@ -213,7 +213,7 @@ void SearchList::slotKeyPressed(QKeyEvent* pKey)
// Set a new current item based on the pressed key // Set a new current item based on the pressed key
switch (pKey->key()) { switch (pKey->key()) {
case Qt::Key_Up: case TQt::Key_Up:
if (pItem) { if (pItem) {
for (pNewItem = pItem->itemAbove(); for (pNewItem = pItem->itemAbove();
pNewItem && !SEARCH_MATCH(pNewItem); pNewItem && !SEARCH_MATCH(pNewItem);
@ -224,7 +224,7 @@ void SearchList::slotKeyPressed(QKeyEvent* pKey)
} }
break; break;
case Qt::Key_Down: case TQt::Key_Down:
if (pItem) { if (pItem) {
for (pNewItem = pItem->itemBelow(); for (pNewItem = pItem->itemBelow();
pNewItem && !SEARCH_MATCH(pNewItem); pNewItem && !SEARCH_MATCH(pNewItem);
@ -235,7 +235,7 @@ void SearchList::slotKeyPressed(QKeyEvent* pKey)
} }
break; break;
case Qt::Key_PageUp: case TQt::Key_PageUp:
nPageSize = m_pList->visibleHeight() / pItem->height(); nPageSize = m_pList->visibleHeight() / pItem->height();
for (nPos = 0; for (nPos = 0;
pItem && pItem->itemAbove() && (nPos < nPageSize); pItem && pItem->itemAbove() && (nPos < nPageSize);
@ -243,7 +243,7 @@ void SearchList::slotKeyPressed(QKeyEvent* pKey)
pItem = pItem->itemAbove(); pItem = pItem->itemAbove();
break; break;
case Qt::Key_PageDown: case TQt::Key_PageDown:
nPageSize = m_pList->visibleHeight() / pItem->height(); nPageSize = m_pList->visibleHeight() / pItem->height();
for (nPos = 0; for (nPos = 0;
pItem && pItem->itemBelow() && (nPos < nPageSize); pItem && pItem->itemBelow() && (nPos < nPageSize);

@ -28,25 +28,25 @@
#ifndef SEARCHLIST_H #ifndef SEARCHLIST_H
#define SEARCHLIST_H #define SEARCHLIST_H
#include <qwidget.h> #include <ntqwidget.h>
#include <qvbox.h> #include <ntqvbox.h>
#include <qlineedit.h> #include <ntqlineedit.h>
#include <qlistview.h> #include <ntqlistview.h>
#include <qtooltip.h> #include <ntqtooltip.h>
class SearchList; class SearchList;
/** /**
* Defines a line text edit for searchable list view. * Defines a line text edit for searchable list view.
* The widget is based on QLineEdit with additional key functions * The widget is based on TQLineEdit with additional key functions
* Supported key events (up and down) are emitted as signals * Supported key events (up and down) are emitted as signals
* @author Albert Yosher * @author Albert Yosher
*/ */
class SearchLineEdit : public QLineEdit class SearchLineEdit : public TQLineEdit
{ {
Q_OBJECT Q_OBJECT
public: public:
SearchLineEdit(QWidget* pParent) : QLineEdit(pParent) {}; SearchLineEdit(TQWidget* pParent) : TQLineEdit(pParent) {};
~SearchLineEdit() {}; ~SearchLineEdit() {};
signals: signals:
@ -55,10 +55,10 @@ signals:
* inside this edit widget. * inside this edit widget.
* @param pEvent The event received for this key press * @param pEvent The event received for this key press
*/ */
void keyPressed(QKeyEvent* pEvent); void keyPressed(TQKeyEvent* pEvent);
private: private:
virtual void keyPressEvent(QKeyEvent*); virtual void keyPressEvent(TQKeyEvent*);
}; };
/** /**
@ -67,13 +67,13 @@ private:
* list item. * list item.
* @author Gabor Fekete * @author Gabor Fekete
*/ */
class ListToolTip : public QToolTip class ListToolTip : public TQToolTip
{ {
public: public:
ListToolTip(SearchList* pParent); ListToolTip(SearchList* pParent);
protected: protected:
virtual void maybeTip(const QPoint& pt); virtual void maybeTip(const TQPoint& pt);
private: private:
/** The owner widget. */ /** The owner widget. */
@ -88,18 +88,18 @@ private:
* set to point to the first item that matches the new text. * set to point to the first item that matches the new text.
* @author Elad Lahav * @author Elad Lahav
*/ */
class SearchList : public QVBox class SearchList : public TQVBox
{ {
Q_OBJECT Q_OBJECT
public: public:
SearchList(int nSearchCol, QWidget* pParent = 0, const char* szName = 0); SearchList(int nSearchCol, TQWidget* pParent = 0, const char* szName = 0);
~SearchList(); ~SearchList();
/** /**
* @return A pointer to the list part of the widget. * @return A pointer to the list part of the widget.
*/ */
QListView* getList() { return m_pList; } TQListView* getList() { return m_pList; }
/** /**
* Constructs a tool-tip for the given item. * Constructs a tool-tip for the given item.
@ -107,30 +107,30 @@ public:
* @param sTip The constructed tip string (on return) * @param sTip The constructed tip string (on return)
* @return True to display the tip, false otherwise * @return True to display the tip, false otherwise
*/ */
virtual bool getTip(QListViewItem* pItem, QString& sTip) = 0; virtual bool getTip(TQListViewItem* pItem, TQString& sTip) = 0;
public slots: public slots:
void slotSetFocus(); void slotSetFocus();
protected: protected:
/** The search edit-box. */ /** The search edit-box. */
QLineEdit* m_pEdit; TQLineEdit* m_pEdit;
/** The list part of the widget. */ /** The list part of the widget. */
QListView* m_pList; TQListView* m_pList;
/** /**
* Called whenever the user selects an item in the list by either double- * Called whenever the user selects an item in the list by either double-
* clicking it, or by highlighting the item and pressing the ENTER key. * clicking it, or by highlighting the item and pressing the ENTER key.
* @param pItem The selected list item * @param pItem The selected list item
*/ */
virtual void processItemSelected(QListViewItem* pItem) = 0; virtual void processItemSelected(TQListViewItem* pItem) = 0;
protected slots: protected slots:
void slotFindItem(const QString&); void slotFindItem(const TQString&);
void slotItemSelected(QListViewItem*); void slotItemSelected(TQListViewItem*);
void slotItemSelected(); void slotItemSelected();
void slotKeyPressed(QKeyEvent*); void slotKeyPressed(TQKeyEvent*);
private: private:
/** Specifies the search column, i.e., the list column whose strings are /** Specifies the search column, i.e., the list column whose strings are

@ -25,10 +25,10 @@
* *
***************************************************************************/ ***************************************************************************/
#include <qpushbutton.h> #include <ntqpushbutton.h>
#include <qlineedit.h> #include <ntqlineedit.h>
#include <qcombobox.h> #include <ntqcombobox.h>
#include <qradiobutton.h> #include <ntqradiobutton.h>
#include "searchresultsdlg.h" #include "searchresultsdlg.h"
int SearchResultsDlg::s_nType = PlainText; int SearchResultsDlg::s_nType = PlainText;
@ -40,7 +40,7 @@ bool SearchResultsDlg::s_bNegate = false;
* @param pParent The parent widget * @param pParent The parent widget
* @param szName Optional widget name * @param szName Optional widget name
*/ */
SearchResultsDlg::SearchResultsDlg(QWidget* pParent, const char* szName) : SearchResultsDlg::SearchResultsDlg(TQWidget* pParent, const char* szName) :
SearchResultsLayout(pParent, szName, true, 0) SearchResultsLayout(pParent, szName, true, 0)
{ {
// Select the last selected type radio button // Select the last selected type radio button
@ -96,16 +96,16 @@ int SearchResultsDlg::getColumn()
* Creates a regular expression based on the given pattern and type of search. * Creates a regular expression based on the given pattern and type of search.
* @param re A regular expression object to set * @param re A regular expression object to set
*/ */
void SearchResultsDlg::getPattern(QRegExp& re) void SearchResultsDlg::getPattern(TQRegExp& re)
{ {
QString sPattern; TQString sPattern;
sPattern = m_pSearchEdit->text(); sPattern = m_pSearchEdit->text();
// Create the regular expression // Create the regular expression
switch (s_nType) { switch (s_nType) {
case PlainText: case PlainText:
re.setPattern(QRegExp::escape(sPattern)); re.setPattern(TQRegExp::escape(sPattern));
re.setWildcard(false); re.setWildcard(false);
break; break;
@ -130,7 +130,7 @@ void SearchResultsDlg::getPattern(QRegExp& re)
*/ */
void SearchResultsDlg::accept() void SearchResultsDlg::accept()
{ {
QString sText; TQString sText;
// Determine the selected type and store its value for the next invocation // Determine the selected type and store its value for the next invocation
if (m_pTextRadio->isChecked()) if (m_pTextRadio->isChecked())
@ -148,12 +148,12 @@ void SearchResultsDlg::accept()
sText = m_pSearchEdit->text(); sText = m_pSearchEdit->text();
sText.stripWhiteSpace(); sText.stripWhiteSpace();
if (sText.isEmpty()) { if (sText.isEmpty()) {
QDialog::reject(); TQDialog::reject();
return; return;
} }
// Close the dialogue // Close the dialogue
QDialog::accept(); TQDialog::accept();
} }
#include "searchresultsdlg.moc" #include "searchresultsdlg.moc"

@ -28,8 +28,8 @@
#ifndef SEARCHRESULTSDLG_H #ifndef SEARCHRESULTSDLG_H
#define SEARCHRESULTSDLG_H #define SEARCHRESULTSDLG_H
#include <qregexp.h> #include <ntqregexp.h>
#include <qcheckbox.h> #include <ntqcheckbox.h>
#include "searchresultslayout.h" #include "searchresultslayout.h"
/** /**
@ -42,12 +42,12 @@ class SearchResultsDlg : public SearchResultsLayout
Q_OBJECT Q_OBJECT
public: public:
SearchResultsDlg(QWidget* pParent = 0, const char* szName = 0); SearchResultsDlg(TQWidget* pParent = 0, const char* szName = 0);
~SearchResultsDlg(); ~SearchResultsDlg();
void setColumn(int); void setColumn(int);
int getColumn(); int getColumn();
void getPattern(QRegExp&); void getPattern(TQRegExp&);
/** /**
* @return true if the search pattern should be negated, false otherwise * @return true if the search pattern should be negated, false otherwise

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>SearchResultsLayout</class> <class>SearchResultsLayout</class>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>SearchResultsLayout</cstring> <cstring>SearchResultsLayout</cstring>
</property> </property>
@ -19,7 +19,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout2</cstring> <cstring>layout2</cstring>
</property> </property>
@ -27,7 +27,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel2</cstring> <cstring>textLabel2</cstring>
</property> </property>
@ -35,14 +35,14 @@
<string>Search For:</string> <string>Search For:</string>
</property> </property>
</widget> </widget>
<widget class="QLineEdit"> <widget class="TQLineEdit">
<property name="name"> <property name="name">
<cstring>m_pSearchEdit</cstring> <cstring>m_pSearchEdit</cstring>
</property> </property>
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout4</cstring> <cstring>layout4</cstring>
</property> </property>
@ -50,7 +50,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel1</cstring> <cstring>textLabel1</cstring>
</property> </property>
@ -75,7 +75,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QComboBox"> <widget class="TQComboBox">
<item> <item>
<property name="text"> <property name="text">
<string>Function</string> <string>Function</string>
@ -102,7 +102,7 @@
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QButtonGroup"> <widget class="TQButtonGroup">
<property name="name"> <property name="name">
<cstring>buttonGroup1</cstring> <cstring>buttonGroup1</cstring>
</property> </property>
@ -113,7 +113,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QRadioButton"> <widget class="TQRadioButton">
<property name="name"> <property name="name">
<cstring>m_pTextRadio</cstring> <cstring>m_pTextRadio</cstring>
</property> </property>
@ -121,7 +121,7 @@
<string>Plain Text</string> <string>Plain Text</string>
</property> </property>
</widget> </widget>
<widget class="QRadioButton"> <widget class="TQRadioButton">
<property name="name"> <property name="name">
<cstring>m_pRegExpRadio</cstring> <cstring>m_pRegExpRadio</cstring>
</property> </property>
@ -129,7 +129,7 @@
<string>RegE&amp;xp</string> <string>RegE&amp;xp</string>
</property> </property>
</widget> </widget>
<widget class="QRadioButton"> <widget class="TQRadioButton">
<property name="name"> <property name="name">
<cstring>m_pSimpRegExpRadio</cstring> <cstring>m_pSimpRegExpRadio</cstring>
</property> </property>
@ -139,7 +139,7 @@
</widget> </widget>
</vbox> </vbox>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>m_pCaseSenCheck</cstring> <cstring>m_pCaseSenCheck</cstring>
</property> </property>
@ -147,7 +147,7 @@
<string>Case Sensitive</string> <string>Case Sensitive</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>m_pNegateCheck</cstring> <cstring>m_pNegateCheck</cstring>
</property> </property>
@ -155,7 +155,7 @@
<string>Negate Search</string> <string>Negate Search</string>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout3</cstring> <cstring>layout3</cstring>
</property> </property>
@ -180,7 +180,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pOKButton</cstring> <cstring>m_pOKButton</cstring>
</property> </property>
@ -188,7 +188,7 @@
<string>OK</string> <string>OK</string>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pCancelButton</cstring> <cstring>m_pCancelButton</cstring>
</property> </property>

@ -25,7 +25,7 @@
* *
***************************************************************************/ ***************************************************************************/
#include <qtimer.h> #include <ntqtimer.h>
#include <klocale.h> #include <klocale.h>
#include "symbolcompletion.h" #include "symbolcompletion.h"
@ -41,14 +41,14 @@ uint SymbolCompletion::s_nACMaxEntries;
* @param szName Optional object name * @param szName Optional object name
*/ */
SymbolCompletion::SymbolCompletion(SymbolCompletion::Interface* pEditor, SymbolCompletion::SymbolCompletion(SymbolCompletion::Interface* pEditor,
QObject* pParent, const char* szName) : TQObject* pParent, const char* szName) :
QObject(pParent, szName), TQObject(pParent, szName),
m_pEditor(pEditor), m_pEditor(pEditor),
m_pCCObject(NULL) m_pCCObject(NULL)
{ {
// Initialise member objects // Initialise member objects
m_pCscope = new CscopeFrontend(); m_pCscope = new CscopeFrontend();
m_pAutoCompTimer = new QTimer(this); m_pAutoCompTimer = new TQTimer(this);
// Add entries to the completion list when they are available // Add entries to the completion list when they are available
connect(m_pCscope, SIGNAL(dataReady(FrontendToken*)), this, connect(m_pCscope, SIGNAL(dataReady(FrontendToken*)), this,
@ -109,7 +109,7 @@ void SymbolCompletion::initAutoCompletion(bool bEnabled, uint nMinChars,
*/ */
void SymbolCompletion::slotComplete() void SymbolCompletion::slotComplete()
{ {
QString sSymbol; TQString sSymbol;
uint nPosInWord; uint nPosInWord;
// Read the symbol currently under the cursor // Read the symbol currently under the cursor
@ -138,7 +138,7 @@ void SymbolCompletion::slotAutoComplete()
* @param sPrefix The symbol to complete * @param sPrefix The symbol to complete
* @param nMaxEntries The maximal number of entries to display * @param nMaxEntries The maximal number of entries to display
*/ */
void SymbolCompletion::complete(const QString& sPrefix, int nMaxEntries) void SymbolCompletion::complete(const TQString& sPrefix, int nMaxEntries)
{ {
// Create a regular expression to extract symbol names from the query // Create a regular expression to extract symbol names from the query
// results // results
@ -186,7 +186,7 @@ void SymbolCompletion::filterEntries()
* message. * message.
* @param sMsg The text of the message to include in the list. * @param sMsg The text of the message to include in the list.
*/ */
void SymbolCompletion::makeErrMsg(const QString& sMsg) void SymbolCompletion::makeErrMsg(const TQString& sMsg)
{ {
Entry entry; Entry entry;
@ -211,7 +211,7 @@ void SymbolCompletion::makeErrMsg(const QString& sMsg)
void SymbolCompletion::slotAddEntry(FrontendToken* pToken) void SymbolCompletion::slotAddEntry(FrontendToken* pToken)
{ {
Entry entry; Entry entry;
QString sText; TQString sText;
// Do not add entries beyond the requested limit // Do not add entries beyond the requested limit
if (m_elEntries.count() > m_nMaxEntries) if (m_elEntries.count() > m_nMaxEntries)
@ -242,7 +242,7 @@ void SymbolCompletion::slotQueryFinished(uint /* nRecords */)
KTextEditor::CodeCompletionInterface* pCCI; KTextEditor::CodeCompletionInterface* pCCI;
uint nEntryCount; uint nEntryCount;
EntryList::Iterator itr; EntryList::Iterator itr;
QString sPrevText; TQString sPrevText;
// Get the number of entries // Get the number of entries
nEntryCount = m_elEntries.count(); nEntryCount = m_elEntries.count();
@ -262,9 +262,9 @@ void SymbolCompletion::slotQueryFinished(uint /* nRecords */)
// Insert the correct part of the completed symbol, when chosen by the // Insert the correct part of the completed symbol, when chosen by the
// user // user
connect(m_pCCObject, connect(m_pCCObject,
SIGNAL(filterInsertString(KTextEditor::CompletionEntry*, QString*)), SIGNAL(filterInsertString(KTextEditor::CompletionEntry*, TQString*)),
this, this,
SLOT(slotFilterInsert(KTextEditor::CompletionEntry*, QString*))); SLOT(slotFilterInsert(KTextEditor::CompletionEntry*, TQString*)));
// Check the number of entries in the list // Check the number of entries in the list
if (nEntryCount == 0) { if (nEntryCount == 0) {
@ -303,7 +303,7 @@ void SymbolCompletion::slotQueryFinished(uint /* nRecords */)
* @param pTextToInsert Contains the string to insert, upon return * @param pTextToInsert Contains the string to insert, upon return
*/ */
void SymbolCompletion::slotFilterInsert(KTextEditor::CompletionEntry* pEntry, void SymbolCompletion::slotFilterInsert(KTextEditor::CompletionEntry* pEntry,
QString* pTextToInsert) TQString* pTextToInsert)
{ {
// Insert the completed entry, unless it contains an error message // Insert the completed entry, unless it contains an error message
if (pEntry->userdata.isEmpty()) if (pEntry->userdata.isEmpty())
@ -326,7 +326,7 @@ void SymbolCompletion::slotFilterInsert(KTextEditor::CompletionEntry* pEntry,
*/ */
void SymbolCompletion::slotAutoCompleteTimeout() void SymbolCompletion::slotAutoCompleteTimeout()
{ {
QString sPrefix; TQString sPrefix;
uint nPosInWord, nLength; uint nPosInWord, nLength;
// Read the symbol currently under the cursor // Read the symbol currently under the cursor

@ -28,8 +28,8 @@
#ifndef SYMBOLCOMPLETION_H #ifndef SYMBOLCOMPLETION_H
#define SYMBOLCOMPLETION_H #define SYMBOLCOMPLETION_H
#include <qobject.h> #include <ntqobject.h>
#include <qregexp.h> #include <ntqregexp.h>
#include <ktexteditor/codecompletioninterface.h> #include <ktexteditor/codecompletioninterface.h>
#include <ktexteditor/view.h> #include <ktexteditor/view.h>
#include "cscopefrontend.h" #include "cscopefrontend.h"
@ -39,7 +39,7 @@
* The results can then be displayed as symbol completion lists. * The results can then be displayed as symbol completion lists.
* @author Albert Yosher * @author Albert Yosher
*/ */
class SymbolCompletion : public QObject class SymbolCompletion : public TQObject
{ {
Q_OBJECT Q_OBJECT
@ -66,7 +66,7 @@ public:
* @param pPosInWord Set this value to the offset in the word on * @param pPosInWord Set this value to the offset in the word on
* which the cursor is positioned * which the cursor is positioned
*/ */
virtual QString getWordUnderCursor(uint* pPosInWord) = 0; virtual TQString getWordUnderCursor(uint* pPosInWord) = 0;
/** /**
* Returns a target object for displaying the completion list. * Returns a target object for displaying the completion list.
@ -74,10 +74,10 @@ public:
* KTextEditor::CodeCompletionInterface, or NULL if the * KTextEditor::CodeCompletionInterface, or NULL if the
* implementation does not support this interface. * implementation does not support this interface.
*/ */
virtual QObject* getCCObject() = 0; virtual TQObject* getCCObject() = 0;
}; };
SymbolCompletion(SymbolCompletion::Interface*, QObject* pParent = 0, SymbolCompletion(SymbolCompletion::Interface*, TQObject* pParent = 0,
const char* szName = 0); const char* szName = 0);
~SymbolCompletion(); ~SymbolCompletion();
@ -121,7 +121,7 @@ private:
* A sortable version of the value list used by CodeCompletionInterface. * A sortable version of the value list used by CodeCompletionInterface.
* @author Albert Yosher * @author Albert Yosher
*/ */
class EntryList : public QValueList<Entry> class EntryList : public TQValueList<Entry>
{ {
public: public:
/** /**
@ -133,8 +133,8 @@ private:
* Type casting support required for calling showCompletionBox(). * Type casting support required for calling showCompletionBox().
* @return A casted reference to this object * @return A casted reference to this object
*/ */
operator QValueList<KTextEditor::CompletionEntry>() operator TQValueList<KTextEditor::CompletionEntry>()
{ return *(QValueList<KTextEditor::CompletionEntry>*)this; } { return *(TQValueList<KTextEditor::CompletionEntry>*)this; }
}; };
/** Editor object for which symbol completion is provided. */ /** Editor object for which symbol completion is provided. */
@ -142,13 +142,13 @@ private:
/** An object that supports KTextEditor::CodeCompletionInterface, as /** An object that supports KTextEditor::CodeCompletionInterface, as
supplied by the editor. */ supplied by the editor. */
QObject* m_pCCObject; TQObject* m_pCCObject;
/** Cscope process used to run completion queries. */ /** Cscope process used to run completion queries. */
CscopeFrontend* m_pCscope; CscopeFrontend* m_pCscope;
/** The prefix used for the current query. */ /** The prefix used for the current query. */
QString m_sPrefix; TQString m_sPrefix;
/** A list of possible completions for the given prefix. */ /** A list of possible completions for the given prefix. */
EntryList m_elEntries; EntryList m_elEntries;
@ -159,17 +159,17 @@ private:
/** Regular expression for extracting a symbol out of Cscope's text field. /** Regular expression for extracting a symbol out of Cscope's text field.
NOTE: This member is required due to a bug in Cscope that renders the NOTE: This member is required due to a bug in Cscope that renders the
symbol field useless. */ symbol field useless. */
QRegExp m_reSymbol; TQRegExp m_reSymbol;
/** Auto-completion timer. */ /** Auto-completion timer. */
QTimer* m_pAutoCompTimer; TQTimer* m_pAutoCompTimer;
/** Auto-completion flag */ /** Auto-completion flag */
bool m_bAutoCompletion; bool m_bAutoCompletion;
void complete(const QString&, int nMaxEntries = 1000); void complete(const TQString&, int nMaxEntries = 1000);
void filterEntries(); void filterEntries();
void makeErrMsg(const QString&); void makeErrMsg(const TQString&);
/** true if auto-completion is enabled, false otherwise. */ /** true if auto-completion is enabled, false otherwise. */
static bool s_bACEnabled; static bool s_bACEnabled;
@ -189,7 +189,7 @@ private slots:
void slotAutoCompleteTimeout(); void slotAutoCompleteTimeout();
void slotAddEntry(FrontendToken*); void slotAddEntry(FrontendToken*);
void slotQueryFinished(uint); void slotQueryFinished(uint);
void slotFilterInsert(KTextEditor::CompletionEntry*, QString*); void slotFilterInsert(KTextEditor::CompletionEntry*, TQString*);
}; };
#endif #endif

@ -25,26 +25,26 @@
* *
***************************************************************************/ ***************************************************************************/
#include <qlabel.h> #include <ntqlabel.h>
#include <qlistview.h> #include <ntqlistview.h>
#include <qpushbutton.h> #include <ntqpushbutton.h>
#include <qradiobutton.h> #include <ntqradiobutton.h>
#include <qcheckbox.h> #include <ntqcheckbox.h>
#include <qgroupbox.h> #include <ntqgroupbox.h>
#include <kcombobox.h> #include <kcombobox.h>
#include <klocale.h> #include <klocale.h>
#include "symboldlg.h" #include "symboldlg.h"
#include "cscopefrontend.h" #include "cscopefrontend.h"
#include "kscopeconfig.h" #include "kscopeconfig.h"
QStringList SymbolDlg::s_slHistory; TQStringList SymbolDlg::s_slHistory;
/** /**
* Class constructor. * Class constructor.
* @param pParent Parent widget * @param pParent Parent widget
* @param szName This widget's name * @param szName This widget's name
*/ */
SymbolDlg::SymbolDlg(QWidget* pParent, const char* szName) : SymbolDlg::SymbolDlg(TQWidget* pParent, const char* szName) :
SymbolLayout(pParent, szName, true, 0), SymbolLayout(pParent, szName, true, 0),
m_progress(m_pHintList) m_progress(m_pHintList)
{ {
@ -54,7 +54,7 @@ SymbolDlg::SymbolDlg(QWidget* pParent, const char* szName) :
// Initialise the hint list (hidden by default) // Initialise the hint list (hidden by default)
m_pHintList->addColumn(i18n("Suggested Symbols")); m_pHintList->addColumn(i18n("Suggested Symbols"));
m_pHintList->hide(); m_pHintList->hide();
((QWidget*)m_pHintGroup)->hide(); ((TQWidget*)m_pHintGroup)->hide();
m_pBeginWithRadio->toggle(); m_pBeginWithRadio->toggle();
adjustSize(); adjustSize();
@ -74,13 +74,13 @@ SymbolDlg::SymbolDlg(QWidget* pParent, const char* szName) :
SLOT(slotTypeChanged(int))); SLOT(slotTypeChanged(int)));
// Selecting an item in the hint list sets it as the current text // Selecting an item in the hint list sets it as the current text
connect(m_pHintList, SIGNAL(selectionChanged(QListViewItem*)), this, connect(m_pHintList, SIGNAL(selectionChanged(TQListViewItem*)), this,
SLOT(slotHintItemSelected(QListViewItem*))); SLOT(slotHintItemSelected(TQListViewItem*)));
// Double-clicking an item in the hint list accepts that item as the // Double-clicking an item in the hint list accepts that item as the
// result of the query (i.e., the item is selcted and the dialogue is // result of the query (i.e., the item is selcted and the dialogue is
// closed) // closed)
connect(m_pHintList, SIGNAL(doubleClicked(QListViewItem*)), this, connect(m_pHintList, SIGNAL(doubleClicked(TQListViewItem*)), this,
SLOT(accept())); SLOT(accept()));
// Refresh the hint list when the hint options change // Refresh the hint list when the hint options change
@ -117,7 +117,7 @@ void SymbolDlg::setType(uint nType)
/** /**
* @param sSymbol The initial text of the combo-box * @param sSymbol The initial text of the combo-box
*/ */
void SymbolDlg::setSymbol(const QString& sSymbol) void SymbolDlg::setSymbol(const TQString& sSymbol)
{ {
m_pSymbolHC->setCurrentText(sSymbol); m_pSymbolHC->setCurrentText(sSymbol);
} }
@ -125,7 +125,7 @@ void SymbolDlg::setSymbol(const QString& sSymbol)
/** /**
* @param slSymHistory A list of previously queried symbols * @param slSymHistory A list of previously queried symbols
*/ */
void SymbolDlg::setHistory(QStringList& slSymHistory) void SymbolDlg::setHistory(TQStringList& slSymHistory)
{ {
m_pSymbolHC->setHistoryItems(slSymHistory); m_pSymbolHC->setHistoryItems(slSymHistory);
} }
@ -133,9 +133,9 @@ void SymbolDlg::setHistory(QStringList& slSymHistory)
/** /**
* @return The current text of the symbol combo-box * @return The current text of the symbol combo-box
*/ */
QString SymbolDlg::getSymbol() const TQString SymbolDlg::getSymbol() const
{ {
QString sResult; TQString sResult;
sResult = m_pSymbolHC->currentText().stripWhiteSpace(); sResult = m_pSymbolHC->currentText().stripWhiteSpace();
if (m_pSubStringCheck->isChecked()) if (m_pSubStringCheck->isChecked())
@ -169,8 +169,8 @@ bool SymbolDlg::getCase() const
* @return The text entered by the user in the symbol combo-box, or an empty * @return The text entered by the user in the symbol combo-box, or an empty
* string if the dialogue was cancelled * string if the dialogue was cancelled
*/ */
QString SymbolDlg::promptSymbol(QWidget* pParent, uint& nType, TQString SymbolDlg::promptSymbol(TQWidget* pParent, uint& nType,
const QString& sSymbol, bool& bCase) const TQString& sSymbol, bool& bCase)
{ {
SymbolDlg dlg(pParent); SymbolDlg dlg(pParent);
@ -180,7 +180,7 @@ QString SymbolDlg::promptSymbol(QWidget* pParent, uint& nType,
dlg.setSymbol(sSymbol); dlg.setSymbol(sSymbol);
// Display the dialogue // Display the dialogue
if (dlg.exec() != QDialog::Accepted) if (dlg.exec() != TQDialog::Accepted)
return ""; return "";
// Return the text entered by the user // Return the text entered by the user
@ -215,12 +215,12 @@ uint SymbolDlg::getQueryType(uint nType)
*/ */
void SymbolDlg::slotHintClicked() void SymbolDlg::slotHintClicked()
{ {
QString sText, sRegExp; TQString sText, sRegExp;
// Show the hint list if necessary // Show the hint list if necessary
if (!m_pHintList->isVisible()) { if (!m_pHintList->isVisible()) {
m_pHintList->show(); m_pHintList->show();
((QWidget*)m_pHintGroup)->show(); ((TQWidget*)m_pHintGroup)->show();
adjustSize(); adjustSize();
} }
@ -253,7 +253,7 @@ void SymbolDlg::slotHintClicked()
*/ */
void SymbolDlg::slotHintDataReady(FrontendToken* pToken) void SymbolDlg::slotHintDataReady(FrontendToken* pToken)
{ {
QString sText; TQString sText;
// Get the line text // Get the line text
pToken = pToken->getNext()->getNext()->getNext(); pToken = pToken->getNext()->getNext()->getNext();
@ -268,7 +268,7 @@ void SymbolDlg::slotHintDataReady(FrontendToken* pToken)
return; return;
// Add a list item // Add a list item
(void)new QListViewItem(m_pHintList, m_reHint.capturedTexts().first()); (void)new TQListViewItem(m_pHintList, m_reHint.capturedTexts().first());
} }
@ -278,7 +278,7 @@ void SymbolDlg::slotHintDataReady(FrontendToken* pToken)
* This slot is connected to the doubleClicked() signal of the hint list-view. * This slot is connected to the doubleClicked() signal of the hint list-view.
* @param pItem The clicked list item * @param pItem The clicked list item
*/ */
void SymbolDlg::slotHintItemSelected(QListViewItem* pItem) void SymbolDlg::slotHintItemSelected(TQListViewItem* pItem)
{ {
m_pSymbolHC->setCurrentText(pItem->text(0)); m_pSymbolHC->setCurrentText(pItem->text(0));
} }

@ -28,7 +28,7 @@
#ifndef SYMBOLDLG_H #ifndef SYMBOLDLG_H
#define SYMBOLDLG_H #define SYMBOLDLG_H
#include <qregexp.h> #include <ntqregexp.h>
#include "symbollayout.h" #include "symbollayout.h"
#include "cscopefrontend.h" #include "cscopefrontend.h"
@ -46,20 +46,20 @@ class SymbolDlg : public SymbolLayout
Q_OBJECT Q_OBJECT
public: public:
SymbolDlg(QWidget* pParent = 0, const char* szName = 0); SymbolDlg(TQWidget* pParent = 0, const char* szName = 0);
~SymbolDlg(); ~SymbolDlg();
enum { Reference = 0, Definition, Called, Calling, Text, Pattern, enum { Reference = 0, Definition, Called, Calling, Text, Pattern,
FileName, Including, CallTree }; FileName, Including, CallTree };
void setType(uint); void setType(uint);
void setSymbol(const QString&); void setSymbol(const TQString&);
void setHistory(QStringList&); void setHistory(TQStringList&);
QString getSymbol() const; TQString getSymbol() const;
uint getType() const; uint getType() const;
bool getCase() const; bool getCase() const;
static QString promptSymbol(QWidget*, uint&, const QString&, bool&); static TQString promptSymbol(TQWidget*, uint&, const TQString&, bool&);
static uint getQueryType(uint); static uint getQueryType(uint);
static void resetHistory() { s_slHistory.clear(); } static void resetHistory() { s_slHistory.clear(); }
@ -70,17 +70,17 @@ private:
/** A regular expression for extracting the symbol name out of the text /** A regular expression for extracting the symbol name out of the text
token of a Cscope record. token of a Cscope record.
@see note in slotHintDataReady(). */ @see note in slotHintDataReady(). */
QRegExp m_reHint; TQRegExp m_reHint;
/** Displays query progress information. */ /** Displays query progress information. */
CscopeProgress m_progress; CscopeProgress m_progress;
static QStringList s_slHistory; static TQStringList s_slHistory;
private slots: private slots:
void slotHintClicked(); void slotHintClicked();
void slotHintDataReady(FrontendToken*); void slotHintDataReady(FrontendToken*);
void slotHintItemSelected(QListViewItem*); void slotHintItemSelected(TQListViewItem*);
void slotHintOptionChanged(bool); void slotHintOptionChanged(bool);
void slotHintProgress(int, int); void slotHintProgress(int, int);
void slotHintFinished(uint); void slotHintFinished(uint);

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>SymbolLayout</class> <class>SymbolLayout</class>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>SymbolLayout</cstring> <cstring>SymbolLayout</cstring>
</property> </property>
@ -19,7 +19,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout15</cstring> <cstring>layout15</cstring>
</property> </property>
@ -27,7 +27,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout14</cstring> <cstring>layout14</cstring>
</property> </property>
@ -35,7 +35,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel1</cstring> <cstring>textLabel1</cstring>
</property> </property>
@ -51,7 +51,7 @@
<string>Type</string> <string>Type</string>
</property> </property>
</widget> </widget>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel2</cstring> <cstring>textLabel2</cstring>
</property> </property>
@ -69,7 +69,7 @@
</widget> </widget>
</vbox> </vbox>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout13</cstring> <cstring>layout13</cstring>
</property> </property>
@ -77,7 +77,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QComboBox"> <widget class="TQComboBox">
<item> <item>
<property name="text"> <property name="text">
<string>References to</string> <string>References to</string>
@ -158,7 +158,7 @@
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>m_pSubStringCheck</cstring> <cstring>m_pSubStringCheck</cstring>
</property> </property>
@ -169,7 +169,7 @@
<string>Alt+A</string> <string>Alt+A</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>m_pCaseCheck</cstring> <cstring>m_pCaseCheck</cstring>
</property> </property>
@ -191,7 +191,7 @@
<enum>Horizontal</enum> <enum>Horizontal</enum>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout3</cstring> <cstring>layout3</cstring>
</property> </property>
@ -216,7 +216,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pOKButton</cstring> <cstring>m_pOKButton</cstring>
</property> </property>
@ -224,7 +224,7 @@
<string>OK</string> <string>OK</string>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pHintButton</cstring> <cstring>m_pHintButton</cstring>
</property> </property>
@ -232,7 +232,7 @@
<string>Hi&amp;nt</string> <string>Hi&amp;nt</string>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pCancelButton</cstring> <cstring>m_pCancelButton</cstring>
</property> </property>
@ -242,12 +242,12 @@
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QListView"> <widget class="TQListView">
<property name="name"> <property name="name">
<cstring>m_pHintList</cstring> <cstring>m_pHintList</cstring>
</property> </property>
</widget> </widget>
<widget class="QButtonGroup"> <widget class="TQButtonGroup">
<property name="name"> <property name="name">
<cstring>m_pHintGroup</cstring> <cstring>m_pHintGroup</cstring>
</property> </property>
@ -258,7 +258,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QRadioButton"> <widget class="TQRadioButton">
<property name="name"> <property name="name">
<cstring>m_pBeginWithRadio</cstring> <cstring>m_pBeginWithRadio</cstring>
</property> </property>
@ -266,7 +266,7 @@
<string>S&amp;ymbols Beginning With...</string> <string>S&amp;ymbols Beginning With...</string>
</property> </property>
</widget> </widget>
<widget class="QRadioButton"> <widget class="TQRadioButton">
<property name="name"> <property name="name">
<cstring>m_pContainRadio</cstring> <cstring>m_pContainRadio</cstring>
</property> </property>

@ -25,7 +25,7 @@
* *
***************************************************************************/ ***************************************************************************/
#include <qtooltip.h> #include <ntqtooltip.h>
#include <klocale.h> #include <klocale.h>
#include "tabwidget.h" #include "tabwidget.h"
#include "kscopepixmaps.h" #include "kscopepixmaps.h"
@ -35,19 +35,19 @@
* @param pParent A pointer to the parent widget * @param pParent A pointer to the parent widget
* @param szName Optional widget name * @param szName Optional widget name
*/ */
TabWidget::TabWidget(QWidget* pParent, const char* szName) : TabWidget::TabWidget(TQWidget* pParent, const char* szName) :
KTabWidget(pParent, szName) KTabWidget(pParent, szName)
{ {
// Create a popup menu // Create a popup menu
m_pMenu = new QPopupMenu(this); m_pMenu = new TQPopupMenu(this);
// Set the current tab based on the menu selection // Set the current tab based on the menu selection
connect(m_pMenu, SIGNAL(activated(int)), this, SLOT(setCurrentPage(int))); connect(m_pMenu, SIGNAL(activated(int)), this, SLOT(setCurrentPage(int)));
// Create a button at the top-right corner of the tab widget // Create a button at the top-right corner of the tab widget
m_pButton = new QToolButton(this); m_pButton = new TQToolButton(this);
m_pButton->setIconSet(Pixmaps().getPixmap(KScopePixmaps::TabList)); m_pButton->setIconSet(Pixmaps().getPixmap(KScopePixmaps::TabList));
QToolTip::add(m_pButton, i18n("Shows a list of all open tabs")); TQToolTip::add(m_pButton, i18n("Shows a list of all open tabs"));
m_pButton->adjustSize(); m_pButton->adjustSize();
setCornerWidget(m_pButton, TopRight); setCornerWidget(m_pButton, TopRight);

@ -29,8 +29,8 @@
#define TABWIDGET_H #define TABWIDGET_H
#include <qtoolbutton.h> #include <ntqtoolbutton.h>
#include <qpopupmenu.h> #include <ntqpopupmenu.h>
#include <ktabwidget.h> #include <ktabwidget.h>
/** /**
@ -42,15 +42,15 @@ class TabWidget : public KTabWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
TabWidget(QWidget* pParent = 0, const char* szName = 0); TabWidget(TQWidget* pParent = 0, const char* szName = 0);
~TabWidget(); ~TabWidget();
private: private:
/** The list button. */ /** The list button. */
QToolButton* m_pButton; TQToolButton* m_pButton;
/** A popup-menu containing all tab labels. */ /** A popup-menu containing all tab labels. */
QPopupMenu* m_pMenu; TQPopupMenu* m_pMenu;
private slots: private slots:
void slotShowTabList(); void slotShowTabList();

@ -33,7 +33,7 @@
* @param pParent Parent widget * @param pParent Parent widget
* @param szName The name of the widget * @param szName The name of the widget
*/ */
TreeWidget::TreeWidget(QWidget* pParent, const char* szName) : TreeWidget::TreeWidget(TQWidget* pParent, const char* szName) :
QueryView(pParent, szName), QueryView(pParent, szName),
m_nQueryType(CscopeFrontend::Called) m_nQueryType(CscopeFrontend::Called)
{ {
@ -43,8 +43,8 @@ TreeWidget::TreeWidget(QWidget* pParent, const char* szName) :
m_pDriver = new QueryViewDriver(this, this); m_pDriver = new QueryViewDriver(this, this);
// Query a tree item when it is expanded for the first time // Query a tree item when it is expanded for the first time
connect(this, SIGNAL(expanded(QListViewItem*)), this, connect(this, SIGNAL(expanded(TQListViewItem*)), this,
SLOT(slotQueryItem(QListViewItem*))); SLOT(slotQueryItem(TQListViewItem*)));
} }
/** /**
@ -68,16 +68,16 @@ void TreeWidget::setMode(Mode mode)
* Sets a new root item for the tree. * Sets a new root item for the tree.
* @param sFunc The name of the function to serve as root * @param sFunc The name of the function to serve as root
*/ */
void TreeWidget::setRoot(const QString& sFunc) void TreeWidget::setRoot(const TQString& sFunc)
{ {
QListViewItem* pRoot; TQListViewItem* pRoot;
// Remove the current root, if any // Remove the current root, if any
if ((pRoot = firstChild()) != NULL) if ((pRoot = firstChild()) != NULL)
delete pRoot; delete pRoot;
// Create a new root item // Create a new root item
pRoot = new QListViewItem(this, sFunc); pRoot = new TQListViewItem(this, sFunc);
pRoot->setExpandable(true); pRoot->setExpandable(true);
} }
@ -86,7 +86,7 @@ void TreeWidget::setRoot(const QString& sFunc)
*/ */
void TreeWidget::queryRoot() void TreeWidget::queryRoot()
{ {
QListViewItem* pRoot; TQListViewItem* pRoot;
if ((pRoot = firstChild()) != NULL) if ((pRoot = firstChild()) != NULL)
slotQueryItem(pRoot); slotQueryItem(pRoot);
@ -98,8 +98,8 @@ void TreeWidget::queryRoot()
*/ */
void TreeWidget::save(FILE* pFile) void TreeWidget::save(FILE* pFile)
{ {
QTextStream str(pFile, IO_WriteOnly); TQTextStream str(pFile, IO_WriteOnly);
QListViewItem* pRoot; TQListViewItem* pRoot;
Encoder enc; Encoder enc;
if (m_nQueryType == CscopeFrontend::Called) if (m_nQueryType == CscopeFrontend::Called)
@ -124,7 +124,7 @@ void TreeWidget::save(FILE* pFile)
* @param str An initialised text stream to use for writing * @param str An initialised text stream to use for writing
* @param enc An encoder for free-text strings * @param enc An encoder for free-text strings
*/ */
void TreeWidget::saveItems(QListViewItem* pItem, QTextStream& str, Encoder& enc) void TreeWidget::saveItems(TQListViewItem* pItem, TQTextStream& str, Encoder& enc)
{ {
// Iterate over all items in this level // Iterate over all items in this level
for (; pItem != NULL; pItem = pItem->nextSibling()) { for (; pItem != NULL; pItem = pItem->nextSibling()) {
@ -150,10 +150,10 @@ void TreeWidget::saveItems(QListViewItem* pItem, QTextStream& str, Encoder& enc)
* @param sText The line's text * @param sText The line's text
* @param pParent The parent for the new item * @param pParent The parent for the new item
*/ */
void TreeWidget::addRecord(const QString& sFunc, const QString& sFile, void TreeWidget::addRecord(const TQString& sFunc, const TQString& sFile,
const QString& sLine, const QString& sText, QListViewItem* pParent) const TQString& sLine, const TQString& sText, TQListViewItem* pParent)
{ {
QListViewItem* pItem; TQListViewItem* pItem;
pItem = new QueryViewItem(pParent, m_pLastItem, 2); pItem = new QueryViewItem(pParent, m_pLastItem, 2);
pItem->setText(0, sFunc); pItem->setText(0, sFunc);
@ -173,7 +173,7 @@ void TreeWidget::addRecord(const QString& sFunc, const QString& sFile,
* @param nResults Number of results * @param nResults Number of results
* @param pParent The item for which the query was executed * @param pParent The item for which the query was executed
*/ */
void TreeWidget::queryFinished(uint nResults, QListViewItem* pParent) void TreeWidget::queryFinished(uint nResults, TQListViewItem* pParent)
{ {
if (nResults == 0) if (nResults == 0)
pParent->setExpandable(false); pParent->setExpandable(false);
@ -186,7 +186,7 @@ void TreeWidget::queryFinished(uint nResults, QListViewItem* pParent)
* This slot is connected to the expanded() signal of the list view. * This slot is connected to the expanded() signal of the list view.
* @param pItem The item to query * @param pItem The item to query
*/ */
void TreeWidget::slotQueryItem(QListViewItem* pItem) void TreeWidget::slotQueryItem(TQListViewItem* pItem)
{ {
// Do nothing if the item was already queried // Do nothing if the item was already queried
// An item has been queried if it has children or marked as non-expandable // An item has been queried if it has children or marked as non-expandable
@ -207,10 +207,10 @@ void TreeWidget::slotQueryItem(QListViewItem* pItem)
* @param re The pattern to search * @param re The pattern to search
* @param nCol The list column to search in * @param nCol The list column to search in
*/ */
void TreeWidget::slotSearch(QListViewItem* pParent, const QRegExp& re, void TreeWidget::slotSearch(TQListViewItem* pParent, const TQRegExp& re,
int nCol) int nCol)
{ {
QListViewItem* pItem; TQListViewItem* pItem;
// Get the first child // Get the first child
if (pParent != NULL) if (pParent != NULL)
@ -236,9 +236,9 @@ void TreeWidget::slotSearch(QListViewItem* pParent, const QRegExp& re,
* This slot is connected to the showAll() signal of the QueryResultsMenu * This slot is connected to the showAll() signal of the QueryResultsMenu
* object. * object.
*/ */
void TreeWidget::slotShowAll(QListViewItem* pParent) void TreeWidget::slotShowAll(TQListViewItem* pParent)
{ {
QListViewItem* pItem; TQListViewItem* pItem;
// Get the first child // Get the first child
if (pParent != NULL) if (pParent != NULL)

@ -45,7 +45,7 @@ class TreeWidget : public QueryView
Q_OBJECT Q_OBJECT
public: public:
TreeWidget(QWidget* pParent = 0, const char* szName = 0); TreeWidget(TQWidget* pParent = 0, const char* szName = 0);
~TreeWidget(); ~TreeWidget();
/** /**
@ -54,17 +54,17 @@ public:
enum Mode { Called, Calling }; enum Mode { Called, Calling };
void setMode(Mode); void setMode(Mode);
void setRoot(const QString&); void setRoot(const TQString&);
void queryRoot(); void queryRoot();
void save(FILE*); void save(FILE*);
virtual void addRecord(const QString&, const QString&, const QString&, virtual void addRecord(const TQString&, const TQString&, const TQString&,
const QString&, QListViewItem*); const TQString&, TQListViewItem*);
virtual void queryFinished(uint, QListViewItem*); virtual void queryFinished(uint, TQListViewItem*);
protected slots: protected slots:
virtual void slotSearch(QListViewItem*, const QRegExp&, int); virtual void slotSearch(TQListViewItem*, const TQRegExp&, int);
virtual void slotShowAll(QListViewItem*); virtual void slotShowAll(TQListViewItem*);
private: private:
/** The CscopeFrontend query type to use (based on the current mode). */ /** The CscopeFrontend query type to use (based on the current mode). */
@ -73,10 +73,10 @@ private:
/** Runs queries and outputs the results as tree items. */ /** Runs queries and outputs the results as tree items. */
QueryViewDriver* m_pDriver; QueryViewDriver* m_pDriver;
void saveItems(QListViewItem*, QTextStream&, Encoder&); void saveItems(TQListViewItem*, TQTextStream&, Encoder&);
private slots: private slots:
void slotQueryItem(QListViewItem*); void slotQueryItem(TQListViewItem*);
}; };
#endif #endif

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>WelcomeDlg</class> <class>WelcomeDlg</class>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>WelcomeDlg</cstring> <cstring>WelcomeDlg</cstring>
</property> </property>
@ -69,7 +69,7 @@ Enjoy!
<enum>Horizontal</enum> <enum>Horizontal</enum>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout1</cstring> <cstring>layout1</cstring>
</property> </property>
@ -94,7 +94,7 @@ Enjoy!
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pCloseButton</cstring> <cstring>m_pCloseButton</cstring>
</property> </property>

Loading…
Cancel
Save