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 /lib/widgets/kdevhtmlpart.cpp | |
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 'lib/widgets/kdevhtmlpart.cpp')
-rw-r--r-- | lib/widgets/kdevhtmlpart.cpp | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/lib/widgets/kdevhtmlpart.cpp b/lib/widgets/kdevhtmlpart.cpp index 688e373a..c99dcf36 100644 --- a/lib/widgets/kdevhtmlpart.cpp +++ b/lib/widgets/kdevhtmlpart.cpp @@ -1,6 +1,6 @@ -#include <qfile.h> -#include <qclipboard.h> -#include <qapplication.h> +#include <tqfile.h> +#include <tqclipboard.h> +#include <tqapplication.h> #include <kxmlguiclient.h> #include <kaction.h> @@ -24,54 +24,54 @@ KDevHTMLPart::KDevHTMLPart() { setXMLFile(locate("data", "kdevelop/kdevhtml_partui.rc"), true); - connect(browserExtension(), SIGNAL(openURLRequestDelayed(const KURL &,const KParts::URLArgs &)), - this, SLOT(openURLRequest(const KURL &)) ); + connect(browserExtension(), TQT_SIGNAL(openURLRequestDelayed(const KURL &,const KParts::URLArgs &)), + this, TQT_SLOT(openURLRequest(const KURL &)) ); - connect(this, SIGNAL(started(KIO::Job *)), this, SLOT(slotStarted(KIO::Job* ))); - connect(this, SIGNAL(completed()), this, SLOT(slotCompleted())); - connect(this, SIGNAL(canceled(const QString &)), this, SLOT(slotCancelled(const QString &))); + connect(this, TQT_SIGNAL(started(KIO::Job *)), this, TQT_SLOT(slotStarted(KIO::Job* ))); + connect(this, TQT_SIGNAL(completed()), this, TQT_SLOT(slotCompleted())); + connect(this, TQT_SIGNAL(canceled(const TQString &)), this, TQT_SLOT(slotCancelled(const TQString &))); KActionCollection * actions = actionCollection();// new KActionCollection( this ); reloadAction = new KAction( i18n( "Reload" ), "reload", 0, - this, SLOT( slotReload() ), actions, "doc_reload" ); + this, TQT_SLOT( slotReload() ), actions, "doc_reload" ); reloadAction->setWhatsThis(i18n("<b>Reload</b><p>Reloads the current document.")); stopAction = new KAction( i18n( "Stop" ), "stop", 0, - this, SLOT( slotStop() ), actions, "doc_stop" ); + this, TQT_SLOT( slotStop() ), actions, "doc_stop" ); stopAction->setWhatsThis(i18n("<b>Stop</b><p>Stops the loading of current document.")); duplicateAction = new KAction( i18n( "Duplicate Tab" ), "window_new", 0, - this, SLOT( slotDuplicate() ), actions, "doc_dup" ); + this, TQT_SLOT( slotDuplicate() ), actions, "doc_dup" ); duplicateAction->setWhatsThis(i18n("<b>Duplicate window</b><p>Opens current document in a new window.")); - printAction = KStdAction::print(this, SLOT(slotPrint()), actions, "print_doc"); - copyAction = KStdAction::copy(this, SLOT(slotCopy()), actions, "copy_doc_selection"); + printAction = KStdAction::print(this, TQT_SLOT(slotPrint()), actions, "print_doc"); + copyAction = KStdAction::copy(this, TQT_SLOT(slotCopy()), actions, "copy_doc_selection"); - connect( this, SIGNAL(popupMenu(const QString &, const QPoint &)), this, SLOT(popup(const QString &, const QPoint &))); - connect(this, SIGNAL(selectionChanged()), this, SLOT(slotSelectionChanged())); + connect( this, TQT_SIGNAL(popupMenu(const TQString &, const TQPoint &)), this, TQT_SLOT(popup(const TQString &, const TQPoint &))); + connect(this, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectionChanged())); //BEGIN documentation history stuff m_backAction = new KToolBarPopupAction(i18n("Back"), "back", 0, - this, SLOT(slotBack()), + this, TQT_SLOT(slotBack()), actions, "browser_back"); m_backAction->setEnabled( false ); m_backAction->setToolTip(i18n("Back")); m_backAction->setWhatsThis(i18n("<b>Back</b><p>Moves backwards one step in the <b>documentation</b> browsing history.")); - connect(m_backAction->popupMenu(), SIGNAL(aboutToShow()), - this, SLOT(slotBackAboutToShow())); - connect(m_backAction->popupMenu(), SIGNAL(activated(int)), - this, SLOT(slotPopupActivated(int))); + connect(m_backAction->popupMenu(), TQT_SIGNAL(aboutToShow()), + this, TQT_SLOT(slotBackAboutToShow())); + connect(m_backAction->popupMenu(), TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotPopupActivated(int))); m_forwardAction = new KToolBarPopupAction(i18n("Forward"), "forward", 0, - this, SLOT(slotForward()), + this, TQT_SLOT(slotForward()), actions, "browser_forward"); m_forwardAction->setEnabled( false ); m_forwardAction->setToolTip(i18n("Forward")); m_forwardAction->setWhatsThis(i18n("<b>Forward</b><p>Moves forward one step in the <b>documentation</b> browsing history.")); - connect(m_forwardAction->popupMenu(), SIGNAL(aboutToShow()), - this, SLOT(slotForwardAboutToShow())); - connect(m_forwardAction->popupMenu(), SIGNAL(activated(int)), - this, SLOT(slotPopupActivated(int))); + connect(m_forwardAction->popupMenu(), TQT_SIGNAL(aboutToShow()), + this, TQT_SLOT(slotForwardAboutToShow())); + connect(m_forwardAction->popupMenu(), TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotPopupActivated(int))); m_restoring = false; m_Current = m_history.end(); @@ -87,7 +87,7 @@ KDevHTMLPart::KDevHTMLPart() setZoomFactor(appConfig->readEntry("Zoom", "100").toInt()); } -void KDevHTMLPart::popup( const QString & url, const QPoint & p ) +void KDevHTMLPart::popup( const TQString & url, const TQPoint & p ) { // KPopupMenu popup( i18n( "Documentation Viewer" ), this->widget() ); KPopupMenu popup(this->widget()); @@ -157,13 +157,13 @@ void KDevHTMLPart::popup( const QString & url, const QPoint & p ) } } -void KDevHTMLPart::setContext(const QString &context) +void KDevHTMLPart::setContext(const TQString &context) { m_context = context; } -QString KDevHTMLPart::context() const +TQString KDevHTMLPart::context() const { return m_context; } @@ -250,10 +250,10 @@ done: #undef I #undef X -QString KDevHTMLPart::resolveEnvVarsInURL(const QString& url) +TQString KDevHTMLPart::resolveEnvVarsInURL(const TQString& url) { // check for environment variables and make necessary translations - QString path = url; + TQString path = url; int nDollarPos = path.find( '$' ); // Note: the while loop below is a copy of code in kdecore/kconfigbase.cpp ;) @@ -265,13 +265,13 @@ QString KDevHTMLPart::resolveEnvVarsInURL(const QString& url) while ( (nEndPos <= path.length()) && (path[nEndPos]!=')') ) nEndPos++; nEndPos++; - QString cmd = path.mid( nDollarPos+2, nEndPos-nDollarPos-3 ); + TQString cmd = path.mid( nDollarPos+2, nEndPos-nDollarPos-3 ); - QString result; - FILE *fs = popen(QFile::encodeName(cmd).data(), "r"); + TQString result; + FILE *fs = popen(TQFile::encodeName(cmd).data(), "r"); if (fs) { - QTextStream ts(fs, IO_ReadOnly); + TQTextStream ts(fs, IO_ReadOnly); result = ts.read().stripWhiteSpace(); pclose(fs); } @@ -279,7 +279,7 @@ QString KDevHTMLPart::resolveEnvVarsInURL(const QString& url) } else if( (path)[nDollarPos+1] != '$' ) { uint nEndPos = nDollarPos+1; // the next character is no $ - QString aVarName; + TQString aVarName; if (path[nEndPos]=='{') { while ( (nEndPos <= path.length()) && (path[nEndPos]!='}') ) @@ -302,9 +302,9 @@ QString KDevHTMLPart::resolveEnvVarsInURL(const QString& url) // A environment variables may contain values in 8bit // locale cpecified encoding or in UTF8 encoding. if (isUtf8( pEnv )) - path.replace( nDollarPos, nEndPos-nDollarPos, QString::fromUtf8(pEnv) ); + path.replace( nDollarPos, nEndPos-nDollarPos, TQString::fromUtf8(pEnv) ); else - path.replace( nDollarPos, nEndPos-nDollarPos, QString::fromLocal8Bit(pEnv) ); + path.replace( nDollarPos, nEndPos-nDollarPos, TQString::fromLocal8Bit(pEnv) ); } else path.remove( nDollarPos, nEndPos-nDollarPos ); } else { @@ -320,7 +320,7 @@ QString KDevHTMLPart::resolveEnvVarsInURL(const QString& url) bool KDevHTMLPart::openURL(const KURL &url) { - QString path = resolveEnvVarsInURL(url.url()); + TQString path = resolveEnvVarsInURL(url.url()); KURL newUrl(path); bool retval = KHTMLPart::openURL(newUrl); @@ -364,7 +364,7 @@ void KDevHTMLPart::slotCompleted( ) stopAction->setEnabled(false); } -void KDevHTMLPart::slotCancelled( const QString & /*errMsg*/ ) +void KDevHTMLPart::slotCancelled( const TQString & /*errMsg*/ ) { stopAction->setEnabled(false); } @@ -408,7 +408,7 @@ void KDevHTMLPart::slotBackAboutToShow() if ( m_Current == m_history.begin() ) return; - QValueList<DocumentationHistoryEntry>::Iterator it = m_Current; + TQValueList<DocumentationHistoryEntry>::Iterator it = m_Current; --it; int i = 0; @@ -433,7 +433,7 @@ void KDevHTMLPart::slotForwardAboutToShow() if ( m_Current == m_history.fromLast() ) return; - QValueList<DocumentationHistoryEntry>::Iterator it = m_Current; + TQValueList<DocumentationHistoryEntry>::Iterator it = m_Current; ++it; int i = 0; @@ -455,7 +455,7 @@ void KDevHTMLPart::slotPopupActivated( int id ) { kdDebug(9000) << "id: " << id << endl; - QValueList<DocumentationHistoryEntry>::Iterator it = m_history.begin(); + TQValueList<DocumentationHistoryEntry>::Iterator it = m_history.begin(); while( it != m_history.end() ) { kdDebug(9000) << "(*it).id: " << (*it).id << endl; @@ -473,7 +473,7 @@ void KDevHTMLPart::slotPopupActivated( int id ) void KDevHTMLPart::addHistoryEntry() { - QValueList<DocumentationHistoryEntry>::Iterator it = m_Current; + TQValueList<DocumentationHistoryEntry>::Iterator it = m_Current; // if We're not already the last entry, we truncate the list here before adding an entry if ( it != m_history.end() && it != m_history.fromLast() ) @@ -493,12 +493,12 @@ void KDevHTMLPart::addHistoryEntry() void KDevHTMLPart::slotCopy( ) { - QString text = selectedText(); - text.replace( QChar( 0xa0 ), ' ' ); - QClipboard *cb = QApplication::clipboard(); - disconnect( cb, SIGNAL( selectionChanged() ), this, SLOT( slotClearSelection() ) ); + TQString text = selectedText(); + text.replace( TQChar( 0xa0 ), ' ' ); + QClipboard *cb = TQApplication::clipboard(); + disconnect( cb, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotClearSelection() ) ); cb->setText(text); - connect( cb, SIGNAL( selectionChanged() ), this, SLOT( slotClearSelection() ) ); + connect( cb, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotClearSelection() ) ); } void KDevHTMLPart::slotSelectionChanged( ) |