akregator/src

pageviewer.h
1 /*
2  This file is part of Akregator.
3 
4  Copyright (C) 2004 Sashmit Bhaduri <smt@vfemail.net>
5  2005 Frank Osterfeld <frank.osterfeld at kdemail.net>
6 
7  This program is free software; you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation; either version 2 of the License, or
10  (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 
21  As a special exception, permission is given to link this program
22  with any edition of TQt, and distribute the resulting executable,
23  without including the source code for TQt in the source distribution.
24 */
25 
26 #ifndef PAGEVIEWER_H
27 #define PAGEVIEWER_H
28 
29 #include "viewer.h"
30 
31 
32 class TDEAction;
33 class TDEToolBarPopupAction;
34 class TQString;
35 
36 namespace Akregator
37 {
38 
39  // the back/forward navigation was taken from KDevelop. Kudos to the KDevelop team!
40  class PageViewer : public Viewer
41  {
42  TQ_OBJECT
43 
44  public:
45  PageViewer(TQWidget* parent, const char* name);
46  virtual ~PageViewer();
47  virtual bool openURL(const KURL &url);
48 
49  protected:
50 
51  class HistoryEntry;
52  void addHistoryEntry(const KURL& url);
53  void restoreHistoryEntry(const TQValueList<HistoryEntry>::Iterator& entry);
54  void updateHistoryEntry();
55 
56  protected slots:
57 
58  void slotSetCaption(const TQString& cap);
59  void slotBack();
60  void slotForward();
61  void slotReload();
62  void slotStop();
63 
64  virtual void slotPaletteOrFontChanged();
65 
66  void slotStarted(TDEIO::Job *);
67  void slotCompleted();
68  void slotCancelled(const TQString &errMsg);
69  void slotBackAboutToShow();
70  void slotForwardAboutToShow();
71  void slotPopupActivated( int id );
72  virtual void slotPopupMenu(KXMLGUIClient*, const TQPoint&, const KURL&, const KParts::URLArgs&, KParts::BrowserExtension::PopupFlags, mode_t);
73 
74  void slotGlobalBookmarkArticle();
75 
76  virtual void slotOpenURLRequest(const KURL& url, const KParts::URLArgs& args);
77  virtual void urlSelected(const TQString &url, int button, int state, const TQString &_target, KParts::URLArgs args);
78 
79  signals:
80  void setTabIcon(const TQPixmap&);
81 
82  private:
83  class PageViewerPrivate;
84  PageViewerPrivate* d;
85  };
86 }
87 
88 #endif // PAGEVIEWER_H