diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
commit | d6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch) | |
tree | d109539636691d7b03036ca1c0ed29dbae6577cf /src | |
parent | 3331a47a9cad24795c7440ee8107143ce444ef34 (diff) | |
download | tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src')
54 files changed, 1228 insertions, 1228 deletions
diff --git a/src/core.cpp b/src/core.cpp index d7b6b285..c189fcf8 100644 --- a/src/core.cpp +++ b/src/core.cpp @@ -1,4 +1,4 @@ -#include <qtimer.h> +#include <tqtimer.h> #include <kapplication.h> @@ -31,18 +31,18 @@ Core *Core::getInstance() void Core::setupShourtcutTips(KXMLGUIClient * client) { - QPtrList<KXMLGUIClient> clients; + TQPtrList<KXMLGUIClient> clients; if (client != 0) clients.append(client); else clients = TopLevel::getInstance()->main()->guiFactory()->clients(); - for( QPtrListIterator<KXMLGUIClient> it(clients); it.current(); ++it ) { + for( TQPtrListIterator<KXMLGUIClient> it(clients); it.current(); ++it ) { KActionCollection *actionCollection = (*it)->actionCollection(); for (int i = 0; i < actionCollection->count(); i++) { KAction *action = actionCollection->action(i); - QString tooltip = action->toolTip(); + TQString tooltip = action->toolTip(); if (tooltip.isEmpty()) tooltip = action->text().remove('&'); else { @@ -50,7 +50,7 @@ void Core::setupShourtcutTips(KXMLGUIClient * client) if (i > 0) tooltip = tooltip.left(i).stripWhiteSpace(); } - QString shortcut = action->shortcutText(); + TQString shortcut = action->shortcutText(); if (!shortcut.isEmpty()) tooltip += " (" + shortcut + ")"; action->setToolTip(tooltip); @@ -94,23 +94,23 @@ void Core::running(KDevPlugin * which, bool runs) } -void Core::fillContextMenu(QPopupMenu *popup, const Context *context) +void Core::fillContextMenu(TQPopupMenu *popup, const Context *context) { emit contextMenu(popup, context); } -void Core::openProject(const QString& projectFileName) +void Core::openProject(const TQString& projectFileName) { ProjectManager::getInstance()->loadProject(KURL( projectFileName )); } namespace MainWindowUtils{ -QString beautifyToolTip(const QString& text) +TQString beautifyToolTip(const TQString& text) { - QString temp = text; - temp.replace(QRegExp("&"), ""); - temp.replace(QRegExp("\\.\\.\\."), ""); + TQString temp = text; + temp.replace(TQRegExp("&"), ""); + temp.replace(TQRegExp("\\.\\.\\."), ""); return temp; } } @@ -1,7 +1,7 @@ #ifndef _CORE_H_ #define _CORE_H_ -#include <qregexp.h> +#include <tqregexp.h> #include <kxmlguiclient.h> #include <kparts/partmanager.h> @@ -11,7 +11,7 @@ namespace MainWindowUtils{ -QString beautifyToolTip(const QString& text); +TQString beautifyToolTip(const TQString& text); } /** @@ -41,8 +41,8 @@ public: ~Core(); virtual void running(KDevPlugin *which, bool runs); - virtual void fillContextMenu(QPopupMenu *popup, const Context *context); - virtual void openProject(const QString& projectFileName); + virtual void fillContextMenu(TQPopupMenu *popup, const Context *context); + virtual void openProject(const TQString& projectFileName); void doEmitProjectOpened() { emit projectOpened(); } void doEmitProjectClosed() { emit projectClosed(); } diff --git a/src/editorproxy.cpp b/src/editorproxy.cpp index b256491d..a0c42da3 100644 --- a/src/editorproxy.cpp +++ b/src/editorproxy.cpp @@ -1,6 +1,6 @@ -#include <qwidget.h> -#include <qpopupmenu.h> -#include <qtimer.h> +#include <tqwidget.h> +#include <tqpopupmenu.h> +#include <tqtimer.h> #include <kdeversion.h> #include <kdebug.h> @@ -37,16 +37,16 @@ EditorProxy *EditorProxy::s_instance = 0; EditorProxy::EditorProxy() - : QObject() + : TQObject() { - m_delayedLineTimer = new QTimer( this ); - connect( m_delayedLineTimer, SIGNAL( timeout() ), this, SLOT(setLineNumberDelayed()) ); + m_delayedLineTimer = new TQTimer( this ); + connect( m_delayedLineTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT(setLineNumberDelayed()) ); KConfig *config = kapp->config(); m_delayedViewCreationCompatibleUI = true; KAction *ac = new KAction( i18n("Show Context Menu"), 0, this, - SLOT(showPopup()), TopLevel::getInstance()->main()->actionCollection(), "show_popup" ); + TQT_SLOT(showPopup()), TopLevel::getInstance()->main()->actionCollection(), "show_popup" ); KShortcut cut ;/*= KStdAccel::shortcut(KStdAccel::PopupMenuContext);*/ cut.append(KKey(CTRL+Key_Return)); ac->setShortcut(cut); @@ -94,7 +94,7 @@ void EditorProxy::setLineNumber(KParts::Part *part, int lineNum, int col) } else { // Save the position for a rainy day (or when the view gets activated and wants its position) - for (QValueList<MultiBuffer*>::ConstIterator it = m_editorParts.begin(); it != m_editorParts.end(); ++it) + for (TQValueList<MultiBuffer*>::ConstIterator it = m_editorParts.begin(); it != m_editorParts.end(); ++it) if ((*it)->hasURL( url )) { (*it)->registerDelayedActivation( part, lineNum, col ); return; @@ -115,7 +115,7 @@ void EditorProxy::installPopup( KParts::Part * part ) { KTextEditor::View * view = static_cast<KTextEditor::View*>( part->widget() ); - QPopupMenu * popup = static_cast<QPopupMenu*>( part->factory()->container("ktexteditor_popup", view ) ); + TQPopupMenu * popup = static_cast<TQPopupMenu*>( part->factory()->container("ktexteditor_popup", view ) ); if (!popup) { @@ -143,7 +143,7 @@ void EditorProxy::installPopup( KParts::Part * part ) iface->installPopup( popup ); - connect(popup, SIGNAL(aboutToShow()), this, SLOT(popupAboutToShow())); + connect(popup, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(popupAboutToShow())); // ugly hack: mark the "original" items m_popupIds.resize(popup->count()); @@ -155,7 +155,7 @@ void EditorProxy::installPopup( KParts::Part * part ) void EditorProxy::popupAboutToShow() { - QPopupMenu *popup = (QPopupMenu*)sender(); + TQPopupMenu *popup = (TQPopupMenu*)sender(); if (!popup) return; @@ -165,7 +165,7 @@ void EditorProxy::popupAboutToShow() int id = popup->idAt(index); if (m_popupIds.contains(id) == 0) { - QMenuItem *item = popup->findItem(id); + TQMenuItem *item = popup->findItem(id); if ( item && item->popup() ) delete item->popup(); else @@ -180,8 +180,8 @@ void EditorProxy::popupAboutToShow() unsigned int col; if ( !KDevEditorUtil::currentPositionReal( &line, &col, doc ) ) return; - QString wordstr; - QString selection = KDevEditorUtil::currentSelection( doc ); + TQString wordstr; + TQString selection = KDevEditorUtil::currentSelection( doc ); if ( !selection.isEmpty() && selection.contains('\n') != 0 ) { wordstr = selection; @@ -191,7 +191,7 @@ void EditorProxy::popupAboutToShow() wordstr = KDevEditorUtil::currentWord( doc ); } - QString linestr = KDevEditorUtil::currentLine( doc ); + TQString linestr = KDevEditorUtil::currentLine( doc ); EditorContext context( doc->url(), line, col, linestr, wordstr ); Core::getInstance()->fillContextMenu( popup, &context ); @@ -225,7 +225,7 @@ void EditorProxy::showPopup( ) if ( iface ) { KTextEditor::View * view = static_cast<KTextEditor::View*>( part->widget() ); - QPopupMenu * popup = static_cast<QPopupMenu*>( view->factory()->container("ktexteditor_popup", view ) ); + TQPopupMenu * popup = static_cast<TQPopupMenu*>( view->factory()->container("ktexteditor_popup", view ) ); if ( popup ) { @@ -245,7 +245,7 @@ void EditorProxy::deregisterEditor(MultiBuffer* wrapper) m_editorParts.remove(wrapper); } -QWidget * EditorProxy::widgetForPart( KParts::Part * part ) +TQWidget * EditorProxy::widgetForPart( KParts::Part * part ) { if ( !part ) return 0; @@ -254,20 +254,20 @@ QWidget * EditorProxy::widgetForPart( KParts::Part * part ) KURL url = dynamic_cast<KParts::ReadOnlyPart*>( part )->url(); - for (QValueList<MultiBuffer*>::ConstIterator it = m_editorParts.begin(); it != m_editorParts.end(); ++it) + for (TQValueList<MultiBuffer*>::ConstIterator it = m_editorParts.begin(); it != m_editorParts.end(); ++it) if ((*it)->hasURL( url )) return *it; return 0L; } -QWidget * EditorProxy::topWidgetForPart( KParts::Part * part ) +TQWidget * EditorProxy::topWidgetForPart( KParts::Part * part ) { if ( !part ) return 0; KURL url = dynamic_cast<KParts::ReadOnlyPart*>( part )->url(); - for (QValueList<MultiBuffer*>::ConstIterator it = m_editorParts.begin(); it != m_editorParts.end(); ++it) + for (TQValueList<MultiBuffer*>::ConstIterator it = m_editorParts.begin(); it != m_editorParts.end(); ++it) if ((*it)->hasURL( url )) return *it; @@ -282,9 +282,9 @@ bool EditorProxy::isDelayedViewCapable( ) return m_delayedViewCreationCompatibleUI; } -QWidget *EditorProxy::findPartWidget(KParts::Part *part) +TQWidget *EditorProxy::findPartWidget(KParts::Part *part) { - for (QValueList<MultiBuffer*>::ConstIterator it = m_editorParts.begin(); it != m_editorParts.end(); ++it) + for (TQValueList<MultiBuffer*>::ConstIterator it = m_editorParts.begin(); it != m_editorParts.end(); ++it) if ((*it)->hasPart(part)) return *it; diff --git a/src/editorproxy.h b/src/editorproxy.h index 51564dd1..51854e9f 100644 --- a/src/editorproxy.h +++ b/src/editorproxy.h @@ -2,9 +2,9 @@ #define __EDITORPROXY_H__ -#include <qobject.h> -#include <qmemarray.h> -#include <qguardedptr.h> +#include <tqobject.h> +#include <tqmemarray.h> +#include <tqguardedptr.h> class QPopupMenu; class MultiBuffer; @@ -30,12 +30,12 @@ public: void registerEditor(MultiBuffer* wrapper); void deregisterEditor(MultiBuffer* wrapper); - QWidget * widgetForPart( KParts::Part * part ); - QWidget * topWidgetForPart( KParts::Part * part ); + TQWidget * widgetForPart( KParts::Part * part ); + TQWidget * topWidgetForPart( KParts::Part * part ); bool isDelayedViewCapable(); - QWidget * findPartWidget( KParts::Part * part ); + TQWidget * findPartWidget( KParts::Part * part ); public slots: void setLineNumberDelayed(); @@ -51,12 +51,12 @@ private: static EditorProxy *s_instance; - QMemArray<int> m_popupIds; + TQMemArray<int> m_popupIds; // This list is used to save line/col information for not yet activated editor views. - QValueList< MultiBuffer* > m_editorParts; + TQValueList< MultiBuffer* > m_editorParts; - QTimer* m_delayedLineTimer; + TQTimer* m_delayedLineTimer; bool m_delayedViewCreationCompatibleUI; KParts::Part *m_delayedPart; int m_delayedLine; diff --git a/src/generalinfowidget.cpp b/src/generalinfowidget.cpp index e57dc41a..fdc53eff 100644 --- a/src/generalinfowidget.cpp +++ b/src/generalinfowidget.cpp @@ -9,17 +9,17 @@ ***************************************************************************/ #include <klineedit.h> -#include <qtextedit.h> -#include <qcombobox.h> -#include <qlabel.h> -#include <qfileinfo.h> -#include <qdir.h> +#include <tqtextedit.h> +#include <tqcombobox.h> +#include <tqlabel.h> +#include <tqfileinfo.h> +#include <tqdir.h> #include <kurl.h> #include <klocale.h> #include <kiconloader.h> #include <kcharsets.h> -#include <qregexp.h> +#include <tqregexp.h> #include <kmessagebox.h> #include "generalinfowidget.h" @@ -27,15 +27,15 @@ #include "domutil.h" #include "projectmanager.h" -QString makeRelativePath(const QString& fromPath, const QString& toPath); +TQString makeRelativePath(const TQString& fromPath, const TQString& toPath); -GeneralInfoWidget::GeneralInfoWidget(QDomDocument &projectDom, QWidget *parent, const char *name) +GeneralInfoWidget::GeneralInfoWidget(TQDomDocument &projectDom, TQWidget *parent, const char *name) : GeneralInfoWidgetBase(parent, name), m_projectDom(projectDom) { - connect(project_directory_edit, SIGNAL(textChanged(const QString&)), - this, SLOT(slotProjectDirectoryChanged(const QString&))); - connect(project_directory_combo, SIGNAL(activated(int)), - this, SLOT(slotProjectDirectoryComboChanged())); + connect(project_directory_edit, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(slotProjectDirectoryChanged(const TQString&))); + connect(project_directory_combo, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotProjectDirectoryComboChanged())); readConfig(); } @@ -54,10 +54,10 @@ void GeneralInfoWidget::readConfig() { this->version_edit->setText(DomUtil::readEntry(m_projectDom,"/general/version")); this->description_edit->setText(DomUtil::readEntry(m_projectDom,"/general/description")); - QStringList encodings; + TQStringList encodings; encodings << i18n("Use global editor settings"); encodings += KGlobal::charsets()->descriptiveEncodingNames(); - QStringList::const_iterator it = encodings.constBegin(); + TQStringList::const_iterator it = encodings.constBegin(); while ( it != encodings.constEnd() ) { encoding_combo->insertItem( *it ); @@ -65,8 +65,8 @@ void GeneralInfoWidget::readConfig() { } encoding_combo->setCurrentItem( 0 ); -// const QString DefaultEncoding = KGlobal::charsets()->encodingForName( DomUtil::readEntry( m_projectDom, "/general/defaultencoding", QString::null ) ); - const QString DefaultEncoding = DomUtil::readEntry( m_projectDom, "/general/defaultencoding", QString::null ); +// const TQString DefaultEncoding = KGlobal::charsets()->encodingForName( DomUtil::readEntry( m_projectDom, "/general/defaultencoding", TQString::null ) ); + const TQString DefaultEncoding = DomUtil::readEntry( m_projectDom, "/general/defaultencoding", TQString::null ); for ( int i = 0; i < encoding_combo->count(); i++ ) { if ( KGlobal::charsets()->encodingForName( encoding_combo->text( i ) ) == DefaultEncoding ) @@ -87,40 +87,40 @@ void GeneralInfoWidget::readConfig() { * @param configureinpath Full path to configure.in file * @param newVersion The new version number or string */ -void GeneralInfoWidget::configureinUpdateVersion( QString configureinpath, QString newVersion ) +void GeneralInfoWidget::configureinUpdateVersion( TQString configureinpath, TQString newVersion ) { - QFile configurein(configureinpath); + TQFile configurein(configureinpath); if ( !configurein.open( IO_ReadOnly ) ){ KMessageBox::error(this, i18n("Could not open %1 for reading.").arg(configureinpath)); return; } - QTextStream stream( &configurein); - QStringList list; + TQTextStream stream( &configurein); + TQStringList list; // Options for version: // we ignore old AC_INIT that had no version.. // only match the if there is a comma and at least two args.. // AC_INIT (package, version, [bug-report], [tarname]) - QRegExp ac_init("^AC_INIT\\s*\\(\\s*([^,]+),([^,\\)]+)(.*)"); + TQRegExp ac_init("^AC_INIT\\s*\\(\\s*([^,]+),([^,\\)]+)(.*)"); // AM_INIT_AUTOMAKE([OPTIONS]) // example: AM_INIT_AUTOMAKE([gnits 1.5 no-define dist-bzip2]) - QRegExp am_autoSpace("^AM_INIT_AUTOMAKE\\s{0,}\\(\\s{0,}([\\[\\s]{0,}[^\\s]+)\\s+([^\\s\\)\\]]+)(.*)"); + TQRegExp am_autoSpace("^AM_INIT_AUTOMAKE\\s{0,}\\(\\s{0,}([\\[\\s]{0,}[^\\s]+)\\s+([^\\s\\)\\]]+)(.*)"); // AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) - QRegExp am_autoComma("^AM_INIT_AUTOMAKE\\s*\\(\\s*([^,]+),([^,\\)]+)(.*)"); + TQRegExp am_autoComma("^AM_INIT_AUTOMAKE\\s*\\(\\s*([^,]+),([^,\\)]+)(.*)"); // look for version in a define. // AC_DEFINE(VERSION, "5.6") - QRegExp ac_define("^AC_DEFINE\\s*\\("); - QRegExp version("(\\bversion\\b)"); + TQRegExp ac_define("^AC_DEFINE\\s*\\("); + TQRegExp version("(\\bversion\\b)"); version.setCaseSensitive(FALSE); while ( !stream.eof() ) { - QString line = stream.readLine(); + TQString line = stream.readLine(); if ( ac_init.search(line) >= 0){ line = "AC_INIT(" + ac_init.cap(1).stripWhiteSpace(); line += ", "; @@ -150,13 +150,13 @@ void GeneralInfoWidget::configureinUpdateVersion( QString configureinpath, QStri configurein.close(); // write our changes.. - QFile configureout(configureinpath); + TQFile configureout(configureinpath); if ( !configureout.open( IO_WriteOnly ) ){ KMessageBox::error(this, i18n("Could not open %1 for writing.").arg(configureinpath)); return ; } - QTextStream output( &configureout); - for(QStringList::iterator iter = list.begin();iter!=list.end();iter++){ + TQTextStream output( &configureout); + for(TQStringList::iterator iter = list.begin();iter!=list.end();iter++){ output << (*iter) <<"\n"; } configureout.close(); @@ -170,9 +170,9 @@ void GeneralInfoWidget::writeConfig() { DomUtil::writeEntry(m_projectDom,"/general/email",email_edit->text()); if ( DomUtil::readEntry(m_projectDom,"/general/version") != version_edit->text() && !DomUtil::elementByPath( m_projectDom, "/kdevautoproject").isNull() ){ // update the configure.in.in, configure.in or configure.ac file. - QFile inInFile(projectDirectory() + "/configure.in.in"); - QFile inFile(projectDirectory() + "/configure.in"); - QFile acFile(projectDirectory() + "/configure.ac"); + TQFile inInFile(projectDirectory() + "/configure.in.in"); + TQFile inFile(projectDirectory() + "/configure.in"); + TQFile acFile(projectDirectory() + "/configure.ac"); if ( inInFile.exists()){ configureinUpdateVersion( inInFile.name(), version_edit->text() ); } @@ -189,7 +189,7 @@ void GeneralInfoWidget::writeConfig() { DomUtil::writeEntry(m_projectDom,"/general/version",version_edit->text()); DomUtil::writeEntry(m_projectDom,"/general/description",description_edit->text()); - QString DefaultEncoding = QString::null; + TQString DefaultEncoding = TQString::null; if ( encoding_combo->currentItem() > 0 ) { DefaultEncoding = KGlobal::charsets()->encodingForName( encoding_combo->currentText() ); @@ -205,11 +205,11 @@ bool GeneralInfoWidget::isProjectDirectoryAbsolute() { return project_directory_combo->currentItem() == 0; } -QString GeneralInfoWidget::projectDirectory() { +TQString GeneralInfoWidget::projectDirectory() { return ProjectManager::projectDirectory( project_directory_edit->text(), isProjectDirectoryAbsolute() ); } -void GeneralInfoWidget::slotProjectDirectoryChanged( const QString& text ) { +void GeneralInfoWidget::slotProjectDirectoryChanged( const TQString& text ) { if(text.isEmpty()) { setProjectDirectoryError(i18n("Please enter a path.")); @@ -228,7 +228,7 @@ void GeneralInfoWidget::slotProjectDirectoryChanged( const QString& text ) { } else { - QFileInfo info(projectDirectory()); + TQFileInfo info(projectDirectory()); if(!info.exists()) setProjectDirectoryError( i18n("'%1' does not exist.").arg( @@ -243,7 +243,7 @@ void GeneralInfoWidget::slotProjectDirectoryChanged( const QString& text ) { } void GeneralInfoWidget::slotProjectDirectoryComboChanged() { - QString text = project_directory_edit->text(); + TQString text = project_directory_edit->text(); if(isProjectDirectoryAbsolute() && text[0] != '/' ) project_directory_edit->setText(ProjectManager::projectDirectory(text,false)); else if(!isProjectDirectoryAbsolute() && text[0] == '/') @@ -252,7 +252,7 @@ void GeneralInfoWidget::slotProjectDirectoryComboChanged() { } } -void GeneralInfoWidget::setProjectDirectoryError( const QString& error ) { +void GeneralInfoWidget::setProjectDirectoryError( const TQString& error ) { project_directory_diagnostic_icon->setPixmap(SmallIcon("no")); project_directory_diagnostic_label->setText( error ); } @@ -267,17 +267,17 @@ void GeneralInfoWidget::setProjectDirectorySuccess() { i18n("'%1' is a valid project directory.").arg(projectDirectory())); } -QString makeRelativePath(const QString& fromPath, const QString& toPath) +TQString makeRelativePath(const TQString& fromPath, const TQString& toPath) { if ( fromPath == toPath ) return "."; - QStringList fromDirs = QStringList::split( '/', fromPath ); - QStringList toDirs = QStringList::split( '/', toPath ); - QStringList::iterator fromIt = fromDirs.begin(); - QStringList::iterator toIt = toDirs.begin(); + TQStringList fromDirs = TQStringList::split( '/', fromPath ); + TQStringList toDirs = TQStringList::split( '/', toPath ); + TQStringList::iterator fromIt = fromDirs.begin(); + TQStringList::iterator toIt = toDirs.begin(); - QString relative; + TQString relative; for ( ; (*fromIt) == (*toIt); ++fromIt, ++toIt ) ; diff --git a/src/generalinfowidget.h b/src/generalinfowidget.h index b6e3a85f..d1698f09 100644 --- a/src/generalinfowidget.h +++ b/src/generalinfowidget.h @@ -11,8 +11,8 @@ #ifndef _GENERALINFOWIDGET_H_ #define _GENERALINFOWIDGET_H_ -#include <qwidget.h> -#include <qdom.h> +#include <tqwidget.h> +#include <tqdom.h> #include "generalinfowidgetbase.h" @@ -26,28 +26,28 @@ class GeneralInfoWidget : public GeneralInfoWidgetBase { public: - GeneralInfoWidget(QDomDocument &projectDom, QWidget *parent=0, const char *name=0); + GeneralInfoWidget(TQDomDocument &projectDom, TQWidget *parent=0, const char *name=0); ~GeneralInfoWidget(); public slots: void accept(); private slots: - void slotProjectDirectoryChanged( const QString& text ); + void slotProjectDirectoryChanged( const TQString& text ); void slotProjectDirectoryComboChanged(); private: - QDomDocument m_projectDom; + TQDomDocument m_projectDom; void readConfig(); void writeConfig(); bool isProjectDirectoryAbsolute(); - QString projectDirectory(); - void setProjectDirectoryError( const QString& error ); + TQString projectDirectory(); + void setProjectDirectoryError( const TQString& error ); void setProjectDirectorySuccess(); - void configureinUpdateVersion( QString configureinpath, QString newVersion ); + void configureinUpdateVersion( TQString configureinpath, TQString newVersion ); }; #endif diff --git a/src/kconf_update/kdev-gen-settings-kconf_update.cpp b/src/kconf_update/kdev-gen-settings-kconf_update.cpp index 1f3c9740..b8da1f60 100644 --- a/src/kconf_update/kdev-gen-settings-kconf_update.cpp +++ b/src/kconf_update/kdev-gen-settings-kconf_update.cpp @@ -15,21 +15,21 @@ ************************************************************************* */ -#include <qmap.h> -#include <qtextstream.h> -#include <qregexp.h> +#include <tqmap.h> +#include <tqtextstream.h> +#include <tqregexp.h> -static QTextStream qcin ( stdin, IO_ReadOnly ); -static QTextStream qcout( stdout, IO_WriteOnly ); -static QTextStream qcerr( stderr, IO_WriteOnly ); +static TQTextStream qcin ( stdin, IO_ReadOnly ); +static TQTextStream qcout( stdout, IO_WriteOnly ); +static TQTextStream qcerr( stderr, IO_WriteOnly ); // Group cache. Yes, I know global vars are ugly :) bool needFlush = false; -QString newKeyValue; +TQString newKeyValue; int newDataValue; -void parseKey( const QString &group, const QString &key, - const QString &value, const QString &rawLine ) +void parseKey( const TQString &group, const TQString &key, + const TQString &value, const TQString &rawLine ) { //qcerr << "*** group='" << group << "'" << endl; @@ -72,18 +72,18 @@ void parseKey( const QString &group, const QString &key, int main() { - qcin.setEncoding( QTextStream::UnicodeUTF8 ); - qcout.setEncoding( QTextStream::UnicodeUTF8 ); + qcin.setEncoding( TQTextStream::UnicodeUTF8 ); + qcout.setEncoding( TQTextStream::UnicodeUTF8 ); - QString curGroup; + TQString curGroup; - QRegExp groupRegExp( "^\\[(.*)\\]" ); - QRegExp keyRegExp( "^([a-zA-Z0-9:, _-]*)\\s*=\\s*(.*)\\s*" ); - QRegExp commentRegExp( "^(#.*)?$" ); + TQRegExp groupRegExp( "^\\[(.*)\\]" ); + TQRegExp keyRegExp( "^([a-zA-Z0-9:, _-]*)\\s*=\\s*(.*)\\s*" ); + TQRegExp commentRegExp( "^(#.*)?$" ); while ( !qcin.atEnd() ) { - QString line = qcin.readLine(); + TQString line = qcin.readLine(); if ( commentRegExp.exactMatch( line ) ) { diff --git a/src/kdevassistantextension.cpp b/src/kdevassistantextension.cpp index 85c8462a..ddbfb6bf 100644 --- a/src/kdevassistantextension.cpp +++ b/src/kdevassistantextension.cpp @@ -29,12 +29,12 @@ void KDevAssistantExtension::init() s_instance = new KDevAssistantExtension(); } -QString KDevAssistantExtension::xmlFile() +TQString KDevAssistantExtension::xmlFile() { return "kdevassistantui.rc"; } -QString KDevAssistantExtension::defaultProfile() +TQString KDevAssistantExtension::defaultProfile() { return "KDevAssistant"; } diff --git a/src/kdevassistantextension.h b/src/kdevassistantextension.h index 062977ec..874cafbd 100644 --- a/src/kdevassistantextension.h +++ b/src/kdevassistantextension.h @@ -29,9 +29,9 @@ public: virtual void createGlobalSettingsPage(KDialogBase */*dlg*/) {}; virtual void acceptGlobalSettingsPage(KDialogBase */*dlg*/) {}; - virtual QString xmlFile(); + virtual TQString xmlFile(); - virtual QString defaultProfile(); + virtual TQString defaultProfile(); protected: KDevAssistantExtension(); diff --git a/src/kdevideextension.cpp b/src/kdevideextension.cpp index 98e9e7e2..0c35de83 100644 --- a/src/kdevideextension.cpp +++ b/src/kdevideextension.cpp @@ -19,11 +19,11 @@ ***************************************************************************/ #include "kdevideextension.h" -#include <qvbox.h> -#include <qcheckbox.h> -#include <qbuttongroup.h> -#include <qradiobutton.h> -#include <qcombobox.h> +#include <tqvbox.h> +#include <tqcheckbox.h> +#include <tqbuttongroup.h> +#include <tqradiobutton.h> +#include <tqcombobox.h> #include <klineedit.h> #include <klocale.h> @@ -54,7 +54,7 @@ void KDevIDEExtension::init() void KDevIDEExtension::createGlobalSettingsPage(KDialogBase *dlg) { KConfig* config = kapp->config(); - QVBox *vbox = dlg->addVBoxPage(i18n("General"), i18n("General"), BarIcon("kdevelop", KIcon::SizeMedium) ); + TQVBox *vbox = dlg->addVBoxPage(i18n("General"), i18n("General"), BarIcon("kdevelop", KIcon::SizeMedium) ); gsw = new SettingsWidget(vbox, "general settings widget"); gsw->projectsURL->setMode((int)KFile::Directory); @@ -70,16 +70,16 @@ void KDevIDEExtension::createGlobalSettingsPage(KDialogBase *dlg) gsw->userLocaleRadio->setChecked( !config->readBoolEntry( "ForceCLocale", true ) ); config->setGroup("General Options"); - gsw->projectsURL->setURL(config->readPathEntry("DefaultProjectsDir", QDir::homeDirPath()+"/")); + gsw->projectsURL->setURL(config->readPathEntry("DefaultProjectsDir", TQDir::homeDirPath()+"/")); gsw->designerButtonGroup->setButton( config->readNumEntry( "DesignerApp", 0 ) ); - QString DesignerSetting = config->readEntry( "DesignerSetting", "ExternalDesigner" ); + TQString DesignerSetting = config->readEntry( "DesignerSetting", "ExternalDesigner" ); gsw->qtDesignerRadioButton->setChecked( DesignerSetting == "ExternalDesigner" ); gsw->seperateAppRadioButton->setChecked( DesignerSetting == "ExternalKDevDesigner" ); gsw->embeddedDesignerRadioButton->setChecked( DesignerSetting == "EmbeddedKDevDesigner" ); config->setGroup("TerminalEmulator"); - gsw->terminalEdit->setText( config->readEntry( "TerminalApplication", QString::fromLatin1("konsole") ) ); + gsw->terminalEdit->setText( config->readEntry( "TerminalApplication", TQString::fromLatin1("konsole") ) ); bool useKDESetting = config->readBoolEntry( "UseKDESetting", true ); gsw->useKDETerminal->setChecked( useKDESetting ); gsw->useOtherTerminal->setChecked( !useKDESetting ); @@ -95,7 +95,7 @@ void KDevIDEExtension::acceptGlobalSettingsPage(KDialogBase *dlg) config->writePathEntry("DefaultProjectsDir", gsw->projectsURL->url()); config->writeEntry("OutputViewFont", gsw->outputFont->font()); - QString DesignerSetting; + TQString DesignerSetting; if ( gsw->qtDesignerRadioButton->isChecked() ) DesignerSetting = "ExternalDesigner"; if ( gsw->seperateAppRadioButton->isChecked() ) DesignerSetting = "ExternalKDevDesigner"; if ( gsw->embeddedDesignerRadioButton->isChecked() ) DesignerSetting = "EmbeddedKDevDesigner"; @@ -118,12 +118,12 @@ void KDevIDEExtension::acceptGlobalSettingsPage(KDialogBase *dlg) config->writeEntry("TerminalApplication", gsw->terminalEdit->text().stripWhiteSpace() ); } -QString KDevIDEExtension::xmlFile() +TQString KDevIDEExtension::xmlFile() { return "kdevelopui.rc"; } -QString KDevIDEExtension::defaultProfile() +TQString KDevIDEExtension::defaultProfile() { return "IDE"; } diff --git a/src/kdevideextension.h b/src/kdevideextension.h index e5e506e7..1e25da7e 100644 --- a/src/kdevideextension.h +++ b/src/kdevideextension.h @@ -31,9 +31,9 @@ public: virtual void createGlobalSettingsPage(KDialogBase *dlg); virtual void acceptGlobalSettingsPage(KDialogBase *dlg); - virtual QString xmlFile(); + virtual TQString xmlFile(); - virtual QString defaultProfile(); + virtual TQString defaultProfile(); protected: KDevIDEExtension(); diff --git a/src/languageselectwidget.cpp b/src/languageselectwidget.cpp index 45922c2d..6c6bd357 100644 --- a/src/languageselectwidget.cpp +++ b/src/languageselectwidget.cpp @@ -9,15 +9,15 @@ * * ***************************************************************************/ -#include <qstring.h> -#include <qvariant.h> -#include <qheader.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlistview.h> -#include <qgroupbox.h> -#include <qhbox.h> -#include <qregexp.h> +#include <tqstring.h> +#include <tqvariant.h> +#include <tqheader.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlistview.h> +#include <tqgroupbox.h> +#include <tqhbox.h> +#include <tqregexp.h> #include <kconfig.h> #include <kdebug.h> @@ -36,43 +36,43 @@ class LangPluginItem : public QCheckListItem { public: // name - "Name", label - "GenericName", info - "Comment" - LangPluginItem( QListView * parent, QString const & name, QString const & label, - QString const & info ) - : QCheckListItem( parent, label, QCheckListItem::CheckBox), + LangPluginItem( TQListView * parent, TQString const & name, TQString const & label, + TQString const & info ) + : TQCheckListItem( parent, label, TQCheckListItem::CheckBox), _name( name ), _info( info ) {} - QString info() { return _info; } - QString name() { return _name; } + TQString info() { return _info; } + TQString name() { return _name; } private: - QString _name; - QString _info; + TQString _name; + TQString _info; }; -LanguageSelectWidget::LanguageSelectWidget(QDomDocument &projectDom, - QWidget *parent, const char *name) - : QWidget(parent, name), m_projectDom(projectDom) +LanguageSelectWidget::LanguageSelectWidget(TQDomDocument &projectDom, + TQWidget *parent, const char *name) + : TQWidget(parent, name), m_projectDom(projectDom) { init(); } void LanguageSelectWidget::init() { - QVBoxLayout *layout = new QVBoxLayout(this); + TQVBoxLayout *layout = new TQVBoxLayout(this); - QGroupBox * groupBox1 = new QGroupBox( i18n("Additional Language Support"), this ); + TQGroupBox * groupBox1 = new TQGroupBox( i18n("Additional Language Support"), this ); groupBox1->setColumnLayout(0, Qt::Vertical ); groupBox1->layout()->setSpacing( 6 ); groupBox1->layout()->setMargin( 11 ); - QVBoxLayout * groupBox1Layout = new QVBoxLayout( groupBox1->layout() ); + TQVBoxLayout * groupBox1Layout = new TQVBoxLayout( groupBox1->layout() ); groupBox1Layout->setAlignment( Qt::AlignTop ); - _currentLanguage = new QLabel( "", groupBox1 ); + _currentLanguage = new TQLabel( "", groupBox1 ); - _pluginList = new QListView( groupBox1 ); - _pluginList->setResizeMode( QListView::LastColumn ); + _pluginList = new TQListView( groupBox1 ); + _pluginList->setResizeMode( TQListView::LastColumn ); _pluginList->addColumn(""); _pluginList->header()->hide(); @@ -80,21 +80,21 @@ void LanguageSelectWidget::init() groupBox1Layout->addWidget( _pluginList ); layout->addWidget( groupBox1 ); - QGroupBox * groupBox2 = new QGroupBox( i18n("Description"), this ); + TQGroupBox * groupBox2 = new TQGroupBox( i18n("Description"), this ); groupBox2->setColumnLayout(0, Qt::Vertical ); groupBox2->layout()->setSpacing( 6 ); groupBox2->layout()->setMargin( 11 ); - QVBoxLayout * groupBox2Layout = new QVBoxLayout( groupBox2->layout() ); + TQVBoxLayout * groupBox2Layout = new TQVBoxLayout( groupBox2->layout() ); groupBox2Layout->setAlignment( Qt::AlignTop ); - _pluginDescription = new QLabel( groupBox2 ); - _pluginDescription->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) ); + _pluginDescription = new TQLabel( groupBox2 ); + _pluginDescription->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) ); groupBox2Layout->addWidget( _pluginDescription ); layout->addWidget( groupBox2 ); - connect( _pluginList, SIGNAL( selectionChanged( QListViewItem * ) ), this, SLOT( itemSelected( QListViewItem * ) ) ); + connect( _pluginList, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ), this, TQT_SLOT( itemSelected( TQListViewItem * ) ) ); readProjectConfig(); } @@ -106,30 +106,30 @@ LanguageSelectWidget::~LanguageSelectWidget() void LanguageSelectWidget::readProjectConfig() { KTrader::OfferList languageSupportOffers = - KTrader::self()->query(QString::fromLatin1("KDevelop/LanguageSupport"), - QString::fromLatin1("[X-KDevelop-Version] == %1" + KTrader::self()->query(TQString::fromLatin1("KDevelop/LanguageSupport"), + TQString::fromLatin1("[X-KDevelop-Version] == %1" ).arg( KDEVELOP_PLUGIN_VERSION )); - QStringList languages = DomUtil::readListEntry(m_projectDom, "/general/secondaryLanguages", "language"); - QString language = DomUtil::readEntry(m_projectDom, "/general/primarylanguage"); + TQStringList languages = DomUtil::readListEntry(m_projectDom, "/general/secondaryLanguages", "language"); + TQString language = DomUtil::readEntry(m_projectDom, "/general/primarylanguage"); _currentLanguage->setText(i18n("Primary language is '%1'. Please select additional languages the project might contain.").arg(language)); for (KTrader::OfferList::ConstIterator it = languageSupportOffers.begin(); it != languageSupportOffers.end(); ++it) { - QString la = (*it)->property("X-KDevelop-Language").toString(); + TQString la = (*it)->property("X-KDevelop-Language").toString(); if (la == language) continue; LangPluginItem *item = new LangPluginItem( _pluginList, (*it)->property("X-KDevelop-Language").toString(), (*it)->genericName(), (*it)->comment() ); item->setOn(languages.contains(la)); } - QListViewItem * first = _pluginList->firstChild(); + TQListViewItem * first = _pluginList->firstChild(); if ( first ) { _pluginList->setSelected( first, true ); } } -void LanguageSelectWidget::itemSelected( QListViewItem * item ) +void LanguageSelectWidget::itemSelected( TQListViewItem * item ) { if ( !item ) return; @@ -139,9 +139,9 @@ void LanguageSelectWidget::itemSelected( QListViewItem * item ) void LanguageSelectWidget::saveProjectConfig() { - QStringList languages; + TQStringList languages; - QListViewItemIterator it( _pluginList ); + TQListViewItemIterator it( _pluginList ); while ( it.current() ) { LangPluginItem * item = static_cast<LangPluginItem*>( it.current() ); diff --git a/src/languageselectwidget.h b/src/languageselectwidget.h index dcd063f0..7eeeb479 100644 --- a/src/languageselectwidget.h +++ b/src/languageselectwidget.h @@ -12,9 +12,9 @@ #ifndef _LANGUAGESELECTWIDGET_H_ #define _LANGUAGESELECTWIDGET_H_ -#include <qdialog.h> -#include <qdom.h> -#include <qstringlist.h> +#include <tqdialog.h> +#include <tqdom.h> +#include <tqstringlist.h> class QListView; @@ -24,7 +24,7 @@ class LanguageSelectWidget : public QWidget public: /* for selection of project parts */ - LanguageSelectWidget( QDomDocument &projectDom, QWidget *parent=0, const char *name=0 ); + LanguageSelectWidget( TQDomDocument &projectDom, TQWidget *parent=0, const char *name=0 ); ~LanguageSelectWidget(); public slots: @@ -34,17 +34,17 @@ signals: void accepted(); private slots: - void itemSelected( QListViewItem * ); + void itemSelected( TQListViewItem * ); private: void init(); void readProjectConfig(); void saveProjectConfig(); - QDomDocument m_projectDom; - QListView * _pluginList; - QLabel * _pluginDescription; - QLabel * _currentLanguage; + TQDomDocument m_projectDom; + TQListView * _pluginList; + TQLabel * _pluginDescription; + TQLabel * _currentLanguage; }; diff --git a/src/main.cpp b/src/main.cpp index 54d64b4c..467724d1 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -9,7 +9,7 @@ #include <kdebug.h> #include <dcopclient.h> -#include <qfileinfo.h> +#include <tqfileinfo.h> #include "splashscreen.h" #include "toplevel.h" @@ -89,10 +89,10 @@ int main(int argc, char *argv[]) KDevIDEExtension::init(); KDevSplashScreen *splash = 0; - QString splashFile = locate("appdata", "pics/kdevelop-splash.png"); + TQString splashFile = locate("appdata", "pics/kdevelop-splash.png"); if (!splashFile.isEmpty()) { - QPixmap pm; + TQPixmap pm; pm.load(splashFile); splash = new KDevSplashScreen( pm ); } @@ -102,8 +102,8 @@ int main(int argc, char *argv[]) if (splash) splash->message( i18n( "Loading Settings" ) ); TopLevel::getInstance()->loadSettings(); - QObject::connect(PluginController::getInstance(), SIGNAL(loadingPlugin(const QString &)), - splash, SLOT(message(const QString &))); + TQObject::connect(PluginController::getInstance(), TQT_SIGNAL(loadingPlugin(const TQString &)), + splash, TQT_SLOT(message(const TQString &))); if (splash) splash->show(); PluginController::getInstance()->loadInitialPlugins(); @@ -125,7 +125,7 @@ int main(int argc, char *argv[]) openProject = true; } else if( args->count() > 0 ){ KURL url = args->url( 0 ); - QString ext = QFileInfo( url.fileName() ).extension(); + TQString ext = TQFileInfo( url.fileName() ).extension(); if( ext == "kdevelop" ){ ProjectManager::getInstance()->loadProject( url ); openProject = true; diff --git a/src/main_assistant.cpp b/src/main_assistant.cpp index 0eb80192..d851447f 100644 --- a/src/main_assistant.cpp +++ b/src/main_assistant.cpp @@ -9,7 +9,7 @@ #include <kdebug.h> #include <dcopclient.h> -#include <qfileinfo.h> +#include <tqfileinfo.h> #include "splashscreen.h" #include "toplevel.h" @@ -83,10 +83,10 @@ int main(int argc, char *argv[]) KDevAssistantExtension::init(); KDevSplashScreen *splash = 0; - QString splashFile = locate("data", "kdevelop/pics/kdevassistant-splash.png"); + TQString splashFile = locate("data", "kdevelop/pics/kdevassistant-splash.png"); if (!splashFile.isEmpty()) { - QPixmap pm; + TQPixmap pm; pm.load(splashFile); splash = new KDevSplashScreen( pm ); } @@ -94,8 +94,8 @@ int main(int argc, char *argv[]) app.processEvents(); - QObject::connect(PluginController::getInstance(), SIGNAL(loadingPlugin(const QString &)), - splash, SLOT(showMessage(const QString &))); + TQObject::connect(PluginController::getInstance(), TQT_SIGNAL(loadingPlugin(const TQString &)), + splash, TQT_SLOT(showMessage(const TQString &))); if (splash) splash->message( i18n( "Loading Settings" ) ); TopLevel::getInstance()->loadSettings(); diff --git a/src/mainwindowshare.cpp b/src/mainwindowshare.cpp index 4dcb17c9..b725db23 100644 --- a/src/mainwindowshare.cpp +++ b/src/mainwindowshare.cpp @@ -15,12 +15,12 @@ * * ***************************************************************************/ -#include <qcheckbox.h> -#include <qvbox.h> -#include <qbuttongroup.h> -#include <qradiobutton.h> -#include <qdir.h> -#include <qregexp.h> +#include <tqcheckbox.h> +#include <tqvbox.h> +#include <tqbuttongroup.h> +#include <tqradiobutton.h> +#include <tqdir.h> +#include <tqregexp.h> #include <kxmlguiclient.h> #include <kaction.h> @@ -67,8 +67,8 @@ using namespace MainWindowUtils; -MainWindowShare::MainWindowShare(QObject* pParent, const char* name) - :QObject(pParent, name) +MainWindowShare::MainWindowShare(TQObject* pParent, const char* name) + :TQObject(pParent, name) ,m_toggleMainToolbar(0L) ,m_toggleBuildToolbar(0L) ,m_toggleViewToolbar(0L) @@ -81,14 +81,14 @@ MainWindowShare::MainWindowShare(QObject* pParent, const char* name) void MainWindowShare::init() { - connect(Core::getInstance(), SIGNAL(contextMenu(QPopupMenu *, const Context *)), - this, SLOT(contextMenu(QPopupMenu *, const Context *))); + connect(Core::getInstance(), TQT_SIGNAL(contextMenu(TQPopupMenu *, const Context *)), + this, TQT_SLOT(contextMenu(TQPopupMenu *, const Context *))); - connect( m_pMainWnd->actionCollection(), SIGNAL( actionStatusText( const QString & ) ), - this, SLOT( slotActionStatusText( const QString & ) ) ); + connect( m_pMainWnd->actionCollection(), TQT_SIGNAL( actionStatusText( const TQString & ) ), + this, TQT_SLOT( slotActionStatusText( const TQString & ) ) ); } -void MainWindowShare::slotActionStatusText( const QString &text ) +void MainWindowShare::slotActionStatusText( const TQString &text ) { // kdDebug(9000) << "MainWindowShare::slotActionStatusText() - " << text << endl; @@ -105,83 +105,83 @@ void MainWindowShare::createActions() { ProjectManager::getInstance()->createActions( m_pMainWnd->actionCollection() ); - KStdAction::quit(this->parent(), SLOT(close()), m_pMainWnd->actionCollection()); + KStdAction::quit(this->parent(), TQT_SLOT(close()), m_pMainWnd->actionCollection()); KAction* action; m_stopProcesses = new KToolBarPopupAction( i18n( "&Stop" ), "stop", - Key_Escape, this, SLOT(slotStopButtonPressed()), + Key_Escape, this, TQT_SLOT(slotStopButtonPressed()), m_pMainWnd->actionCollection(), "stop_processes" ); m_stopProcesses->setToolTip(i18n("Stop")); m_stopProcesses->setWhatsThis(i18n("<b>Stop</b><p>Stops all running processes (like building process, grep command, etc.). When placed onto a toolbar provides a popup menu to choose a process to stop.")); m_stopProcesses->setEnabled( false ); - connect(m_stopProcesses->popupMenu(), SIGNAL(aboutToShow()), - this, SLOT(slotStopMenuAboutToShow())); - connect(m_stopProcesses->popupMenu(), SIGNAL(activated(int)), - this, SLOT(slotStopPopupActivated(int))); + connect(m_stopProcesses->popupMenu(), TQT_SIGNAL(aboutToShow()), + this, TQT_SLOT(slotStopMenuAboutToShow())); + connect(m_stopProcesses->popupMenu(), TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotStopPopupActivated(int))); - connect( Core::getInstance(), SIGNAL(activeProcessChanged(KDevPlugin*, bool)), - this, SLOT(slotActiveProcessChanged(KDevPlugin*, bool)) ); + connect( Core::getInstance(), TQT_SIGNAL(activeProcessChanged(KDevPlugin*, bool)), + this, TQT_SLOT(slotActiveProcessChanged(KDevPlugin*, bool)) ); action = KStdAction::showMenubar( - this, SLOT(slotShowMenuBar()), + this, TQT_SLOT(slotShowMenuBar()), m_pMainWnd->actionCollection(), "settings_show_menubar" ); action->setToolTip(beautifyToolTip(action->text())); - action->setWhatsThis(QString("<b>%1</b><p>%2").arg(beautifyToolTip(action->text())).arg(i18n("Lets you switch the menubar on/off."))); + action->setWhatsThis(TQString("<b>%1</b><p>%2").arg(beautifyToolTip(action->text())).arg(i18n("Lets you switch the menubar on/off."))); action = KStdAction::keyBindings( - this, SLOT(slotKeyBindings()), + this, TQT_SLOT(slotKeyBindings()), m_pMainWnd->actionCollection(), "settings_configure_shortcuts" ); action->setToolTip(beautifyToolTip(action->text())); - action->setWhatsThis(QString("<b>%1</b><p>%2").arg(beautifyToolTip(action->text())).arg(i18n("Lets you configure shortcut keys."))); + action->setWhatsThis(TQString("<b>%1</b><p>%2").arg(beautifyToolTip(action->text())).arg(i18n("Lets you configure shortcut keys."))); action = KStdAction::configureToolbars( - this, SLOT(slotConfigureToolbars()), + this, TQT_SLOT(slotConfigureToolbars()), m_pMainWnd->actionCollection(), "settings_configure_toolbars" ); action->setToolTip(beautifyToolTip(action->text())); - action->setWhatsThis(QString("<b>%1</b><p>%2").arg(beautifyToolTip(action->text())).arg(i18n("Lets you configure toolbars."))); + action->setWhatsThis(TQString("<b>%1</b><p>%2").arg(beautifyToolTip(action->text())).arg(i18n("Lets you configure toolbars."))); action = KStdAction::configureNotifications( - this, SLOT(slotConfigureNotifications()), + this, TQT_SLOT(slotConfigureNotifications()), m_pMainWnd->actionCollection(), "settings_configure_notifications" ); action->setToolTip(beautifyToolTip(action->text())); - action->setWhatsThis(QString("<b>%1</b><p>%2").arg(beautifyToolTip(action->text())).arg(i18n("Lets you configure system notifications."))); + action->setWhatsThis(TQString("<b>%1</b><p>%2").arg(beautifyToolTip(action->text())).arg(i18n("Lets you configure system notifications."))); - action = KStdAction::preferences(this, SLOT(slotSettings()), + action = KStdAction::preferences(this, TQT_SLOT(slotSettings()), m_pMainWnd->actionCollection(), "settings_configure" ); action->setToolTip( i18n( "Configure KDevelop" ) ); - action->setWhatsThis(QString("<b>%1</b><p>%2").arg(i18n( "Configure KDevelop" )).arg(i18n("Lets you customize KDevelop."))); + action->setWhatsThis(TQString("<b>%1</b><p>%2").arg(i18n( "Configure KDevelop" )).arg(i18n("Lets you customize KDevelop."))); - m_toggleStatusbar = KStdAction::showToolbar(this, SLOT(slotToggleStatusbar()),m_pMainWnd->actionCollection(), "settings_statusbar"); + m_toggleStatusbar = KStdAction::showToolbar(this, TQT_SLOT(slotToggleStatusbar()),m_pMainWnd->actionCollection(), "settings_statusbar"); m_toggleStatusbar->setText(i18n("Show &Statusbar")); m_toggleStatusbar->setToolTip( i18n("Show statusbar") ); m_toggleStatusbar->setWhatsThis(i18n("<b>Show statusbar</b><p>Hides or shows the statusbar.")); - action = new KAction( i18n("&Next Window"), ALT+Key_Right, this, SIGNAL(gotoNextWindow()),m_pMainWnd->actionCollection(), "view_next_window"); + action = new KAction( i18n("&Next Window"), ALT+Key_Right, this, TQT_SIGNAL(gotoNextWindow()),m_pMainWnd->actionCollection(), "view_next_window"); action->setToolTip( i18n("Next window") ); action->setWhatsThis(i18n("<b>Next window</b><p>Switches to the next window.")); - action = new KAction( i18n("&Previous Window"), ALT+Key_Left, this, SIGNAL(gotoPreviousWindow()),m_pMainWnd->actionCollection(), "view_previous_window"); + action = new KAction( i18n("&Previous Window"), ALT+Key_Left, this, TQT_SIGNAL(gotoPreviousWindow()),m_pMainWnd->actionCollection(), "view_previous_window"); action->setToolTip( i18n("Previous window") ); action->setWhatsThis(i18n("<b>Previous window</b><p>Switches to the previous window.")); - action = new KAction( i18n("&Last Accessed Window"), ALT+Key_Up, this, SIGNAL(gotoLastWindow()), m_pMainWnd->actionCollection(), "view_last_window"); + action = new KAction( i18n("&Last Accessed Window"), ALT+Key_Up, this, TQT_SIGNAL(gotoLastWindow()), m_pMainWnd->actionCollection(), "view_last_window"); action->setToolTip( i18n("Last accessed window") ); action->setWhatsThis(i18n("<b>Last accessed window</b><p>Switches to the last viewed window (Hold the Alt key pressed and walk on by repeating the Up key).")); - action = new KAction( i18n("&First Accessed Window"), ALT+Key_Down, this, SIGNAL(gotoFirstWindow()), m_pMainWnd->actionCollection(), "view_first_window"); + action = new KAction( i18n("&First Accessed Window"), ALT+Key_Down, this, TQT_SIGNAL(gotoFirstWindow()), m_pMainWnd->actionCollection(), "view_first_window"); action->setToolTip( i18n("First accessed window") ); action->setWhatsThis(i18n("<b>First accessed window</b><p>Switches to the first accessed window (Hold the Alt key pressed and walk on by repeating the Down key).")); - action = new KAction( i18n("Configure Plugins..."), SmallIconSet("configure"), 0, PluginController::getInstance(), SLOT(selectPlugins()), m_pMainWnd->actionCollection(), "settings_configure_plugins" ); + action = new KAction( i18n("Configure Plugins..."), SmallIconSet("configure"), 0, PluginController::getInstance(), TQT_SLOT(selectPlugins()), m_pMainWnd->actionCollection(), "settings_configure_plugins" ); - m_configureEditorAction = new KAction( i18n("Configure &Editor..."), SmallIconSet("configure"), 0, this, SLOT( slotConfigureEditors() ), m_pMainWnd->actionCollection(), "settings_configure_editors"); + m_configureEditorAction = new KAction( i18n("Configure &Editor..."), SmallIconSet("configure"), 0, this, TQT_SLOT( slotConfigureEditors() ), m_pMainWnd->actionCollection(), "settings_configure_editors"); m_configureEditorAction->setToolTip( i18n("Configure editor settings") ); m_configureEditorAction->setWhatsThis(i18n("<b>Configure editor</b><p>Opens editor configuration dialog.")); m_configureEditorAction->setEnabled( false ); KDevPartController * partController = API::getInstance()->partController(); - connect( partController, SIGNAL(activePartChanged(KParts::Part*)), this, SLOT(slotActivePartChanged(KParts::Part* )) ); + connect( partController, TQT_SIGNAL(activePartChanged(KParts::Part*)), this, TQT_SLOT(slotActivePartChanged(KParts::Part* )) ); } void MainWindowShare::slotReportBug() @@ -257,7 +257,7 @@ void MainWindowShare::slotStopPopupActivated( int id ) return; } else { // oops... list has changed in the meantime - QString str = m_stopProcesses->popupMenu()->text( id ); + TQString str = m_stopProcesses->popupMenu()->text( id ); for ( plugin = activeProcesses.first(); plugin; plugin = activeProcesses.next() ) { if ( plugin->info()->genericName() == str ) { Core::getInstance()->doEmitStopButtonPressed( plugin ); @@ -269,7 +269,7 @@ void MainWindowShare::slotStopPopupActivated( int id ) void MainWindowShare::slotStopMenuAboutToShow() { - QPopupMenu* popup = m_stopProcesses->popupMenu(); + TQPopupMenu* popup = m_stopProcesses->popupMenu(); popup->clear(); int i = 0; @@ -317,7 +317,7 @@ void MainWindowShare::slotSettings() config->writeEntry( "Height", dlg.size().height() ); config->writeEntry( "Width", dlg.size().width() ); - if ( dlg.result() != QDialog::Rejected ) + if ( dlg.result() != TQDialog::Rejected ) ShellExtension::getInstance()->acceptGlobalSettingsPage(&dlg); } @@ -367,15 +367,15 @@ void MainWindowShare::slotGUICreated( KParts::Part * part ) if ( KAction * action = part->action("file_save") ) { kdDebug(9000) << " *** found \"file_save\" action - disconnecting" << endl; - disconnect( action, SIGNAL(activated()), 0, 0 ); - connect( action, SIGNAL(activated()), PartController::getInstance(), SLOT(slotSave()) ); + disconnect( action, TQT_SIGNAL(activated()), 0, 0 ); + connect( action, TQT_SIGNAL(activated()), PartController::getInstance(), TQT_SLOT(slotSave()) ); } if ( KAction * action = part->action("file_reload") ) { kdDebug(9000) << " *** found \"file_reload\" action - disconnecting" << endl; - disconnect( action, SIGNAL(activated()), 0, 0 ); - connect( action, SIGNAL(activated()), PartController::getInstance(), SLOT(slotReload()) ); + disconnect( action, TQT_SIGNAL(activated()), 0, 0 ); + connect( action, TQT_SIGNAL(activated()), PartController::getInstance(), TQT_SLOT(slotReload()) ); } } @@ -392,8 +392,8 @@ void MainWindowShare::slotNewToolbarConfig() void MainWindowShare::slotKeyBindings() { KKeyDialog dlg( false, m_pMainWnd ); - QPtrList<KXMLGUIClient> clients = m_pMainWnd->guiFactory()->clients(); - for( QPtrListIterator<KXMLGUIClient> it( clients ); + TQPtrList<KXMLGUIClient> clients = m_pMainWnd->guiFactory()->clients(); + for( TQPtrListIterator<KXMLGUIClient> it( clients ); it.current(); ++it ) { dlg.insert( (*it)->actionCollection() ); } @@ -401,17 +401,17 @@ void MainWindowShare::slotKeyBindings() { // this is needed for when we have multiple embedded kateparts and change one of them. // it also needs to be done to their views, as they too have actioncollections to update - if( const QPtrList<KParts::Part> * partlist = PartController::getInstance()->parts() ) + if( const TQPtrList<KParts::Part> * partlist = PartController::getInstance()->parts() ) { - QPtrListIterator<KParts::Part> it( *partlist ); + TQPtrListIterator<KParts::Part> it( *partlist ); while ( KParts::Part* part = it.current() ) { if ( KTextEditor::Document * doc = dynamic_cast<KTextEditor::Document*>( part ) ) { doc->reloadXML(); - QPtrList<KTextEditor::View> const & list = doc->views(); - QPtrListIterator<KTextEditor::View> itt( list ); + TQPtrList<KTextEditor::View> const & list = doc->views(); + TQPtrListIterator<KTextEditor::View> itt( list ); while( KTextEditor::View * view = itt.current() ) { view->reloadXML(); @@ -429,16 +429,16 @@ void MainWindowShare::slotConfigureToolbars() { m_pMainWnd->saveMainWindowSettings( KGlobal::config(), "Mainwindow" ); KEditToolbar dlg( m_pMainWnd->factory() ); - connect(&dlg, SIGNAL(newToolbarConfig()), this, SLOT(slotNewToolbarConfig())); + connect(&dlg, TQT_SIGNAL(newToolbarConfig()), this, TQT_SLOT(slotNewToolbarConfig())); dlg.exec(); } -void MainWindowShare::contextMenu(QPopupMenu* popup, const Context *) +void MainWindowShare::contextMenu(TQPopupMenu* popup, const Context *) { if ( m_pMainWnd->menuBar()->isVisible() ) return; - int id = popup->insertItem( i18n("Show &Menubar"), m_pMainWnd->menuBar(), SLOT(show()) ); + int id = popup->insertItem( i18n("Show &Menubar"), m_pMainWnd->menuBar(), TQT_SLOT(show()) ); popup->setWhatsThis(id, i18n("<b>Show menubar</b><p>Lets you switch the menubar on/off.")); } diff --git a/src/mainwindowshare.h b/src/mainwindowshare.h index 6fba07a3..72a4b5ea 100644 --- a/src/mainwindowshare.h +++ b/src/mainwindowshare.h @@ -17,7 +17,7 @@ #ifndef __MAINWINDOWSHARE_H__ #define __MAINWINDOWSHARE_H__ -#include <qobject.h> +#include <tqobject.h> class KAction; class KToggleAction; @@ -31,7 +31,7 @@ class MainWindowShare : public QObject { Q_OBJECT public: - MainWindowShare(QObject* pParent = 0L, const char* name = 0L); + MainWindowShare(TQObject* pParent = 0L, const char* name = 0L); ~MainWindowShare() {} void createActions(); @@ -60,7 +60,7 @@ private slots: void slotStopButtonPressed(); void slotNewToolbarConfig(); void slotShowMenuBar(); - void slotActionStatusText( const QString &text ); + void slotActionStatusText( const TQString &text ); void slotToggleMainToolbar(); void slotToggleBuildToolbar(); @@ -68,7 +68,7 @@ private slots: void slotToggleBrowserToolbar(); void slotToggleStatusbar(); - void contextMenu(QPopupMenu *, const Context *); + void contextMenu(TQPopupMenu *, const Context *); private: KToggleAction* m_toggleMainToolbar; @@ -82,7 +82,7 @@ private: KToolBarPopupAction* m_stopProcesses; //!< Stops all running processes KParts::MainWindow* m_pMainWnd; - QPtrList<KDevPlugin> activeProcesses; + TQPtrList<KDevPlugin> activeProcesses; }; #endif // __MAINWINDOWSHARE_H__ diff --git a/src/multibuffer.cpp b/src/multibuffer.cpp index cdbffe85..bd5942fc 100644 --- a/src/multibuffer.cpp +++ b/src/multibuffer.cpp @@ -45,8 +45,8 @@ #include <ktexteditor/document.h> #include <ktexteditor/viewcursorinterface.h> -MultiBuffer::MultiBuffer( QWidget *parent ) - : QSplitter( parent, "MultiBuffer" ), +MultiBuffer::MultiBuffer( TQWidget *parent ) + : TQSplitter( parent, "MultiBuffer" ), m_editorFactory( 0 ), m_delayActivate( false ), m_activated( false ), @@ -57,8 +57,8 @@ MultiBuffer::MultiBuffer( QWidget *parent ) API::getInstance() ->languageSupport() ) { setOrientation( lang->splitOrientation() ); - connect( lang, SIGNAL( splitOrientationChanged( Qt::Orientation ) ), - this, SLOT( setOrientation( Qt::Orientation ) ) ); + connect( lang, TQT_SIGNAL( splitOrientationChanged( Qt::Orientation ) ), + this, TQT_SLOT( setOrientation( Qt::Orientation ) ) ); } else { @@ -150,10 +150,10 @@ void MultiBuffer::registerDelayedActivation( KParts::Part *part, m_delayedActivation[ part ] = qMakePair( line, col ); } -KParts::Part* MultiBuffer::createPart( const QString &mimeType, - const QString &partType, - const QString &className, - const QString &preferredName ) +KParts::Part* MultiBuffer::createPart( const TQString &mimeType, + const TQString &partType, + const TQString &className, + const TQString &preferredName ) { m_editorFactory = PartController::getInstance() ->findPartFactory( mimeType, partType, preferredName ); @@ -174,9 +174,9 @@ KParts::Part* MultiBuffer::createPart( const KURL &url ) KMimeType::Ptr mimeType = KMimeType::findByURL( url ); - QString className; - QString services[] = { "KParts/ReadWritePart", "KParts/ReadOnlyPart" }; - QString classnames[] = { "KParts::ReadWritePart", "KParts::ReadOnlyPart" }; + TQString className; + TQString services[] = { "KParts/ReadWritePart", "KParts/ReadOnlyPart" }; + TQString classnames[] = { "KParts::ReadWritePart", "KParts::ReadOnlyPart" }; for ( uint i = 0; i < 2; ++i ) { m_editorFactory = PartController::getInstance() ->findPartFactory( @@ -201,7 +201,7 @@ void MultiBuffer::show() { if ( !m_delayedActivation.count() || m_activated ) { - QSplitter::show(); + TQSplitter::show(); return ; } @@ -221,8 +221,8 @@ void MultiBuffer::show() // We're managing the view deletion by being its parent, // don't let the part self-destruct - disconnect( view, SIGNAL( destroyed() ), - document, SLOT( slotWidgetDestroyed() ) ); + disconnect( view, TQT_SIGNAL( destroyed() ), + document, TQT_SLOT( slotWidgetDestroyed() ) ); document->insertChildClient( view ); PartController::getInstance() ->integrateTextEditorPart( document ); @@ -246,12 +246,12 @@ void MultiBuffer::show() } m_activated = true; - QSplitter::show(); + TQSplitter::show(); } void MultiBuffer::setOrientation( Qt::Orientation orientation ) { - QSplitter::setOrientation( orientation ); + TQSplitter::setOrientation( orientation ); } void MultiBuffer::activePartChanged( const KURL &url ) @@ -263,12 +263,12 @@ void MultiBuffer::activePartChanged( const KURL &url ) TopLevel::getInstance() ->setCurrentDocumentCaption( url.fileName() ); } -void MultiBuffer::focusInEvent( QFocusEvent *ev ) +void MultiBuffer::focusInEvent( TQFocusEvent *ev ) { KParts::Part *active = activeBuffer(); if (active && active->widget()) active->widget()->setFocus(); - QSplitter::focusInEvent(ev); + TQSplitter::focusInEvent(ev); } bool MultiBuffer::hasPart( KParts::Part *part ) diff --git a/src/multibuffer.h b/src/multibuffer.h index 3d04f256..a481574f 100644 --- a/src/multibuffer.h +++ b/src/multibuffer.h @@ -21,9 +21,9 @@ #ifndef MULTIBUFFER_H #define MULTIBUFFER_H -#include <qpair.h> -#include <qsplitter.h> -#include <qguardedptr.h> +#include <tqpair.h> +#include <tqsplitter.h> +#include <tqguardedptr.h> namespace KParts { @@ -34,14 +34,14 @@ class ReadOnlyPart; class KURL; -typedef QMap< KURL, KParts::Part* > BufferMap; -typedef QMap< KParts::Part*, QPair<int, int> > ActivationMap; +typedef TQMap< KURL, KParts::Part* > BufferMap; +typedef TQMap< KParts::Part*, QPair<int, int> > ActivationMap; class MultiBuffer : public QSplitter { Q_OBJECT public: - MultiBuffer( QWidget * parent = 0 ); + MultiBuffer( TQWidget * parent = 0 ); virtual ~MultiBuffer(); KParts::Part *activeBuffer() const; @@ -51,10 +51,10 @@ public: bool isActivated() const; void setDelayedActivation( bool delayed ); - KParts::Part* createPart( const QString &mimeType, - const QString &partType, - const QString &className, - const QString &preferredName = QString::null ); + KParts::Part* createPart( const TQString &mimeType, + const TQString &partType, + const TQString &className, + const TQString &preferredName = TQString::null ); KParts::Part* openURL( const KURL &url ); bool closeURL( const KURL &url ); @@ -70,18 +70,18 @@ public slots: void activePartChanged( const KURL &url ); protected: - virtual void focusInEvent( QFocusEvent *ev ); + virtual void focusInEvent( TQFocusEvent *ev ); private: KParts::Part* createPart( const KURL &url ); private: BufferMap m_buffers; - QGuardedPtr<KParts::Factory> m_editorFactory; + TQGuardedPtr<KParts::Factory> m_editorFactory; ActivationMap m_delayedActivation; bool m_delayActivate; bool m_activated; - QGuardedPtr<KParts::Part> m_activeBuffer; + TQGuardedPtr<KParts::Part> m_activeBuffer; }; #endif diff --git a/src/newui/button.cpp b/src/newui/button.cpp index a0cdd246..0631510e 100644 --- a/src/newui/button.cpp +++ b/src/newui/button.cpp @@ -19,11 +19,11 @@ ***************************************************************************/ #include "button.h" -#include <qpainter.h> -#include <qtooltip.h> -#include <qstyle.h> -#include <qapplication.h> -#include <qregexp.h> +#include <tqpainter.h> +#include <tqtooltip.h> +#include <tqstyle.h> +#include <tqapplication.h> +#include <tqregexp.h> #include <kdebug.h> #include <kiconloader.h> @@ -39,9 +39,9 @@ namespace Ideal { -Button::Button(ButtonBar *parent, const QString text, const QIconSet &icon, - const QString &description) - :QPushButton(icon, text, parent), m_buttonBar(parent), m_description(description), +Button::Button(ButtonBar *parent, const TQString text, const TQIconSet &icon, + const TQString &description) + :TQPushButton(icon, text, parent), m_buttonBar(parent), m_description(description), m_place(parent->place()), m_realText(text), m_realIconSet(icon) { hide(); @@ -49,22 +49,22 @@ Button::Button(ButtonBar *parent, const QString text, const QIconSet &icon, setToggleButton(true); setFocusPolicy(NoFocus); setDescription(m_description); - setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); + setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum); resize(sizeHint()); fixDimensions(Ideal::Bottom); - QToolTip::add(this, m_realText); + TQToolTip::add(this, m_realText); m_assignAccelAction = new KAction(i18n("Assign Accelerator..."), 0, - this, SLOT(assignAccel()), this); + this, TQT_SLOT(assignAccel()), this); m_clearAccelAction = new KAction(i18n("Clear Accelerator"), 0, - this, SLOT(clearAccel()), this); + this, TQT_SLOT(clearAccel()), this); KConfig *config = kapp->config(); config->setGroup("UI"); - QString accel = config->readEntry(QString("button_%1").arg(text), ""); + TQString accel = config->readEntry(TQString("button_%1").arg(text), ""); if (!accel.isEmpty()) - setRealText(QString("&%1 %2").arg(accel).arg(m_realText)); + setRealText(TQString("&%1 %2").arg(accel).arg(m_realText)); } Button::~Button() @@ -73,37 +73,37 @@ Button::~Button() KConfig *config = kapp->config(); config->setGroup("UI"); - QRegExp r("^&([0-9])\\s.*"); - QRegExp r2("^&[0-9]\\s"); + TQRegExp r("^&([0-9])\\s.*"); + TQRegExp r2("^&[0-9]\\s"); if (r.search(m_realText) > -1) { - QString text = m_realText; + TQString text = m_realText; if (text.contains(r2)) text.remove(r2); - config->writeEntry(QString("button_%1").arg(text), r.cap(1)); + config->writeEntry(TQString("button_%1").arg(text), r.cap(1)); } else { - config->writeEntry(QString("button_%1").arg(m_realText), ""); + config->writeEntry(TQString("button_%1").arg(m_realText), ""); } } -void Button::setDescription(const QString &description) +void Button::setDescription(const TQString &description) { m_description = description; - QToolTip::remove(this); - QToolTip::add(this, m_description); + TQToolTip::remove(this); + TQToolTip::add(this, m_description); } -QString Button::description() const +TQString Button::description() const { return m_description; } -void Button::drawButton(QPainter *p) +void Button::drawButton(TQPainter *p) { - QRect r = rect(); - QSize sh = r.size(); + TQRect r = rect(); + TQSize sh = r.size(); switch (m_place) { case Ideal::Left: @@ -113,29 +113,29 @@ void Button::drawButton(QPainter *p) break; } - QStyle::SFlags flags = QStyle::Style_Default; + TQStyle::SFlags flags = TQStyle::Style_Default; if (isEnabled()) - flags |= QStyle::Style_Enabled; + flags |= TQStyle::Style_Enabled; if (hasFocus()) - flags |= QStyle::Style_HasFocus; + flags |= TQStyle::Style_HasFocus; if (isDown()) - flags |= QStyle::Style_Down; + flags |= TQStyle::Style_Down; if (isOn()) - flags |= QStyle::Style_On; + flags |= TQStyle::Style_On; if (! isFlat() && ! isDown()) - flags |= QStyle::Style_Raised; + flags |= TQStyle::Style_Raised; if (isDefault()) - flags |= QStyle::Style_ButtonDefault; + flags |= TQStyle::Style_ButtonDefault; - QPixmap pm(sh.width(), sh.height()); + TQPixmap pm(sh.width(), sh.height()); pm.fill(eraseColor()); - QPainter p2(&pm); + TQPainter p2(&pm); - style().drawControl(QStyle::CE_PushButton,&p2,this, QRect(0,0,pm.width(),pm.height()), colorGroup(),flags); + style().drawControl(TQStyle::CE_PushButton,&p2,this, TQRect(0,0,pm.width(),pm.height()), colorGroup(),flags); - style().drawControl(QStyle::CE_PushButtonLabel, &p2, this, - QRect(0,0,pm.width(),pm.height()), - colorGroup(), flags, QStyleOption()); + style().drawControl(TQStyle::CE_PushButtonLabel, &p2, this, + TQRect(0,0,pm.width(),pm.height()), + colorGroup(), flags, TQStyleOption()); switch (m_place) { @@ -153,7 +153,7 @@ void Button::drawButton(QPainter *p) } } -void Button::drawButtonLabel(QPainter */*p*/) +void Button::drawButtonLabel(TQPainter */*p*/) { } @@ -194,43 +194,43 @@ void Button::fixDimensions(Place oldPlace) } } -QSize Button::sizeHint() const +TQSize Button::sizeHint() const { return sizeHint(text()); } -QSize Button::sizeHint(const QString &text) const +TQSize Button::sizeHint(const TQString &text) const { constPolish(); int w = 0, h = 0; if ( iconSet() && !iconSet()->isNull() && (m_buttonBar->mode() != Text) ) { - int iw = iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).width() + 4; - int ih = iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).height(); + int iw = iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal ).width() + 4; + int ih = iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal ).height(); w += iw; h = QMAX( h, ih ); } if ( isMenuButton() ) - w += style().pixelMetric(QStyle::PM_MenuButtonIndicator, this); + w += style().pixelMetric(TQStyle::PM_MenuButtonIndicator, this); if ( pixmap() ) { - QPixmap *pm = (QPixmap *)pixmap(); + TQPixmap *pm = (TQPixmap *)pixmap(); w += pm->width(); h += pm->height(); } else if (m_buttonBar->mode() != Icons) { - QString s( text ); + TQString s( text ); bool empty = s.isEmpty(); if ( empty ) - s = QString::fromLatin1("XXXX"); - QFontMetrics fm = fontMetrics(); - QSize sz = fm.size( ShowPrefix, s ); + s = TQString::fromLatin1("XXXX"); + TQFontMetrics fm = fontMetrics(); + TQSize sz = fm.size( ShowPrefix, s ); if(!empty || !w) w += sz.width(); if(!empty || !h) h = QMAX(h, sz.height()); } - return (style().sizeFromContents(QStyle::CT_ToolButton, this, QSize(w, h)). - expandedTo(QApplication::globalStrut())); + return (style().sizeFromContents(TQStyle::CT_ToolButton, this, TQSize(w, h)). + expandedTo(TQApplication::globalStrut())); } void Button::updateSize() @@ -249,7 +249,7 @@ void Button::updateSize() } } -QString Button::realText() const +TQString Button::realText() const { return m_realText; } @@ -285,7 +285,7 @@ void Button::enableIconSet() void Button::disableIconSet() { - setIconSet(QIconSet()); + setIconSet(TQIconSet()); } void Button::disableText() @@ -299,12 +299,12 @@ void Button::enableText() setText(m_realText); } -void Button::contextMenuEvent(QContextMenuEvent *e) +void Button::contextMenuEvent(TQContextMenuEvent *e) { - QPopupMenu menu; + TQPopupMenu menu; m_assignAccelAction->plug(&menu); - if (m_realText.contains(QRegExp("^&[0-9]\\s"))) + if (m_realText.contains(TQRegExp("^&[0-9]\\s"))) m_clearAccelAction->plug(&menu); emit contextMenu( &menu ); @@ -318,13 +318,13 @@ void Button::assignAccel() int num = KInputDialog::getInteger(i18n("Change Button Number"), i18n("New accelerator number:"), 1, 0, 10, 1, &ok, this); if (ok) { - QString text = realTextWithoutAccel(); - text = QString("&%1 %2").arg(num).arg(text); + TQString text = realTextWithoutAccel(); + text = TQString("&%1 %2").arg(num).arg(text); setRealText(text); } } -void Button::setRealText(const QString &text) +void Button::setRealText(const TQString &text) { m_realText = text; setText(text); @@ -336,10 +336,10 @@ void Button::clearAccel() setRealText(realTextWithoutAccel()); } -QString Button::realTextWithoutAccel() const +TQString Button::realTextWithoutAccel() const { - QString text = m_realText; - QRegExp r("^&[0-9]\\s"); + TQString text = m_realText; + TQRegExp r("^&[0-9]\\s"); if (text.contains(r)) text.remove(r); return text; diff --git a/src/newui/button.h b/src/newui/button.h index bc61d9c5..86e7dbed 100644 --- a/src/newui/button.h +++ b/src/newui/button.h @@ -20,8 +20,8 @@ #ifndef IDEALBUTTON_H #define IDEALBUTTON_H -#include <qpushbutton.h> -#include <qiconset.h> +#include <tqpushbutton.h> +#include <tqiconset.h> #include "comdefs.h" @@ -34,50 +34,50 @@ class ButtonBar; /** @short A button to place onto the ButtonBar -A QPushButton derivative with a size of a QToolBar. Button can be rotated +A TQPushButton derivative with a size of a TQToolBar. Button can be rotated (placed onto different places in ideal mode). */ -class Button : public QPushButton { +class Button : public TQPushButton { Q_OBJECT public: - Button(ButtonBar *parent, const QString text, const QIconSet &icon = QIconSet(), - const QString &description = QString::null); + Button(ButtonBar *parent, const TQString text, const TQIconSet &icon = TQIconSet(), + const TQString &description = TQString::null); /**Sets the description used as a tooltip.*/ - void setDescription(const QString &description); + void setDescription(const TQString &description); /**Returns the description.*/ - QString description() const; + TQString description() const; /**Sets the place of a button.*/ void setPlace(Ideal::Place place); /**Sets the mode of a button.*/ void setMode(Ideal::ButtonMode mode); - QSize sizeHint() const; - QSize sizeHint(const QString &text) const; + TQSize sizeHint() const; + TQSize sizeHint(const TQString &text) const; /**Updates size of a widget. Used after squeezing button's text.*/ void updateSize(); /**Returns the real (i.e. not squeezed) text of a button.*/ - QString realText() const; - QString realTextWithoutAccel() const; - void setRealText(const QString &text); + TQString realText() const; + TQString realTextWithoutAccel() const; + void setRealText(const TQString &text); protected: ButtonMode mode(); - virtual void drawButton(QPainter *p); - virtual void drawButtonLabel(QPainter *p); + virtual void drawButton(TQPainter *p); + virtual void drawButtonLabel(TQPainter *p); - virtual void contextMenuEvent(QContextMenuEvent *e); + virtual void contextMenuEvent(TQContextMenuEvent *e); protected slots: void assignAccel(); void clearAccel(); signals: - void contextMenu(QPopupMenu*); + void contextMenu(TQPopupMenu*); private: virtual ~Button(); @@ -91,11 +91,11 @@ private: ButtonBar *m_buttonBar; - QString m_description; + TQString m_description; Place m_place; - QString m_realText; - QIconSet m_realIconSet; + TQString m_realText; + TQIconSet m_realIconSet; KAction *m_assignAccelAction; KAction *m_clearAccelAction; diff --git a/src/newui/buttonbar.cpp b/src/newui/buttonbar.cpp index 52a20bf5..b2a3b47c 100644 --- a/src/newui/buttonbar.cpp +++ b/src/newui/buttonbar.cpp @@ -19,7 +19,7 @@ ***************************************************************************/ #include "buttonbar.h" -#include <qlayout.h> +#include <tqlayout.h> #include <kdebug.h> #include <kconfig.h> @@ -33,13 +33,13 @@ namespace Ideal { //ButtonLayout class ButtonLayout::ButtonLayout(ButtonBar *parent, Direction d, int margin, int spacing, const char *name) - :QBoxLayout(parent, d, margin, spacing, name), m_buttonBar(parent) + :TQBoxLayout(parent, d, margin, spacing, name), m_buttonBar(parent) { } -QSize ButtonLayout::minimumSize() const +TQSize ButtonLayout::minimumSize() const { - QSize size = QBoxLayout::minimumSize(); + TQSize size = TQBoxLayout::minimumSize(); if (!m_buttonBar->autoResize()) return size; @@ -48,13 +48,13 @@ QSize ButtonLayout::minimumSize() const { case Ideal::Left: case Ideal::Right: - return QSize(size.width(),0); + return TQSize(size.width(),0); break; case Ideal::Top: case Ideal::Bottom: - return QSize(0,size.height()); + return TQSize(0,size.height()); } - return QBoxLayout::minimumSize(); + return TQBoxLayout::minimumSize(); } @@ -62,22 +62,22 @@ QSize ButtonLayout::minimumSize() const //ButtonBar class -ButtonBar::ButtonBar(Place place, ButtonMode mode, QWidget *parent, const char *name) - :QWidget(parent, name), m_place(place), l(0), m_shrinked(false), m_autoResize(true) +ButtonBar::ButtonBar(Place place, ButtonMode mode, TQWidget *parent, const char *name) + :TQWidget(parent, name), m_place(place), l(0), m_shrinked(false), m_autoResize(true) { switch (m_place) { case Ideal::Left: case Ideal::Right: - l = new ButtonLayout(this, QBoxLayout::TopToBottom, 0, 0); + l = new ButtonLayout(this, TQBoxLayout::TopToBottom, 0, 0); break; case Ideal::Top: case Ideal::Bottom: - l = new ButtonLayout(this, QBoxLayout::LeftToRight, 0, 0); + l = new ButtonLayout(this, TQBoxLayout::LeftToRight, 0, 0); break; } - l->setResizeMode(QLayout::Minimum); + l->setResizeMode(TQLayout::Minimum); setMode(mode); l->insertStretch(-1); @@ -147,7 +147,7 @@ void ButtonBar::setButtonsPlace(Ideal::Place place) (*it)->setPlace(place); } -void ButtonBar::resizeEvent(QResizeEvent *ev) +void ButtonBar::resizeEvent(TQResizeEvent *ev) { int preferredDimension = 0; int actualDimension = 0; @@ -156,13 +156,13 @@ void ButtonBar::resizeEvent(QResizeEvent *ev) { case Ideal::Left: case Ideal::Right: - preferredDimension = l->QBoxLayout::minimumSize().height(); + preferredDimension = l->TQBoxLayout::minimumSize().height(); actualDimension = size().height(); oldDimension = ev->oldSize().height(); break; case Ideal::Top: case Ideal::Bottom: - preferredDimension = l->QBoxLayout::minimumSize().width(); + preferredDimension = l->TQBoxLayout::minimumSize().width(); actualDimension = size().width(); oldDimension = ev->oldSize().width(); break; @@ -175,7 +175,7 @@ void ButtonBar::resizeEvent(QResizeEvent *ev) else if (m_shrinked && actualDimension > oldDimension) deshrink(preferredDimension, actualDimension); - QWidget::resizeEvent(ev); + TQWidget::resizeEvent(ev); } void ButtonBar::shrink(int preferredDimension, int actualDimension) @@ -186,7 +186,7 @@ void ButtonBar::shrink(int preferredDimension, int actualDimension) m_shrinked = true; uint textLength = 0; - QValueList<uint> texts; + TQValueList<uint> texts; uint maxLength = 0; for (ButtonList::const_iterator it = m_buttons.constBegin(); it != m_buttons.constEnd(); ++it) { @@ -203,7 +203,7 @@ void ButtonBar::shrink(int preferredDimension, int actualDimension) do { newMaxLength -= 1; newTextLength = 0; - for (QValueList<uint>::iterator it = texts.begin(); it != texts.end(); ++it) + for (TQValueList<uint>::iterator it = texts.begin(); it != texts.end(); ++it) { if (*it > newMaxLength) *it = newMaxLength; @@ -227,7 +227,7 @@ void ButtonBar::deshrink(int preferredDimension, int actualDimension) m_shrinked = true; uint textLength = 0; - QValueList<uint> texts; + TQValueList<uint> texts; uint maxLength = 0; for (ButtonList::const_iterator it = m_buttons.constBegin(); it != m_buttons.constEnd(); ++it) { @@ -247,7 +247,7 @@ void ButtonBar::deshrink(int preferredDimension, int actualDimension) do { newTextLength = 0; int i = 0; - for (QValueList<uint>::iterator it = texts.begin(); it != texts.end(); ++it, i++) + for (TQValueList<uint>::iterator it = texts.begin(); it != texts.end(); ++it, i++) { if (m_buttons[i]->text().contains("...")) (*it)++; diff --git a/src/newui/buttonbar.h b/src/newui/buttonbar.h index f137c925..ad1cf5b6 100644 --- a/src/newui/buttonbar.h +++ b/src/newui/buttonbar.h @@ -20,12 +20,12 @@ #ifndef IDEALBUTTONBAR_H #define IDEALBUTTONBAR_H -#include <qwidget.h> -#include <qvaluelist.h> +#include <tqwidget.h> +#include <tqvaluelist.h> #include "comdefs.h" -#include <qlayout.h> +#include <tqlayout.h> namespace Ideal { @@ -39,7 +39,7 @@ class ButtonLayout: public QBoxLayout{ public: ButtonLayout(ButtonBar *parent, Direction d, int margin = 0, int spacing = -1, const char * name = 0); - virtual QSize minimumSize() const; + virtual TQSize minimumSize() const; private: ButtonBar *m_buttonBar; @@ -51,11 +51,11 @@ private: Looks like a toolbar but has another behaviour. It is suitable for placing on the left(right, bottom, top) corners of a window as a bar with slider. */ -class ButtonBar : public QWidget { +class ButtonBar : public TQWidget { Q_OBJECT public: ButtonBar(Place place, ButtonMode mode = IconsAndText, - QWidget *parent = 0, const char *name = 0); + TQWidget *parent = 0, const char *name = 0); virtual ~ButtonBar(); /**Adds a button to the bar.*/ @@ -87,7 +87,7 @@ public: Button *prevTo(Button *button); protected: - virtual void resizeEvent ( QResizeEvent *ev ); + virtual void resizeEvent ( TQResizeEvent *ev ); int originalDimension(); @@ -95,7 +95,7 @@ private: void fixDimensions(); void setButtonsPlace(Ideal::Place place); - typedef QValueList<Button*> ButtonList; + typedef TQValueList<Button*> ButtonList; ButtonList m_buttons; ButtonMode m_mode; diff --git a/src/newui/ddockwindow.cpp b/src/newui/ddockwindow.cpp index 1676d48e..5f11425d 100644 --- a/src/newui/ddockwindow.cpp +++ b/src/newui/ddockwindow.cpp @@ -19,13 +19,13 @@ ***************************************************************************/ #include "ddockwindow.h" -#include <qtoolbutton.h> -#include <qlayout.h> -#include <qstyle.h> -#include <qwidgetstack.h> -#include <qimage.h> -#include <qapplication.h> -#include <qpopupmenu.h> +#include <tqtoolbutton.h> +#include <tqlayout.h> +#include <tqstyle.h> +#include <tqwidgetstack.h> +#include <tqimage.h> +#include <tqapplication.h> +#include <tqpopupmenu.h> #include <kdebug.h> #include <kglobal.h> @@ -40,7 +40,7 @@ #include "dmainwindow.h" DDockWindow::DDockWindow(DMainWindow *parent, Position position) - :QDockWindow(QDockWindow::InDock, parent), m_position(position), m_visible(false), + :TQDockWindow(TQDockWindow::InDock, parent), m_position(position), m_visible(false), m_mainWindow(parent), m_doNotCloseActiveWidget(false), m_toggledButton(0), m_lastContextMenuButton(0) { setMovingEnabled(false); @@ -51,20 +51,20 @@ DDockWindow::DDockWindow(DMainWindow *parent, Position position) case DDockWindow::Bottom: m_name = "BottomToolWindow"; place = Ideal::Bottom; - m_internalLayout = new QVBoxLayout(boxLayout(), 0); - m_internalLayout->setDirection(QBoxLayout::BottomToTop); + m_internalLayout = new TQVBoxLayout(boxLayout(), 0); + m_internalLayout->setDirection(TQBoxLayout::BottomToTop); break; case DDockWindow::Left: m_name = "LeftToolWindow"; place = Ideal::Left; - m_internalLayout = new QHBoxLayout(boxLayout(), 0); - m_internalLayout->setDirection(QBoxLayout::LeftToRight); + m_internalLayout = new TQHBoxLayout(boxLayout(), 0); + m_internalLayout->setDirection(TQBoxLayout::LeftToRight); break; case DDockWindow::Right: m_name = "RightToolWindow"; place = Ideal::Right; - m_internalLayout = new QHBoxLayout(boxLayout(), 0); - m_internalLayout->setDirection(QBoxLayout::RightToLeft); + m_internalLayout = new TQHBoxLayout(boxLayout(), 0); + m_internalLayout->setDirection(TQBoxLayout::RightToLeft); break; } @@ -82,12 +82,12 @@ DDockWindow::DDockWindow(DMainWindow *parent, Position position) m_bar = new Ideal::ButtonBar(place, buttonMode, this); m_internalLayout->addWidget(m_bar); - m_widgetStack = new QWidgetStack(this); + m_widgetStack = new TQWidgetStack(this); m_internalLayout->addWidget(m_widgetStack); - m_moveToDockLeft = new KAction( i18n("Move to left dock"), 0, this, SLOT(moveToDockLeft()), this ); - m_moveToDockRight = new KAction( i18n("Move to right dock"), 0, this, SLOT(moveToDockRight()), this ); - m_moveToDockBottom = new KAction( i18n("Move to bottom dock"), 0, this, SLOT(moveToDockBottom()), this ); + m_moveToDockLeft = new KAction( i18n("Move to left dock"), 0, this, TQT_SLOT(moveToDockLeft()), this ); + m_moveToDockRight = new KAction( i18n("Move to right dock"), 0, this, TQT_SLOT(moveToDockRight()), this ); + m_moveToDockBottom = new KAction( i18n("Move to bottom dock"), 0, this, TQT_SLOT(moveToDockBottom()), this ); setVisible(m_visible); @@ -104,7 +104,7 @@ void DDockWindow::setVisible(bool v) { //write dock width to the config file KConfig *config = kapp->config(); - QString group = QString("%1").arg(m_name); + TQString group = TQString("%1").arg(m_name); config->setGroup(group); if (m_visible) @@ -148,7 +148,7 @@ void DDockWindow::loadSettings() void DDockWindow::saveSettings() { KConfig *config = kapp->config(); - QString group = QString("%1").arg(m_name); + TQString group = TQString("%1").arg(m_name); int invisibleWidth = 0; config->setGroup(group); if (config->hasKey("ViewWidth")) @@ -164,22 +164,22 @@ void DDockWindow::saveSettings() config->writeEntry("ViewWidth", invisibleWidth); } -QWidget *DDockWindow::currentWidget() const +TQWidget *DDockWindow::currentWidget() const { return m_widgetStack->visibleWidget(); } -void DDockWindow::addWidget(const QString &title, QWidget *widget, bool skipActivation) +void DDockWindow::addWidget(const TQString &title, TQWidget *widget, bool skipActivation) { kdDebug(9000) << k_funcinfo << endl; - QPixmap *pm = const_cast<QPixmap*>(widget->icon()); + TQPixmap *pm = const_cast<TQPixmap*>(widget->icon()); Ideal::Button *button; if (pm != 0) { //force 16pt for now if (pm->height() > 16) { - QImage img = pm->convertToImage(); + TQImage img = pm->convertToImage(); img = img.smoothScale(16, 16); pm->convertFromImage(img); } @@ -192,15 +192,15 @@ void DDockWindow::addWidget(const QString &title, QWidget *widget, bool skipActi m_bar->addButton(button); m_widgetStack->addWidget(widget); - connect(button, SIGNAL(clicked()), this, SLOT(selectWidget())); - connect(button, SIGNAL(contextMenu(QPopupMenu*)), this, SLOT(contextMenu(QPopupMenu*)) ); + connect(button, TQT_SIGNAL(clicked()), this, TQT_SLOT(selectWidget())); + connect(button, TQT_SIGNAL(contextMenu(TQPopupMenu*)), this, TQT_SLOT(contextMenu(TQPopupMenu*)) ); if (!skipActivation) { //if the widget was selected last time the dock is deleted //we need to show it KConfig *config = kapp->config(); - QString group = QString("%1").arg(m_name); + TQString group = TQString("%1").arg(m_name); config->setGroup(group); if (config->readEntry("ViewLastWidget") == title) { @@ -211,7 +211,7 @@ void DDockWindow::addWidget(const QString &title, QWidget *widget, bool skipActi } } -void DDockWindow::raiseWidget(QWidget *widget) +void DDockWindow::raiseWidget(TQWidget *widget) { kdDebug(9000) << k_funcinfo << endl; @@ -225,7 +225,7 @@ void DDockWindow::raiseWidget(QWidget *widget) } } -void DDockWindow::lowerWidget(QWidget * widget) +void DDockWindow::lowerWidget(TQWidget * widget) { kdDebug(9000) << k_funcinfo << endl; @@ -239,7 +239,7 @@ void DDockWindow::lowerWidget(QWidget * widget) } } -void DDockWindow::removeWidget(QWidget *widget) +void DDockWindow::removeWidget(TQWidget *widget) { kdDebug(9000) << k_funcinfo << endl; if (m_widgetStack->id(widget) == -1) @@ -297,7 +297,7 @@ void DDockWindow::selectWidget() selectWidget((Ideal::Button*)sender()); } -void DDockWindow::hideWidget(QWidget *widget) +void DDockWindow::hideWidget(TQWidget *widget) { Ideal::Button *button = m_buttons[widget]; if (button != 0) @@ -310,7 +310,7 @@ void DDockWindow::hideWidget(QWidget *widget) setVisible(false); } -void DDockWindow::showWidget(QWidget *widget) +void DDockWindow::showWidget(TQWidget *widget) { Ideal::Button *button = m_buttons[widget]; if (button != 0) @@ -322,7 +322,7 @@ void DDockWindow::setMovingEnabled(bool) { //some operations on KMainWindow cause moving to be enabled //but we always don't want DDockWindow instances to be movable - QDockWindow::setMovingEnabled(false); + TQDockWindow::setMovingEnabled(false); } void DDockWindow::selectLastWidget() @@ -338,16 +338,16 @@ bool DDockWindow::isActive() { if (m_toggledButton) { - QWidget *w = qApp->focusWidget(); + TQWidget *w = qApp->focusWidget(); if (!w) return false; - QWidget *toolWidget = m_widgets[m_toggledButton]; + TQWidget *toolWidget = m_widgets[m_toggledButton]; if (toolWidget == w) return true; else { do { - w = (QWidget*)w->parent(); + w = (TQWidget*)w->parent(); if (w && (w == toolWidget)) return true; } while (w); } @@ -373,9 +373,9 @@ void DDockWindow::selectPrevWidget() b->animateClick(); } -void DDockWindow::contextMenu(QPopupMenu * menu) +void DDockWindow::contextMenu(TQPopupMenu * menu) { - m_lastContextMenuButton = static_cast<Ideal::Button*>( const_cast<QObject*>( sender() ) ); + m_lastContextMenuButton = static_cast<Ideal::Button*>( const_cast<TQObject*>( sender() ) ); menu->insertSeparator(); diff --git a/src/newui/ddockwindow.h b/src/newui/ddockwindow.h index 06cf3eb1..f9abc93f 100644 --- a/src/newui/ddockwindow.h +++ b/src/newui/ddockwindow.h @@ -20,8 +20,8 @@ #ifndef DDOCKWINDOW_H #define DDOCKWINDOW_H -#include <qdockwindow.h> -#include <qvaluelist.h> +#include <tqdockwindow.h> +#include <tqvaluelist.h> class QBoxLayout; class QToolButton; @@ -38,7 +38,7 @@ namespace Ideal { class ButtonBar; } -class DDockWindow : public QDockWindow { +class DDockWindow : public TQDockWindow { Q_OBJECT public: enum Position { Bottom, Left, Right }; @@ -50,16 +50,16 @@ public: bool visible() const { return m_visible; } Position position() const { return m_position; } - virtual void addWidget(const QString &title, QWidget *widget, bool skipActivation = false); - virtual void raiseWidget(QWidget *widget); - virtual void lowerWidget(QWidget *widget); + virtual void addWidget(const TQString &title, TQWidget *widget, bool skipActivation = false); + virtual void raiseWidget(TQWidget *widget); + virtual void lowerWidget(TQWidget *widget); /**Removes the widget from dock. Does not delete it.*/ - virtual void removeWidget(QWidget *widget); + virtual void removeWidget(TQWidget *widget); - virtual void hideWidget(QWidget *widget); - virtual void showWidget(QWidget *widget); + virtual void hideWidget(TQWidget *widget); + virtual void showWidget(TQWidget *widget); - virtual QWidget *currentWidget() const; + virtual TQWidget *currentWidget() const; virtual void setMovingEnabled(bool b); @@ -79,7 +79,7 @@ signals: private slots: void selectWidget(); void selectWidget(Ideal::Button *button); - void contextMenu(QPopupMenu*); + void contextMenu(TQPopupMenu*); void moveToDockLeft(); void moveToDockRight(); void moveToDockBottom(); @@ -89,21 +89,21 @@ protected: virtual void loadSettings(); Ideal::ButtonBar *m_bar; - QWidgetStack *m_widgetStack; + TQWidgetStack *m_widgetStack; - QMap<Ideal::Button*, QWidget*> m_widgets; - QMap<QWidget*, Ideal::Button*> m_buttons; + TQMap<Ideal::Button*, TQWidget*> m_widgets; + TQMap<TQWidget*, Ideal::Button*> m_buttons; private: Position m_position; bool m_visible; - QString m_name; + TQString m_name; DMainWindow *m_mainWindow; bool m_doNotCloseActiveWidget; Ideal::Button *m_toggledButton; Ideal::Button *m_lastContextMenuButton; - QBoxLayout *m_internalLayout; + TQBoxLayout *m_internalLayout; KAction * m_moveToDockLeft; diff --git a/src/newui/dmainwindow.cpp b/src/newui/dmainwindow.cpp index 9d3801e3..6e6a63d4 100644 --- a/src/newui/dmainwindow.cpp +++ b/src/newui/dmainwindow.cpp @@ -24,12 +24,12 @@ #include <kconfig.h> #include <kiconloader.h> -#include <qtoolbutton.h> +#include <tqtoolbutton.h> #include "dtabwidget.h" #include "docksplitter.h" -DMainWindow::DMainWindow(QWidget *parent, const char *name) +DMainWindow::DMainWindow(TQWidget *parent, const char *name) :KParts::MainWindow(parent, name), m_firstRemoved(false), m_currentWidget(0) { loadSettings(); @@ -57,7 +57,7 @@ void DMainWindow::saveSettings() DMainWindow::~DMainWindow() { -/* for (QValueList<QWidget*>::iterator it = m_widgets.begin(); it != m_widgets.end(); ++it) +/* for (TQValueList<TQWidget*>::iterator it = m_widgets.begin(); it != m_widgets.end(); ++it) removeWidget(*it);*/ } @@ -81,7 +81,7 @@ void DMainWindow::createToolWindows() moveDockWindow(m_rightDock, Qt::DockRight); } -void DMainWindow::addWidget(QWidget *widget, const QString &title) +void DMainWindow::addWidget(TQWidget *widget, const TQString &title) { // invalidateActiveTabWidget(); if (m_firstRemoved && m_activeTabWidget == m_tabs.first()) @@ -93,17 +93,17 @@ void DMainWindow::addWidget(QWidget *widget, const QString &title) addWidget(m_activeTabWidget, widget, title); } -void DMainWindow::addWidget(DTabWidget *tab, QWidget *widget, const QString &title) +void DMainWindow::addWidget(DTabWidget *tab, TQWidget *widget, const TQString &title) { - static QPixmap emptyPixmap; + static TQPixmap emptyPixmap; int idx = -1; if (m_openTabAfterCurrent && (tab->count() > 0)) idx = tab->currentPageIndex() + 1; if (m_showIconsOnTabs) { - const QPixmap *pixmap = widget->icon(); - const QIconSet &icons = (pixmap && (pixmap->size().height() <= 16)) ? *(pixmap) : SmallIcon("kdevelop"); + const TQPixmap *pixmap = widget->icon(); + const TQIconSet &icons = (pixmap && (pixmap->size().height() <= 16)) ? *(pixmap) : SmallIcon("kdevelop"); tab->insertTab(widget, icons, title, idx); } else @@ -114,7 +114,7 @@ void DMainWindow::addWidget(DTabWidget *tab, QWidget *widget, const QString &tit tab->showPage(widget); } -void DMainWindow::removeWidget(QWidget *widget) +void DMainWindow::removeWidget(TQWidget *widget) { if (!m_widgets.contains(widget)) return; //not a widget in main window @@ -125,7 +125,7 @@ void DMainWindow::removeWidget(QWidget *widget) if (tab->indexOf(widget) >= 0) { tab->removePage(widget); - widget->reparent(0,QPoint(0,0),false); + widget->reparent(0,TQPoint(0,0),false); if (tab->count() == 0) { if (tab->closeButton()) @@ -161,8 +161,8 @@ void DMainWindow::removeWidget(QWidget *widget) if (m_activeTabWidget && m_activeTabWidget->currentPage()) { //a hack to please multibuffer and actually switch the active part - QFocusEvent ev(QEvent::FocusIn); - QApplication::sendEvent(m_activeTabWidget->currentPage(), &ev); + TQFocusEvent ev(TQEvent::FocusIn); + TQApplication::sendEvent(m_activeTabWidget->currentPage(), &ev); } } @@ -184,7 +184,7 @@ DTabWidget *DMainWindow::splitVertical() void DMainWindow::invalidateActiveTabWidget() { -/* QWidget *focused = m_central->focusWidget(); +/* TQWidget *focused = m_central->focusWidget(); kdDebug(9000) << "invalidate: " << focused << endl; if (focused == 0) return; @@ -208,33 +208,33 @@ DTabWidget *DMainWindow::createTab() DTabWidget *tab = new DTabWidget(m_central); m_tabs.append(tab); if (tab->closeButton()) - connect(tab->closeButton(), SIGNAL(clicked()), this, SLOT(closeTab())); - connect(tab, SIGNAL(closeRequest(QWidget*)), this, SLOT(closeTab(QWidget*))); - connect(tab, SIGNAL(contextMenu(QWidget*,const QPoint &)), - this, SLOT(tabContext(QWidget*,const QPoint &))); + connect(tab->closeButton(), TQT_SIGNAL(clicked()), this, TQT_SLOT(closeTab())); + connect(tab, TQT_SIGNAL(closeRequest(TQWidget*)), this, TQT_SLOT(closeTab(TQWidget*))); + connect(tab, TQT_SIGNAL(contextMenu(TQWidget*,const TQPoint &)), + this, TQT_SLOT(tabContext(TQWidget*,const TQPoint &))); return tab; } -bool DMainWindow::eventFilter(QObject *obj, QEvent *ev) +bool DMainWindow::eventFilter(TQObject *obj, TQEvent *ev) { - QWidget *w = (QWidget*)obj; + TQWidget *w = (TQWidget*)obj; if (!m_widgets.contains(w)) return KParts::MainWindow::eventFilter(obj, ev); - if ((m_currentWidget != w) && (ev->type() == QEvent::FocusIn)) + if ((m_currentWidget != w) && (ev->type() == TQEvent::FocusIn)) { m_currentWidget = w; emit widgetChanged(w); } - else if (ev->type() == QEvent::IconChange) + else if (ev->type() == TQEvent::IconChange) { if (m_widgetTabs.contains(w)) { DTabWidget *tab = m_widgetTabs[w]; - tab->setTabIconSet(w, w->icon() ? (*(w->icon())) : QPixmap()); + tab->setTabIconSet(w, w->icon() ? (*(w->icon())) : TQPixmap()); } } - else if (ev->type() == QEvent::CaptionChange) + else if (ev->type() == TQEvent::CaptionChange) { kdDebug(9000) << "caption change" << endl; DTabWidget *tab = m_widgetTabs[w]; @@ -249,17 +249,17 @@ void DMainWindow::closeTab() //nothing to do here, should be reimplemented } -void DMainWindow::tabContext(QWidget *, const QPoint &) +void DMainWindow::tabContext(TQWidget *, const TQPoint &) { //nothing to do here, should be reimplemented } -void DMainWindow::closeTab(QWidget *) +void DMainWindow::closeTab(TQWidget *) { //nothing to do here, should be reimplemented } -void DMainWindow::moveWidget(DDockWindow::Position position, QWidget * view, const QString & title) +void DMainWindow::moveWidget(DDockWindow::Position position, TQWidget * view, const TQString & title) { if (m_docks.contains(view)) { @@ -270,32 +270,32 @@ void DMainWindow::moveWidget(DDockWindow::Position position, QWidget * view, con } } -void DMainWindow::addDockWidget(DDockWindow::Position position, QWidget *view, const QString &title) +void DMainWindow::addDockWidget(DDockWindow::Position position, TQWidget *view, const TQString &title) { toolWindow(position)->addWidget(title, view); m_docks[view] = position; - connect(view, SIGNAL(destroyed()), this, SLOT(widgetDestroyed())); + connect(view, TQT_SIGNAL(destroyed()), this, TQT_SLOT(widgetDestroyed())); } -void DMainWindow::removeDockWidget(QWidget *view) +void DMainWindow::removeDockWidget(TQWidget *view) { toolWindow(m_docks[view])->removeWidget(view); m_docks.remove(view); } -bool DMainWindow::hasDockWidget(QWidget *view) +bool DMainWindow::hasDockWidget(TQWidget *view) { return m_docks.contains(view); } -DDockWindow::Position DMainWindow::dockWidgetPosition(QWidget *view) +DDockWindow::Position DMainWindow::dockWidgetPosition(TQWidget *view) { return m_docks[view]; } void DMainWindow::widgetDestroyed() { - QWidget *w = static_cast<QWidget*>(const_cast<QObject*>(sender())); + TQWidget *w = static_cast<TQWidget*>(const_cast<TQObject*>(sender())); if (m_docks.contains(w)) { diff --git a/src/newui/dmainwindow.h b/src/newui/dmainwindow.h index 7a036665..ae757678 100644 --- a/src/newui/dmainwindow.h +++ b/src/newui/dmainwindow.h @@ -34,7 +34,7 @@ namespace Ideal { class DMainWindow: public KParts::MainWindow { Q_OBJECT public: - DMainWindow(QWidget *parent = 0, const char *name = 0); + DMainWindow(TQWidget *parent = 0, const char *name = 0); virtual ~DMainWindow(); /**@return The tool window in given @p position.*/ @@ -42,22 +42,22 @@ public: /**Adds a tabbed widget into the active (focused) tab widget. If @p widget is null then only tab is created.*/ - virtual void addWidget(QWidget *widget, const QString &title); - virtual void addWidget(DTabWidget *tab, QWidget *widget, const QString &title); + virtual void addWidget(TQWidget *widget, const TQString &title); + virtual void addWidget(DTabWidget *tab, TQWidget *widget, const TQString &title); /**Removes widget. Does not delete it.*/ - virtual void removeWidget(QWidget *widget); + virtual void removeWidget(TQWidget *widget); /**Moves a widget from an existing dockposition to a new position**/ - virtual void moveWidget(DDockWindow::Position newPosition, QWidget *widget, const QString & title); + virtual void moveWidget(DDockWindow::Position newPosition, TQWidget *widget, const TQString & title); /**Adds a dock widget into given position.*/ - virtual void addDockWidget(DDockWindow::Position position, QWidget *view, const QString &title); + virtual void addDockWidget(DDockWindow::Position position, TQWidget *view, const TQString &title); /**Removes a dock widget.*/ - virtual void removeDockWidget(QWidget *view); + virtual void removeDockWidget(TQWidget *view); virtual void saveSettings(); - bool hasDockWidget(QWidget *view); - DDockWindow::Position dockWidgetPosition(QWidget *view); + bool hasDockWidget(TQWidget *view); + DDockWindow::Position dockWidgetPosition(TQWidget *view); public slots: DTabWidget *splitHorizontal(); @@ -69,17 +69,17 @@ protected slots: virtual void closeTab(); /**This does nothing. Reimplement in subclass to close the tab when hover close button is pressed.*/ - virtual void closeTab(QWidget*); + virtual void closeTab(TQWidget*); /**This does nothing. Reimplement in subclass to show tab context menu.*/ - virtual void tabContext(QWidget*,const QPoint &); + virtual void tabContext(TQWidget*,const TQPoint &); void widgetDestroyed(); signals: - void widgetChanged(QWidget *); + void widgetChanged(TQWidget *); protected: - bool eventFilter(QObject *obj, QEvent *ev); + bool eventFilter(TQObject *obj, TQEvent *ev); virtual void loadSettings(); @@ -90,20 +90,20 @@ protected: DDockWindow *m_rightDock; DDockWindow *m_bottomDock; - QMap<QWidget*, DDockWindow::Position> m_docks; + TQMap<TQWidget*, DDockWindow::Position> m_docks; Ideal::DockSplitter *m_central; DTabWidget *m_activeTabWidget; - QValueList<DTabWidget*> m_tabs; + TQValueList<DTabWidget*> m_tabs; bool m_openTabAfterCurrent; bool m_showIconsOnTabs; bool m_firstRemoved; - QValueList<QWidget*> m_widgets; - QMap<QWidget*, DTabWidget*> m_widgetTabs; - QWidget *m_currentWidget; + TQValueList<TQWidget*> m_widgets; + TQMap<TQWidget*, DTabWidget*> m_widgetTabs; + TQWidget *m_currentWidget; private slots: void invalidateActiveTabWidget(); diff --git a/src/newui/docksplitter.cpp b/src/newui/docksplitter.cpp index eae4a3e3..0dc55453 100644 --- a/src/newui/docksplitter.cpp +++ b/src/newui/docksplitter.cpp @@ -23,8 +23,8 @@ namespace Ideal { -DockSplitter::DockSplitter(Orientation orientation, QWidget *parent, const char *name) - :QSplitter(parent, name), m_orientation(orientation) +DockSplitter::DockSplitter(Orientation orientation, TQWidget *parent, const char *name) + :TQSplitter(parent, name), m_orientation(orientation) { switch (m_orientation) { @@ -43,11 +43,11 @@ DockSplitter::~DockSplitter() { } -void DockSplitter::addDock(uint row, uint col, QWidget *dock) +void DockSplitter::addDock(uint row, uint col, TQWidget *dock) { if (m_docks.count() <= row) for (uint i = m_docks.count(); i <= row ; ++i) - m_docks.append(QValueList<QWidget*>()); + m_docks.append(TQValueList<TQWidget*>()); if (m_docks[row].count() <= col) { @@ -62,9 +62,9 @@ void DockSplitter::addDock(uint row, uint col, QWidget *dock) if (m_splitters.count() <= row) createSplitters(row); - QSplitter *splitter = m_splitters[row]; + TQSplitter *splitter = m_splitters[row]; - dock->reparent(splitter, QPoint(0,0), true); + dock->reparent(splitter, TQPoint(0,0), true); if (col < m_docks[row].count()-1) shiftWidgets(splitter, row, col+1); } @@ -74,10 +74,10 @@ void DockSplitter::appendSplitter() switch (m_orientation) { case Horizontal: - m_splitters.append(new QSplitter(Horizontal, this)); + m_splitters.append(new TQSplitter(Horizontal, this)); break; case Vertical: - m_splitters.append(new QSplitter(Vertical, this)); + m_splitters.append(new TQSplitter(Vertical, this)); break; } m_splitters[m_splitters.size()-1]->setOpaqueResize(true); @@ -99,7 +99,7 @@ void DockSplitter::removeDock(uint row, uint col, bool alsoDelete) if ((row >= m_docks.count()) || (col >= m_docks[row].count())) return; - QWidget *w = m_docks[row][col]; + TQWidget *w = m_docks[row][col]; m_docks[row].remove(m_docks[row].at(col)); if (alsoDelete) @@ -109,7 +109,7 @@ void DockSplitter::removeDock(uint row, uint col, bool alsoDelete) } else { - w->reparent(0, QPoint(0,0), false); + w->reparent(0, TQPoint(0,0), false); w->hide(); } @@ -134,7 +134,7 @@ bool DockSplitter::isRowEmpty(int row) return true; } -void DockSplitter::shiftWidgets(QSplitter *splitter, uint row, uint fromCol) +void DockSplitter::shiftWidgets(TQSplitter *splitter, uint row, uint fromCol) { kdDebug(9000) << "shiftWidgets: row=" << row << " from col=" << fromCol << endl; kdDebug(9000) << "row size is: " << m_docks[row].count() << endl; @@ -161,7 +161,7 @@ int DockSplitter::numCols(int row) const return 0; } -QPair<uint, uint> DockSplitter::indexOf(QWidget *dock) +QPair<uint, uint> DockSplitter::indexOf(TQWidget *dock) { for (uint i = 0; i < m_docks.count(); ++i) for (uint j = 0; j < m_docks[i].count(); ++j) diff --git a/src/newui/docksplitter.h b/src/newui/docksplitter.h index ce4a2e8e..c25dd495 100644 --- a/src/newui/docksplitter.h +++ b/src/newui/docksplitter.h @@ -20,8 +20,8 @@ #ifndef IDEALDOCKSPLITTER_H #define IDEALDOCKSPLITTER_H -#include <qsplitter.h> -#include <qvaluelist.h> +#include <tqsplitter.h> +#include <tqvaluelist.h> namespace Ideal { @@ -30,16 +30,16 @@ class DockWidget; /** @short Splitter for docks */ -class DockSplitter: public QSplitter { +class DockSplitter: public TQSplitter { Q_OBJECT public: - DockSplitter(Orientation orientation, QWidget *parent = 0, const char *name = 0); + DockSplitter(Orientation orientation, TQWidget *parent = 0, const char *name = 0); ~DockSplitter(); - void addDock(uint row, uint col, QWidget *dock); + void addDock(uint row, uint col, TQWidget *dock); void removeDock(uint row, uint col, bool alsoDelete = false); - QPair<uint, uint> indexOf(QWidget *dock); + QPair<uint, uint> indexOf(TQWidget *dock); int numRows() const; int numCols(int row) const; @@ -47,14 +47,14 @@ public: protected: void appendSplitter(); void createSplitters(uint index); - void shiftWidgets(QSplitter *splitter, uint row, uint fromCol); + void shiftWidgets(TQSplitter *splitter, uint row, uint fromCol); bool isRowEmpty(int row); private: Orientation m_orientation; - QValueList<QSplitter*> m_splitters; - QValueList<QValueList<QWidget*> > m_docks; + TQValueList<TQSplitter*> m_splitters; + TQValueList<TQValueList<TQWidget*> > m_docks; }; } diff --git a/src/newui/dtabwidget.cpp b/src/newui/dtabwidget.cpp index b9bf790a..db2e4c4e 100644 --- a/src/newui/dtabwidget.cpp +++ b/src/newui/dtabwidget.cpp @@ -19,14 +19,14 @@ ***************************************************************************/ #include "dtabwidget.h" -#include <qtoolbutton.h> -#include <qtabbar.h> +#include <tqtoolbutton.h> +#include <tqtabbar.h> #include <kconfig.h> #include <kiconloader.h> #include <kapplication.h> -DTabWidget::DTabWidget(QWidget *parent, const char *name) +DTabWidget::DTabWidget(TQWidget *parent, const char *name) :KTabWidget(parent, name), m_closeButton(0) { setFocusPolicy(NoFocus); @@ -37,7 +37,7 @@ DTabWidget::DTabWidget(QWidget *parent, const char *name) if (!m_tabBarShown) tabBar()->hide(); else { - m_closeButton = new QToolButton(this); + m_closeButton = new TQToolButton(this); m_closeButton->setIconSet(SmallIcon("tab_remove")); m_closeButton->adjustSize(); m_closeButton->hide(); @@ -49,8 +49,8 @@ DTabWidget::DTabWidget(QWidget *parent, const char *name) setTabReorderingEnabled(true); } - connect(this, SIGNAL(currentChanged(QWidget*)), this, SLOT(setFocus(QWidget*))); -// connect(this, SIGNAL(currentChanged(QWidget*)), this, SLOT(updateHistory(QWidget*))); + connect(this, TQT_SIGNAL(currentChanged(TQWidget*)), this, TQT_SLOT(setFocus(TQWidget*))); +// connect(this, TQT_SIGNAL(currentChanged(TQWidget*)), this, TQT_SLOT(updateHistory(TQWidget*))); } void DTabWidget::loadSettings() @@ -69,18 +69,18 @@ void DTabWidget::saveSettings() { } -QToolButton *DTabWidget::closeButton() const +TQToolButton *DTabWidget::closeButton() const { return m_closeButton; } -void DTabWidget::setFocus(QWidget *w) +void DTabWidget::setFocus(TQWidget *w) { if (w) w->setFocus(); } -void DTabWidget::insertTab(QWidget *child, const QString &label, int index) +void DTabWidget::insertTab(TQWidget *child, const TQString &label, int index) { if (m_closeButton && m_closeButtonShown) m_closeButton->show(); @@ -88,8 +88,8 @@ void DTabWidget::insertTab(QWidget *child, const QString &label, int index) if (index != -1) tabBar()->repaint(); } -void DTabWidget::insertTab(QWidget *child, const QIconSet &iconset, - const QString &label, int index) +void DTabWidget::insertTab(TQWidget *child, const TQIconSet &iconset, + const TQString &label, int index) { if (m_closeButton && m_closeButtonShown) m_closeButton->show(); @@ -97,7 +97,7 @@ void DTabWidget::insertTab(QWidget *child, const QIconSet &iconset, if (index != -1) tabBar()->repaint(); } -/*void DTabWidget::updateHistory(QWidget *w) +/*void DTabWidget::updateHistory(TQWidget *w) { if (m_history.top() != w) m_history.push(w); diff --git a/src/newui/dtabwidget.h b/src/newui/dtabwidget.h index 9640d2cd..d3e5d9da 100644 --- a/src/newui/dtabwidget.h +++ b/src/newui/dtabwidget.h @@ -27,31 +27,31 @@ class QToolButton; class DTabWidget: public KTabWidget { Q_OBJECT public: - DTabWidget(QWidget *parent=0, const char *name=0); + DTabWidget(TQWidget *parent=0, const char *name=0); /**@return The close button at the top right corner. May be 0 if the configuration do not allow close buttons or the tabbar.*/ - QToolButton *closeButton() const; + TQToolButton *closeButton() const; - virtual void insertTab(QWidget *child, const QString &label, int index = -1 ); - virtual void insertTab(QWidget *child, const QIconSet &iconset, - const QString &label, int index = -1); + virtual void insertTab(TQWidget *child, const TQString &label, int index = -1 ); + virtual void insertTab(TQWidget *child, const TQIconSet &iconset, + const TQString &label, int index = -1); protected: virtual void loadSettings(); virtual void saveSettings(); private slots: - void setFocus(QWidget *w); -// void updateHistory(QWidget *w); + void setFocus(TQWidget *w); +// void updateHistory(TQWidget *w); private: bool m_tabBarShown; bool m_closeOnHover; bool m_closeButtonShown; - QToolButton *m_closeButton; -// QValueStack<QWidget*> *m_history; + TQToolButton *m_closeButton; +// TQValueStack<TQWidget*> *m_history; }; diff --git a/src/partcontroller.cpp b/src/partcontroller.cpp index 1fb15445..67047af6 100644 --- a/src/partcontroller.cpp +++ b/src/partcontroller.cpp @@ -2,14 +2,14 @@ #include <sys/stat.h> #include <unistd.h> -#include <qpopupmenu.h> -#include <qfile.h> -#include <qlayout.h> -#include <qmap.h> -#include <qlabel.h> -#include <qradiobutton.h> -#include <qcheckbox.h> -#include <qdom.h> +#include <tqpopupmenu.h> +#include <tqfile.h> +#include <tqlayout.h> +#include <tqmap.h> +#include <tqlabel.h> +#include <tqradiobutton.h> +#include <tqcheckbox.h> +#include <tqdom.h> #include <kmimetype.h> #include <kservice.h> @@ -76,9 +76,9 @@ using namespace MainWindowUtils; struct HistoryEntry { KURL url; - QString context; + TQString context; - HistoryEntry( const KURL& u, const QString& c ): url( u ), context( c ) {} + HistoryEntry( const KURL& u, const TQString& c ): url( u ), context( c ) {} }; struct ModificationData @@ -89,12 +89,12 @@ struct ModificationData }; -PartController::PartController(QWidget *parent) +PartController::PartController(TQWidget *parent) : KDevPartController(parent), _editorFactory(0L), m_currentActivePart(0), m_removingActivePart(false) { - connect(this, SIGNAL(partRemoved(KParts::Part*)), this, SLOT(slotPartRemoved(KParts::Part* )) ); - connect(this, SIGNAL(partAdded(KParts::Part*)), this, SLOT(slotPartAdded(KParts::Part* )) ); - connect(this, SIGNAL(activePartChanged(KParts::Part*)), this, SLOT(slotActivePartChanged(KParts::Part*))); + connect(this, TQT_SIGNAL(partRemoved(KParts::Part*)), this, TQT_SLOT(slotPartRemoved(KParts::Part* )) ); + connect(this, TQT_SIGNAL(partAdded(KParts::Part*)), this, TQT_SLOT(slotPartAdded(KParts::Part* )) ); + connect(this, TQT_SIGNAL(activePartChanged(KParts::Part*)), this, TQT_SLOT(slotActivePartChanged(KParts::Part*))); setupActions(); @@ -109,7 +109,7 @@ PartController::~PartController() } -void PartController::createInstance(QWidget *parent) +void PartController::createInstance(TQWidget *parent) { if (!s_instance) s_instance = new PartController(parent); @@ -126,62 +126,62 @@ void PartController::setupActions() { KActionCollection *ac = TopLevel::getInstance()->main()->actionCollection(); - KAction* newAction = KStdAction::open(this, SLOT(slotOpenFile()), ac, "file_open"); + KAction* newAction = KStdAction::open(this, TQT_SLOT(slotOpenFile()), ac, "file_open"); newAction->setToolTip( i18n("Open file") ); newAction->setWhatsThis( i18n("<b>Open file</b><p>Opens an existing file without adding it to the project.</p>") ); - m_openRecentAction = KStdAction::openRecent( this, SLOT(slotOpenRecent(const KURL&) ), ac, "file_open_recent" ); - m_openRecentAction->setWhatsThis(QString("<b>%1</b><p>%2").arg(beautifyToolTip(m_openRecentAction->text())).arg(i18n("Opens recently opened file."))); + m_openRecentAction = KStdAction::openRecent( this, TQT_SLOT(slotOpenRecent(const KURL&) ), ac, "file_open_recent" ); + m_openRecentAction->setWhatsThis(TQString("<b>%1</b><p>%2").arg(beautifyToolTip(m_openRecentAction->text())).arg(i18n("Opens recently opened file."))); m_openRecentAction->loadEntries( kapp->config(), "RecentFiles" ); - m_saveAllFilesAction = new KAction(i18n("Save Al&l"), 0, this, SLOT(slotSaveAllFiles()), ac, "file_save_all"); + m_saveAllFilesAction = new KAction(i18n("Save Al&l"), 0, this, TQT_SLOT(slotSaveAllFiles()), ac, "file_save_all"); m_saveAllFilesAction->setToolTip( i18n("Save all modified files") ); m_saveAllFilesAction->setWhatsThis(i18n("<b>Save all</b><p>Saves all modified files.")); m_saveAllFilesAction->setEnabled(false); - m_revertAllFilesAction = new KAction(i18n("Rever&t All"), 0, this, SLOT(slotRevertAllFiles()), ac, "file_revert_all"); + m_revertAllFilesAction = new KAction(i18n("Rever&t All"), 0, this, TQT_SLOT(slotRevertAllFiles()), ac, "file_revert_all"); m_revertAllFilesAction->setToolTip(i18n("Revert all changes")); m_revertAllFilesAction->setWhatsThis(i18n("<b>Revert all</b><p>Reverts all changes in opened files. Prompts to save changes so the reversion can be canceled for each modified file.")); m_revertAllFilesAction->setEnabled(false); - m_closeWindowAction = KStdAction::close(this, SLOT(slotCloseWindow()), ac, "file_close"); + m_closeWindowAction = KStdAction::close(this, TQT_SLOT(slotCloseWindow()), ac, "file_close"); m_closeWindowAction->setToolTip( i18n("Close current file") ); - m_closeWindowAction->setWhatsThis(QString("<b>%1</b><p>%2").arg(beautifyToolTip(m_closeWindowAction->text())).arg(i18n("Closes current file."))); + m_closeWindowAction->setWhatsThis(TQString("<b>%1</b><p>%2").arg(beautifyToolTip(m_closeWindowAction->text())).arg(i18n("Closes current file."))); m_closeWindowAction->setEnabled(false); - m_closeAllWindowsAction = new KAction(i18n("Close All"), 0, this, SLOT(slotCloseAllWindows()), ac, "file_close_all"); + m_closeAllWindowsAction = new KAction(i18n("Close All"), 0, this, TQT_SLOT(slotCloseAllWindows()), ac, "file_close_all"); m_closeAllWindowsAction->setToolTip( i18n("Close all files") ); m_closeAllWindowsAction->setWhatsThis(i18n("<b>Close all</b><p>Close all opened files.")); m_closeAllWindowsAction->setEnabled(false); - m_closeOtherWindowsAction = new KAction(i18n("Close All Others"), 0, this, SLOT(slotCloseOtherWindows()), ac, "file_closeother"); + m_closeOtherWindowsAction = new KAction(i18n("Close All Others"), 0, this, TQT_SLOT(slotCloseOtherWindows()), ac, "file_closeother"); m_closeOtherWindowsAction->setToolTip( i18n("Close other files") ); m_closeOtherWindowsAction->setWhatsThis(i18n("<b>Close all others</b><p>Close all opened files except current.")); m_closeOtherWindowsAction->setEnabled(false); new KActionSeparator(ac, "dummy_separator"); - m_backAction = new KToolBarPopupAction(i18n("Back"), "back", 0, this, SLOT(slotBack()), ac, "history_back"); + m_backAction = new KToolBarPopupAction(i18n("Back"), "back", 0, this, TQT_SLOT(slotBack()), ac, "history_back"); m_backAction->setEnabled( false ); m_backAction->setToolTip(i18n("Back")); m_backAction->setWhatsThis(i18n("<b>Back</b><p>Moves backwards one step in the navigation history.")); - connect(m_backAction->popupMenu(), SIGNAL(aboutToShow()), this, SLOT(slotBackAboutToShow())); - connect(m_backAction->popupMenu(), SIGNAL(activated(int)), this, SLOT(slotBackPopupActivated(int))); + connect(m_backAction->popupMenu(), TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotBackAboutToShow())); + connect(m_backAction->popupMenu(), TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotBackPopupActivated(int))); - m_forwardAction = new KToolBarPopupAction(i18n("Forward"), "forward", 0, this, SLOT(slotForward()), ac, "history_forward"); + m_forwardAction = new KToolBarPopupAction(i18n("Forward"), "forward", 0, this, TQT_SLOT(slotForward()), ac, "history_forward"); m_forwardAction->setEnabled( false ); m_forwardAction->setToolTip(i18n("Forward")); m_forwardAction->setWhatsThis(i18n("<b>Forward</b><p>Moves forward one step in the navigation history.")); - connect(m_forwardAction->popupMenu(), SIGNAL(aboutToShow()), this, SLOT(slotForwardAboutToShow())); - connect(m_forwardAction->popupMenu(), SIGNAL(activated(int)), this, SLOT(slotForwardPopupActivated(int))); + connect(m_forwardAction->popupMenu(), TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotForwardAboutToShow())); + connect(m_forwardAction->popupMenu(), TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotForwardPopupActivated(int))); - m_gotoLastEditPosAction = new KAction( i18n("Goto Last Edit Position"), "bottom", 0, this, SLOT(gotoLastEditPos()), ac, "goto_last_edit_pos" ); + m_gotoLastEditPosAction = new KAction( i18n("Goto Last Edit Position"), "bottom", 0, this, TQT_SLOT(gotoLastEditPos()), ac, "goto_last_edit_pos" ); m_gotoLastEditPosAction->setEnabled( false ); m_gotoLastEditPosAction->setToolTip( i18n("Goto Last Edit Position") ); m_gotoLastEditPosAction->setWhatsThis( i18n("<b>Goto Last Edit Position</b><p>Open the last edited file and position cursor at the point of edit") ); } -void PartController::setEncoding(const QString &encoding) +void PartController::setEncoding(const TQString &encoding) { m_presetEncoding = encoding; } @@ -208,13 +208,13 @@ KParts::Part* PartController::findOpenDocument(const KURL& url) KURL PartController::findURLInProject(const KURL& url) { - QStringList fileList = API::getInstance()->project()->allFiles(); + TQStringList fileList = API::getInstance()->project()->allFiles(); bool filenameOnly = (url.url().find('/') == -1); - QString filename = filenameOnly ? "/" : ""; + TQString filename = filenameOnly ? "/" : ""; filename += url.url(); - for (QStringList::Iterator it = fileList.begin(); it != fileList.end(); ++it) { + for (TQStringList::Iterator it = fileList.begin(); it != fileList.end(); ++it) { if ((*it).endsWith(filename)) { // Match! The first one is as good as any one, I guess... return KURL( API::getInstance()->project()->projectDirectory() + "/" + *it ); @@ -267,7 +267,7 @@ void PartController::editDocumentInternal( const KURL & inputUrl, int lineNum, { ei->setEncoding( m_presetEncoding ); } - m_presetEncoding = QString::null; + m_presetEncoding = TQString::null; } addHistoryEntry(); @@ -330,7 +330,7 @@ void PartController::editDocumentInternal( const KURL & inputUrl, int lineNum, url.cleanPath(true); if (url.isLocalFile()) { - QString path = url.path(); + TQString path = url.path(); path = URLUtil::canonicalPath(path); if ( !path.isEmpty() ) url.setPath(path); @@ -388,10 +388,10 @@ void PartController::editDocumentInternal( const KURL & inputUrl, int lineNum, // we don't trust KDE with designer files, let's handle it ourselves if ( !m_openNextAsText && MimeType->is( "application/x-designer" ) ) { - QString DesignerSetting = config->readEntry( "DesignerSetting", "ExternalDesigner" ); - QString designerExec = "designer"; - QStringList designerPluginPaths; - QDomDocument* dom = API::getInstance()->projectDom(); + TQString DesignerSetting = config->readEntry( "DesignerSetting", "ExternalDesigner" ); + TQString designerExec = "designer"; + TQStringList designerPluginPaths; + TQDomDocument* dom = API::getInstance()->projectDom(); if ( dom != 0 ) { // The global option specifies a fallback if the project @@ -419,7 +419,7 @@ void PartController::editDocumentInternal( const KURL & inputUrl, int lineNum, designerPart->openURL(url); return; } - else if ( KParts::Factory * KDevDesignerFactory = static_cast<KParts::Factory*>( KLibLoader::self()->factory( QFile::encodeName( "libkdevdesignerpart" ) ) ) ) + else if ( KParts::Factory * KDevDesignerFactory = static_cast<KParts::Factory*>( KLibLoader::self()->factory( TQFile::encodeName( "libkdevdesignerpart" ) ) ) ) { KParts::ReadWritePart * kdevpart = static_cast<KParts::ReadWritePart*>( KDevDesignerFactory->createPart( TopLevel::getInstance()->main(), 0, 0, 0, "KParts::ReadWritePart" ) ); kdevpart->openURL( url ); @@ -441,14 +441,14 @@ void PartController::editDocumentInternal( const KURL & inputUrl, int lineNum, config->setGroup("General"); - QStringList texttypeslist = config->readListEntry( "TextTypes" ); + TQStringList texttypeslist = config->readListEntry( "TextTypes" ); if ( texttypeslist.contains( MimeType->name() ) ) { m_openNextAsText = true; } bool isText = false; - QVariant v = MimeType->property("X-KDE-text"); + TQVariant v = MimeType->property("X-KDE-text"); if (v.isValid()) isText = v.toBool(); // is this regular text - open in editor @@ -460,8 +460,8 @@ void PartController::editDocumentInternal( const KURL & inputUrl, int lineNum, { if ( m_presetEncoding.isNull() && API::getInstance()->projectDom() ) { - QDomDocument * projectDom = API::getInstance()->projectDom(); - m_presetEncoding = DomUtil::readEntry( *projectDom, "/general/defaultencoding", QString::null ); + TQDomDocument * projectDom = API::getInstance()->projectDom(); + m_presetEncoding = DomUtil::readEntry( *projectDom, "/general/defaultencoding", TQString::null ); } if ( !m_presetEncoding.isNull() ) @@ -470,12 +470,12 @@ void PartController::editDocumentInternal( const KURL & inputUrl, int lineNum, { ei->setEncoding( m_presetEncoding ); } - m_presetEncoding = QString::null; + m_presetEncoding = TQString::null; } addHistoryEntry(); - QWidget * widget = EditorProxy::getInstance()->topWidgetForPart( editorpart ); + TQWidget * widget = EditorProxy::getInstance()->topWidgetForPart( editorpart ); integratePart(editorpart, url, widget, true, activate, addToCurrentBuffer); EditorProxy::getInstance()->setLineNumber(editorpart, lineNum, col); @@ -492,10 +492,10 @@ void PartController::editDocumentInternal( const KURL & inputUrl, int lineNum, // OK, it's not text and it's not a designer file.. let's see what else we can come up with.. KParts::Factory *factory = 0; - QString className; + TQString className; - QString services[] = { "KParts/ReadWritePart", "KParts/ReadOnlyPart" }; - QString classnames[] = { "KParts::ReadWritePart", "KParts::ReadOnlyPart" }; + TQString services[] = { "KParts/ReadWritePart", "KParts/ReadOnlyPart" }; + TQString classnames[] = { "KParts::ReadWritePart", "KParts::ReadOnlyPart" }; for (uint i=0; i<2; ++i) { factory = findPartFactory( MimeType->name(), services[i] ); @@ -534,10 +534,10 @@ void PartController::editDocumentInternal( const KURL & inputUrl, int lineNum, else { MimeWarningDialog dlg; - dlg.text2->setText( QString( "<qt><b>%1</b></qt>" ).arg(url.path())); + dlg.text2->setText( TQString( "<qt><b>%1</b></qt>" ).arg(url.path())); dlg.text3->setText( dlg.text3->text().arg(MimeType->name()) ); - if ( dlg.exec() == QDialog::Accepted ) + if ( dlg.exec() == TQDialog::Accepted ) { if ( dlg.open_with_kde->isChecked() ) { @@ -549,7 +549,7 @@ void PartController::editDocumentInternal( const KURL & inputUrl, int lineNum, { KConfig *config = kapp->config(); config->setGroup("General"); - QStringList texttypeslist = config->readListEntry( "TextTypes" ); + TQStringList texttypeslist = config->readListEntry( "TextTypes" ); texttypeslist << MimeType->name(); config->writeEntry( "TextTypes", texttypeslist ); } @@ -563,7 +563,7 @@ void PartController::editDocumentInternal( const KURL & inputUrl, int lineNum, void PartController::showDocument(const KURL &url, bool newWin) { - QString fixedPath = HTMLDocumentationPart::resolveEnvVarsInURL(url.url()); // possibly could env vars + TQString fixedPath = HTMLDocumentationPart::resolveEnvVarsInURL(url.url()); // possibly could env vars KURL docUrl(fixedPath); kdDebug(9000) << "SHOW: " << docUrl.url() << endl; @@ -581,8 +581,8 @@ void PartController::showDocument(const KURL &url, bool newWin) { part = new HTMLDocumentationPart; integratePart(part,docUrl); - connect(part, SIGNAL(fileNameChanged(KParts::ReadOnlyPart* )), - this, SIGNAL(partURLChanged(KParts::ReadOnlyPart* ))); + connect(part, TQT_SIGNAL(fileNameChanged(KParts::ReadOnlyPart* )), + this, TQT_SIGNAL(partURLChanged(KParts::ReadOnlyPart* ))); } else { @@ -591,9 +591,9 @@ void PartController::showDocument(const KURL &url, bool newWin) part->openURL(docUrl); } -KParts::Factory *PartController::findPartFactory(const QString &mimeType, const QString &partType, const QString &preferredName) +KParts::Factory *PartController::findPartFactory(const TQString &mimeType, const TQString &partType, const TQString &preferredName) { - KTrader::OfferList offers = KTrader::self()->query(mimeType, QString("'%1' in ServiceTypes").arg(partType)); + KTrader::OfferList offers = KTrader::self()->query(mimeType, TQString("'%1' in ServiceTypes").arg(partType)); if (offers.count() > 0) { @@ -611,7 +611,7 @@ KParts::Factory *PartController::findPartFactory(const QString &mimeType, const if ( !ptr ) { ptr = offers.first(); } - return static_cast<KParts::Factory*>(KLibLoader::self()->factory(QFile::encodeName(ptr->library()))); + return static_cast<KParts::Factory*>(KLibLoader::self()->factory(TQFile::encodeName(ptr->library()))); } return 0; @@ -639,7 +639,7 @@ KTextEditor::Editor * PartController::createEditorPart( bool activate, static bool alwaysActivate = true; kapp->config()->setGroup("Editor"); - QString preferred = kapp->config()->readPathEntry("EmbeddedKTextEditor"); + TQString preferred = kapp->config()->readPathEntry("EmbeddedKTextEditor"); // If we are not using kyzis... // Don't create non-wrapped views for now, // avoid two paths (== two chances for bad bugs) @@ -663,7 +663,7 @@ KTextEditor::Editor * PartController::createEditorPart( bool activate, } void PartController::integratePart(KParts::Part *part, const KURL &url, - QWidget* widget, bool isTextEditor, + TQWidget* widget, bool isTextEditor, bool activate, bool addToCurrentBuffer ) { if (!widget) widget = part->widget(); @@ -685,14 +685,14 @@ void PartController::integratePart(KParts::Part *part, const KURL &url, emit loadedFile( ro_part->url() ); - connect( part, SIGNAL(modifiedOnDisc(Kate::Document*, bool, unsigned char)), this, SLOT(slotDocumentDirty(Kate::Document*, bool, unsigned char)) ); + connect( part, TQT_SIGNAL(modifiedOnDisc(Kate::Document*, bool, unsigned char)), this, TQT_SLOT(slotDocumentDirty(Kate::Document*, bool, unsigned char)) ); // let's get notified when a document has been changed - connect(part, SIGNAL(completed()), this, SLOT(slotUploadFinished())); + connect(part, TQT_SIGNAL(completed()), this, TQT_SLOT(slotUploadFinished())); // yes, we're cheating again. this signal exists for katepart's // Document object and our HTMLDocumentationPart -// connect(part, SIGNAL(fileNameChanged()), this, SLOT(slotFileNameChanged())); +// connect(part, TQT_SIGNAL(fileNameChanged()), this, TQT_SLOT(slotFileNameChanged())); // Connect to the document's views newStatus() signal in order to keep track of the // modified-status of the document. @@ -704,22 +704,22 @@ void PartController::integratePart(KParts::Part *part, const KURL &url, if (designerPart && API::getInstance()->languageSupport()) { kdDebug() << "integrating designer part with language support" << endl; - connect(designerPart, SIGNAL(addedFunction(DesignerType, const QString&, Function )), + connect(designerPart, TQT_SIGNAL(addedFunction(DesignerType, const TQString&, Function )), API::getInstance()->languageSupport(), - SLOT(addFunction(DesignerType, const QString&, Function ))); - connect(designerPart, SIGNAL(editedFunction(DesignerType, const QString&, Function, Function )), API::getInstance()->languageSupport(), - SLOT(editFunction(DesignerType, const QString&, Function, Function ))); - connect(designerPart, SIGNAL(removedFunction(DesignerType, const QString&, Function )), + TQT_SLOT(addFunction(DesignerType, const TQString&, Function ))); + connect(designerPart, TQT_SIGNAL(editedFunction(DesignerType, const TQString&, Function, Function )), API::getInstance()->languageSupport(), + TQT_SLOT(editFunction(DesignerType, const TQString&, Function, Function ))); + connect(designerPart, TQT_SIGNAL(removedFunction(DesignerType, const TQString&, Function )), API::getInstance()->languageSupport(), - SLOT(removeFunction(DesignerType, const QString&, Function ))); - connect(designerPart, SIGNAL(editFunction(DesignerType, const QString&, const QString& )), + TQT_SLOT(removeFunction(DesignerType, const TQString&, Function ))); + connect(designerPart, TQT_SIGNAL(editFunction(DesignerType, const TQString&, const TQString& )), API::getInstance()->languageSupport(), - SLOT(openFunction(DesignerType, const QString&, const QString& ))); - connect(designerPart, SIGNAL(editSource(DesignerType, const QString& )), + TQT_SLOT(openFunction(DesignerType, const TQString&, const TQString& ))); + connect(designerPart, TQT_SIGNAL(editSource(DesignerType, const TQString& )), API::getInstance()->languageSupport(), - SLOT(openSource(DesignerType, const QString& ))); - connect(designerPart, SIGNAL(newStatus(const QString &, int)), - this, SLOT(slotNewDesignerStatus(const QString &, int))); + TQT_SLOT(openSource(DesignerType, const TQString& ))); + connect(designerPart, TQT_SIGNAL(newStatus(const TQString &, int)), + this, TQT_SLOT(slotNewDesignerStatus(const TQString &, int))); } } @@ -740,14 +740,14 @@ void PartController::integrateTextEditorPart(KTextEditor::Document* doc) if ( !doc ) return; - connect( doc, SIGNAL(textChanged()), this, SLOT(textChanged()) ); - connect( doc, SIGNAL(fileNameChanged()), - this, SLOT(slotDocumentUrlChanged())); + connect( doc, TQT_SIGNAL(textChanged()), this, TQT_SLOT(textChanged()) ); + connect( doc, TQT_SIGNAL(fileNameChanged()), + this, TQT_SLOT(slotDocumentUrlChanged())); if( doc->widget() ) { - connect( doc->widget(), SIGNAL(dropEventPass(QDropEvent *)), - TopLevel::getInstance()->main(), SLOT(slotDropEvent(QDropEvent *)) ); + connect( doc->widget(), TQT_SIGNAL(dropEventPass(TQDropEvent *)), + TopLevel::getInstance()->main(), TQT_SLOT(slotDropEvent(TQDropEvent *)) ); } if ( KTextEditor::View * view = dynamic_cast<KTextEditor::View*>( doc->widget() ) ) @@ -783,11 +783,11 @@ void PartController::integrateTextEditorPart(KTextEditor::Document* doc) // signals are dynamic, if we try to connect to an editorpart that lacks this signal, // all we get is a runtime warning. At this point in time we are only really supported // by katepart anyway so IMHO this hack is justified. //teatime - QPtrList<KTextEditor::View> list = doc->views(); - QPtrListIterator<KTextEditor::View> it( list ); + TQPtrList<KTextEditor::View> list = doc->views(); + TQPtrListIterator<KTextEditor::View> it( list ); while ( it.current() ) { - connect( it, SIGNAL( newStatus() ), this, SLOT( slotNewStatus() ) ); + connect( it, TQT_SIGNAL( newStatus() ), this, TQT_SLOT( slotNewStatus() ) ); ++it; } } @@ -864,7 +864,7 @@ void PartController::slotUploadFinished() KParts::ReadOnlyPart *PartController::partForURL(const KURL &url) { - QPtrListIterator<KParts::Part> it(*parts()); + TQPtrListIterator<KParts::Part> it(*parts()); for ( ; it.current(); ++it) { KParts::ReadOnlyPart *ro_part = dynamic_cast<KParts::ReadOnlyPart*>(it.current()); @@ -874,9 +874,9 @@ KParts::ReadOnlyPart *PartController::partForURL(const KURL &url) return 0; } -KParts::Part * PartController::partForWidget( const QWidget * widget ) +KParts::Part * PartController::partForWidget( const TQWidget * widget ) { - QPtrListIterator<KParts::Part> it(*parts()); + TQPtrListIterator<KParts::Part> it(*parts()); for ( ; it.current(); ++it) { if ( it.current()->widget() == widget ) @@ -892,7 +892,7 @@ void PartController::activatePart(KParts::Part *part) { if ( !part ) return; - QWidget * widget = EditorProxy::getInstance()->widgetForPart( part ); + TQWidget * widget = EditorProxy::getInstance()->widgetForPart( part ); if (widget) { TopLevel::getInstance()->raiseView( widget ); @@ -902,7 +902,7 @@ void PartController::activatePart(KParts::Part *part) setActivePart(part); - QWidget* w2 = EditorProxy::getInstance()->widgetForPart( part ); + TQWidget* w2 = EditorProxy::getInstance()->widgetForPart( part ); if (w2 != widget) w2->setFocus(); } @@ -916,7 +916,7 @@ bool PartController::closePart(KParts::Part *part) KURL url = ro_part->url(); - if (QWidget* w = EditorProxy::getInstance()->topWidgetForPart( part ) ) + if (TQWidget* w = EditorProxy::getInstance()->topWidgetForPart( part ) ) { if ( MultiBuffer *multiBuffer = dynamic_cast<MultiBuffer*>( w ) ) { @@ -974,7 +974,7 @@ void PartController::updateMenuItems() bool hasWriteParts = false; bool hasReadOnlyParts = false; - QPtrListIterator<KParts::Part> it(*parts()); + TQPtrListIterator<KParts::Part> it(*parts()); for ( ; it.current(); ++it) { if (it.current()->inherits("KParts::ReadWritePart")) @@ -1059,7 +1059,7 @@ KURL::List PartController::modifiedDocuments() { KURL::List modFiles; - QPtrListIterator<KParts::Part> it( *parts() ); + TQPtrListIterator<KParts::Part> it( *parts() ); while( it.current() ) { KParts::ReadWritePart *rw_part = dynamic_cast<KParts::ReadWritePart*>(it.current()); @@ -1194,7 +1194,7 @@ bool PartController::saveFilesDialog( KURL::List const & ignoreList ) if ( modList.count() > 0 && modList != ignoreList ) { KSaveSelectDialog dlg( modList, ignoreList, TopLevel::getInstance()->main() ); - if ( dlg.exec() == QDialog::Accepted ) + if ( dlg.exec() == TQDialog::Accepted ) { saveFiles( dlg.filesToSave() ); clearModified( dlg.filesNotToSave() ); @@ -1211,8 +1211,8 @@ bool PartController::closeFilesDialog( KURL::List const & ignoreList ) { if ( !saveFilesDialog( ignoreList ) ) return false; - QPtrList<KParts::Part> partList( *parts() ); - QPtrListIterator<KParts::Part> it( partList ); + TQPtrList<KParts::Part> partList( *parts() ); + TQPtrListIterator<KParts::Part> it( partList ); while ( KParts::Part* part = it.current() ) { KParts::ReadOnlyPart * ro_part = dynamic_cast<KParts::ReadOnlyPart*>( part ); @@ -1273,10 +1273,10 @@ void PartController::slotCloseOtherWindows() void PartController::slotOpenFile() { - QString DefaultEncoding; - if ( QDomDocument * projectDom = API::getInstance()->projectDom() ) + TQString DefaultEncoding; + if ( TQDomDocument * projectDom = API::getInstance()->projectDom() ) { - DefaultEncoding = DomUtil::readEntry( *projectDom, "/general/defaultencoding", QString::null ); + DefaultEncoding = DomUtil::readEntry( *projectDom, "/general/defaultencoding", TQString::null ); } if ( DefaultEncoding.isEmpty() ) @@ -1284,11 +1284,11 @@ void PartController::slotOpenFile() // have a peek at katepart's settings: KConfig * config = kapp->config(); config->setGroup("Kate Document Defaults"); - DefaultEncoding = config->readEntry("Encoding", QString::null ); + DefaultEncoding = config->readEntry("Encoding", TQString::null ); } - KEncodingFileDialog::Result result = KEncodingFileDialog::getOpenURLsAndEncoding( DefaultEncoding, QString::null, - QString::null, TopLevel::getInstance()->main(), QString::null ); + KEncodingFileDialog::Result result = KEncodingFileDialog::getOpenURLsAndEncoding( DefaultEncoding, TQString::null, + TQString::null, TopLevel::getInstance()->main(), TQString::null ); for ( KURL::List::Iterator it = result.URLs.begin(); it != result.URLs.end(); ++it ) { @@ -1334,17 +1334,17 @@ void PartController::slotActivePartChanged( KParts::Part *part ) } updateMenuItems(); - QTimer::singleShot( 100, this, SLOT(slotWaitForFactoryHack()) ); + TQTimer::singleShot( 100, this, TQT_SLOT(slotWaitForFactoryHack()) ); } -void PartController::showPart( KParts::Part* part, const QString& name, const QString& shortDescription ) +void PartController::showPart( KParts::Part* part, const TQString& name, const TQString& shortDescription ) { if (!part->widget()) { /// @todo error handling return; // to avoid later crash } - QPtrListIterator<KParts::Part> it(*parts()); + TQPtrListIterator<KParts::Part> it(*parts()); for ( ; it.current(); ++it) { if( it.current() == part ){ @@ -1366,7 +1366,7 @@ void PartController::slotDocumentDirty( Kate::Document * d, bool isModified, uns // KTextEditor::Document * doc = reinterpret_cast<KTextEditor::Document*>( d ); // theoretically unsafe in MI scenario KTextEditor::Document * doc = 0; - QPtrListIterator<KParts::Part> it( *parts() ); + TQPtrListIterator<KParts::Part> it( *parts() ); while( it.current() ) { if ( (void*)it.current() == (void*)d ) @@ -1386,7 +1386,7 @@ void PartController::slotDocumentDirty( Kate::Document * d, bool isModified, uns p->doc = doc; p->isModified = isModified; p->reason = reason; - KDevJobTimer::singleShot( 0, this, SLOT(slotDocumentDirtyStepTwo(void*)), p ); + KDevJobTimer::singleShot( 0, this, TQT_SLOT(slotDocumentDirtyStepTwo(void*)), p ); } } @@ -1399,9 +1399,9 @@ void PartController::slotDocumentDirtyStepTwo( void * payload ) // let's make sure the document is still loaded bool haveDocument = false; - if( const QPtrList<KParts::Part> * partlist = parts() ) + if( const TQPtrList<KParts::Part> * partlist = parts() ) { - QPtrListIterator<KParts::Part> it( *partlist ); + TQPtrListIterator<KParts::Part> it( *partlist ); while ( KParts::Part * part = it.current() ) { if ( p->doc == dynamic_cast<KTextEditor::Document*>( part ) ) @@ -1462,7 +1462,7 @@ bool PartController::reactToDirty( KURL const & url, unsigned char reason ) { KConfig *config = kapp->config(); config->setGroup("Editor"); - QString dirtyAction = config->readEntry( "DirtyAction" ); + TQString dirtyAction = config->readEntry( "DirtyAction" ); if ( dirtyAction == "nothing" ) return false; @@ -1511,7 +1511,7 @@ bool PartController::reactToDirty( KURL const & url, unsigned char reason ) return true; } -void PartController::slotNewDesignerStatus(const QString &formName, int status) +void PartController::slotNewDesignerStatus(const TQString &formName, int status) { kdDebug(9000) << k_funcinfo << endl; kdDebug(9000) << " formName: " << formName << ", status: " << status << endl; @@ -1522,7 +1522,7 @@ void PartController::slotNewStatus( ) { kdDebug(9000) << k_funcinfo << endl; - QObject * senderobj = const_cast<QObject*>( sender() ); + TQObject * senderobj = const_cast<TQObject*>( sender() ); KTextEditor::View * view = dynamic_cast<KTextEditor::View*>( senderobj ); if ( view ) { @@ -1564,7 +1564,7 @@ void PartController::doEmitState( KURL const & url ) KURL::List PartController::openURLs( ) { KURL::List list; - QPtrListIterator<KParts::Part> it(*parts()); + TQPtrListIterator<KParts::Part> it(*parts()); for ( ; it.current(); ++it) { if ( KParts::ReadOnlyPart *ro_part = dynamic_cast<KParts::ReadOnlyPart*>(it.current()) ) @@ -1582,7 +1582,7 @@ KURL::List PartController::openURLs( ) PartController::HistoryEntry::HistoryEntry( const KURL & u, int l, int c) : url(u), line(l), col(c) { - id = abs( QTime::currentTime().msecsTo( QTime() ) ); // should provide a reasonably unique number + id = abs( TQTime::currentTime().msecsTo( TQTime() ) ); // should provide a reasonably unique number } void PartController::slotBack() @@ -1625,10 +1625,10 @@ void PartController::slotBackAboutToShow() if ( m_backHistory.isEmpty()) return; int i = 0; - QValueList<HistoryEntry>::ConstIterator it = m_backHistory.begin(); + TQValueList<HistoryEntry>::ConstIterator it = m_backHistory.begin(); while( i < 10 && it != m_backHistory.end() ) { - popup->insertItem( (*it).url.fileName() + QString(" (%1)").arg( (*it).line +1), (*it).id ); + popup->insertItem( (*it).url.fileName() + TQString(" (%1)").arg( (*it).line +1), (*it).id ); ++i; ++it; } @@ -1642,10 +1642,10 @@ void PartController::slotForwardAboutToShow( ) if ( m_forwardHistory.isEmpty() ) return; int i = 0; - QValueList<HistoryEntry>::ConstIterator it = m_forwardHistory.begin(); + TQValueList<HistoryEntry>::ConstIterator it = m_forwardHistory.begin(); while( i < 10 && it != m_forwardHistory.end() ) { - popup->insertItem( (*it).url.fileName() + QString(" (%1)").arg( (*it).line +1), (*it).id ); + popup->insertItem( (*it).url.fileName() + TQString(" (%1)").arg( (*it).line +1), (*it).id ); ++i; ++it; } @@ -1653,7 +1653,7 @@ void PartController::slotForwardAboutToShow( ) void PartController::slotBackPopupActivated( int id ) { - QValueList<HistoryEntry>::Iterator it = m_backHistory.begin(); + TQValueList<HistoryEntry>::Iterator it = m_backHistory.begin(); while( it != m_backHistory.end() ) { if ( (*it).id == id ) @@ -1678,7 +1678,7 @@ void PartController::slotBackPopupActivated( int id ) void PartController::slotForwardPopupActivated( int id ) { - QValueList<HistoryEntry>::Iterator it = m_forwardHistory.begin(); + TQValueList<HistoryEntry>::Iterator it = m_forwardHistory.begin(); while( it != m_forwardHistory.end() ) { if ( (*it).id == id ) @@ -1761,7 +1761,7 @@ void PartController::slotWaitForFactoryHack( ) { if ( !activePart()->factory() ) { - QTimer::singleShot( 100, this, SLOT(slotWaitForFactoryHack()) ); + TQTimer::singleShot( 100, this, TQT_SLOT(slotWaitForFactoryHack()) ); return; } else @@ -1785,7 +1785,7 @@ void PartController::slotWaitForFactoryHack( ) KParts::ReadOnlyPart *PartController::qtDesignerPart() { - QPtrListIterator<KParts::Part> it(*parts()); + TQPtrListIterator<KParts::Part> it(*parts()); for ( ; it.current(); ++it) { KInterfaceDesigner::Designer *des = dynamic_cast<KInterfaceDesigner::Designer*>(it.current()); @@ -1809,13 +1809,13 @@ KTextEditor::Editor *PartController::openTextDocument( bool activate ) if ( extension ) { KParts::URLArgs args; - args.serviceType = QString( "text/plain;" ) + m_presetEncoding; + args.serviceType = TQString( "text/plain;" ) + m_presetEncoding; extension->setURLArgs(args); } - m_presetEncoding = QString::null; + m_presetEncoding = TQString::null; } - QWidget * widget = + TQWidget * widget = EditorProxy::getInstance()->topWidgetForPart( editorpart ); addHistoryEntry(); @@ -1848,7 +1848,7 @@ void PartController::gotoLastEditPos() void PartController::slotDocumentUrlChanged() { - QObject *obj = const_cast<QObject*>(sender()); + TQObject *obj = const_cast<TQObject*>(sender()); KTextEditor::Document *doc = dynamic_cast<KTextEditor::Document*>( obj ); if (!doc) return; diff --git a/src/partcontroller.h b/src/partcontroller.h index 9aa4e226..869ee5bf 100644 --- a/src/partcontroller.h +++ b/src/partcontroller.h @@ -3,13 +3,13 @@ #include "kdevpartcontroller.h" -#include <qwidget.h> -#include <qdatetime.h> -#include <qptrlist.h> +#include <tqwidget.h> +#include <tqdatetime.h> +#include <tqptrlist.h> #include <kurl.h> -#include <qmap.h> -#include <qguardedptr.h> -#include <qpair.h> +#include <tqmap.h> +#include <tqguardedptr.h> +#include <tqpair.h> namespace KParts { @@ -46,13 +46,13 @@ class PartController : public KDevPartController public: - PartController(QWidget *toplevel); - static void createInstance(QWidget *parent); + PartController(TQWidget *toplevel); + static void createInstance(TQWidget *parent); static PartController *getInstance(); ///// KDevPartController interface - void setEncoding(const QString &encoding); + void setEncoding(const TQString &encoding); void editDocument(const KURL &inputUrl, int lineNum=-1, int col=-1); void splitCurrentDocument(const KURL &inputUrl, int lineNum=-1, int col=-1); void scrollToLineColumn(const KURL &url, int lineNum=-1, int col=-1, bool storeHistory = false ); @@ -61,11 +61,11 @@ public: void integrateTextEditorPart(KTextEditor::Document* doc); void showDocument(const KURL &url, bool newWin = false); - void showPart( KParts::Part* part, const QString& name, const QString& shortDescription ); + void showPart( KParts::Part* part, const TQString& name, const TQString& shortDescription ); KParts::ReadOnlyPart *partForURL(const KURL &url); KParts::ReadOnlyPart *qtDesignerPart(); - KParts::Part * partForWidget( const QWidget * widget ); + KParts::Part * partForWidget( const TQWidget * widget ); void activatePart( KParts::Part * part ); bool closePart( KParts::Part * part ); @@ -95,9 +95,9 @@ public: void reloadFile( const KURL & url ); KTextEditor::Editor *openTextDocument( bool activate = true ); - KParts::Factory *findPartFactory(const QString &mimeType, - const QString &partType, - const QString &preferredName = QString::null ); + KParts::Factory *findPartFactory(const TQString &mimeType, + const TQString &partType, + const TQString &preferredName = TQString::null ); public slots: @@ -141,7 +141,7 @@ private slots: void slotDocumentDirty( Kate::Document * doc, bool isModified, unsigned char reason ); void slotDocumentDirtyStepTwo( void * ); void slotNewStatus(); - void slotNewDesignerStatus(const QString &formName, int status); + void slotNewDesignerStatus(const TQString &formName, int status); void textChanged(); void gotoLastEditPos(); @@ -160,7 +160,7 @@ private: bool addToCurrentBuffer = false, const KURL &url = KURL() ); - void integratePart(KParts::Part *part, const KURL &url, QWidget* widget = 0, + void integratePart(KParts::Part *part, const KURL &url, TQWidget* widget = 0, bool isTextEditor=false, bool activate=true, bool addToCurrentBuffer = false ); @@ -180,7 +180,7 @@ private: KAction *m_closeWindowAction, *m_saveAllFilesAction, *m_revertAllFilesAction; KAction *m_closeAllWindowsAction, *m_closeOtherWindowsAction; KRecentFilesAction *m_openRecentAction; - QString m_presetEncoding; + TQString m_presetEncoding; KToolBarPopupAction* m_backAction; KToolBarPopupAction* m_forwardAction; @@ -188,11 +188,11 @@ private: bool m_openNextAsText; - QValueList<KParts::ReadWritePart*> _dirtyDocuments; + TQValueList<KParts::ReadWritePart*> _dirtyDocuments; - QMap< KParts::ReadOnlyPart*, KURL > _partURLMap; // used to note when a URL changes (a file changes name) + TQMap< KParts::ReadOnlyPart*, KURL > _partURLMap; // used to note when a URL changes (a file changes name) - QGuardedPtr<KParts::Factory> _editorFactory; + TQGuardedPtr<KParts::Factory> _editorFactory; struct HistoryEntry { @@ -209,8 +209,8 @@ private: HistoryEntry createHistoryEntry( KParts::ReadOnlyPart * part = 0 ); void jumpTo( const HistoryEntry & ); - QValueList<HistoryEntry> m_backHistory; - QValueList<HistoryEntry> m_forwardHistory; + TQValueList<HistoryEntry> m_backHistory; + TQValueList<HistoryEntry> m_forwardHistory; bool m_isJumping; struct LastEditPos diff --git a/src/plugincontroller.cpp b/src/plugincontroller.cpp index 2dc01654..7b7ffac1 100644 --- a/src/plugincontroller.cpp +++ b/src/plugincontroller.cpp @@ -1,5 +1,5 @@ -#include <qfile.h> -#include <qvbox.h> +#include <tqfile.h> +#include <tqvbox.h> #include <kcmdlineargs.h> #include <kapplication.h> @@ -47,9 +47,9 @@ namespace { template <class ComponentType> - ComponentType *loadDefaultPart( const QString &serviceType ) + ComponentType *loadDefaultPart( const TQString &serviceType ) { - KTrader::OfferList offers = KTrader::self()->query(serviceType, QString("[X-KDevelop-Version] == %1").arg(KDEVELOP_PLUGIN_VERSION)); + KTrader::OfferList offers = KTrader::self()->query(serviceType, TQString("[X-KDevelop-Version] == %1").arg(KDEVELOP_PLUGIN_VERSION)); KTrader::OfferList::ConstIterator serviceIt = offers.begin(); for ( ; serviceIt != offers.end(); ++serviceIt ) { KService::Ptr service = *serviceIt; @@ -79,14 +79,14 @@ PluginController *PluginController::getInstance() PluginController::PluginController() : KDevPluginController() { -/* m_defaultProfile = QString::fromLatin1( "FullIDE" ); +/* m_defaultProfile = TQString::fromLatin1( "FullIDE" ); m_defaultProfilePath = kapp->dirs()->localkdedir() + "/" + KStandardDirs::kde_default( "data" ) + - QString::fromLatin1("/kdevelop/profiles/FullIDE");*/ + TQString::fromLatin1("/kdevelop/profiles/FullIDE");*/ KCmdLineArgs* args = KCmdLineArgs::parsedArgs(); if( args->isSet("profile") ){ - m_profile = QString::fromLocal8Bit( args->getOption("profile") ); + m_profile = TQString::fromLocal8Bit( args->getOption("profile") ); } else { m_profile = ShellExtension::getInstance()->defaultProfile(); } @@ -98,7 +98,7 @@ void PluginController::loadInitialPlugins() { loadCorePlugins(); - QStringList disableList; + TQStringList disableList; Profile * profile = engine().findProfile( currentProfile() ); if( profile ) { @@ -123,25 +123,25 @@ void PluginController::loadCorePlugins() loadPlugins( coreOffers ); } -void PluginController::loadGlobalPlugins( const QStringList & ignorePlugins ) +void PluginController::loadGlobalPlugins( const TQStringList & ignorePlugins ) { KTrader::OfferList globalOffers = m_engine.offers(m_profile, ProfileEngine::Global); loadPlugins( globalOffers, ignorePlugins ); } -void PluginController::loadProjectPlugins( const QStringList & ignorePlugins ) +void PluginController::loadProjectPlugins( const TQStringList & ignorePlugins ) { KTrader::OfferList projectOffers = m_engine.offers(m_profile, ProfileEngine::Project); loadPlugins( projectOffers, ignorePlugins ); } -void PluginController::loadPlugins( KTrader::OfferList offers, const QStringList & ignorePlugins ) +void PluginController::loadPlugins( KTrader::OfferList offers, const TQStringList & ignorePlugins ) { TopLevel::getInstance()->main()->setFocus(); for (KTrader::OfferList::ConstIterator it = offers.begin(); it != offers.end(); ++it) { - QString name = (*it)->desktopEntryName(); + TQString name = (*it)->desktopEntryName(); // Check if it is already loaded or shouldn't be if( m_parts[ name ] != 0 || ignorePlugins.contains( name ) ) @@ -160,7 +160,7 @@ void PluginController::loadPlugins( KTrader::OfferList offers, const QStringList void PluginController::unloadPlugins() { - for( QDictIterator<KDevPlugin> it( m_parts ); !it.isEmpty(); ) + for( TQDictIterator<KDevPlugin> it( m_parts ); !it.isEmpty(); ) { KDevPlugin* part = it.current(); removePart( part ); @@ -178,7 +178,7 @@ void PluginController::unloadProjectPlugins( ) offers += m_engine.offers(m_profile, ProfileEngine::Project); for (KTrader::OfferList::ConstIterator it = offers.begin(); it != offers.end(); ++it) { - QString name = (*it)->desktopEntryName(); + TQString name = (*it)->desktopEntryName(); if ( KDevPlugin * plugin = m_parts[ name ] ) { @@ -189,9 +189,9 @@ void PluginController::unloadProjectPlugins( ) } } -void PluginController::unloadPlugins( QStringList const & unloadParts ) +void PluginController::unloadPlugins( TQStringList const & unloadParts ) { - QStringList::ConstIterator it = unloadParts.begin(); + TQStringList::ConstIterator it = unloadParts.begin(); while ( it != unloadParts.end() ) { KDevPlugin* part = m_parts[ *it ]; @@ -226,15 +226,15 @@ KDevPlugin *PluginController::loadPlugin( const KService::Ptr &service ) return pl; } -QStringList PluginController::argumentsFromService( const KService::Ptr &service ) +TQStringList PluginController::argumentsFromService( const KService::Ptr &service ) { - QStringList args; + TQStringList args; if ( !service ) // service is a reference to a pointer, so a check whether it is 0 is still required return args; - QVariant prop = service->property( "X-KDevelop-Args" ); + TQVariant prop = service->property( "X-KDevelop-Args" ); if ( prop.isValid() ) - args = QStringList::split( " ", prop.toString() ); + args = TQStringList::split( " ", prop.toString() ); return args; } @@ -244,11 +244,11 @@ void PluginController::integratePart(KXMLGUIClient *part) Core::setupShourtcutTips(part); TopLevel::getInstance()->main()->guiFactory()->addClient(part); - connect( part->actionCollection(), SIGNAL( actionStatusText( const QString & ) ), - TopLevel::getInstance()->main()->actionCollection(), SIGNAL( actionStatusText( const QString & ) ) ); + connect( part->actionCollection(), TQT_SIGNAL( actionStatusText( const TQString & ) ), + TopLevel::getInstance()->main()->actionCollection(), TQT_SIGNAL( actionStatusText( const TQString & ) ) ); } -void PluginController::integrateAndRememberPart(const QString &name, KDevPlugin *part) +void PluginController::integrateAndRememberPart(const TQString &name, KDevPlugin *part) { m_parts.insert(name, part); integratePart(part); @@ -260,17 +260,17 @@ void PluginController::removePart(KXMLGUIClient *part) TopLevel::getInstance()->main()->guiFactory()->removeClient(part); } -void PluginController::removeAndForgetPart(const QString &name, KDevPlugin *part) +void PluginController::removeAndForgetPart(const TQString &name, KDevPlugin *part) { kdDebug() << "removing: " << name << endl; m_parts.remove(name); removePart(part); } -const QValueList<KDevPlugin*> PluginController::loadedPlugins() +const TQValueList<KDevPlugin*> PluginController::loadedPlugins() { - QValueList<KDevPlugin*> plugins; - QDictIterator<KDevPlugin> itt(m_parts); + TQValueList<KDevPlugin*> plugins; + TQDictIterator<KDevPlugin> itt(m_parts); while( itt.current() ) { plugins.append( itt.current() ); @@ -279,7 +279,7 @@ const QValueList<KDevPlugin*> PluginController::loadedPlugins() return plugins; } -KDevPlugin * PluginController::extension( const QString & serviceType, const QString & constraint ) +KDevPlugin * PluginController::extension( const TQString & serviceType, const TQString & constraint ) { KTrader::OfferList offers = KDevPluginController::query(serviceType, constraint); for (KTrader::OfferList::const_iterator it = offers.constBegin(); it != offers.end(); ++it) @@ -290,13 +290,13 @@ KDevPlugin * PluginController::extension( const QString & serviceType, const QSt return 0; } -KDevPlugin * PluginController::loadPlugin( const QString & serviceType, const QString & constraint ) +KDevPlugin * PluginController::loadPlugin( const TQString & serviceType, const TQString & constraint ) { KTrader::OfferList offers = KDevPluginController::query( serviceType, constraint ); if ( !offers.size() == 1 ) return 0; KTrader::OfferList::const_iterator it = offers.constBegin(); - QString name = (*it)->desktopEntryName(); + TQString name = (*it)->desktopEntryName(); KDevPlugin * plugin = 0; if ( plugin = m_parts[ name ] ) @@ -313,33 +313,33 @@ KDevPlugin * PluginController::loadPlugin( const QString & serviceType, const QS return plugin; } -void PluginController::unloadPlugin( const QString & plugin ) +void PluginController::unloadPlugin( const TQString & plugin ) { - QStringList pluginList; + TQStringList pluginList; pluginList << plugin; unloadPlugins( pluginList ); } -KURL::List PluginController::profileResources(const QString &nameFilter) +KURL::List PluginController::profileResources(const TQString &nameFilter) { return m_engine.resources(currentProfile(), nameFilter); } -KURL::List PluginController::profileResourcesRecursive(const QString &nameFilter) +KURL::List PluginController::profileResourcesRecursive(const TQString &nameFilter) { return m_engine.resourcesRecursive(currentProfile(), nameFilter); } -QString PluginController::changeProfile(const QString &newProfile) +TQString PluginController::changeProfile(const TQString &newProfile) { kdDebug() << "CHANGING PROFILE: from " << currentProfile() << " to " << newProfile << endl; - QStringList unload; + TQStringList unload; KTrader::OfferList coreLoad; KTrader::OfferList globalLoad; m_engine.diffProfiles(ProfileEngine::Core, currentProfile(), newProfile, unload, coreLoad); m_engine.diffProfiles(ProfileEngine::Global, currentProfile(), newProfile, unload, globalLoad); - QString oldProfile = m_profile; + TQString oldProfile = m_profile; m_profile = newProfile; unloadPlugins(unload); @@ -354,9 +354,9 @@ void PluginController::selectPlugins( ) kdDebug(9000) << k_funcinfo << endl; PluginSelectDialog dlg; - if ( dlg.exec() == QDialog::Accepted ) + if ( dlg.exec() == TQDialog::Accepted ) { - QStringList unselectedPlugins = dlg.unselectedPluginNames(); + TQStringList unselectedPlugins = dlg.unselectedPluginNames(); kdDebug(9000) << unselectedPlugins << endl; diff --git a/src/plugincontroller.h b/src/plugincontroller.h index 9b526e3e..7eae5bda 100644 --- a/src/plugincontroller.h +++ b/src/plugincontroller.h @@ -1,8 +1,8 @@ #ifndef __PLUGINCONTROLLER_H__ #define __PLUGINCONTROLLER_H__ -#include <qdict.h> -#include <qvaluelist.h> +#include <tqdict.h> +#include <tqvaluelist.h> #include <kservice.h> @@ -29,47 +29,47 @@ public: ~PluginController(); static PluginController *getInstance(); - static QStringList argumentsFromService( const KService::Ptr &service ); + static TQStringList argumentsFromService( const KService::Ptr &service ); - virtual KDevPlugin * loadPlugin( const QString & serviceType, const QString & constraint ); - virtual void unloadPlugin( const QString & plugin ); + virtual KDevPlugin * loadPlugin( const TQString & serviceType, const TQString & constraint ); + virtual void unloadPlugin( const TQString & plugin ); - QString currentProfile() const { return m_profile; } + TQString currentProfile() const { return m_profile; } void loadInitialPlugins(); - void loadProjectPlugins( const QStringList & ignorePlugins ); + void loadProjectPlugins( const TQStringList & ignorePlugins ); void unloadProjectPlugins(); - void loadGlobalPlugins( const QStringList & ignorePlugins = QStringList() ); + void loadGlobalPlugins( const TQStringList & ignorePlugins = TQStringList() ); // KDevPlugin * getPlugin( const KService::Ptr &service ); - virtual KDevPlugin *extension(const QString &serviceType, const QString &constraint = ""); + virtual KDevPlugin *extension(const TQString &serviceType, const TQString &constraint = ""); - void unloadPlugins( QStringList const & ); + void unloadPlugins( TQStringList const & ); void integratePart(KXMLGUIClient *part); - void integrateAndRememberPart(const QString &name, KDevPlugin *part); + void integrateAndRememberPart(const TQString &name, KDevPlugin *part); void removePart(KXMLGUIClient* part); - void removeAndForgetPart(const QString &name, KDevPlugin* part); + void removeAndForgetPart(const TQString &name, KDevPlugin* part); - const QValueList<KDevPlugin*> loadedPlugins(); + const TQValueList<KDevPlugin*> loadedPlugins(); ProfileEngine &engine() { return m_engine; } - virtual KURL::List profileResources(const QString &nameFilter); - virtual KURL::List profileResourcesRecursive(const QString &nameFilter); + virtual KURL::List profileResources(const TQString &nameFilter); + virtual KURL::List profileResourcesRecursive(const TQString &nameFilter); //returns the name of an old profile that was unloaded - QString changeProfile(const QString &newProfile); + TQString changeProfile(const TQString &newProfile); public slots: void selectPlugins(); signals: - void loadingPlugin(const QString &plugin); + void loadingPlugin(const TQString &plugin); protected: PluginController(); @@ -77,15 +77,15 @@ protected: private slots: // void slotConfigWidget( KDialogBase* ); void loadCorePlugins(); - void loadPlugins( KTrader::OfferList offers, const QStringList & ignorePlugins = QStringList() ); + void loadPlugins( KTrader::OfferList offers, const TQStringList & ignorePlugins = TQStringList() ); void unloadPlugins(); private: static KDevPlugin *loadPlugin( const KService::Ptr &service ); - QDict<KDevPlugin> m_parts; - QString m_profile; + TQDict<KDevPlugin> m_parts; + TQString m_profile; static PluginController *s_instance; diff --git a/src/pluginselectdialog.cpp b/src/pluginselectdialog.cpp index de4a9e1e..0863791c 100644 --- a/src/pluginselectdialog.cpp +++ b/src/pluginselectdialog.cpp @@ -9,10 +9,10 @@ * * ***************************************************************************/ -#include <qlistview.h> -#include <qheader.h> -#include <qlabel.h> -#include <qregexp.h> +#include <tqlistview.h> +#include <tqheader.h> +#include <tqlabel.h> +#include <tqregexp.h> #include <kdebug.h> #include <kapplication.h> @@ -27,32 +27,32 @@ class PluginItem : public QCheckListItem { public: // name - "Name", label - "GenericName", info - "Comment" - PluginItem( QListView * parent, QString const & name, QString const & label, - QString const & info, QString const url = QString::null ) - : QCheckListItem( parent, label, QCheckListItem::CheckBox), + PluginItem( TQListView * parent, TQString const & name, TQString const & label, + TQString const & info, TQString const url = TQString::null ) + : TQCheckListItem( parent, label, TQCheckListItem::CheckBox), _name( name ), _info( info ), _url( url ) {} - QString info() { return _info; } - QString name() { return _name; } - QString url() { return _url; } + TQString info() { return _info; } + TQString name() { return _name; } + TQString url() { return _url; } private: - QString _name; - QString _info; - QString _url; + TQString _name; + TQString _info; + TQString _url; }; -PluginSelectDialog::PluginSelectDialog(QWidget* parent, const char* name, bool modal, WFlags fl ) +PluginSelectDialog::PluginSelectDialog(TQWidget* parent, const char* name, bool modal, WFlags fl ) : PluginSelectDialogBase( parent,name, modal,fl ) { - plugin_list->setResizeMode( QListView::LastColumn ); + plugin_list->setResizeMode( TQListView::LastColumn ); plugin_list->addColumn(""); plugin_list->header()->hide(); - connect( plugin_list, SIGNAL( selectionChanged( QListViewItem * ) ), this, SLOT( itemSelected( QListViewItem * ) ) ); - connect( urllabel, SIGNAL( leftClickedURL( const QString & ) ), this, SLOT( openURL( const QString & ) ) ); + connect( plugin_list, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ), this, TQT_SLOT( itemSelected( TQListViewItem * ) ) ); + connect( urllabel, TQT_SIGNAL( leftClickedURL( const TQString & ) ), this, TQT_SLOT( openURL( const TQString & ) ) ); init(); } @@ -70,7 +70,7 @@ void PluginSelectDialog::saveAsDefault() profile->clearList( Profile::ExplicitDisable ); - QListViewItemIterator it( plugin_list ); + TQListViewItemIterator it( plugin_list ); while ( it.current() ) { PluginItem * item = static_cast<PluginItem*>( it.current() ); @@ -84,12 +84,12 @@ void PluginSelectDialog::saveAsDefault() profile->save(); } -void PluginSelectDialog::openURL( const QString & url ) +void PluginSelectDialog::openURL( const TQString & url ) { kapp->invokeBrowser( url ); } -void PluginSelectDialog::itemSelected( QListViewItem * item ) +void PluginSelectDialog::itemSelected( TQListViewItem * item ) { if ( ! item ) return; @@ -109,9 +109,9 @@ void PluginSelectDialog::itemSelected( QListViewItem * item ) void PluginSelectDialog::init( ) { - const QValueList<KDevPlugin*> loadedPlugins = PluginController::getInstance()->loadedPlugins(); - QStringList loadedPluginDesktopNames; - QValueList<KDevPlugin*>::ConstIterator it = loadedPlugins.begin(); + const TQValueList<KDevPlugin*> loadedPlugins = PluginController::getInstance()->loadedPlugins(); + TQStringList loadedPluginDesktopNames; + TQValueList<KDevPlugin*>::ConstIterator it = loadedPlugins.begin(); while( it != loadedPlugins.end() ) { loadedPluginDesktopNames << (*it)->instance()->instanceName(); @@ -134,12 +134,12 @@ void PluginSelectDialog::init( ) for (KTrader::OfferList::ConstIterator it = offers.begin(); it != offers.end(); ++it) { // parse out any existing url to make it clickable - QString Comment = (*it)->comment(); - QRegExp re("\\bhttp://[\\S]*"); + TQString Comment = (*it)->comment(); + TQRegExp re("\\bhttp://[\\S]*"); re.search( Comment ); Comment.replace( re, "" ); - QString url; + TQString url; if ( re.pos() > -1 ) { url = re.cap(); @@ -151,17 +151,17 @@ void PluginSelectDialog::init( ) kdDebug(9000) << (*it)->desktopEntryName() << " : " << (loadedPluginDesktopNames.contains( (*it)->desktopEntryName() ) ? "YES" : "NO" ) << endl; } - QListViewItem * first = plugin_list->firstChild(); + TQListViewItem * first = plugin_list->firstChild(); if ( first ) { plugin_list->setSelected( first, true ); } } -QStringList PluginSelectDialog::unselectedPluginNames( ) +TQStringList PluginSelectDialog::unselectedPluginNames( ) { - QStringList unselectedPlugins; - QListViewItem * item = plugin_list->firstChild(); + TQStringList unselectedPlugins; + TQListViewItem * item = plugin_list->firstChild(); while ( item ) { PluginItem * pluginItem = static_cast<PluginItem*>( item ); diff --git a/src/pluginselectdialog.h b/src/pluginselectdialog.h index 5925ad7a..e0289eb6 100644 --- a/src/pluginselectdialog.h +++ b/src/pluginselectdialog.h @@ -22,18 +22,18 @@ class PluginSelectDialog : public PluginSelectDialogBase Q_OBJECT public: - PluginSelectDialog( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + PluginSelectDialog( TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); ~PluginSelectDialog(); - QStringList unselectedPluginNames(); + TQStringList unselectedPluginNames(); private: void init(); protected slots: virtual void saveAsDefault(); - void itemSelected( QListViewItem * ); - void openURL( const QString & ); + void itemSelected( TQListViewItem * ); + void openURL( const TQString & ); }; diff --git a/src/profileengine/editor/profileeditor.cpp b/src/profileengine/editor/profileeditor.cpp index 4e0a33ab..903403de 100644 --- a/src/profileengine/editor/profileeditor.cpp +++ b/src/profileengine/editor/profileeditor.cpp @@ -18,10 +18,10 @@ ***************************************************************************/ #include "profileeditor.h" -#include <qlayout.h> +#include <tqlayout.h> #include <klineedit.h> -#include <qtextedit.h> -#include <qpalette.h> +#include <tqtextedit.h> +#include <tqpalette.h> #include <kdebug.h> #include <kpushbutton.h> @@ -62,18 +62,18 @@ private: class EDListItem: public KListViewItem{ public: - EDListItem(KListView *parent, const QString &text, bool derived) + EDListItem(KListView *parent, const TQString &text, bool derived) : KListViewItem(parent, text), m_derived(derived) { } bool isDerived() const { return m_derived; } - virtual void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment) + virtual void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment) { - QColorGroup cgNew = cg; + TQColorGroup cgNew = cg; if (m_derived) - cgNew.setColor(QColorGroup::Text, KGlobalSettings::inactiveTextColor()); + cgNew.setColor(TQColorGroup::Text, KGlobalSettings::inactiveTextColor()); KListViewItem::paintCell(p, cgNew, column, width, alignment); } @@ -92,7 +92,7 @@ public: }; -ProfileEditor::ProfileEditor(QWidget *parent, const char *name) +ProfileEditor::ProfileEditor(TQWidget *parent, const char *name) :ProfileEditorBase(parent, name) { refresh(); @@ -115,12 +115,12 @@ void ProfileEditor::refresh() void ProfileEditor::refreshPropertyCombo() { - KTrader::OfferList list = KTrader::self()->query(QString::fromLatin1("KDevelop/Plugin")); - QStringList props; + KTrader::OfferList list = KTrader::self()->query(TQString::fromLatin1("KDevelop/Plugin")); + TQStringList props; for (KTrader::OfferList::const_iterator it = list.constBegin(); it != list.constEnd(); ++it) { - QStringList currProps = (*it)->property("X-KDevelop-Properties").toStringList(); - for (QStringList::const_iterator p = currProps.constBegin(); + TQStringList currProps = (*it)->property("X-KDevelop-Properties").toStringList(); + for (TQStringList::const_iterator p = currProps.constBegin(); p != currProps.constEnd(); ++p) if (!props.contains(*p)) props.append(*p); @@ -152,7 +152,7 @@ void ProfileEditor::refreshAvailableList() new KListViewItem(allProject, (*it)->desktopEntryName(), (*it)->genericName()); } -void ProfileEditor::profileExecuted(QListViewItem *item) +void ProfileEditor::profileExecuted(TQListViewItem *item) { if (!item || item->text(0) == "KDevelop") removeProfileButton->setEnabled(false); @@ -224,7 +224,7 @@ void ProfileEditor::fillPluginsList(Profile *profile) (*it)->property("X-KDevelop-Properties").toStringList().join(", ")); } -void ProfileEditor::propertyExecuted(QListBoxItem *item) +void ProfileEditor::propertyExecuted(TQListBoxItem *item) { removePropertyButton->setEnabled(item != 0); } @@ -236,10 +236,10 @@ void ProfileEditor::addProfile() KDialogBase dlg(KDialogBase::Plain, i18n("Add Profile"), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok); dlg.plainPage()->setMargin(0); - (new QVBoxLayout(dlg.plainPage(), 0, 0))->setAutoAdd(true); + (new TQVBoxLayout(dlg.plainPage(), 0, 0))->setAutoAdd(true); AddProfileWidget *prof = new AddProfileWidget(dlg.plainPage()); prof->nameEdit->setFocus(); - if (dlg.exec() == QDialog::Accepted) + if (dlg.exec() == TQDialog::Accepted) { Profile *profile = new Profile(currentProfile(), prof->nameEdit->text(), prof->genericNameEdit->text(), @@ -257,7 +257,7 @@ void ProfileEditor::removeProfile() Profile *profile = currentProfile(); if (profile->remove()) { - QListViewItem *item = profilesList->currentItem(); + TQListViewItem *item = profilesList->currentItem(); profilesList->setCurrentItem(item->parent()); profile->detachFromParent(); delete profile; @@ -309,7 +309,7 @@ void ProfileEditor::addEnabled() { if (!allList->currentItem() && allEdit->text().isEmpty()) return; - QString text; + TQString text; if (!allEdit->text().isEmpty()) { text = allEdit->text(); @@ -355,7 +355,7 @@ void ProfileEditor::addDisabled() { if (!allList->currentItem() && allEdit->text().isEmpty()) return; - QString text; + TQString text; if (!allEdit->text().isEmpty()) { text = allEdit->text(); diff --git a/src/profileengine/editor/profileeditor.h b/src/profileengine/editor/profileeditor.h index 5ce014fd..3f4fff85 100644 --- a/src/profileengine/editor/profileeditor.h +++ b/src/profileengine/editor/profileeditor.h @@ -30,15 +30,15 @@ class KListViewItem; class ProfileEditor : public ProfileEditorBase { Q_OBJECT public: - ProfileEditor(QWidget *parent = 0, const char *name = 0); + ProfileEditor(TQWidget *parent = 0, const char *name = 0); public slots: virtual void removeProperty(); virtual void addProperty(); virtual void removeProfile(); virtual void addProfile(); - virtual void propertyExecuted(QListBoxItem *item); - virtual void profileExecuted(QListViewItem *item); + virtual void propertyExecuted(TQListBoxItem *item); + virtual void profileExecuted(TQListViewItem *item); virtual void delDisabled(); virtual void addDisabled(); diff --git a/src/profileengine/lib/profile.cpp b/src/profileengine/lib/profile.cpp index 62a7c586..f07c6376 100644 --- a/src/profileengine/lib/profile.cpp +++ b/src/profileengine/lib/profile.cpp @@ -18,21 +18,21 @@ ***************************************************************************/ #include "profile.h" -#include <qdir.h> -#include <qfileinfo.h> +#include <tqdir.h> +#include <tqfileinfo.h> #include <kdebug.h> #include <kstandarddirs.h> #include <kconfig.h> #include <kio/netaccess.h> -Profile::Profile(Profile *parent, const QString &name) +Profile::Profile(Profile *parent, const TQString &name) :m_parent(parent), m_name(name) { if (m_parent) m_parent->addChildProfile(this); - QString profileConfig = locate("data", "kdevelop/profiles" + dirName() + "/profile.config"); + TQString profileConfig = locate("data", "kdevelop/profiles" + dirName() + "/profile.config"); KConfig config(profileConfig); config.setGroup("Information"); @@ -49,7 +49,7 @@ Profile::Profile(Profile *parent, const QString &name) m_explicitDisable = config.readListEntry("List"); } -Profile::Profile(Profile *parent, const QString &name, const QString &genericName, const QString &description) +Profile::Profile(Profile *parent, const TQString &name, const TQString &genericName, const TQString &description) :m_parent(parent), m_name(name), m_genericName(genericName), m_description(description) { if (m_parent) @@ -59,7 +59,7 @@ Profile::Profile(Profile *parent, const QString &name, const QString &genericNam Profile::~Profile() { - for (QValueList<Profile*>::iterator it = m_children.begin(); it != m_children.end(); ++it) + for (TQValueList<Profile*>::iterator it = m_children.begin(); it != m_children.end(); ++it) delete *it; } @@ -73,7 +73,7 @@ void Profile::removeChildProfile(Profile *profile) m_children.remove(profile); } -QString Profile::dirName() const +TQString Profile::dirName() const { if (m_parent) return m_parent->dirName() + "/" + m_name; @@ -83,7 +83,7 @@ QString Profile::dirName() const void Profile::save() { - QString profileConfig = locateLocal("data", "kdevelop/profiles" + dirName() + "/profile.config"); + TQString profileConfig = locateLocal("data", "kdevelop/profiles" + dirName() + "/profile.config"); KConfig config(profileConfig); config.setGroup("Information"); @@ -110,22 +110,22 @@ Profile::EntryList Profile::list(List type) EntryList list = parentList; for (EntryList::iterator it = list.begin(); it != list.end(); ++it) (*it).derived = true; - QStringList &personalList = listByType(type); - for (QStringList::const_iterator it = personalList.begin(); it != personalList.end(); ++it) + TQStringList &personalList = listByType(type); + for (TQStringList::const_iterator it = personalList.begin(); it != personalList.end(); ++it) list.append(Entry(*it, false)); return list; } -void Profile::addEntry(List type, const QString &value) +void Profile::addEntry(List type, const TQString &value) { - QStringList &list = listByType(type); + TQStringList &list = listByType(type); if (!list.contains(value)) list.append(value); } -void Profile::removeEntry(List type, const QString &value) +void Profile::removeEntry(List type, const TQString &value) { - QStringList &list = listByType(type); + TQStringList &list = listByType(type); list.remove(value); } @@ -142,7 +142,7 @@ void Profile::clearList( List type ) } } -QStringList &Profile::listByType(List type) +TQStringList &Profile::listByType(List type) { switch (type) { case Properties: @@ -155,7 +155,7 @@ QStringList &Profile::listByType(List type) } } -bool Profile::hasInEntryList(EntryList &list, QString value) +bool Profile::hasInEntryList(EntryList &list, TQString value) { for (EntryList::const_iterator it = list.constBegin(); it != list.constEnd(); ++it) if ((*it).name == value) @@ -165,8 +165,8 @@ bool Profile::hasInEntryList(EntryList &list, QString value) bool Profile::remove() { - QStringList dirs = KGlobal::dirs()->findDirs("data", "kdevelop/profiles" + dirName()); - if ((dirs.count() == 1) && dirs[0].startsWith(QDir::homeDirPath())) + TQStringList dirs = KGlobal::dirs()->findDirs("data", "kdevelop/profiles" + dirName()); + if ((dirs.count() == 1) && dirs[0].startsWith(TQDir::homeDirPath())) return KIO::NetAccess::del(KURL::fromPathOrURL(dirs[0]), 0); return false; } @@ -177,17 +177,17 @@ void Profile::detachFromParent() m_parent->removeChildProfile(this); } -KURL::List Profile::resources(const QString &nameFilter) +KURL::List Profile::resources(const TQString &nameFilter) { - QStringList resources; - QStringList resourceDirs = KGlobal::dirs()->resourceDirs("data"); - for (QStringList::const_iterator it = resourceDirs.begin(); it != resourceDirs.end(); ++it) + TQStringList resources; + TQStringList resourceDirs = KGlobal::dirs()->resourceDirs("data"); + for (TQStringList::const_iterator it = resourceDirs.begin(); it != resourceDirs.end(); ++it) { - QString dir = *it; + TQString dir = *it; dir = dir + "kdevelop/profiles" + dirName(); - QDir d(dir); - const QFileInfoList *infoList = d.entryInfoList(nameFilter, QDir::Files); + TQDir d(dir); + const QFileInfoList *infoList = d.entryInfoList(nameFilter, TQDir::Files); if (!infoList) continue; for (QFileInfoList::const_iterator infoIt = infoList->constBegin(); @@ -200,6 +200,6 @@ KURL::List Profile::resources(const QString &nameFilter) void Profile::addResource(const KURL &url) { - QString saveLocation = KGlobal::dirs()->saveLocation("data", "kdevelop/profiles"+dirName(), true); + TQString saveLocation = KGlobal::dirs()->saveLocation("data", "kdevelop/profiles"+dirName(), true); KIO::NetAccess::file_copy(url, KURL::fromPathOrURL(saveLocation), -1, true); } diff --git a/src/profileengine/lib/profile.h b/src/profileengine/lib/profile.h index 9d467984..c81db7e3 100644 --- a/src/profileengine/lib/profile.h +++ b/src/profileengine/lib/profile.h @@ -20,7 +20,7 @@ #define PROFILE_H #include <kurl.h> -#include <qstringlist.h> +#include <tqstringlist.h> /** @short KDevelop profile @@ -32,11 +32,11 @@ public: /**An entry in the lists that store profile information*/ struct Entry { Entry() {} - Entry(const QString &_name, bool _derived): name(_name), derived(_derived) {} - QString name; + Entry(const TQString &_name, bool _derived): name(_name), derived(_derived) {} + TQString name; bool derived; }; - typedef QValueList<Entry> EntryList; + typedef TQValueList<Entry> EntryList; /**Lists which are held by a profile.*/ enum List { @@ -45,29 +45,29 @@ public: ExplicitDisable /**<A list of explicitly disabled plugins (names).*/ }; - Profile(Profile *parent, const QString &name); - Profile(Profile *parent, const QString &name, const QString &genericName, const QString &description); + Profile(Profile *parent, const TQString &name); + Profile(Profile *parent, const TQString &name, const TQString &genericName, const TQString &description); ~Profile(); - QValueList<Profile*> children() const { return m_children; } + TQValueList<Profile*> children() const { return m_children; } Profile *parent() const { return m_parent; } void save(); bool remove(); - QString name() const { return m_name; } - QString genericName() const { return m_genericName; } - QString description() const { return m_description; } + TQString name() const { return m_name; } + TQString genericName() const { return m_genericName; } + TQString description() const { return m_description; } EntryList list(List type); - void addEntry(List type, const QString &value); - void removeEntry(List type, const QString &value); + void addEntry(List type, const TQString &value); + void removeEntry(List type, const TQString &value); void clearList(List type); - bool hasInEntryList(EntryList &list, QString value); + bool hasInEntryList(EntryList &list, TQString value); - KURL::List resources(const QString &nameFilter); + KURL::List resources(const TQString &nameFilter); void addResource(const KURL &url); void detachFromParent(); @@ -75,22 +75,22 @@ public: protected: void addChildProfile(Profile *profile); void removeChildProfile(Profile *profile); - QString dirName() const; + TQString dirName() const; - QStringList &listByType(List type); + TQStringList &listByType(List type); private: Profile *m_parent; - QValueList<Profile*> m_children; + TQValueList<Profile*> m_children; - QString m_name; + TQString m_name; - QString m_genericName; - QString m_description; + TQString m_genericName; + TQString m_description; - QStringList m_properties; - QStringList m_explicitEnable; - QStringList m_explicitDisable; + TQStringList m_properties; + TQStringList m_explicitEnable; + TQStringList m_explicitDisable; }; #endif diff --git a/src/profileengine/lib/profileengine.cpp b/src/profileengine/lib/profileengine.cpp index 199c8238..af8f2afe 100644 --- a/src/profileengine/lib/profileengine.cpp +++ b/src/profileengine/lib/profileengine.cpp @@ -18,7 +18,7 @@ ***************************************************************************/ #include "profileengine.h" -#include <qdir.h> +#include <tqdir.h> #include <kurl.h> #include <kdebug.h> @@ -29,14 +29,14 @@ ProfileEngine::ProfileEngine() { - QStringList dirs = KGlobal::dirs()->findDirs("data", "kdevelop/profiles"); + TQStringList dirs = KGlobal::dirs()->findDirs("data", "kdevelop/profiles"); m_rootProfile = new Profile(0, "KDevelop"); - QString currPath = "/"; - QMap<QString, Profile*> passedPaths; + TQString currPath = "/"; + TQMap<TQString, Profile*> passedPaths; - for (QStringList::const_iterator it = dirs.constBegin(); it != dirs.constEnd(); ++it) + for (TQStringList::const_iterator it = dirs.constBegin(); it != dirs.constEnd(); ++it) processDir(*it, currPath, passedPaths, m_rootProfile); } @@ -45,17 +45,17 @@ ProfileEngine::~ProfileEngine() delete m_rootProfile; } -void ProfileEngine::processDir(const QString &dir, const QString &currPath, QMap<QString, Profile*> &passedPaths, Profile *root) +void ProfileEngine::processDir(const TQString &dir, const TQString &currPath, TQMap<TQString, Profile*> &passedPaths, Profile *root) { // kdDebug() << "processDir: " << dir << " " << currPath << endl; - QDir qDir(dir); - QStringList entryList = qDir.entryList(QDir::Dirs); - for (QStringList::const_iterator eit = entryList.constBegin(); eit != entryList.constEnd(); ++eit) + TQDir qDir(dir); + TQStringList entryList = qDir.entryList(TQDir::Dirs); + for (TQStringList::const_iterator eit = entryList.constBegin(); eit != entryList.constEnd(); ++eit) { if ((*eit != "..") && (*eit != ".")) { - QString dirName = *eit; + TQString dirName = *eit; Profile *profile = 0; if (passedPaths.contains(currPath + dirName)) profile = passedPaths[currPath + dirName]; @@ -69,7 +69,7 @@ void ProfileEngine::processDir(const QString &dir, const QString &currPath, QMap } } -KTrader::OfferList ProfileEngine::offers(const QString &profileName, OfferType offerType) +KTrader::OfferList ProfileEngine::offers(const TQString &profileName, OfferType offerType) { ProfileListing listing; Profile *profile = 0; @@ -78,23 +78,23 @@ KTrader::OfferList ProfileEngine::offers(const QString &profileName, OfferType o if (!profile) return KTrader::OfferList(); - QString constraint = QString::fromLatin1("[X-KDevelop-Version] == %1").arg(KDEVELOP_PLUGIN_VERSION); + TQString constraint = TQString::fromLatin1("[X-KDevelop-Version] == %1").arg(KDEVELOP_PLUGIN_VERSION); switch (offerType) { case Global: - constraint += QString::fromLatin1(" and [X-KDevelop-Scope] == 'Global'"); + constraint += TQString::fromLatin1(" and [X-KDevelop-Scope] == 'Global'"); break; case Project: - constraint += QString::fromLatin1(" and [X-KDevelop-Scope] == 'Project'"); + constraint += TQString::fromLatin1(" and [X-KDevelop-Scope] == 'Project'"); break; case Core: - constraint += QString::fromLatin1(" and [X-KDevelop-Scope] == 'Core'"); + constraint += TQString::fromLatin1(" and [X-KDevelop-Scope] == 'Core'"); break; } - QString constraint_add = ""; + TQString constraint_add = ""; Profile::EntryList properties = profile->list(Profile::Properties); int i = 0; for (Profile::EntryList::const_iterator it = properties.begin(); it != properties.end(); ++it) - constraint_add += QString::fromLatin1(" %1 '%2' in [X-KDevelop-Properties]"). + constraint_add += TQString::fromLatin1(" %1 '%2' in [X-KDevelop-Properties]"). arg((i++)==0?"":"or").arg((*it).name); if (!constraint_add.isEmpty()) constraint += " and ( " + constraint_add + " ) "; @@ -106,15 +106,15 @@ KTrader::OfferList ProfileEngine::offers(const QString &profileName, OfferType o << " " << constraint << endl << endl << endl;*/ //END debug - KTrader::OfferList list = KTrader::self()->query(QString::fromLatin1("KDevelop/Plugin"), constraint); - QStringList names; + KTrader::OfferList list = KTrader::self()->query(TQString::fromLatin1("KDevelop/Plugin"), constraint); + TQStringList names; /* Wrong, this is not what we want to do. Profile::EntryList disableList = profile->list(Profile::ExplicitDisable); KTrader::OfferList::iterator it = list.begin(); while (it != list.end()) { - QString name = (*it)->desktopEntryName(); + TQString name = (*it)->desktopEntryName(); names.append(name); if (profile->hasInEntryList(disableList, name)) { @@ -129,9 +129,9 @@ KTrader::OfferList ProfileEngine::offers(const QString &profileName, OfferType o { if (names.contains((*it).name)) continue; - QString constraint = QString::fromLatin1("[X-KDevelop-Version] == %1").arg(KDEVELOP_PLUGIN_VERSION); - constraint += QString::fromLatin1("and [Name] == '%1'").arg((*it).name); - KTrader::OfferList enable = KTrader::self()->query(QString::fromLatin1("KDevelop/Plugin"), constraint); + TQString constraint = TQString::fromLatin1("[X-KDevelop-Version] == %1").arg(KDEVELOP_PLUGIN_VERSION); + constraint += TQString::fromLatin1("and [Name] == '%1'").arg((*it).name); + KTrader::OfferList enable = KTrader::self()->query(TQString::fromLatin1("KDevelop/Plugin"), constraint); list += enable; } @@ -149,23 +149,23 @@ KTrader::OfferList ProfileEngine::offers(const QString &profileName, OfferType o KTrader::OfferList ProfileEngine::allOffers(OfferType offerType) { - QString constraint = QString::fromLatin1("[X-KDevelop-Version] == %1").arg(KDEVELOP_PLUGIN_VERSION); + TQString constraint = TQString::fromLatin1("[X-KDevelop-Version] == %1").arg(KDEVELOP_PLUGIN_VERSION); switch (offerType) { case Global: - constraint += QString::fromLatin1(" and [X-KDevelop-Scope] == 'Global'"); + constraint += TQString::fromLatin1(" and [X-KDevelop-Scope] == 'Global'"); break; case Project: - constraint += QString::fromLatin1(" and [X-KDevelop-Scope] == 'Project'"); + constraint += TQString::fromLatin1(" and [X-KDevelop-Scope] == 'Project'"); break; case Core: - constraint += QString::fromLatin1(" and [X-KDevelop-Scope] == 'Core'"); + constraint += TQString::fromLatin1(" and [X-KDevelop-Scope] == 'Core'"); break; } - return KTrader::self()->query(QString::fromLatin1("KDevelop/Plugin"), constraint); + return KTrader::self()->query(TQString::fromLatin1("KDevelop/Plugin"), constraint); } void ProfileEngine::getProfileWithListing(ProfileListing &listing, Profile **profile, - const QString &profileName) + const TQString &profileName) { if (profileName == "KDevelop") *profile = m_rootProfile; @@ -176,7 +176,7 @@ void ProfileEngine::getProfileWithListing(ProfileListing &listing, Profile **pro } } -KURL::List ProfileEngine::resources(const QString &profileName, const QString &nameFilter) +KURL::List ProfileEngine::resources(const TQString &profileName, const TQString &nameFilter) { ProfileListing listing; Profile *profile = 0; @@ -188,12 +188,12 @@ KURL::List ProfileEngine::resources(const QString &profileName, const QString &n return resources(profile, nameFilter); } -KURL::List ProfileEngine::resources(Profile *profile, const QString &nameFilter) +KURL::List ProfileEngine::resources(Profile *profile, const TQString &nameFilter) { return profile->resources(nameFilter); } -KURL::List ProfileEngine::resourcesRecursive(const QString &profileName, const QString &nameFilter) +KURL::List ProfileEngine::resourcesRecursive(const TQString &profileName, const TQString &nameFilter) { ProfileListing listing; Profile *profile = 0; @@ -207,17 +207,17 @@ KURL::List ProfileEngine::resourcesRecursive(const QString &profileName, const Q return resources; } -void ProfileEngine::diffProfiles(OfferType offerType, const QString &profile1, - const QString &profile2, QStringList &unload, KTrader::OfferList &load) +void ProfileEngine::diffProfiles(OfferType offerType, const TQString &profile1, + const TQString &profile2, TQStringList &unload, KTrader::OfferList &load) { KTrader::OfferList offers1 = offers(profile1, offerType); KTrader::OfferList offers2 = offers(profile2, offerType); - QStringList offers1List; + TQStringList offers1List; for (KTrader::OfferList::const_iterator it = offers1.constBegin(); it != offers1.constEnd(); ++it) offers1List.append((*it)->desktopEntryName()); - QMap<QString, KService::Ptr> offers2List; + TQMap<TQString, KService::Ptr> offers2List; for (KTrader::OfferList::const_iterator it = offers2.constBegin(); it != offers2.constEnd(); ++it) offers2List[(*it)->desktopEntryName()] = *it; @@ -225,7 +225,7 @@ void ProfileEngine::diffProfiles(OfferType offerType, const QString &profile1, // kdDebug() << "OLD PROFILE: " << offers1List << endl; // kdDebug() << "NEW PROFILE: " << offers2List << endl; - for (QStringList::const_iterator it = offers1List.constBegin(); + for (TQStringList::const_iterator it = offers1List.constBegin(); it != offers1List.constEnd(); ++it) { // kdDebug() << "checking: " << *it << endl; @@ -243,7 +243,7 @@ void ProfileEngine::diffProfiles(OfferType offerType, const QString &profile1, load = offers2; } -Profile *ProfileEngine::findProfile(const QString & profileName) +Profile *ProfileEngine::findProfile(const TQString & profileName) { Profile *profile; ProfileListing listing; @@ -251,7 +251,7 @@ Profile *ProfileEngine::findProfile(const QString & profileName) return profile; } -void ProfileEngine::addResource(const QString &profileName, const KURL &url) +void ProfileEngine::addResource(const TQString &profileName, const KURL &url) { ProfileListing listing; Profile *profile = 0; diff --git a/src/profileengine/lib/profileengine.h b/src/profileengine/lib/profileengine.h index 5128803d..e790dece 100644 --- a/src/profileengine/lib/profileengine.h +++ b/src/profileengine/lib/profileengine.h @@ -19,7 +19,7 @@ #ifndef PROFILEENGINE_H #define PROFILEENGINE_H -#include <qmap.h> +#include <tqmap.h> #include <ktrader.h> @@ -28,7 +28,7 @@ /** Profile listing operation. Used to get a plain list of profiles -and store it in the QMap<QString, Profile*>. +and store it in the TQMap<TQString, Profile*>. */ class ProfileListing{ public: @@ -37,7 +37,7 @@ public: profiles[profile->name()] = profile; } - QMap<QString, Profile*> profiles; + TQMap<TQString, Profile*> profiles; }; /**Profile resource listing operation. @@ -45,17 +45,17 @@ Used to get a list of urls to the profile resources. Resource urls can be filtered by an @p filter parameter passed to the constructor. Filter can have values -as described in @ref QDir::setNameFilter function documentation.*/ +as described in @ref TQDir::setNameFilter function documentation.*/ class ProfileListingEx { public: - ProfileListingEx(const QString &filter): m_filter(filter) {} + ProfileListingEx(const TQString &filter): m_filter(filter) {} void operator() (Profile *profile) { resourceList += profile->resources(m_filter); } KURL::List resourceList; - QString m_filter; + TQString m_filter; }; /** @@ -100,29 +100,29 @@ public: }; /**@return The list of plugin offers for given profile and type.*/ - KTrader::OfferList offers(const QString &profileName, OfferType offerType); + KTrader::OfferList offers(const TQString &profileName, OfferType offerType); /**@return The list of all plugin offers for given type.*/ KTrader::OfferList allOffers(OfferType offerType); /**@return The list of URLs to the resources (files) with given @p extension. @param profileName A name of a profile to find resources in. - @param nameFilter Name filter for files. @see QDir::setNameFilter documentation + @param nameFilter Name filter for files. @see TQDir::setNameFilter documentation for name filters syntax.*/ - KURL::List resources(const QString &profileName, const QString &nameFilter); + KURL::List resources(const TQString &profileName, const TQString &nameFilter); /**@return The list of URLs to the resources (files) with given @p extension. This list is obtained by a recursive search that process given profile and all it's subprofiles. @param profileName A name of a profile to find resources in. - @param nameFilter Name filter for files. @see QDir::setNameFilter documentation + @param nameFilter Name filter for files. @see TQDir::setNameFilter documentation for name filters syntax.*/ - KURL::List resourcesRecursive(const QString &profileName, const QString &nameFilter); + KURL::List resourcesRecursive(const TQString &profileName, const TQString &nameFilter); /**Adds a resource for the profile. Resource will be copied to the user profile directory (like $HOME/.kde/share/apps/kdevelop/profiles/...). @param profileName A name of the profile. @param url The url to a file to copy as a profile resource.*/ - void addResource(const QString &profileName, const KURL &url); + void addResource(const TQString &profileName, const KURL &url); /**Gets the difference between @p profile1 and @p profile2. Difference is calculated as two lists of plugins to be unloaded and loaded @@ -134,8 +134,8 @@ public: @param load Will be filled with a list of plugins to load. @note Resulting lists are not cleared. Pass only clean lists in the common case.*/ - void diffProfiles(OfferType offerType, const QString &profile1, const QString &profile2, - QStringList &unload, KTrader::OfferList &load); + void diffProfiles(OfferType offerType, const TQString &profile1, const TQString &profile2, + TQStringList &unload, KTrader::OfferList &load); /**@return The root profile. Root profile is always named "KDevelop" and it defines an empty list of plugins. Applications built on KDevelop platform @@ -143,7 +143,7 @@ public: Profile *rootProfile() const { return m_rootProfile; } /**Finds a profile with given name. @return The profile found or 0 if it does not exist.*/ - Profile *findProfile(const QString &profileName); + Profile *findProfile(const TQString &profileName); /**Walks profiles tree and applies operation @p op to each profile found in the tree below @p root (@p root profile itself is not processed). @@ -158,7 +158,7 @@ public: profiles[profile->name()] = profile; } - QMap<QString, Profile*> profiles; + TQMap<TQString, Profile*> profiles; }; @endcode Use case for such operation - building a list of all profiles: @@ -177,8 +177,8 @@ public: template<class Operation> void walkProfiles(Operation &op, Profile *root) { - QValueList<Profile*> children = root->children(); - for (QValueList<Profile*>::iterator it = children.begin(); it != children.end(); ++it) + TQValueList<Profile*> children = root->children(); + for (TQValueList<Profile*>::iterator it = children.begin(); it != children.end(); ++it) { op(*it); walkProfiles<Operation>(op, *it); @@ -244,8 +244,8 @@ public: template<class Operation, class Result> void walkProfiles(Operation &op, Result *result, Profile *root) { - QValueList<Profile*> children = root->children(); - for (QValueList<Profile*>::iterator it = children.begin(); it != children.end(); ++it) + TQValueList<Profile*> children = root->children(); + for (TQValueList<Profile*>::iterator it = children.begin(); it != children.end(); ++it) { Result *newResult = op(result, *it); walkProfiles<Operation>(op, newResult, *it); @@ -253,9 +253,9 @@ public: } protected: - void processDir(const QString &dir, const QString &currPath, QMap<QString, Profile*> &passedPaths, Profile *root); + void processDir(const TQString &dir, const TQString &currPath, TQMap<TQString, Profile*> &passedPaths, Profile *root); - KURL::List resources(Profile *profile, const QString &nameFilter); + KURL::List resources(Profile *profile, const TQString &nameFilter); /**Gets a complete listing of available profiles and looks for a profile. @param listing Profiles listing will be saved here. @@ -263,7 +263,7 @@ protected: if no profile with that name is found. @param profileName The name of a profile to find.*/ void getProfileWithListing(ProfileListing &listing, Profile **profile, - const QString &profileName); + const TQString &profileName); private: Profile *m_rootProfile; diff --git a/src/projectmanager.cpp b/src/projectmanager.cpp index 3b06340f..87893a50 100644 --- a/src/projectmanager.cpp +++ b/src/projectmanager.cpp @@ -1,12 +1,12 @@ -#include <qfile.h> -#include <qfileinfo.h> -#include <qdir.h> -#include <qdom.h> -#include <qstringlist.h> -#include <qptrlist.h> -#include <qvbox.h> -#include <qsize.h> -#include <qtimer.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqdir.h> +#include <tqdom.h> +#include <tqstringlist.h> +#include <tqptrlist.h> +#include <tqvbox.h> +#include <tqsize.h> +#include <tqtimer.h> class QDomDocument; @@ -52,15 +52,15 @@ class QDomDocument; #include "projectmanager.h" -QString ProjectInfo::sessionFile() const +TQString ProjectInfo::sessionFile() const { - QString sf = m_projectURL.path(-1); + TQString sf = m_projectURL.path(-1); sf.truncate(sf.length() - 8); // without ".kdevelop" sf += "kdevses"; // suffix for a KDevelop session file return sf; } -QString ProjectManager::projectDirectory( const QString& path, bool absolute ) { +TQString ProjectManager::projectDirectory( const TQString& path, bool absolute ) { if(absolute) return path; KURL url(ProjectManager::getInstance()->projectFile(), path); @@ -94,14 +94,14 @@ void ProjectManager::createActions( KActionCollection* ac ) KAction *action; action = new KAction(i18n("&Open Project..."), "project_open", 0, - this, SLOT(slotOpenProject()), + this, TQT_SLOT(slotOpenProject()), ac, "project_open"); action->setToolTip( i18n("Open project")); action->setWhatsThis(i18n("<b>Open project</b><p>Opens a KDevelop3 or KDevelop2 project.")); m_openRecentProjectAction = new KRecentFilesAction(i18n("Open &Recent Project"), 0, - this, SLOT(loadProject(const KURL &)), + this, TQT_SLOT(loadProject(const KURL &)), ac, "project_open_recent"); m_openRecentProjectAction->setToolTip(i18n("Open recent project")); m_openRecentProjectAction->setWhatsThis(i18n("<b>Open recent project</b><p>Opens recently opened project.")); @@ -109,14 +109,14 @@ void ProjectManager::createActions( KActionCollection* ac ) m_closeProjectAction = new KAction(i18n("C&lose Project"), "fileclose",0, - this, SLOT(closeProject()), + this, TQT_SLOT(closeProject()), ac, "project_close"); m_closeProjectAction->setEnabled(false); m_closeProjectAction->setToolTip(i18n("Close project")); m_closeProjectAction->setWhatsThis(i18n("<b>Close project</b><p>Closes the current project.")); m_projectOptionsAction = new KAction(i18n("Project &Options"), "configure", 0, - this, SLOT(slotProjectOptions()), + this, TQT_SLOT(slotProjectOptions()), ac, "project_options" ); m_projectOptionsAction->setToolTip(i18n("Project options")); m_projectOptionsAction->setWhatsThis(i18n("<b>Project options</b><p>Lets you customize project options.")); @@ -127,7 +127,7 @@ void ProjectManager::slotOpenProject() { KConfig *config = kapp->config(); config->setGroup("General Options"); - QString defaultProjectsDir = config->readPathEntry("DefaultProjectsDir", QDir::homeDirPath()+"/"); + TQString defaultProjectsDir = config->readPathEntry("DefaultProjectsDir", TQDir::homeDirPath()+"/"); KURL url = KFileDialog::getOpenURL(defaultProjectsDir, i18n("*.kdevelop|KDevelop 3 Project Files\n" @@ -149,9 +149,9 @@ void ProjectManager::slotProjectOptions() KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, TopLevel::getInstance()->main(), "project options dialog"); - QVBox *box = dlg.addVBoxPage( i18n("General"), i18n("General"), BarIcon( "kdevelop", KIcon::SizeMedium ) ); + TQVBox *box = dlg.addVBoxPage( i18n("General"), i18n("General"), BarIcon( "kdevelop", KIcon::SizeMedium ) ); GeneralInfoWidget *g = new GeneralInfoWidget(*API::getInstance()->projectDom(), box, "general informations widget"); - connect (&dlg, SIGNAL(okClicked()), g, SLOT(accept())); + connect (&dlg, TQT_SIGNAL(okClicked()), g, TQT_SLOT(accept())); KConfig *config = kapp->config(); config->setGroup("Project Settings Dialog"); @@ -191,7 +191,7 @@ void ProjectManager::loadDefaultProject() { KConfig *config = kapp->config(); config->setGroup("General Options"); - QString project = config->readPathEntry("Last Project"); + TQString project = config->readPathEntry("Last Project"); bool readProject = config->readBoolEntry("Read Last Project On Startup", true); if (!project.isEmpty() && readProject) { @@ -208,8 +208,8 @@ bool ProjectManager::loadProject(const KURL &projectURL) if (url.isLocalFile()) { - QDir dir(url.path()); - QString can_path = dir.canonicalPath(); + TQDir dir(url.path()); + TQString can_path = dir.canonicalPath(); //if the directory doesn't exist, the returned string is null which confuses the user later on. so better short-cut here if(can_path.isNull()) return false; @@ -221,7 +221,7 @@ bool ProjectManager::loadProject(const KURL &projectURL) if( projectLoaded() && url.path() == projectFile().path() ) { if (KMessageBox::questionYesNo(TopLevel::getInstance()->main(), - i18n("Are you sure you want to reopen the current project?"), QString::null, i18n("Reopen"), i18n("Do Not Reopen")) == KMessageBox::No) + i18n("Are you sure you want to reopen the current project?"), TQString::null, i18n("Reopen"), i18n("Do Not Reopen")) == KMessageBox::No) return false; } @@ -239,7 +239,7 @@ bool ProjectManager::loadProject(const KURL &projectURL) m_info = new ProjectInfo; m_info->m_projectURL = url; - QTimer::singleShot( 0, this, SLOT(slotLoadProject()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(slotLoadProject()) ); // no one cares about this value return true; @@ -352,14 +352,14 @@ bool ProjectManager::closeProject( bool exiting ) bool ProjectManager::loadProjectFile() { - QString path; + TQString path; if (!KIO::NetAccess::download(m_info->m_projectURL, path, 0)) { KMessageBox::sorry(TopLevel::getInstance()->main(), i18n("Could not read project file: %1").arg(m_info->m_projectURL.prettyURL())); return false; } - QFile fin(path); + TQFile fin(path); if (!fin.open(IO_ReadOnly)) { KMessageBox::sorry(TopLevel::getInstance()->main(), @@ -368,7 +368,7 @@ bool ProjectManager::loadProjectFile() } int errorLine, errorCol; - QString errorMsg; + TQString errorMsg; if (!m_info->m_document.setContent(&fin, &errorMsg, &errorLine, &errorCol)) { KMessageBox::sorry(TopLevel::getInstance()->main(), @@ -401,17 +401,17 @@ bool ProjectManager::saveProjectFile() Q_ASSERT( API::getInstance()->projectDom() ); if (m_info->m_projectURL.isLocalFile()) { - QFile fout(m_info->m_projectURL.path()); + TQFile fout(m_info->m_projectURL.path()); if( !fout.open(IO_WriteOnly) ) { KMessageBox::sorry(TopLevel::getInstance()->main(), i18n("Could not write the project file.")); return false; } - QTextStream stream(&fout); + TQTextStream stream(&fout); API::getInstance()->projectDom()->save(stream, 2); fout.close(); } else { - KTempFile fout(QString::fromLatin1("kdevelop3")); + KTempFile fout(TQString::fromLatin1("kdevelop3")); fout.setAutoDelete(true); if (fout.status() != 0) { KMessageBox::sorry(TopLevel::getInstance()->main(), i18n("Could not write the project file.")); @@ -425,18 +425,18 @@ bool ProjectManager::saveProjectFile() return true; } -static QString getAttribute(QDomElement elem, QString attr) +static TQString getAttribute(TQDomElement elem, TQString attr) { - QDomElement el = elem.namedItem(attr).toElement(); + TQDomElement el = elem.namedItem(attr).toElement(); return el.firstChild().toText().data(); } -static void getAttributeList(QDomElement elem, QString attr, QString tag, QStringList &list) +static void getAttributeList(TQDomElement elem, TQString attr, TQString tag, TQStringList &list) { list.clear(); - QDomElement el = elem.namedItem(attr).toElement(); - QDomElement item = el.firstChild().toElement(); + TQDomElement el = elem.namedItem(attr).toElement(); + TQDomElement item = el.firstChild().toElement(); while (!item.isNull()) { if (item.tagName() == tag) @@ -447,8 +447,8 @@ static void getAttributeList(QDomElement elem, QString attr, QString tag, QStrin void ProjectManager::getGeneralInfo() { - QDomElement docEl = m_info->m_document.documentElement(); - QDomElement generalEl = docEl.namedItem("general").toElement(); + TQDomElement docEl = m_info->m_document.documentElement(); + TQDomElement generalEl = docEl.namedItem("general").toElement(); m_info->m_projectPlugin = getAttribute(generalEl, "projectmanagement"); m_info->m_vcsPlugin = getAttribute(generalEl, "versioncontrol"); @@ -457,8 +457,8 @@ void ProjectManager::getGeneralInfo() if( m_info->m_projectName.isEmpty() ) { m_info->m_projectName = m_info->m_projectURL.filename(); - m_info->m_projectName = m_info->m_projectName.left(m_info->m_projectName.length()-QString(".kdevelop").length()); - QDomElement prjname = m_info->m_document.createElement("projectname"); + m_info->m_projectName = m_info->m_projectName.left(m_info->m_projectName.length()-TQString(".kdevelop").length()); + TQDomElement prjname = m_info->m_document.createElement("projectname"); prjname.appendChild( m_info->m_document.createTextNode( m_info->m_projectName) ); generalEl.appendChild( prjname ); } @@ -468,7 +468,7 @@ void ProjectManager::getGeneralInfo() //FIXME: adymo: workaround for those project templates without "profile" element // m_info->m_profileName = getAttribute(generalEl, "profile"); - QDomElement el = generalEl.namedItem("profile").toElement(); + TQDomElement el = generalEl.namedItem("profile").toElement(); if (el.isNull()) // m_info->m_profileName = profileByAttributes(m_info->m_language, m_info->m_keywords); m_info->m_profileName = Settings::profileByAttributes(m_info->m_language, m_info->m_keywords); @@ -502,10 +502,10 @@ bool ProjectManager::loadProjectPart() API::getInstance()->setProject( projectPart ); - QDomDocument& dom = *API::getInstance()->projectDom(); - QString path = DomUtil::readEntry(dom,"/general/projectdirectory", "."); + TQDomDocument& dom = *API::getInstance()->projectDom(); + TQString path = DomUtil::readEntry(dom,"/general/projectdirectory", "."); bool absolute = DomUtil::readBoolEntry(dom,"/general/absoluteprojectpath",false); - QString projectDir = projectDirectory( path, absolute ); + TQString projectDir = projectDirectory( path, absolute ); kdDebug(9000) << "projectDir: " << projectDir << " projectName: " << m_info->m_projectName << endl; projectPart->openProject(projectDir, m_info->m_projectName); @@ -525,7 +525,7 @@ void ProjectManager::unloadProjectPart() API::getInstance()->setProject(0); } -bool ProjectManager::loadLanguageSupport(const QString& lang) +bool ProjectManager::loadLanguageSupport(const TQString& lang) { kdDebug(9000) << "Looking for language support for " << lang << endl; @@ -536,8 +536,8 @@ bool ProjectManager::loadLanguageSupport(const QString& lang) } KTrader::OfferList languageSupportOffers = - KTrader::self()->query(QString::fromLatin1("KDevelop/LanguageSupport"), - QString::fromLatin1("[X-KDevelop-Language] == '%1' and [X-KDevelop-Version] == %2").arg(lang).arg(KDEVELOP_PLUGIN_VERSION)); + KTrader::self()->query(TQString::fromLatin1("KDevelop/LanguageSupport"), + TQString::fromLatin1("[X-KDevelop-Language] == '%1' and [X-KDevelop-Version] == %2").arg(lang).arg(KDEVELOP_PLUGIN_VERSION)); if (languageSupportOffers.isEmpty()) { KMessageBox::sorry(TopLevel::getInstance()->main(), @@ -594,9 +594,9 @@ KURL ProjectManager::projectFile() const return m_info->m_projectURL; } -QString ProjectManager::projectName() const +TQString ProjectManager::projectName() const { - if (!m_info) return QString(); + if (!m_info) return TQString(); return m_info->m_projectName; } @@ -618,34 +618,34 @@ bool ProjectManager::loadKDevelop2Project( const KURL & url ) return false; } - QString cmd = KGlobal::dirs()->findExe( "kdevprj2kdevelop" ); + TQString cmd = KGlobal::dirs()->findExe( "kdevprj2kdevelop" ); if (cmd.isEmpty()) { KMessageBox::sorry(0, i18n("You do not have 'kdevprj2kdevelop' installed.")); return false; } - QFileInfo fileInfo( url.path() ); + TQFileInfo fileInfo( url.path() ); KShellProcess proc( "/bin/sh" ); proc.setWorkingDirectory( fileInfo.dirPath(true) ); proc << "perl" << cmd << KShellProcess::quote( url.path() ); proc.start( KProcess::Block ); - QString projectFile = fileInfo.dirPath( true ) + "/" + fileInfo.baseName() + ".kdevelop"; + TQString projectFile = fileInfo.dirPath( true ) + "/" + fileInfo.baseName() + ".kdevelop"; return loadProject( KURL(projectFile) ); } -// QString ProjectManager::profileByAttributes(const QString &language, const QStringList &keywords) +// TQString ProjectManager::profileByAttributes(const TQString &language, const TQStringList &keywords) // { // KConfig config(locate("data", "kdevelop/profiles/projectprofiles")); // config.setGroup(language); // -// QStringList profileKeywords = QStringList::split("/", "Empty"); +// TQStringList profileKeywords = TQStringList::split("/", "Empty"); // if (config.hasKey("Keywords")) // profileKeywords = config.readListEntry("Keywords"); // // int idx = 0; -// for (QStringList::const_iterator it = profileKeywords.constBegin(); +// for (TQStringList::const_iterator it = profileKeywords.constBegin(); // it != profileKeywords.constEnd(); ++it) // { // if (keywords.contains(*it)) @@ -655,7 +655,7 @@ bool ProjectManager::loadKDevelop2Project( const KURL & url ) // } // } // -// QStringList profiles; +// TQStringList profiles; // if (config.hasKey("Profiles")) // { // profiles = config.readListEntry("Profiles"); diff --git a/src/projectmanager.h b/src/projectmanager.h index 1cfb07d6..15ac4644 100644 --- a/src/projectmanager.h +++ b/src/projectmanager.h @@ -2,9 +2,9 @@ #define __PROJECTMANAGER_H__ -#include <qstring.h> -#include <qobject.h> -#include <qdict.h> +#include <tqstring.h> +#include <tqobject.h> +#include <tqdict.h> #include <kxmlguiclient.h> @@ -24,20 +24,20 @@ class ProjectInfo { public: KURL m_projectURL; - QDomDocument m_document; - QString m_profileName; - QString m_projectName; - QString m_projectPlugin, m_language, m_activeLanguage, m_vcsPlugin; - QStringList m_ignoreParts, m_keywords; + TQDomDocument m_document; + TQString m_profileName; + TQString m_projectName; + TQString m_projectPlugin, m_language, m_activeLanguage, m_vcsPlugin; + TQStringList m_ignoreParts, m_keywords; - QString sessionFile() const; + TQString sessionFile() const; }; /** Project manager. Loads and unloads projects. */ -class ProjectManager : public QObject, public KXMLGUIClient +class ProjectManager : public TQObject, public KXMLGUIClient { Q_OBJECT @@ -45,7 +45,7 @@ public: ~ProjectManager(); - static QString projectDirectory( const QString& path, bool absolute ); + static TQString projectDirectory( const TQString& path, bool absolute ); static ProjectManager *getInstance(); @@ -56,7 +56,7 @@ public: bool projectLoaded() const; KURL projectFile() const; - QString projectName() const; + TQString projectName() const; void createActions( KActionCollection* ac ); @@ -87,10 +87,10 @@ private: bool loadProjectPart(); void unloadProjectPart(); - bool loadLanguageSupport(const QString& lang); + bool loadLanguageSupport(const TQString& lang); void unloadLanguageSupport(); -// QString profileByAttributes(const QString &language, const QStringList &keywords); +// TQString profileByAttributes(const TQString &language, const TQStringList &keywords); ProjectInfo *m_info; @@ -102,9 +102,9 @@ private: ProjectSession* m_pProjectSession; KDevPlugin *m_vcsPlugin; - QString m_vcsName; + TQString m_vcsName; - QString m_oldProfileName; + TQString m_oldProfileName; }; diff --git a/src/projectsession.cpp b/src/projectsession.cpp index be3ec4a1..1b09ca71 100644 --- a/src/projectsession.cpp +++ b/src/projectsession.cpp @@ -15,10 +15,10 @@ * * ***************************************************************************/ -#include <qdom.h> -#include <qptrlist.h> -#include <qfile.h> -#include <qtimer.h> +#include <tqdom.h> +#include <tqptrlist.h> +#include <tqfile.h> +#include <tqtimer.h> #include <kparts/part.h> #include <kurl.h> @@ -58,21 +58,21 @@ void ProjectSession::initXMLTree() // or a new project gets generated (which doesn't have a kdevses file // either as the project has never been closed before opening it). domdoc.clear(); - QDomDocument doc("KDevPrjSession"); + TQDomDocument doc("KDevPrjSession"); domdoc=doc; domdoc.appendChild( domdoc.createProcessingInstruction( "xml", "version=\"1.0\" encoding=\"UTF-8\"" ) ); // KDevPrjSession is the root element of the XML file - QDomElement session = domdoc.documentElement(); + TQDomElement session = domdoc.documentElement(); session = domdoc.createElement("KDevPrjSession"); domdoc.appendChild( session); } //--------------------------------------------------------------------------- -bool ProjectSession::restoreFromFile( const QString & sessionFileName, const QValueList< KDevPlugin * > plugins ) +bool ProjectSession::restoreFromFile( const TQString & sessionFileName, const TQValueList< KDevPlugin * > plugins ) { bool bFileOpenOK = true; - QFile f(sessionFileName); + TQFile f(sessionFileName); if ( f.open(IO_ReadOnly) ) { // file opened successfully bool ok = domdoc.setContent( &f); f.close(); @@ -96,7 +96,7 @@ bool ProjectSession::restoreFromFile( const QString & sessionFileName, const QVa return false; } - QDomElement session = domdoc.documentElement(); + TQDomElement session = domdoc.documentElement(); // read the information about the mainframe widget if (bFileOpenOK) { @@ -104,13 +104,13 @@ bool ProjectSession::restoreFromFile( const QString & sessionFileName, const QVa } // now also let the plugins load their session stuff - QDomElement pluginListEl = session.namedItem("pluginList").toElement(); - QValueList<KDevPlugin*>::ConstIterator it = plugins.begin(); + TQDomElement pluginListEl = session.namedItem("pluginList").toElement(); + TQValueList<KDevPlugin*>::ConstIterator it = plugins.begin(); while( it != plugins.end() ) { KDevPlugin* pPlugin = (*it); - QString pluginName = pPlugin->instance()->instanceName(); - QDomElement pluginEl = pluginListEl.namedItem(pluginName).toElement(); + TQString pluginName = pPlugin->instance()->instanceName(); + TQDomElement pluginEl = pluginListEl.namedItem(pluginName).toElement(); if (!pluginEl.isNull()) { // now plugin, load what you find! pPlugin->restorePartialProjectSession(&pluginEl); @@ -118,15 +118,15 @@ bool ProjectSession::restoreFromFile( const QString & sessionFileName, const QVa ++it; } - QTimer::singleShot( 0, this, SLOT(loadDocument()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(loadDocument()) ); return true; } //--------------------------------------------------------------------------- -void ProjectSession::recreateDocs(QDomElement& el) +void ProjectSession::recreateDocs(TQDomElement& el) { -//// QDomElement mainframeEl = el.namedItem("Mainframe").toElement(); +//// TQDomElement mainframeEl = el.namedItem("Mainframe").toElement(); //// bool bMaxMode =initXMLTree() (bool) mainframeEl.attribute("MaximizeMode", "0").toInt(); //// QextMdiMainFrm* pMainWidget = (QextMdiMainFrm*) qApp->mainWidget(); //// pMainWidget->setEnableMaximizedChildFrmMode(bMaxMode); @@ -134,17 +134,17 @@ void ProjectSession::recreateDocs(QDomElement& el) //// pMainWidget->hideViewTaskBar(); // read the information about the documents - QDomElement docsAndViewsEl = el.namedItem("DocsAndViews").toElement(); + TQDomElement docsAndViewsEl = el.namedItem("DocsAndViews").toElement(); int nNrOfDocs = docsAndViewsEl.attribute("NumberOfDocuments", "0").toInt(); // loop over all docs int nDoc = 0; - QDomElement docEl; + TQDomElement docEl; for (docEl = docsAndViewsEl.firstChild().toElement(), nDoc = 0; nDoc < nNrOfDocs; nDoc++, docEl = docEl.nextSibling().toElement()) { // read the document name and type - QString docName = docEl.attribute( "URL", ""); + TQString docName = docEl.attribute( "URL", ""); if (!docName.isEmpty() /* && URL::exists(docName)*/) { KURL url(docName); // create the views of this document, the first view creation will also create the document @@ -163,7 +163,7 @@ void ProjectSession::recreateDocs(QDomElement& el) } //--------------------------------------------------------------------------- -void ProjectSession::recreateViews(KURL& url, QDomElement docEl, bool activate) +void ProjectSession::recreateViews(KURL& url, TQDomElement docEl, bool activate) { // read information about the views int nNrOfViews = docEl.attribute( "NumberOfViews", "0").toInt(); @@ -173,7 +173,7 @@ void ProjectSession::recreateViews(KURL& url, QDomElement docEl, bool activate) if ( nNrOfViews > 0 ) { - QDomElement viewEl = docEl.firstChild().toElement(); + TQDomElement viewEl = docEl.firstChild().toElement(); DocumentData dd; dd.type = viewEl.attribute("Type"); dd.line = viewEl.attribute("line", "0").toInt(); @@ -188,9 +188,9 @@ void ProjectSession::recreateViews(KURL& url, QDomElement docEl, bool activate) // loop over all views of this document int nView = 0; - QDomElement viewEl; - QString viewType; - QString context; + TQDomElement viewEl; + TQString viewType; + TQString context; if (docEl.hasAttribute("context")) { context = docEl.attribute("context"); } @@ -213,7 +213,7 @@ void ProjectSession::recreateViews(KURL& url, QDomElement docEl, bool activate) else { PartController::getInstance()->showDocument(url); } - QDomElement viewPropertiesEl = viewEl.namedItem("AdditionalSettings").toElement(); + TQDomElement viewPropertiesEl = viewEl.namedItem("AdditionalSettings").toElement(); if (!viewPropertiesEl.isNull()) { emit sig_restoreAdditionalViewProperties(url.url(), &viewPropertiesEl); } @@ -230,16 +230,16 @@ void ProjectSession::recreateViews(KURL& url, QDomElement docEl, bool activate) } //--------------------------------------------------------------------------- -bool ProjectSession::saveToFile( const QString & sessionFileName, const QValueList< KDevPlugin * > plugins ) +bool ProjectSession::saveToFile( const TQString & sessionFileName, const TQValueList< KDevPlugin * > plugins ) { - QString section, keyword; - QDomElement session = domdoc.documentElement(); + TQString section, keyword; + TQDomElement session = domdoc.documentElement(); int nDocs = 0; - QString docIdStr; + TQString docIdStr; //// // read the information about the mainframe widget -//// QDomElement mainframeEl = session.namedItem("Mainframe").toElement(); +//// TQDomElement mainframeEl = session.namedItem("Mainframe").toElement(); //// if(mainframeEl.isNull()){ //// mainframeEl=domdoc.createElement("Mainframe"); //// session.appendChild( mainframeEl); @@ -249,22 +249,22 @@ bool ProjectSession::saveToFile( const QString & sessionFileName, const QValueLi // read the information about the documents - QDomElement docsAndViewsEl = session.namedItem("DocsAndViews").toElement(); + TQDomElement docsAndViewsEl = session.namedItem("DocsAndViews").toElement(); if (docsAndViewsEl.isNull()) { docsAndViewsEl = domdoc.createElement("DocsAndViews"); session.appendChild( docsAndViewsEl); } else { // we need to remove the old ones before memorizing the current ones (to avoid merging) - QDomNode n = docsAndViewsEl.firstChild(); + TQDomNode n = docsAndViewsEl.firstChild(); while ( !n.isNull() ) { - QDomNode toBeRemoved = n; + TQDomNode toBeRemoved = n; n = n.nextSibling(); docsAndViewsEl.removeChild(toBeRemoved); } } - QPtrListIterator<KParts::Part> it( *PartController::getInstance()->parts() ); + TQPtrListIterator<KParts::Part> it( *PartController::getInstance()->parts() ); for ( ; it.current(); ++it ) { @@ -272,16 +272,16 @@ bool ProjectSession::saveToFile( const QString & sessionFileName, const QValueLi if (!pReadOnlyPart) continue; - QString url = pReadOnlyPart->url().url(); + TQString url = pReadOnlyPart->url().url(); docIdStr.setNum(nDocs); - QDomElement docEl = domdoc.createElement("Doc" + docIdStr); + TQDomElement docEl = domdoc.createElement("Doc" + docIdStr); docEl.setAttribute( "URL", url); docsAndViewsEl.appendChild( docEl); nDocs++; docEl.setAttribute( "NumberOfViews", 1); - QDomElement viewEl = domdoc.createElement( "View0"); + TQDomElement viewEl = domdoc.createElement( "View0"); docEl.appendChild( viewEl); if ( dynamic_cast<HTMLDocumentationPart*>(pReadOnlyPart) ) @@ -299,7 +299,7 @@ bool ProjectSession::saveToFile( const QString & sessionFileName, const QValueLi } if ( KTextEditor::EncodingInterface * ei = dynamic_cast<KTextEditor::EncodingInterface*>( pReadOnlyPart ) ) { - QString encoding = ei->encoding(); + TQString encoding = ei->encoding(); if ( !encoding.isNull() ) { viewEl.setAttribute( "Encoding", encoding ); @@ -313,10 +313,10 @@ bool ProjectSession::saveToFile( const QString & sessionFileName, const QValueLi } /* - QPtrListIterator<KParts::Part> it( *PartController::getInstance()->parts() ); + TQPtrListIterator<KParts::Part> it( *PartController::getInstance()->parts() ); for ( ; it.current(); ++it ) { -//// QString partName = it.current()->name(); -//// QMessageBox::information(0L,"",partName); +//// TQString partName = it.current()->name(); +//// TQMessageBox::information(0L,"",partName); KParts::ReadOnlyPart* pReadOnlyPart = dynamic_cast<KParts::ReadOnlyPart*>(it.current()); if (!pReadOnlyPart) @@ -325,34 +325,34 @@ bool ProjectSession::saveToFile( const QString & sessionFileName, const QValueLi HTMLDocumentationPart* pDocuPart = dynamic_cast<HTMLDocumentationPart*>(pReadOnlyPart); /// @todo Save relative path for project sharing? - QString url = pReadOnlyPart->url().url(); + TQString url = pReadOnlyPart->url().url(); docIdStr.setNum(nDocs); - QDomElement docEl = domdoc.createElement("Doc" + docIdStr); + TQDomElement docEl = domdoc.createElement("Doc" + docIdStr); docEl.setAttribute( "URL", url); docsAndViewsEl.appendChild( docEl); nDocs++; //// docEl.setAttribute( "Type", "???"); //// // get the view list -//// QPtrList<KWpEditorPartriteView> viewList = pDoc->viewList(); +//// TQPtrList<KWpEditorPartriteView> viewList = pDoc->viewList(); //// // write the number of views //// docEl.setAttribute( "NumberOfViews", viewList.count()); docEl.setAttribute( "NumberOfViews", 1); // loop over all views of this document int nView = 0; //// KWriteView* pView = 0L; - QString viewIdStr; + TQString viewIdStr; //// for (viewList.first(), nView = 0; viewList.current() != 0; viewList.next(), nView++) { //// pView = viewList.current(); //// if (pView != 0L) { viewIdStr.setNum( nView); - QDomElement viewEl = domdoc.createElement( "View"+viewIdStr); + TQDomElement viewEl = domdoc.createElement( "View"+viewIdStr); docEl.appendChild( viewEl); // focus? //// viewEl.setAttribute("Focus", (((CEditWidget*)pView->parentWidget()) == m_pDocViewMan->currentEditView())); viewEl.setAttribute("Type", "???"); - QDomElement viewPropertiesEl = domdoc.createElement("AdditionalSettings"); + TQDomElement viewPropertiesEl = domdoc.createElement("AdditionalSettings"); viewEl.appendChild(viewPropertiesEl); emit sig_saveAdditionalViewProperties(url, &viewPropertiesEl); @@ -375,27 +375,27 @@ bool ProjectSession::saveToFile( const QString & sessionFileName, const QValueLi // now also let the project-related plugins save their session stuff // read the information about the documents - QDomElement pluginListEl = session.namedItem("pluginList").toElement(); + TQDomElement pluginListEl = session.namedItem("pluginList").toElement(); if (pluginListEl.isNull()) { pluginListEl = domdoc.createElement("pluginList"); session.appendChild( pluginListEl); } else { // we need to remove the old ones before memorizing the current ones (to avoid merging) - QDomNode n = pluginListEl.firstChild(); + TQDomNode n = pluginListEl.firstChild(); while ( !n.isNull() ) { - QDomNode toBeRemoved = n; + TQDomNode toBeRemoved = n; n = n.nextSibling(); pluginListEl.removeChild(toBeRemoved); } } - QValueList<KDevPlugin*>::ConstIterator itt = plugins.begin(); + TQValueList<KDevPlugin*>::ConstIterator itt = plugins.begin(); while( itt != plugins.end() ) { KDevPlugin* pPlugin = (*itt); - QString pluginName = pPlugin->instance()->instanceName(); - QDomElement pluginEl = domdoc.createElement(pluginName); + TQString pluginName = pPlugin->instance()->instanceName(); + TQDomElement pluginEl = domdoc.createElement(pluginName); // now plugin, save what you have! pPlugin->savePartialProjectSession(&pluginEl); @@ -409,9 +409,9 @@ bool ProjectSession::saveToFile( const QString & sessionFileName, const QValueLi } // Write it out to the session file on disc - QFile f(sessionFileName); + TQFile f(sessionFileName); if ( f.open(IO_WriteOnly) ) { // file opened successfully - QTextStream t( &f ); // use a text stream + TQTextStream t( &f ); // use a text stream t << domdoc.toCString(); f.close(); } @@ -444,7 +444,7 @@ void ProjectSession::loadDocument( ) _docDataList.pop_front(); loadDocument(); - //QTimer::singleShot( 0, this, SLOT(loadDocument()) ); + //TQTimer::singleShot( 0, this, TQT_SLOT(loadDocument()) ); } } diff --git a/src/projectsession.h b/src/projectsession.h index 60c0b732..38e24883 100644 --- a/src/projectsession.h +++ b/src/projectsession.h @@ -17,10 +17,10 @@ #ifndef _PROJECTSESSION_H_ #define _PROJECTSESSION_H_ -#include <qobject.h> -#include <qdom.h> -#include <qdict.h> -#include <qvaluelist.h> +#include <tqobject.h> +#include <tqdom.h> +#include <tqdict.h> +#include <tqvaluelist.h> class QWidget; class KURL; @@ -41,17 +41,17 @@ public: virtual ~ProjectSession(); /** Opens the .kdevses file and saves the project session in XML format to it. */ - bool saveToFile(const QString& fileName, const QValueList<KDevPlugin*> plugins ); + bool saveToFile(const TQString& fileName, const TQValueList<KDevPlugin*> plugins ); /** Opens the .kdevses file and loads the project session from it. */ - bool restoreFromFile(const QString& fileName, const QValueList<KDevPlugin*> plugins ); + bool restoreFromFile(const TQString& fileName, const TQValueList<KDevPlugin*> plugins ); signals: - void sig_restoreMainWindowProperties(const QDomElement* el); - void sig_saveMainWindowProperties(QDomElement* el); + void sig_restoreMainWindowProperties(const TQDomElement* el); + void sig_saveMainWindowProperties(TQDomElement* el); - void sig_restoreAdditionalViewProperties(const QString& viewName, const QDomElement* el); - void sig_saveAdditionalViewProperties(const QString& viewName, QDomElement* el); + void sig_restoreAdditionalViewProperties(const TQString& viewName, const TQDomElement* el); + void sig_saveAdditionalViewProperties(const TQString& viewName, TQDomElement* el); private slots: /** @@ -61,28 +61,28 @@ private slots: private: /** Restores the part of the project session that concerns to the documents (files). */ - void recreateDocs(QDomElement& el); + void recreateDocs(TQDomElement& el); /** recreates views and their properties of a certain document. */ - void recreateViews(KURL& url, QDomElement docEl, bool activate); + void recreateViews(KURL& url, TQDomElement docEl, bool activate); /** setup a valid XML file. */ void initXMLTree(); // attributes private: /** the XML document object controlling the XML tree. */ - QDomDocument domdoc; + TQDomDocument domdoc; struct DocumentData { DocumentData() : line(0) {} KURL url; int line; - QString type; + TQString type; bool activate; - QString encoding; + TQString encoding; }; - QValueList<DocumentData> _docDataList; + TQValueList<DocumentData> _docDataList; }; diff --git a/src/shellextension.h b/src/shellextension.h index 7f731c1d..1b791b21 100644 --- a/src/shellextension.h +++ b/src/shellextension.h @@ -20,7 +20,7 @@ #ifndef SHELLEXTENSION_H #define SHELLEXTENSION_H -#include <qstring.h> +#include <tqstring.h> class KDialogBase; @@ -48,11 +48,11 @@ public: virtual void acceptGlobalSettingsPage(KDialogBase *dlg) = 0; /**Reimplement to return the name of KXMLGUI resource file for an application.*/ - virtual QString xmlFile() = 0; + virtual TQString xmlFile() = 0; /**Reimplement to set a default profile for the shell. Default profile will be used by a shell if no --profile argument is specified.*/ - virtual QString defaultProfile() = 0; + virtual TQString defaultProfile() = 0; protected: ShellExtension(); diff --git a/src/simplemainwindow.cpp b/src/simplemainwindow.cpp index 59c4d691..df720fa0 100644 --- a/src/simplemainwindow.cpp +++ b/src/simplemainwindow.cpp @@ -19,7 +19,7 @@ ***************************************************************************/ #include "simplemainwindow.h" -#include <qtextedit.h> +#include <tqtextedit.h> #include <kaction.h> #include <kstdaction.h> @@ -57,15 +57,15 @@ #include "editorproxy.h" #include "multibuffer.h" -SimpleMainWindow::SimpleMainWindow(QWidget* parent, const char *name) +SimpleMainWindow::SimpleMainWindow(TQWidget* parent, const char *name) :DMainWindow(parent, name) { resize(800, 600); // starts kdevelop at 800x600 the first time m_mainWindowShare = new MainWindowShare(this); - connect(m_bottomDock, SIGNAL(hidden()), this, SLOT(raiseEditor())); - connect(m_leftDock, SIGNAL(hidden()), this, SLOT(raiseEditor())); - connect(m_rightDock, SIGNAL(hidden()), this, SLOT(raiseEditor())); + connect(m_bottomDock, TQT_SIGNAL(hidden()), this, TQT_SLOT(raiseEditor())); + connect(m_leftDock, TQT_SIGNAL(hidden()), this, TQT_SLOT(raiseEditor())); + connect(m_rightDock, TQT_SIGNAL(hidden()), this, TQT_SLOT(raiseEditor())); } SimpleMainWindow::~ SimpleMainWindow( ) @@ -105,34 +105,34 @@ void SimpleMainWindow::init() i18n("Could Not Find Plugins") ); } - connect(Core::getInstance(), SIGNAL(coreInitialized()), this, SLOT(slotCoreInitialized())); - connect(Core::getInstance(), SIGNAL(projectOpened()), this, SLOT(projectOpened())); - connect(Core::getInstance(), SIGNAL(projectClosed()), this, SLOT(projectClosed())); - connect(Core::getInstance(), SIGNAL(contextMenu(QPopupMenu *, const Context *)), - this, SLOT(contextMenu(QPopupMenu *, const Context *))); - connect(PartController::getInstance(), SIGNAL(partURLChanged(KParts::ReadOnlyPart *)), - this, SLOT(slotPartURLChanged(KParts::ReadOnlyPart * ))); - connect(PartController::getInstance(), SIGNAL(activePartChanged(KParts::Part*)), - this, SLOT(activePartChanged(KParts::Part*))); + connect(Core::getInstance(), TQT_SIGNAL(coreInitialized()), this, TQT_SLOT(slotCoreInitialized())); + connect(Core::getInstance(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(projectOpened())); + connect(Core::getInstance(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(projectClosed())); + connect(Core::getInstance(), TQT_SIGNAL(contextMenu(TQPopupMenu *, const Context *)), + this, TQT_SLOT(contextMenu(TQPopupMenu *, const Context *))); + connect(PartController::getInstance(), TQT_SIGNAL(partURLChanged(KParts::ReadOnlyPart *)), + this, TQT_SLOT(slotPartURLChanged(KParts::ReadOnlyPart * ))); + connect(PartController::getInstance(), TQT_SIGNAL(activePartChanged(KParts::Part*)), + this, TQT_SLOT(activePartChanged(KParts::Part*))); connect(PartController::getInstance(), - SIGNAL(documentChangedState(const KURL &, DocumentState)), - this, SLOT(documentChangedState(const KURL&, DocumentState))); + TQT_SIGNAL(documentChangedState(const KURL &, DocumentState)), + this, TQT_SLOT(documentChangedState(const KURL&, DocumentState))); loadSettings(); } -void SimpleMainWindow::dragEnterEvent( QDragEnterEvent *event ) +void SimpleMainWindow::dragEnterEvent( TQDragEnterEvent *event ) { event->accept(KURLDrag::canDecode(event)); } -void SimpleMainWindow::dropEvent( QDropEvent *event ) +void SimpleMainWindow::dropEvent( TQDropEvent *event ) { slotDropEvent(event); } -void SimpleMainWindow::slotDropEvent( QDropEvent *event ) +void SimpleMainWindow::slotDropEvent( TQDropEvent *event ) { KURL::List list; if ( !KURLDrag::decode( event, list ) ) return; @@ -146,14 +146,14 @@ void SimpleMainWindow::slotDropEvent( QDropEvent *event ) } } -void SimpleMainWindow::contextMenu(QPopupMenu *popupMenu, const Context *context) +void SimpleMainWindow::contextMenu(TQPopupMenu *popupMenu, const Context *context) { int cont = context->type(); m_splitURLs.clear(); if (cont == Context::EditorContext) { KURL url = static_cast<const EditorContext*>(context)->url(); - QWidget *w = widgetForURL(url); + TQWidget *w = widgetForURL(url); if (w && m_widgetTabs[w] && m_widgetTabs[w]->count() > 1) { m_splitURLs.append(url); @@ -210,35 +210,35 @@ void SimpleMainWindow::contextMenu(QPopupMenu *popupMenu, const Context *context } } -void SimpleMainWindow::embedPartView(QWidget *view, const QString &title, const QString &/*toolTip*/) +void SimpleMainWindow::embedPartView(TQWidget *view, const TQString &title, const TQString &/*toolTip*/) { kdDebug() << "SimpleMainWindow::embedPartView: " << view << endl; if (!view ) return; - QString shortName = title; + TQString shortName = title; shortName = shortName.right( shortName.length() - (shortName.findRev('/') +1)); addWidget(view, title); view->show(); } -void SimpleMainWindow::embedSelectView(QWidget *view, const QString &title, const QString &/*toolTip*/) +void SimpleMainWindow::embedSelectView(TQWidget *view, const TQString &title, const TQString &/*toolTip*/) { embedView( DDockWindow::Left, view, title ); } -void SimpleMainWindow::embedOutputView(QWidget *view, const QString &title, const QString &/*toolTip*/) +void SimpleMainWindow::embedOutputView(TQWidget *view, const TQString &title, const TQString &/*toolTip*/) { embedView( DDockWindow::Bottom, view, title ); } -void SimpleMainWindow::embedSelectViewRight(QWidget *view, const QString &title, const QString &/*toolTip*/) +void SimpleMainWindow::embedSelectViewRight(TQWidget *view, const TQString &title, const TQString &/*toolTip*/) { embedView( DDockWindow::Right, view, title ); } -void SimpleMainWindow::embedView( DDockWindow::Position pos, QWidget * view, const QString & title ) +void SimpleMainWindow::embedView( DDockWindow::Position pos, TQWidget * view, const TQString & title ) { if ( !hasDockWidget( view ) ) { @@ -247,12 +247,12 @@ void SimpleMainWindow::embedView( DDockWindow::Position pos, QWidget * view, con } } -DDockWindow::Position SimpleMainWindow::recallToolViewPosition( const QString & name, DDockWindow::Position defaultPos ) +DDockWindow::Position SimpleMainWindow::recallToolViewPosition( const TQString & name, DDockWindow::Position defaultPos ) { KConfig * config = kapp->config(); config->setGroup( "DToolDockPosition" ); - QString position = config->readEntry( name ); + TQString position = config->readEntry( name ); if ( name == "unknown" ) { @@ -266,12 +266,12 @@ DDockWindow::Position SimpleMainWindow::recallToolViewPosition( const QString & return defaultPos; } -void SimpleMainWindow::rememberToolViewPosition( const QString & name, DDockWindow::Position pos ) +void SimpleMainWindow::rememberToolViewPosition( const TQString & name, DDockWindow::Position pos ) { KConfig * config = kapp->config(); config->setGroup( "DToolDockPosition" ); - QString position = "unknown"; + TQString position = "unknown"; switch( pos ) { @@ -291,7 +291,7 @@ void SimpleMainWindow::rememberToolViewPosition( const QString & name, DDockWind } -void SimpleMainWindow::removeView(QWidget *view) +void SimpleMainWindow::removeView(TQWidget *view) { if (!view) return; @@ -307,7 +307,7 @@ void SimpleMainWindow::removeView(QWidget *view) removeWidget(view); } -void SimpleMainWindow::setViewAvailable(QWidget *pView, bool bEnabled) +void SimpleMainWindow::setViewAvailable(TQWidget *pView, bool bEnabled) { DDockWindow *dock; if (hasDockWidget(pView)) @@ -318,7 +318,7 @@ void SimpleMainWindow::setViewAvailable(QWidget *pView, bool bEnabled) bEnabled ? dock->showWidget(pView) : dock->hideWidget(pView); } -void SimpleMainWindow::raiseView(QWidget *view) +void SimpleMainWindow::raiseView(TQWidget *view) { //adymo: a workaround to make editor wrappers work: //editor view is passed to this function but the ui library knows only @@ -330,7 +330,7 @@ void SimpleMainWindow::raiseView(QWidget *view) { // kdDebug() << "parent is editor wrapper: " << // static_cast<EditorWrapper*>(view->parent()) << endl; - view = (QWidget*)view->parent(); + view = (TQWidget*)view->parent(); } if (hasDockWidget(view)) @@ -342,7 +342,7 @@ void SimpleMainWindow::raiseView(QWidget *view) m_widgetTabs[view]->showPage(view); } -void SimpleMainWindow::lowerView(QWidget * view) +void SimpleMainWindow::lowerView(TQWidget * view) { if (!hasDockWidget(view)) return; @@ -368,7 +368,7 @@ void SimpleMainWindow::saveSettings( ) ProjectManager::getInstance()->saveSettings(); saveMainWindowSettings(config, "SimpleMainWindow"); - QMap<QWidget*, DDockWindow::Position>::iterator it = m_docks.begin(); + TQMap<TQWidget*, DDockWindow::Position>::iterator it = m_docks.begin(); while ( it != m_docks.end() ) { if ( !strcmp(it.key()->name(), "unnamed") ) @@ -383,11 +383,11 @@ void SimpleMainWindow::saveSettings( ) DMainWindow::saveSettings(); } -void SimpleMainWindow::setCurrentDocumentCaption( const QString &caption ) +void SimpleMainWindow::setCurrentDocumentCaption( const TQString &caption ) { if( !PartController::getInstance()->activePart() ) return; - if (QWidget *widget = EditorProxy::getInstance()->topWidgetForPart(PartController::getInstance()->activePart())) + if (TQWidget *widget = EditorProxy::getInstance()->topWidgetForPart(PartController::getInstance()->activePart())) { widget->setCaption(caption); } @@ -402,65 +402,65 @@ void SimpleMainWindow::createFramework() { PartController::createInstance( this ); - connect(PartController::getInstance(), SIGNAL(activePartChanged(KParts::Part*)), - this, SLOT(createGUI(KParts::Part*))); + connect(PartController::getInstance(), TQT_SIGNAL(activePartChanged(KParts::Part*)), + this, TQT_SLOT(createGUI(KParts::Part*))); } void SimpleMainWindow::createActions() { m_raiseEditor = new KAction(i18n("Raise &Editor"), ALT+Key_C, - this, SLOT(raiseEditor()), actionCollection(), "raise_editor"); + this, TQT_SLOT(raiseEditor()), actionCollection(), "raise_editor"); m_raiseEditor->setToolTip(i18n("Raise editor")); m_raiseEditor->setWhatsThis(i18n("<b>Raise editor</b><p>Focuses the editor.")); m_lowerAllDocks = new KAction(i18n("Lower All Docks"), CTRL+SHIFT+Key_C, - this, SLOT(lowerAllDocks()), actionCollection(), "lower_all_docks"); + this, TQT_SLOT(lowerAllDocks()), actionCollection(), "lower_all_docks"); new KAction(i18n("Switch to next TabWidget"), 0, this, - SLOT(switchToNextTabWidget()), actionCollection(), "switch_to_next_tabwidget" ); + TQT_SLOT(switchToNextTabWidget()), actionCollection(), "switch_to_next_tabwidget" ); m_splitHor = new KAction(i18n("Split &Horizontal"), CTRL+SHIFT+Key_T, - this, SLOT(slotSplitHorizontalBase()), actionCollection(), "split_h"); + this, TQT_SLOT(slotSplitHorizontalBase()), actionCollection(), "split_h"); m_splitHor->setIcon("view_top_bottom"); m_splitVer = new KAction(i18n("Split &Vertical"), CTRL+SHIFT+Key_L, - this, SLOT(slotSplitVerticalBase()), actionCollection(), "split_v"); + this, TQT_SLOT(slotSplitVerticalBase()), actionCollection(), "split_v"); m_splitVer->setIcon("view_left_right"); m_splitHor1 = new KAction(i18n("Split &Horizontal"), 0, - this, SLOT(slotSplitHorizontal()), actionCollection(), "split_h1"); + this, TQT_SLOT(slotSplitHorizontal()), actionCollection(), "split_h1"); m_splitHor1->setIcon("view_top_bottom"); m_splitVer1 = new KAction(i18n("Split &Vertical"), 0, - this, SLOT(slotSplitVertical()), actionCollection(), "split_v1"); + this, TQT_SLOT(slotSplitVertical()), actionCollection(), "split_v1"); m_splitVer1->setIcon("view_left_right"); m_splitHor2 = new KAction(i18n("Split &Horizontal and Open"), 0, - this, SLOT(slotSplitHorizontal()), actionCollection(), "split_h2"); + this, TQT_SLOT(slotSplitHorizontal()), actionCollection(), "split_h2"); m_splitHor2->setIcon("view_top_bottom"); m_splitVer2 = new KAction(i18n("Split &Vertical and Open"), 0, - this, SLOT(slotSplitVertical()), actionCollection(), "split_v2"); + this, TQT_SLOT(slotSplitVertical()), actionCollection(), "split_v2"); m_splitVer2->setIcon("view_left_right"); m_raiseLeftDock = new KAction(i18n("Switch Left Dock"), CTRL+SHIFT+ALT+Key_L, - this, SLOT(raiseLeftDock()), actionCollection(), "switch_left_dock"); + this, TQT_SLOT(raiseLeftDock()), actionCollection(), "switch_left_dock"); m_raiseRightDock = new KAction(i18n("Switch Right Dock"), CTRL+SHIFT+ALT+Key_R, - this, SLOT(raiseRightDock()), actionCollection(), "switch_right_dock"); + this, TQT_SLOT(raiseRightDock()), actionCollection(), "switch_right_dock"); m_raiseBottomDock = new KAction(i18n("Switch Bottom Dock"), CTRL+SHIFT+ALT+Key_B, - this, SLOT(raiseBottomDock()), actionCollection(), "switch_bottom_dock"); + this, TQT_SLOT(raiseBottomDock()), actionCollection(), "switch_bottom_dock"); - KStdAction::configureToolbars(this, SLOT(configureToolbars()), + KStdAction::configureToolbars(this, TQT_SLOT(configureToolbars()), actionCollection(), "set_configure_toolbars"); m_mainWindowShare->createActions(); - connect(m_mainWindowShare, SIGNAL(gotoNextWindow()), this, SLOT(gotoNextWindow())); - connect(m_mainWindowShare, SIGNAL(gotoPreviousWindow()), this, SLOT(gotoPreviousWindow())); - connect(m_mainWindowShare, SIGNAL(gotoFirstWindow()), this, SLOT(gotoFirstWindow())); - connect(m_mainWindowShare, SIGNAL(gotoLastWindow()), this, SLOT(gotoLastWindow())); + connect(m_mainWindowShare, TQT_SIGNAL(gotoNextWindow()), this, TQT_SLOT(gotoNextWindow())); + connect(m_mainWindowShare, TQT_SIGNAL(gotoPreviousWindow()), this, TQT_SLOT(gotoPreviousWindow())); + connect(m_mainWindowShare, TQT_SIGNAL(gotoFirstWindow()), this, TQT_SLOT(gotoFirstWindow())); + connect(m_mainWindowShare, TQT_SIGNAL(gotoLastWindow()), this, TQT_SLOT(gotoLastWindow())); } void SimpleMainWindow::raiseEditor() @@ -522,12 +522,12 @@ void SimpleMainWindow::slotCoreInitialized() void SimpleMainWindow::projectOpened() { - setCaption(QString::null); + setCaption(TQString::null); } void SimpleMainWindow::slotPartURLChanged(KParts::ReadOnlyPart *part) { - if (QWidget *widget = EditorProxy::getInstance()->topWidgetForPart(part)) + if (TQWidget *widget = EditorProxy::getInstance()->topWidgetForPart(part)) { kdDebug() << "new caption for widget: " << part->url().fileName() << endl; widget->setCaption(part->url().fileName()); @@ -537,7 +537,7 @@ void SimpleMainWindow::slotPartURLChanged(KParts::ReadOnlyPart *part) void SimpleMainWindow::documentChangedState(const KURL &url, DocumentState state) { - QWidget * widget = EditorProxy::getInstance()->topWidgetForPart( + TQWidget * widget = EditorProxy::getInstance()->topWidgetForPart( PartController::getInstance()->partForURL(url)); kdDebug() << "SimpleMainWindow::documentChangedState: " << widget << endl; if (widget) @@ -558,7 +558,7 @@ void SimpleMainWindow::documentChangedState(const KURL &url, DocumentState state if (m_showIconsOnTabs) widget->setIcon(SmallIcon("kdevelop", isize)); else - widget->setIcon(QPixmap()); + widget->setIcon(TQPixmap()); break; case Modified: widget->setIcon(SmallIcon("filesave", isize)); @@ -577,7 +577,7 @@ void SimpleMainWindow::documentChangedState(const KURL &url, DocumentState state void SimpleMainWindow::closeTab() { // actionCollection()->action("file_close")->activate(); - if (sender()->isA("QToolButton") && sender()->parent()->isA("DTabWidget")) + if (sender()->isA("TQToolButton") && sender()->parent()->isA("DTabWidget")) { DTabWidget *tab = (DTabWidget*)sender()->parent(); if (tab && tab->currentPage()) @@ -585,9 +585,9 @@ void SimpleMainWindow::closeTab() } } -void SimpleMainWindow::tabContext(QWidget *w, const QPoint &p) +void SimpleMainWindow::tabContext(TQWidget *w, const TQPoint &p) { - DTabWidget *tabWidget = static_cast<DTabWidget*>(const_cast<QObject*>(sender())); + DTabWidget *tabWidget = static_cast<DTabWidget*>(const_cast<TQObject*>(sender())); if (!tabWidget) return; @@ -595,11 +595,11 @@ void SimpleMainWindow::tabContext(QWidget *w, const QPoint &p) tabMenu.insertTitle(tabWidget->tabLabel(w)); //Find the document on whose tab the user clicked - m_currentTabURL = QString::null; - QPtrListIterator<KParts::Part> it(*PartController::getInstance()->parts()); + m_currentTabURL = TQString::null; + TQPtrListIterator<KParts::Part> it(*PartController::getInstance()->parts()); while (KParts::Part* part = it.current()) { - QWidget *top_widget = EditorProxy::getInstance()->topWidgetForPart(part); + TQWidget *top_widget = EditorProxy::getInstance()->topWidgetForPart(part); if (top_widget == w) { if (KParts::ReadOnlyPart *ro_part = dynamic_cast<KParts::ReadOnlyPart*>(part)) @@ -633,7 +633,7 @@ void SimpleMainWindow::tabContext(QWidget *w, const QPoint &p) ++it; } - connect(&tabMenu, SIGNAL(activated(int)), this, SLOT(tabContextActivated(int))); + connect(&tabMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(tabContextActivated(int))); tabMenu.exec(p); } @@ -668,7 +668,7 @@ void SimpleMainWindow::configureToolbars() { saveMainWindowSettings(KGlobal::config(), "SimpleMainWindow"); KEditToolbar dlg(factory()); - connect(&dlg, SIGNAL(newToolbarConfig()), this, SLOT(slotNewToolbarConfig())); + connect(&dlg, TQT_SIGNAL(newToolbarConfig()), this, TQT_SLOT(slotNewToolbarConfig())); dlg.exec(); } @@ -693,13 +693,13 @@ bool SimpleMainWindow::queryExit() void SimpleMainWindow::setupWindowMenu() { // get the xmlgui created one instead - m_windowMenu = static_cast<QPopupMenu*>(main()->child("window", "KPopupMenu")); + m_windowMenu = static_cast<TQPopupMenu*>(main()->child("window", "KPopupMenu")); if (!m_windowMenu) { kdDebug(9000) << "Couldn't find the XMLGUI window menu. Creating new." << endl; - m_windowMenu = new QPopupMenu(main(), "window"); + m_windowMenu = new TQPopupMenu(main(), "window"); menuBar()->insertItem(i18n("&Window"), m_windowMenu); } @@ -707,13 +707,13 @@ void SimpleMainWindow::setupWindowMenu() actionCollection()->action("file_close_all")->plug(m_windowMenu); actionCollection()->action("file_closeother")->plug(m_windowMenu); - QObject::connect(m_windowMenu, SIGNAL(activated(int)), this, SLOT(openURL(int))); - QObject::connect(m_windowMenu, SIGNAL(aboutToShow()), this, SLOT(fillWindowMenu())); + TQObject::connect(m_windowMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(openURL(int))); + TQObject::connect(m_windowMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(fillWindowMenu())); } void SimpleMainWindow::openURL(int w) { - QValueList<QPair<int, KURL> >::ConstIterator it = m_windowList.begin(); + TQValueList<QPair<int, KURL> >::ConstIterator it = m_windowList.begin(); while (it != m_windowList.end()) { if ((*it).first == w) @@ -732,7 +732,7 @@ void SimpleMainWindow::openURL(int w) void SimpleMainWindow::fillWindowMenu() { // clear menu - QValueList< QPair< int, KURL > >::ConstIterator it = m_windowList.begin(); + TQValueList< QPair< int, KURL > >::ConstIterator it = m_windowList.begin(); while (it != m_windowList.end()) { m_windowMenu->removeItem( (*it).first ); @@ -741,8 +741,8 @@ void SimpleMainWindow::fillWindowMenu() int temp = 0; - QMap<QString, KURL> map; - QStringList string_list; + TQMap<TQString, KURL> map; + TQStringList string_list; KURL::List list = PartController::getInstance()->openURLs(); KURL::List::Iterator itt = list.begin(); while (itt != list.end()) @@ -765,7 +765,7 @@ void SimpleMainWindow::fillWindowMenu() while (itt != list.end()) { - temp = m_windowMenu->insertItem( i < 10 ? QString("&%1 %2").arg(i).arg((*itt).fileName()) : (*itt).fileName() ); + temp = m_windowMenu->insertItem( i < 10 ? TQString("&%1 %2").arg(i).arg((*itt).fileName()) : (*itt).fileName() ); m_windowList << qMakePair(temp, *itt); ++i; ++itt; @@ -824,11 +824,11 @@ void SimpleMainWindow::openDocumentsAfterSplit(DTabWidget *tab) else { PartController::getInstance()->activatePart( part ); - QWidget *inTab = widgetForURL(*it); + TQWidget *inTab = widgetForURL(*it); if (inTab) { DTabWidget *oldTab = m_widgetTabs[inTab]; - QString title = oldTab->tabLabel(inTab); + TQString title = oldTab->tabLabel(inTab); removeWidget(inTab); addWidget(tab, inTab, title); } @@ -838,34 +838,34 @@ void SimpleMainWindow::openDocumentsAfterSplit(DTabWidget *tab) } } -QWidget *SimpleMainWindow::widgetForURL(KURL url) +TQWidget *SimpleMainWindow::widgetForURL(KURL url) { KParts::ReadOnlyPart *part = PartController::getInstance()->partForURL(url); return widgetInTab( part ? part->widget() : 0 ); } -QWidget *SimpleMainWindow::widgetInTab(QWidget *w) +TQWidget *SimpleMainWindow::widgetInTab(TQWidget *w) { - QWidget *inTab = 0; + TQWidget *inTab = 0; if (w && w->parent() && w->parent()->isA("EditorProxy")) - inTab = (QWidget*)w->parent(); + inTab = (TQWidget*)w->parent(); else if (w && w->parent() && w->parent()->isA("MultiBuffer") && w->parent()->parent() && w->parent()->parent()->isA("EditorProxy")) - inTab = (QWidget*)w->parent()->parent(); + inTab = (TQWidget*)w->parent()->parent(); else if (w && w->parent() && w->parent()->isA("MultiBuffer")) - inTab = (QWidget*)w->parent(); + inTab = (TQWidget*)w->parent(); else inTab = w; return inTab; } -void SimpleMainWindow::closeTab(QWidget *w) +void SimpleMainWindow::closeTab(TQWidget *w) { - const QPtrList<KParts::Part> *partlist = PartController::getInstance()->parts(); - QPtrListIterator<KParts::Part> it(*partlist); + const TQPtrList<KParts::Part> *partlist = PartController::getInstance()->parts(); + TQPtrListIterator<KParts::Part> it(*partlist); while (KParts::Part* part = it.current()) { - QWidget *widget = EditorProxy::getInstance()->topWidgetForPart(part); + TQWidget *widget = EditorProxy::getInstance()->topWidgetForPart(part); if (widget && widget == w) { // weirdness beyond weirdness.. sometimes the active view is an embedded splitter with two files @@ -888,9 +888,9 @@ void SimpleMainWindow::activePartChanged(KParts::Part *part) { if (!part) return; - QWidget *w = part->widget(); + TQWidget *w = part->widget(); kdDebug() << "active part widget is : " << w << endl; - QWidget *inTab = widgetInTab(w); + TQWidget *inTab = widgetInTab(w); if (m_widgetTabs[inTab] != 0) { kdDebug() << " setting m_activeTabWidget " << endl; @@ -900,7 +900,7 @@ void SimpleMainWindow::activePartChanged(KParts::Part *part) void SimpleMainWindow::createGUI(KParts::Part *part) { if ( !part ) - setCaption( QString::null ); + setCaption( TQString::null ); DMainWindow::createGUI(part); m_mainWindowShare->slotGUICreated( part ); @@ -935,12 +935,12 @@ void SimpleMainWindow::lowerAllDocks() void SimpleMainWindow::switchToNextTabWidget() { - QValueList<DTabWidget*> tabWidgets = m_widgetTabs.values(); + TQValueList<DTabWidget*> tabWidgets = m_widgetTabs.values(); if ( tabWidgets.count() < 2 ) return; - QValueList<DTabWidget*> reduced; - QValueList<DTabWidget*>::iterator it = tabWidgets.begin(); + TQValueList<DTabWidget*> reduced; + TQValueList<DTabWidget*>::iterator it = tabWidgets.begin(); while ( it != tabWidgets.end() ) { if ( !reduced.contains( *it ) ) @@ -971,7 +971,7 @@ void SimpleMainWindow::switchToNextTabWidget() } } -void SimpleMainWindow::setCaption(const QString &caption) +void SimpleMainWindow::setCaption(const TQString &caption) { kdDebug(9000) << k_funcinfo << endl; @@ -986,9 +986,9 @@ void SimpleMainWindow::setCaption(const QString &caption) KDevProject *project = API::getInstance()->project(); if (project) { - QString projectname = project->projectName(); + TQString projectname = project->projectName(); - QString suffix(".kdevelop"); + TQString suffix(".kdevelop"); if (projectname.endsWith(suffix)) projectname.truncate(projectname.length() - suffix.length()); @@ -1003,7 +1003,7 @@ void SimpleMainWindow::setCaption(const QString &caption) void SimpleMainWindow::projectClosed() { - DMainWindow::setCaption(QString::null); + DMainWindow::setCaption(TQString::null); } #include "simplemainwindow.moc" diff --git a/src/simplemainwindow.h b/src/simplemainwindow.h index 39f23ff6..d809ddb1 100644 --- a/src/simplemainwindow.h +++ b/src/simplemainwindow.h @@ -37,30 +37,30 @@ namespace KParts { class SimpleMainWindow: public DMainWindow, public KDevMainWindow { Q_OBJECT public: - SimpleMainWindow(QWidget* parent = 0, const char *name = 0); + SimpleMainWindow(TQWidget* parent = 0, const char *name = 0); virtual ~SimpleMainWindow(); - virtual void embedPartView(QWidget *view, const QString &title, const QString& toolTip = QString::null); - virtual void embedSelectView(QWidget *view, const QString &title, const QString &toolTip); - virtual void embedOutputView(QWidget *view, const QString &title, const QString &toolTip); - virtual void embedSelectViewRight(QWidget* view, const QString& title, const QString &toolTip); + virtual void embedPartView(TQWidget *view, const TQString &title, const TQString& toolTip = TQString::null); + virtual void embedSelectView(TQWidget *view, const TQString &title, const TQString &toolTip); + virtual void embedOutputView(TQWidget *view, const TQString &title, const TQString &toolTip); + virtual void embedSelectViewRight(TQWidget* view, const TQString& title, const TQString &toolTip); - virtual void removeView(QWidget *view); - virtual void setViewAvailable(QWidget *pView, bool bEnabled); - virtual void raiseView(QWidget *view); - virtual void lowerView(QWidget *view); + virtual void removeView(TQWidget *view); + virtual void setViewAvailable(TQWidget *pView, bool bEnabled); + virtual void raiseView(TQWidget *view); + virtual void lowerView(TQWidget *view); virtual void loadSettings(); virtual void saveSettings(); - virtual void setCurrentDocumentCaption( const QString &caption ); + virtual void setCurrentDocumentCaption( const TQString &caption ); virtual KMainWindow *main(); void init(); public slots: - void slotDropEvent( QDropEvent *event ); - void setCaption(const QString &); + void slotDropEvent( TQDropEvent *event ); + void setCaption(const TQString &); protected: virtual bool queryClose(); @@ -68,9 +68,9 @@ protected: protected slots: virtual void closeTab(); - virtual void closeTab(QWidget *w); - virtual void tabContext(QWidget *w, const QPoint &p); - void contextMenu(QPopupMenu *popupMenu, const Context *context); + virtual void closeTab(TQWidget *w); + virtual void tabContext(TQWidget *w, const TQPoint &p); + void contextMenu(TQPopupMenu *popupMenu, const Context *context); private slots: void gotoNextWindow(); @@ -105,15 +105,15 @@ private: void createFramework(); void createActions(); void setupWindowMenu(); - void dragEnterEvent( QDragEnterEvent *event ); - void dropEvent( QDropEvent *event ); + void dragEnterEvent( TQDragEnterEvent *event ); + void dropEvent( TQDropEvent *event ); void openDocumentsAfterSplit(DTabWidget *tab); - QWidget *widgetForURL(KURL url); - QWidget *widgetInTab(QWidget *w); + TQWidget *widgetForURL(KURL url); + TQWidget *widgetInTab(TQWidget *w); KParts::ReadOnlyPart *activePartForSplitting(); - void embedView( DDockWindow::Position position, QWidget *view, const QString & title ); - DDockWindow::Position recallToolViewPosition( const QString & name, DDockWindow::Position defaultPos ); - void rememberToolViewPosition( const QString & name, DDockWindow::Position pos ); + void embedView( DDockWindow::Position position, TQWidget *view, const TQString & title ); + DDockWindow::Position recallToolViewPosition( const TQString & name, DDockWindow::Position defaultPos ); + void rememberToolViewPosition( const TQString & name, DDockWindow::Position pos ); MainWindowShare *m_mainWindowShare; @@ -129,8 +129,8 @@ private: KAction *m_raiseBottomDock; KAction *m_raiseLeftDock; KAction *m_raiseRightDock; - QPopupMenu *m_windowMenu; - QValueList<QPair<int, KURL> > m_windowList; + TQPopupMenu *m_windowMenu; + TQValueList<QPair<int, KURL> > m_windowList; KURL::List m_splitURLs; }; diff --git a/src/splashscreen.cpp b/src/splashscreen.cpp index 0c7ac7f2..25a4c811 100644 --- a/src/splashscreen.cpp +++ b/src/splashscreen.cpp @@ -4,16 +4,16 @@ #include <config.h> -#include <qtimer.h> -#include <qfont.h> +#include <tqtimer.h> +#include <tqfont.h> #include <klocale.h> #include <kglobalsettings.h> -KDevSplashScreen::KDevSplashScreen(const QPixmap& pixmap, WFlags f) : QSplashScreen(pixmap, f) +KDevSplashScreen::KDevSplashScreen(const TQPixmap& pixmap, WFlags f) : TQSplashScreen(pixmap, f) { - QTimer *timer = new QTimer( this ); - QObject::connect(timer, SIGNAL(timeout()), this, SLOT(animate())); + TQTimer *timer = new TQTimer( this ); + TQObject::connect(timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(animate())); timer->start(150); state = 0; @@ -33,46 +33,46 @@ void KDevSplashScreen::animate() } -void KDevSplashScreen::message( const QString &str, int flags, const QColor &color) +void KDevSplashScreen::message( const TQString &str, int flags, const TQColor &color) { - QSplashScreen::message(str,flags,color); + TQSplashScreen::message(str,flags,color); animate(); m_string = str; } -void KDevSplashScreen::drawContents (QPainter* painter) +void KDevSplashScreen::drawContents (TQPainter* painter) { int position; - QColor base_color (201,229,165); // Base green color + TQColor base_color (201,229,165); // Base green color // Draw background circles painter->setPen(NoPen); - painter->setBrush(QColor(215,234,181)); + painter->setBrush(TQColor(215,234,181)); painter->drawEllipse(51,7,9,9); painter->drawEllipse(62,7,9,9); painter->drawEllipse(73,7,9,9); // Draw animated circles, increments are chosen // to get close to background's color - // (didn't work well with QColor::light function) + // (didn't work well with TQColor::light function) for (int i=0; i < progress_bar_size; i++) { position = (state+i)%(2*progress_bar_size-1); - painter->setBrush(QColor(base_color.red()-18*i, + painter->setBrush(TQColor(base_color.red()-18*i, base_color.green()-10*i, base_color.blue()-28*i)); if (position < 3) painter->drawEllipse(51+position*11,7,9,9); } - painter->setPen(QColor(74,112,18)); - QFont fnt(KGlobalSettings::generalFont()); + painter->setPen(TQColor(74,112,18)); + TQFont fnt(KGlobalSettings::generalFont()); fnt.setPointSize(8); painter->setFont(fnt); // Draw version number - QRect r = rect(); + TQRect r = rect(); r.setRect(r.x() + 5, r.y() + 5, r.width() - 10, r.height() - 10); painter->drawText(r, Qt::AlignRight, i18n("Version %1").arg( VERSION )); diff --git a/src/splashscreen.h b/src/splashscreen.h index 15114f3f..5fa6bc07 100644 --- a/src/splashscreen.h +++ b/src/splashscreen.h @@ -2,9 +2,9 @@ #ifndef _SPLASHSCREEN_H_ #define _SPLASHSCREEN_H_ -#include <qsplashscreen.h> -#include <qpainter.h> -#include <qlabel.h> +#include <tqsplashscreen.h> +#include <tqpainter.h> +#include <tqlabel.h> class QPixmap; @@ -16,21 +16,21 @@ class KDevSplashScreen : public QSplashScreen Q_OBJECT public: - KDevSplashScreen(const QPixmap& pixmap, WFlags f = 0); + KDevSplashScreen(const TQPixmap& pixmap, WFlags f = 0); virtual ~KDevSplashScreen(); protected: - void drawContents (QPainter * painter); + void drawContents (TQPainter * painter); public slots: void animate(); - void message( const QString &str, int flags = AlignLeft, - const QColor &color = black ); + void message( const TQString &str, int flags = AlignLeft, + const TQColor &color = black ); private: int state; int progress_bar_size; - QString m_string; + TQString m_string; }; diff --git a/src/statusbar.cpp b/src/statusbar.cpp index cff28b3e..02031021 100644 --- a/src/statusbar.cpp +++ b/src/statusbar.cpp @@ -9,11 +9,11 @@ * * ***************************************************************************/ -#include <qlayout.h> -#include <qlineedit.h> -#include <qpainter.h> -#include <qtimer.h> -#include <qfontmetrics.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqpainter.h> +#include <tqtimer.h> +#include <tqfontmetrics.h> #include <kdebug.h> #include <kglobalsettings.h> @@ -27,20 +27,20 @@ #include "statusbar.h" #include "partcontroller.h" -KDevStatusBar::KDevStatusBar(QWidget *parent, const char *name) +KDevStatusBar::KDevStatusBar(TQWidget *parent, const char *name) : KStatusBar(parent, name), _cursorIface(0), _activePart(0) { - QWidget * w = new QWidget( this ); + TQWidget * w = new TQWidget( this ); addWidget( w, 1, true ); w->hide(); - _status = new QLabel( this ); + _status = new TQLabel( this ); _status->setMinimumWidth(_status->fontMetrics().width("Line: XXXXX Col: XXX OVR NORM * ")); - _status->setAlignment(QWidget::AlignCenter); + _status->setAlignment(TQWidget::AlignCenter); addWidget(_status, 0, true); - connect(PartController::getInstance(), SIGNAL(activePartChanged(KParts::Part*)), - this, SLOT(activePartChanged(KParts::Part*))); + connect(PartController::getInstance(), TQT_SIGNAL(activePartChanged(KParts::Part*)), + this, TQT_SLOT(activePartChanged(KParts::Part*))); } @@ -60,14 +60,14 @@ void KDevStatusBar::activePartChanged(KParts::Part *part) { if ((_viewmsgIface = dynamic_cast<KTextEditor::ViewStatusMsgInterface*>(part->widget()))) { - connect( part->widget(), SIGNAL( viewStatusMsg( const QString & ) ), - this, SLOT( setStatus( const QString & ) ) ); + connect( part->widget(), TQT_SIGNAL( viewStatusMsg( const TQString & ) ), + this, TQT_SLOT( setStatus( const TQString & ) ) ); _status->show(); } else if ((_cursorIface = dynamic_cast<KTextEditor::ViewCursorInterface*>(part->widget()))) { - connect(part->widget(), SIGNAL(cursorPositionChanged()), this, SLOT(cursorPositionChanged())); + connect(part->widget(), TQT_SIGNAL(cursorPositionChanged()), this, TQT_SLOT(cursorPositionChanged())); _status->show(); cursorPositionChanged(); @@ -90,7 +90,7 @@ void KDevStatusBar::cursorPositionChanged() } } -void KDevStatusBar::setStatus(const QString &str) +void KDevStatusBar::setStatus(const TQString &str) { _status->setText(str); } @@ -101,7 +101,7 @@ void KDevStatusBar::setCursorPosition(int line, int col) _status->setText(i18n(" Line: %1 Col: %2 ").arg(line+1).arg(col)); } -void KDevStatusBar::addWidget ( QWidget *widget, int stretch, bool permanent) +void KDevStatusBar::addWidget ( TQWidget *widget, int stretch, bool permanent) { KStatusBar::addWidget(widget,stretch,permanent); diff --git a/src/statusbar.h b/src/statusbar.h index 30b80724..2e9fffaa 100644 --- a/src/statusbar.h +++ b/src/statusbar.h @@ -13,7 +13,7 @@ #define _STATUSBAR_H_ #include <kstatusbar.h> -#include <qmap.h> +#include <tqmap.h> class QLabel; @@ -29,18 +29,18 @@ class KDevStatusBar : public KStatusBar Q_OBJECT public: - KDevStatusBar( QWidget *parent=0, const char *name=0 ); + KDevStatusBar( TQWidget *parent=0, const char *name=0 ); ~KDevStatusBar(); - void addWidget ( QWidget *widget, int stretch = 0, bool permanent = FALSE ); + void addWidget ( TQWidget *widget, int stretch = 0, bool permanent = FALSE ); private slots: void cursorPositionChanged(); void activePartChanged(KParts::Part *part); - void setStatus(const QString &str); + void setStatus(const TQString &str); void setCursorPosition(int line, int col); private: - QLabel *_status; + TQLabel *_status; KTextEditor::ViewCursorInterface * _cursorIface; KTextEditor::ViewStatusMsgInterface * _viewmsgIface; |