akregator/src

pageviewer.h

00001 /*
00002     This file is part of Akregator.
00003 
00004     Copyright (C) 2004 Sashmit Bhaduri <smt@vfemail.net>
00005                   2005 Frank Osterfeld <frank.osterfeld at kdemail.net>
00006 
00007     This program is free software; you can redistribute it and/or modify
00008     it under the terms of the GNU General Public License as published by
00009     the Free Software Foundation; either version 2 of the License, or
00010     (at your option) any later version.
00011 
00012     This program is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00015     GNU General Public License for more details.
00016 
00017     You should have received a copy of the GNU General Public License
00018     along with this program; if not, write to the Free Software
00019     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00020 
00021     As a special exception, permission is given to link this program
00022     with any edition of Qt, and distribute the resulting executable,
00023     without including the source code for Qt in the source distribution.
00024 */
00025 
00026 #ifndef PAGEVIEWER_H
00027 #define PAGEVIEWER_H
00028 
00029 #include "viewer.h"
00030 
00031 
00032 class KAction;
00033 class KToolBarPopupAction;
00034 class QString;
00035 
00036 namespace Akregator
00037 {
00038     
00039     // the back/forward navigation was taken from KDevelop. Kudos to the KDevelop team!
00040     class PageViewer : public Viewer
00041     {
00042         Q_OBJECT
00043         public:
00044             PageViewer(QWidget* parent, const char* name);
00045             virtual ~PageViewer();
00046             virtual bool openURL(const KURL &url);
00047 
00048         protected:
00049 
00050             class HistoryEntry;
00051             void addHistoryEntry(const KURL& url);
00052             void restoreHistoryEntry(const QValueList<HistoryEntry>::Iterator& entry);
00053             void updateHistoryEntry();
00054 
00055         protected slots:
00056 
00057             void slotSetCaption(const QString& cap);
00058             void slotBack();
00059             void slotForward();
00060             void slotReload();
00061             void slotStop();
00062 
00063             virtual void slotPaletteOrFontChanged();
00064 
00065             void slotStarted(KIO::Job *);
00066             void slotCompleted();
00067             void slotCancelled(const QString &errMsg);
00068             void slotBackAboutToShow();
00069             void slotForwardAboutToShow();
00070             void slotPopupActivated( int id );
00071             virtual void slotPopupMenu(KXMLGUIClient*, const QPoint&, const KURL&, const KParts::URLArgs&, KParts::BrowserExtension::PopupFlags, mode_t);
00072             
00073             void slotGlobalBookmarkArticle();
00074             
00075             virtual void slotOpenURLRequest(const KURL& url, const KParts::URLArgs& args);
00076             virtual void urlSelected(const QString &url, int button, int state, const QString &_target, KParts::URLArgs args);
00077             
00078         signals:
00079             void setTabIcon(const QPixmap&);
00080 
00081         private:
00082             class PageViewerPrivate;
00083             PageViewerPrivate* d;
00084     };
00085 }
00086 
00087 #endif // PAGEVIEWER_H
KDE Home | KDE Accessibility Home | Description of Access Keys