00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef VIEWER_H
00026 #define VIEWER_H
00027
00028 #include <khtml_part.h>
00029
00030 class KURL;
00031
00032 namespace KIO
00033 {
00034 class MetaData;
00035 }
00036
00037 namespace Akregator
00038 {
00039 class Viewer : public KHTMLPart
00040 {
00041 Q_OBJECT
00042 TQ_OBJECT
00043 public:
00044
00048 static void displayInExternalBrowser(const KURL &url, const TQString& mimetype=TQString());
00049
00050 Viewer(TQWidget* parent, const char* name);
00051 virtual ~Viewer();
00052
00053 virtual bool closeURL();
00054
00055
00056 public slots:
00057
00058 void slotScrollUp();
00059 void slotScrollDown();
00060 void slotZoomIn();
00061 void slotZoomOut();
00062 void slotSetZoomFactor(int percent);
00063 void slotPrint();
00064 void setSafeMode();
00065
00066 virtual void slotPaletteOrFontChanged() = 0;
00067
00068 signals:
00070 void urlClicked(const KURL& url, Viewer* viewer, bool newTab, bool background);
00071
00072 protected:
00073 int pointsToPixel(int points) const;
00074
00075 protected slots:
00076
00077
00078
00080 virtual void urlSelected(const TQString &url, int button, int state, const TQString &_target, KParts::URLArgs args);
00081
00083 virtual void slotOpenURLRequest(const KURL& url, const KParts::URLArgs& args);
00084
00085 virtual void slotPopupMenu(KXMLGUIClient*, const TQPoint&, const KURL&, const KParts::URLArgs&, KParts::BrowserExtension::PopupFlags, mode_t);
00086
00088 void slotCopyLinkAddress();
00089
00091 virtual void slotCopy();
00092
00094 virtual void slotOpenLinkInternal();
00095
00097 virtual void slotOpenLinkInBrowser();
00098
00100 virtual void slotOpenLinkInForegroundTab();
00101
00103 virtual void slotOpenLinkInBackgroundTab();
00104
00105 virtual void slotOpenLinkInThisTab();
00106
00107 virtual void slotSaveLinkAs();
00108
00110 void slotStarted(KIO::Job *);
00111
00113 void slotCompleted();
00114
00115 virtual void slotSelectionChanged();
00116
00117 protected:
00118 KURL m_url;
00119
00120 };
00121 }
00122
00123 #endif // VIEWER_H
00124