summaryrefslogtreecommitdiffstats
path: root/src/kde
diff options
context:
space:
mode:
Diffstat (limited to 'src/kde')
-rw-r--r--src/kde/kchmdcopiface.cpp34
-rw-r--r--src/kde/kchmdcopiface.h21
-rw-r--r--src/kde/kchmdcopiface_skel.cpp48
-rw-r--r--src/kde/kchmviewwindow_khtmlpart.cpp40
-rw-r--r--src/kde/kchmviewwindow_khtmlpart.h34
5 files changed, 91 insertions, 86 deletions
diff --git a/src/kde/kchmdcopiface.cpp b/src/kde/kchmdcopiface.cpp
index 967380e..2054d69 100644
--- a/src/kde/kchmdcopiface.cpp
+++ b/src/kde/kchmdcopiface.cpp
@@ -26,8 +26,8 @@
#include "kchmsearchwindow.h"
-KCHMDCOPIface::KCHMDCOPIface(QObject *parent, const char *name)
- : QObject(parent, name), DCOPObject( "KCHMDCOPIface" )
+KCHMDCOPIface::KCHMDCOPIface(TQObject *tqparent, const char *name)
+ : TQObject(tqparent, name), DCOPObject( "KCHMDCOPIface" )
{
}
@@ -37,50 +37,50 @@ KCHMDCOPIface::~KCHMDCOPIface()
}
-void KCHMDCOPIface::loadHelpFile( const QString & filename, const QString & page2open )
+void KCHMDCOPIface::loadHelpFile( const TQString & filename, const TQString & page2open )
{
- QStringList args;
+ TQStringList args;
args.push_back( filename );
args.push_back( page2open );
- qApp->postEvent( ::mainWindow, new KCHMUserEvent( "loadAndOpen", args ) );
+ tqApp->postEvent( ::mainWindow, new KCHMUserEvent( "loadAndOpen", args ) );
}
-void KCHMDCOPIface::openPage( const QString & page2open )
+void KCHMDCOPIface::openPage( const TQString & page2open )
{
- QStringList args;
+ TQStringList args;
args.push_back( page2open );
- qApp->postEvent( ::mainWindow, new KCHMUserEvent( "openPage", args ) );
+ tqApp->postEvent( ::mainWindow, new KCHMUserEvent( "openPage", args ) );
}
-void KCHMDCOPIface::guiFindInIndex( const QString & word )
+void KCHMDCOPIface::guiFindInIndex( const TQString & word )
{
- QStringList args;
+ TQStringList args;
args.push_back( word );
- qApp->postEvent( ::mainWindow, new KCHMUserEvent( "findInIndex", args ) );
+ tqApp->postEvent( ::mainWindow, new KCHMUserEvent( "findInIndex", args ) );
}
-void KCHMDCOPIface::guiSearchQuery( const QString & query )
+void KCHMDCOPIface::guiSearchQuery( const TQString & query )
{
- QStringList args;
+ TQStringList args;
args.push_back( query );
- qApp->postEvent( ::mainWindow, new KCHMUserEvent( "searchQuery", args ) );
+ tqApp->postEvent( ::mainWindow, new KCHMUserEvent( "searchQuery", args ) );
}
-QStringList KCHMDCOPIface::searchQuery( const QString & query )
+TQStringList KCHMDCOPIface::searchQuery( const TQString & query )
{
- QStringList results;
+ TQStringList results;
if ( ::mainWindow->searchWindow()->searchQuery( query, &results ) )
return results;
else
- return QStringList();
+ return TQStringList();
}
diff --git a/src/kde/kchmdcopiface.h b/src/kde/kchmdcopiface.h
index c062fc8..2c8800f 100644
--- a/src/kde/kchmdcopiface.h
+++ b/src/kde/kchmdcopiface.h
@@ -22,37 +22,38 @@
#ifndef KCHMDCOPIFACE_H
#define KCHMDCOPIFACE_H
-#include <qobject.h>
+#include <tqobject.h>
#include <dcopobject.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
-class KCHMDCOPIface : public QObject, public DCOPObject
+class KCHMDCOPIface : public TQObject, public DCOPObject
{
Q_OBJECT
+// TQ_OBJECT
K_DCOP
public:
- KCHMDCOPIface( QObject *parent = 0, const char *name = 0 );
+ KCHMDCOPIface( TQObject *tqparent = 0, const char *name = 0 );
~KCHMDCOPIface();
k_dcop:
//! Loads a CHM file \a filename , and opens the URL \a url. Use URL "/" to open default homepage
- void loadHelpFile( const QString& filename, const QString& url );
+ void loadHelpFile( const TQString& filename, const TQString& url );
//! Opens a specific \a url inside the loaded CHM file
- void openPage( const QString& url );
+ void openPage( const TQString& url );
//! Tries to find word in index, opening the index window and scrolling it there
- void guiFindInIndex( const QString& word );
+ void guiFindInIndex( const TQString& word );
//! Executes a search in GUI. \a query contains the complete search query.
- void guiSearchQuery( const QString& query );
+ void guiSearchQuery( const TQString& query );
//! Executes a search; GUI is not involved and user sees nothing.
//! \a query contains the complete search query.
//! Returns a list of URLs, or empty array if nothing os
- QStringList searchQuery( const QString& query );
+ TQStringList searchQuery( const TQString& query );
};
#endif
diff --git a/src/kde/kchmdcopiface_skel.cpp b/src/kde/kchmdcopiface_skel.cpp
index 130a60f..be1e994 100644
--- a/src/kde/kchmdcopiface_skel.cpp
+++ b/src/kde/kchmdcopiface_skel.cpp
@@ -12,11 +12,11 @@
static const char* const KCHMDCOPIface_ftable[6][3] = {
- { "void", "loadHelpFile(QString,QString)", "loadHelpFile(QString filename,QString url)" },
- { "void", "openPage(QString)", "openPage(QString url)" },
- { "void", "guiFindInIndex(QString)", "guiFindInIndex(QString word)" },
- { "void", "guiSearchQuery(QString)", "guiSearchQuery(QString query)" },
- { "QStringList", "searchQuery(QString)", "searchQuery(QString query)" },
+ { "void", "loadHelpFile(TQString,TQString)", "loadHelpFile(TQString filename,TQString url)" },
+ { "void", "openPage(TQString)", "openPage(TQString url)" },
+ { "void", "guiFindInIndex(TQString)", "guiFindInIndex(TQString word)" },
+ { "void", "guiSearchQuery(TQString)", "guiSearchQuery(TQString query)" },
+ { TQSTRINGLIST_OBJECT_NAME_STRING, "searchQuery(TQString)", "searchQuery(TQString query)" },
{ 0, 0, 0 }
};
static const int KCHMDCOPIface_ftable_hiddens[5] = {
@@ -27,46 +27,46 @@ static const int KCHMDCOPIface_ftable_hiddens[5] = {
0,
};
-bool KCHMDCOPIface::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
+bool KCHMDCOPIface::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
- if ( fun == KCHMDCOPIface_ftable[0][1] ) { // void loadHelpFile(QString,QString)
- QString arg0;
- QString arg1;
- QDataStream arg( data, IO_ReadOnly );
+ if ( fun == KCHMDCOPIface_ftable[0][1] ) { // void loadHelpFile(TQString,TQString)
+ TQString arg0;
+ TQString arg1;
+ TQDataStream arg( data, IO_ReadOnly );
if (arg.atEnd()) return false;
arg >> arg0;
if (arg.atEnd()) return false;
arg >> arg1;
replyType = KCHMDCOPIface_ftable[0][0];
loadHelpFile(arg0, arg1 );
- } else if ( fun == KCHMDCOPIface_ftable[1][1] ) { // void openPage(QString)
- QString arg0;
- QDataStream arg( data, IO_ReadOnly );
+ } else if ( fun == KCHMDCOPIface_ftable[1][1] ) { // void openPage(TQString)
+ TQString arg0;
+ TQDataStream arg( data, IO_ReadOnly );
if (arg.atEnd()) return false;
arg >> arg0;
replyType = KCHMDCOPIface_ftable[1][0];
openPage(arg0 );
- } else if ( fun == KCHMDCOPIface_ftable[2][1] ) { // void guiFindInIndex(QString)
- QString arg0;
- QDataStream arg( data, IO_ReadOnly );
+ } else if ( fun == KCHMDCOPIface_ftable[2][1] ) { // void guiFindInIndex(TQString)
+ TQString arg0;
+ TQDataStream arg( data, IO_ReadOnly );
if (arg.atEnd()) return false;
arg >> arg0;
replyType = KCHMDCOPIface_ftable[2][0];
guiFindInIndex(arg0 );
- } else if ( fun == KCHMDCOPIface_ftable[3][1] ) { // void guiSearchQuery(QString)
- QString arg0;
- QDataStream arg( data, IO_ReadOnly );
+ } else if ( fun == KCHMDCOPIface_ftable[3][1] ) { // void guiSearchQuery(TQString)
+ TQString arg0;
+ TQDataStream arg( data, IO_ReadOnly );
if (arg.atEnd()) return false;
arg >> arg0;
replyType = KCHMDCOPIface_ftable[3][0];
guiSearchQuery(arg0 );
- } else if ( fun == KCHMDCOPIface_ftable[4][1] ) { // QStringList searchQuery(QString)
- QString arg0;
- QDataStream arg( data, IO_ReadOnly );
+ } else if ( fun == KCHMDCOPIface_ftable[4][1] ) { // TQStringList searchQuery(TQString)
+ TQString arg0;
+ TQDataStream arg( data, IO_ReadOnly );
if (arg.atEnd()) return false;
arg >> arg0;
replyType = KCHMDCOPIface_ftable[4][0];
- QDataStream _replyStream( replyData, IO_WriteOnly );
+ TQDataStream _replyStream( replyData, IO_WriteOnly );
_replyStream << searchQuery(arg0 );
} else {
return DCOPObject::process( fun, data, replyType, replyData );
@@ -87,7 +87,7 @@ QCStringList KCHMDCOPIface::functions()
for ( int i = 0; KCHMDCOPIface_ftable[i][2]; i++ ) {
if (KCHMDCOPIface_ftable_hiddens[i])
continue;
- QCString func = KCHMDCOPIface_ftable[i][0];
+ TQCString func = KCHMDCOPIface_ftable[i][0];
func += ' ';
func += KCHMDCOPIface_ftable[i][2];
funcs << func;
diff --git a/src/kde/kchmviewwindow_khtmlpart.cpp b/src/kde/kchmviewwindow_khtmlpart.cpp
index e68e53d..e3c8f42 100644
--- a/src/kde/kchmviewwindow_khtmlpart.cpp
+++ b/src/kde/kchmviewwindow_khtmlpart.cpp
@@ -19,7 +19,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#include <qclipboard.h>
+#include <tqclipboard.h>
#include <khtmlview.h>
#include <kfinddialog.h>
@@ -32,25 +32,25 @@
#include "kchmviewwindow_khtmlpart.moc"
-QWidget * KCHMViewWindow_KHTMLPart::getQWidget()
+TQWidget * KCHMViewWindow_KHTMLPart::getTQWidget()
{
return view();
}
-KCHMViewWindow_KHTMLPart::KCHMViewWindow_KHTMLPart( QTabWidget * parent )
- : KHTMLPart ( parent ), KCHMViewWindow ( parent )
+KCHMViewWindow_KHTMLPart::KCHMViewWindow_KHTMLPart( TQTabWidget * tqparent )
+ : KHTMLPart ( tqparent ), KCHMViewWindow ( tqparent )
{
m_zoomfactor = 0;
m_currentEncoding = 0;
m_searchForward = true;
- invalidate();
+ tqinvalidate();
- connect( browserExtension(), SIGNAL( openURLRequest( const KURL &, const KParts::URLArgs & ) ),
- this, SLOT ( onOpenURLRequest( const KURL &, const KParts::URLArgs & )) );
+ connect( browserExtension(), TQT_SIGNAL( openURLRequest( const KURL &, const KParts::URLArgs & ) ),
+ this, TQT_SLOT ( onOpenURLRequest( const KURL &, const KParts::URLArgs & )) );
- connect( this, SIGNAL ( popupMenu ( const QString &, const QPoint &) ),
- this, SLOT ( onPopupMenu ( const QString &, const QPoint &) ) );
+ connect( this, TQT_SIGNAL ( popupMenu ( const TQString &, const TQPoint &) ),
+ this, TQT_SLOT ( onPopupMenu ( const TQString &, const TQPoint &) ) );
}
@@ -58,7 +58,7 @@ KCHMViewWindow_KHTMLPart::~KCHMViewWindow_KHTMLPart()
{
}
-bool KCHMViewWindow_KHTMLPart::openPage (const QString& url)
+bool KCHMViewWindow_KHTMLPart::openPage (const TQString& url)
{
// Set or change the encoding
if ( m_currentEncoding != ::mainWindow->chmFile()->currentEncoding() )
@@ -67,7 +67,7 @@ bool KCHMViewWindow_KHTMLPart::openPage (const QString& url)
setEncoding ( m_currentEncoding->qtcodec, TRUE );
}
- QString fullurl = "ms-its:" + ::mainWindow->getOpenedFileName() + "::" + url;
+ TQString fullurl = "ms-its:" + ::mainWindow->getOpenedFileName() + "::" + url;
openURL ( KURL(fullurl) );
return true;
@@ -81,18 +81,18 @@ void KCHMViewWindow_KHTMLPart::setZoomFactor( int zoom )
KHTMLPart::setZoomFactor ( 100 + (m_zoomfactor * 10) );
}
-void KCHMViewWindow_KHTMLPart::invalidate( )
+void KCHMViewWindow_KHTMLPart::tqinvalidate( )
{
m_zoomfactor = 0;
m_searchForward = true;
- m_searchText = QString::null;
+ m_searchText = TQString();
setJScriptEnabled ( appConfig.m_kdeEnableJS );
setJavaEnabled ( appConfig.m_kdeEnableJava );
setMetaRefreshEnabled ( appConfig.m_kdeEnableRefresh );
setPluginsEnabled ( appConfig.m_kdeEnablePlugins );
- KCHMViewWindow::invalidate( );
+ KCHMViewWindow::tqinvalidate( );
}
int KCHMViewWindow_KHTMLPart::getScrollbarPosition( )
@@ -116,7 +116,7 @@ bool KCHMViewWindow_KHTMLPart::printCurrentPage()
return true;
}
-void KCHMViewWindow_KHTMLPart::searchWord( const QString & word, bool forward, bool )
+void KCHMViewWindow_KHTMLPart::searchWord( const TQString & word, bool forward, bool )
{
if ( word != m_searchText || forward != m_searchForward )
{
@@ -135,7 +135,7 @@ void KCHMViewWindow_KHTMLPart::onOpenURLRequest( const KURL & url, const KParts:
emit signalLinkClicked ( url.prettyURL(), sourcechange );
}
-void KCHMViewWindow_KHTMLPart::slotLinkClicked( const QString & newlink )
+void KCHMViewWindow_KHTMLPart::slotLinkClicked( const TQString & newlink )
{
bool notused;
emit signalLinkClicked (newlink, notused);
@@ -149,15 +149,15 @@ void KCHMViewWindow_KHTMLPart::clipSelectAll()
void KCHMViewWindow_KHTMLPart::clipCopy()
{
- QString text = selectedText();
+ TQString text = selectedText();
if ( !text.isEmpty() )
- QApplication::clipboard()->setText( text );
+ TQApplication::tqclipboard()->setText( text );
}
-void KCHMViewWindow_KHTMLPart::onPopupMenu ( const QString &url, const QPoint & point )
+void KCHMViewWindow_KHTMLPart::onPopupMenu ( const TQString &url, const TQPoint & point )
{
- KQPopupMenu * menu = getContextMenu( url, view() );
+ KTQPopupMenu * menu = getContextMenu( url, view() );
menu->exec( point );
}
diff --git a/src/kde/kchmviewwindow_khtmlpart.h b/src/kde/kchmviewwindow_khtmlpart.h
index 5799f62..b2d5aa6 100644
--- a/src/kde/kchmviewwindow_khtmlpart.h
+++ b/src/kde/kchmviewwindow_khtmlpart.h
@@ -28,29 +28,33 @@
#include "kchmsourcefactory.h"
#include "libchmtextencoding.h"
+#ifdef Q_MOC_RUN
+#define USE_KDE
+#endif // Q_MOC_RUN
/**
@author Georgy Yunaev
*/
/*
- * For Qt-only version, we cannot compile KCHMViewWindow_KHTMLPart. However,
- * we cannot just exclude it, because it would not generate a MOC file for a KDE
- * version. Therefore we declare it, and compile the .moc file, but do not provide
+ * For TQt-only version, we cannot compile KCHMViewWindow_KHTMLPart. However,
+ * we cannot just exclude it, because it would not generate a TQMOC file for a KDE
+ * version. Therefore we declare it, and compile the .tqmoc file, but do not provide
* the class methods.
*/
#if defined (USE_KDE)
class KCHMViewWindow_KHTMLPart : public KHTMLPart, public KCHMViewWindow
{
Q_OBJECT
+TQ_OBJECT
public:
- KCHMViewWindow_KHTMLPart( QTabWidget * parent );
+ KCHMViewWindow_KHTMLPart( TQTabWidget * tqparent );
~KCHMViewWindow_KHTMLPart();
//! Open a page from current chm archive
- virtual bool openPage (const QString& url);
+ virtual bool openPage (const TQString& url);
//! Invalidate current view, doing all the cleanups etc.
- virtual void invalidate();
+ virtual void tqinvalidate();
//! Return current ZoomFactor.
virtual int getZoomFactor() const { return m_zoomfactor; }
@@ -64,8 +68,8 @@ public:
//! Popups the print dialog, and prints the current page on the printer.
virtual bool printCurrentPage();
- //! Initiates the find-in-page search, if succeed, cursor moved to the first entry
- virtual void searchWord( const QString & word, bool forward = true, bool casesensitive = false );
+ //! Initiates the tqfind-in-page search, if succeed, cursor moved to the first entry
+ virtual void searchWord( const TQString & word, bool forward = true, bool casesensitive = false );
//! Select the content of the whole page
virtual void clipSelectAll();
@@ -83,8 +87,8 @@ public:
//! Sets the scrollbar position.
virtual void setScrollbarPosition(int pos);
- virtual QObject * getQObject() { return this; }
- virtual QWidget * getQWidget();
+ virtual TQObject * getTQObject() { return this; }
+ virtual TQWidget * getTQWidget();
signals:
/*!
@@ -92,19 +96,19 @@ signals:
* If signalLinkClicked() sets follow_link to false, the current page should NOT change.
* Otherwise it should be changed to the new link value.
*/
- void signalLinkClicked ( const QString & newlink, bool& follow_link );
+ void signalLinkClicked ( const TQString & newlink, bool& follow_link );
private slots:
- virtual void slotLinkClicked ( const QString & newlink);
+ virtual void slotLinkClicked ( const TQString & newlink);
virtual void onOpenURLRequest( const KURL &, const KParts::URLArgs & );
- virtual void onPopupMenu ( const QString & url, const QPoint & point );
+ virtual void onPopupMenu ( const TQString & url, const TQPoint & point );
private:
- void setSource ( const QString & name );
+ void setSource ( const TQString & name );
int m_zoomfactor;
bool m_searchForward;
- QString m_searchText;
+ TQString m_searchText;
const LCHMTextEncoding * m_currentEncoding;
};