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 TQt, and distribute the resulting executable,
00023     without including the source code for TQt in the source distribution.
00024 */
00025 
00026 #ifndef PAGEVIEWER_H
00027 #define PAGEVIEWER_H
00028 
00029 #include "viewer.h"
00030 
00031 
00032 class TDEAction;
00033 class TDEToolBarPopupAction;
00034 class TQString;
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   
00044         public:
00045             PageViewer(TQWidget* parent, const char* name);
00046             virtual ~PageViewer();
00047             virtual bool openURL(const KURL &url);
00048 
00049         protected:
00050 
00051             class HistoryEntry;
00052             void addHistoryEntry(const KURL& url);
00053             void restoreHistoryEntry(const TQValueList<HistoryEntry>::Iterator& entry);
00054             void updateHistoryEntry();
00055 
00056         protected slots:
00057 
00058             void slotSetCaption(const TQString& cap);
00059             void slotBack();
00060             void slotForward();
00061             void slotReload();
00062             void slotStop();
00063 
00064             virtual void slotPaletteOrFontChanged();
00065 
00066             void slotStarted(TDEIO::Job *);
00067             void slotCompleted();
00068             void slotCancelled(const TQString &errMsg);
00069             void slotBackAboutToShow();
00070             void slotForwardAboutToShow();
00071             void slotPopupActivated( int id );
00072             virtual void slotPopupMenu(KXMLGUIClient*, const TQPoint&, const KURL&, const KParts::URLArgs&, KParts::BrowserExtension::PopupFlags, mode_t);
00073             
00074             void slotGlobalBookmarkArticle();
00075             
00076             virtual void slotOpenURLRequest(const KURL& url, const KParts::URLArgs& args);
00077             virtual void urlSelected(const TQString &url, int button, int state, const TQString &_target, KParts::URLArgs args);
00078             
00079         signals:
00080             void setTabIcon(const TQPixmap&);
00081 
00082         private:
00083             class PageViewerPrivate;
00084             PageViewerPrivate* d;
00085     };
00086 }
00087 
00088 #endif // PAGEVIEWER_H