diff options
Diffstat (limited to 'src')
132 files changed, 1770 insertions, 1770 deletions
diff --git a/src/autocompletionlayout.ui b/src/autocompletionlayout.ui index 2c8c274..77236bc 100644 --- a/src/autocompletionlayout.ui +++ b/src/autocompletionlayout.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>AutoCompletionLayout</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>AutoCompletionLayout</cstring> </property> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout20</cstring> </property> @@ -27,7 +27,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -52,14 +52,14 @@ </size> </property> </spacer> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>m_pMinCharsSpin</cstring> </property> </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout21</cstring> </property> @@ -67,7 +67,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -92,7 +92,7 @@ </size> </property> </spacer> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>m_pDelaySpin</cstring> </property> @@ -105,7 +105,7 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout22</cstring> </property> @@ -113,7 +113,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -138,7 +138,7 @@ </size> </property> </spacer> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>m_pMaxEntriesSpin</cstring> </property> @@ -168,7 +168,7 @@ </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout23</cstring> </property> @@ -193,7 +193,7 @@ </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pOKButton</cstring> </property> @@ -201,7 +201,7 @@ <string>OK</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pCancelButton</cstring> </property> diff --git a/src/bookmarksdlg.cpp b/src/bookmarksdlg.cpp index 577476a..f42deb6 100644 --- a/src/bookmarksdlg.cpp +++ b/src/bookmarksdlg.cpp @@ -28,28 +28,28 @@ #include "bookmarksdlg.h" #include "queryview.h" -BookmarksDlg::BookmarksDlg(QWidget* pParent, const char* szName) : +BookmarksDlg::BookmarksDlg(TQWidget* pParent, const char* szName) : BookmarksLayout (pParent, szName, true) { // Do not show the "Function" column m_pView->setColumnWidth(0, 0); // Handle requests for source locations - connect(m_pView, SIGNAL(lineRequested(const QString&, uint)), this, - SLOT(slotLineRequested(const QString&, uint))); + connect(m_pView, SIGNAL(lineRequested(const TQString&, uint)), this, + SLOT(slotLineRequested(const TQString&, uint))); } BookmarksDlg::~BookmarksDlg() { } -void BookmarksDlg::getBookmark(QString& sPath, uint& nLine) +void BookmarksDlg::getBookmark(TQString& sPath, uint& nLine) { sPath = m_sPath; nLine = m_nLine; } -void BookmarksDlg::slotLineRequested(const QString& sPath, uint nLine) +void BookmarksDlg::slotLineRequested(const TQString& sPath, uint nLine) { m_sPath = sPath; m_nLine = nLine; diff --git a/src/bookmarksdlg.h b/src/bookmarksdlg.h index ab74f9d..aaeced1 100644 --- a/src/bookmarksdlg.h +++ b/src/bookmarksdlg.h @@ -35,18 +35,18 @@ class BookmarksDlg : public BookmarksLayout Q_OBJECT public: - BookmarksDlg(QWidget* pParent = 0, const char* szName = 0); + BookmarksDlg(TQWidget* pParent = 0, const char* szName = 0); ~BookmarksDlg(); QueryView* getView() { return m_pView; } - void getBookmark(QString&, uint&); + void getBookmark(TQString&, uint&); private: - QString m_sPath; + TQString m_sPath; uint m_nLine; private slots: - void slotLineRequested(const QString&, uint); + void slotLineRequested(const TQString&, uint); }; #endif diff --git a/src/bookmarkslayout.ui b/src/bookmarkslayout.ui index f1f8135..bbab5eb 100644 --- a/src/bookmarkslayout.ui +++ b/src/bookmarkslayout.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>BookmarksLayout</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>BookmarksLayout</cstring> </property> @@ -38,7 +38,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout1</cstring> </property> @@ -63,7 +63,7 @@ </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pCloseButton</cstring> </property> diff --git a/src/calltreedlg.cpp b/src/calltreedlg.cpp index 65ee4f8..75c9abb 100644 --- a/src/calltreedlg.cpp +++ b/src/calltreedlg.cpp @@ -25,10 +25,10 @@ * ***************************************************************************/ -#include <qfile.h> -#include <qtoolbutton.h> -#include <qbuttongroup.h> -#include <qwidgetstack.h> +#include <ntqfile.h> +#include <ntqtoolbutton.h> +#include <ntqbuttongroup.h> +#include <ntqwidgetstack.h> #include <klocale.h> #include <kfiledialog.h> #include "calltreedlg.h" @@ -56,7 +56,7 @@ int CallTreeDlg::s_nFileNameIndex = 0; * @param pParent The parent widget * @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) { // Set button pixmaps @@ -70,12 +70,12 @@ CallTreeDlg::CallTreeDlg(QWidget* pParent, const char* szName) : m_pPrefButton->setPixmap(GET_PIXMAP(ButtonPref)); // Open the location of a call - connect(m_pGraphWidget, SIGNAL(lineRequested(const QString&, uint)), - this, SIGNAL(lineRequested(const QString&, uint))); - connect(m_pCalledWidget, SIGNAL(lineRequested(const QString&, uint)), - this, SIGNAL(lineRequested(const QString&, uint))); - connect(m_pCallingWidget, SIGNAL(lineRequested(const QString&, uint)), - this, SIGNAL(lineRequested(const QString&, uint))); + connect(m_pGraphWidget, SIGNAL(lineRequested(const TQString&, uint)), + this, SIGNAL(lineRequested(const TQString&, uint))); + connect(m_pCalledWidget, SIGNAL(lineRequested(const TQString&, uint)), + this, SIGNAL(lineRequested(const TQString&, uint))); + connect(m_pCallingWidget, SIGNAL(lineRequested(const TQString&, uint)), + this, SIGNAL(lineRequested(const TQString&, uint))); m_pCallingWidget->setMode(TreeWidget::Calling); @@ -93,14 +93,14 @@ CallTreeDlg::~CallTreeDlg() /** * @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; // Generate unique file name to save call tree later m_sFileName = sFunc; m_sFileName.replace(' ', '_'); - m_sFileName += QString::number(++s_nFileNameIndex); + m_sFileName += TQString::number(++s_nFileNameIndex); // Set the root item in all views m_pGraphWidget->setRoot(sFunc); @@ -129,13 +129,13 @@ void CallTreeDlg::show() * is therefore safe to delete the graph file at this point. * @param pEvent Information on the closing event */ -void CallTreeDlg::closeEvent(QCloseEvent* pEvent) +void CallTreeDlg::closeEvent(TQCloseEvent* pEvent) { if (!m_sFilePath.isEmpty()) - QFile::remove(m_sFilePath); + TQFile::remove(m_sFilePath); emit closed(this); - QWidget::closeEvent(pEvent); + TQWidget::closeEvent(pEvent); } extern void yyinit(CallTreeDlg*, FILE*, Encoder*); @@ -148,9 +148,9 @@ extern int yyparse(); * @param sFileName The name of the call tree file to load * @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; int nVersion, nView, nResult; Encoder enc; @@ -203,9 +203,9 @@ bool CallTreeDlg::load(const QString& sProjPath, const QString& sFileName) * closed. * @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; // Create the full file path @@ -238,7 +238,7 @@ void CallTreeDlg::store(const QString& sProjPath) */ void CallTreeDlg::slotSaveClicked() { - QString sFile; + TQString sFile; // Prompt the user for a file name sFile = KFileDialog::getSaveFileName(":kscope"); @@ -287,7 +287,7 @@ void CallTreeDlg::slotPrefClicked() GraphPrefDlg dlg(this); int nMaxNodeDegree; - if (dlg.exec() == QDialog::Accepted) { + if (dlg.exec() == TQDialog::Accepted) { nMaxNodeDegree = dlg.getMaxNodeDegree(); Config().setGraphMaxNodeDegree(nMaxNodeDegree); m_pGraphWidget->setMaxNodeDegree(nMaxNodeDegree); diff --git a/src/calltreedlg.h b/src/calltreedlg.h index d5f567b..092fd7d 100644 --- a/src/calltreedlg.h +++ b/src/calltreedlg.h @@ -28,8 +28,8 @@ #ifndef CALLTREEDLG_H #define CALLTREEDLG_H -#include <qwidget.h> -#include <qlistview.h> +#include <ntqwidget.h> +#include <ntqlistview.h> #include <calltreelayout.h> /** @@ -38,7 +38,7 @@ * - Call graph, showing both calling and call functions * - Called 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 * minimised. * @author Elad Lahav @@ -48,15 +48,15 @@ class CallTreeDlg : public CallTreeLayout Q_OBJECT public: - CallTreeDlg(QWidget* pParent = 0, const char* szName = 0); + CallTreeDlg(TQWidget* pParent = 0, const char* szName = 0); ~CallTreeDlg(); - void setRoot(const QString&); - bool load(const QString&, const QString&); - void store(const QString&); + void setRoot(const TQString&); + bool load(const TQString&, const TQString&); + void store(const TQString&); /** Returns Call Tree filename */ - QString getFileName() { return m_sFileName; } + TQString getFileName() { return m_sFileName; } public slots: virtual void show(); @@ -70,7 +70,7 @@ signals: * @param sPath The full path of the file to show * @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. @@ -78,7 +78,7 @@ signals: void closed(const CallTreeDlg*); protected: - virtual void closeEvent(QCloseEvent*); + virtual void closeEvent(TQCloseEvent*); protected slots: virtual void slotSaveClicked(); @@ -90,16 +90,16 @@ protected slots: private: /** The root function. */ - QString m_sRoot; + TQString m_sRoot; /** 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 index. */ - QString m_sFileName; + TQString m_sFileName; /** The full path of the file on which the call tree was saved (empty if this graph was never stored). */ - QString m_sFilePath; + TQString m_sFilePath; /** The view to show when the dialogue is first displayed. */ int m_nDefView; diff --git a/src/calltreelayout.ui b/src/calltreelayout.ui index 2562977..69beb2f 100644 --- a/src/calltreelayout.ui +++ b/src/calltreelayout.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>CallTreeLayout</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>CallTreeLayout</cstring> </property> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout2</cstring> </property> @@ -27,7 +27,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>m_pViewGroup</cstring> </property> @@ -50,7 +50,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QToolButton"> + <widget class="TQToolButton"> <property name="name"> <cstring>m_pGraphButton</cstring> </property> @@ -67,7 +67,7 @@ <string>Call Graph</string> </property> </widget> - <widget class="QToolButton"> + <widget class="TQToolButton"> <property name="name"> <cstring>m_pCalledButton</cstring> </property> @@ -84,7 +84,7 @@ <string>Called Functions Tree</string> </property> </widget> - <widget class="QToolButton"> + <widget class="TQToolButton"> <property name="name"> <cstring>m_pCallingButton</cstring> </property> @@ -117,7 +117,7 @@ <enum>Vertical</enum> </property> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>m_pGraphGroup</cstring> </property> @@ -140,7 +140,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QToolButton"> + <widget class="TQToolButton"> <property name="name"> <cstring>m_pSaveButton</cstring> </property> @@ -154,7 +154,7 @@ <string>Save As...</string> </property> </widget> - <widget class="QToolButton"> + <widget class="TQToolButton"> <property name="name"> <cstring>m_pZoomInButton</cstring> </property> @@ -171,7 +171,7 @@ <string>Zoom In</string> </property> </widget> - <widget class="QToolButton"> + <widget class="TQToolButton"> <property name="name"> <cstring>m_pZoomOutButton</cstring> </property> @@ -188,7 +188,7 @@ <string>Zoom Out</string> </property> </widget> - <widget class="QToolButton"> + <widget class="TQToolButton"> <property name="name"> <cstring>m_pRotateButton</cstring> </property> @@ -205,7 +205,7 @@ <string>Rotate</string> </property> </widget> - <widget class="QToolButton"> + <widget class="TQToolButton"> <property name="name"> <cstring>m_pPrefButton</cstring> </property> @@ -243,7 +243,7 @@ </spacer> </hbox> </widget> - <widget class="QWidgetStack"> + <widget class="TQWidgetStack"> <property name="name"> <cstring>m_pStack</cstring> </property> @@ -255,7 +255,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -276,7 +276,7 @@ </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -297,7 +297,7 @@ </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -319,7 +319,7 @@ </vbox> </widget> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_pHelpLabel</cstring> </property> @@ -418,7 +418,7 @@ <slot access="protected">slotZoomOutClicked()</slot> <slot access="protected">slotRotateClicked()</slot> <slot access="protected">slotViewChanged(int)</slot> - <slot access="protected">slotViewChanged(QWidget*)</slot> + <slot access="protected">slotViewChanged(TQWidget*)</slot> <slot access="protected">slotPrefClicked()</slot> </slots> <layoutdefaults spacing="6" margin="11"/> diff --git a/src/calltreemanager.cpp b/src/calltreemanager.cpp index 5dc8e9f..ac03cac 100644 --- a/src/calltreemanager.cpp +++ b/src/calltreemanager.cpp @@ -34,7 +34,7 @@ * @param pParent The widget to use as the parent of all Call Tree * dialogues */ -CallTreeManager::CallTreeManager(QWidget* pParent) : QObject(pParent) +CallTreeManager::CallTreeManager(TQWidget* pParent) : TQObject(pParent) { // Delete dialogue objects when they are removed from the list m_lstDialogs.setAutoDelete(true); @@ -52,8 +52,8 @@ CallTreeManager::~CallTreeManager() * @param sProjPath The project's directory * @param slFiles Holds a list of saved file names, upon return */ -void CallTreeManager::saveOpenDialogs(const QString& sProjPath, - QStringList& slFiles) +void CallTreeManager::saveOpenDialogs(const TQString& sProjPath, + TQStringList& slFiles) { CallTreeDlg *pDlg; @@ -70,10 +70,10 @@ void CallTreeManager::saveOpenDialogs(const QString& sProjPath, * @param sProjPath The project's directory * @param slFiles A list of file names to open */ -void CallTreeManager::loadOpenDialogs(const QString& sProjPath, - const QStringList& slFiles) +void CallTreeManager::loadOpenDialogs(const TQString& sProjPath, + const TQStringList& slFiles) { - QStringList::ConstIterator itr; + TQStringList::ConstIterator itr; CallTreeDlg *pDlg; for (itr = slFiles.begin(); itr != slFiles.end(); ++itr) { @@ -104,8 +104,8 @@ CallTreeDlg* CallTreeManager::addDialog() m_lstDialogs.append(pDlg); // Open an editor whenever a function name is double-clicked - connect(pDlg, SIGNAL(lineRequested(const QString&, uint)), - this, SIGNAL(lineRequested(const QString&, uint))); + connect(pDlg, SIGNAL(lineRequested(const TQString&, uint)), + this, SIGNAL(lineRequested(const TQString&, uint))); // Track the closing of the call tree dialog connect(pDlg, SIGNAL(closed(const CallTreeDlg*)), this, diff --git a/src/calltreemanager.h b/src/calltreemanager.h index adb91e6..09d47f7 100644 --- a/src/calltreemanager.h +++ b/src/calltreemanager.h @@ -28,8 +28,8 @@ #ifndef CALLTREEMANAGER_H #define CALLTREEMANAGER_H -#include <qwidget.h> -#include <qptrlist.h> +#include <ntqwidget.h> +#include <ntqptrlist.h> class CallTreeDlg; @@ -38,16 +38,16 @@ class CallTreeDlg; * Responsible for saving/loading of the call tree dialogs. * @author Albert Yosher */ -class CallTreeManager : public QObject +class CallTreeManager : public TQObject { Q_OBJECT public: - CallTreeManager(QWidget*); + CallTreeManager(TQWidget*); ~CallTreeManager(); - void saveOpenDialogs(const QString&, QStringList&); - void loadOpenDialogs(const QString&, const QStringList&); + void saveOpenDialogs(const TQString&, TQStringList&); + void loadOpenDialogs(const TQString&, const TQStringList&); CallTreeDlg* addDialog(); void closeAll(); @@ -58,11 +58,11 @@ signals: * @param sPath The full path of the file to show * @param nLine The line number in this file */ - void lineRequested(const QString& sPath, uint nLine); + void lineRequested(const TQString& sPath, uint nLine); private: /** The list of open call tree dialogues. */ - QPtrList<CallTreeDlg> m_lstDialogs; + TQPtrList<CallTreeDlg> m_lstDialogs; private slots: void slotRemoveDialog(const CallTreeDlg*); diff --git a/src/configfrontend.cpp b/src/configfrontend.cpp index 27e4e32..66c9684 100644 --- a/src/configfrontend.cpp +++ b/src/configfrontend.cpp @@ -56,13 +56,13 @@ ConfigFrontend::~ConfigFrontend() * @param bCscopeOptsOnly Only verify cscope's path and options * @return true if successful, false otherwise */ -bool ConfigFrontend::run(const QString& sCscopePath, - const QString& sCtagsPath, const QString& sDotPath, +bool ConfigFrontend::run(const TQString& sCscopePath, + const TQString& sCtagsPath, const TQString& sDotPath, bool bCscopeOptsOnly) { - QStringList slArgs; + TQStringList slArgs; KStandardDirs sd; - QString sScript; + TQString sScript; // Execute using the user's shell setUseShell(true); @@ -101,7 +101,7 @@ bool ConfigFrontend::run(const QString& sCscopePath, * a different test. * @param sToken The generated token */ -Frontend::ParseResult ConfigFrontend::parseStdout(QString& sToken, +Frontend::ParseResult ConfigFrontend::parseStdout(TQString& sToken, ParserDelim) { uint nResult; diff --git a/src/configfrontend.h b/src/configfrontend.h index df5e303..4c43c35 100644 --- a/src/configfrontend.h +++ b/src/configfrontend.h @@ -43,7 +43,7 @@ public: ConfigFrontend(bool bAutoDelete = false); ~ConfigFrontend(); - bool run(const QString&, const QString&, const QString&, + bool run(const TQString&, const TQString&, const TQString&, bool bCscopeOptsOnly = false); /** @@ -64,10 +64,10 @@ signals: * @param nType The type of test executed * @param sResult The obtained result */ - void result(uint nType, const QString& sResult); + void result(uint nType, const TQString& sResult); protected: - virtual ParseResult parseStdout(QString&, ParserDelim); + virtual ParseResult parseStdout(TQString&, ParserDelim); private: /** The type of test whose result is expected next. */ diff --git a/src/cscopefrontend.cpp b/src/cscopefrontend.cpp index 7c8f288..79d829e 100644 --- a/src/cscopefrontend.cpp +++ b/src/cscopefrontend.cpp @@ -25,8 +25,8 @@ * ***************************************************************************/ -#include <qfileinfo.h> -#include <qtimer.h> +#include <ntqfileinfo.h> +#include <ntqtimer.h> #include <kconfig.h> #include <kmessagebox.h> #include <klocale.h> @@ -41,7 +41,7 @@ #define REGEXP_STR "Symbols matched %d of %d" #define SEARCHEND_STR "%d lines" -QString CscopeFrontend::s_sProjPath; +TQString CscopeFrontend::s_sProjPath; uint CscopeFrontend::s_nProjArgs; uint CscopeFrontend::s_nSupArgs; @@ -72,9 +72,9 @@ CscopeFrontend::~CscopeFrontend() * @param slArgs Command line arguments for Cscope * @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 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 * 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) { - QString sQuery; - QStringList slArgs; + TQString sQuery; + TQStringList slArgs; m_nMaxRecords = nMaxRecords; // Create the Cscope command line - slArgs.append(QString("-L") + QString::number(nType)); + slArgs.append(TQString("-L") + TQString::number(nType)); slArgs.append(sText); slArgs.append("-d"); if (!bCase) @@ -142,7 +142,7 @@ void CscopeFrontend::query(uint nType, const QString& sText, bool bCase, */ void CscopeFrontend::rebuild() { - QStringList slArgs; + TQStringList slArgs; // If a process is already running, kill it start a new one if (isRunning()) { @@ -168,7 +168,7 @@ void CscopeFrontend::rebuild() * @param sProjPath The full path of the project's directory * @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_nProjArgs = nArgs; @@ -191,7 +191,7 @@ void CscopeFrontend::slotCancel() * @return A value indicating the way this token should be treated: dropped, * added to the token queue, or finishes a new record */ -Frontend::ParseResult CscopeFrontend::parseStdout(QString& sToken, +Frontend::ParseResult CscopeFrontend::parseStdout(TQString& sToken, ParserDelim /* ignored */) { int nFiles, nTotal, nRecords; @@ -345,7 +345,7 @@ Frontend::ParseResult CscopeFrontend::parseStdout(QString& sToken, * Handles Cscope messages sent to the standard error stream. * @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 m_sErrMsg += sText; @@ -381,7 +381,7 @@ void CscopeFrontend::finalize() * @param pMainWidget The parent widget to use for the progress bar and * label */ -CscopeProgress::CscopeProgress(QWidget* pMainWidget) : QObject(), +CscopeProgress::CscopeProgress(TQWidget* pMainWidget) : TQObject(), m_pMainWidget(pMainWidget), m_pProgressBar(NULL), m_pLabel(NULL) @@ -415,9 +415,9 @@ void CscopeProgress::setProgress(int nProgress, int nTotal) // Show the "Please wait..." label if (m_pLabel == NULL) { - m_pLabel = new QLabel(i18n("Processing query results, " + m_pLabel = new TQLabel(i18n("Processing query results, " "please wait..."), m_pMainWidget); - m_pLabel->setFrameStyle(QFrame::Box | QFrame::Plain); + m_pLabel->setFrameStyle(TQFrame::Box | TQFrame::Plain); m_pLabel->setLineWidth(1); m_pLabel->adjustSize(); @@ -426,7 +426,7 @@ void CscopeProgress::setProgress(int nProgress, int nTotal) m_pLabel->setPaletteForegroundColor( KGlobalSettings::highlightedTextColor()); - QTimer::singleShot(1000, this, SLOT(slotShowLabel())); + TQTimer::singleShot(1000, this, SLOT(slotShowLabel())); } return; @@ -437,8 +437,8 @@ void CscopeProgress::setProgress(int nProgress, int nTotal) // first progress signal is received. Thus the bar will not be displayed // on very short queries. if (m_pProgressBar == NULL) { - m_pProgressBar = new QProgressBar(m_pMainWidget); - QTimer::singleShot(1000, this, SLOT(slotShowProgressBar())); + m_pProgressBar = new TQProgressBar(m_pMainWidget); + TQTimer::singleShot(1000, this, SLOT(slotShowProgressBar())); } // Set the current progress value @@ -490,14 +490,14 @@ void CscopeVerifier::verify() ConfigFrontend* pConf; pConf = new ConfigFrontend(true); - connect(pConf, SIGNAL(result(uint, const QString&)), this, - SLOT(slotConfigResult(uint, const QString&))); + connect(pConf, SIGNAL(result(uint, const TQString&)), this, + SLOT(slotConfigResult(uint, const TQString&))); connect(pConf, SIGNAL(finished(uint)), this, SLOT(slotFinished())); pConf->run(Config().getCscopePath(), "", "", true); } -void CscopeVerifier::slotConfigResult(uint nType, const QString& sResult) +void CscopeVerifier::slotConfigResult(uint nType, const TQString& sResult) { switch (nType) { case ConfigFrontend::CscopeVerbose: diff --git a/src/cscopefrontend.h b/src/cscopefrontend.h index 2b2c569..1743e34 100644 --- a/src/cscopefrontend.h +++ b/src/cscopefrontend.h @@ -28,9 +28,9 @@ #ifndef CSCOPEFRONTEND_H #define CSCOPEFRONTEND_H -#include <qstringlist.h> -#include <qprogressbar.h> -#include <qlabel.h> +#include <ntqstringlist.h> +#include <ntqprogressbar.h> +#include <ntqlabel.h> #include "frontend.h" #define CSCOPE_RECORD_SIZE 4 @@ -71,10 +71,10 @@ public: enum Options { VerboseOut = 0x01, SlowPathDef = 0x02, 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(); - static void init(const QString&, uint); + static void init(const TQString&, uint); /** * @param nArgs The command-line arguments supported by the version of @@ -92,8 +92,8 @@ signals: void buildInvIndex(); protected: - virtual ParseResult parseStdout(QString&, ParserDelim); - virtual void parseStderr(const QString&); + virtual ParseResult parseStdout(TQString&, ParserDelim); + virtual void parseStderr(const TQString&); virtual void finalize(); private: @@ -107,7 +107,7 @@ private: ParserState m_state; /** 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 exits. */ @@ -118,7 +118,7 @@ private: int m_nMaxRecords; /** 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. */ static uint s_nProjArgs; @@ -126,7 +126,7 @@ private: /** The command line arguments supported by this version of Cscope. */ static uint s_nSupArgs; - bool run(const QStringList&); + bool run(const TQStringList&); }; /** @@ -136,12 +136,12 @@ private: * output is being processed. * @author Elad Lahav */ -class CscopeProgress : public QObject +class CscopeProgress : public TQObject { Q_OBJECT public: - CscopeProgress(QWidget*); + CscopeProgress(TQWidget*); ~CscopeProgress(); void setProgress(int, int); @@ -149,20 +149,20 @@ public: private: /** The parent widget for the progress bar and label. */ - QWidget* m_pMainWidget; + TQWidget* m_pMainWidget; /** A bar used to display query progress information. */ - QProgressBar* m_pProgressBar; + TQProgressBar* m_pProgressBar; /** A label used to display a "Please wait..." message. */ - QLabel* m_pLabel; + TQLabel* m_pLabel; private slots: void slotShowProgressBar(); void slotShowLabel(); }; -class CscopeVerifier : public QObject +class CscopeVerifier : public TQObject { Q_OBJECT @@ -179,7 +179,7 @@ private: uint m_nArgs; private slots: - void slotConfigResult(uint, const QString&); + void slotConfigResult(uint, const TQString&); void slotFinished(); }; diff --git a/src/cscopemsgdlg.cpp b/src/cscopemsgdlg.cpp index 1bf6656..2ffb469 100644 --- a/src/cscopemsgdlg.cpp +++ b/src/cscopemsgdlg.cpp @@ -25,8 +25,8 @@ * ***************************************************************************/ -#include <qtextedit.h> -#include <qpushbutton.h> +#include <ntqtextedit.h> +#include <ntqpushbutton.h> #include "cscopemsgdlg.h" /** @@ -34,7 +34,7 @@ * @param pParent The parent widget * @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) { // 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. * @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); show(); diff --git a/src/cscopemsgdlg.h b/src/cscopemsgdlg.h index 0cd45cd..cab1a25 100644 --- a/src/cscopemsgdlg.h +++ b/src/cscopemsgdlg.h @@ -39,10 +39,10 @@ class CscopeMsgDlg : public CscopeMsgLayout Q_OBJECT public: - CscopeMsgDlg(QWidget* pParent = 0, const char* szName = 0); + CscopeMsgDlg(TQWidget* pParent = 0, const char* szName = 0); ~CscopeMsgDlg(); - void addText(const QString&); + void addText(const TQString&); }; #endif diff --git a/src/cscopemsglayout.ui b/src/cscopemsglayout.ui index 1a6458d..198a98e 100644 --- a/src/cscopemsglayout.ui +++ b/src/cscopemsglayout.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>CscopeMsgLayout</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>CscopeMsgLayout</cstring> </property> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QTextEdit"> + <widget class="TQTextEdit"> <property name="name"> <cstring>m_pMsgText</cstring> </property> @@ -30,7 +30,7 @@ <bool>true</bool> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout1</cstring> </property> @@ -55,7 +55,7 @@ </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pClearButton</cstring> </property> @@ -63,7 +63,7 @@ <string>Clear</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pHideButton</cstring> </property> diff --git a/src/ctagsfrontend.cpp b/src/ctagsfrontend.cpp index 73f7519..425a435 100644 --- a/src/ctagsfrontend.cpp +++ b/src/ctagsfrontend.cpp @@ -25,14 +25,14 @@ * ***************************************************************************/ -#include <qfileinfo.h> +#include <ntqfileinfo.h> #include <kmessagebox.h> #include <klocale.h> #include <kshell.h> #include "ctagsfrontend.h" #include "kscopeconfig.h" -QStringList CtagsFrontend::s_slExtraArgs; +TQStringList CtagsFrontend::s_slExtraArgs; /** * Class constructor. @@ -53,10 +53,10 @@ CtagsFrontend::~CtagsFrontend() * @param sFileName The full path to the source file * @return true if successful, false otherwise */ -bool CtagsFrontend::run(const QString& sFileName) +bool CtagsFrontend::run(const TQString& sFileName) { - QString sPath; - QStringList slArgs; + TQString sPath; + TQStringList slArgs; // Make sure the executable exists 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 * 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() || fi.fileName().find("ctags", 0, false) == -1) { @@ -109,7 +109,7 @@ bool CtagsFrontend::verify(const QString& sPath) * command-line arguments. * @param sArgs The per-project command string */ -void CtagsFrontend::setExtraArgs(const QString& sArgs) +void CtagsFrontend::setExtraArgs(const TQString& 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, * added to the token queue, or finishes a new record */ -Frontend::ParseResult CtagsFrontend::parseStdout(QString& sToken, +Frontend::ParseResult CtagsFrontend::parseStdout(TQString& sToken, ParserDelim delim) { ParseResult result = DiscardToken; diff --git a/src/ctagsfrontend.h b/src/ctagsfrontend.h index 3c0c452..68985be 100644 --- a/src/ctagsfrontend.h +++ b/src/ctagsfrontend.h @@ -55,13 +55,13 @@ public: CtagsFrontend(); ~CtagsFrontend(); - bool run(const QString&); + bool run(const TQString&); - static bool verify(const QString&); - static void setExtraArgs(const QString&); + static bool verify(const TQString&); + static void setExtraArgs(const TQString&); protected: - virtual ParseResult parseStdout(QString&, ParserDelim); + virtual ParseResult parseStdout(TQString&, ParserDelim); private: /** State values for the parser state machine. */ @@ -71,7 +71,7 @@ private: ParserState m_state; /** Additional ommand-line arguments (per-project). */ - static QStringList s_slExtraArgs; + static TQStringList s_slExtraArgs; }; #endif diff --git a/src/ctagslist.cpp b/src/ctagslist.cpp index 687e9fb..0a0ae69 100644 --- a/src/ctagslist.cpp +++ b/src/ctagslist.cpp @@ -25,7 +25,7 @@ * ***************************************************************************/ -#include <qheader.h> +#include <ntqheader.h> #include <klocale.h> #include "ctagslist.h" #include "kscopeconfig.h" @@ -40,7 +40,7 @@ * correct sorting. * @author Elad Lahav */ -class CtagsListItem : public QListViewItem +class CtagsListItem : public TQListViewItem { public: /** @@ -50,8 +50,8 @@ public: * @param sLine The line in which the tag is defined * @param sType The type of the tag */ - CtagsListItem(QListView* pParent, QString sName, QString sLine, - QString sType) : QListViewItem(pParent, sName, sLine, sType), + CtagsListItem(TQListView* pParent, TQString sName, TQString sLine, + TQString sType) : TQListViewItem(pParent, sName, sLine, sType), m_nPendLine (sLine.toUInt()) {} /** @@ -65,7 +65,7 @@ public: * @return 0 if the items are equal, 1 if the local item is greater, -1 * 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) { uint nLineCur, nLineOther; int nResult; @@ -85,7 +85,7 @@ public: } // 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 szName The widget's name */ -CtagsList::CtagsList(QWidget* pParent, const char* szName) : +CtagsList::CtagsList(TQWidget* pParent, const char* szName) : SearchList(0, pParent, szName), m_arrLines(16), m_nItems(0), @@ -147,7 +147,7 @@ CtagsList::CtagsList(QWidget* pParent, const char* szName) : m_pList->addColumn(i18n("Name")); m_pList->addColumn(i18n("Line")); m_pList->addColumn(i18n("Type")); - m_pList->setColumnAlignment(1, Qt::AlignRight); + m_pList->setColumnAlignment(1, TQt::AlignRight); // Set colours and font applyPrefs(); @@ -167,7 +167,7 @@ CtagsList::~CtagsList() */ void CtagsList::slotDataReady(FrontendToken* pToken) { - QString sName, sType, sLine; + TQString sName, sType, sLine; CtagsListItem* pItem; KScopePixmaps::PixName pix; @@ -247,7 +247,7 @@ void CtagsList::slotDataReady(FrontendToken* pToken) // Resize the line array, if required 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 m_arrLines[m_nItems - 1] = pItem; @@ -258,7 +258,7 @@ void CtagsList::slotDataReady(FrontendToken* pToken) * changes. * @param pEvent The event data */ -void CtagsList::resizeEvent(QResizeEvent* pEvent) +void CtagsList::resizeEvent(TQResizeEvent* pEvent) { SearchList::resizeEvent(pEvent); emit resized(); @@ -270,9 +270,9 @@ void CtagsList::resizeEvent(QResizeEvent* pEvent) * highlighted and the ENTER key is pressed. * @param pItem The selected list item */ -void CtagsList::processItemSelected(QListViewItem* pItem) +void CtagsList::processItemSelected(TQListViewItem* pItem) { - QString sLine; + TQString sLine; sLine = pItem->text(1); emit lineRequested(sLine.toUInt()); @@ -284,9 +284,9 @@ void CtagsList::processItemSelected(QListViewItem* pItem) * @param sTip The constructed tip string (on return) * @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)); return true; } @@ -416,7 +416,7 @@ void CtagsList::slotCtagsFinished(uint nRecords) */ void CtagsList::slotSortChanged(int nSection) { - Qt::SortOrder order; + TQt::SortOrder order; // Determine whether the new order is ascending or descending order = m_pList->sortOrder(); @@ -425,19 +425,19 @@ void CtagsList::slotSortChanged(int nSection) switch (nSection) { case 0: // Sort by name - Config().setCtagSortOrder(order == Qt::Ascending ? + Config().setCtagSortOrder(order == TQt::Ascending ? KScopeConfig::NameAsc : KScopeConfig::NameDes); break; case 1: // Sort by line - Config().setCtagSortOrder(order == Qt::Ascending ? + Config().setCtagSortOrder(order == TQt::Ascending ? KScopeConfig::LineAsc : KScopeConfig::LineDes); break; case 2: // Sort by type - Config().setCtagSortOrder(order == Qt::Ascending ? + Config().setCtagSortOrder(order == TQt::Ascending ? KScopeConfig::TypeAsc : KScopeConfig::TypeDes); break; } diff --git a/src/ctagslist.h b/src/ctagslist.h index 4d318cc..03d1560 100644 --- a/src/ctagslist.h +++ b/src/ctagslist.h @@ -28,9 +28,9 @@ #ifndef CTAGSLIST_H #define CTAGSLIST_H -#include <qwidget.h> -#include <qpixmap.h> -#include <qmemarray.h> +#include <ntqwidget.h> +#include <ntqpixmap.h> +#include <ntqmemarray.h> #include "searchlist.h" #include "frontend.h" @@ -51,14 +51,14 @@ class CtagsList : public SearchList Q_OBJECT public: - CtagsList(QWidget* pParent = 0, const char* szName = 0); + CtagsList(TQWidget* pParent = 0, const char* szName = 0); ~CtagsList(); void applyPrefs(); void gotoLine(uint); void clear(); - virtual bool getTip(QListViewItem*, QString&); + virtual bool getTip(TQListViewItem*, TQString&); public slots: void slotDataReady(FrontendToken*); @@ -78,13 +78,13 @@ signals: void lineRequested(uint nLine); protected: - virtual void resizeEvent(QResizeEvent*); - virtual void processItemSelected(QListViewItem*); + virtual void resizeEvent(TQResizeEvent*); + virtual void processItemSelected(TQListViewItem*); private: /** An array of pointers to the tag list items, sorted by the line number. */ - QMemArray<CtagsListItem*> m_arrLines; + TQMemArray<CtagsListItem*> m_arrLines; /** The number of items in the tag list. */ uint m_nItems; diff --git a/src/dirscanner.cpp b/src/dirscanner.cpp index 517237e..ba8717e 100644 --- a/src/dirscanner.cpp +++ b/src/dirscanner.cpp @@ -25,7 +25,7 @@ * ***************************************************************************/ -#include <qapplication.h> +#include <ntqapplication.h> #include "dirscanner.h" /** @@ -34,7 +34,7 @@ * @param bFinished true if all files were scanned, false otherwise */ DirScanEvent::DirScanEvent(int nFiles, bool bFinished) - : QCustomEvent(EventId), + : TQCustomEvent(EventId), m_nFiles(nFiles), m_bFinished(bFinished) { @@ -47,8 +47,8 @@ DirScanEvent::DirScanEvent(int nFiles, bool bFinished) * @param pDicFiles Pointer to a map of current project files (to avoid duplication) */ -DirScanner::DirScanner(QObject* pEventReceiver, - QDict<QListViewItem>* pDicFiles) : QThread(), +DirScanner::DirScanner(TQObject* pEventReceiver, + TQDict<TQListViewItem>* pDicFiles) : TQThread(), m_pEventReceiver(pEventReceiver), m_pDicFiles(pDicFiles) { @@ -70,18 +70,18 @@ DirScanner::~DirScanner() * @param sNameFilter Defines the search pattern * @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) { // Initialise the search parameters - m_dir = QDir(sDir); + m_dir = TQDir(sDir); m_sNameFilter = sNameFilter; m_bCancel = false; m_bRecursive = bRecursive; m_slFiles.clear(); // Invoke the thread - QThread::start(); + TQThread::start(); } /** @@ -93,7 +93,7 @@ void DirScanner::run() int nFiles; nFiles = scanDir(m_dir); - QApplication::postEvent(m_pEventReceiver, + TQApplication::postEvent(m_pEventReceiver, new DirScanEvent(nFiles, true)); m_setScanned.clear(); @@ -105,12 +105,12 @@ void DirScanner::run() * added * @return The total number of files added */ -int DirScanner::scanDir(QDir& dir) +int DirScanner::scanDir(TQDir& dir) { - QString sCanon; - QStringList slDirFiles, slDirs; - QStringList::const_iterator itr; - QString sFile; + TQString sCanon; + TQStringList slDirFiles, slDirs; + TQStringList::const_iterator itr; + TQString sFile; int nFiles = 0; if (m_bCancel) @@ -125,7 +125,7 @@ int DirScanner::scanDir(QDir& dir) m_setScanned.insert(sCanon); // 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) { 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)); // Recurse into sub-directories, if requested if (!m_bRecursive) return nFiles; - slDirs = dir.entryList(QDir::Dirs); + slDirs = dir.entryList(TQDir::Dirs); // Iterate the list of sub-directories for (itr = slDirs.begin(); itr != slDirs.end(); ++itr) { @@ -155,7 +155,7 @@ int DirScanner::scanDir(QDir& dir) continue; // Add the files in each sub-directory - QDir dirSub(dir); + TQDir dirSub(dir); if (dirSub.cd(*itr)) nFiles += scanDir(dirSub); } diff --git a/src/dirscanner.h b/src/dirscanner.h index b25fc2d..a494052 100644 --- a/src/dirscanner.h +++ b/src/dirscanner.h @@ -28,13 +28,13 @@ #ifndef DIRSCANNER_H #define DIRSCANNER_H -#include <qobject.h> -#include <qevent.h> -#include <qthread.h> -#include <qdir.h> -#include <qstringlist.h> -#include <qdict.h> -#include <qlistview.h> +#include <ntqobject.h> +#include <ntqevent.h> +#include <ntqthread.h> +#include <ntqdir.h> +#include <ntqstringlist.h> +#include <ntqdict.h> +#include <ntqlistview.h> class DirScanner; @@ -43,7 +43,7 @@ class DirScanner; * dir scanning thread to the main application thread. * @author Elad Lahav */ -class DirScanEvent : public QCustomEvent +class DirScanEvent : public TQCustomEvent { public: /** The event's unique ID. */ @@ -60,21 +60,21 @@ public: /** * A set of unique strings. - * Qt3 does not have a set class, so this is a simple implementation based on - * a QDict of dummy int pointers. + * TQt3 does not have a set class, so this is a simple implementation based on + * a TQDict of dummy int pointers. * @author Elad Lahav */ -class StringSet : public QDict<int> +class StringSet : public TQDict<int> { public: - StringSet() : QDict<int>() {} + StringSet() : TQDict<int>() {} - void insert(const QString& sItem) { + void insert(const TQString& sItem) { 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; } }; @@ -83,18 +83,18 @@ public: * Scans a directory for files matching a given pattern, using a separate thread. * @author Elad Lahav */ -class DirScanner : public QThread +class DirScanner : public TQThread { public: - DirScanner(QObject*, QDict<QListViewItem>*); + DirScanner(TQObject*, TQDict<TQListViewItem>*); ~DirScanner(); - void start(const QString&, const QString&, bool); + void start(const TQString&, const TQString&, bool); /** * @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. @@ -111,10 +111,10 @@ protected: private: /** Pointer to an object that receives the scanner update events. */ - QObject* m_pEventReceiver; + TQObject* m_pEventReceiver; /** Currently scanned directory. */ - QDir m_dir; + TQDir m_dir; /** * 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 files that should not appear in the scan results.) */ - QDict<QListViewItem>* m_pDicFiles; + TQDict<TQListViewItem>* m_pDicFiles; /** Regular expression for scanning source files. */ - QString m_sNameFilter; + TQString m_sNameFilter; /** The list of scanned file paths. */ - QStringList m_slFiles; + TQStringList m_slFiles; /** A cancellation flag. Stops the scanning process when raised. */ bool m_bCancel; @@ -138,7 +138,7 @@ private: /** true to descend to child directories, false otherwise. */ bool m_bRecursive; - int scanDir(QDir&); + int scanDir(TQDir&); }; #endif diff --git a/src/dotfrontend.cpp b/src/dotfrontend.cpp index e0cfbed..69e825d 100644 --- a/src/dotfrontend.cpp +++ b/src/dotfrontend.cpp @@ -25,8 +25,8 @@ * ***************************************************************************/ -#include <qfileinfo.h> -#include <qpaintdevicemetrics.h> +#include <ntqfileinfo.h> +#include <ntqpaintdevicemetrics.h> #include <kmessagebox.h> #include <klocale.h> #include "dotfrontend.h" @@ -55,11 +55,11 @@ DotFrontend::~DotFrontend() * description * @return true if successful, false otherwise */ -bool DotFrontend::run(const QString& sFile) +bool DotFrontend::run(const TQString& sFile) { - QString sPath; - QStringList slArgs; - QPaintDeviceMetrics pdm(m_pGraph); + TQString sPath; + TQStringList slArgs; + TQPaintDeviceMetrics pdm(m_pGraph); // Set the horizontal and vertical DPI values 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 * 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() || 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, * added to the token queue, or finishes a new record */ -Frontend::ParseResult DotFrontend::parseStdout(QString& sToken, +Frontend::ParseResult DotFrontend::parseStdout(TQString& sToken, ParserDelim delim) { static int nWidth, nHeight, nXpos, nYpos, nCurveSize, nCurveCount; - static QPointArray arrCurve; - static QString sNode, sEdgeHead, sEdgeTail; + static TQPointArray arrCurve; + static TQString sNode, sEdgeHead, sEdgeTail; ParseResult result = DiscardToken; double dVal; bool bOK; @@ -214,7 +214,7 @@ Frontend::ParseResult DotFrontend::parseStdout(QString& sToken, nHeight = (int)(dVal * m_dDpiY); // Create the bounding rectangle of the node - QRect rect; + TQRect rect; rect.setX(nXpos - (nWidth / 2)); rect.setY(nYpos - (nHeight / 2)); rect.setWidth(nWidth); @@ -272,7 +272,7 @@ Frontend::ParseResult DotFrontend::parseStdout(QString& sToken, // Draw the edge 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(); m_state = EndNodeEdge; diff --git a/src/dotfrontend.h b/src/dotfrontend.h index 24f14f0..4f75b6f 100644 --- a/src/dotfrontend.h +++ b/src/dotfrontend.h @@ -28,7 +28,7 @@ #define DOTFRONTEND_H #include <frontend.h> -#include <qpointarray.h> +#include <ntqpointarray.h> class GraphWidget; @@ -46,12 +46,12 @@ public: DotFrontend(GraphWidget*); ~DotFrontend(); - bool run(const QString&); + bool run(const TQString&); - static bool verify(const QString&); + static bool verify(const TQString&); protected: - virtual ParseResult parseStdout(QString&, ParserDelim); + virtual ParseResult parseStdout(TQString&, ParserDelim); private: /** The owner graph widget on which to draw. */ diff --git a/src/dotparse.ypp b/src/dotparse.ypp index f21b9e3..f8e8960 100644 --- a/src/dotparse.ypp +++ b/src/dotparse.ypp @@ -1,9 +1,9 @@ /* dot.y */ %{ -#include <qdict.h> -#include <qptrstack.h> -#include <qlistview.h> +#include <ntqdict.h> +#include <ntqptrstack.h> +#include <ntqlistview.h> #include "calltreedlg.h" #include "graphwidget.h" #include "treewidget.h" @@ -14,9 +14,9 @@ int yylex(); void yyinit(CallTreeDlg*, FILE*, Encoder*); void yyerror(const char*); -static QMap<QString, QString> s_pMapAttr; -static QStack<QListViewItem> s_pParentStack; -static QListView* s_pTree; +static TQMap<TQString, TQString> s_pMapAttr; +static TQStack<TQListViewItem> s_pParentStack; +static TQListView* s_pTree; static GraphWidget* s_pGraph; static TreeWidget* s_pCallTree; @@ -31,7 +31,7 @@ static Encoder* s_pEncoder; %} %union { - QString* pText; + TQString* pText; } %token GRAPH DIGRAPH NODE NAME STRING NUMBER DIR_EDGE UNDIR_EDGE @@ -159,7 +159,7 @@ calling_tree_prepare root_node : root_tree_node '{' child_list '}' { - QListViewItem* pItem; + TQListViewItem* pItem; pItem = s_pParentStack.pop(); if (pItem->firstChild() != NULL) @@ -170,9 +170,9 @@ root_node root_tree_node : NAME { - QListViewItem* pItem; + TQListViewItem* pItem; - pItem = new QListViewItem(s_pTree, *$1); + pItem = new TQListViewItem(s_pTree, *$1); s_pParentStack.push(pItem); delete $1; } @@ -186,7 +186,7 @@ child_list child_node : tree_node tree_attributes '{' child_list '}' { - QListViewItem* pItem; + TQListViewItem* pItem; pItem = s_pParentStack.pop(); if (pItem->firstChild() != NULL) @@ -197,9 +197,9 @@ child_node tree_node : NAME { - QListViewItem* pItem; + TQListViewItem* pItem; - pItem = new QListViewItem(s_pParentStack.top(), *$1); + pItem = new TQListViewItem(s_pParentStack.top(), *$1); s_pParentStack.push(pItem); delete $1; } @@ -208,7 +208,7 @@ tree_node tree_attributes : attributes { - QListViewItem* pItem; + TQListViewItem* pItem; pItem = s_pParentStack.top(); pItem->setText(1, s_pMapAttr["kscope_file"]); diff --git a/src/dotscan.lpp b/src/dotscan.lpp index 68887b3..dede564 100644 --- a/src/dotscan.lpp +++ b/src/dotscan.lpp @@ -1,7 +1,7 @@ /* dot.l */ %{ -#include <qstring.h> +#include <ntqstring.h> #include "dotparse.hpp" %} diff --git a/src/editormanager.cpp b/src/editormanager.cpp index 253bf6c..505a6cb 100644 --- a/src/editormanager.cpp +++ b/src/editormanager.cpp @@ -35,7 +35,7 @@ * @param pParent The parent widget * @param szName The widget's name */ -EditorManager::EditorManager(QWidget* pParent, const char* szName) : +EditorManager::EditorManager(TQWidget* pParent, const char* szName) : KParts::PartManager(pParent, szName) { applyPrefs(); diff --git a/src/editormanager.h b/src/editormanager.h index 413ffed..0a2a42b 100644 --- a/src/editormanager.h +++ b/src/editormanager.h @@ -28,7 +28,7 @@ #ifndef EDITORMANAGER_H #define EDITORMANAGER_H -#include <qwidget.h> +#include <ntqwidget.h> #include <kparts/partmanager.h> #include <klibloader.h> #include <ktexteditor/document.h> @@ -45,7 +45,7 @@ class EditorManager : public KParts::PartManager Q_OBJECT public: - EditorManager(QWidget* pParent = 0, const char* szName = 0); + EditorManager(TQWidget* pParent = 0, const char* szName = 0); ~EditorManager(); KTextEditor::Document* add(); diff --git a/src/editorpage.cpp b/src/editorpage.cpp index 5c183b9..a838e76 100644 --- a/src/editorpage.cpp +++ b/src/editorpage.cpp @@ -25,7 +25,7 @@ * ***************************************************************************/ -#include <qfileinfo.h> +#include <ntqfileinfo.h> #include <kdeversion.h> #include <ktexteditor/selectioninterface.h> #include <ktexteditor/viewcursorinterface.h> @@ -43,8 +43,8 @@ * @param pParent The parent widget * @param szName The widget's name */ -EditorPage::EditorPage(KTextEditor::Document* pDoc, QPopupMenu* pMenu, - QTabWidget* pParent, const char* szName) : QHBox(pParent, szName), +EditorPage::EditorPage(KTextEditor::Document* pDoc, TQPopupMenu* pMenu, + TQTabWidget* pParent, const char* szName) : TQHBox(pParent, szName), m_pParentTab(pParent), m_pDoc(pDoc), m_bOpen(false), @@ -58,7 +58,7 @@ EditorPage::EditorPage(KTextEditor::Document* pDoc, QPopupMenu* pMenu, KTextEditor::PopupMenuInterface* pMenuIf; 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); // Set read-only mode, if required @@ -66,10 +66,10 @@ EditorPage::EditorPage(KTextEditor::Document* pDoc, QPopupMenu* pMenu, m_pDoc->setReadWrite(false); // Create the child widgets - m_pSplit = new QSplitter(this); + m_pSplit = new TQSplitter(this); m_pCtagsList = new CtagsList(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 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 * string if no file is currently open */ -QString EditorPage::getFilePath() +TQString EditorPage::getFilePath() { return m_pDoc->url().path(); } @@ -147,7 +147,7 @@ QString EditorPage::getFilePath() * @return The name of the file associated with the Document object, empty * string if no file is currently open */ -QString EditorPage::getFileName() +TQString EditorPage::getFileName() { return m_sName; } @@ -181,7 +181,7 @@ bool EditorPage::isModified() * Opens a file for editing. * @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 m_bOpen = false; @@ -214,7 +214,7 @@ void EditorPage::save() */ bool EditorPage::close(bool bForce) { - QString sPath; + TQString sPath; // To override the prompt-on-close behaviour, we need to mark the file // as unmodified @@ -282,7 +282,7 @@ void EditorPage::addBookmark(uint nLine) void EditorPage::getBookmarks(FileLocationList& fll) { KTextEditor::MarkInterface* pMarkIf; - QPtrList<KTextEditor::Mark> plMarks; + TQPtrList<KTextEditor::Mark> plMarks; KTextEditor::Mark* pMark; // 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 * selected */ -QString EditorPage::getSelection() +TQString EditorPage::getSelection() { KTextEditor::SelectionInterface* pSelect; // Get the selected text pSelect = dynamic_cast<KTextEditor::SelectionInterface*>(m_pDoc); if (!pSelect || !pSelect->hasSelection()) - return QString::null; + return TQString::null; // Return the selected text return pSelect->selection(); @@ -320,25 +320,25 @@ QString EditorPage::getSelection() * 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 * 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::EditInterface* pEditIf; - QString sLine; + TQString sLine; uint nLine, nCol, nFrom, nTo, nLast, nLength; - QChar ch; + TQChar ch; // Get a cursor object pCursor = dynamic_cast<KTextEditor::ViewCursorInterface*>(m_pView); if (pCursor == NULL) - return QString::null; + return TQString::null; // Get a pointer to the edit interface pEditIf = dynamic_cast<KTextEditor::EditInterface*>(m_pDoc); if (!pEditIf) - return QString::null; + return TQString::null; // Get the line on which the cursor is positioned pCursor->cursorPositionReal(&nLine, &nCol); @@ -366,7 +366,7 @@ QString EditorPage::getWordUnderCursor(uint* pPosInWord) // Mark empty words nLength = nTo - nFrom; if (nLength == 0) - return QString::null; + return TQString::null; // Return the in-word position, if required if (pPosInWord != NULL) @@ -383,14 +383,14 @@ QString EditorPage::getWordUnderCursor(uint* pPosInWord) * is returned. Otherwise, the word under the cursor location is returned, if * one exists. * @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(); - if (sText == QString::null) + if (sText == TQString::null) sText = getWordUnderCursor(); return sText; @@ -400,22 +400,22 @@ QString EditorPage::getSuggestedText() * Returns the contents of the requested line. * Truncates the leading and trailing white spaces. * @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 */ -QString EditorPage::getLineContents(uint nLine) +TQString EditorPage::getLineContents(uint nLine) { KTextEditor::EditInterface* pEditIf; - QString sLine; + TQString sLine; // Cannot accept line 0 if (nLine == 0) - return QString::null; + return TQString::null; // Get a pointer to the edit interface pEditIf = dynamic_cast<KTextEditor::EditInterface*>(m_pDoc); if (!pEditIf) - return QString::null; + return TQString::null; // Get the line on which the cursor is positioned sLine = pEditIf->textLine(nLine - 1); @@ -599,7 +599,7 @@ void EditorPage::setTabWidth(uint nTabWidth) { Kate::Document* pKateDoc; Kate::Command* pKateCmd; - QString sCmd, sResult; + TQString sCmd, sResult; pKateDoc = dynamic_cast<Kate::Document*>(m_pDoc); if ((pKateDoc) && @@ -619,7 +619,7 @@ void EditorPage::setTabWidth(uint nTabWidth) */ void EditorPage::slotFileOpened() { - QFileInfo fi(m_pDoc->url().path()); + TQFileInfo fi(m_pDoc->url().path()); // Get file information m_sName = fi.fileName(); diff --git a/src/editorpage.h b/src/editorpage.h index 0af3aaf..37a6e65 100644 --- a/src/editorpage.h +++ b/src/editorpage.h @@ -28,11 +28,11 @@ #ifndef EDITORPAGE_H #define EDITORPAGE_H -#include <qwidget.h> -#include <qhbox.h> -#include <qsplitter.h> -#include <qtabwidget.h> -#include <qpopupmenu.h> +#include <ntqwidget.h> +#include <ntqhbox.h> +#include <ntqsplitter.h> +#include <ntqtabwidget.h> +#include <ntqpopupmenu.h> #include <ktexteditor/document.h> #include <ktexteditor/view.h> #include <ktexteditor/markinterfaceextension.h> @@ -53,16 +53,16 @@ * @author Elad Lahav */ -class EditorPage : public QHBox, SymbolCompletion::Interface +class EditorPage : public TQHBox, SymbolCompletion::Interface { Q_OBJECT public: - EditorPage(KTextEditor::Document*, QPopupMenu*, QTabWidget* pParent = 0, + EditorPage(KTextEditor::Document*, TQPopupMenu*, TQTabWidget* pParent = 0, const char* szName = 0); ~EditorPage(); - void open(const QString&); + void open(const TQString&); void setNewFile(); void save(); bool close(bool bForce = false); @@ -74,26 +74,26 @@ public: KTextEditor::Document* getDocument(); KTextEditor::View* getView(); - QString getFilePath(); - QString getFileName(); + TQString getFilePath(); + TQString getFileName(); bool isWritable(); bool isModified(); - QString getSelection(); - QString getSuggestedText(); - QString getLineContents(uint); + TQString getSelection(); + TQString getSuggestedText(); + TQString getLineContents(uint); void setLayout(bool bShowTagList, const SPLIT_SIZES&); bool getCursorPos(uint&, uint&); bool setCursorPos(uint, uint nCol = 1); void setTabWidth(uint); - virtual QString getWordUnderCursor(uint* pPosInWord = NULL); + virtual TQString getWordUnderCursor(uint* pPosInWord = NULL); /** * Implements the SymbolCompletion interface method for returning an * object that supports KTextEditor::CodeCompletionInterface. * @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, @@ -115,7 +115,7 @@ signals: * @param pPage The emitting object * @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. @@ -146,24 +146,24 @@ signals: * @param sPath The full path of the saved file * @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. * @param sPath The full path of the closed file */ - void fileClosed(const QString& sPath); + void fileClosed(const TQString& sPath); private: /** The tab widget holding this page. */ - QTabWidget* m_pParentTab; + TQTabWidget* m_pParentTab; /** A Ctags process to use on the edited source file. */ CtagsFrontend m_ctags; /** An adjustable splitter for separating the tag list from the editor part. */ - QSplitter* m_pSplit; + TQSplitter* m_pSplit; /** A list view for displaying Ctags results. */ CtagsList* m_pCtagsList; @@ -182,7 +182,7 @@ private: bool m_bNewFile; /** 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 otherwise. */ diff --git a/src/editortabs.cpp b/src/editortabs.cpp index 5af9be1..af9587c 100644 --- a/src/editortabs.cpp +++ b/src/editortabs.cpp @@ -25,7 +25,7 @@ * ***************************************************************************/ -#include <qfileinfo.h> +#include <ntqfileinfo.h> #include <klocale.h> #include <kmessagebox.h> #include <kurldrag.h> @@ -39,7 +39,7 @@ * @param pParent The parent widget * @param szName The widget's name */ -EditorTabs::EditorTabs(QWidget* pParent, const char* szName) : +EditorTabs::EditorTabs(TQWidget* pParent, const char* szName) : TabWidget(pParent, szName), m_pCurPage(NULL), m_pWindowMenu(NULL), @@ -53,16 +53,16 @@ EditorTabs::EditorTabs(QWidget* pParent, const char* szName) : setAcceptDrops(true); // Close an editor page when its close button is clicked - connect(this, SIGNAL(closeRequest(QWidget*)), this, - SLOT(slotRemovePage(QWidget*))); + connect(this, SIGNAL(closeRequest(TQWidget*)), this, + SLOT(slotRemovePage(TQWidget*))); // Set an editor page as the active part, when its tab is selected - connect(this, SIGNAL(currentChanged(QWidget*)), this, - SLOT(slotCurrentChanged(QWidget*))); + connect(this, SIGNAL(currentChanged(TQWidget*)), this, + SLOT(slotCurrentChanged(TQWidget*))); // Start dragging a file from a tab - connect(this, SIGNAL(initiateDrag(QWidget*)), this, - SLOT(slotInitiateDrag(QWidget*))); + connect(this, SIGNAL(initiateDrag(TQWidget*)), this, + SLOT(slotInitiateDrag(TQWidget*))); } /** @@ -76,7 +76,7 @@ EditorTabs::~EditorTabs() * @param pWindowMenu Pointer to the main window's "Window" menu (used to * add an activation menu item for each editor page) */ -void EditorTabs::setWindowMenu(QPopupMenu* pWindowMenu) +void EditorTabs::setWindowMenu(TQPopupMenu* pWindowMenu) { m_pWindowMenu = pWindowMenu; 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, // once the file is opened - connect(pNewPage, SIGNAL(fileOpened(EditorPage*, const QString&)), this, - SLOT(slotAttachFile(EditorPage*, const QString&))); + connect(pNewPage, SIGNAL(fileOpened(EditorPage*, const TQString&)), this, + SLOT(slotAttachFile(EditorPage*, const TQString&))); // Handle new unnamed files connect(pNewPage, SIGNAL(newFile(EditorPage*)), this, @@ -124,7 +124,7 @@ void EditorTabs::addEditorPage(EditorPage* pNewPage) * current one * @return The editor page object, if found, NULL otherwise */ -EditorPage* EditorTabs::findEditorPage(const QString& sFileName, +EditorPage* EditorTabs::findEditorPage(const TQString& sFileName, bool bForceChange) { EditorMap::iterator itr; @@ -164,7 +164,7 @@ EditorPage* EditorTabs::getCurrentPage() */ void EditorTabs::removeCurrentPage() { - QWidget* pPage; + TQWidget* pPage; // Get the active page, if any pPage = currentPage(); @@ -181,7 +181,7 @@ void EditorTabs::removeCurrentPage() */ bool EditorTabs::removeAllPages() { - QWidget* pPage; + TQWidget* pPage; // Check if there are any modified files if (getModifiedFilesCount()) { @@ -222,11 +222,11 @@ bool EditorTabs::removeAllPages() /** * Keeps track of the currently active editor page, and notifies on a change * 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. * @param pWidget The new active page */ -void EditorTabs::slotCurrentChanged(QWidget* pWidget) +void EditorTabs::slotCurrentChanged(TQWidget* pWidget) { EditorPage* pOldPage; @@ -261,7 +261,7 @@ void EditorTabs::slotCurrentChanged(QWidget* pWidget) * @param sFilePath The full path of the file edited in this page */ void EditorTabs::slotAttachFile(EditorPage* pEditPage, - const QString& sFilePath) + const TQString& sFilePath) { // Set the appropriate tab icon, according to the file permissions if (pEditPage->isWritable()) @@ -288,11 +288,11 @@ void EditorTabs::slotAttachFile(EditorPage* pEditPage, */ void EditorTabs::slotNewFile(EditorPage* pEditPage) { - QString sCaption; + TQString sCaption; // Set the tab caption to mark a new file m_nNewFiles++; - sCaption = i18n("Untitled ") + QString::number(m_nNewFiles); + sCaption = i18n("Untitled ") + TQString::number(m_nNewFiles); changeTab(pEditPage, Pixmaps().getPixmap(KScopePixmaps::TabRW), sCaption); @@ -403,7 +403,7 @@ void EditorTabs::showBookmarks(QueryView* pView) // Populate the view for (pLoc = fll.first(); pLoc; pLoc = fll.next()) { pView->addRecord("", pLoc->m_sPath, - QString::number(pLoc->m_nLine + 1), + TQString::number(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. * @param pPage The EditorPage object to remove */ -void EditorTabs::slotRemovePage(QWidget* pPage) +void EditorTabs::slotRemovePage(TQWidget* pPage) { removePage(pPage, false); } @@ -447,7 +447,7 @@ void EditorTabs::slotToggleTagList() * The event is accepted if the dragged object is a list of file paths. * @param pEvent The drag move event object */ -void EditorTabs::dragMoveEvent(QDragMoveEvent* pEvent) +void EditorTabs::dragMoveEvent(TQDragMoveEvent* pEvent) { KURL::List list; bool bAccept; @@ -460,7 +460,7 @@ void EditorTabs::dragMoveEvent(QDragMoveEvent* pEvent) * Handles file drops over an empty tab widget, or over the tab bar. * @param pEvent The drop event object */ -void EditorTabs::dropEvent(QDropEvent* pEvent) +void EditorTabs::dropEvent(TQDropEvent* pEvent) { emit filesDropped(pEvent); } @@ -473,7 +473,7 @@ void EditorTabs::dropEvent(QDropEvent* pEvent) * widget. * @param pWidget The page whose tab is being dragged */ -void EditorTabs::slotInitiateDrag(QWidget* pWidget) +void EditorTabs::slotInitiateDrag(TQWidget* pWidget) { KURL url; KURLDrag* pDrag; @@ -565,7 +565,7 @@ void EditorTabs::slotGoRight() */ void EditorTabs::slotFillWindowMenu() { - QString sLabel; + TQString sLabel; int i; // Delete old menu items @@ -576,7 +576,7 @@ void EditorTabs::slotFillWindowMenu() // Add new items 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); } @@ -609,10 +609,10 @@ void EditorTabs::slotSetCurrentPage(int nId) * 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; - QString sFilePath; + TQString sFilePath; // Store the file path for later pEditPage = (EditorPage*)pPage; diff --git a/src/editortabs.h b/src/editortabs.h index 67d0c17..76fb4b2 100644 --- a/src/editortabs.h +++ b/src/editortabs.h @@ -28,13 +28,13 @@ #ifndef EDITORTABS_H #define EDITORTABS_H -#include <qwidget.h> -#include <qpopupmenu.h> +#include <ntqwidget.h> +#include <ntqpopupmenu.h> #include "tabwidget.h" #include "editorpage.h" #include "projectmanager.h" -typedef QMap<QString, EditorPage*> EditorMap; +typedef TQMap<TQString, EditorPage*> EditorMap; class QueryView; /** @@ -49,12 +49,12 @@ class EditorTabs : public TabWidget Q_OBJECT public: - EditorTabs(QWidget* pParent = 0, const char* szName = 0); + EditorTabs(TQWidget* pParent = 0, const char* szName = 0); ~EditorTabs(); - void setWindowMenu(QPopupMenu*); + void setWindowMenu(TQPopupMenu*); void addEditorPage(EditorPage*); - EditorPage* findEditorPage(const QString&, bool bForceChange = false); + EditorPage* findEditorPage(const TQString&, bool bForceChange = false); EditorPage* getCurrentPage(); void removeCurrentPage(); bool removeAllPages(); @@ -65,7 +65,7 @@ public: void showBookmarks(QueryView*); public slots: - void slotRemovePage(QWidget*); + void slotRemovePage(TQWidget*); void slotToggleTagList(); void slotSaveAll(); void slotGoLeft(); @@ -89,11 +89,11 @@ signals: * Indicates that files were dragged and dropped over the tab widget. * @param pEvent The drop event information */ - void filesDropped(QDropEvent* pEvent); + void filesDropped(TQDropEvent* pEvent); protected: - virtual void dragMoveEvent(QDragMoveEvent*); - virtual void dropEvent(QDropEvent*); + virtual void dragMoveEvent(TQDragMoveEvent*); + virtual void dropEvent(TQDropEvent*); private: /** Links a file name with an editor page that has this file open. */ @@ -104,7 +104,7 @@ private: EditorPage* m_pCurPage; /** 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 items). */ @@ -114,14 +114,14 @@ private: int m_nNewFiles; int getModifiedFilesCount(); - bool removePage(QWidget*, bool); + bool removePage(TQWidget*, bool); private slots: - void slotCurrentChanged(QWidget*); - void slotAttachFile(EditorPage*, const QString&); + void slotCurrentChanged(TQWidget*); + void slotAttachFile(EditorPage*, const TQString&); void slotNewFile(EditorPage*); void slotFileModified(EditorPage*, bool); - void slotInitiateDrag(QWidget*); + void slotInitiateDrag(TQWidget*); void slotFillWindowMenu(); void slotSetCurrentPage(int); }; diff --git a/src/encoder.cpp b/src/encoder.cpp index 5d04744..a400a47 100644 --- a/src/encoder.cpp +++ b/src/encoder.cpp @@ -25,7 +25,7 @@ * ***************************************************************************/ -#include "qstring.h" +#include "ntqstring.h" #include "encoder.h" #define CHAR_TO_HEX(c) ((c) < 0xA ? '0' + (c) : ('A' - 0xA) + (c)) @@ -51,7 +51,7 @@ Encoder::~Encoder() { * @param str The string to encode * @return The hex-encoded ASCII string */ -const char* Encoder::encode(const QString& str) +const char* Encoder::encode(const TQString& str) { const char* szStr; int nLen, i, j; @@ -77,7 +77,7 @@ const char* Encoder::encode(const QString& str) * @param str The string to decode * @return The decoded string. */ -const char* Encoder::decode(const QString& str) +const char* Encoder::decode(const TQString& str) { const char* szStr; int nLen, i, j; diff --git a/src/encoder.h b/src/encoder.h index 2e35cde..2244b76 100644 --- a/src/encoder.h +++ b/src/encoder.h @@ -37,8 +37,8 @@ class Encoder public: Encoder(); ~Encoder(); - const char* encode(const QString&); - const char* decode(const QString&); + const char* encode(const TQString&); + const char* decode(const TQString&); private: /** A buffer to contain the result of encoding/decoding. */ diff --git a/src/filelist.cpp b/src/filelist.cpp index 59492ce..e9fdb9a 100644 --- a/src/filelist.cpp +++ b/src/filelist.cpp @@ -25,8 +25,8 @@ * ***************************************************************************/ -#include <qlineedit.h> -#include <qfileinfo.h> +#include <ntqlineedit.h> +#include <ntqfileinfo.h> #include <klocale.h> #include "filelist.h" #include "kscope.h" @@ -37,7 +37,7 @@ * @param pParent The parent widget * @param szName The widget's name */ -FileList::FileList(QWidget* pParent, const char* szName) : +FileList::FileList(TQWidget* pParent, const char* szName) : SearchList(1, pParent, szName), m_sRoot("/") { @@ -74,9 +74,9 @@ FileList::~FileList() * path, and is added to the list. * @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; // Extract the file name @@ -95,7 +95,7 @@ void FileList::addItem(const QString& sFilePath) sPath.replace(m_sRoot, "$"); // 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 * @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 != "/") 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. * @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) sPath = pItem->text(2); @@ -158,10 +158,10 @@ void FileList::applyPrefs() * is replaced with a $ sign. * @param sRoot The new root path */ -void FileList::setRoot(const QString& sRoot) +void FileList::setRoot(const TQString& sRoot) { - QListViewItem* pItem; - QString sPath; + TQListViewItem* pItem; + TQString sPath; // Update all items in the list 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) * @return Always true */ -bool FileList::getTip(QListViewItem* pItem, QString& sTip) +bool FileList::getTip(TQListViewItem* pItem, TQString& sTip) { sTip = pItem->text(2); return true; diff --git a/src/filelist.h b/src/filelist.h index 8585dc6..59bad1d 100644 --- a/src/filelist.h +++ b/src/filelist.h @@ -28,7 +28,7 @@ #ifndef FILELIST_H #define FILELIST_H -#include <qwidget.h> +#include <ntqwidget.h> #include "searchlist.h" #include "projectmanager.h" @@ -45,15 +45,15 @@ class FileList : public SearchList, public FileListTarget Q_OBJECT public: - FileList(QWidget* pParent = 0, const char* szName = 0); + FileList(TQWidget* pParent = 0, const char* szName = 0); ~FileList(); - virtual void addItem(const QString&); - bool findFile(const QString&); + virtual void addItem(const TQString&); + bool findFile(const TQString&); void clear(); void applyPrefs(); - void setRoot(const QString&); - virtual bool getTip(QListViewItem*, QString&); + void setRoot(const TQString&); + virtual bool getTip(TQListViewItem*, TQString&); signals: /** @@ -62,14 +62,14 @@ signals: * @param sPath The full path of the selected file * @param nLine Line number, always set to 0 */ - void fileRequested(const QString& sPath, uint nLine); + void fileRequested(const TQString& sPath, uint nLine); protected: - virtual void processItemSelected(QListViewItem*); + virtual void processItemSelected(TQListViewItem*); private: /** A common root path for all items in the list. */ - QString m_sRoot; + TQString m_sRoot; }; #endif diff --git a/src/fileview.cpp b/src/fileview.cpp index 029c20a..d611e59 100644 --- a/src/fileview.cpp +++ b/src/fileview.cpp @@ -25,9 +25,9 @@ * ***************************************************************************/ -#include <qpushbutton.h> -#include <qfileinfo.h> -#include <qtabwidget.h> +#include <ntqpushbutton.h> +#include <ntqfileinfo.h> +#include <ntqtabwidget.h> #include <kfiledialog.h> #include "fileview.h" #include "filelist.h" @@ -39,12 +39,12 @@ * @param szName The widget's name * @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), m_pCurBranch(0), m_sRoot("") { - QWidget* pPage; + TQWidget* pPage; // Set the tab widget icons 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 // the list or the tree - connect(m_pFileList, SIGNAL(fileRequested(const QString&, uint)), this, - SIGNAL(fileRequested(const QString&, uint))); - connect(m_pFileTree, SIGNAL(doubleClicked(QListViewItem*)), - this, SLOT(slotTreeItemSelected(QListViewItem*))); - connect(m_pFileTree, SIGNAL(returnPressed(QListViewItem*)), this, - SLOT(slotTreeItemSelected(QListViewItem*))); + connect(m_pFileList, SIGNAL(fileRequested(const TQString&, uint)), this, + SIGNAL(fileRequested(const TQString&, uint))); + connect(m_pFileTree, SIGNAL(doubleClicked(TQListViewItem*)), + this, SLOT(slotTreeItemSelected(TQListViewItem*))); + connect(m_pFileTree, SIGNAL(returnPressed(TQListViewItem*)), this, + SLOT(slotTreeItemSelected(TQListViewItem*))); } /** @@ -76,7 +76,7 @@ FileView::~FileView() * Sets a new common root path to both the file list and the tree. * @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 if (sRoot == m_sRoot) @@ -96,7 +96,7 @@ void FileView::setRoot(const QString& sRoot) return; // 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->setChildRecurse(false); m_pFileTree->setOpen(m_pCurBranch->root(), true); @@ -119,7 +119,7 @@ void FileView::clear() * of the KFileTreeView object. * @param pItem The selected tree item */ -void FileView::slotTreeItemSelected(QListViewItem* pItem) +void FileView::slotTreeItemSelected(TQListViewItem* pItem) { KFileTreeViewItem* pTreeItem; diff --git a/src/fileview.h b/src/fileview.h index 5fc1fe3..ca78783 100644 --- a/src/fileview.h +++ b/src/fileview.h @@ -45,7 +45,7 @@ class FileView : public FileViewLayout Q_OBJECT public: - FileView(QWidget* pParent = 0, const char* szName = 0, WFlags fl = 0); + FileView(TQWidget* pParent = 0, const char* szName = 0, WFlags fl = 0); ~FileView(); /** @@ -53,7 +53,7 @@ public: */ FileList* getFileList() { return m_pFileList; } - void setRoot(const QString&); + void setRoot(const TQString&); void clear(); signals: @@ -63,17 +63,17 @@ signals: * @param sPath The full path of the selected file * @param nLine Line number, always set to 0 */ - void fileRequested(const QString& sPath, uint nLine); + void fileRequested(const TQString& sPath, uint nLine); private: /** The current branch in the file tree. */ KFileTreeBranch* m_pCurBranch; /** The current root of the file tree. */ - QString m_sRoot; + TQString m_sRoot; private slots: - void slotTreeItemSelected(QListViewItem*); + void slotTreeItemSelected(TQListViewItem*); }; #endif diff --git a/src/fileviewlayout.ui b/src/fileviewlayout.ui index 24bb1f5..7e49bd1 100644 --- a/src/fileviewlayout.ui +++ b/src/fileviewlayout.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>FileViewLayout</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>FileViewLayout</cstring> </property> @@ -25,14 +25,14 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QTabWidget"> + <widget class="TQTabWidget"> <property name="name"> <cstring>m_pTabWidget</cstring> </property> <property name="toolTip" stdset="0"> <string></string> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -59,7 +59,7 @@ </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> diff --git a/src/frontend.cpp b/src/frontend.cpp index fee1c1b..cd01b3b 100644 --- a/src/frontend.cpp +++ b/src/frontend.cpp @@ -25,8 +25,8 @@ * ***************************************************************************/ -#include <qfileinfo.h> -#include <qdir.h> +#include <ntqfileinfo.h> +#include <ntqdir.h> #include <klocale.h> #include "frontend.h" @@ -76,8 +76,8 @@ Frontend::~Frontend() * @param bBlock (Optional) true to block, false otherwise * @return true if the process was executed successfully, false otherwise */ -bool Frontend::run(const QString& sName, const QStringList& slArgs, - const QString& sWorkDir, bool bBlock) +bool Frontend::run(const TQString& sName, const TQStringList& slArgs, + const TQString& sWorkDir, bool bBlock) { // Cannot start if another controlled process is currently running if (isRunning()) { @@ -182,7 +182,7 @@ void Frontend::removeRecord() * @return true if a token was extracted up to the given delimter(s), false * 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) { int nSize; @@ -236,10 +236,10 @@ bool Frontend::tokenize(char** ppBuf, int* pBufSize, QString& sResult, *pBufSize = nSize; } else if (m_bInToken) { - sResult = QString::fromLatin1(*ppBuf, *pBufSize); + sResult = TQString::fromLatin1(*ppBuf, *pBufSize); } else { - sResult = QString::null; + sResult = TQString::null; } 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. * @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); } @@ -282,7 +282,7 @@ void Frontend::slotProcessExit(KProcess*) void Frontend::slotReadStdout(KProcess*, char* pBuffer, int nSize) { char* pLocalBuf; - QString sToken; + TQString sToken; bool bTokenEnded; ParserDelim delim; @@ -352,7 +352,7 @@ void Frontend::slotReadStdout(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 if (m_bKilled) diff --git a/src/frontend.h b/src/frontend.h index 246128a..801f49c 100644 --- a/src/frontend.h +++ b/src/frontend.h @@ -28,7 +28,7 @@ #ifndef FRONTEND_H #define FRONTEND_H -#include <qobject.h> +#include <ntqobject.h> #include <kprocess.h> @@ -48,7 +48,7 @@ public: /** * @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. @@ -57,7 +57,7 @@ public: protected: /** Free text associated with the token. */ - QString m_sData; + TQString m_sData; /** A pointer to the next token in the stream. */ FrontendToken* m_pNext; @@ -81,14 +81,14 @@ public: Frontend(uint, bool bAutoDelete = false); ~Frontend(); - virtual bool run(const QString&, const QStringList&, - const QString& sWorkDir = "", bool bBlock = false); + virtual bool run(const TQString&, const TQStringList&, + const TQString& sWorkDir = "", bool bBlock = false); void kill(); /** * @return An string describing the error which made run() fail */ - const QString& getRunError() { return m_sError; } + const TQString& getRunError() { return m_sError; } signals: /** @@ -122,7 +122,7 @@ signals: /** * Emitted when an error message is produced by the back-end process. */ - void error(const QString& sMsg); + void error(const TQString& sMsg); protected: /** A set of possible delimiters for parsing process output. */ @@ -154,7 +154,7 @@ protected: ParserDelim m_delim; /** 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 @@ -168,9 +168,9 @@ protected: * @result A ParseResult value, indicating what should be done with the * 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. @@ -202,7 +202,7 @@ private: void addToken(FrontendToken*); void removeToken(); void removeRecord(); - bool tokenize(char**, int*, QString&, ParserDelim&); + bool tokenize(char**, int*, TQString&, ParserDelim&); private slots: void slotReadStdout(KProcess*, char*, int); diff --git a/src/graphedge.cpp b/src/graphedge.cpp index 283a5fe..33ac306 100644 --- a/src/graphedge.cpp +++ b/src/graphedge.cpp @@ -27,7 +27,7 @@ #include <math.h> #include <stdlib.h> -#include <qpainter.h> +#include <ntqpainter.h> #include "graphedge.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. * @author Elad Lahav */ -class ConvexHull : public QPointArray +class ConvexHull : public TQPointArray { public: /** * Class constructor. */ - ConvexHull() : QPointArray() {} + ConvexHull() : TQPointArray() {} /** * Computes the convex hull of the points stored in the array, using * Graham's scan. * @param arrHull Holds the coordinates of the convex hull, upon return */ - void compute(QPointArray& arrHull) { + void compute(TQPointArray& arrHull) { uint i, nPivot, nTop; // Find the pivot point @@ -82,7 +82,7 @@ public: s_ptPivot = (*this)[nPivot]; (*this)[nPivot] = (*this)[0]; (*this)[0] = s_ptPivot; - qsort(&(*this).data()[1], (*this).size() - 1, sizeof(QPoint), + qsort(&(*this).data()[1], (*this).size() - 1, sizeof(TQPoint), (CompFunc)compRadial); // Initialise Graham's scan algorithm @@ -112,7 +112,7 @@ public: private: /** 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 @@ -122,7 +122,7 @@ private: * @param pPt2 A pointer to the second point * @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; // 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. @@ -143,8 +143,8 @@ QPoint ConvexHull::s_ptPivot; * @param pHead The edge's starting point * @param pTail The edge's end point */ -GraphEdge::GraphEdge(QCanvas* pCanvas, GraphNode* pHead, GraphNode* pTail) : - QCanvasPolygonalItem(pCanvas), +GraphEdge::GraphEdge(TQCanvas* pCanvas, GraphNode* pHead, GraphNode* pTail) : + TQCanvasPolygonalItem(pCanvas), m_pHead(pHead), m_pTail(pTail), m_arrPoly(4) @@ -156,8 +156,8 @@ GraphEdge::GraphEdge(QCanvas* pCanvas, GraphNode* pHead, GraphNode* pTail) : */ GraphEdge::~GraphEdge() { - // Classes derived from QCanvasPolygonalItem must call hide() in their - // detructor (according to the Qt documentation) + // Classes derived from TQCanvasPolygonalItem must call hide() in their + // detructor (according to the TQt documentation) hide(); } @@ -165,14 +165,14 @@ GraphEdge::~GraphEdge() * Calculates the area surrounding the edge, and the bounding rectangle of * the edge's polygonal head. * 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 * array to that of the splines. Is this always the case, or should we sort * the points of the polygon in radial order? * @param arrCurve The control points of the edge's spline * @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; uint i; @@ -195,7 +195,7 @@ void GraphEdge::setPoints(const QPointArray& arrCurve, const ArrowInfo& ai) ch.compute(m_arrArea); // 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++) { nXpos = m_arrPoly[i].x(); 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 sText The call's text */ -void GraphEdge::setCallInfo(const QString& sFile, const QString& sLine, - const QString& sText) +void GraphEdge::setCallInfo(const TQString& sFile, const TQString& sLine, + const TQString& sText) { m_sFile = sFile; m_sLine = sLine; @@ -229,9 +229,9 @@ void GraphEdge::setCallInfo(const QString& sFile, const QString& sLine, * Constructs a tool-tip string for this edge. * @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; return sTip; @@ -241,7 +241,7 @@ QString GraphEdge::getTip() const * Draws the spline as a sequence of cubic Bezier curves. * @param painter Used for drawing the item on the canvas view */ -void GraphEdge::drawShape(QPainter& painter) +void GraphEdge::drawShape(TQPainter& painter) { uint i; @@ -254,10 +254,10 @@ void GraphEdge::drawShape(QPainter& painter) #if 0 // Draws the convex hull of the edge - QPen pen = painter.pen(); - QBrush br = painter.brush(); - painter.setPen(QPen(QColor(255, 0, 0))); - painter.setBrush(QBrush()); + TQPen pen = painter.pen(); + TQBrush br = painter.brush(); + painter.setPen(TQPen(TQColor(255, 0, 0))); + painter.setBrush(TQBrush()); painter.drawPolygon(m_arrArea); painter.setPen(pen); painter.setBrush(br); @@ -270,7 +270,7 @@ void GraphEdge::drawShape(QPainter& painter) */ void GraphEdge::makeArrowhead(const ArrowInfo& ai) { - QPoint ptLast, ptPrev; + TQPoint ptLast, ptPrev; double dX1, dY1, dX0, dY0, dX, dY, dDeltaX, dDeltaY, dNormLen; // The arrowhead follows the line from the second last to the last points diff --git a/src/graphedge.h b/src/graphedge.h index ce399b3..7b5fc4e 100644 --- a/src/graphedge.h +++ b/src/graphedge.h @@ -28,7 +28,7 @@ #ifndef GRAPHEDGE_H #define GRAPHEDGE_H -#include <qcanvas.h> +#include <ntqcanvas.h> class GraphNode; @@ -53,20 +53,20 @@ struct ArrowInfo * is its head. * @author Elad Lahav */ -class GraphEdge : public QCanvasPolygonalItem +class GraphEdge : public TQCanvasPolygonalItem { public: - GraphEdge(QCanvas*, GraphNode*, GraphNode*); + GraphEdge(TQCanvas*, GraphNode*, GraphNode*); ~GraphEdge(); - void setCallInfo(const QString&, const QString&, const QString&); - void setPoints(const QPointArray&, const ArrowInfo&); - QString getTip() const; + void setCallInfo(const TQString&, const TQString&, const TQString&); + void setPoints(const TQPointArray&, const ArrowInfo&); + TQString getTip() const; /** * @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 @@ -81,12 +81,12 @@ public: /** * @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 */ - const QString& getFile() const { return m_sFile; } + const TQString& getFile() const { return m_sFile; } /** * @return The line number for this call @@ -96,9 +96,9 @@ public: /** * @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; /** @@ -107,7 +107,7 @@ public: virtual int rtti() const { return RTTI; } protected: - virtual void drawShape(QPainter&); + virtual void drawShape(TQPainter&); private: /** The edge's starting point. */ @@ -117,25 +117,25 @@ private: GraphNode* m_pTail; /** The points of the polygon part of the edge. */ - QPointArray m_arrPoly; + TQPointArray m_arrPoly; /** 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 edge's tool-tip. */ - QRect m_rcTip; + TQRect m_rcTip; /** The call's source file. */ - QString m_sFile; + TQString m_sFile; /** The call's line number. */ - QString m_sLine; + TQString m_sLine; /** The call's text. */ - QString m_sText; + TQString m_sText; void makeArrowhead(const ArrowInfo&); }; diff --git a/src/graphnode.cpp b/src/graphnode.cpp index 28a219d..9f8fe9d 100644 --- a/src/graphnode.cpp +++ b/src/graphnode.cpp @@ -25,8 +25,8 @@ * ***************************************************************************/ -#include <qpainter.h> -#include <qfontmetrics.h> +#include <ntqpainter.h> +#include <ntqfontmetrics.h> #include "graphnode.h" int GraphNode::RTTI = 1001; @@ -37,8 +37,8 @@ int GraphNode::RTTI = 1001; * @param sFunc The node's function * @param bMultiCall Whether this node represents multiple calls */ -GraphNode::GraphNode(QCanvas* pCanvas, const QString& sFunc, bool bMultiCall) : - QCanvasPolygon(pCanvas), +GraphNode::GraphNode(TQCanvas* pCanvas, const TQString& sFunc, bool bMultiCall) : + TQCanvasPolygon(pCanvas), m_sFunc(sFunc), m_bMultiCall(bMultiCall), m_bDfsFlag(false) @@ -90,12 +90,12 @@ void GraphNode::dfs() m_bDfsFlag = true; // Continue along outgoing edges - QDictIterator<GraphEdge> itrOut(m_dictOutEdges); + TQDictIterator<GraphEdge> itrOut(m_dictOutEdges); for (; itrOut.current(); ++itrOut) (*itrOut)->getTail()->dfs(); // Continue along incoming edges - QDictIterator<GraphEdge> itrIn(m_dictInEdges); + TQDictIterator<GraphEdge> itrIn(m_dictInEdges); for (; itrIn.current(); ++itrIn) (*itrIn)->getHead()->dfs(); } @@ -116,7 +116,7 @@ void GraphNode::removeOutEdges() */ void GraphNode::removeInEdges() { - QDictIterator<GraphEdge> itr(m_dictInEdges); + TQDictIterator<GraphEdge> itr(m_dictInEdges); // Delete edges through their head nodes for (; itr.current(); ++itr) @@ -134,8 +134,8 @@ void GraphNode::removeInEdges() */ void GraphNode::getFirstNeighbour(GraphNode*& pNode, bool& bCalled) { - QDictIterator<GraphEdge> itrIn(m_dictInEdges); - QDictIterator<GraphEdge> itrOut(m_dictOutEdges); + TQDictIterator<GraphEdge> itrIn(m_dictInEdges); + TQDictIterator<GraphEdge> itrOut(m_dictOutEdges); if (itrIn.current()) { pNode = itrIn.current()->getHead(); @@ -154,9 +154,9 @@ void GraphNode::getFirstNeighbour(GraphNode*& pNode, bool& bCalled) * Modifies the bounding rectangle of the node. * @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; @@ -171,22 +171,22 @@ void GraphNode::setRect(const QRect& rect) * Draws the node. * @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 QFont& font = painter.font(); + const TQPen& pen = painter.pen(); + const TQFont& font = painter.font(); // Draw the rectangle - painter.setPen(QPen(Qt::black)); + painter.setPen(TQPen(TQt::black)); painter.drawRect(m_rect); // Draw the text painter.setPen(pen); painter.setFont(m_font); if (m_bMultiCall) - painter.drawText(m_rect, Qt::AlignCenter, "..."); + painter.drawText(m_rect, TQt::AlignCenter, "..."); else - painter.drawText(m_rect, Qt::AlignCenter, m_sFunc); + painter.drawText(m_rect, TQt::AlignCenter, m_sFunc); painter.setFont(font); } diff --git a/src/graphnode.h b/src/graphnode.h index 9f48639..a54b4ea 100644 --- a/src/graphnode.h +++ b/src/graphnode.h @@ -28,8 +28,8 @@ #ifndef GRAPHNODE_H #define GRAPHNODE_H -#include <qcanvas.h> -#include <qdict.h> +#include <ntqcanvas.h> +#include <ntqdict.h> #include "graphedge.h" /** @@ -37,10 +37,10 @@ * This item represents a function in the call graph. * @author Elad Lahav */ -class GraphNode : public QCanvasPolygon +class GraphNode : public TQCanvasPolygon { public: - GraphNode(QCanvas* pCanvas, const QString&, bool bMultiCall = false); + GraphNode(TQCanvas* pCanvas, const TQString&, bool bMultiCall = false); ~GraphNode(); GraphEdge* addOutEdge(GraphNode*); @@ -52,17 +52,17 @@ public: /** * @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 */ - void setFont(const QFont& font) { m_font = font; } + void setFont(const TQFont& font) { m_font = font; } /** * @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 @@ -72,7 +72,7 @@ public: /** * @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, @@ -85,7 +85,7 @@ public: */ void dfsReset() { m_bDfsFlag = false; } - /** Identifies this class among other QCanvasItem classes. */ + /** Identifies this class among other TQCanvasItem classes. */ static int RTTI; /** @@ -94,23 +94,23 @@ public: virtual int rtti() const { return RTTI; } protected: - virtual void drawShape(QPainter&); + virtual void drawShape(TQPainter&); private: /** Function name. */ - QString m_sFunc; + TQString m_sFunc; /** A list of outgoing edges indexed by destination. */ - QDict<GraphEdge> m_dictOutEdges; + TQDict<GraphEdge> m_dictOutEdges; /** A list of incoming edges indexed by destination. */ - QDict<GraphEdge> m_dictInEdges; + TQDict<GraphEdge> m_dictInEdges; /** The bounding rectangle for the node. */ - QRect m_rect; + TQRect m_rect; /** The font to use for drawing the text. */ - QFont m_font; + TQFont m_font; /** true for a multiple-call node, false otherwise. */ bool m_bMultiCall; diff --git a/src/graphprefdlg.cpp b/src/graphprefdlg.cpp index c8d381c..11b7914 100644 --- a/src/graphprefdlg.cpp +++ b/src/graphprefdlg.cpp @@ -25,7 +25,7 @@ * ***************************************************************************/ -#include <qspinbox.h> +#include <ntqspinbox.h> #include "graphprefdlg.h" #include "preferencesdlg.h" #include "kscopeconfig.h" @@ -35,7 +35,7 @@ * @param pParent The parent widget * @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) { m_pMaxDegSpin->setValue(Config().getGraphMaxNodeDegree()); diff --git a/src/graphprefdlg.h b/src/graphprefdlg.h index 7a4a3c0..7afa2bf 100644 --- a/src/graphprefdlg.h +++ b/src/graphprefdlg.h @@ -40,7 +40,7 @@ class GraphPrefDlg : public GraphPrefLayout Q_OBJECT public: - GraphPrefDlg(QWidget* pParent = 0, const char* szName = 0); + GraphPrefDlg(TQWidget* pParent = 0, const char* szName = 0); ~GraphPrefDlg(); int getMaxNodeDegree(); diff --git a/src/graphpreflayout.ui b/src/graphpreflayout.ui index a94a206..75304d2 100644 --- a/src/graphpreflayout.ui +++ b/src/graphpreflayout.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>GraphPrefLayout</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>GraphPrefLayout</cstring> </property> @@ -22,7 +22,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout6</cstring> </property> @@ -30,7 +30,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -55,14 +55,14 @@ </size> </property> </spacer> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>m_pMaxDegSpin</cstring> </property> </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout7</cstring> </property> @@ -70,7 +70,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -95,7 +95,7 @@ </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pColorButton</cstring> </property> @@ -105,7 +105,7 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout8</cstring> </property> @@ -113,7 +113,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -138,7 +138,7 @@ </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pFontButton</cstring> </property> @@ -162,7 +162,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout1</cstring> </property> @@ -193,7 +193,7 @@ </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonOk</cstring> </property> @@ -210,7 +210,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonCancel</cstring> </property> diff --git a/src/graphwidget.cpp b/src/graphwidget.cpp index 00ca733..2481f59 100644 --- a/src/graphwidget.cpp +++ b/src/graphwidget.cpp @@ -27,9 +27,9 @@ #include <math.h> #include <stdlib.h> -#include <qfile.h> -#include <qpainter.h> -#include <qtooltip.h> +#include <ntqfile.h> +#include <ntqpainter.h> +#include <ntqtooltip.h> #include <klocale.h> #include <kmessagebox.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. * @author Elad Lahav */ -class GraphTip : public QToolTip +class GraphTip : public TQToolTip { public: /** * Class constructor. * @param pWidget Owner graph widget */ - GraphTip(GraphWidget* pWidget) : QToolTip(pWidget->viewport()), + GraphTip(GraphWidget* pWidget) : TQToolTip(pWidget->viewport()), m_pGraphWidget(pWidget) {} /** @@ -73,13 +73,13 @@ protected: * the tool tip. * @param ptPos Current mouse position */ - virtual void maybeTip(const QPoint& ptPos) { - QString sText; - QRect rc; + virtual void maybeTip(const TQPoint& ptPos) { + TQString sText; + TQRect rc; // Display a tip, if required by the owner sText = m_pGraphWidget->getTip(ptPos, rc); - if (sText != QString::null) + if (sText != TQString::null) tip(rc, sText); } @@ -90,10 +90,10 @@ private: /** * 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 */ -class MenuLabel : public QLabel +class MenuLabel : public TQLabel { public: /** @@ -101,8 +101,8 @@ public: * @param sText The text to display * @param pParent The parent widget */ - MenuLabel(const QString& sText, QWidget* pParent) : - QLabel(sText, pParent) { + MenuLabel(const TQString& sText, TQWidget* pParent) : + TQLabel(sText, pParent) { // Set the appropriate visual properties setFrameShape(MenuBarPanel); setAlignment(AlignHCenter | AlignVCenter); @@ -117,8 +117,8 @@ ArrowInfo GraphWidget::s_ai; * @param pParent The parent widget * @param szName The widget's name */ -GraphWidget::GraphWidget(QWidget* pParent, const char* szName) : - QCanvasView(pParent, szName), +GraphWidget::GraphWidget(TQWidget* pParent, const char* szName) : + TQCanvasView(pParent, szName), m_progress(this), m_dot(this), m_dZoom(1.0), @@ -130,7 +130,7 @@ GraphWidget::GraphWidget(QWidget* pParent, const char* szName) : m_dictNodes.setAutoDelete(true); // Create a canvas - setCanvas(new QCanvas(this)); + setCanvas(new TQCanvas(this)); canvas()->setBackgroundColor(Config().getColor(KScopeConfig::GraphBack)); // 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())); // 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)); @@ -183,7 +183,7 @@ GraphWidget::GraphWidget(QWidget* pParent, const char* szName) : m_pNodePopup->insertItem(i18n("Remove"), this, SLOT(slotRemoveNode())); // Create the multi-call node popup menu - m_pMultiCallPopup = new QPopupMenu(this); + m_pMultiCallPopup = new TQPopupMenu(this); m_pMultiCallPopup->insertItem(i18n("List..."), this, SLOT(slotMultiCallDetails())); m_pMultiCallPopup->insertSeparator(); @@ -191,7 +191,7 @@ GraphWidget::GraphWidget(QWidget* pParent, const char* szName) : SLOT(slotRemoveNode())); // Create the edge menu - m_pEdgePopup = new QPopupMenu(this); + m_pEdgePopup = new TQPopupMenu(this); m_pEdgePopup->insertItem(i18n("Open Call"), this, SLOT(slotOpenCall())); (void)new GraphTip(this); @@ -211,7 +211,7 @@ GraphWidget::~GraphWidget() * strongly connected to the root). * @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 addNode(sFunc); @@ -223,7 +223,7 @@ void GraphWidget::setRoot(const QString& sFunc) * @param sFunc The name of a function * @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; @@ -267,9 +267,9 @@ void GraphWidget::addCall(const CallData& data) * @param bCalled true if the multiple calls are called from that 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; GraphEdge* pEdge; @@ -301,7 +301,7 @@ void GraphWidget::addMultiCall(const QString& sFunc, bool bCalled) */ void GraphWidget::draw() { - QWMatrix mtx; + TQWMatrix mtx; char szTempFile[TMP_TMPL_SIZE]; int nFd; FILE* pFile; @@ -328,7 +328,7 @@ void GraphWidget::draw() // Write the graph contents to the temporary file { - QTextStream str(pFile, IO_WriteOnly); + TQTextStream str(pFile, IO_WriteOnly); write(str, "graph", "--", false); } @@ -359,7 +359,7 @@ void GraphWidget::draw() void GraphWidget::save(FILE* pFile) { // Write the graph using the dot language - QTextStream str(pFile, IO_WriteOnly); + TQTextStream str(pFile, IO_WriteOnly); write(str, "digraph", "->", true); } @@ -367,15 +367,15 @@ void GraphWidget::save(FILE* pFile) * Exports a graph to a dot file. * @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 if (!file.open(IO_WriteOnly)) return; - QTextStream str(&file); + TQTextStream str(&file); write(str, "digraph", "->", false); } @@ -385,7 +385,7 @@ void GraphWidget::save(const QString& sFile) */ void GraphWidget::zoom(bool bIn) { - QWMatrix mtx; + TQWMatrix mtx; // Set the new zoom factor if (bIn) @@ -414,7 +414,7 @@ void GraphWidget::setZoom(double dZoom) */ void GraphWidget::rotate() { - QString sDir; + TQString sDir; int i; // Get the current direction @@ -437,15 +437,15 @@ void GraphWidget::rotate() * NOTE: We currently return a tool tip for edges only * @param ptPos The position to query * @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; - QCanvasItemList il; - QCanvasItemList::Iterator itr; + TQPoint ptRealPos, ptTopLeft, ptBottomRight; + TQCanvasItemList il; + TQCanvasItemList::Iterator itr; GraphEdge* pEdge; - QString sText, sFile, sLine; + TQString sText, sFile, sLine; ptRealPos = viewportToContents(ptPos); ptRealPos /= m_dZoom; @@ -461,7 +461,7 @@ QString GraphWidget::getTip(const QPoint& ptPos, QRect& rc) // No tip if no edge was found if (pEdge == NULL) - return QString::null; + return TQString::null; // Set the rectangle for the tip (the tip is closed when the mouse leaves // this area) @@ -472,7 +472,7 @@ QString GraphWidget::getTip(const QPoint& ptPos, QRect& rc) ptBottomRight *= m_dZoom; ptTopLeft = contentsToViewport(ptTopLeft); ptBottomRight = contentsToViewport(ptBottomRight); - rc = QRect(ptTopLeft, ptBottomRight); + rc = TQRect(ptTopLeft, ptBottomRight); // Create a tip for this edge 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 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; @@ -504,7 +504,7 @@ void GraphWidget::drawNode(const QString& sFunc, const QRect& rect) // Set the visual aspects of the node pNode->setRect(rect); pNode->setZ(2.0); - pNode->setPen(QPen(Qt::black)); + pNode->setPen(TQPen(TQt::black)); pNode->setFont(Config().getFont(KScopeConfig::Graph)); 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 arrCurve Control points for the edge's spline */ -void GraphWidget::drawEdge(const QString& sCaller, const QString& sCallee, - const QPointArray& arrCurve) +void GraphWidget::drawEdge(const TQString& sCaller, const TQString& sCallee, + const TQPointArray& arrCurve) { GraphNode* pCaller, * pCallee; GraphEdge* pEdge; @@ -537,8 +537,8 @@ void GraphWidget::drawEdge(const QString& sCaller, const QString& sCallee, // Set the visual aspects of the edge pEdge->setPoints(arrCurve, s_ai); pEdge->setZ(1.0); - pEdge->setPen(QPen(Qt::black)); - pEdge->setBrush(QBrush(Qt::black)); + pEdge->setPen(TQPen(TQt::black)); + pEdge->setBrush(TQBrush(TQt::black)); // Draw the edge pEdge->show(); @@ -567,7 +567,7 @@ void GraphWidget::setArrowInfo(int nLength, int nDegrees) /** * 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 * this bug is fixed. * 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 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) { // 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 if (canvas() != NULL) { - QRect rect = canvas()->rect(); - pPainter->setBrush(QBrush()); // Null brush + TQRect rect = canvas()->rect(); + pPainter->setBrush(TQBrush()); // Null brush pPainter->setPen(Config().getColor(KScopeConfig::GraphBack)); 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. * @param pEvent Includes information on the mouse press event */ -void GraphWidget::contentsMousePressEvent(QMouseEvent* pEvent) +void GraphWidget::contentsMousePressEvent(TQMouseEvent* pEvent) { - QPoint ptRealPos; - QCanvasItemList il; - QCanvasItemList::Iterator itr; - QString sFunc; + TQPoint ptRealPos; + TQCanvasItemList il; + TQCanvasItemList::Iterator itr; + TQString sFunc; GraphNode* pNode; GraphEdge* pEdge; @@ -609,8 +609,8 @@ void GraphWidget::contentsMousePressEvent(QMouseEvent* pEvent) pEdge = NULL; // Handle right-clicks only - if (pEvent->button() != Qt::RightButton) { - QCanvasView::contentsMousePressEvent(pEvent); + if (pEvent->button() != TQt::RightButton) { + TQCanvasView::contentsMousePressEvent(pEvent); return; } @@ -638,7 +638,7 @@ void GraphWidget::contentsMousePressEvent(QMouseEvent* pEvent) } else { // 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 bWriteCall true to write call information, false otherwise */ -void GraphWidget::write(QTextStream& str, const QString& sType, - const QString& sEdge, bool bWriteCall) +void GraphWidget::write(TQTextStream& str, const TQString& sType, + const TQString& sEdge, bool bWriteCall) { - QFont font; - QDictIterator<GraphNode> itr(m_dictNodes); + TQFont font; + TQDictIterator<GraphNode> itr(m_dictNodes); GraphEdge* pEdge; Encoder enc; @@ -678,7 +678,7 @@ void GraphWidget::write(QTextStream& str, const QString& sType, << "fontcolor=\"" << Config().getColor(KScopeConfig::GraphText).name() << "\", " << "fontname=\"" << font.family() << "\", " - << "fontsize=" << QString::number(font.pointSize()) + << "fontsize=" << TQString::number(font.pointSize()) << "];\n"; // Iterate over all nodes @@ -687,7 +687,7 @@ void GraphWidget::write(QTextStream& str, const QString& sType, str << "\t" << itr.current()->getFunc() << ";\n"; // Iterate over all edges leaving this node - QDictIterator<GraphEdge> itrEdge(itr.current()->getOutEdges()); + TQDictIterator<GraphEdge> itrEdge(itr.current()->getOutEdges()); for (; itrEdge.current(); ++itrEdge) { pEdge = itrEdge.current(); str << "\t" << pEdge->getHead()->getFunc() << sEdge @@ -737,7 +737,7 @@ void GraphWidget::removeEdges(GraphNode* pNode, bool bOut) */ void GraphWidget::removeDisconnected(GraphNode* pNode) { - QDictIterator<GraphNode> itr(m_dictNodes); + TQDictIterator<GraphNode> itr(m_dictNodes); // Find all weakly connected components attached to this node pNode->dfs(); @@ -760,7 +760,7 @@ void GraphWidget::removeDisconnected(GraphNode* pNode) * @param pNode The node for which to show 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 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 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 m_pMenuItem = pEdge; @@ -796,7 +796,7 @@ void GraphWidget::slotDotFinished() { // Delete the temporary file if (m_sDrawFilePath != "") { - QFile::remove(m_sDrawFilePath); + TQFile::remove(m_sDrawFilePath); m_sDrawFilePath = ""; } @@ -820,7 +820,7 @@ void GraphWidget::slotDotFinished() void GraphWidget::slotDataReady(FrontendToken* pToken) { CallData data; - QString sFunc; + TQString sFunc; // Get the file name data.m_sFile = pToken->getData(); @@ -932,11 +932,11 @@ void GraphWidget::slotListCalled() if (pNode == NULL) return; - QueryViewDlg dlg(0, (QWidget*)parent()); + QueryViewDlg dlg(0, (TQWidget*)parent()); // Show the query view dialogue dlg.query(CscopeFrontend::Called, pNode->getFunc()); - if (dlg.exec() != QDialog::Accepted) + if (dlg.exec() != TQDialog::Accepted) return; // The OK button was clicked, replace current calls with the listed ones @@ -1018,11 +1018,11 @@ void GraphWidget::slotListCalling() if (pNode == NULL) return; - QueryViewDlg dlg(0, (QWidget*)parent()); + QueryViewDlg dlg(0, (TQWidget*)parent()); // Show the query view dialogue dlg.query(CscopeFrontend::Calling, pNode->getFunc()); - if (dlg.exec() != QDialog::Accepted) + if (dlg.exec() != TQDialog::Accepted) return; // 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); // Display a line when it is selected in the dialogue - connect(pDlg, SIGNAL(lineRequested(const QString&, uint)), this, - SIGNAL(lineRequested(const QString&, uint))); + connect(pDlg, SIGNAL(lineRequested(const TQString&, uint)), this, + SIGNAL(lineRequested(const TQString&, uint))); // Start the query pDlg->query(CscopeFrontend::Definition, pNode->getFunc()); @@ -1136,7 +1136,7 @@ void GraphWidget::slotMultiCallDetails() if (!pParent) return; - QueryViewDlg dlg(0, (QWidget*)parent()); + QueryViewDlg dlg(0, (TQWidget*)parent()); dlg.query(bCalled ? CscopeFrontend::Calling : CscopeFrontend::Called, pParent->getFunc()); @@ -1151,7 +1151,7 @@ void GraphWidget::slotMultiCallDetails() void GraphWidget::slotOpenCall() { GraphEdge* pEdge; - QString sFile, sLine; + TQString sFile, sLine; // Make sure the menu item is an edge pEdge = dynamic_cast<GraphEdge*>(m_pMenuItem); diff --git a/src/graphwidget.h b/src/graphwidget.h index 119ddbb..55224c6 100644 --- a/src/graphwidget.h +++ b/src/graphwidget.h @@ -28,9 +28,9 @@ #ifndef GRAPHWIDGET_H #define GRAPHWIDGET_H -#include <qcanvas.h> -#include <qpopupmenu.h> -#include <qdict.h> +#include <ntqcanvas.h> +#include <ntqpopupmenu.h> +#include <ntqdict.h> #include "cscopefrontend.h" #include "graphnode.h" #include "dotfrontend.h" @@ -39,7 +39,7 @@ class ProgressDlg; /** * 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 * polygon, and ArrowEdge, which is a directed graph edge shaped like an * arrow. @@ -58,12 +58,12 @@ class ProgressDlg; * any of these widgets. * @author Elad Lahav */ -class GraphWidget : public QCanvasView +class GraphWidget : public TQCanvasView { Q_OBJECT public: - GraphWidget(QWidget* pParent = 0, const char* szName = 0); + GraphWidget(TQWidget* pParent = 0, const char* szName = 0); ~GraphWidget(); /** @@ -74,39 +74,39 @@ public: struct CallData { /** The name of the calling function. */ - QString m_sCaller; + TQString m_sCaller; /** The name of the called function. */ - QString m_sCallee; + TQString m_sCallee; /** Path of the file in which the call appears. */ - QString m_sFile; + TQString m_sFile; /** The line number of the call. */ - QString m_sLine; + TQString m_sLine; /** The call's text. */ - QString m_sText; + TQString m_sText; }; /** Graph orientation values. */ enum Orientation { Portrait, Landscape }; - void setRoot(const QString&); - GraphNode* addNode(const QString&, bool bMultiCall = false); + void setRoot(const TQString&); + GraphNode* addNode(const TQString&, bool bMultiCall = false); void addCall(const CallData&); - void addMultiCall(const QString&, bool); + void addMultiCall(const TQString&, bool); void draw(); void save(FILE*); - void save(const QString&); + void save(const TQString&); void zoom(bool); void setZoom(double); void rotate(); - QString getTip(const QPoint&, QRect&); + TQString getTip(const TQPoint&, TQRect&); void resize(int, int); - void drawNode(const QString&, const QRect&); - void drawEdge(const QString&, const QString&, const QPointArray&); + void drawNode(const TQString&, const TQRect&); + void drawEdge(const TQString&, const TQString&, const TQPointArray&); /** * 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 nLine The line number in this file */ - void lineRequested(const QString& sPath, uint nLine); + void lineRequested(const TQString& sPath, uint nLine); protected: - virtual void drawContents(QPainter*, int, int, int, int); - virtual void contentsMousePressEvent(QMouseEvent*); + virtual void drawContents(TQPainter*, int, int, int, int); + virtual void contentsMousePressEvent(TQMouseEvent*); private: /** The graph is stored as a map of nodes indexed by their names. Each node holds a list of outgoing edges. */ - QDict<GraphNode> m_dictNodes; + TQDict<GraphNode> m_dictNodes; /** A Cscope process to use for running queries. */ CscopeFrontend* m_pCscope; @@ -149,23 +149,23 @@ private: /** Remembers the function the was last queried for calling/called functions. */ - QString m_sQueriedFunc; + TQString m_sQueriedFunc; /** Remembers whether the last query was for calling or called functions. */ bool m_bCalled; /** 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. */ - QPopupMenu* m_pNodePopup; + TQPopupMenu* m_pNodePopup; /** 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. */ - QPopupMenu* m_pEdgePopup; + TQPopupMenu* m_pEdgePopup; /** The zoom factor for the graph. */ double m_dZoom; @@ -181,16 +181,16 @@ private: uint m_nMultiCallNum; /** 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. */ ProgressDlg* m_pProgressDlg; - void write(QTextStream&, const QString&, const QString&, bool); + void write(TQTextStream&, const TQString&, const TQString&, bool); void removeEdges(GraphNode*, bool); void removeDisconnected(GraphNode*); - void showNodeMenu(GraphNode*, const QPoint&); - void showEdgeMenu(GraphEdge*, const QPoint&); + void showNodeMenu(GraphNode*, const TQPoint&); + void showEdgeMenu(GraphEdge*, const TQPoint&); private slots: void slotDotFinished(); diff --git a/src/historypage.cpp b/src/historypage.cpp index eabd6b6..5095d1c 100644 --- a/src/historypage.cpp +++ b/src/historypage.cpp @@ -36,14 +36,14 @@ int HistoryPage::s_nMaxPageID = 0; * @param pParent The parent widget * @param szName The widget's name */ -HistoryPage::HistoryPage(QWidget* pParent, const char* szName) : +HistoryPage::HistoryPage(TQWidget* pParent, const char* szName) : QueryPageBase(pParent, szName), m_nPageID(++s_nMaxPageID) { m_pView = new HistoryView(this); - connect(m_pView, SIGNAL(lineRequested(const QString&, uint)), this, - SIGNAL(lineRequested(const QString&, uint))); + connect(m_pView, SIGNAL(lineRequested(const TQString&, uint)), this, + SIGNAL(lineRequested(const TQString&, uint))); // Set colours and font applyPrefs(); @@ -64,8 +64,8 @@ HistoryPage::~HistoryPage() * @param nLine The line number * @param sText The text of the file at the given line */ -void HistoryPage::addRecord(const QString& sFile, uint nLine, - const QString& sText) +void HistoryPage::addRecord(const TQString& sFile, uint nLine, + const TQString& sText) { 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 - 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 sText The contents of the line */ -void HistoryPage::addRecord(const QString&, const QString& sFile, - const QString& sLine, const QString& sText) +void HistoryPage::addRecord(const TQString&, const TQString& sFile, + const TQString& sLine, const TQString& sText) { 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. * @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 "))) + - QString::number(m_nPageID); + return (bBrief ? TQString(i18n("HIS ")) : TQString(i18n("History "))) + + TQString::number(m_nPageID); } /** * Creates a unique file name for saving the contents of the history page. * @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" diff --git a/src/historypage.h b/src/historypage.h index 9ff614f..552f2d6 100644 --- a/src/historypage.h +++ b/src/historypage.h @@ -39,27 +39,27 @@ class HistoryPage : public QueryPageBase Q_OBJECT public: - HistoryPage(QWidget* pParent = 0, const char* szName = 0); + HistoryPage(TQWidget* pParent = 0, const char* szName = 0); ~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: - virtual void addRecord(const QString&, const QString&, const QString&, - const QString&); - virtual QString getFileName(const QString&) const; + virtual void addRecord(const TQString&, const TQString&, const TQString&, + const TQString&); + virtual TQString getFileName(const TQString&) const; /** * @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. */ - virtual void writeHeader(QTextStream&) {} + virtual void writeHeader(TQTextStream&) {} private: /** A unique ID used to create a tab caption for this page. */ diff --git a/src/historyview.cpp b/src/historyview.cpp index 519c4dc..743fa6a 100644 --- a/src/historyview.cpp +++ b/src/historyview.cpp @@ -32,14 +32,14 @@ * @param pParent The parent widget * @param szName The widget's name */ -HistoryView::HistoryView(QWidget* pParent, const char* szName) : +HistoryView::HistoryView(TQWidget* pParent, const char* szName) : QueryView(pParent, szName) { // Disable sorting setSortColumn(-1); // Don't show the "Function" column - setColumnWidthMode(0, QListView::Manual); + setColumnWidthMode(0, TQListView::Manual); setColumnWidth(0, 0); } @@ -57,8 +57,8 @@ HistoryView::~HistoryView() * @param sLine The line number in the above file * @param sText The line's text */ -void HistoryView::addRecord(const QString& /* sFunc */, const QString& sFile, - const QString& sLine, const QString& sText, QListViewItem*) +void HistoryView::addRecord(const TQString& /* sFunc */, const TQString& sFile, + const TQString& sLine, const TQString& sText, TQListViewItem*) { HistoryItem* pItem; @@ -73,7 +73,7 @@ void HistoryView::addRecord(const QString& /* sFunc */, const QString& sFile, */ void HistoryView::selectPrev() { - QListViewItem* pItem; + TQListViewItem* pItem; // Get the current item pItem = currentItem(); @@ -110,7 +110,7 @@ void HistoryView::selectNext() * object. * @param pItem The item to remove */ -void HistoryView::slotRemoveItem(QListViewItem* pItem) +void HistoryView::slotRemoveItem(TQListViewItem* pItem) { HistoryItem* pCurItem, * pNextItem; diff --git a/src/historyview.h b/src/historyview.h index 38a0c46..ab34b37 100644 --- a/src/historyview.h +++ b/src/historyview.h @@ -32,14 +32,14 @@ /** * 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 * stores a pointer to the item just above it in the list. The pointer is * persistent, since the list cannot be sorted. * @author Elad Lahav */ -class HistoryItem : public QListViewItem +class HistoryItem : public TQListViewItem { public: /** @@ -49,9 +49,9 @@ public: * @param sLine The line number * @param sText The contents of the line in the given file */ - HistoryItem(QListView* pList, QString sFile, QString sLine, - QString sText) : - QListViewItem(pList, "", sFile, sLine, sText), + HistoryItem(TQListView* pList, TQString sFile, TQString sLine, + TQString sText) : + TQListViewItem(pList, "", sFile, sLine, sText), m_pPrevSibling(NULL) { HistoryItem* pNext; @@ -76,16 +76,16 @@ class HistoryView : public QueryView { Q_OBJECT public: - HistoryView(QWidget* pParent = 0, const char* szName = 0); + HistoryView(TQWidget* pParent = 0, const char* szName = 0); ~HistoryView(); - virtual void addRecord(const QString&, const QString&, const QString&, - const QString&, QListViewItem*); + virtual void addRecord(const TQString&, const TQString&, const TQString&, + const TQString&, TQListViewItem*); virtual void selectNext(); virtual void selectPrev(); protected slots: - virtual void slotRemoveItem(QListViewItem*); + virtual void slotRemoveItem(TQListViewItem*); }; #endif diff --git a/src/kscope.cpp b/src/kscope.cpp index 3e4c134..5e56233 100644 --- a/src/kscope.cpp +++ b/src/kscope.cpp @@ -25,7 +25,7 @@ * ***************************************************************************/ -#include <qfile.h> +#include <ntqfile.h> #include <kfiledialog.h> #include <kmenubar.h> #include <klocale.h> @@ -71,7 +71,7 @@ * @param pParent The parent widget * @param szName The widget's name */ -KScope::KScope(QWidget* pParent, const char* szName) : +KScope::KScope(TQWidget* pParent, const char* szName) : KParts::DockMainWindow(pParent, szName), m_pCscopeBuild(NULL), m_sCurFilePath(""), @@ -82,7 +82,7 @@ KScope::KScope(QWidget* pParent, const char* szName) : m_bRebuildDB(false), m_pMakeDlg(NULL) { - QString sPath; + TQString sPath; // Load configuration Config().load(); @@ -93,8 +93,8 @@ KScope::KScope(QWidget* pParent, const char* szName) : m_pFileView = new FileView(this); m_pFileList = m_pFileView->getFileList(); m_pMsgDlg = new CscopeMsgDlg(this); - m_pQueryDock = createDockWidget("Query Window", QPixmap()); - m_pFileViewDock = createDockWidget("File List Window", QPixmap()); + m_pQueryDock = createDockWidget("Query Window", TQPixmap()); + m_pFileViewDock = createDockWidget("File List Window", TQPixmap()); // Connect menu and toolbar items with the object's slots 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 // file tree - connect(m_pFileView, SIGNAL(fileRequested(const QString&, uint)), this, - SLOT(slotShowEditor(const QString&, uint))); + connect(m_pFileView, SIGNAL(fileRequested(const TQString&, uint)), this, + SLOT(slotShowEditor(const TQString&, uint))); // Delete an editor page object after it is removed connect(m_pEditTabs, SIGNAL(editorRemoved(EditorPage*)), this, SLOT(slotDeleteEditor(EditorPage*))); - connect(m_pEditTabs, SIGNAL(filesDropped(QDropEvent*)), this, - SLOT(slotDropEvent(QDropEvent*))); + connect(m_pEditTabs, SIGNAL(filesDropped(TQDropEvent*)), this, + SLOT(slotDropEvent(TQDropEvent*))); // Set an editor as the active part whenever its owner tab is selected connect(m_pEditTabs, SIGNAL(editorChanged(EditorPage*, EditorPage*)), this, SLOT(slotChangeEditor(EditorPage*, EditorPage*))); // Display a file at a specific line when selected in a query list - connect(m_pQueryWidget, SIGNAL(lineRequested(const QString&, uint)), - this, SLOT(slotQueryShowEditor(const QString&, uint))); + connect(m_pQueryWidget, SIGNAL(lineRequested(const TQString&, uint)), + this, SLOT(slotQueryShowEditor(const TQString&, uint))); // Display the symbol dialogue when the user opens a new query page connect(m_pQueryWidget, SIGNAL(newQuery()), @@ -148,8 +148,8 @@ KScope::KScope(QWidget* pParent, const char* szName) : connect(&m_timerRebuild, SIGNAL(timeout()), this, SLOT(slotRebuildDB())); // Display a file at a specific line when selected in a call tree dialogue - connect(m_pCallTreeMgr, SIGNAL(lineRequested(const QString&, uint)), - this, SLOT(slotQueryShowEditor(const QString&, uint))); + connect(m_pCallTreeMgr, SIGNAL(lineRequested(const TQString&, uint)), + this, SLOT(slotQueryShowEditor(const TQString&, uint))); // Store main window settings when closed setAutoSaveSettings(); @@ -203,14 +203,14 @@ void KScope::initMainWindow() { KStatusBar* pStatus; KDockWidget* pMainDock; - QPopupMenu* pPopup; + TQPopupMenu* pPopup; // Create the status bar pStatus = statusBar(); pStatus->insertItem(i18n(" Line: N/A Col: N/A "), 0, 0, true); // Create the main dock for the editor tabs widget - pMainDock = createDockWidget("Editors Window", QPixmap()); + pMainDock = createDockWidget("Editors Window", TQPixmap()); pMainDock->setWidget(m_pEditTabs); pMainDock->setDockSite(KDockWidget::DockCorner); setMainDockWidget(pMainDock); @@ -236,11 +236,11 @@ void KScope::initMainWindow() SLOT(slotFileViewDockClosed())); // 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); // 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()); // Restore dock configuration @@ -284,7 +284,7 @@ void KScope::slotCreateProject() { NewProjectDlg dlg(true, this); ProjectBase::Options opt; - QString sProjPath; + TQString sProjPath; // Prompt the user to close any active projects if (m_pProjMgr->curProject()) { @@ -301,7 +301,7 @@ void KScope::slotCreateProject() } // Display the "New Project" dialog - if (dlg.exec() != QDialog::Accepted) + if (dlg.exec() != TQDialog::Accepted) return; // Create and open the new project @@ -318,15 +318,15 @@ void KScope::slotCreateProject() void KScope::slotOpenProject() { OpenProjectDlg dlg; - QString sPath; + TQString sPath; - if (dlg.exec() == QDialog::Rejected) + if (dlg.exec() == TQDialog::Rejected) return; sPath = dlg.getPath(); // Check if the path refers to a permanent or temporary project - if (QFileInfo(sPath).isDir()) + if (TQFileInfo(sPath).isDir()) openProject(sPath); else openCscopeOut(sPath); @@ -355,7 +355,7 @@ void KScope::slotProjectFiles() // Display the files dialog ProjectFilesDlg dlg((Project*)pProj, this); - if (dlg.exec() != QDialog::Accepted) + if (dlg.exec() != TQDialog::Accepted) return; // Update the project's file list @@ -392,7 +392,7 @@ void KScope::slotProjectProps() dlg.setProperties(pProj->getName(), pProj->getPath(), opt); // Display the properties dialog - if (dlg.exec() != QDialog::Accepted) + if (dlg.exec() != TQDialog::Accepted) return; // Set new properties @@ -420,7 +420,7 @@ void KScope::slotProjectProps() */ void KScope::slotProjectCscopeOut() { - QString sFilePath; + TQString sFilePath; // Prompt for a Cscope.out file sFilePath = KFileDialog::getOpenFileName(); @@ -520,7 +520,7 @@ void KScope::slotQueryIncluding() */ void KScope::slotQueryQuickDef() { - QString sSymbol; + TQString sSymbol; QueryViewDlg* pDlg; uint nType; bool bCase; @@ -534,8 +534,8 @@ void KScope::slotQueryQuickDef() pDlg = new QueryViewDlg(QueryViewDlg::DestroyOnSelect, this); // Display a line when it is selected in the dialogue - connect(pDlg, SIGNAL(lineRequested(const QString&, uint)), this, - SLOT(slotShowEditor(const QString&, uint))); + connect(pDlg, SIGNAL(lineRequested(const TQString&, uint)), this, + SLOT(slotShowEditor(const TQString&, uint))); // Start the query pDlg->query(nType, sSymbol); @@ -596,7 +596,7 @@ void KScope::slotConfigure() connect(&dlg, SIGNAL(applyPref()), this, SLOT(slotApplyPref())); // Show the dialog - if (dlg.exec() == QDialog::Accepted) { + if (dlg.exec() == TQDialog::Accepted) { // Verify Cscope's installation verifyCscope(); } @@ -610,7 +610,7 @@ void KScope::slotConfigure() */ void KScope::slotProjectFilesChanged() { - QStringList slArgs; + TQStringList slArgs; // Refresh the file list m_pFileList->setUpdatesEnabled(false); @@ -630,9 +630,9 @@ void KScope::slotProjectFilesChanged() * file list, and the project's database is rebuilt. * @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 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) { - QString sSymbol; + TQString sSymbol; CallTreeDlg* pCallTreeDlg; bool bCase; @@ -680,13 +680,13 @@ void KScope::slotQuery(uint nType, bool bPrompt) * If another project is currently active, it is closed first. * @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; - QStringList slQueryFiles; - QStringList slCallTreeFiles; - QStringList slArgs; + TQStringList slQueryFiles; + TQStringList slCallTreeFiles; + TQStringList slArgs; ProjectBase::Options opt; // Close the current project (may return false if the user clicks on the @@ -695,7 +695,7 @@ void KScope::openProject(const QString& sDir) return; // Open the project in the project manager - sProjDir = QDir::cleanDirPath(sDir); + sProjDir = TQDir::cleanDirPath(sDir); if (!m_pProjMgr->open(sProjDir)) return; @@ -754,7 +754,7 @@ void KScope::openProject(const QString& sDir) * @param sFilePath The full path of the Cscope.out file * @return true if successful, false otherwise */ -bool KScope::openCscopeOut(const QString& sFilePath) +bool KScope::openCscopeOut(const TQString& sFilePath) { ProjectBase* pProj; @@ -798,8 +798,8 @@ bool KScope::openCscopeOut(const QString& sFilePath) */ void KScope::openLastProject() { - const QStringList slProjects = Config().getRecentProjects(); - QString sPath; + const TQStringList slProjects = Config().getRecentProjects(); + TQString sPath; if (slProjects.empty()) return; @@ -808,7 +808,7 @@ void KScope::openLastProject() sPath = *slProjects.begin(); // Check if the path refers to a temporary project - if (!QFileInfo(sPath).isDir()) { + if (!TQFileInfo(sPath).isDir()) { openCscopeOut(sPath); return; } @@ -846,7 +846,7 @@ void KScope::restoreSession() for (pLoc = sess.fllOpenFiles.first(); pLoc != NULL; pLoc = sess.fllOpenFiles.next()) { - if (QFile::exists(pLoc->m_sPath)) { + if (TQFile::exists(pLoc->m_sPath)) { pPage = addEditor(pLoc->m_sPath); pPage->setCursorPos(pLoc->m_nLine, pLoc->m_nCol); } @@ -901,8 +901,8 @@ void KScope::toggleQueryWindow(bool bShow) */ void KScope::parseCmdLine(KCmdLineArgs* pArgs) { - QString sArg; - QFileInfo fi; + TQString sArg; + TQFileInfo fi; int i; // Loop over all arguments @@ -981,8 +981,8 @@ void KScope::initCscope() SLOT(slotBuildAborted())); // Show errors in a modeless dialogue - connect(m_pCscopeBuild, SIGNAL(error(const QString&)), this, - SLOT(slotCscopeError(const QString&))); + connect(m_pCscopeBuild, SIGNAL(error(const TQString&)), this, + SLOT(slotCscopeError(const TQString&))); } /** @@ -1052,7 +1052,7 @@ bool KScope::slotCloseProject() m_pProjMgr->close(); delete m_pCscopeBuild; m_pCscopeBuild = NULL; - setCaption(QString::null); + setCaption(TQString::null); // Clear the contents of the file list m_pFileView->clear(); @@ -1072,13 +1072,13 @@ bool KScope::slotCloseProject() */ void KScope::slotExtEdit() { - QString sCmdLine; + TQString sCmdLine; KProcess proc; // Create the command line for the external editor sCmdLine = Config().getExtEditor(); sCmdLine.replace("%F", m_sCurFilePath); - sCmdLine.replace("%L", QString::number(m_nCurLine)); + sCmdLine.replace("%L", TQString::number(m_nCurLine)); // Run the external editor proc.setUseShell(true); @@ -1161,7 +1161,7 @@ void KScope::slotCscopeVerified(bool bResult, uint nArgs) */ void KScope::slotProjectMake() { - QString sCmd, sDir; + TQString sCmd, sDir; // Create the make dialogue, if it does not exist if (m_pMakeDlg == NULL) { @@ -1174,8 +1174,8 @@ void KScope::slotProjectMake() m_pMakeDlg->setDir(sDir); // Show the relevant source location when an error link is clicked - connect(m_pMakeDlg, SIGNAL(fileRequested(const QString&, uint)), this, - SLOT(slotShowEditor(const QString&, uint))); + connect(m_pMakeDlg, SIGNAL(fileRequested(const TQString&, uint)), this, + SLOT(slotShowEditor(const TQString&, uint))); // Show the dialogue m_pMakeDlg->show(); @@ -1212,14 +1212,14 @@ void KScope::slotProjectRemake() void KScope::slotShowBookmarks() { BookmarksDlg dlg; - QString sPath; + TQString sPath; uint nLine; // Load the bookmark list m_pEditTabs->showBookmarks(dlg.getView()); // Show the dialogue - if (dlg.exec() != QDialog::Accepted) + if (dlg.exec() != TQDialog::Accepted) return; // Go to the selected bookmark @@ -1239,11 +1239,11 @@ void KScope::slotShowBookmarks() * determined automatically * @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) { EditorPage* pPage; - QString sSuggested; + TQString sSuggested; // Set the currently selected text, if any 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 * @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; - QString sAbsFilePath; + TQString sAbsFilePath; ProjectBase* pProj; // 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 pProj = m_pProjMgr->curProject(); if (sFilePath[0] != '/' && pProj) { - sAbsFilePath = QDir::cleanDirPath(pProj->getSourceRoot() + "/" + + sAbsFilePath = TQDir::cleanDirPath(pProj->getSourceRoot() + "/" + sFilePath); } else { - sAbsFilePath = QDir::cleanDirPath(sFilePath); + sAbsFilePath = TQDir::cleanDirPath(sFilePath); } // Do not open a new editor if one exists for this file @@ -1312,7 +1312,7 @@ EditorPage* KScope::createEditorPage() { KTextEditor::Document* pDoc; EditorPage* pPage; - QPopupMenu* pMenu; + TQPopupMenu* pMenu; ProjectBase* pProj; // Load a new document part @@ -1321,26 +1321,26 @@ EditorPage* KScope::createEditorPage() return NULL; // Create the new editor page - pMenu = (QPopupMenu*)factory()->container(Config().getEditorPopupName(), + pMenu = (TQPopupMenu*)factory()->container(Config().getEditorPopupName(), this); pPage = new EditorPage(pDoc, pMenu, m_pEditTabs); m_pEditTabs->addEditorPage(pPage); // Show the file's path in the main title - connect(pPage, SIGNAL(fileOpened(EditorPage*, const QString&)), this, - SLOT(slotFileOpened(EditorPage*, const QString&))); + connect(pPage, SIGNAL(fileOpened(EditorPage*, const TQString&)), this, + SLOT(slotFileOpened(EditorPage*, const TQString&))); // Show cursor position in the status bar connect(pPage, SIGNAL(cursorPosChanged(uint, uint)), this, SLOT(slotShowCursorPos(uint, uint))); // Rebuild the database after a file has changed - connect(pPage, SIGNAL(fileSaved(const QString&, bool)), this, - SLOT(slotFileSaved(const QString&, bool))); + connect(pPage, SIGNAL(fileSaved(const TQString&, bool)), this, + SLOT(slotFileSaved(const TQString&, bool))); // Handle file drops - connect(pPage->getView(), SIGNAL(dropEventPass(QDropEvent*)), this, - SLOT(slotDropEvent(QDropEvent*))); + connect(pPage->getView(), SIGNAL(dropEventPass(TQDropEvent*)), this, + SLOT(slotDropEvent(TQDropEvent*))); // Apply per-project configuration 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 * 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; @@ -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 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 if (m_bHideQueryOnSelection) @@ -1496,13 +1496,13 @@ void KScope::slotNewFile() void KScope::slotOpenFile() { ProjectBase* pProj; - QStringList slFiles; - QStringList::Iterator itr; + TQStringList slFiles; + TQStringList::Iterator itr; // Prompt the user for the file(s) to open. pProj = m_pProjMgr->curProject(); slFiles = KFileDialog::getOpenFileNames(pProj ? pProj->getSourceRoot() : - QString::null); + TQString::null); // Open all selected files. for (itr = slFiles.begin(); itr != slFiles.end(); ++itr) { @@ -1537,7 +1537,7 @@ void KScope::slotCloseAllWindows() * Cscope process. * @param sMsg The error message */ -void KScope::slotCscopeError(const QString& sMsg) +void KScope::slotCscopeError(const TQString& sMsg) { m_pMsgDlg->addText(sMsg); } @@ -1553,7 +1553,7 @@ void KScope::slotCscopeError(const QString& sMsg) */ void KScope::slotBuildProgress(int nFiles, int nTotal) { - QString sMsg; + TQString sMsg; // Use the progress dialogue, if it exists (first time builds) if (m_pProgressDlg) { @@ -1563,7 +1563,7 @@ void KScope::slotBuildProgress(int nFiles, int nTotal) // Show progress information sMsg = i18n("Rebuilding the cross reference database...") + " " + - QString::number((nFiles * 100) / nTotal) + "%"; + TQString::number((nFiles * 100) / nTotal) + "%"; statusBar()->message(sMsg); } @@ -1654,10 +1654,10 @@ void KScope::slotApplyPref() void KScope::slotShowCursorPos(uint nLine, uint nCol) { KStatusBar* pStatus = statusBar(); - QString sText; + TQString sText; /* Show the line and column numbers. */ - QTextOStream(&sText) << " Line: " << nLine << " Col: " << nCol << " "; + TQTextOStream(&sText) << " Line: " << nLine << " Col: " << nCol << " "; pStatus->changeItem(sText, 0); /* Store the current line. */ @@ -1670,7 +1670,7 @@ void KScope::slotShowCursorPos(uint nLine, uint nCol) * EditorPage object. * @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; 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 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; int nTime; @@ -1741,7 +1741,7 @@ void KScope::slotFileSaved(const QString& sPath, bool bIsNew) * Opens all files dropped over the widget. * @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::Iterator itr; diff --git a/src/kscope.h b/src/kscope.h index f1b646e..8b8ee07 100644 --- a/src/kscope.h +++ b/src/kscope.h @@ -32,7 +32,7 @@ #include <config.h> #endif -#include <qtimer.h> +#include <ntqtimer.h> #include <kcmdlineargs.h> #include <kapp.h> #include <kparts/dockmainwindow.h> @@ -73,12 +73,12 @@ class KScope : public KParts::DockMainWindow Q_OBJECT public: - KScope(QWidget* pParent = 0, const char* szName = 0); + KScope(TQWidget* pParent = 0, const char* szName = 0); ~KScope(); - void openProject(const QString&); + void openProject(const TQString&); void openLastProject(); - bool openCscopeOut(const QString&); + bool openCscopeOut(const TQString&); void parseCmdLine(KCmdLineArgs *pArgs); void verifyCscope(); @@ -113,7 +113,7 @@ private: CscopeFrontend* m_pCscopeBuild; /** 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 item. */ @@ -129,7 +129,7 @@ private: CscopeMsgDlg* m_pMsgDlg; /** The path of the file currently being edited. */ - QString m_sCurFilePath; + TQString m_sCurFilePath; /** The line number of the current cursor position. */ int m_nCurLine; @@ -168,8 +168,8 @@ private: void initMainWindow(); void initCscope(); - bool getSymbol(uint&, QString&, bool&, bool bPrompt = true); - EditorPage* addEditor(const QString&s); + bool getSymbol(uint&, TQString&, bool&, bool bPrompt = true); + EditorPage* addEditor(const TQString&s); EditorPage* createEditorPage(); inline bool isAutoRebuildEnabled(); void restoreSession(); @@ -213,22 +213,22 @@ private slots: // Other slots void slotProjectFilesChanged(); - void slotFilesAdded(const QStringList&); + void slotFilesAdded(const TQStringList&); void slotQuery(uint, bool); void slotDeleteEditor(EditorPage*); void slotChangeEditor(EditorPage*, EditorPage*); - void slotShowEditor(const QString&, uint); - void slotFileOpened(EditorPage*, const QString&); - void slotFileSaved(const QString&, bool); - void slotCscopeError(const QString&); + void slotShowEditor(const TQString&, uint); + void slotFileOpened(EditorPage*, const TQString&); + void slotFileSaved(const TQString&, bool); + void slotCscopeError(const TQString&); void slotBuildProgress(int, int); void slotBuildInvIndex(); void slotBuildFinished(uint); void slotBuildAborted(); void slotApplyPref(); void slotShowCursorPos(uint, uint); - void slotQueryShowEditor(const QString&, uint); - void slotDropEvent(QDropEvent*); + void slotQueryShowEditor(const TQString&, uint); + void slotDropEvent(TQDropEvent*); void slotCscopeVerified(bool, uint); }; diff --git a/src/kscopeactions.cpp b/src/kscopeactions.cpp index d5c64fc..3caaedd 100644 --- a/src/kscopeactions.cpp +++ b/src/kscopeactions.cpp @@ -33,7 +33,7 @@ #include "editortabs.h" #include "querywidget.h" -KScopeActions::KScopeActions(KScope* pWindow) : QObject(), +KScopeActions::KScopeActions(KScope* pWindow) : TQObject(), m_pWindow(pWindow), m_pCollection(pWindow->actionCollection()) { @@ -474,8 +474,8 @@ void KScopeActions::slotEnableFileActions(bool bEnable) * the action * @return The newly created action object */ -KAction* KScopeActions::addAction(const QString& sCaption, const char* szIcon, - const char* szShortcut, QWidget* pReceiver, const char* szSlot, +KAction* KScopeActions::addAction(const TQString& sCaption, const char* szIcon, + const char* szShortcut, TQWidget* pReceiver, const char* szSlot, const char* szName, const char* szSignal) { KAction* pAction; @@ -508,8 +508,8 @@ KAction* KScopeActions::addAction(const QString& sCaption, const char* szIcon, * the action * @return The newly created action object */ -KToggleAction* KScopeActions::addToggle(const QString& sCaption, - const char* szIcon, const char* szShortcut, QWidget* pReceiver, +KToggleAction* KScopeActions::addToggle(const TQString& sCaption, + const char* szIcon, const char* szShortcut, TQWidget* pReceiver, const char* szSlot, const char* szName, const char* szSignal) { KToggleAction* pAction; diff --git a/src/kscopeactions.h b/src/kscopeactions.h index 4836310..a344dab 100644 --- a/src/kscopeactions.h +++ b/src/kscopeactions.h @@ -32,13 +32,13 @@ class KScope; -typedef QPtrList<KAction> ActionList; +typedef TQPtrList<KAction> ActionList; /** * A helper class for managing KScope's menu commands. * @author Elad Lahav */ -class KScopeActions : public QObject +class KScopeActions : public TQObject { Q_OBJECT @@ -89,10 +89,10 @@ private: /** The "Show/Hide Tag List" menu command. */ 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*); - KToggleAction* addToggle(const QString&, const char*, const char*, - QWidget*, const char*, const char*, const char*); + KToggleAction* addToggle(const TQString&, const char*, const char*, + TQWidget*, const char*, const char*, const char*); }; #endif diff --git a/src/kscopeconfig.cpp b/src/kscopeconfig.cpp index 3cc5094..924421f 100644 --- a/src/kscopeconfig.cpp +++ b/src/kscopeconfig.cpp @@ -88,22 +88,22 @@ KScopeConfig::ConfParams KScopeConfig::s_cpDef = { true, // Show the tag list SPLIT_SIZES(), // Tag list width { - QColor(black), // File list foreground - QColor(white), // File list background - QColor(black), // Tag list foreground - QColor(white), // Tag list background - QColor(black), // Query page foreground - QColor(white), // Query page background - QColor("#c0c0c0"), // Call graph background - QColor("#c0ff80"), // Call graph nodes - QColor(black), // Call graph text - QColor("#ff8000") + TQColor(black), // File list foreground + TQColor(white), // File list background + TQColor(black), // Tag list foreground + TQColor(white), // Tag list background + TQColor(black), // Query page foreground + TQColor(white), // Query page background + TQColor("#c0c0c0"), // Call graph background + TQColor("#c0ff80"), // Call graph nodes + TQColor(black), // Call graph text + TQColor("#ff8000") }, { - QFont(), // Font definitions are overriden in load() - QFont(), - QFont(), - QFont() + TQFont(), // Font definitions are overriden in load() + TQFont(), + TQFont(), + TQFont() }, NameAsc, // Ctags sort order false, // Read-only mode @@ -330,7 +330,7 @@ bool KScopeConfig::showWelcomeDlg() /** * @return The full path of the Cscope executable */ -const QString& KScopeConfig::getCscopePath() const +const TQString& KScopeConfig::getCscopePath() const { return m_cp.sCscopePath; } @@ -338,7 +338,7 @@ const QString& KScopeConfig::getCscopePath() const /** * @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; } @@ -346,7 +346,7 @@ void KScopeConfig::setCscopePath(const QString& sPath) /** * @return The full path of the Ctags executable */ -const QString& KScopeConfig::getCtagsPath() const +const TQString& KScopeConfig::getCtagsPath() const { return m_cp.sCtagsPath; } @@ -354,7 +354,7 @@ const QString& KScopeConfig::getCtagsPath() const /** * @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; } @@ -362,7 +362,7 @@ void KScopeConfig::setCtagsPath(const QString& sPath) /** * @return The full path of the Dot executable */ -const QString& KScopeConfig::getDotPath() const +const TQString& KScopeConfig::getDotPath() const { return m_cp.sDotPath; } @@ -370,7 +370,7 @@ const QString& KScopeConfig::getDotPath() const /** * @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; } @@ -378,7 +378,7 @@ void KScopeConfig::setDotPath(const QString& sPath) /** * @return A sorted list of recently used project paths. */ -const QStringList& KScopeConfig::getRecentProjects() const +const TQStringList& KScopeConfig::getRecentProjects() const { return m_slProjects; } @@ -388,9 +388,9 @@ const QStringList& KScopeConfig::getRecentProjects() const * list. * @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); 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. * @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); } @@ -447,7 +447,7 @@ void KScopeConfig::setEditorSizes(const SPLIT_SIZES& siEditor) * @param ce Identifies the GUI element * @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]; } @@ -457,7 +457,7 @@ const QColor& KScopeConfig::getColor(ColorElement ce) const * @param ce The GUI element * @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); } @@ -467,7 +467,7 @@ QString KScopeConfig::getColorName(ColorElement ce) const * @param ce Identifies the GUI element * @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; } @@ -477,7 +477,7 @@ void KScopeConfig::setColor(ColorElement ce, const QColor& clr) * @param fe Identifies the GUI element * @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]; } @@ -487,7 +487,7 @@ const QFont& KScopeConfig::getFont(FontElement fe) const * @param ce The GUI element * @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); } @@ -497,7 +497,7 @@ QString KScopeConfig::getFontName(FontElement ce) const * @param fe Identifies the GUI element * @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_cp.fonts[fe] = font; @@ -627,7 +627,7 @@ void KScopeConfig::setAutoSortFiles(bool bSort) /** * @return A command line for launching an external editor */ -const QString& KScopeConfig::getExtEditor() +const TQString& KScopeConfig::getExtEditor() { return m_cp.sExtEditor; } @@ -635,7 +635,7 @@ const QString& KScopeConfig::getExtEditor() /** * @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; } @@ -679,7 +679,7 @@ KScopeConfig::EditorPopup KScopeConfig::getEditorPopup() const /** * @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) { case Embedded: @@ -706,7 +706,7 @@ void KScopeConfig::setEditorPopup(KScopeConfig::EditorPopup popup) /** * @return The default orientation for call graphs */ -QString KScopeConfig::getGraphOrientation() const +TQString KScopeConfig::getGraphOrientation() const { return m_cp.sGraphOrient; } @@ -714,7 +714,7 @@ QString KScopeConfig::getGraphOrientation() const /** * @param sOrient The default orientation for call graphs */ -void KScopeConfig::setGraphOrientation(const QString& sOrient) +void KScopeConfig::setGraphOrientation(const TQString& sOrient) { m_cp.sGraphOrient = sOrient; } diff --git a/src/kscopeconfig.h b/src/kscopeconfig.h index 8a047cf..2d5b48d 100644 --- a/src/kscopeconfig.h +++ b/src/kscopeconfig.h @@ -28,19 +28,19 @@ #ifndef KSCOPECONFIG_H #define KSCOPECONFIG_H -#include <qobject.h> -#include <qstringlist.h> -#include <qcolor.h> +#include <ntqobject.h> +#include <ntqstringlist.h> +#include <ntqcolor.h> #include <kdockwidget.h> -typedef QValueList<int> SPLIT_SIZES; +typedef TQValueList<int> SPLIT_SIZES; /** * Loads and stores global configuration parameters. * @author Elad Lahav */ -class KScopeConfig : public QObject +class KScopeConfig : public TQObject { Q_OBJECT @@ -81,25 +81,25 @@ public: bool isFirstTime(); bool showWelcomeDlg(); - const QString& getCscopePath() const; - void setCscopePath(const QString&); - const QString& getCtagsPath() const; - void setCtagsPath(const QString&); - const QString& getDotPath() const; - void setDotPath(const QString&); - const QStringList& getRecentProjects() const; - void addRecentProject(const QString&); - void removeRecentProject(const QString&); + const TQString& getCscopePath() const; + void setCscopePath(const TQString&); + const TQString& getCtagsPath() const; + void setCtagsPath(const TQString&); + const TQString& getDotPath() const; + void setDotPath(const TQString&); + const TQStringList& getRecentProjects() const; + void addRecentProject(const TQString&); + void removeRecentProject(const TQString&); bool getShowTagList() const; void setShowTagList(bool); const SPLIT_SIZES& getEditorSizes() const; void setEditorSizes(const SPLIT_SIZES&); - const QColor& getColor(ColorElement) const; - QString getColorName(ColorElement) const; - void setColor(ColorElement, const QColor&); - const QFont& getFont(FontElement) const; - QString getFontName(FontElement) const; - void setFont(FontElement, const QFont&); + const TQColor& getColor(ColorElement) const; + TQString getColorName(ColorElement) const; + void setColor(ColorElement, const TQColor&); + const TQFont& getFont(FontElement) const; + TQString getFontName(FontElement) const; + void setFont(FontElement, const TQFont&); CtagSort getCtagSortOrder(); void setCtagSortOrder(CtagSort); bool getReadOnlyMode(); @@ -114,16 +114,16 @@ public: void setWarnModifiedOnDisk(bool); bool getAutoSortFiles(); void setAutoSortFiles(bool); - const QString& getExtEditor(); - void setExtEditor(const QString&); + const TQString& getExtEditor(); + void setExtEditor(const TQString&); bool useExtEditor(); SysProfile getSysProfile() const; void setSysProfile(SysProfile); EditorPopup getEditorPopup() const; - QString getEditorPopupName() const; + TQString getEditorPopupName() const; void setEditorPopup(EditorPopup); - QString getGraphOrientation() const; - void setGraphOrientation(const QString&); + TQString getGraphOrientation() const; + void setGraphOrientation(const TQString&); int getGraphMaxNodeDegree() const; void setGraphMaxNodeDegree(int); int getDefGraphView() const; @@ -131,19 +131,19 @@ public: private: /** A list of previously loaded projects. */ - QStringList m_slProjects; + TQStringList m_slProjects; /** Defines the list of all configurable parameters in KScope. The use of a structure helps define default values (@see s_cpDef) */ struct ConfParams { /** The full path of the Cscope executable. */ - QString sCscopePath; + TQString sCscopePath; /** The full path of the Ctags executable. */ - QString sCtagsPath; + TQString sCtagsPath; /** The full path of the Dot executable. */ - QString sDotPath; + TQString sDotPath; /** Whether the tag list should be visible. */ bool bShowTagList; @@ -153,10 +153,10 @@ private: SPLIT_SIZES siEditor; /** Colours for GUI elements. */ - QColor clrs[LAST_COLOR + 1]; + TQColor clrs[LAST_COLOR + 1]; /** Fonts for GUI elements. */ - QFont fonts[LAST_FONT + 1]; + TQFont fonts[LAST_FONT + 1]; /** Sort order of the tag lists. */ CtagSort ctagSortOrder; @@ -184,7 +184,7 @@ private: /** A command line pattern for an external editor (in read-only mode.)*/ - QString sExtEditor; + TQString sExtEditor; /** How KScope should treat time-consuming operations. */ SysProfile profile; @@ -193,7 +193,7 @@ private: EditorPopup popup; /** The default orientation of call graphs. */ - QString sGraphOrient; + TQString sGraphOrient; /** Maximal number of called/calling functions per call graph node. */ int nGraphMaxNodeDegree; diff --git a/src/kscopepixmaps.cpp b/src/kscopepixmaps.cpp index 495d756..1eec922 100644 --- a/src/kscopepixmaps.cpp +++ b/src/kscopepixmaps.cpp @@ -253,27 +253,27 @@ KScopePixmaps::~KScopePixmaps() /** * 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 * allocated. */ void KScopePixmaps::init() { // Create the pixmap array - m_pPixArray = new QPixmap * [PIX_ARRAY_SIZE]; + m_pPixArray = new TQPixmap * [PIX_ARRAY_SIZE]; // Create all pixmaps - m_pPixArray[SymFunc] = new QPixmap(XPM_FUNC); - m_pPixArray[SymVar] = new QPixmap(XPM_VAR); - m_pPixArray[SymStruct] = new QPixmap(XPM_STRUCT); - m_pPixArray[SymMacro] = new QPixmap(XPM_MACRO); - m_pPixArray[SymMember] = new QPixmap(XPM_MEMBER); - m_pPixArray[SymEnum] = new QPixmap(XPM_ENUM); - m_pPixArray[SymEnumerator] = new QPixmap(XPM_ENUMERATOR); - m_pPixArray[SymTypedef] = new QPixmap(XPM_TYPEDEF); - m_pPixArray[SymLabel] = new QPixmap(XPM_LABEL); - m_pPixArray[SymInclude] = new QPixmap(XPM_INCLUDE); - m_pPixArray[SymUnknown] = new QPixmap(XPM_UNKNOWN); + m_pPixArray[SymFunc] = new TQPixmap(XPM_FUNC); + m_pPixArray[SymVar] = new TQPixmap(XPM_VAR); + m_pPixArray[SymStruct] = new TQPixmap(XPM_STRUCT); + m_pPixArray[SymMacro] = new TQPixmap(XPM_MACRO); + m_pPixArray[SymMember] = new TQPixmap(XPM_MEMBER); + m_pPixArray[SymEnum] = new TQPixmap(XPM_ENUM); + m_pPixArray[SymEnumerator] = new TQPixmap(XPM_ENUMERATOR); + m_pPixArray[SymTypedef] = new TQPixmap(XPM_TYPEDEF); + m_pPixArray[SymLabel] = new TQPixmap(XPM_LABEL); + m_pPixArray[SymInclude] = new TQPixmap(XPM_INCLUDE); + m_pPixArray[SymUnknown] = new TQPixmap(XPM_UNKNOWN); } /** @@ -281,7 +281,7 @@ void KScopePixmaps::init() * @param name The pixmap's identifier * @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]; } @@ -291,7 +291,7 @@ const QPixmap& KScopePixmaps::getPixmap(PixName name) const * @param name The pixmap's identifier * @return The requested pixmap */ -QPixmap KScopePixmaps::getPixmap(LoadPixName name) +TQPixmap KScopePixmaps::getPixmap(LoadPixName name) { switch (name) { case TabUnlocked: @@ -363,7 +363,7 @@ QPixmap KScopePixmaps::getPixmap(LoadPixName name) 0, false); } - return QPixmap(); + return TQPixmap(); } /** diff --git a/src/kscopepixmaps.h b/src/kscopepixmaps.h index e5f321b..2577ef6 100644 --- a/src/kscopepixmaps.h +++ b/src/kscopepixmaps.h @@ -28,7 +28,7 @@ #ifndef KSCOPEPIXMAPS_H #define KSCOPEPIXMAPS_H -#include <qpixmap.h> +#include <ntqpixmap.h> #include <kiconloader.h> #define GET_PIXMAP(_pix) \ @@ -61,12 +61,12 @@ public: CallingTree, CallGraph }; void init(); - const QPixmap& getPixmap(PixName name) const; - QPixmap getPixmap(LoadPixName name); + const TQPixmap& getPixmap(PixName name) const; + TQPixmap getPixmap(LoadPixName name); private: /** 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. */ KIconLoader m_loader; diff --git a/src/makedlg.cpp b/src/makedlg.cpp index ac60129..8bcc5ad 100644 --- a/src/makedlg.cpp +++ b/src/makedlg.cpp @@ -25,7 +25,7 @@ * ***************************************************************************/ -#include <qtextcodec.h> +#include <ntqtextcodec.h> #include <ktextbrowser.h> #include <kcombobox.h> #include <kurlrequester.h> @@ -46,11 +46,11 @@ * @param pParent The parent widget * @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) { // Don't show the "Function" column - m_pErrorView->setColumnWidthMode(0, QListView::Manual); + m_pErrorView->setColumnWidthMode(0, TQListView::Manual); m_pErrorView->setColumnWidth(0, 0); // Create a new make front-end @@ -59,21 +59,21 @@ MakeDlg::MakeDlg(QWidget* pParent, const char* szName) : SLOT(slotShowOutput(FrontendToken*))); connect(m_pMake, SIGNAL(finished(uint)), this, SLOT(slotFinished(uint))); connect(m_pMake, - SIGNAL(error(const QString&, const QString&, const QString&)), + SIGNAL(error(const TQString&, const TQString&, const TQString&)), this, - SLOT(slotAddError(const QString&, const QString&, const QString&))); + SLOT(slotAddError(const TQString&, const TQString&, const TQString&))); // The Root URL control should browse directories m_pRootURL->setMode(KFile::Directory); // Handle URL links in the browser m_pOutputBrowser->setNotifyClick(true); - connect(m_pOutputBrowser, SIGNAL(urlClick(const QString&)), this, - SLOT(slotBrowserClicked(const QString&))); + connect(m_pOutputBrowser, SIGNAL(urlClick(const TQString&)), this, + SLOT(slotBrowserClicked(const TQString&))); // Handle selections in the error view - connect(m_pErrorView, SIGNAL(lineRequested(const QString& , uint)), this, - SIGNAL(fileRequested(const QString&, uint))); + connect(m_pErrorView, SIGNAL(lineRequested(const TQString& , uint)), this, + SIGNAL(fileRequested(const TQString&, uint))); // Do not allow duplicates in the command history m_pCommandHistory->setDuplicatesEnabled(false); @@ -90,7 +90,7 @@ MakeDlg::~ MakeDlg() /** * @return The currently set make command */ -QString MakeDlg::getCommand() const +TQString MakeDlg::getCommand() const { return m_pCommandHistory->currentText(); } @@ -98,7 +98,7 @@ QString MakeDlg::getCommand() const /** * @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->addToHistory(sCmd); @@ -107,7 +107,7 @@ void MakeDlg::setCommand(const QString& sCmd) /** * @return The directory in which to run the make command */ -QString MakeDlg::getDir() const +TQString MakeDlg::getDir() const { return m_pRootURL->url(); } @@ -115,7 +115,7 @@ QString MakeDlg::getDir() const /** * @param sURL The new root directory to use */ -void MakeDlg::setDir(const QString& sURL) +void MakeDlg::setDir(const TQString& sURL) { m_pRootURL->setURL(sURL); } @@ -127,7 +127,7 @@ void MakeDlg::setDir(const QString& sURL) * is killed. * @param pEvent The close event descriptor */ -void MakeDlg::closeEvent(QCloseEvent* pEvent) +void MakeDlg::closeEvent(TQCloseEvent* pEvent) { // Check if a process is currently running 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() { - QString sCommand; + TQString sCommand; // Clear the current contents m_pOutputBrowser->clear(); @@ -168,7 +168,7 @@ void MakeDlg::slotMake() // Run the make command sCommand = m_pCommandHistory->currentText(); - if (!m_pMake->run("make", QStringList::split(" ", sCommand), + if (!m_pMake->run("make", TQStringList::split(" ", sCommand), m_pRootURL->url())) { KMessageBox::error(this, m_pMake->getRunError()); return; @@ -198,11 +198,11 @@ void MakeDlg::slotStop() */ void MakeDlg::slotShowOutput(FrontendToken* pToken) { - QString sData; + TQString sData; // GCC uses unicode quote characters - this should ensure that they are // treated correctly by the text browser widget - sData = QTextCodec::codecForLocale()->toUnicode(pToken->getData()); + sData = TQTextCodec::codecForLocale()->toUnicode(pToken->getData()); m_pOutputBrowser->append(sData); } @@ -231,10 +231,10 @@ void MakeDlg::slotFinished(uint) * This slot is connected to the urlClick() signal of the browser. * @param sURL The requested URL */ -void MakeDlg::slotBrowserClicked(const QString& sURL) +void MakeDlg::slotBrowserClicked(const TQString& sURL) { - QString sFile; - QString sLine; + TQString sFile; + TQString sLine; // Exract the file name and the line number from the URL sFile = sURL.section('&', 0, 0); @@ -255,12 +255,12 @@ void MakeDlg::slotBrowserClicked(const QString& sURL) * @param sLine The line number * @param sText An explanation of the error */ -void MakeDlg::slotAddError(const QString& sFile, const QString& sLine, - const QString& sText) +void MakeDlg::slotAddError(const TQString& sFile, const TQString& sLine, + const TQString& sText) { - QString sUniText; + TQString sUniText; - sUniText = QTextCodec::codecForLocale()->toUnicode(sText); + sUniText = TQTextCodec::codecForLocale()->toUnicode(sText); m_pErrorView->addRecord("", sFile, sLine, sUniText); } diff --git a/src/makedlg.h b/src/makedlg.h index 3120b95..a2bb56b 100644 --- a/src/makedlg.h +++ b/src/makedlg.h @@ -46,29 +46,29 @@ class MakeDlg: public MakeLayout Q_OBJECT public: - MakeDlg(QWidget* pParent = 0, const char* szName = 0); + MakeDlg(TQWidget* pParent = 0, const char* szName = 0); virtual ~MakeDlg(); - QString getCommand() const; - void setCommand(const QString&); - QString getDir() const; - void setDir(const QString&); + TQString getCommand() const; + void setCommand(const TQString&); + TQString getDir() const; + void setDir(const TQString&); public slots: virtual void slotMake(); signals: - void fileRequested(const QString&, uint); + void fileRequested(const TQString&, uint); protected: - virtual void closeEvent(QCloseEvent*); + virtual void closeEvent(TQCloseEvent*); protected slots: virtual void slotStop(); void slotShowOutput(FrontendToken*); void slotFinished(uint); - void slotBrowserClicked(const QString&); - void slotAddError(const QString&, const QString&, const QString&); + void slotBrowserClicked(const TQString&); + void slotAddError(const TQString&, const TQString&, const TQString&); private: /** Handles the make process. */ diff --git a/src/makefrontend.cpp b/src/makefrontend.cpp index 80ea9b8..2977d8f 100644 --- a/src/makefrontend.cpp +++ b/src/makefrontend.cpp @@ -25,7 +25,7 @@ * ***************************************************************************/ -#include <qregexp.h> +#include <ntqregexp.h> #include "makefrontend.h" // TODO: @@ -68,10 +68,10 @@ MakeFrontend::~MakeFrontend() * @param bBlock (Optional) true to block, false otherwise * @return true if the process was executed successfully, false otherwise */ -bool MakeFrontend::run(const QString& sName, const QStringList& slArgs, - const QString& sWorkDir, bool bBlock) +bool MakeFrontend::run(const TQString& sName, const TQStringList& slArgs, + const TQString& sWorkDir, bool bBlock) { - QStringList slShellArgs; + TQStringList slShellArgs; // Store the current build directory 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. * @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 QRegExp reEntDir(RE_ENTER_DIR); - static QRegExp reExtDir(RE_EXIT_DIR); - QString sRep; + static TQRegExp reErrWarn(RE_FILE_LINE); + static TQRegExp reEntDir(RE_ENTER_DIR); + static TQRegExp reExtDir(RE_EXIT_DIR); + TQString sRep; int nPos; - QString sFile, sLine, sText; + TQString sFile, sLine, sText; if ((nPos = reErrWarn.search(sToken)) >= 0) { // An error/warning message @@ -112,18 +112,18 @@ Frontend::ParseResult MakeFrontend::parseStdout(QString& sToken, ParserDelim) sText = reErrWarn.capturedTexts()[4]; 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); } else if ((nPos = reEntDir.search(sToken)) >= 0) { // Recursing into a directory m_slPathStack.push_back(reEntDir.capturedTexts()[1]); - sToken = QString("<b>Entering directory</b> ") + + sToken = TQString("<b>Entering directory</b> ") + m_slPathStack.last(); } else if ((nPos = reExtDir.search(sToken)) >= 0) { // Leaving a directory - sToken = QString("<b>Leaving directory</b> ") + + sToken = TQString("<b>Leaving directory</b> ") + m_slPathStack.last(); m_slPathStack.pop_back(); } diff --git a/src/makefrontend.h b/src/makefrontend.h index 4ed575f..c3ab3f1 100644 --- a/src/makefrontend.h +++ b/src/makefrontend.h @@ -45,17 +45,17 @@ public: MakeFrontend(bool bAutoDelete = false); ~MakeFrontend(); - virtual bool run(const QString&, const QStringList&, - const QString&, bool bBlock = false); - virtual ParseResult parseStdout(QString&, ParserDelim); + virtual bool run(const TQString&, const TQStringList&, + const TQString&, bool bBlock = false); + virtual ParseResult parseStdout(TQString&, ParserDelim); signals: - void error(const QString& sFile, const QString& sLine, - const QString& sText); + void error(const TQString& sFile, const TQString& sLine, + const TQString& sText); private: /** A stack of paths used to track the current build directory. */ - QStringList m_slPathStack; + TQStringList m_slPathStack; }; #endif diff --git a/src/makelayout.ui b/src/makelayout.ui index e47acf8..d36dae1 100644 --- a/src/makelayout.ui +++ b/src/makelayout.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>MakeLayout</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>MakeLayout</cstring> </property> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout10</cstring> </property> @@ -27,7 +27,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -53,7 +53,7 @@ <cstring>m_pRootURL</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -63,11 +63,11 @@ </widget> </grid> </widget> - <widget class="QTabWidget"> + <widget class="TQTabWidget"> <property name="name"> <cstring>tabWidget2</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -85,7 +85,7 @@ </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -104,7 +104,7 @@ </vbox> </widget> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout7</cstring> </property> @@ -129,7 +129,7 @@ </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pMakeButton</cstring> </property> @@ -143,7 +143,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pStopButton</cstring> </property> @@ -157,7 +157,7 @@ <string>Alt+S</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pCloseButton</cstring> </property> diff --git a/src/newprojectdlg.cpp b/src/newprojectdlg.cpp index ec8fbca..cc1e73e 100644 --- a/src/newprojectdlg.cpp +++ b/src/newprojectdlg.cpp @@ -25,11 +25,11 @@ * ***************************************************************************/ -#include <qregexp.h> -#include <qpushbutton.h> -#include <qspinbox.h> -#include <qlabel.h> -#include <qtextedit.h> +#include <ntqregexp.h> +#include <ntqpushbutton.h> +#include <ntqspinbox.h> +#include <ntqlabel.h> +#include <ntqtextedit.h> #include <kurlrequester.h> #include <klineedit.h> #include <kmessagebox.h> @@ -43,7 +43,7 @@ * @param pParent The parent widget * @param szName The widget's name */ -NewProjectDlg::NewProjectDlg(bool bNewProj, QWidget* pParent, +NewProjectDlg::NewProjectDlg(bool bNewProj, TQWidget* pParent, const char* szName) : NewProjectLayout(pParent, szName), m_bNewProj(bNewProj) @@ -98,10 +98,10 @@ NewProjectDlg::~NewProjectDlg() * @param sPath The project's path * @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) { - QStringList::ConstIterator itr; + TQStringList::ConstIterator itr; // Set values for current project m_pNameEdit->setText(sName); @@ -143,7 +143,7 @@ void NewProjectDlg::setProperties(const QString& sName, const QString& sPath, * box. * @return The name of the new project */ -QString NewProjectDlg::getName() +TQString NewProjectDlg::getName() { return m_pNameEdit->text(); } @@ -155,10 +155,10 @@ QString NewProjectDlg::getName() * directory, created under it using the project's name. * @return The full path of the parent directory for the new project */ -QString NewProjectDlg::getPath() +TQString NewProjectDlg::getPath() { if (m_pHiddenDirCheck->isChecked()) - return QString(m_pSrcRootRequester->url()) + "/.cscope"; + return TQString(m_pSrcRootRequester->url()) + "/.cscope"; return m_pPathRequester->url(); } @@ -203,7 +203,7 @@ void NewProjectDlg::accept() // Validate the name of a new project if (m_bNewProj) { - QRegExp re("[^ \\t\\n]+"); + TQRegExp re("[^ \\t\\n]+"); if (!re.exactMatch(m_pNameEdit->text())) { KMessageBox::error(0, i18n("Project names must not contain " "whitespace.")); @@ -217,14 +217,14 @@ void NewProjectDlg::accept() m_slTypes.append(m_pTypesList->text(i)); // Clean-up the source root - QDir dir(m_pSrcRootRequester->url()); + TQDir dir(m_pSrcRootRequester->url()); if (dir.exists()) m_pSrcRootRequester->setURL(dir.absPath()); else m_pSrcRootRequester->setURL("/"); // Close the dialog - QDialog::accept(); + TQDialog::accept(); } /** @@ -233,7 +233,7 @@ void NewProjectDlg::accept() */ void NewProjectDlg::slotAddType() { - QString sType; + TQString sType; // Try the custom type edit-box first. sType = m_pTypesEdit->text(); @@ -242,14 +242,14 @@ void NewProjectDlg::slotAddType() return; // Validate the type string - QRegExp reg("[ \\t\\n\\|\\\\\\/]"); + TQRegExp reg("[ \\t\\n\\|\\\\\\/]"); if (sType.contains(reg)) { KMessageBox::error(0, i18n("This is not a valid file type!")); return; } // 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) { return; } @@ -266,7 +266,7 @@ void NewProjectDlg::slotAddType() void NewProjectDlg::slotRemoveType() { int nItem; - QString sType; + TQString sType; // Verify an item is selected nItem = m_pTypesList->currentItem(); @@ -278,7 +278,7 @@ void NewProjectDlg::slotRemoveType() m_pTypesList->removeItem(nItem); // 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) { m_pAvailTypesList->insertItem(sType); } @@ -292,7 +292,7 @@ void NewProjectDlg::slotRemoveType() * available types. * @param sType The newly selected type */ -void NewProjectDlg::slotAvailTypesChanged(const QString& sType) +void NewProjectDlg::slotAvailTypesChanged(const TQString& sType) { m_pTypesEdit->setText(sType); } @@ -302,7 +302,7 @@ void NewProjectDlg::slotAvailTypesChanged(const QString& sType) * @param pParent The parent widget * @param szName The widget's name */ -AutoCompletionDlg::AutoCompletionDlg(QWidget* pParent, +AutoCompletionDlg::AutoCompletionDlg(TQWidget* pParent, const char* szName ) : AutoCompletionLayout(pParent, szName) { @@ -331,7 +331,7 @@ int AutoCompletionDlg::exec() m_pMaxEntriesSpin->setValue(m_nMaxEntries); // Show the dialogue - return QDialog::exec(); + return TQDialog::exec(); } /** @@ -347,7 +347,7 @@ void AutoCompletionDlg::accept() m_nMaxEntries = m_pMaxEntriesSpin->value(); // Close the dialogue, indicating acceptance - QDialog::accept(); + TQDialog::accept(); } diff --git a/src/newprojectdlg.h b/src/newprojectdlg.h index 5d8e556..ff96337 100644 --- a/src/newprojectdlg.h +++ b/src/newprojectdlg.h @@ -28,8 +28,8 @@ #ifndef NEWPROJECTDLG_H #define NEWPROJECTDLG_H -#include <qlineedit.h> -#include <qcheckbox.h> +#include <ntqlineedit.h> +#include <ntqcheckbox.h> #include <newprojectlayout.h> #include <autocompletionlayout.h> #include "projectbase.h" @@ -44,7 +44,7 @@ class AutoCompletionDlg : public AutoCompletionLayout Q_OBJECT public: - AutoCompletionDlg(QWidget* pParent, const char* szName = NULL); + AutoCompletionDlg(TQWidget* pParent, const char* szName = NULL); ~AutoCompletionDlg(); public slots: @@ -82,25 +82,25 @@ class NewProjectDlg : public NewProjectLayout Q_OBJECT public: - NewProjectDlg(bool, QWidget* pParent = NULL, const char* szName = NULL); + NewProjectDlg(bool, TQWidget* pParent = NULL, const char* szName = NULL); ~NewProjectDlg(); - void setProperties(const QString&, const QString&, + void setProperties(const TQString&, const TQString&, const ProjectBase::Options&); - QString getName(); - QString getPath(); + TQString getName(); + TQString getPath(); void getOptions(ProjectBase::Options&); protected slots: virtual void accept(); virtual void slotAddType(); virtual void slotRemoveType(); - virtual void slotAvailTypesChanged(const QString&); + virtual void slotAvailTypesChanged(const TQString&); private: /** The file MIME-types associated with the new project. */ - QStringList m_slTypes; + TQStringList m_slTypes; /** A sub-dialogue for configuring symbol auto-completion parameters. */ AutoCompletionDlg* m_pAutoCompDlg; diff --git a/src/newprojectlayout.ui b/src/newprojectlayout.ui index 841b059..4374e3c 100644 --- a/src/newprojectlayout.ui +++ b/src/newprojectlayout.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>NewProjectLayout</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>NewProjectLayout</cstring> </property> @@ -19,11 +19,11 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QTabWidget"> + <widget class="TQTabWidget"> <property name="name"> <cstring>tabWidget2</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -34,7 +34,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout18</cstring> </property> @@ -42,7 +42,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -50,7 +50,7 @@ <string>Path</string> </property> </widget> - <widget class="QLineEdit" row="0" column="1"> + <widget class="TQLineEdit" row="0" column="1"> <property name="name"> <cstring>m_pNameEdit</cstring> </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> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -79,7 +79,7 @@ This does not need to be the path in which the source files reside.</string> </widget> </grid> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_pHiddenDirCheck</cstring> </property> @@ -90,7 +90,7 @@ This does not need to be the path in which the source files reside.</string> <string>Alt+U</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout19</cstring> </property> @@ -98,7 +98,7 @@ This does not need to be the path in which the source files reside.</string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -113,7 +113,7 @@ This does not need to be the path in which the source files reside.</string> </widget> </hbox> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_3</cstring> </property> @@ -148,7 +148,7 @@ path for all source files, but is not required.</blockquote></string> </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -159,7 +159,7 @@ path for all source files, but is not required.</blockquote></string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -170,7 +170,7 @@ path for all source files, but is not required.</blockquote></string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QListBox"> + <widget class="TQListBox"> <property name="name"> <cstring>m_pTypesList</cstring> </property> @@ -180,7 +180,7 @@ path for all source files, but is not required.</blockquote></string> </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout5</cstring> </property> @@ -205,7 +205,7 @@ path for all source files, but is not required.</blockquote></string> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pAddButton</cstring> </property> @@ -219,7 +219,7 @@ path for all source files, but is not required.</blockquote></string> <string>Adds the selected file type to the current project.</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pRemoveButton</cstring> </property> @@ -252,7 +252,7 @@ path for all source files, but is not required.</blockquote></string> </spacer> </vbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox2</cstring> </property> @@ -263,7 +263,7 @@ path for all source files, but is not required.</blockquote></string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>m_pTypesEdit</cstring> </property> @@ -271,7 +271,7 @@ path for all source files, but is not required.</blockquote></string> <string>You can enter custom file types here.</string> </property> </widget> - <widget class="QListBox"> + <widget class="TQListBox"> <item> <property name="text"> <string>*.c</string> @@ -365,7 +365,7 @@ path for all source files, but is not required.</blockquote></string> </spacer> </hbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>TabPage</cstring> </property> @@ -376,7 +376,7 @@ path for all source files, but is not required.</blockquote></string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_pKernelCheck</cstring> </property> @@ -390,7 +390,7 @@ path for all source files, but is not required.</blockquote></string> <string>For kernel projects, symbols are not looked up in the standard include path.</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_pInvCheck</cstring> </property> @@ -404,7 +404,7 @@ path for all source files, but is not required.</blockquote></string> <string>An inverted index may greatly speed up searches in a large project. The project's building process is longer, though.</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_pNoCompCheck</cstring> </property> @@ -415,7 +415,7 @@ path for all source files, but is not required.</blockquote></string> <string></string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_pSlowPathCheck</cstring> </property> @@ -423,7 +423,7 @@ path for all source files, but is not required.</blockquote></string> <string>Slower, but more accurate, function definition detection (-D)</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout31</cstring> </property> @@ -431,7 +431,7 @@ path for all source files, but is not required.</blockquote></string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_pAutoRebuildCheck</cstring> </property> @@ -462,7 +462,7 @@ path for all source files, but is not required.</blockquote></string> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_pAutoRebuildLabel</cstring> </property> @@ -473,7 +473,7 @@ path for all source files, but is not required.</blockquote></string> <string>(Seconds)</string> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>m_pAutoRebuildSpin</cstring> </property> @@ -486,7 +486,7 @@ path for all source files, but is not required.</blockquote></string> </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout30</cstring> </property> @@ -494,7 +494,7 @@ path for all source files, but is not required.</blockquote></string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_pACCheck</cstring> </property> @@ -525,7 +525,7 @@ path for all source files, but is not required.</blockquote></string> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pACButton</cstring> </property> @@ -538,7 +538,7 @@ path for all source files, but is not required.</blockquote></string> </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout6</cstring> </property> @@ -546,7 +546,7 @@ path for all source files, but is not required.</blockquote></string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_pTabWidthCheck</cstring> </property> @@ -574,7 +574,7 @@ path for all source files, but is not required.</blockquote></string> </size> </property> </spacer> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>m_pTabWidthSpin</cstring> </property> @@ -603,7 +603,7 @@ path for all source files, but is not required.</blockquote></string> </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>TabPage</cstring> </property> @@ -614,7 +614,7 @@ path for all source files, but is not required.</blockquote></string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_4</cstring> </property> @@ -622,7 +622,7 @@ path for all source files, but is not required.</blockquote></string> <string>Ctags command line (Do not change unless you know what you are doing!)</string> </property> </widget> - <widget class="QTextEdit"> + <widget class="TQTextEdit"> <property name="name"> <cstring>m_pCtagsCmdEdit</cstring> </property> @@ -636,7 +636,7 @@ path for all source files, but is not required.</blockquote></string> </vbox> </widget> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout19</cstring> </property> @@ -661,7 +661,7 @@ path for all source files, but is not required.</blockquote></string> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pCreateButton</cstring> </property> @@ -672,7 +672,7 @@ path for all source files, but is not required.</blockquote></string> <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pCancelButton</cstring> </property> @@ -711,9 +711,9 @@ path for all source files, but is not required.</blockquote></string> </connection> <connection> <sender>m_pAvailTypesList</sender> - <signal>highlighted(const QString&)</signal> + <signal>highlighted(const TQString&)</signal> <receiver>NewProjectLayout</receiver> - <slot>slotAvailTypesChanged(const QString&)</slot> + <slot>slotAvailTypesChanged(const TQString&)</slot> </connection> <connection> <sender>m_pTabWidthCheck</sender> @@ -764,7 +764,7 @@ path for all source files, but is not required.</blockquote></string> <slot access="protected">slotRemoveType()</slot> <slot access="protected">slotAutoRebuildChanged(bool)</slot> <slot access="protected">slotAutoCompletionChanged(bool)</slot> - <slot access="protected">slotAvailTypesChanged(const QString&)</slot> + <slot access="protected">slotAvailTypesChanged(const TQString&)</slot> </slots> <layoutdefaults spacing="6" margin="11"/> <includehints> diff --git a/src/openprojectdlg.cpp b/src/openprojectdlg.cpp index 722fde6..c6d510f 100644 --- a/src/openprojectdlg.cpp +++ b/src/openprojectdlg.cpp @@ -25,9 +25,9 @@ * ***************************************************************************/ -#include <qpushbutton.h> -#include <qlineedit.h> -#include <qlistbox.h> +#include <ntqpushbutton.h> +#include <ntqlineedit.h> +#include <ntqlistbox.h> #include <kurlrequester.h> #include "openprojectdlg.h" #include "kscopeconfig.h" @@ -37,7 +37,7 @@ * @param pParent The parent widget * @param szName The widget's name */ -OpenProjectDlg::OpenProjectDlg(QWidget* pParent, const char* szName) : +OpenProjectDlg::OpenProjectDlg(TQWidget* pParent, const char* szName) : OpenProjectLayout(pParent, szName) { loadRecent(); @@ -54,7 +54,7 @@ OpenProjectDlg::~OpenProjectDlg() /** * @return The selected project path */ -QString OpenProjectDlg::getPath() const +TQString OpenProjectDlg::getPath() const { return m_pProjPathRequester->url(); } @@ -64,9 +64,9 @@ QString OpenProjectDlg::getPath() const * the 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)); } @@ -76,7 +76,7 @@ void OpenProjectDlg::slotProjectSelected(const QString& sProjPath) */ void OpenProjectDlg::slotRemoveRecent() { - QListBoxItem* pItem; + TQListBoxItem* pItem; // Remove the selected item, if any pItem = m_pRecentList->selectedItem(); @@ -93,7 +93,7 @@ void OpenProjectDlg::slotRemoveRecent() * list box. * @param pItem The selected project item */ -void OpenProjectDlg::slotSelectRecent(QListBoxItem* pItem) +void OpenProjectDlg::slotSelectRecent(TQListBoxItem* pItem) { if (pItem != NULL) m_pProjPathRequester->setURL(pItem->text()); @@ -106,7 +106,7 @@ void OpenProjectDlg::slotSelectRecent(QListBoxItem* pItem) * projects list box. * @param pItem The selected project item */ -void OpenProjectDlg::slotOpenRecent(QListBoxItem* pItem) +void OpenProjectDlg::slotOpenRecent(TQListBoxItem* pItem) { if (pItem != NULL) { m_pProjPathRequester->setURL(pItem->text()); @@ -120,8 +120,8 @@ void OpenProjectDlg::slotOpenRecent(QListBoxItem* pItem) */ void OpenProjectDlg::loadRecent() { - const QStringList& slProjects = Config().getRecentProjects(); - QStringList::const_iterator itr; + const TQStringList& slProjects = Config().getRecentProjects(); + TQStringList::const_iterator itr; // Create a list item for each project in the list for (itr = slProjects.begin(); itr != slProjects.end(); ++itr) diff --git a/src/openprojectdlg.h b/src/openprojectdlg.h index cf492ad..e9c2477 100644 --- a/src/openprojectdlg.h +++ b/src/openprojectdlg.h @@ -28,7 +28,7 @@ #ifndef OPENPROJECTDLG_H #define OPENPROJECTDLG_H -#include <qwidget.h> +#include <ntqwidget.h> #include <openprojectlayout.h> /** @@ -43,16 +43,16 @@ class OpenProjectDlg : public OpenProjectLayout Q_OBJECT public: - OpenProjectDlg(QWidget* pParent = 0, const char* szName = 0); + OpenProjectDlg(TQWidget* pParent = 0, const char* szName = 0); ~OpenProjectDlg(); - QString getPath() const; + TQString getPath() const; protected slots: - virtual void slotProjectSelected(const QString&); + virtual void slotProjectSelected(const TQString&); virtual void slotRemoveRecent(); - virtual void slotSelectRecent(QListBoxItem*); - virtual void slotOpenRecent(QListBoxItem*); + virtual void slotSelectRecent(TQListBoxItem*); + virtual void slotOpenRecent(TQListBoxItem*); private: void loadRecent(); diff --git a/src/openprojectlayout.ui b/src/openprojectlayout.ui index 88d52be..a1c24b4 100644 --- a/src/openprojectlayout.ui +++ b/src/openprojectlayout.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>OpenProjectLayout</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>OpenProjectLayout</cstring> </property> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroup5</cstring> </property> @@ -37,7 +37,7 @@ </widget> </hbox> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroup6</cstring> </property> @@ -48,12 +48,12 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QListBox"> + <widget class="TQListBox"> <property name="name"> <cstring>m_pRecentList</cstring> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout9</cstring> </property> @@ -78,7 +78,7 @@ </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pRemoveButton</cstring> </property> @@ -90,7 +90,7 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout9</cstring> </property> @@ -115,7 +115,7 @@ </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pOpenButton</cstring> </property> @@ -129,7 +129,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pCancelButton</cstring> </property> @@ -164,34 +164,34 @@ </connection> <connection> <sender>m_pRecentList</sender> - <signal>highlighted(QListBoxItem*)</signal> + <signal>highlighted(TQListBoxItem*)</signal> <receiver>OpenProjectLayout</receiver> - <slot>slotSelectRecent(QListBoxItem*)</slot> + <slot>slotSelectRecent(TQListBoxItem*)</slot> </connection> <connection> <sender>m_pRecentList</sender> - <signal>doubleClicked(QListBoxItem*)</signal> + <signal>doubleClicked(TQListBoxItem*)</signal> <receiver>OpenProjectLayout</receiver> - <slot>slotOpenRecent(QListBoxItem*)</slot> + <slot>slotOpenRecent(TQListBoxItem*)</slot> </connection> <connection> <sender>m_pProjPathRequester</sender> - <signal>urlSelected(const QString&)</signal> + <signal>urlSelected(const TQString&)</signal> <receiver>OpenProjectLayout</receiver> - <slot>slotProjectSelected(const QString&)</slot> + <slot>slotProjectSelected(const TQString&)</slot> </connection> <connection> <sender>m_pRecentList</sender> - <signal>returnPressed(QListBoxItem*)</signal> + <signal>returnPressed(TQListBoxItem*)</signal> <receiver>OpenProjectLayout</receiver> - <slot>slotOpenRecent(QListBoxItem*)</slot> + <slot>slotOpenRecent(TQListBoxItem*)</slot> </connection> </connections> <slots> <slot access="protected">slotRemoveRecent()</slot> - <slot access="protected">slotSelectRecent(QListBoxItem*)</slot> - <slot access="protected">slotOpenRecent(QListBoxItem*)</slot> - <slot access="protected">slotProjectSelected(const QString&)</slot> + <slot access="protected">slotSelectRecent(TQListBoxItem*)</slot> + <slot access="protected">slotOpenRecent(TQListBoxItem*)</slot> + <slot access="protected">slotProjectSelected(const TQString&)</slot> </slots> <layoutdefaults spacing="6" margin="11"/> <includehints> diff --git a/src/prefcolor.cpp b/src/prefcolor.cpp index 85beb4b..79bba7c 100644 --- a/src/prefcolor.cpp +++ b/src/prefcolor.cpp @@ -25,8 +25,8 @@ * ***************************************************************************/ -#include <qlistview.h> -#include <qpainter.h> +#include <ntqlistview.h> +#include <ntqpainter.h> #include <kcolordialog.h> #include "prefcolor.h" #include "kscopeconfig.h" @@ -38,7 +38,7 @@ * colour. * @author Elad Lahav */ -class ColorListItem : public QListViewItem +class ColorListItem : public TQListViewItem { public: /** @@ -46,8 +46,8 @@ public: * @param pList The owner list view * @param ce The GUI element shown by this item */ - ColorListItem(QListView* pList, KScopeConfig::ColorElement ce) : - QListViewItem(pList, Config().getColorName(ce), ""), + ColorListItem(TQListView* pList, KScopeConfig::ColorElement ce) : + TQListViewItem(pList, Config().getColorName(ce), ""), m_ce(ce) { setColor(Config().getColor(ce)); } @@ -64,9 +64,9 @@ public: * The colour set by this function is returned by getColor(). * @param clr The colour to set */ - void setColor(QColor clr) { - QPixmap pix; - QPainter painter; + void setColor(TQColor clr) { + TQPixmap pix; + TQPainter painter; int nWidth, nHeight; // Remember the colour @@ -90,14 +90,14 @@ public: /** * @return The colour associated with this item */ - QColor getColor() { return m_clr; } + TQColor getColor() { return m_clr; } private: /** The GUI element shown by this item. */ KScopeConfig::ColorElement m_ce; /** The colour associated with this item. */ - QColor m_clr; + TQColor m_clr; }; /** @@ -105,10 +105,10 @@ private: * @param pParent The parent widget * @param szName The widget's name */ -PrefColor::PrefColor(QWidget* pParent, const char* szName) : +PrefColor::PrefColor(TQWidget* pParent, const char* szName) : PrefColorLayout(pParent, szName) { - m_pList->setColumnWidthMode(1, QListView::Manual); + m_pList->setColumnWidthMode(1, TQListView::Manual); // Set initial values load(); @@ -156,14 +156,14 @@ void PrefColor::apply() * signals of the list view. * @param pItem The selected item */ -void PrefColor::slotItemSelected(QListViewItem* pItem) +void PrefColor::slotItemSelected(TQListViewItem* pItem) { ColorListItem* pClrItem; - QColor clr; + TQColor clr; pClrItem = (ColorListItem*)pItem; if (KColorDialog::getColor(clr, pClrItem->getColor()) == - QDialog::Accepted) { + TQDialog::Accepted) { pClrItem->setColor(clr); emit modified(); } diff --git a/src/prefcolor.h b/src/prefcolor.h index b26bed2..f191e5d 100644 --- a/src/prefcolor.h +++ b/src/prefcolor.h @@ -39,7 +39,7 @@ class PrefColor : public PrefColorLayout Q_OBJECT public: - PrefColor(QWidget* pParent = 0, const char* szName = 0); + PrefColor(TQWidget* pParent = 0, const char* szName = 0); ~PrefColor(); void load(); @@ -53,7 +53,7 @@ signals: void modified(); protected slots: - void slotItemSelected(QListViewItem*); + void slotItemSelected(TQListViewItem*); }; #endif diff --git a/src/prefcolorlayout.ui b/src/prefcolorlayout.ui index 8e15bda..da999cf 100644 --- a/src/prefcolorlayout.ui +++ b/src/prefcolorlayout.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>PrefColorLayout</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>PrefColorLayout</cstring> </property> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QListView"> + <widget class="TQListView"> <column> <property name="text"> <string>GUI Element</string> @@ -51,19 +51,19 @@ <connections> <connection> <sender>m_pList</sender> - <signal>doubleClicked(QListViewItem*)</signal> + <signal>doubleClicked(TQListViewItem*)</signal> <receiver>PrefColorLayout</receiver> - <slot>slotItemSelected(QListViewItem*)</slot> + <slot>slotItemSelected(TQListViewItem*)</slot> </connection> <connection> <sender>m_pList</sender> - <signal>returnPressed(QListViewItem*)</signal> + <signal>returnPressed(TQListViewItem*)</signal> <receiver>PrefColorLayout</receiver> - <slot>slotItemSelected(QListViewItem*)</slot> + <slot>slotItemSelected(TQListViewItem*)</slot> </connection> </connections> <slots> - <slot access="protected">slotItemSelected(QListViewItem*)</slot> + <slot access="protected">slotItemSelected(TQListViewItem*)</slot> </slots> <layoutdefaults spacing="6" margin="11"/> </UI> diff --git a/src/preferencesdlg.cpp b/src/preferencesdlg.cpp index ab13c33..9540c73 100644 --- a/src/preferencesdlg.cpp +++ b/src/preferencesdlg.cpp @@ -25,12 +25,12 @@ * ***************************************************************************/ -#include <qlayout.h> +#include <ntqlayout.h> #include <klocale.h> #include <kiconloader.h> #include <kurlrequester.h> #include <klineedit.h> -#include <qcheckbox.h> +#include <ntqcheckbox.h> #include <kcolorbutton.h> #include <kmessagebox.h> #include <kfontrequester.h> @@ -51,33 +51,33 @@ * @param pParent The parent widget * @param szName The widget's name */ -PreferencesDlg::PreferencesDlg(uint nPage, QWidget* pParent, +PreferencesDlg::PreferencesDlg(uint nPage, TQWidget* pParent, const char* szName) : KDialogBase(IconList, i18n("Preferences"), Default | Ok | Apply | Cancel, Ok, pParent, szName, 0) { - QFrame* pFrame; - QVBoxLayout* pLayout; + TQFrame* pFrame; + TQVBoxLayout* pLayout; // Create and add the "Frontend" page pFrame = addPage(i18n("Programmes"), i18n("Paths to back-end programmes"), 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); pLayout->addWidget(m_pPrefFrontend); // Create and add the "Colours" page pFrame = addPage(i18n("Colours"), i18n("Window colours"), 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); pLayout->addWidget(m_pPrefColor); // Create and add the "Fonts" page pFrame = addPage(i18n("Fonts"), i18n("Window fonts"), 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); pLayout->addWidget(m_pPrefFont); @@ -85,7 +85,7 @@ PreferencesDlg::PreferencesDlg(uint nPage, QWidget* pParent, pFrame = addPage(i18n("Options"), i18n("Misc. Options"), KGlobal::iconLoader()->loadIcon("package_settings", KIcon::Panel, 0, false)); - pLayout = new QVBoxLayout(pFrame, 0, 0); + pLayout = new TQVBoxLayout(pFrame, 0, 0); m_pPrefOpt = new PrefOpt(pFrame); pLayout->addWidget(m_pPrefOpt); diff --git a/src/preferencesdlg.h b/src/preferencesdlg.h index 51fa2cb..30200d9 100644 --- a/src/preferencesdlg.h +++ b/src/preferencesdlg.h @@ -28,7 +28,7 @@ #ifndef PREFERENCESDLG_H #define PREFERENCESDLG_H -#include <qwidget.h> +#include <ntqwidget.h> #include <kdialogbase.h> class PrefFrontend; @@ -50,7 +50,7 @@ class PreferencesDlg : public KDialogBase Q_OBJECT public: - PreferencesDlg(uint nPage = Frontend, QWidget* pParent = 0, const char* + PreferencesDlg(uint nPage = Frontend, TQWidget* pParent = 0, const char* szName = 0); ~PreferencesDlg(); diff --git a/src/preffont.cpp b/src/preffont.cpp index 288c699..0613b75 100644 --- a/src/preffont.cpp +++ b/src/preffont.cpp @@ -25,8 +25,8 @@ * ***************************************************************************/ -#include <qlistview.h> -#include <qpainter.h> +#include <ntqlistview.h> +#include <ntqpainter.h> #include <kfontdialog.h> #include <klocale.h> #include "preffont.h" @@ -38,7 +38,7 @@ * The font is presented in the form of a sample text drawn using this font. * @author Elad Lahav */ -class FontListItem : public QListViewItem +class FontListItem : public TQListViewItem { public: /** @@ -46,8 +46,8 @@ public: * @param pList The owner list view * @param fe The GUI element shown by this item */ - FontListItem(QListView* pList, KScopeConfig::FontElement fe) : - QListViewItem(pList, Config().getFontName(fe), ""), + FontListItem(TQListView* pList, KScopeConfig::FontElement fe) : + TQListViewItem(pList, Config().getFontName(fe), ""), m_fe(fe) { setFont(Config().getFont(fe)); } @@ -64,18 +64,18 @@ public: * The font set by this function is returned by getFont(). * @param font The font to set */ - void setFont(QFont font) { - QPixmap pix; - QFontMetrics fm(font); - QPainter painter; - QRect rc; + void setFont(TQFont font) { + TQPixmap pix; + TQFontMetrics fm(font); + TQPainter painter; + TQRect rc; // Remember the font m_font = font; // Set the pixmap's size so it can contain the sample text rc = fm.boundingRect(i18n("Sample")); - rc.moveTopLeft(QPoint(0, 0)); + rc.moveTopLeft(TQPoint(0, 0)); pix.resize(rc.width(), rc.height()); // Draw on the pixmap @@ -83,7 +83,7 @@ public: painter.begin(&pix); painter.setFont(font); painter.setPen(black); - painter.drawText(rc, Qt::AlignHCenter | Qt::AlignVCenter, + painter.drawText(rc, TQt::AlignHCenter | TQt::AlignVCenter, i18n("Sample")); painter.end(); @@ -94,14 +94,14 @@ public: /** * @return The font associated with this item */ - QFont getFont() { return m_font; } + TQFont getFont() { return m_font; } private: /** The GUI element shown by this item. */ KScopeConfig::FontElement m_fe; /** The font associated with this item. */ - QFont m_font; + TQFont m_font; }; /** @@ -109,7 +109,7 @@ private: * @param pParent The parent widget * @param szName The widget's name */ -PrefFont::PrefFont(QWidget* pParent, const char* szName) : +PrefFont::PrefFont(TQWidget* pParent, const char* szName) : PrefFontLayout(pParent, szName) { // Set initial values @@ -158,14 +158,14 @@ void PrefFont::apply() * signals of the list view. * @param pItem The selected item */ -void PrefFont::slotItemSelected(QListViewItem* pItem) +void PrefFont::slotItemSelected(TQListViewItem* pItem) { FontListItem* pFontItem; - QFont font; + TQFont font; pFontItem = (FontListItem*)pItem; font = pFontItem->getFont(); - if (KFontDialog::getFont(font) == QDialog::Accepted) { + if (KFontDialog::getFont(font) == TQDialog::Accepted) { pFontItem->setFont(font); emit modified(); } diff --git a/src/preffont.h b/src/preffont.h index 66fdebc..c84fade 100644 --- a/src/preffont.h +++ b/src/preffont.h @@ -40,7 +40,7 @@ class PrefFont : public PrefFontLayout Q_OBJECT public: - PrefFont(QWidget* pParent = 0, const char* szName = 0); + PrefFont(TQWidget* pParent = 0, const char* szName = 0); ~PrefFont(); void load(); @@ -54,7 +54,7 @@ signals: void modified(); protected slots: - void slotItemSelected(QListViewItem*); + void slotItemSelected(TQListViewItem*); }; #endif diff --git a/src/preffontlayout.ui b/src/preffontlayout.ui index 983da52..138c2a9 100644 --- a/src/preffontlayout.ui +++ b/src/preffontlayout.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>PrefFontLayout</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>PrefFontLayout</cstring> </property> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QListView"> + <widget class="TQListView"> <column> <property name="text"> <string>GUI Element</string> @@ -51,19 +51,19 @@ <connections> <connection> <sender>m_pList</sender> - <signal>doubleClicked(QListViewItem*)</signal> + <signal>doubleClicked(TQListViewItem*)</signal> <receiver>PrefFontLayout</receiver> - <slot>slotItemSelected(QListViewItem*)</slot> + <slot>slotItemSelected(TQListViewItem*)</slot> </connection> <connection> <sender>m_pList</sender> - <signal>returnPressed(QListViewItem*)</signal> + <signal>returnPressed(TQListViewItem*)</signal> <receiver>PrefFontLayout</receiver> - <slot>slotItemSelected(QListViewItem*)</slot> + <slot>slotItemSelected(TQListViewItem*)</slot> </connection> </connections> <slots> - <slot access="protected">slotItemSelected(QListViewItem*)</slot> + <slot access="protected">slotItemSelected(TQListViewItem*)</slot> </slots> <layoutdefaults spacing="6" margin="11"/> </UI> diff --git a/src/preffrontend.cpp b/src/preffrontend.cpp index 3bedda7..526798f 100644 --- a/src/preffrontend.cpp +++ b/src/preffrontend.cpp @@ -25,8 +25,8 @@ * ***************************************************************************/ -#include <qcheckbox.h> -#include <qtextedit.h> +#include <ntqcheckbox.h> +#include <ntqtextedit.h> #include <kurlrequester.h> #include <klineedit.h> #include <kstandarddirs.h> @@ -40,7 +40,7 @@ * @param pParent The parent widget * @param szName The widget's name */ -PrefFrontend::PrefFrontend(QWidget* pParent, const char* szName) : +PrefFrontend::PrefFrontend(TQWidget* pParent, const char* szName) : PrefFrontendLayout(pParent, szName) { // Set initial values @@ -51,11 +51,11 @@ PrefFrontend::PrefFrontend(QWidget* pParent, const char* szName) : SLOT(slotGuessPaths())); // 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())); - connect(m_pCtagsURL, SIGNAL(textChanged(const QString&)), this, + connect(m_pCtagsURL, SIGNAL(textChanged(const TQString&)), this, SIGNAL(modified())); - connect(m_pDotURL, SIGNAL(textChanged(const QString&)), this, + connect(m_pDotURL, SIGNAL(textChanged(const TQString&)), this, SIGNAL(modified())); } @@ -94,7 +94,7 @@ void PrefFrontend::apply() * edit widgets. By emitting the modified() signal, the widget notifies the * parent dialog it should enable the "Apply" button. */ -void PrefFrontend::slotChanged(const QString&) +void PrefFrontend::slotChanged(const TQString&) { emit modified(); } @@ -117,8 +117,8 @@ void PrefFrontend::slotGuessPaths() // Show tests and results in the text widget connect(pConf, SIGNAL(test(uint)), this, SLOT(slotAutoConfigTest(uint))); - connect(pConf, SIGNAL(result(uint, const QString&)), this, - SLOT(slotAutoConfigResult(uint, const QString&))); + connect(pConf, SIGNAL(result(uint, const TQString&)), this, + SLOT(slotAutoConfigResult(uint, const TQString&))); // Run the script 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 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"; diff --git a/src/preffrontend.h b/src/preffrontend.h index fb46242..d0ac278 100644 --- a/src/preffrontend.h +++ b/src/preffrontend.h @@ -28,7 +28,7 @@ #ifndef PREFFRONTENDDLG_H #define PREFFRONTENDDLG_H -#include <qwidget.h> +#include <ntqwidget.h> #include <preffrontendlayout.h> /** @@ -42,7 +42,7 @@ class PrefFrontend : public PrefFrontendLayout Q_OBJECT public: - PrefFrontend(QWidget* pParent = 0, const char* szName = 0); + PrefFrontend(TQWidget* pParent = 0, const char* szName = 0); ~PrefFrontend(); void load(); @@ -56,10 +56,10 @@ signals: void modified(); private slots: - void slotChanged(const QString&); + void slotChanged(const TQString&); void slotGuessPaths(); void slotAutoConfigTest(uint); - void slotAutoConfigResult(uint, const QString&); + void slotAutoConfigResult(uint, const TQString&); }; #endif diff --git a/src/preffrontendlayout.ui b/src/preffrontendlayout.ui index e6b00c9..71afeed 100644 --- a/src/preffrontendlayout.ui +++ b/src/preffrontendlayout.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>PrefFrontendLayout</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>PrefFrontendLayout</cstring> </property> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout20</cstring> </property> @@ -27,7 +27,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout19</cstring> </property> @@ -35,7 +35,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -51,7 +51,7 @@ <string>Cscope path:</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -67,7 +67,7 @@ <string>Ctags path:</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -77,7 +77,7 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout18</cstring> </property> @@ -126,7 +126,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout4</cstring> </property> @@ -151,7 +151,7 @@ </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pGuessButton</cstring> </property> @@ -161,7 +161,7 @@ </widget> </hbox> </widget> - <widget class="QTextEdit"> + <widget class="TQTextEdit"> <property name="name"> <cstring>m_pScriptText</cstring> </property> diff --git a/src/prefopt.cpp b/src/prefopt.cpp index 7b52d8f..aefb6c8 100644 --- a/src/prefopt.cpp +++ b/src/prefopt.cpp @@ -25,10 +25,10 @@ * ***************************************************************************/ -#include <qcheckbox.h> -#include <qradiobutton.h> -#include <qlineedit.h> -#include <qlabel.h> +#include <ntqcheckbox.h> +#include <ntqradiobutton.h> +#include <ntqlineedit.h> +#include <ntqlabel.h> #include "prefopt.h" #include "kscopeconfig.h" @@ -37,7 +37,7 @@ * @param pParent The parent widget * @param szName The widget's name */ -PrefOpt::PrefOpt(QWidget* pParent, const char* szName) +PrefOpt::PrefOpt(TQWidget* pParent, const char* szName) : PrefOptLayout(pParent, szName) { // Set initial values @@ -58,7 +58,7 @@ PrefOpt::PrefOpt(QWidget* pParent, const char* szName) SIGNAL(modified())); connect(m_pAutoSortCheck, SIGNAL(toggled(bool)), this, SIGNAL(modified())); - connect(m_pExtEditorEdit, SIGNAL(textChanged(const QString&)), this, + connect(m_pExtEditorEdit, SIGNAL(textChanged(const TQString&)), this, SIGNAL(modified())); connect(m_pSysProfileCB, SIGNAL(activated(int)), this, SIGNAL(modified())); diff --git a/src/prefopt.h b/src/prefopt.h index 26e2572..09a1e97 100644 --- a/src/prefopt.h +++ b/src/prefopt.h @@ -40,7 +40,7 @@ class PrefOpt : public PrefOptLayout Q_OBJECT public: - PrefOpt(QWidget* pParent = 0, const char* szName = 0); + PrefOpt(TQWidget* pParent = 0, const char* szName = 0); ~PrefOpt(); void load(); diff --git a/src/prefoptlayout.ui b/src/prefoptlayout.ui index cbc8d07..4cf303a 100644 --- a/src/prefoptlayout.ui +++ b/src/prefoptlayout.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>PrefOptLayout</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>PrefOptLayout</cstring> </property> @@ -22,7 +22,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout7</cstring> </property> @@ -30,7 +30,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_pExtEditorLabel</cstring> </property> @@ -41,7 +41,7 @@ <string>External Editor</string> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>m_pExtEditorEdit</cstring> </property> @@ -59,7 +59,7 @@ </widget> </hbox> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_pReadOnlyCheck</cstring> </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> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_pLastProjCheck</cstring> </property> @@ -81,7 +81,7 @@ <string>Open Last Project on Start-Up</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_pTagHlCheck</cstring> </property> @@ -92,7 +92,7 @@ <string>Determines whether the tag list should highlight the relevant tag based on the cursor's position.</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_pBriefQueryCaptCheck</cstring> </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> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_pWarnModifiedOnDiskCheck</cstring> </property> @@ -114,7 +114,7 @@ <string>If set, the user is prompted whenever the currently edited file is changed by an external programme.</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_pAutoSortCheck</cstring> </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> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout2</cstring> </property> @@ -136,7 +136,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -144,7 +144,7 @@ <string>System Profile</string> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <item> <property name="text"> <string>Fast</string> @@ -161,7 +161,7 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout3</cstring> </property> @@ -169,7 +169,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -177,7 +177,7 @@ <string>Editor Popup Menu</string> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <item> <property name="text"> <string>Embedded</string> diff --git a/src/progressdlg.cpp b/src/progressdlg.cpp index 418a3c9..37e0487 100644 --- a/src/progressdlg.cpp +++ b/src/progressdlg.cpp @@ -34,8 +34,8 @@ * @param pParent The parent widget * @param szName The widget's name */ -ProgressDlg::ProgressDlg(const QString& sCaption, const QString& sText, - QWidget* pParent, const char* szName) : +ProgressDlg::ProgressDlg(const TQString& sCaption, const TQString& sText, + TQWidget* pParent, const char* szName) : KProgressDialog(pParent, szName, sCaption, sText, true), m_nIdleValue(-1) { @@ -43,7 +43,7 @@ ProgressDlg::ProgressDlg(const QString& sCaption, const QString& sText, setAllowCancel(false); // 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 connect (m_pIdleTimer, SIGNAL(timeout()), this, SLOT(slotShowBusy())); diff --git a/src/progressdlg.h b/src/progressdlg.h index d5f0e6b..3b29df6 100644 --- a/src/progressdlg.h +++ b/src/progressdlg.h @@ -28,8 +28,8 @@ #ifndef PROGRESSDLG_H #define PROGRESSDLG_H -#include <qwidget.h> -#include <qtimer.h> +#include <ntqwidget.h> +#include <ntqtimer.h> #include <kprogress.h> /** @@ -44,7 +44,7 @@ class ProgressDlg : public KProgressDialog Q_OBJECT public: - ProgressDlg(const QString&, const QString&, QWidget* pParent = 0, const + ProgressDlg(const TQString&, const TQString&, TQWidget* pParent = 0, const char* szName = 0); ~ProgressDlg(); @@ -54,7 +54,7 @@ public: private: /** When the value is 0, this timer initiates value changes that cause 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. */ int m_nIdleValue; diff --git a/src/project.cpp b/src/project.cpp index 06e1332..9e72648 100644 --- a/src/project.cpp +++ b/src/project.cpp @@ -36,10 +36,10 @@ #define PROJECT_CONFIG_VER 2 -inline void flListFromStringList(FileLocationList& fll, const QStringList& sl) +inline void flListFromStringList(FileLocationList& fll, const TQStringList& sl) { - QStringList::ConstIterator itr; - QString sPath; + TQStringList::ConstIterator itr; + TQString sPath; uint nLine, nCol; // 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; FileLocation* pLoc; - QString sLoc; + TQString sLoc; // Nasty... pList = (FileLocationList*)&fll; @@ -65,7 +65,7 @@ inline void stringListFromFlList(QStringList& sl, const FileLocationList& fll) // the configuration file for (pLoc = pList->first(); pLoc != NULL; pLoc = pList->next()) { sLoc = ""; - QTextOStream(&sLoc) << pLoc->m_sPath << ":" << pLoc->m_nLine << ":" + TQTextOStream(&sLoc) << pLoc->m_sPath << ":" << pLoc->m_nLine << ":" << pLoc->m_nCol; 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; // Associate the object with the project directory @@ -116,7 +116,7 @@ bool Project::open(const QString& sPath) // Get the project name m_pConf->setGroup("Project"); m_sName = m_pConf->readEntry("Name"); - if (m_sName == QString::null) { + if (m_sName == TQString::null) { KMessageBox::error(0, i18n("Cannot read project name")); return false; } @@ -146,9 +146,9 @@ void Project::close() * Returns a semi-colon separated list of the file types included in the * current project. */ -QString Project::getFileTypes() const +TQString Project::getFileTypes() const { - QString sTypes; + TQString sTypes; m_pConf->setGroup("Project"); return m_pConf->readEntry("FileTypes"); @@ -199,7 +199,7 @@ void Project::setOptions(const Options& opt) */ void Project::loadSession(Session& sess) { - QStringList slEntry; + TQStringList slEntry; m_pConf->setGroup("Session"); @@ -233,7 +233,7 @@ void Project::loadSession(Session& sess) */ void Project::storeSession(const Session& sess) { - QStringList slEntry; + TQStringList slEntry; m_pConf->setGroup("Session"); @@ -271,15 +271,15 @@ void Project::storeSession(const Session& sess) */ bool Project::loadFileList(FileListTarget* pList) { - QString sFilePath; + TQString sFilePath; // Open the 'cscope.files' file if (!m_fiFileList.open(IO_ReadOnly)) return false; // Read all file names from the file - QTextStream str(&m_fiFileList); - while ((sFilePath = str.readLine()) != QString::null) { + TQTextStream str(&m_fiFileList); + while ((sFilePath = str.readLine()) != TQString::null) { // Skip option lines if (sFilePath.at(0) == '-') continue; @@ -299,13 +299,13 @@ bool Project::loadFileList(FileListTarget* pList) */ bool Project::storeFileList(FileListSource* pList) { - QString sFilePath; + TQString sFilePath; // Open the 'cscope.files' file if (!m_fiFileList.open(IO_WriteOnly | IO_Truncate)) return false; - QTextStream str(&m_fiFileList); + TQTextStream str(&m_fiFileList); // Write all file names if (pList->firstItem(sFilePath)) { @@ -323,14 +323,14 @@ bool Project::storeFileList(FileListSource* pList) * @param sPath The path of the file to add * @return true if successful, false otherwise */ -bool Project::addFile(const QString& sPath) +bool Project::addFile(const TQString& sPath) { // Open the 'cscope.files' file if (!m_fiFileList.open(IO_WriteOnly | IO_Append)) return false; // Write the file path - QTextStream str(&m_fiFileList); + TQTextStream str(&m_fiFileList); str << sPath << "\n"; m_fiFileList.close(); @@ -347,7 +347,7 @@ bool Project::addFile(const QString& sPath) */ bool Project::isEmpty() { - QString sPath, sFileName; + TQString sPath, sFileName; bool bResult = true; // Open the 'cscope.files' file @@ -355,8 +355,8 @@ bool Project::isEmpty() return true; // Find at least one file name entry in the file - QTextStream str(&m_fiFileList); - while ((sPath = str.readLine()) != QString::null) { + TQTextStream str(&m_fiFileList); + while ((sPath = str.readLine()) != TQString::null) { if (sPath.at(0) != '-') { bResult = false; break; @@ -371,7 +371,7 @@ bool Project::isEmpty() * Copies the list of previously queried symbols to the target object. * @param slSymHistory The list object to copy into */ -void Project::getSymHistory(QStringList& slSymHistory) const +void Project::getSymHistory(TQStringList& slSymHistory) const { slSymHistory = m_slSymHistory; } @@ -380,12 +380,12 @@ void Project::getSymHistory(QStringList& slSymHistory) const * Copies the list of previously queried symbols from the target object. * @param slSymHistory The list object to copy from */ -void Project::setSymHistory(QStringList& slSymHistory) +void Project::setSymHistory(TQStringList& slSymHistory) { m_slSymHistory = slSymHistory; } -void Project::getMakeParams(QString& sCmd, QString& sDir) const +void Project::getMakeParams(TQString& sCmd, TQString& sDir) const { sCmd = m_sMakeCmd; 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 opt Project options */ -bool Project::create(const QString& sName, const QString& sPath, +bool Project::create(const TQString& sName, const TQString& sPath, const Options& opt) { // Prepare the project's files diff --git a/src/project.h b/src/project.h index a2679b2..5569490 100644 --- a/src/project.h +++ b/src/project.h @@ -41,29 +41,29 @@ public: struct Session { FileLocationList fllOpenFiles; - QString sLastFile; - QStringList slQueryFiles; - QStringList slCallTreeFiles; + TQString sLastFile; + TQStringList slQueryFiles; + TQStringList slCallTreeFiles; FileLocationList fllBookmarks; - QString sMakeCmd; - QString sMakeRoot; + TQString sMakeCmd; + TQString sMakeRoot; }; - virtual bool open(const QString&); + virtual bool open(const TQString&); virtual bool loadFileList(FileListTarget*); virtual bool storeFileList(FileListSource*); - virtual bool addFile(const QString&); + virtual bool addFile(const TQString&); virtual bool isEmpty(); virtual void close(); - virtual QString getFileTypes() const; + virtual TQString getFileTypes() const; virtual void getOptions(Options&) const; virtual void setOptions(const Options&); virtual void loadSession(Session&); virtual void storeSession(const Session&); - virtual void getSymHistory(QStringList&) const; - virtual void setSymHistory(QStringList&); - virtual void getMakeParams(QString&, QString&) const; + virtual void getSymHistory(TQStringList&) const; + virtual void setSymHistory(TQStringList&); + virtual void getMakeParams(TQString&, TQString&) const; /** * Determines whether a project is based on a Cscope.out file, and is @@ -72,7 +72,7 @@ public: */ virtual bool isTemporary() { return false; } - static bool create(const QString&, const QString&, const Options&); + static bool create(const TQString&, const TQString&, const Options&); private: /** The configuration file ("cscope.proj") */ @@ -80,11 +80,11 @@ private: /** The file that holds the paths of all source files in this project ("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&); }; diff --git a/src/projectbase.cpp b/src/projectbase.cpp index f99c045..603ba44 100644 --- a/src/projectbase.cpp +++ b/src/projectbase.cpp @@ -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 if (!fi.exists() || !isCscopeOut(fi.absFilePath())) @@ -73,7 +73,7 @@ void ProjectBase::getOptions(Options& opt) const getDefOptions(opt); } -void ProjectBase::getMakeParams(QString& sCmd, QString& sDir) const +void ProjectBase::getMakeParams(TQString& sCmd, TQString& sDir) const { sCmd = "make"; sDir = getSourceRoot(); @@ -136,10 +136,10 @@ void ProjectBase::initOptions() * @param sPath The full path of the file to check * @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); - QString sLine; + TQFile file(sPath); + TQString sLine; int nVer; char szDir[PATH_MAX]; @@ -148,7 +148,7 @@ bool ProjectBase::isCscopeOut(const QString& sPath) return false; // 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; } @@ -162,8 +162,8 @@ bool ProjectBase::isCscopeOut(const QString& sPath) */ bool ProjectBase::loadFileList(FileListTarget* pList) { - QString sFilePath; - QFile file; + TQString sFilePath; + TQFile file; // Make sure the file exists if (!m_dir.exists("cscope.files")) @@ -175,8 +175,8 @@ bool ProjectBase::loadFileList(FileListTarget* pList) return false; // Read all file names from the file - QTextStream str(&file); - while ((sFilePath = str.readLine()) != QString::null) { + TQTextStream str(&file); + while ((sFilePath = str.readLine()) != TQString::null) { // Skip option lines if (sFilePath.at(0) == '-') continue; diff --git a/src/projectbase.h b/src/projectbase.h index 4170652..eb0356d 100644 --- a/src/projectbase.h +++ b/src/projectbase.h @@ -28,9 +28,9 @@ #ifndef PROJECTBASE_H #define PROJECTBASE_H -#include <qstringlist.h> -#include <qdir.h> -#include <qfile.h> +#include <ntqstringlist.h> +#include <ntqdir.h> +#include <ntqfile.h> #include <kconfig.h> #define DEF_IS_KERNEL false @@ -75,7 +75,7 @@ public: * Appends a file to the list. * @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 * @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. * @param sFilePath Holds the path of the file, upon return * @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 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) {} /** The full path of the file. */ - QString m_sPath; + TQString m_sPath; /** The line position of the cursor. */ uint m_nLine; @@ -145,7 +145,7 @@ struct FileLocation /** * A list of file locations used for restoring a session. */ -typedef QPtrList<FileLocation> FileLocationList; +typedef TQPtrList<FileLocation> FileLocationList; class FileSemaphore; @@ -162,11 +162,11 @@ public: * Configurable project options. */ struct Options { - QString sSrcRootPath; + TQString sSrcRootPath; /** A list of MIME-types that determines which files are included in the project. */ - QStringList slFileTypes; + TQStringList slFileTypes; /** true if the -k option for CScope should be used. */ bool bKernel; @@ -201,22 +201,22 @@ public: uint nTabWidth; /** Ctags command line. */ - QString sCtagsCmd; + TQString sCtagsCmd; }; - virtual bool open(const QString&); + virtual bool open(const TQString&); virtual bool loadFileList(FileListTarget*); virtual bool storeFileList(FileListSource*) { return false; } virtual bool isEmpty() { return false; } bool dbExists(); virtual void close() {} - virtual QString getFileTypes() const { return QString::null; } + virtual TQString getFileTypes() const { return TQString::null; } virtual void getOptions(Options&) const; virtual void setOptions(const Options&) {} - virtual void getSymHistory(QStringList&) const {} - virtual void setSymHistory(QStringList&) {} - virtual void getMakeParams(QString&, QString&) const; + virtual void getSymHistory(TQStringList&) const {} + virtual void setSymHistory(TQStringList&) {} + virtual void getMakeParams(TQString&, TQString&) const; /** * 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 */ - QString getName() const { return m_sName; } + TQString getName() const { return m_sName; } /** * @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 @@ -241,7 +241,7 @@ public: */ 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 @@ -258,10 +258,10 @@ public: protected: /** The name of the project, as written in the configuration file */ - QString m_sName; + TQString m_sName; /** The directory associated with the project */ - QDir m_dir; + TQDir m_dir; /** A cached version of the project's options. */ Options m_opt; @@ -271,11 +271,11 @@ protected: uint m_nArgs; /** A list of symbols previously queried. */ - QStringList m_slSymHistory; + TQStringList m_slSymHistory; void initOptions(); - static bool isCscopeOut(const QString&); + static bool isCscopeOut(const TQString&); }; #endif diff --git a/src/projectfilesdlg.cpp b/src/projectfilesdlg.cpp index de84417..badcdd1 100644 --- a/src/projectfilesdlg.cpp +++ b/src/projectfilesdlg.cpp @@ -25,10 +25,10 @@ * ***************************************************************************/ -#include <qpushbutton.h> -#include <qlistview.h> -#include <qlineedit.h> -#include <qregexp.h> +#include <ntqpushbutton.h> +#include <ntqlistview.h> +#include <ntqlineedit.h> +#include <ntqregexp.h> #include <klocale.h> #include <kmessagebox.h> #include <kfiledialog.h> @@ -43,7 +43,7 @@ * @param pParent The parent widget * @param szName The widget's name */ -ProjectFilesDlg::ProjectFilesDlg(Project* pProj, QWidget* pParent, +ProjectFilesDlg::ProjectFilesDlg(Project* pProj, TQWidget* pParent, const char* szName) : ProjectFilesLayout(pParent, szName), m_pProj(pProj), @@ -55,7 +55,7 @@ ProjectFilesDlg::ProjectFilesDlg(Project* pProj, QWidget* pParent, m_pScanner = new DirScanner(this, &m_dicFiles); // Initialise the list view - m_pFileList->setSelectionMode(QListView::Extended); + m_pFileList->setSelectionMode(TQListView::Extended); m_pFileList->addColumn("File Path"); // Sort only when asked to by the user @@ -108,11 +108,11 @@ ProjectFilesDlg::~ProjectFilesDlg() * and is added to the list. * @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); m_pLastItem = 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 * @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(); return nextItem(sFilePath); @@ -140,7 +140,7 @@ bool ProjectFilesDlg::firstItem(QString& sFilePath) * @return bool true if successful, false if no more items are * available */ -bool ProjectFilesDlg::nextItem(QString& sFilePath) +bool ProjectFilesDlg::nextItem(TQString& sFilePath) { if (m_pItrItem == NULL) return false; @@ -156,10 +156,10 @@ bool ProjectFilesDlg::nextItem(QString& sFilePath) * project. * @param pEvent The event object */ -void ProjectFilesDlg::customEvent(QCustomEvent* pEvent) +void ProjectFilesDlg::customEvent(TQCustomEvent* pEvent) { DirScanEvent* pDSE; - QString sMsg; + TQString sMsg; // Process only directory scan progress events if (((uint)pEvent->type()) != DirScanEvent::EventId) @@ -207,8 +207,8 @@ void ProjectFilesDlg::customEvent(QCustomEvent* pEvent) return; // Add the files to the list - const QStringList& slFiles = m_pScanner->getFiles(); - QStringList::const_iterator itr; + const TQStringList& slFiles = m_pScanner->getFiles(); + TQStringList::const_iterator itr; for (itr = slFiles.begin(); itr != slFiles.end(); ++itr) addItem(*itr); @@ -217,7 +217,7 @@ void ProjectFilesDlg::customEvent(QCustomEvent* pEvent) /** * Removes a single item from the file list. */ -void ProjectFilesDlg::removeItem(QListViewItem* pItem) +void ProjectFilesDlg::removeItem(TQListViewItem* pItem) { m_dicFiles.remove(pItem->text(0)); delete pItem; @@ -230,8 +230,8 @@ void ProjectFilesDlg::removeItem(QListViewItem* pItem) */ void ProjectFilesDlg::slotAddFiles() { - QStringList slFiles; - QStringList::const_iterator itr; + TQStringList slFiles; + TQStringList::const_iterator itr; // Prompt the user slFiles = KFileDialog::getOpenFileNames(m_pProj->getSourceRoot(), @@ -253,9 +253,9 @@ void ProjectFilesDlg::slotAddFiles() */ void ProjectFilesDlg::slotAddDir() { - QString sDir; - QStringList slFiles; - QStringList::const_iterator itr; + TQString sDir; + TQStringList slFiles; + TQStringList::const_iterator itr; // Prompt the user for a directory sDir = KFileDialog::getExistingDirectory(m_pProj->getSourceRoot()); @@ -275,9 +275,9 @@ void ProjectFilesDlg::slotAddDir() */ void ProjectFilesDlg::slotAddTree() { - QString sDir; - QStringList slFiles; - QStringList::const_iterator itr; + TQString sDir; + TQStringList slFiles; + TQStringList::const_iterator itr; // Prompt the user for a directory sDir = KFileDialog::getExistingDirectory(m_pProj->getSourceRoot()); @@ -293,7 +293,7 @@ void ProjectFilesDlg::slotAddTree() */ void ProjectFilesDlg::slotRemSel() { - QListViewItem* pItem, * pPrevItem; + TQListViewItem* pItem, * pPrevItem; // Prompt the user before removing the files if (KMessageBox::questionYesNo(0, i18n("Are you sure you want to remove " @@ -317,8 +317,8 @@ void ProjectFilesDlg::slotRemSel() */ void ProjectFilesDlg::slotRemDir() { - QString sDir, sFilePath; - QListViewItem* pItem, * pPrevItem; + TQString sDir, sFilePath; + TQListViewItem* pItem, * pPrevItem; // Prompt the user for a directory sDir = KFileDialog::getExistingDirectory(m_pProj->getSourceRoot()); @@ -350,8 +350,8 @@ void ProjectFilesDlg::slotRemDir() */ void ProjectFilesDlg::slotRemTree() { - QString sDir, sFilePath; - QListViewItem* pItem, * pPrevItem; + TQString sDir, sFilePath; + TQListViewItem* pItem, * pPrevItem; // Prompt the user for a directory sDir = KFileDialog::getExistingDirectory(m_pProj->getSourceRoot()); @@ -385,8 +385,8 @@ void ProjectFilesDlg::slotRemTree() */ void ProjectFilesDlg::slotFilter() { - QString sFilter; - QListViewItem* pItem; + TQString sFilter; + TQListViewItem* pItem; // Get the user's filter string sFilter = m_pFilterEdit->text().stripWhiteSpace(); @@ -394,7 +394,7 @@ void ProjectFilesDlg::slotFilter() return; // Create the regular expression - QRegExp reFilter(sFilter); + TQRegExp reFilter(sFilter); reFilter.setWildcard(true); // Iterate over the list entries, and hide all items not matching the @@ -415,7 +415,7 @@ void ProjectFilesDlg::slotFilter() */ void ProjectFilesDlg::slotShowAll() { - QListViewItem* pItem; + TQListViewItem* pItem; // Iterate over the list entries, and make all items visible pItem = m_pFileList->firstChild(); diff --git a/src/projectfilesdlg.h b/src/projectfilesdlg.h index 9c6d791..abd86ef 100644 --- a/src/projectfilesdlg.h +++ b/src/projectfilesdlg.h @@ -28,9 +28,9 @@ #ifndef PROJECTFILESDLG_H #define PROJECTFILESDLG_H -#include <qwidget.h> +#include <ntqwidget.h> #include <projectfileslayout.h> -#include <qdict.h> +#include <ntqdict.h> #include "project.h" class DirScanner; @@ -44,7 +44,7 @@ class ScanProgressDlg; * removed, this list view is updated. The project, however, is only modified * if the user closes the dialog using the "OK" button. * 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 * list. * @author Elad Lahav @@ -56,15 +56,15 @@ class ProjectFilesDlg : public ProjectFilesLayout, public FileListTarget, Q_OBJECT public: - ProjectFilesDlg(Project*, QWidget* pParent = 0, const char* szName = 0); + ProjectFilesDlg(Project*, TQWidget* pParent = 0, const char* szName = 0); ~ProjectFilesDlg(); - virtual void addItem(const QString&); - virtual bool firstItem(QString&); - virtual bool nextItem(QString&); + virtual void addItem(const TQString&); + virtual bool firstItem(TQString&); + virtual bool nextItem(TQString&); protected: - virtual void customEvent(QCustomEvent*); + virtual void customEvent(TQCustomEvent*); private: /** The project to manipulate. */ @@ -72,7 +72,7 @@ private: /** Holds all file paths in a quickly searchable format (for duplicate entries lookup). */ - QDict<QListViewItem> m_dicFiles; + TQDict<TQListViewItem> m_dicFiles; /** A thread object to a-synchronously scan directories for source files to add to the project. */ @@ -82,12 +82,12 @@ private: ScanProgressDlg* m_pScanDlg; /** A file list item that serves as an iterator. */ - QListViewItem* m_pItrItem; + TQListViewItem* m_pItrItem; /** The last item added. */ - QListViewItem* m_pLastItem; + TQListViewItem* m_pLastItem; - void removeItem(QListViewItem*); + void removeItem(TQListViewItem*); private slots: void slotAddFiles(); diff --git a/src/projectfileslayout.ui b/src/projectfileslayout.ui index a78af7e..21767cc 100644 --- a/src/projectfileslayout.ui +++ b/src/projectfileslayout.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.1" stdsetdef="1"> <class>ProjectFilesLayout</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>ProjectFilesLayout</cstring> </property> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout5</cstring> </property> @@ -27,7 +27,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout4</cstring> </property> @@ -35,12 +35,12 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>m_pFilterEdit</cstring> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pFilterButton</cstring> </property> @@ -48,7 +48,7 @@ <string>Filter</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pShowAllButton</cstring> </property> @@ -58,14 +58,14 @@ </widget> </hbox> </widget> - <widget class="QListView"> + <widget class="TQListView"> <property name="name"> <cstring>m_pFileList</cstring> </property> </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout5</cstring> </property> @@ -73,7 +73,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -84,7 +84,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pAddFilesButton</cstring> </property> @@ -92,7 +92,7 @@ <string>Files...</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pAddDirButton</cstring> </property> @@ -100,7 +100,7 @@ <string>Directory...</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pAddTreeButton</cstring> </property> @@ -110,7 +110,7 @@ </widget> </vbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox2</cstring> </property> @@ -121,7 +121,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pRemSelButton</cstring> </property> @@ -129,7 +129,7 @@ <string>Selected</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pRemDirButton</cstring> </property> @@ -137,7 +137,7 @@ <string>Directory...</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pRemTreeButton</cstring> </property> @@ -164,7 +164,7 @@ </size> </property> </spacer> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox3</cstring> </property> @@ -175,7 +175,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pOKButton</cstring> </property> @@ -183,7 +183,7 @@ <string>OK</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pCancelButton</cstring> </property> diff --git a/src/projectmanager.cpp b/src/projectmanager.cpp index 998b4a5..252946d 100644 --- a/src/projectmanager.cpp +++ b/src/projectmanager.cpp @@ -58,17 +58,17 @@ ProjectManager::~ProjectManager() * @param opt A structure containing project options * @return true if successful, false otherwise */ -bool ProjectManager::create(const QString& sName, const QString& sPath, - const ProjectBase::Options& opt, QString& sProjDir) +bool ProjectManager::create(const TQString& sName, const TQString& sPath, + const ProjectBase::Options& opt, TQString& sProjDir) { - QDir dir(sPath); - QString sParentPath; - QString sDirName = sName; - QString sMsg; + TQDir dir(sPath); + TQString sParentPath; + TQString sDirName = sName; + TQString sMsg; // Handle requests for a hidden .cscope directory if (dir.dirName() == ".cscope") { - sParentPath = QDir::cleanDirPath(dir.absPath()); + sParentPath = TQDir::cleanDirPath(dir.absPath()); sParentPath = sParentPath.section('/', 0, -2); dir.cd(sParentPath); sDirName = ".cscope"; @@ -110,7 +110,7 @@ bool ProjectManager::create(const QString& sName, const QString& sPath, * @param sPath The directory containing the project's files * @return true if successful, false otherwise */ -bool ProjectManager::open(const QString& sPath) +bool ProjectManager::open(const TQString& sPath) { Project* pProj; @@ -137,7 +137,7 @@ bool ProjectManager::open(const QString& sPath) * @param sFilePath The full path of the Cscope.out file * @return true if successful, false otherwise */ -bool ProjectManager::openCscopeOut(const QString& sFilePath) +bool ProjectManager::openCscopeOut(const TQString& sFilePath) { ProjectBase* pProj; @@ -171,7 +171,7 @@ void ProjectManager::close() } } -QString ProjectManager::getProjName() const +TQString ProjectManager::getProjName() const { if (!m_pCurProj) return i18n("No Project"); diff --git a/src/projectmanager.h b/src/projectmanager.h index c78a2c9..d45dd7d 100644 --- a/src/projectmanager.h +++ b/src/projectmanager.h @@ -33,18 +33,18 @@ /** * @author Elad Lahav */ -class ProjectManager : public QObject +class ProjectManager : public TQObject { public: ProjectManager(); virtual ~ProjectManager(); - bool create(const QString&, const QString&, const ProjectBase::Options&, - QString&); - bool open(const QString&); - bool openCscopeOut(const QString&); + bool create(const TQString&, const TQString&, const ProjectBase::Options&, + TQString&); + bool open(const TQString&); + bool openCscopeOut(const TQString&); void close(); - QString getProjName() const; + TQString getProjName() const; ProjectBase* curProject() const { return m_pCurProj; } diff --git a/src/querypage.cpp b/src/querypage.cpp index 502747b..c5e9b9a 100644 --- a/src/querypage.cpp +++ b/src/querypage.cpp @@ -25,7 +25,7 @@ * ***************************************************************************/ -#include <qfile.h> +#include <ntqfile.h> #include <klocale.h> #include "querypage.h" #include "queryview.h" @@ -49,15 +49,15 @@ const char* QUERY_TYPES[][2] = { * @param pParent The parent widget * @param szName The widget's name */ -QueryPage::QueryPage(QWidget* pParent, const char * szName) : +QueryPage::QueryPage(TQWidget* pParent, const char * szName) : QueryPageBase(pParent, szName), m_nType(CscopeFrontend::None) { m_pView = new QueryView(this); m_pDriver = new QueryViewDriver(m_pView, this); - connect(m_pView, SIGNAL(lineRequested(const QString&, uint)), this, - SIGNAL(lineRequested(const QString&, uint))); + connect(m_pView, SIGNAL(lineRequested(const TQString&, uint)), this, + SIGNAL(lineRequested(const TQString&, uint))); // Set colours and font applyPrefs(); @@ -76,7 +76,7 @@ QueryPage::~QueryPage() * @param sText The text of the query * @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_sText = sText; @@ -103,8 +103,8 @@ void QueryPage::clear() { m_pView->clear(); m_nType = CscopeFrontend::None; - m_sText = QString(); - m_sName = QString(); + m_sText = TQString(); + m_sName = TQString(); } /** @@ -121,9 +121,9 @@ bool QueryPage::isRunning() * (default) for the full version * @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 sText The contents of the line */ -void QueryPage::addRecord(const QString& sFile, const QString& sFunc, - const QString& sLine, const QString& sText) +void QueryPage::addRecord(const TQString& sFile, const TQString& sFunc, + 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 * @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; // Do nothing if not initialised @@ -157,8 +157,8 @@ QString QueryPage::getFileName(const QString& sProjPath) const sFileNameBase = m_sName; sFileNameBase.replace(' ', '_'); do { - sFileName = sFileNameBase + QString::number(++i); - } while (QFile(sProjPath + "/" + sFileName).exists()); + sFileName = sFileNameBase + TQString::number(++i); + } while (TQFile(sProjPath + "/" + sFileName).exists()); 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 * @return true if successful, false otherwise */ -bool QueryPage::readHeader(QTextStream& str) +bool QueryPage::readHeader(TQTextStream& str) { - QString sTemp; + TQString sTemp; // Read the query name m_sName = str.readLine(); - if (m_sName == QString::null || m_sName.isEmpty()) + if (m_sName == TQString::null || m_sName.isEmpty()) return false; // Read the query's type sTemp = str.readLine(); - if (sTemp == QString::null || sTemp.isEmpty()) + if (sTemp == TQString::null || sTemp.isEmpty()) return false; // Convert the type string to an integer @@ -192,7 +192,7 @@ bool QueryPage::readHeader(QTextStream& str) // Read the query's text m_sText = str.readLine(); - if (m_sText == QString::null || m_sText.isEmpty()) + if (m_sText == TQString::null || m_sText.isEmpty()) return false; return true; @@ -203,7 +203,7 @@ bool QueryPage::readHeader(QTextStream& str) * This mehtod is used as part of the storing process. * @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"; } diff --git a/src/querypage.h b/src/querypage.h index 59d6ea2..a1a78e0 100644 --- a/src/querypage.h +++ b/src/querypage.h @@ -28,9 +28,9 @@ #ifndef QUERYPAGE_H #define QUERYPAGE_H -#include <qwidget.h> -#include <qlistview.h> -#include <qregexp.h> +#include <ntqwidget.h> +#include <ntqlistview.h> +#include <ntqregexp.h> #include "querypagebase.h" #include "cscopefrontend.h" @@ -47,36 +47,36 @@ class QueryPage : public QueryPageBase Q_OBJECT public: - QueryPage(QWidget* pParent = 0, const char* szName = 0); + QueryPage(TQWidget* pParent = 0, const char* szName = 0); ~QueryPage(); - void query(uint, const QString&, bool); + void query(uint, const TQString&, bool); void refresh(); void clear(); bool isRunning(); - virtual QString getCaption(bool bBrief = false) const; + virtual TQString getCaption(bool bBrief = false) const; protected: - virtual void addRecord(const QString&, const QString&, const QString&, - const QString&); - virtual QString getFileName(const QString&) const; - virtual bool readHeader(QTextStream&); - virtual void writeHeader(QTextStream&); + virtual void addRecord(const TQString&, const TQString&, const TQString&, + const TQString&); + virtual TQString getFileName(const TQString&) const; + virtual bool readHeader(TQTextStream&); + virtual void writeHeader(TQTextStream&); private: /** The type of query whose results are listed on this page. */ uint m_nType; /** The text given as a parameter to the query. */ - QString m_sText; + TQString m_sText; /** Whether the query is case-sensitive. */ bool m_bCase; /** A formatted caption for this query, including the type of query and its text. */ - QString m_sName; + TQString m_sName; private: /** Runs Cscope queries whose results are displayed in this page. */ diff --git a/src/querypagebase.cpp b/src/querypagebase.cpp index 08cbe6d..8af1872 100644 --- a/src/querypagebase.cpp +++ b/src/querypagebase.cpp @@ -25,7 +25,7 @@ * ***************************************************************************/ -#include <qfile.h> +#include <ntqfile.h> #include "querypagebase.h" #include "queryview.h" #include "kscopeconfig.h" @@ -37,8 +37,8 @@ * @param pParent The parent widget * @param szName The widget's name */ -QueryPageBase::QueryPageBase(QWidget* pParent, const char* szName) : - QHBox(pParent, szName), +QueryPageBase::QueryPageBase(TQWidget* pParent, const char* szName) : + TQHBox(pParent, szName), m_bLocked(false) { } @@ -70,20 +70,20 @@ void QueryPageBase::applyPrefs() * @param sFileName The name of the query file to load * @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; // Try to open the query file for reading - QFile file(sProjPath + "/" + sFileName); + TQFile file(sProjPath + "/" + sFileName); if (!file.open(IO_ReadOnly)) 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 - QTextStream str(&file); + TQTextStream str(&file); // Make sure the file's version is correct sTemp = str.readLine(); @@ -99,7 +99,7 @@ bool QueryPageBase::load(const QString& sProjPath, const QString& sFileName) // Read query records sTemp = str.readLine(); nState = 0; - while (sTemp != QString::null) { + while (sTemp != TQString::null) { switch (nState) { // File path case 0: @@ -143,9 +143,9 @@ bool QueryPageBase::load(const QString& sProjPath, const QString& sFileName) * return * @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 sFileName = getFileName(sProjPath); @@ -153,11 +153,11 @@ bool QueryPageBase::save(const QString& sProjPath, QString& sFileName) return false; // Open the query file for writing - QFile file(sProjPath + "/" + sFileName); + TQFile file(sProjPath + "/" + sFileName); if (!file.open(IO_WriteOnly)) return false; - QTextStream str(&file); + TQTextStream str(&file); // Write the version string str << FILE_VERSION << "\n"; diff --git a/src/querypagebase.h b/src/querypagebase.h index 8603874..1fe086c 100644 --- a/src/querypagebase.h +++ b/src/querypagebase.h @@ -28,7 +28,7 @@ #ifndef QUERYPAGEBASE_H #define QUERYPAGEBASE_H -#include <qhbox.h> +#include <ntqhbox.h> class QueryView; @@ -42,16 +42,16 @@ class QueryView; * of widget is defined by the different page classes. * @author Elad Lahav */ -class QueryPageBase : public QHBox +class QueryPageBase : public TQHBox { Q_OBJECT public: - QueryPageBase(QWidget* pParent = 0, const char* szName = 0); + QueryPageBase(TQWidget* pParent = 0, const char* szName = 0); ~QueryPageBase(); void applyPrefs(); - bool load(const QString&, const QString&); - bool save(const QString&, QString&); + bool load(const TQString&, const TQString&); + bool save(const TQString&, TQString&); void selectNext(); void selectPrev(); @@ -89,7 +89,7 @@ public: * @param bBrief true to generate a brief caption, false otherwise * @return The page's title */ - virtual QString getCaption(bool bBrief = false) const = 0; + virtual TQString getCaption(bool bBrief = false) const = 0; signals: /** @@ -97,7 +97,7 @@ signals: * @param sFile The "File" 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: /** The embedded list. */ @@ -116,8 +116,8 @@ protected: * @param sLine The "Line" field of the record * @param sText The "Text" field of the record */ - virtual void addRecord(const QString& sFile, const QString& sFunc, - const QString& sLine, const QString& sText) = 0; + virtual void addRecord(const TQString& sFile, const TQString& sFunc, + const TQString& sLine, const TQString& sText) = 0; /** * Creates a file path to store this page. @@ -126,7 +126,7 @@ protected: * @param sProjPath The project's directory * @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. @@ -135,14 +135,14 @@ protected: * @return true if the header was read successfully and contains the * expected information, false otherwise */ - virtual bool readHeader(QTextStream& str) = 0; + virtual bool readHeader(TQTextStream& str) = 0; /** * Writes a header to a page's file. * The contents of the header differ among inheriting classes. * @param str A text stream initialised to the open page file */ - virtual void writeHeader(QTextStream& str) = 0; + virtual void writeHeader(TQTextStream& str) = 0; }; #endif diff --git a/src/queryresultsmenu.cpp b/src/queryresultsmenu.cpp index 74bcdb4..0883ff6 100644 --- a/src/queryresultsmenu.cpp +++ b/src/queryresultsmenu.cpp @@ -33,8 +33,8 @@ * @param pParent Parent widget * @param szName Optional object name */ -QueryResultsMenu::QueryResultsMenu(QWidget* pParent, const char* szName) : - QPopupMenu(pParent, szName), +QueryResultsMenu::QueryResultsMenu(TQWidget* pParent, const char* szName) : + TQPopupMenu(pParent, szName), m_pItem(NULL) { // Create the menu @@ -65,7 +65,7 @@ QueryResultsMenu::~QueryResultsMenu() * @param nCol The column over which the menu was requested, -1 if no * column is associated with the request */ -void QueryResultsMenu::slotShow(QListViewItem* pItem, const QPoint& ptPos, +void QueryResultsMenu::slotShow(TQListViewItem* pItem, const TQPoint& ptPos, int nCol) { // Save the requested item and column number to use in signals diff --git a/src/queryresultsmenu.h b/src/queryresultsmenu.h index 099dd2e..8a34af5 100644 --- a/src/queryresultsmenu.h +++ b/src/queryresultsmenu.h @@ -28,9 +28,9 @@ #ifndef QUERYRESULTSMENU_H #define QUERYRESULTSMENU_H -#include <qpopupmenu.h> -#include <qlistview.h> -#include <qregexp.h> +#include <ntqpopupmenu.h> +#include <ntqlistview.h> +#include <ntqregexp.h> /** * Provides a popup-menu for list views containing query results. @@ -41,36 +41,36 @@ * constructing the object. * @author Elad Lahav */ -class QueryResultsMenu : public QPopupMenu +class QueryResultsMenu : public TQPopupMenu { Q_OBJECT public: - QueryResultsMenu(QWidget* pParent = 0, const char* szName = 0); + QueryResultsMenu(TQWidget* pParent = 0, const char* szName = 0); ~QueryResultsMenu(); public slots: - void slotShow(QListViewItem*, const QPoint&, int nCol); + void slotShow(TQListViewItem*, const TQPoint&, int nCol); signals: /** * Indicates that the "View Source" menu item was selected. * @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. * @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. * @param pItem The item for which the menu was displayed * @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. @@ -87,14 +87,14 @@ signals: * Indicates that the "Remove Item" menu item was selected. * @param pItem The item for which the menu was displayed */ - void remove(QListViewItem* pItem); + void remove(TQListViewItem* pItem); private: /** Menu item IDs. */ enum { ViewSource, FindDef, Copy, Filter, ShowAll, Remove }; /** 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. */ int m_nCol; diff --git a/src/queryview.cpp b/src/queryview.cpp index c56a2b0..f791b5d 100644 --- a/src/queryview.cpp +++ b/src/queryview.cpp @@ -25,8 +25,8 @@ * ***************************************************************************/ -#include <qapplication.h> -#include <qclipboard.h> +#include <ntqapplication.h> +#include <ntqclipboard.h> #include <klocale.h> #include "queryview.h" #include "queryresultsmenu.h" @@ -39,8 +39,8 @@ * @param pParent The parent widget * @param szName The name of the widget */ -QueryView::QueryView(QWidget* pParent, const char* szName) : - QListView(pParent, szName), +QueryView::QueryView(TQWidget* pParent, const char* szName) : + TQListView(pParent, szName), m_pLastItem(NULL) { // Create the popup-menu @@ -52,34 +52,34 @@ QueryView::QueryView(QWidget* pParent, const char* szName) : addColumn(i18n("File")); addColumn(i18n("Line")); addColumn(i18n("Text")); - setColumnAlignment(2, Qt::AlignRight); + setColumnAlignment(2, TQt::AlignRight); setShowSortIndicator(true); // A record is selected if it is either double-clicked, or the ENTER // key is pressed while the record is highlighted - connect(this, SIGNAL(doubleClicked(QListViewItem*)), this, - SLOT(slotRecordSelected(QListViewItem*))); - connect(this, SIGNAL(returnPressed(QListViewItem*)), this, - SLOT(slotRecordSelected(QListViewItem*))); + connect(this, SIGNAL(doubleClicked(TQListViewItem*)), this, + SLOT(slotRecordSelected(TQListViewItem*))); + connect(this, SIGNAL(returnPressed(TQListViewItem*)), this, + SLOT(slotRecordSelected(TQListViewItem*))); // Show the popup-menu when requested connect(this, - SIGNAL(contextMenuRequested(QListViewItem*, const QPoint&, int)), - m_pQueryMenu, SLOT(slotShow(QListViewItem*, const QPoint&, int))); + SIGNAL(contextMenuRequested(TQListViewItem*, const TQPoint&, int)), + m_pQueryMenu, SLOT(slotShow(TQListViewItem*, const TQPoint&, int))); // Handle popup-menu commands - connect(m_pQueryMenu, SIGNAL(viewSource(QListViewItem*)), this, - SLOT(slotRecordSelected(QListViewItem*))); - connect(m_pQueryMenu, SIGNAL(findDef(const QString&)), this, - SLOT(slotFindDef(const QString&))); - connect(m_pQueryMenu, SIGNAL(copy(QListViewItem*, int)), this, - SLOT(slotCopy(QListViewItem*, int))); + connect(m_pQueryMenu, SIGNAL(viewSource(TQListViewItem*)), this, + SLOT(slotRecordSelected(TQListViewItem*))); + connect(m_pQueryMenu, SIGNAL(findDef(const TQString&)), this, + SLOT(slotFindDef(const TQString&))); + connect(m_pQueryMenu, SIGNAL(copy(TQListViewItem*, int)), this, + SLOT(slotCopy(TQListViewItem*, int))); connect(m_pQueryMenu, SIGNAL(filter(int)), this, SLOT(slotFilter(int))); connect(m_pQueryMenu, SIGNAL(showAll()), this, SLOT(slotShowAll())); - connect(m_pQueryMenu, SIGNAL(remove(QListViewItem*)), this, - SLOT(slotRemoveItem(QListViewItem*))); + connect(m_pQueryMenu, SIGNAL(remove(TQListViewItem*)), this, + SLOT(slotRemoveItem(TQListViewItem*))); } /** @@ -97,10 +97,10 @@ QueryView::~QueryView() * @param sText The line's text * @param pParent The parent item (ignored) */ -void QueryView::addRecord(const QString& sFunc, const QString& sFile, - const QString& sLine, const QString& sText, QListViewItem* /* pParent */) +void QueryView::addRecord(const TQString& sFunc, const TQString& sFile, + const TQString& sLine, const TQString& sText, TQListViewItem* /* pParent */) { - QListViewItem* pItem; + TQListViewItem* pItem; pItem = new QueryViewItem(this, m_pLastItem, 2); 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. * @param pItem The list item to select */ -void QueryView::select(QListViewItem* pItem) +void QueryView::select(TQListViewItem* pItem) { ensureItemVisible(pItem); setSelected(pItem, true); @@ -135,7 +135,7 @@ void QueryView::select(QListViewItem* pItem) */ void QueryView::selectNext() { - QListViewItem* pItem; + TQListViewItem* pItem; // Do nothing if the list is empty if (firstChild() == NULL) @@ -165,7 +165,7 @@ void QueryView::selectNext() */ void QueryView::selectPrev() { - QListViewItem* pItem; + TQListViewItem* pItem; // Do nothing if the list is empty if (firstChild() == NULL) @@ -201,7 +201,7 @@ void QueryView::queryProgress() * Called when a query using this view terminates. * @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 // that case) @@ -225,7 +225,7 @@ void QueryView::queryFinished(uint nRecords, QListViewItem*) */ QueryView::Iterator QueryView::getIterator() { - QListViewItem* pItem; + TQListViewItem* pItem; for (pItem = firstChild(); pItem != NULL && !pItem->isVisible(); pItem = pItem->nextSibling()); @@ -235,14 +235,14 @@ QueryView::Iterator QueryView::getIterator() /** * 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 * call tree. * @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 if (pEvent == NULL || pEvent->button() != LeftButton) @@ -263,9 +263,9 @@ void QueryView::contentsMouseDoubleClickEvent(QMouseEvent* pEvent) * signals of the list view. * @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 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. * @param sFunc The function to look for */ -void QueryView::slotFindDef(const QString& sFunc) +void QueryView::slotFindDef(const TQString& sFunc) { QueryViewDlg* pDlg; @@ -290,8 +290,8 @@ void QueryView::slotFindDef(const QString& sFunc) pDlg = new QueryViewDlg(QueryViewDlg::DestroyOnSelect, this); // Display a line when it is selected in the dialogue - connect(pDlg, SIGNAL(lineRequested(const QString&, uint)), this, - SIGNAL(lineRequested(const QString&, uint))); + connect(pDlg, SIGNAL(lineRequested(const TQString&, uint)), this, + SIGNAL(lineRequested(const TQString&, uint))); // Start the query pDlg->query(CscopeFrontend::Definition, sFunc); @@ -303,10 +303,10 @@ void QueryView::slotFindDef(const QString& sFunc) * @param pItem The item from which 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), - QClipboard::Clipboard); + TQApplication::clipboard()->setText(pItem->text(nCol), + TQClipboard::Clipboard); } /** @@ -320,15 +320,15 @@ void QueryView::slotCopy(QListViewItem* pItem, int nCol) void QueryView::slotFilter(int nCol) { SearchResultsDlg dlg(this); - QRegExp re; - QListViewItem* pItem; + TQRegExp re; + TQListViewItem* pItem; bool bNegate; // Prepare the dialogue dlg.setColumn(nCol); // Show the dialogue - if (dlg.exec() != QDialog::Accepted) + if (dlg.exec() != TQDialog::Accepted) return; // Get the selected regular expression @@ -362,7 +362,7 @@ void QueryView::slotFilter(int nCol) */ void QueryView::slotShowAll() { - QListViewItem* pItem; + TQListViewItem* pItem; // Iterate over all items in the list pItem = firstChild(); @@ -378,7 +378,7 @@ void QueryView::slotShowAll() * object. * @param pItem The item to remove */ -void QueryView::slotRemoveItem(QListViewItem* pItem) +void QueryView::slotRemoveItem(TQListViewItem* pItem) { delete pItem; } @@ -399,7 +399,7 @@ void QueryView::Iterator::next() /** * @return The function associated with the list item the iterator points to */ -QString QueryView::Iterator::getFunc() +TQString QueryView::Iterator::getFunc() { if (m_pItem == NULL) return ""; @@ -410,7 +410,7 @@ QString QueryView::Iterator::getFunc() /** * @return The file associated with the list item the iterator points to */ -QString QueryView::Iterator::getFile() +TQString QueryView::Iterator::getFile() { if (m_pItem == NULL) return ""; @@ -422,7 +422,7 @@ QString QueryView::Iterator::getFile() * @return The line number associated with the list item the iterator points * to */ -QString QueryView::Iterator::getLine() +TQString QueryView::Iterator::getLine() { if (m_pItem == NULL) return ""; @@ -433,7 +433,7 @@ QString QueryView::Iterator::getLine() /** * @return The text associated with the list item the iterator points to */ -QString QueryView::Iterator::getText() +TQString QueryView::Iterator::getText() { if (m_pItem == NULL) return ""; diff --git a/src/queryview.h b/src/queryview.h index c896d6b..abdcc82 100644 --- a/src/queryview.h +++ b/src/queryview.h @@ -28,8 +28,8 @@ #ifndef QUERYVIEW_H #define QUERYVIEW_H -#include <qlistview.h> -#include <qregexp.h> +#include <ntqlistview.h> +#include <ntqregexp.h> class QueryResultsMenu; @@ -39,7 +39,7 @@ class QueryResultsMenu; * results numerically by line number. * @author Elad Lahav */ -class QueryViewItem : public QListViewItem +class QueryViewItem : public TQListViewItem { public: /** @@ -49,8 +49,8 @@ public: * @param pAfter The item to preceed the new one * @param nLineCol The index of the line column */ - QueryViewItem(QListView* pView, QListViewItem* pAfter, - int nLineCol) : QListViewItem(pView, pAfter), m_nLineCol(nLineCol) + QueryViewItem(TQListView* pView, TQListViewItem* pAfter, + int nLineCol) : TQListViewItem(pView, pAfter), m_nLineCol(nLineCol) {} /** @@ -60,8 +60,8 @@ public: * @param pAfter The item to preceed the new one * @param nLineCol The index of the line column */ - QueryViewItem(QListViewItem* pParent, QListViewItem* pAfter, - int nLineCol) : QListViewItem(pParent, pAfter), m_nLineCol(nLineCol) + QueryViewItem(TQListViewItem* pParent, TQListViewItem* pAfter, + 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, * -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) { uint nLineCur, nLineOther; int nResult; @@ -94,7 +94,7 @@ public: return -1; // The second item is greater } - return QListViewItem::compare(pItem, nCol, bAscend); + return TQListViewItem::compare(pItem, nCol, bAscend); } private: @@ -115,21 +115,21 @@ private: * from records, filter records, and more. * @author Elad Lahav */ -class QueryView : public QListView +class QueryView : public TQListView { Q_OBJECT public: - QueryView(QWidget* pParent = 0, const char* szName = 0); + QueryView(TQWidget* pParent = 0, const char* szName = 0); ~QueryView(); - virtual void addRecord(const QString&, const QString&, const QString&, - const QString&, QListViewItem* pParent = NULL); - virtual void select(QListViewItem*); + virtual void addRecord(const TQString&, const TQString&, const TQString&, + const TQString&, TQListViewItem* pParent = NULL); + virtual void select(TQListViewItem*); virtual void selectNext(); virtual void selectPrev(); 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. @@ -157,21 +157,21 @@ public: void next(); - QString getFunc(); - QString getFile(); - QString getLine(); - QString getText(); + TQString getFunc(); + TQString getFile(); + TQString getLine(); + TQString getText(); private: /** Points to the current list item. */ - QListViewItem* m_pItem; + TQListViewItem* m_pItem; /** * Private constructor used to return initialised iterators. * This constructor can only be called from within QueryView. * @param pItem The initial list item */ - Iterator(QListViewItem* pItem) : m_pItem(pItem) {} + Iterator(TQListViewItem* pItem) : m_pItem(pItem) {} friend class QueryView; }; @@ -194,24 +194,24 @@ signals: * @param sFile The "File" 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: /** A popup-menu for manipulating query result items. */ QueryResultsMenu* m_pQueryMenu; /** A pointer to the last item (used for appending results). */ - QListViewItem* m_pLastItem; + TQListViewItem* m_pLastItem; - void contentsMouseDoubleClickEvent(QMouseEvent*); + void contentsMouseDoubleClickEvent(TQMouseEvent*); protected slots: - virtual void slotRecordSelected(QListViewItem*); - virtual void slotFindDef(const QString&); - virtual void slotCopy(QListViewItem*, int); + virtual void slotRecordSelected(TQListViewItem*); + virtual void slotFindDef(const TQString&); + virtual void slotCopy(TQListViewItem*, int); virtual void slotFilter(int); virtual void slotShowAll(); - virtual void slotRemoveItem(QListViewItem*); + virtual void slotRemoveItem(TQListViewItem*); }; #endif diff --git a/src/queryviewdlg.cpp b/src/queryviewdlg.cpp index 93cd85e..f9ddb84 100644 --- a/src/queryviewdlg.cpp +++ b/src/queryviewdlg.cpp @@ -34,7 +34,7 @@ * @param pParent The parent widget * @param szName The widget's name */ -QueryViewDlg::QueryViewDlg(uint nFlags, QWidget* pParent, +QueryViewDlg::QueryViewDlg(uint nFlags, TQWidget* pParent, const char* szName) : QueryViewLayout(pParent, szName), m_nFlags(nFlags) @@ -50,8 +50,8 @@ QueryViewDlg::QueryViewDlg(uint nFlags, QWidget* pParent, connect(m_pView, SIGNAL(needToShow()), this, SLOT(slotShow())); // Propagate the lineRequested() signal from the QueryView object - connect(m_pView, SIGNAL(lineRequested(const QString&, uint)), this, - SLOT(slotLineRequested(const QString&, uint))); + connect(m_pView, SIGNAL(lineRequested(const TQString&, uint)), this, + SLOT(slotLineRequested(const TQString&, uint))); // Make the dialogue modal setModal(true); @@ -70,7 +70,7 @@ QueryViewDlg::~QueryViewDlg() * @param sText The query's text * @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); } @@ -91,7 +91,7 @@ void QueryViewDlg::slotShow() * This slot is connected to the lineRequested() signal emitted by the * QueryView widget. */ -void QueryViewDlg::slotLineRequested(const QString& sFileName, uint nLine) +void QueryViewDlg::slotLineRequested(const TQString& sFileName, uint nLine) { emit lineRequested(sFileName, nLine); diff --git a/src/queryviewdlg.h b/src/queryviewdlg.h index fc1c2f7..f78ee21 100644 --- a/src/queryviewdlg.h +++ b/src/queryviewdlg.h @@ -50,7 +50,7 @@ class QueryViewDlg : public QueryViewLayout Q_OBJECT public: - QueryViewDlg(uint nFlags = 0, QWidget* pParent = 0, + QueryViewDlg(uint nFlags = 0, TQWidget* pParent = 0, const char* szName = 0); ~QueryViewDlg(); @@ -58,7 +58,7 @@ public: enum { CloseOnSelect = 0x1, DestroyOnClose = 0x2, DestroyOnSelect = CloseOnSelect | DestroyOnClose }; - void query(uint, const QString&, bool bCase = true); + void query(uint, const TQString&, bool bCase = true); QueryView::Iterator getIterator(); @@ -69,7 +69,7 @@ signals: * @param sFile The "File" 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: /** Flags the control the behaviour of the dialogue. */ @@ -81,7 +81,7 @@ private: private slots: void slotShow(); - void slotLineRequested(const QString&, uint); + void slotLineRequested(const TQString&, uint); }; #endif diff --git a/src/queryviewdriver.cpp b/src/queryviewdriver.cpp index f04c44d..8c35238 100644 --- a/src/queryviewdriver.cpp +++ b/src/queryviewdriver.cpp @@ -36,8 +36,8 @@ * @param pParent The parent object of the driver * @param szName The name of the object */ -QueryViewDriver::QueryViewDriver(QueryView* pView, QObject* pParent, - const char* szName) : QObject(pParent, szName), +QueryViewDriver::QueryViewDriver(QueryView* pView, TQObject* pParent, + const char* szName) : TQObject(pParent, szName), m_pView(pView), m_pItem(NULL), m_progress(pView), @@ -76,8 +76,8 @@ QueryViewDriver::~QueryViewDriver() * @param pItem If non-null, represents an view item passed back to * the view in a call to addRecord() */ -void QueryViewDriver::query(uint nType, const QString& sText, bool bCase, - QListViewItem* pItem) +void QueryViewDriver::query(uint nType, const TQString& sText, bool bCase, + TQListViewItem* pItem) { m_pItem = pItem; @@ -99,7 +99,7 @@ void QueryViewDriver::query(uint nType, const QString& sText, bool bCase, */ void QueryViewDriver::slotDataReady(FrontendToken* pToken) { - QString sFile, sFunc, sLine, sText; + TQString sFile, sFunc, sLine, sText; // Get the file name sFile = pToken->getData(); diff --git a/src/queryviewdriver.h b/src/queryviewdriver.h index 77ff9ed..7851cea 100644 --- a/src/queryviewdriver.h +++ b/src/queryviewdriver.h @@ -28,8 +28,8 @@ #ifndef QUERYVIEWDRIVER_H #define QUERYVIEWDRIVER_H -#include <qobject.h> -#include <qlistview.h> +#include <ntqobject.h> +#include <ntqlistview.h> #include "cscopefrontend.h" class QueryView; @@ -42,15 +42,15 @@ class QueryView; * query progress bar. * @author Elad Lahav */ -class QueryViewDriver : public QObject +class QueryViewDriver : public TQObject { Q_OBJECT public: - QueryViewDriver(QueryView*, QObject* pParent = 0, const char* szName = 0); + QueryViewDriver(QueryView*, TQObject* pParent = 0, const char* szName = 0); ~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 @@ -65,7 +65,7 @@ private: QueryView* m_pView; /** QueryView item passed to addRecord(). */ - QListViewItem* m_pItem; + TQListViewItem* m_pItem; /** Displays query progress information. */ CscopeProgress m_progress; diff --git a/src/queryviewlayout.ui b/src/queryviewlayout.ui index ae097c5..6dda34b 100644 --- a/src/queryviewlayout.ui +++ b/src/queryviewlayout.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>QueryViewLayout</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>QueryViewLayout</cstring> </property> @@ -27,7 +27,7 @@ <cstring>m_pView</cstring> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -57,7 +57,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout1</cstring> </property> @@ -88,7 +88,7 @@ </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonOk</cstring> </property> @@ -105,7 +105,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonCancel</cstring> </property> diff --git a/src/querywidget.cpp b/src/querywidget.cpp index 113f216..2246c8e 100644 --- a/src/querywidget.cpp +++ b/src/querywidget.cpp @@ -25,8 +25,8 @@ * ***************************************************************************/ -#include <qtoolbutton.h> -#include <qtooltip.h> +#include <ntqtoolbutton.h> +#include <ntqtooltip.h> #include <klocale.h> #include <kmessagebox.h> #include "querywidget.h" @@ -38,7 +38,7 @@ * @param pParent The parent widget * @param szName The widget's name */ -QueryWidget::QueryWidget(QWidget* pParent, const char* szName) : +QueryWidget::QueryWidget(TQWidget* pParent, const char* szName) : QueryWidgetLayout(pParent, szName), m_pPageMenu(NULL), m_pLockAction(NULL), @@ -50,18 +50,18 @@ QueryWidget::QueryWidget(QWidget* pParent, const char* szName) : m_pQueryTabs->setHoverCloseButton(true); // Change the lock action state according to the current page - connect(m_pQueryTabs, SIGNAL(currentChanged(QWidget*)), this, - SLOT(slotCurrentChanged(QWidget*))); + connect(m_pQueryTabs, SIGNAL(currentChanged(TQWidget*)), this, + SLOT(slotCurrentChanged(TQWidget*))); // Close a query when its tab button is clicked - connect(m_pQueryTabs, SIGNAL(closeRequest(QWidget*)), this, - SLOT(slotClosePage(QWidget*))); + connect(m_pQueryTabs, SIGNAL(closeRequest(TQWidget*)), this, + SLOT(slotClosePage(TQWidget*))); // Show the menu when requested - connect(m_pQueryTabs, SIGNAL(contextMenu(const QPoint&)), this, - SLOT(slotContextMenu(const QPoint&))); - connect(m_pQueryTabs, SIGNAL(contextMenu(QWidget*, const QPoint&)), this, - SLOT(slotContextMenu(QWidget*, const QPoint&))); + connect(m_pQueryTabs, SIGNAL(contextMenu(const TQPoint&)), this, + SLOT(slotContextMenu(const TQPoint&))); + connect(m_pQueryTabs, SIGNAL(contextMenu(TQWidget*, const TQPoint&)), this, + SLOT(slotContextMenu(TQWidget*, const TQPoint&))); } /** @@ -79,7 +79,7 @@ QueryWidget::~QueryWidget() * @param sText The query's text, as entered by the user * @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; @@ -123,12 +123,12 @@ void QueryWidget::applyPrefs() * @param sProjPath The full path of the project directory * @param slFiles The list of query file names to load */ -void QueryWidget::loadPages(const QString& sProjPath, - const QStringList& slFiles) +void QueryWidget::loadPages(const TQString& sProjPath, + const TQStringList& slFiles) { - QStringList::ConstIterator itr; + TQStringList::ConstIterator itr; QueryPageBase* pPage; - QString sName; + TQString sName; // Iterate through query files 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 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; QueryPage* pPage; - QString sFileName; + TQString sFileName; // Iterate pages 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 * line number */ -void QueryWidget::addHistoryRecord(const QString& sFile, uint nLine, - const QString& sText) +void QueryWidget::addHistoryRecord(const TQString& sFile, uint nLine, + const TQString& sText) { // Validate file name and line number if (sFile.isEmpty() || nLine == 0) @@ -216,7 +216,7 @@ void QueryWidget::setPageCaption(QueryPageBase* pPage) void QueryWidget::addQueryPage() { QueryPage* pPage; - QString sTitle; + TQString sTitle; // Create the page pPage = new QueryPage(this); @@ -228,8 +228,8 @@ void QueryWidget::addQueryPage() // Emit the lineRequested() signal when a query record is selected on // this page - connect(pPage, SIGNAL(lineRequested(const QString&, uint)), this, - SLOT(slotRequestLine(const QString&, uint))); + connect(pPage, SIGNAL(lineRequested(const TQString&, uint)), this, + SLOT(slotRequestLine(const TQString&, uint))); } /** @@ -316,7 +316,7 @@ void QueryWidget::slotPrevResult() */ void QueryWidget::slotCloseCurrent() { - QWidget* pPage; + TQWidget* pPage; // Close the current page pPage = currentPage(); @@ -385,7 +385,7 @@ void QueryWidget::selectActiveHistory() * @param pMenu Pointer to the popup menu * @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_pLockAction = pAction; @@ -400,7 +400,7 @@ void QueryWidget::setPageMenu(QPopupMenu* pMenu, KToggleAction* pAction) * @param sFileName The file's path * @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 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. * @param pWidget The new current page */ -void QueryWidget::slotCurrentChanged(QWidget* pWidget) +void QueryWidget::slotCurrentChanged(TQWidget* pWidget) { QueryPage* pPage; @@ -431,7 +431,7 @@ void QueryWidget::slotCurrentChanged(QWidget* pWidget) * This slot is connected to the closeRequest() signal of the KTabBar object. * @param pPage The page to close */ -void QueryWidget::slotClosePage(QWidget* pPage) +void QueryWidget::slotClosePage(TQWidget* pPage) { // Prompt the user before closing a locked query 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 * context menu */ -void QueryWidget::slotContextMenu(const QPoint& pt) +void QueryWidget::slotContextMenu(const TQPoint& pt) { 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 * the context menu */ -void QueryWidget::slotContextMenu(QWidget* pWidget, const QPoint& pt) +void QueryWidget::slotContextMenu(TQWidget* pWidget, const TQPoint& pt) { uint i; @@ -569,7 +569,7 @@ void QueryWidget::findHistoryPage() { HistoryPage* pPage; int nPages, i; - QString sTitle; + TQString sTitle; // First check if the active history page is unlocked 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 // this page - connect(m_pHistPage, SIGNAL(lineRequested(const QString&, uint)), this, - SLOT(slotRequestLine(const QString&, uint))); + connect(m_pHistPage, SIGNAL(lineRequested(const TQString&, uint)), this, + SLOT(slotRequestLine(const TQString&, uint))); } #include "querywidget.moc" diff --git a/src/querywidget.h b/src/querywidget.h index a798ec0..d309bb0 100644 --- a/src/querywidget.h +++ b/src/querywidget.h @@ -28,8 +28,8 @@ #ifndef QUERYWIDGET_H #define QUERYWIDGET_H -#include <qlistview.h> -#include <qpopupmenu.h> +#include <ntqlistview.h> +#include <ntqpopupmenu.h> #include <kaction.h> #include "querywidgetlayout.h" #include "tabwidget.h" @@ -47,17 +47,17 @@ class QueryWidget : public QueryWidgetLayout Q_OBJECT public: - QueryWidget(QWidget* pParent = 0, const char* szName = 0); + QueryWidget(TQWidget* pParent = 0, const char* szName = 0); ~QueryWidget(); void addQueryPage(); - void initQuery(uint, const QString&, bool); + void initQuery(uint, const TQString&, bool); void applyPrefs(); - void loadPages(const QString&, const QStringList&); - void savePages(const QString&, QStringList&); - void addHistoryRecord(const QString&, uint, const QString&); + void loadPages(const TQString&, const TQStringList&); + void savePages(const TQString&, TQStringList&); + void addHistoryRecord(const TQString&, uint, const TQString&); void selectActiveHistory(); - void setPageMenu(QPopupMenu*, KToggleAction*); + void setPageMenu(TQPopupMenu*, KToggleAction*); void getBookmarks(FileLocationList&); /** @@ -86,7 +86,7 @@ signals: * @param sPath The full path of the requested source file * @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 @@ -96,7 +96,7 @@ signals: private: /** A popup menu with query page commands (new query, lock/unlock, close query, etc.). */ - QPopupMenu* m_pPageMenu; + TQPopupMenu* m_pPageMenu; /** A toggle-like action for changing the locked state of a query. */ KToggleAction* m_pLockAction; @@ -123,7 +123,7 @@ private: /** * @param pWidget A query page to set as the current one */ - inline void setCurrentPage(QWidget* pWidget) { + inline void setCurrentPage(TQWidget* pWidget) { if (pWidget) m_pQueryTabs->setCurrentPage(m_pQueryTabs->indexOf(pWidget)); } @@ -133,7 +133,7 @@ private: * @param pPage The page to check * @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); } @@ -142,11 +142,11 @@ private: void findHistoryPage(); private slots: - void slotRequestLine(const QString&, uint); - void slotCurrentChanged(QWidget*); - void slotClosePage(QWidget*); - void slotContextMenu(const QPoint&); - void slotContextMenu(QWidget*, const QPoint&); + void slotRequestLine(const TQString&, uint); + void slotCurrentChanged(TQWidget*); + void slotClosePage(TQWidget*); + void slotContextMenu(const TQPoint&); + void slotContextMenu(TQWidget*, const TQPoint&); }; #endif diff --git a/src/querywidgetlayout.ui b/src/querywidgetlayout.ui index 52e7fb3..62299cb 100644 --- a/src/querywidgetlayout.ui +++ b/src/querywidgetlayout.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>QueryWidgetLayout</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>QueryWidgetLayout</cstring> </property> diff --git a/src/scanprogressdlg.cpp b/src/scanprogressdlg.cpp index e380c60..243c3a4 100644 --- a/src/scanprogressdlg.cpp +++ b/src/scanprogressdlg.cpp @@ -25,8 +25,8 @@ * ***************************************************************************/ -#include <qlabel.h> -#include <qpushbutton.h> +#include <ntqlabel.h> +#include <ntqpushbutton.h> #include <klocale.h> #include "scanprogressdlg.h" @@ -35,7 +35,7 @@ * @param pParent The parent widget * @param szName The widget's name */ -ScanProgressDlg::ScanProgressDlg(QWidget* pParent, const char* szName) : +ScanProgressDlg::ScanProgressDlg(TQWidget* pParent, const char* szName) : ScanProgressLayout(pParent, szName), m_nFiles(0), m_nCurFiles(0) @@ -61,7 +61,7 @@ ScanProgressDlg::~ScanProgressDlg() */ void ScanProgressDlg::addFiles(int nFiles) { - QString sText; + TQString sText; // Do nothing if no files were scanned if (nFiles <= 0) diff --git a/src/scanprogressdlg.h b/src/scanprogressdlg.h index 84564de..2e18ed5 100644 --- a/src/scanprogressdlg.h +++ b/src/scanprogressdlg.h @@ -28,7 +28,7 @@ #ifndef SCANPROGRESSDLG_H #define SCANPROGRESSDLG_H -#include <qwidget.h> +#include <ntqwidget.h> #include <scanprogresslayout.h> /** @@ -44,7 +44,7 @@ class ScanProgressDlg : public ScanProgressLayout Q_OBJECT public: - ScanProgressDlg(QWidget* pParent = 0, const char* szName = 0); + ScanProgressDlg(TQWidget* pParent = 0, const char* szName = 0); ~ScanProgressDlg(); void addFiles(int); diff --git a/src/scanprogresslayout.ui b/src/scanprogresslayout.ui index 85482a8..17da7fa 100644 --- a/src/scanprogresslayout.ui +++ b/src/scanprogresslayout.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.1" stdsetdef="1"> <class>ScanProgressLayout</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>ScanProgressLayout</cstring> </property> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout4</cstring> </property> @@ -27,7 +27,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_pText</cstring> </property> @@ -52,7 +52,7 @@ </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout2</cstring> </property> @@ -77,7 +77,7 @@ </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pCancelButton</cstring> </property> diff --git a/src/searchlist.cpp b/src/searchlist.cpp index ccff869..867807d 100644 --- a/src/searchlist.cpp +++ b/src/searchlist.cpp @@ -25,25 +25,25 @@ * ***************************************************************************/ -#include <qheader.h> +#include <ntqheader.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 */ -void SearchLineEdit::keyPressEvent(QKeyEvent* pKey) +void SearchLineEdit::keyPressEvent(TQKeyEvent* pKey) { switch(pKey->key()) { - case Qt::Key_Up: - case Qt::Key_Down: - case Qt::Key_PageUp: - case Qt::Key_PageDown: + case TQt::Key_Up: + case TQt::Key_Down: + case TQt::Key_PageUp: + case TQt::Key_PageDown: emit keyPressed(pKey); break; default: - QLineEdit::keyPressEvent(pKey); + TQLineEdit::keyPressEvent(pKey); break; } } @@ -53,7 +53,7 @@ void SearchLineEdit::keyPressEvent(QKeyEvent* pKey) * @param pParent Owner list view widget */ ListToolTip::ListToolTip(SearchList* pParent) : - QToolTip(pParent->getList()->viewport()), + TQToolTip(pParent->getList()->viewport()), m_pList(pParent) { } @@ -63,11 +63,11 @@ ListToolTip::ListToolTip(SearchList* pParent) : * pointer. * @param pt The mouse pointer coordinates */ -void ListToolTip::maybeTip(const QPoint& pt) +void ListToolTip::maybeTip(const TQPoint& pt) { - QString str; - QListView* pList; - QListViewItem* pItem; + TQString str; + TQListView* pList; + TQListViewItem* pItem; // Get the item at the given point pList = m_pList->getList(); @@ -80,17 +80,17 @@ void ListToolTip::maybeTip(const QPoint& pt) return; // Get the bounding rectangle of the item - const QRect rcItem = pList->itemRect(pItem); + const TQRect rcItem = pList->itemRect(pItem); if (!rcItem.isValid()) return; // Get the header coordinates - const QRect rcHead = pList->header()->rect(); + const TQRect rcHead = pList->header()->rect(); if (!rcHead.isValid()) return; // 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 tip(rcCell, str); @@ -102,28 +102,28 @@ void ListToolTip::maybeTip(const QPoint& pt) * @param pParent The parent widget * @param szName The widget's name */ -SearchList::SearchList(int nSearchCol, QWidget* pParent, const char* szName) : - QVBox(pParent, szName), +SearchList::SearchList(int nSearchCol, TQWidget* pParent, const char* szName) : + TQVBox(pParent, szName), m_nSearchCol(nSearchCol) { // Create the child widgets m_pEdit = new SearchLineEdit(this); - m_pList = new QListView(this); + m_pList = new TQListView(this); // Set up the tooltip generator - QToolTip::remove(m_pList); + TQToolTip::remove(m_pList); m_pToolTip = new ListToolTip(this); - connect(m_pEdit, SIGNAL(textChanged(const QString&)), this, - SLOT(slotFindItem(const QString&))); - connect(m_pList, SIGNAL(doubleClicked(QListViewItem*)), this, - SLOT(slotItemSelected(QListViewItem*))); - connect(m_pList, SIGNAL(returnPressed(QListViewItem*)), this, - SLOT(slotItemSelected(QListViewItem*))); + connect(m_pEdit, SIGNAL(textChanged(const TQString&)), this, + SLOT(slotFindItem(const TQString&))); + connect(m_pList, SIGNAL(doubleClicked(TQListViewItem*)), this, + SLOT(slotItemSelected(TQListViewItem*))); + connect(m_pList, SIGNAL(returnPressed(TQListViewItem*)), this, + SLOT(slotItemSelected(TQListViewItem*))); connect(m_pEdit, SIGNAL(returnPressed()), this, SLOT(slotItemSelected())); - connect(m_pEdit, SIGNAL(keyPressed(QKeyEvent*)), this, - SLOT(slotKeyPressed(QKeyEvent*))); + connect(m_pEdit, SIGNAL(keyPressed(TQKeyEvent*)), this, + SLOT(slotKeyPressed(TQKeyEvent*))); } /** @@ -148,9 +148,9 @@ void SearchList::slotSetFocus() * This slot is connected to the textChanged() signal of the line 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 // Priority to exactly matched, @@ -172,7 +172,7 @@ void SearchList::slotFindItem(const QString& sText) * This slot is connected to the doubleClicked() and returnPressed() * signals of the list widget. */ -void SearchList::slotItemSelected(QListViewItem* pItem) +void SearchList::slotItemSelected(TQListViewItem* pItem) { processItemSelected(pItem); m_pEdit->setText(""); @@ -185,7 +185,7 @@ void SearchList::slotItemSelected(QListViewItem* pItem) */ void SearchList::slotItemSelected() { - QListViewItem* pItem; + TQListViewItem* pItem; if ((pItem = m_pList->selectedItem()) != NULL) { 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. * @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; // 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 switch (pKey->key()) { - case Qt::Key_Up: + case TQt::Key_Up: if (pItem) { for (pNewItem = pItem->itemAbove(); pNewItem && !SEARCH_MATCH(pNewItem); @@ -224,7 +224,7 @@ void SearchList::slotKeyPressed(QKeyEvent* pKey) } break; - case Qt::Key_Down: + case TQt::Key_Down: if (pItem) { for (pNewItem = pItem->itemBelow(); pNewItem && !SEARCH_MATCH(pNewItem); @@ -235,7 +235,7 @@ void SearchList::slotKeyPressed(QKeyEvent* pKey) } break; - case Qt::Key_PageUp: + case TQt::Key_PageUp: nPageSize = m_pList->visibleHeight() / pItem->height(); for (nPos = 0; pItem && pItem->itemAbove() && (nPos < nPageSize); @@ -243,7 +243,7 @@ void SearchList::slotKeyPressed(QKeyEvent* pKey) pItem = pItem->itemAbove(); break; - case Qt::Key_PageDown: + case TQt::Key_PageDown: nPageSize = m_pList->visibleHeight() / pItem->height(); for (nPos = 0; pItem && pItem->itemBelow() && (nPos < nPageSize); diff --git a/src/searchlist.h b/src/searchlist.h index ffa7ac8..3986b4b 100644 --- a/src/searchlist.h +++ b/src/searchlist.h @@ -28,25 +28,25 @@ #ifndef SEARCHLIST_H #define SEARCHLIST_H -#include <qwidget.h> -#include <qvbox.h> -#include <qlineedit.h> -#include <qlistview.h> -#include <qtooltip.h> +#include <ntqwidget.h> +#include <ntqvbox.h> +#include <ntqlineedit.h> +#include <ntqlistview.h> +#include <ntqtooltip.h> class SearchList; /** * 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 * @author Albert Yosher */ -class SearchLineEdit : public QLineEdit +class SearchLineEdit : public TQLineEdit { Q_OBJECT public: - SearchLineEdit(QWidget* pParent) : QLineEdit(pParent) {}; + SearchLineEdit(TQWidget* pParent) : TQLineEdit(pParent) {}; ~SearchLineEdit() {}; signals: @@ -55,10 +55,10 @@ signals: * inside this edit widget. * @param pEvent The event received for this key press */ - void keyPressed(QKeyEvent* pEvent); + void keyPressed(TQKeyEvent* pEvent); private: - virtual void keyPressEvent(QKeyEvent*); + virtual void keyPressEvent(TQKeyEvent*); }; /** @@ -67,13 +67,13 @@ private: * list item. * @author Gabor Fekete */ -class ListToolTip : public QToolTip +class ListToolTip : public TQToolTip { public: ListToolTip(SearchList* pParent); protected: - virtual void maybeTip(const QPoint& pt); + virtual void maybeTip(const TQPoint& pt); private: /** The owner widget. */ @@ -88,18 +88,18 @@ private: * set to point to the first item that matches the new text. * @author Elad Lahav */ -class SearchList : public QVBox +class SearchList : public TQVBox { Q_OBJECT public: - SearchList(int nSearchCol, QWidget* pParent = 0, const char* szName = 0); + SearchList(int nSearchCol, TQWidget* pParent = 0, const char* szName = 0); ~SearchList(); /** * @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. @@ -107,30 +107,30 @@ public: * @param sTip The constructed tip string (on return) * @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: void slotSetFocus(); protected: /** The search edit-box. */ - QLineEdit* m_pEdit; + TQLineEdit* m_pEdit; /** 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- * clicking it, or by highlighting the item and pressing the ENTER key. * @param pItem The selected list item */ - virtual void processItemSelected(QListViewItem* pItem) = 0; + virtual void processItemSelected(TQListViewItem* pItem) = 0; protected slots: - void slotFindItem(const QString&); - void slotItemSelected(QListViewItem*); + void slotFindItem(const TQString&); + void slotItemSelected(TQListViewItem*); void slotItemSelected(); - void slotKeyPressed(QKeyEvent*); + void slotKeyPressed(TQKeyEvent*); private: /** Specifies the search column, i.e., the list column whose strings are diff --git a/src/searchresultsdlg.cpp b/src/searchresultsdlg.cpp index bb63fa5..bbcdd9b 100644 --- a/src/searchresultsdlg.cpp +++ b/src/searchresultsdlg.cpp @@ -25,10 +25,10 @@ * ***************************************************************************/ -#include <qpushbutton.h> -#include <qlineedit.h> -#include <qcombobox.h> -#include <qradiobutton.h> +#include <ntqpushbutton.h> +#include <ntqlineedit.h> +#include <ntqcombobox.h> +#include <ntqradiobutton.h> #include "searchresultsdlg.h" int SearchResultsDlg::s_nType = PlainText; @@ -40,7 +40,7 @@ bool SearchResultsDlg::s_bNegate = false; * @param pParent The parent widget * @param szName Optional widget name */ -SearchResultsDlg::SearchResultsDlg(QWidget* pParent, const char* szName) : +SearchResultsDlg::SearchResultsDlg(TQWidget* pParent, const char* szName) : SearchResultsLayout(pParent, szName, true, 0) { // 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. * @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(); // Create the regular expression switch (s_nType) { case PlainText: - re.setPattern(QRegExp::escape(sPattern)); + re.setPattern(TQRegExp::escape(sPattern)); re.setWildcard(false); break; @@ -130,7 +130,7 @@ void SearchResultsDlg::getPattern(QRegExp& re) */ void SearchResultsDlg::accept() { - QString sText; + TQString sText; // Determine the selected type and store its value for the next invocation if (m_pTextRadio->isChecked()) @@ -148,12 +148,12 @@ void SearchResultsDlg::accept() sText = m_pSearchEdit->text(); sText.stripWhiteSpace(); if (sText.isEmpty()) { - QDialog::reject(); + TQDialog::reject(); return; } // Close the dialogue - QDialog::accept(); + TQDialog::accept(); } #include "searchresultsdlg.moc" diff --git a/src/searchresultsdlg.h b/src/searchresultsdlg.h index d636f8f..9c30500 100644 --- a/src/searchresultsdlg.h +++ b/src/searchresultsdlg.h @@ -28,8 +28,8 @@ #ifndef SEARCHRESULTSDLG_H #define SEARCHRESULTSDLG_H -#include <qregexp.h> -#include <qcheckbox.h> +#include <ntqregexp.h> +#include <ntqcheckbox.h> #include "searchresultslayout.h" /** @@ -42,12 +42,12 @@ class SearchResultsDlg : public SearchResultsLayout Q_OBJECT public: - SearchResultsDlg(QWidget* pParent = 0, const char* szName = 0); + SearchResultsDlg(TQWidget* pParent = 0, const char* szName = 0); ~SearchResultsDlg(); void setColumn(int); int getColumn(); - void getPattern(QRegExp&); + void getPattern(TQRegExp&); /** * @return true if the search pattern should be negated, false otherwise diff --git a/src/searchresultslayout.ui b/src/searchresultslayout.ui index cdcde53..d897980 100644 --- a/src/searchresultslayout.ui +++ b/src/searchresultslayout.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>SearchResultsLayout</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>SearchResultsLayout</cstring> </property> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout2</cstring> </property> @@ -27,7 +27,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -35,14 +35,14 @@ <string>Search For:</string> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>m_pSearchEdit</cstring> </property> </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout4</cstring> </property> @@ -50,7 +50,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -75,7 +75,7 @@ </size> </property> </spacer> - <widget class="QComboBox"> + <widget class="TQComboBox"> <item> <property name="text"> <string>Function</string> @@ -102,7 +102,7 @@ </widget> </hbox> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroup1</cstring> </property> @@ -113,7 +113,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_pTextRadio</cstring> </property> @@ -121,7 +121,7 @@ <string>Plain Text</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_pRegExpRadio</cstring> </property> @@ -129,7 +129,7 @@ <string>RegE&xp</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_pSimpRegExpRadio</cstring> </property> @@ -139,7 +139,7 @@ </widget> </vbox> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_pCaseSenCheck</cstring> </property> @@ -147,7 +147,7 @@ <string>Case Sensitive</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_pNegateCheck</cstring> </property> @@ -155,7 +155,7 @@ <string>Negate Search</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout3</cstring> </property> @@ -180,7 +180,7 @@ </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pOKButton</cstring> </property> @@ -188,7 +188,7 @@ <string>OK</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pCancelButton</cstring> </property> diff --git a/src/symbolcompletion.cpp b/src/symbolcompletion.cpp index 2ec8194..e385c07 100644 --- a/src/symbolcompletion.cpp +++ b/src/symbolcompletion.cpp @@ -25,7 +25,7 @@ * ***************************************************************************/ -#include <qtimer.h> +#include <ntqtimer.h> #include <klocale.h> #include "symbolcompletion.h" @@ -41,14 +41,14 @@ uint SymbolCompletion::s_nACMaxEntries; * @param szName Optional object name */ SymbolCompletion::SymbolCompletion(SymbolCompletion::Interface* pEditor, - QObject* pParent, const char* szName) : - QObject(pParent, szName), + TQObject* pParent, const char* szName) : + TQObject(pParent, szName), m_pEditor(pEditor), m_pCCObject(NULL) { // Initialise member objects m_pCscope = new CscopeFrontend(); - m_pAutoCompTimer = new QTimer(this); + m_pAutoCompTimer = new TQTimer(this); // Add entries to the completion list when they are available connect(m_pCscope, SIGNAL(dataReady(FrontendToken*)), this, @@ -109,7 +109,7 @@ void SymbolCompletion::initAutoCompletion(bool bEnabled, uint nMinChars, */ void SymbolCompletion::slotComplete() { - QString sSymbol; + TQString sSymbol; uint nPosInWord; // Read the symbol currently under the cursor @@ -138,7 +138,7 @@ void SymbolCompletion::slotAutoComplete() * @param sPrefix The symbol to complete * @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 // results @@ -186,7 +186,7 @@ void SymbolCompletion::filterEntries() * message. * @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; @@ -211,7 +211,7 @@ void SymbolCompletion::makeErrMsg(const QString& sMsg) void SymbolCompletion::slotAddEntry(FrontendToken* pToken) { Entry entry; - QString sText; + TQString sText; // Do not add entries beyond the requested limit if (m_elEntries.count() > m_nMaxEntries) @@ -242,7 +242,7 @@ void SymbolCompletion::slotQueryFinished(uint /* nRecords */) KTextEditor::CodeCompletionInterface* pCCI; uint nEntryCount; EntryList::Iterator itr; - QString sPrevText; + TQString sPrevText; // Get the number of entries 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 // user connect(m_pCCObject, - SIGNAL(filterInsertString(KTextEditor::CompletionEntry*, QString*)), + SIGNAL(filterInsertString(KTextEditor::CompletionEntry*, TQString*)), this, - SLOT(slotFilterInsert(KTextEditor::CompletionEntry*, QString*))); + SLOT(slotFilterInsert(KTextEditor::CompletionEntry*, TQString*))); // Check the number of entries in the list if (nEntryCount == 0) { @@ -303,7 +303,7 @@ void SymbolCompletion::slotQueryFinished(uint /* nRecords */) * @param pTextToInsert Contains the string to insert, upon return */ void SymbolCompletion::slotFilterInsert(KTextEditor::CompletionEntry* pEntry, - QString* pTextToInsert) + TQString* pTextToInsert) { // Insert the completed entry, unless it contains an error message if (pEntry->userdata.isEmpty()) @@ -326,7 +326,7 @@ void SymbolCompletion::slotFilterInsert(KTextEditor::CompletionEntry* pEntry, */ void SymbolCompletion::slotAutoCompleteTimeout() { - QString sPrefix; + TQString sPrefix; uint nPosInWord, nLength; // Read the symbol currently under the cursor diff --git a/src/symbolcompletion.h b/src/symbolcompletion.h index 6fe57e2..f25eb91 100644 --- a/src/symbolcompletion.h +++ b/src/symbolcompletion.h @@ -28,8 +28,8 @@ #ifndef SYMBOLCOMPLETION_H #define SYMBOLCOMPLETION_H -#include <qobject.h> -#include <qregexp.h> +#include <ntqobject.h> +#include <ntqregexp.h> #include <ktexteditor/codecompletioninterface.h> #include <ktexteditor/view.h> #include "cscopefrontend.h" @@ -39,7 +39,7 @@ * The results can then be displayed as symbol completion lists. * @author Albert Yosher */ -class SymbolCompletion : public QObject +class SymbolCompletion : public TQObject { Q_OBJECT @@ -66,7 +66,7 @@ public: * @param pPosInWord Set this value to the offset in the word on * 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. @@ -74,10 +74,10 @@ public: * KTextEditor::CodeCompletionInterface, or NULL if the * 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); ~SymbolCompletion(); @@ -121,7 +121,7 @@ private: * A sortable version of the value list used by CodeCompletionInterface. * @author Albert Yosher */ - class EntryList : public QValueList<Entry> + class EntryList : public TQValueList<Entry> { public: /** @@ -133,8 +133,8 @@ private: * Type casting support required for calling showCompletionBox(). * @return A casted reference to this object */ - operator QValueList<KTextEditor::CompletionEntry>() - { return *(QValueList<KTextEditor::CompletionEntry>*)this; } + operator TQValueList<KTextEditor::CompletionEntry>() + { return *(TQValueList<KTextEditor::CompletionEntry>*)this; } }; /** Editor object for which symbol completion is provided. */ @@ -142,13 +142,13 @@ private: /** An object that supports KTextEditor::CodeCompletionInterface, as supplied by the editor. */ - QObject* m_pCCObject; + TQObject* m_pCCObject; /** Cscope process used to run completion queries. */ CscopeFrontend* m_pCscope; /** The prefix used for the current query. */ - QString m_sPrefix; + TQString m_sPrefix; /** A list of possible completions for the given prefix. */ EntryList m_elEntries; @@ -159,17 +159,17 @@ private: /** 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 symbol field useless. */ - QRegExp m_reSymbol; + TQRegExp m_reSymbol; /** Auto-completion timer. */ - QTimer* m_pAutoCompTimer; + TQTimer* m_pAutoCompTimer; /** Auto-completion flag */ bool m_bAutoCompletion; - void complete(const QString&, int nMaxEntries = 1000); + void complete(const TQString&, int nMaxEntries = 1000); void filterEntries(); - void makeErrMsg(const QString&); + void makeErrMsg(const TQString&); /** true if auto-completion is enabled, false otherwise. */ static bool s_bACEnabled; @@ -189,7 +189,7 @@ private slots: void slotAutoCompleteTimeout(); void slotAddEntry(FrontendToken*); void slotQueryFinished(uint); - void slotFilterInsert(KTextEditor::CompletionEntry*, QString*); + void slotFilterInsert(KTextEditor::CompletionEntry*, TQString*); }; #endif diff --git a/src/symboldlg.cpp b/src/symboldlg.cpp index 3301678..8ec631c 100644 --- a/src/symboldlg.cpp +++ b/src/symboldlg.cpp @@ -25,26 +25,26 @@ * ***************************************************************************/ -#include <qlabel.h> -#include <qlistview.h> -#include <qpushbutton.h> -#include <qradiobutton.h> -#include <qcheckbox.h> -#include <qgroupbox.h> +#include <ntqlabel.h> +#include <ntqlistview.h> +#include <ntqpushbutton.h> +#include <ntqradiobutton.h> +#include <ntqcheckbox.h> +#include <ntqgroupbox.h> #include <kcombobox.h> #include <klocale.h> #include "symboldlg.h" #include "cscopefrontend.h" #include "kscopeconfig.h" -QStringList SymbolDlg::s_slHistory; +TQStringList SymbolDlg::s_slHistory; /** * Class constructor. * @param pParent Parent widget * @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), m_progress(m_pHintList) { @@ -54,7 +54,7 @@ SymbolDlg::SymbolDlg(QWidget* pParent, const char* szName) : // Initialise the hint list (hidden by default) m_pHintList->addColumn(i18n("Suggested Symbols")); m_pHintList->hide(); - ((QWidget*)m_pHintGroup)->hide(); + ((TQWidget*)m_pHintGroup)->hide(); m_pBeginWithRadio->toggle(); adjustSize(); @@ -74,13 +74,13 @@ SymbolDlg::SymbolDlg(QWidget* pParent, const char* szName) : SLOT(slotTypeChanged(int))); // Selecting an item in the hint list sets it as the current text - connect(m_pHintList, SIGNAL(selectionChanged(QListViewItem*)), this, - SLOT(slotHintItemSelected(QListViewItem*))); + connect(m_pHintList, SIGNAL(selectionChanged(TQListViewItem*)), this, + SLOT(slotHintItemSelected(TQListViewItem*))); // 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 // closed) - connect(m_pHintList, SIGNAL(doubleClicked(QListViewItem*)), this, + connect(m_pHintList, SIGNAL(doubleClicked(TQListViewItem*)), this, SLOT(accept())); // 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 */ -void SymbolDlg::setSymbol(const QString& sSymbol) +void SymbolDlg::setSymbol(const TQString& sSymbol) { m_pSymbolHC->setCurrentText(sSymbol); } @@ -125,7 +125,7 @@ void SymbolDlg::setSymbol(const QString& sSymbol) /** * @param slSymHistory A list of previously queried symbols */ -void SymbolDlg::setHistory(QStringList& slSymHistory) +void SymbolDlg::setHistory(TQStringList& slSymHistory) { m_pSymbolHC->setHistoryItems(slSymHistory); } @@ -133,9 +133,9 @@ void SymbolDlg::setHistory(QStringList& slSymHistory) /** * @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(); 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 * string if the dialogue was cancelled */ -QString SymbolDlg::promptSymbol(QWidget* pParent, uint& nType, - const QString& sSymbol, bool& bCase) +TQString SymbolDlg::promptSymbol(TQWidget* pParent, uint& nType, + const TQString& sSymbol, bool& bCase) { SymbolDlg dlg(pParent); @@ -180,7 +180,7 @@ QString SymbolDlg::promptSymbol(QWidget* pParent, uint& nType, dlg.setSymbol(sSymbol); // Display the dialogue - if (dlg.exec() != QDialog::Accepted) + if (dlg.exec() != TQDialog::Accepted) return ""; // Return the text entered by the user @@ -215,12 +215,12 @@ uint SymbolDlg::getQueryType(uint nType) */ void SymbolDlg::slotHintClicked() { - QString sText, sRegExp; + TQString sText, sRegExp; // Show the hint list if necessary if (!m_pHintList->isVisible()) { m_pHintList->show(); - ((QWidget*)m_pHintGroup)->show(); + ((TQWidget*)m_pHintGroup)->show(); adjustSize(); } @@ -253,7 +253,7 @@ void SymbolDlg::slotHintClicked() */ void SymbolDlg::slotHintDataReady(FrontendToken* pToken) { - QString sText; + TQString sText; // Get the line text pToken = pToken->getNext()->getNext()->getNext(); @@ -268,7 +268,7 @@ void SymbolDlg::slotHintDataReady(FrontendToken* pToken) return; // 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. * @param pItem The clicked list item */ -void SymbolDlg::slotHintItemSelected(QListViewItem* pItem) +void SymbolDlg::slotHintItemSelected(TQListViewItem* pItem) { m_pSymbolHC->setCurrentText(pItem->text(0)); } diff --git a/src/symboldlg.h b/src/symboldlg.h index 4360213..1e5b463 100644 --- a/src/symboldlg.h +++ b/src/symboldlg.h @@ -28,7 +28,7 @@ #ifndef SYMBOLDLG_H #define SYMBOLDLG_H -#include <qregexp.h> +#include <ntqregexp.h> #include "symbollayout.h" #include "cscopefrontend.h" @@ -46,20 +46,20 @@ class SymbolDlg : public SymbolLayout Q_OBJECT public: - SymbolDlg(QWidget* pParent = 0, const char* szName = 0); + SymbolDlg(TQWidget* pParent = 0, const char* szName = 0); ~SymbolDlg(); enum { Reference = 0, Definition, Called, Calling, Text, Pattern, FileName, Including, CallTree }; void setType(uint); - void setSymbol(const QString&); - void setHistory(QStringList&); - QString getSymbol() const; + void setSymbol(const TQString&); + void setHistory(TQStringList&); + TQString getSymbol() const; uint getType() 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 void resetHistory() { s_slHistory.clear(); } @@ -70,17 +70,17 @@ private: /** A regular expression for extracting the symbol name out of the text token of a Cscope record. @see note in slotHintDataReady(). */ - QRegExp m_reHint; + TQRegExp m_reHint; /** Displays query progress information. */ CscopeProgress m_progress; - static QStringList s_slHistory; + static TQStringList s_slHistory; private slots: void slotHintClicked(); void slotHintDataReady(FrontendToken*); - void slotHintItemSelected(QListViewItem*); + void slotHintItemSelected(TQListViewItem*); void slotHintOptionChanged(bool); void slotHintProgress(int, int); void slotHintFinished(uint); diff --git a/src/symbollayout.ui b/src/symbollayout.ui index 09b2885..4ffe188 100644 --- a/src/symbollayout.ui +++ b/src/symbollayout.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>SymbolLayout</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>SymbolLayout</cstring> </property> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout15</cstring> </property> @@ -27,7 +27,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout14</cstring> </property> @@ -35,7 +35,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -51,7 +51,7 @@ <string>Type</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -69,7 +69,7 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout13</cstring> </property> @@ -77,7 +77,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QComboBox"> + <widget class="TQComboBox"> <item> <property name="text"> <string>References to</string> @@ -158,7 +158,7 @@ </widget> </hbox> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_pSubStringCheck</cstring> </property> @@ -169,7 +169,7 @@ <string>Alt+A</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_pCaseCheck</cstring> </property> @@ -191,7 +191,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout3</cstring> </property> @@ -216,7 +216,7 @@ </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pOKButton</cstring> </property> @@ -224,7 +224,7 @@ <string>OK</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pHintButton</cstring> </property> @@ -232,7 +232,7 @@ <string>Hi&nt</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pCancelButton</cstring> </property> @@ -242,12 +242,12 @@ </widget> </hbox> </widget> - <widget class="QListView"> + <widget class="TQListView"> <property name="name"> <cstring>m_pHintList</cstring> </property> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>m_pHintGroup</cstring> </property> @@ -258,7 +258,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_pBeginWithRadio</cstring> </property> @@ -266,7 +266,7 @@ <string>S&ymbols Beginning With...</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_pContainRadio</cstring> </property> diff --git a/src/tabwidget.cpp b/src/tabwidget.cpp index 2795a84..57cfa84 100644 --- a/src/tabwidget.cpp +++ b/src/tabwidget.cpp @@ -25,7 +25,7 @@ * ***************************************************************************/ -#include <qtooltip.h> +#include <ntqtooltip.h> #include <klocale.h> #include "tabwidget.h" #include "kscopepixmaps.h" @@ -35,19 +35,19 @@ * @param pParent A pointer to the parent widget * @param szName Optional widget name */ -TabWidget::TabWidget(QWidget* pParent, const char* szName) : +TabWidget::TabWidget(TQWidget* pParent, const char* szName) : KTabWidget(pParent, szName) { // Create a popup menu - m_pMenu = new QPopupMenu(this); + m_pMenu = new TQPopupMenu(this); // Set the current tab based on the menu selection connect(m_pMenu, SIGNAL(activated(int)), this, SLOT(setCurrentPage(int))); // 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)); - 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(); setCornerWidget(m_pButton, TopRight); diff --git a/src/tabwidget.h b/src/tabwidget.h index 74672ae..b83589e 100644 --- a/src/tabwidget.h +++ b/src/tabwidget.h @@ -29,8 +29,8 @@ #define TABWIDGET_H -#include <qtoolbutton.h> -#include <qpopupmenu.h> +#include <ntqtoolbutton.h> +#include <ntqpopupmenu.h> #include <ktabwidget.h> /** @@ -42,15 +42,15 @@ class TabWidget : public KTabWidget { Q_OBJECT public: - TabWidget(QWidget* pParent = 0, const char* szName = 0); + TabWidget(TQWidget* pParent = 0, const char* szName = 0); ~TabWidget(); private: /** The list button. */ - QToolButton* m_pButton; + TQToolButton* m_pButton; /** A popup-menu containing all tab labels. */ - QPopupMenu* m_pMenu; + TQPopupMenu* m_pMenu; private slots: void slotShowTabList(); diff --git a/src/treewidget.cpp b/src/treewidget.cpp index b303194..db0a26b 100644 --- a/src/treewidget.cpp +++ b/src/treewidget.cpp @@ -33,7 +33,7 @@ * @param pParent Parent 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), m_nQueryType(CscopeFrontend::Called) { @@ -43,8 +43,8 @@ TreeWidget::TreeWidget(QWidget* pParent, const char* szName) : m_pDriver = new QueryViewDriver(this, this); // Query a tree item when it is expanded for the first time - connect(this, SIGNAL(expanded(QListViewItem*)), this, - SLOT(slotQueryItem(QListViewItem*))); + connect(this, SIGNAL(expanded(TQListViewItem*)), this, + SLOT(slotQueryItem(TQListViewItem*))); } /** @@ -68,16 +68,16 @@ void TreeWidget::setMode(Mode mode) * Sets a new root item for the tree. * @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 if ((pRoot = firstChild()) != NULL) delete pRoot; // Create a new root item - pRoot = new QListViewItem(this, sFunc); + pRoot = new TQListViewItem(this, sFunc); pRoot->setExpandable(true); } @@ -86,7 +86,7 @@ void TreeWidget::setRoot(const QString& sFunc) */ void TreeWidget::queryRoot() { - QListViewItem* pRoot; + TQListViewItem* pRoot; if ((pRoot = firstChild()) != NULL) slotQueryItem(pRoot); @@ -98,8 +98,8 @@ void TreeWidget::queryRoot() */ void TreeWidget::save(FILE* pFile) { - QTextStream str(pFile, IO_WriteOnly); - QListViewItem* pRoot; + TQTextStream str(pFile, IO_WriteOnly); + TQListViewItem* pRoot; Encoder enc; 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 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 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 pParent The parent for the new item */ -void TreeWidget::addRecord(const QString& sFunc, const QString& sFile, - const QString& sLine, const QString& sText, QListViewItem* pParent) +void TreeWidget::addRecord(const TQString& sFunc, const TQString& sFile, + const TQString& sLine, const TQString& sText, TQListViewItem* pParent) { - QListViewItem* pItem; + TQListViewItem* pItem; pItem = new QueryViewItem(pParent, m_pLastItem, 2); pItem->setText(0, sFunc); @@ -173,7 +173,7 @@ void TreeWidget::addRecord(const QString& sFunc, const QString& sFile, * @param nResults Number of results * @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) 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. * @param pItem The item to query */ -void TreeWidget::slotQueryItem(QListViewItem* pItem) +void TreeWidget::slotQueryItem(TQListViewItem* pItem) { // Do nothing if the item was already queried // 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 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) { - QListViewItem* pItem; + TQListViewItem* pItem; // Get the first child 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 * object. */ -void TreeWidget::slotShowAll(QListViewItem* pParent) +void TreeWidget::slotShowAll(TQListViewItem* pParent) { - QListViewItem* pItem; + TQListViewItem* pItem; // Get the first child if (pParent != NULL) diff --git a/src/treewidget.h b/src/treewidget.h index 57c2a98..34d32b6 100644 --- a/src/treewidget.h +++ b/src/treewidget.h @@ -45,7 +45,7 @@ class TreeWidget : public QueryView Q_OBJECT public: - TreeWidget(QWidget* pParent = 0, const char* szName = 0); + TreeWidget(TQWidget* pParent = 0, const char* szName = 0); ~TreeWidget(); /** @@ -54,17 +54,17 @@ public: enum Mode { Called, Calling }; void setMode(Mode); - void setRoot(const QString&); + void setRoot(const TQString&); void queryRoot(); void save(FILE*); - virtual void addRecord(const QString&, const QString&, const QString&, - const QString&, QListViewItem*); - virtual void queryFinished(uint, QListViewItem*); + virtual void addRecord(const TQString&, const TQString&, const TQString&, + const TQString&, TQListViewItem*); + virtual void queryFinished(uint, TQListViewItem*); protected slots: - virtual void slotSearch(QListViewItem*, const QRegExp&, int); - virtual void slotShowAll(QListViewItem*); + virtual void slotSearch(TQListViewItem*, const TQRegExp&, int); + virtual void slotShowAll(TQListViewItem*); private: /** 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. */ QueryViewDriver* m_pDriver; - void saveItems(QListViewItem*, QTextStream&, Encoder&); + void saveItems(TQListViewItem*, TQTextStream&, Encoder&); private slots: - void slotQueryItem(QListViewItem*); + void slotQueryItem(TQListViewItem*); }; #endif diff --git a/src/welcomedlg.ui b/src/welcomedlg.ui index 44c385c..dde3cdd 100644 --- a/src/welcomedlg.ui +++ b/src/welcomedlg.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>WelcomeDlg</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>WelcomeDlg</cstring> </property> @@ -69,7 +69,7 @@ Enjoy! <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout1</cstring> </property> @@ -94,7 +94,7 @@ Enjoy! </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pCloseButton</cstring> </property> |