summaryrefslogtreecommitdiffstats
path: root/src/kde
diff options
context:
space:
mode:
authorDarrell Anderson <[email protected]>2014-02-19 18:58:08 -0600
committerDarrell Anderson <[email protected]>2014-02-19 18:58:08 -0600
commit3aef1afb880077b776d9807b1186a6744d851760 (patch)
treeba6d616189cae07cc1ddf9e569890572e1941f57 /src/kde
parentb0f8ab59e81eae96dcd0adf27b29f9651e550d5d (diff)
downloadkchmviewer-3aef1afb880077b776d9807b1186a6744d851760.tar.gz
kchmviewer-3aef1afb880077b776d9807b1186a6744d851760.zip
Add help handbook, add DocPath, rename files.
Diffstat (limited to 'src/kde')
-rw-r--r--src/kde/Makefile.am8
-rw-r--r--src/kde/kchmdcopiface.cpp86
-rw-r--r--src/kde/kchmdcopiface.h59
-rw-r--r--src/kde/kchmdcopiface_skel.cpp98
-rw-r--r--src/kde/kchmviewwindow_tdehtmlpart.cpp163
-rw-r--r--src/kde/kchmviewwindow_tdehtmlpart.h118
6 files changed, 0 insertions, 532 deletions
diff --git a/src/kde/Makefile.am b/src/kde/Makefile.am
deleted file mode 100644
index 8524867..0000000
--- a/src/kde/Makefile.am
+++ /dev/null
@@ -1,8 +0,0 @@
-lib_LIBRARIES=libkdeextra.a
-libkdeextra_a_SOURCES = kchmdcopiface.cpp kchmdcopiface.skel kchmviewwindow_tdehtmlpart.cpp
-noinst_HEADERS = kchmdcopiface.h kchmviewwindow_tdehtmlpart.h
-
-INCLUDES = $(QT_INCLUDES) $(CHM_INCLUDES) $(KDE_INCLUDES) $(LIBCHMFILE_INCLUDES)
-
-METASOURCES = AUTO
-KDE_OPTIONS = qtonly
diff --git a/src/kde/kchmdcopiface.cpp b/src/kde/kchmdcopiface.cpp
deleted file mode 100644
index d6a90da..0000000
--- a/src/kde/kchmdcopiface.cpp
+++ /dev/null
@@ -1,86 +0,0 @@
-/***************************************************************************
- * Copyright (C) 2004-2005 by Georgy Yunaev, [email protected] *
- * Please do not use email address above for bug reports; see *
- * the README file *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License *
- * along with this program; if not, write to the *
- * Free Software Foundation, Inc., *
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
- ***************************************************************************/
-
-#include "kchmdcopiface.h"
-#include "kchmdcopiface.moc"
-
-#include "kchmmainwindow.h"
-#include "kchmsearchwindow.h"
-
-
-KCHMDCOPIface::KCHMDCOPIface(TQObject *parent, const char *name)
- : TQObject(parent, name), DCOPObject( "KCHMDCOPIface" )
-{
-}
-
-
-KCHMDCOPIface::~KCHMDCOPIface()
-{
-}
-
-
-void KCHMDCOPIface::loadHelpFile( const TQString & filename, const TQString & page2open )
-{
- TQStringList args;
-
- args.push_back( filename );
- args.push_back( page2open );
-
- tqApp->postEvent( ::mainWindow, new KCHMUserEvent( "loadAndOpen", args ) );
-}
-
-
-void KCHMDCOPIface::openPage( const TQString & page2open )
-{
- TQStringList args;
-
- args.push_back( page2open );
- tqApp->postEvent( ::mainWindow, new KCHMUserEvent( "openPage", args ) );
-}
-
-
-void KCHMDCOPIface::guiFindInIndex( const TQString & word )
-{
- TQStringList args;
-
- args.push_back( word );
- tqApp->postEvent( ::mainWindow, new KCHMUserEvent( "findInIndex", args ) );
-}
-
-
-void KCHMDCOPIface::guiSearchQuery( const TQString & query )
-{
- TQStringList args;
-
- args.push_back( query );
- tqApp->postEvent( ::mainWindow, new KCHMUserEvent( "searchQuery", args ) );
-}
-
-TQStringList KCHMDCOPIface::searchQuery( const TQString & query )
-{
- TQStringList results;
-
- if ( ::mainWindow->searchWindow()->searchQuery( query, &results ) )
- return results;
- else
- return TQStringList();
-}
-
diff --git a/src/kde/kchmdcopiface.h b/src/kde/kchmdcopiface.h
deleted file mode 100644
index 6922a82..0000000
--- a/src/kde/kchmdcopiface.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/***************************************************************************
- * Copyright (C) 2004-2005 by Georgy Yunaev, [email protected] *
- * Please do not use email address above for bug reports; see *
- * the README file *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License *
- * along with this program; if not, write to the *
- * Free Software Foundation, Inc., *
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
- ***************************************************************************/
-
-#ifndef KCHMDCOPIFACE_H
-#define KCHMDCOPIFACE_H
-
-#include <tqobject.h>
-#include <dcopobject.h>
-#include <tqstring.h>
-#include <tqstringlist.h>
-
-class KCHMDCOPIface : public TQObject, public DCOPObject
-{
- Q_OBJECT
-//
- K_DCOP
-
- public:
- KCHMDCOPIface( TQObject *parent = 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 TQString& filename, const TQString& url );
-
- //! Opens a specific \a url inside the loaded CHM file
- void openPage( const TQString& url );
-
- //! Tries to find word in index, opening the index window and scrolling it there
- void guiFindInIndex( const TQString& word );
-
- //! Executes a search in GUI. \a query contains the complete search 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
- TQStringList searchQuery( const TQString& query );
-};
-
-#endif
diff --git a/src/kde/kchmdcopiface_skel.cpp b/src/kde/kchmdcopiface_skel.cpp
deleted file mode 100644
index be1e994..0000000
--- a/src/kde/kchmdcopiface_skel.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-/****************************************************************************
-**
-** DCOP Skeleton generated by dcopidl2cpp from kchmdcopiface.kidl
-**
-** WARNING! All changes made in this file will be lost!
-**
-*****************************************************************************/
-
-#include "./kchmdcopiface.h"
-
-#include <kdatastream.h>
-
-
-static const char* const KCHMDCOPIface_ftable[6][3] = {
- { "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] = {
- 0,
- 0,
- 0,
- 0,
- 0,
-};
-
-bool KCHMDCOPIface::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
-{
- 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(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(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(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] ) { // TQStringList searchQuery(TQString)
- TQString arg0;
- TQDataStream arg( data, IO_ReadOnly );
- if (arg.atEnd()) return false;
- arg >> arg0;
- replyType = KCHMDCOPIface_ftable[4][0];
- TQDataStream _replyStream( replyData, IO_WriteOnly );
- _replyStream << searchQuery(arg0 );
- } else {
- return DCOPObject::process( fun, data, replyType, replyData );
- }
- return true;
-}
-
-QCStringList KCHMDCOPIface::interfaces()
-{
- QCStringList ifaces = DCOPObject::interfaces();
- ifaces += "KCHMDCOPIface";
- return ifaces;
-}
-
-QCStringList KCHMDCOPIface::functions()
-{
- QCStringList funcs = DCOPObject::functions();
- for ( int i = 0; KCHMDCOPIface_ftable[i][2]; i++ ) {
- if (KCHMDCOPIface_ftable_hiddens[i])
- continue;
- TQCString func = KCHMDCOPIface_ftable[i][0];
- func += ' ';
- func += KCHMDCOPIface_ftable[i][2];
- funcs << func;
- }
- return funcs;
-}
-
-
diff --git a/src/kde/kchmviewwindow_tdehtmlpart.cpp b/src/kde/kchmviewwindow_tdehtmlpart.cpp
deleted file mode 100644
index 73f136e..0000000
--- a/src/kde/kchmviewwindow_tdehtmlpart.cpp
+++ /dev/null
@@ -1,163 +0,0 @@
-/***************************************************************************
- * Copyright (C) 2004-2007 by Georgy Yunaev, [email protected] *
- * Please do not use email address above for bug reports; see *
- * the README file *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License *
- * along with this program; if not, write to the *
- * Free Software Foundation, Inc., *
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
- ***************************************************************************/
-
-#include <tqclipboard.h>
-
-#include <tdehtmlview.h>
-#include <kfinddialog.h>
-
-#include "kde-qt.h"
-#include "kchmmainwindow.h"
-#include "kchmconfig.h"
-#include "kchmviewwindow_tdehtmlpart.h"
-
-#include "kchmviewwindow_tdehtmlpart.moc"
-
-
-TQWidget * KCHMViewWindow_TDEHTMLPart::getTQWidget()
-{
- return view();
-}
-
-KCHMViewWindow_TDEHTMLPart::KCHMViewWindow_TDEHTMLPart( TQTabWidget * parent )
- : TDEHTMLPart ( parent ), KCHMViewWindow ( parent )
-{
- m_zoomfactor = 0;
- m_currentEncoding = 0;
- m_searchForward = true;
-
- invalidate();
-
- connect( browserExtension(), TQT_SIGNAL( openURLRequest( const KURL &, const KParts::URLArgs & ) ),
- this, TQT_SLOT ( onOpenURLRequest( const KURL &, const KParts::URLArgs & )) );
-
- connect( this, TQT_SIGNAL ( popupMenu ( const TQString &, const TQPoint &) ),
- this, TQT_SLOT ( onPopupMenu ( const TQString &, const TQPoint &) ) );
-}
-
-
-KCHMViewWindow_TDEHTMLPart::~KCHMViewWindow_TDEHTMLPart()
-{
-}
-
-bool KCHMViewWindow_TDEHTMLPart::openPage (const TQString& url)
-{
- // Set or change the encoding
- if ( m_currentEncoding != ::mainWindow->chmFile()->currentEncoding() )
- {
- m_currentEncoding = ::mainWindow->chmFile()->currentEncoding();
- setEncoding ( m_currentEncoding->qtcodec, TRUE );
- }
-
- TQString fullurl = "ms-its:" + ::mainWindow->getOpenedFileName() + "::" + url;
- openURL ( KURL(fullurl) );
-
- return true;
-}
-
-void KCHMViewWindow_TDEHTMLPart::setZoomFactor( int zoom )
-{
- m_zoomfactor = zoom;
-
- // Default ZoomFactor is 100, any increase or decrease should modify this value.
- TDEHTMLPart::setZoomFactor ( 100 + (m_zoomfactor * 10) );
-}
-
-void KCHMViewWindow_TDEHTMLPart::invalidate( )
-{
- m_zoomfactor = 0;
- m_searchForward = true;
- m_searchText = TQString();
-
- setJScriptEnabled ( appConfig.m_kdeEnableJS );
- setJavaEnabled ( appConfig.m_kdeEnableJava );
- setMetaRefreshEnabled ( appConfig.m_kdeEnableRefresh );
- setPluginsEnabled ( appConfig.m_kdeEnablePlugins );
-
- KCHMViewWindow::invalidate( );
-}
-
-int KCHMViewWindow_TDEHTMLPart::getScrollbarPosition( )
-{
- return view()->contentsY ();
-}
-
-void KCHMViewWindow_TDEHTMLPart::setScrollbarPosition( int pos )
-{
- view()->scrollBy (0, pos);
-}
-
-void KCHMViewWindow_TDEHTMLPart::addZoomFactor( int value )
-{
- setZoomFactor( m_zoomfactor + value);
-}
-
-bool KCHMViewWindow_TDEHTMLPart::printCurrentPage()
-{
- view()->print();
- return true;
-}
-
-void KCHMViewWindow_TDEHTMLPart::searchWord( const TQString & word, bool forward, bool )
-{
- if ( word != m_searchText || forward != m_searchForward )
- {
- m_searchText = word;
- m_searchForward = forward;
-
- findText ( word, forward ? 0 : KFindDialog::FindBackwards, ::mainWindow, 0 );
- }
-
- findTextNext ();
-}
-
-void KCHMViewWindow_TDEHTMLPart::onOpenURLRequest( const KURL & url, const KParts::URLArgs & )
-{
- bool sourcechange = true;
- emit signalLinkClicked ( url.prettyURL(), sourcechange );
-}
-
-void KCHMViewWindow_TDEHTMLPart::slotLinkClicked( const TQString & newlink )
-{
- bool notused;
- emit signalLinkClicked (newlink, notused);
-}
-
-
-void KCHMViewWindow_TDEHTMLPart::clipSelectAll()
-{
- selectAll ();
-}
-
-void KCHMViewWindow_TDEHTMLPart::clipCopy()
-{
- TQString text = selectedText();
-
- if ( !text.isEmpty() )
- TQApplication::clipboard()->setText( text );
-}
-
-void KCHMViewWindow_TDEHTMLPart::onPopupMenu ( const TQString &url, const TQPoint & point )
-{
- KTQPopupMenu * menu = getContextMenu( url, view() );
- menu->exec( point );
-}
-
diff --git a/src/kde/kchmviewwindow_tdehtmlpart.h b/src/kde/kchmviewwindow_tdehtmlpart.h
deleted file mode 100644
index 4bc45c7..0000000
--- a/src/kde/kchmviewwindow_tdehtmlpart.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/***************************************************************************
- * Copyright (C) 2004-2007 by Georgy Yunaev, [email protected] *
- * Please do not use email address above for bug reports; see *
- * the README file *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License *
- * along with this program; if not, write to the *
- * Free Software Foundation, Inc., *
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
- ***************************************************************************/
-
-#ifndef KCHMVIEWWINDOW_TDEHTMLPART_H
-#define KCHMVIEWWINDOW_TDEHTMLPART_H
-
-#include "kde-qt.h"
-
-#include "kchmviewwindow.h"
-#include "kchmsourcefactory.h"
-#include "libchmtextencoding.h"
-
-#ifdef Q_MOC_RUN
-#define USE_KDE
-#endif // Q_MOC_RUN
-
-/**
-@author Georgy Yunaev
-*/
-/*
- * For TQt-only version, we cannot compile KCHMViewWindow_TDEHTMLPart. 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
- * the class methods.
- */
-#if defined (USE_KDE)
-class KCHMViewWindow_TDEHTMLPart : public TDEHTMLPart, public KCHMViewWindow
-{
-Q_OBJECT
-
-public:
- KCHMViewWindow_TDEHTMLPart( TQTabWidget * parent );
- ~KCHMViewWindow_TDEHTMLPart();
-
- //! Open a page from current chm archive
- virtual bool openPage (const TQString& url);
-
- //! Invalidate current view, doing all the cleanups etc.
- virtual void invalidate();
-
- //! Return current ZoomFactor.
- virtual int getZoomFactor() const { return m_zoomfactor; }
-
- //! Sets ZoomFactor. The value returned by getZoomFactor(), given to this function, should give the same result.
- virtual void setZoomFactor (int zoom);
-
- //! Relatively changes ZoomFactor. Most common values are -1 and 1.
- virtual void addZoomFactor (int value);
-
- //! 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 TQString & word, bool forward = true, bool casesensitive = false );
-
- //! Select the content of the whole page
- virtual void clipSelectAll();
-
- //! Copies the selected content to the clipboard
- virtual void clipCopy();
-
- /*!
- * Return current scrollbar position in view window. Saved on program exit.
- * There is no restriction on returned value, except that giving this value to
- * setScrollbarPosition() should move the scrollbar in the same position.
- */
- virtual int getScrollbarPosition();
-
- //! Sets the scrollbar position.
- virtual void setScrollbarPosition(int pos);
-
- virtual TQObject * getTQObject() { return this; }
- virtual TQWidget * getTQWidget();
-
-signals:
- /*!
- * Emitted when the user clicked on the link, before the page changed.
- * 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 TQString & newlink, bool& follow_link );
-
-private slots:
- virtual void slotLinkClicked ( const TQString & newlink);
- virtual void onOpenURLRequest( const KURL &, const KParts::URLArgs & );
- virtual void onPopupMenu ( const TQString & url, const TQPoint & point );
-
-private:
- void setSource ( const TQString & name );
-
- int m_zoomfactor;
- bool m_searchForward;
- TQString m_searchText;
-
- const LCHMTextEncoding * m_currentEncoding;
-};
-
-#endif /* USE_KDE */
-
-#endif /* KCHMVIEWWINDOW_TDEHTMLPART_H */