KHTML
khtml_ext.cpp
Go to the documentation of this file.
118 if ( m_editableFormWidget->inherits( "QLineEdit" ) || m_editableFormWidget->inherits( "QTextEdit" ) )
277 emit m_part->browserExtension()->openUrlRequest( url, KParts::OpenUrlArguments(), browserArgs );
332 hasSelection = static_cast<QTextEdit *>( &(*m_editableFormWidget) )->textCursor().hasSelection();
407 d->m_suggestedFilename = static_cast<khtml::CachedImage*>(ri->contentObject())->suggestedFilename();
567 if(d->m_pixmap.isNull()) { //fallback to image location if still loading the image. this will always be true if ifdef QT_NO_MIMECLIPBOARD
637 alternateProviders << "google" << "google_groups" << "google_news" << "webster" << "dmoz" << "wikipedia";
647 connect(action, SIGNAL(triggered(bool)), d->m_khtml->browserExtension(), SLOT(searchProvider()));
661 connect(action, SIGNAL(triggered(bool)), d->m_khtml->browserExtension(), SLOT(searchProvider()));
685 emit d->m_khtml->browserExtension()->openUrlRequest(selectedTextAsOneLine(d->m_khtml), KParts::OpenUrlArguments(), browserArgs);
717 saveURL( d->m_khtml->widget(), i18n( "Save Image As" ), d->m_imageURL, metaData, QString(), 0, d->m_suggestedFilename );
795 kDebug() << "slotCopyImage called when the clipboard does not support this. This should not be possible.";
882 query = KMessageBox::warningContinueCancel( parent, i18n( "A file named \"%1\" already exists. " "Are you sure you want to overwrite it?" , info.fileName() ), i18n( "Overwrite File?" ), KGuiItem(i18n( "Overwrite" )) );
934 KConfigGroup cfg = KSharedConfig::openConfig("konquerorrc", KConfig::NoGlobals)->group("HTML Settings");
943 QString errMsg=i18n("The Download Manager (%1) could not be found in your $PATH ", downloadManger);
944 QString errMsgEx= i18n("Try to reinstall it \n\nThe integration with Konqueror will be disabled.");
990 bool KHTMLPartBrowserHostExtension::openUrlInFrame(const KUrl &url, const KParts::OpenUrlArguments& arguments, const KParts::BrowserArguments &browserArguments)
995 KParts::BrowserHostExtension* KHTMLPartBrowserHostExtension::findFrameParent( KParts::ReadOnlyPart
998 KHTMLPart *parentPart = m_part->d->findFrameParent(callingPart, frame, 0, true /* navigation*/);
1009 KHTMLZoomFactorAction::KHTMLZoomFactorAction( KHTMLPart *part, bool direction, const QString &icon, const QString &text, QObject *parent )
1042 connect( selectableActionGroup(), SIGNAL(triggered(QAction*)), this, SLOT(slotTriggered(QAction*)) );
1117 return (KParts::SelectorInterface::SelectedContent | KParts::SelectorInterface::EntireContent);
1135 KParts::SelectorInterface::Element KHTMLHtmlExtension::querySelector(const QString& query, KParts::SelectorInterface::QueryMethod method) const
1167 QList<KParts::SelectorInterface::Element> KHTMLHtmlExtension::querySelectorAll(const QString& query, KParts::SelectorInterface::QueryMethod method) const
1183 WTF::RefPtr<DOM::NodeListImpl> nodes = part()->document().handle()->querySelectorAll(query, ec);
1212 QVariant KHTMLHtmlExtension::htmlSettingsProperty(HtmlSettingsInterface::HtmlSettingsType type) const
1235 bool KHTMLHtmlExtension::setHtmlSettingsProperty(HtmlSettingsInterface::HtmlSettingsType type, const QVariant& value)
1245 p->setDNSPrefetch((value.toBool() ? KHTMLPart::DNSPrefetchEnabled : KHTMLPart::DNSPrefetchDisabled));
1265 const QByteArray decodedData ((index > -1 ? QByteArray::fromBase64(data.mid(index)) : QByteArray()));
virtual QVariant htmlSettingsProperty(HtmlSettingsType type) const
Definition: khtml_ext.cpp:1212
QString i18n(const char *text)
QString readPathEntry(const QString &pKey, const QString &aDefault) const
KAction * print(const QObject *recvr, const char *slot, QObject *parent)
void writePathEntry(const QString &pKey, const QString &path, WriteConfigFlags pFlags=Normal)
virtual KActionCollection * actionCollection() const
virtual QString completeText(Format format) const
Definition: khtml_ext.cpp:1087
bool autoloadImages() const
Returns whether images contained in the document are loaded automatically or not. ...
Definition: khtml_part.cpp:1480
void setUserStyleSheet(const KUrl &url)
Sets a user defined style sheet to be used on top of the HTML 4 default style sheet.
Definition: khtml_part.cpp:2698
QString rsqueeze(const QString &str, int maxlen=40)
virtual void saveState(QDataStream &stream)
Definition: khtml_ext.cpp:96
#define KDE_NO_EXPORT
virtual void restoreState(QDataStream &stream)
Restores the KHTMLPart's previously saved state (including child frame objects) from the provided QDa...
Definition: khtml_part.cpp:5485
virtual bool openUrlInFrame(const KUrl &url, const KParts::OpenUrlArguments &arguments, const KParts::BrowserArguments &browserArguments)
Definition: khtml_ext.cpp:990
QMap< QString, QString > & metaData()
void addAction(QAction *action)
KAction * copy(const QObject *recvr, const char *slot, QObject *parent)
void setURLDropHandlingEnabled(bool enable)
Definition: khtml_part.h:283
KHTMLPartBrowserExtension(KHTMLPart *parent)
Definition: khtml_ext.cpp:73
static void saveURL(QWidget *parent, const QString &caption, const KUrl &url, const QMap< QString, QString > &metaData=KIO::MetaData(), const QString &filter=QString(), long cacheId=0, const QString &suggestedFilename=QString())
Definition: khtml_ext.cpp:859
int contentsY() const
Returns the y coordinate of the contents area point that is currently located at the top left in the ...
Definition: khtmlview.cpp:697
virtual QueryMethods supportedQueryMethods() const
Definition: khtml_ext.cpp:1115
Definition: khtml_childframe_p.h:44
const char * name(StandardAction id)
void reparseConfiguration()
Definition: khtml_ext.cpp:357
void setPluginsEnabled(bool enable)
Enables or disables plugins, default is enabled.
Definition: khtml_part.cpp:1384
static KUrl fromPath(const QString &text)
KConfigGroup group(const QByteArray &group)
static void saveUrlUsingKIO(const KUrl &srcUrl, const KUrl &destUrl, QWidget *window, const QMap< QString, QString > &metaData)
virtual void saveState(QDataStream &stream)
Saves the KHTMLPart's complete state (including child frame objects) to the provided QDataStream...
Definition: khtml_part.cpp:5397
KHTMLZoomFactorAction(KHTMLPart *part, bool direction, const QString &iconName, const QString &text, QObject *parent)
Definition: khtml_ext.cpp:1009
virtual void restoreState(QDataStream &stream)
Definition: khtml_ext.cpp:102
FileCopyJob * file_move(const KUrl &src, const KUrl &dest, int permissions=-1, JobFlags flags=DefaultFlags)
QString toLocalFile(AdjustPathOption trailing=LeaveTrailingSlash) const
static void invokeMailer(const QString &address, const QString &subject, const QByteArray &startup_id=QByteArray())
const int KDE_NO_EXPORT fastZoomSizeCount
static KHTMLSettings * defaultHTMLSettings()
Definition: khtml_global.cpp:237
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
virtual BrowserHostExtension * findFrameParent(KParts::ReadOnlyPart *callingPart, const QString &frame)
Definition: khtml_ext.cpp:995
KHTMLPart * findFrameParent(KParts::ReadOnlyPart *callingPart, const QString &f, khtml::ChildFrame **childFrame, bool checkForNavigation)
Definition: khtml_part.cpp:5198
virtual QStringList frameNames() const
Definition: khtml_ext.cpp:980
DOMString innerHTML() const
The HTML code contained in this element.
Definition: html_element.cpp:132
DOM::Node nodeUnderMouse() const
Returns the Node currently under the mouse.
Definition: khtml_part.cpp:5695
virtual ~KHTMLPartBrowserHostExtension()
Definition: khtml_ext.cpp:976
QString i18nc(const char *ctxt, const char *text)
void setPath(const QString &path)
static KParts::SelectorInterface::Element convertDomElement(const DOM::ElementImpl *domElem)
Definition: khtml_ext.cpp:1120
virtual ~KHTMLPopupGUIClient()
Definition: khtml_ext.cpp:620
KParts::BrowserHostExtension * browserHostExtension() const
Definition: khtml_part.cpp:1051
KHTMLView * view() const
Returns a pointer to the HTML document's view.
Definition: khtml_part.cpp:1056
virtual Element querySelector(const QString &query, QueryMethod method) const
Definition: khtml_ext.cpp:1135
void editableWidgetBlurred()
By far the vast majority of objects (apart from text) that authors encounter when traversing a docume...
Definition: dom_element.h:209
void setMetaRefreshEnabled(bool enable)
Enable/disable automatic forwarding by
Definition: khtml_part.cpp:1125
void enableAction(const char *name, bool enabled)
QString protocol() const
KParts::BrowserExtension * browserExtension() const
Returns a pointer to the KParts::BrowserExtension.
Definition: khtml_part.cpp:1046
Node item(unsigned long index) const
Returns the index th item in the collection.
Definition: dom_node.cpp:475
void setTagName(const QString &tag)
static bool runCommand(const QString &cmd, QWidget *window)
static QString selectedTextAsOneLine(KHTMLPart *part)
Definition: khtml_ext.cpp:670
void setPass(const QString &pass)
QString selectedTextAsHTML() const
Return the text the user has marked.
Definition: khtml_part.cpp:3083
void setJavaEnabled(bool enable)
Enables/disables Java applet support.
Definition: khtml_part.cpp:1365
QString csqueeze(const QString &str, int maxlen=40)
void openUrlRequest(const KUrl &url, const KParts::OpenUrlArguments &arguments=KParts::OpenUrlArguments(), const KParts::BrowserArguments &browserArguments=KParts::BrowserArguments())
void setFontScaleFactor(int percent)
Sets the scale factor to be applied to fonts.
Definition: khtml_part.cpp:5866
void slotTriggered(QAction *action)
Definition: khtml_ext.cpp:1049
QString getText(const QString &caption, const QString &label, const QString &value=QString(), bool *ok=0, QWidget *parent=0, QValidator *validator=0, const QString &mask=QString(), const QString &whatsThis=QString(), const QStringList &completionList=QStringList())
QString quoteArg(const QString &arg)
static KUriFilter * self()
void editableWidgetFocused()
void setExtensionProxy(KParts::BrowserExtension *proxyExtension)
Definition: khtml_ext.cpp:153
virtual ~KHTMLZoomFactorAction()
Definition: khtml_ext.cpp:1045
void setForcesNewWindow(bool forcesNewWindow)
KGuiItem ok()
The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented.
Definition: dom_node.h:963
Element querySelector(const DOMString &query) const
Introduced in Selectors Level 1.
Definition: dom_doc.cpp:653
QString frameName
NodeList querySelectorAll(const DOMString &query) const
Introduced in Selectors Level 1.
Definition: dom_doc.cpp:663
void setReload(bool b)
void triggered(Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers)
KParts::BrowserExtension::ActionGroupMap actionGroups() const
Definition: khtml_ext.cpp:688
void setJScriptEnabled(bool enable)
Enable/disable Javascript support.
Definition: khtml_part.cpp:1094
void setDNSPrefetch(DNSPrefetch pmode)
Sets whether DNS Names found in loaded documents'anchors should be pre-fetched (pre-resolved).
Definition: khtml_part.cpp:1112
QString fileName(const DirectoryOptions &options=IgnoreTrailingSlash) const
Definition: khtml_part.h:282
void selectionChanged()
QStringList frameNames() const
Returns a list of names of all frame (including iframe) objects of the current document.
Definition: khtml_part.cpp:6036
int contentsX() const
Returns the x coordinate of the contents area point that is currently located at the top left in the ...
Definition: khtmlview.cpp:692
static QString findExe(const QString &appname, const QString &pathstr=QString(), SearchOptions options=NoSearchOptions)
QueryMethod
static void detailedSorry(QWidget *parent, const QString &text, const QString &details, const QString &caption=QString(), Options options=Notify)
const int KDE_NO_EXPORT fastZoomSizes[]
virtual QString selectedText() const
Returns the text the user has marked.
Definition: khtml_part.cpp:3101
DOM::HTMLDocument htmlDocument() const
Returns a reference to the DOM HTML document (for non-HTML documents, returns null) ...
Definition: khtml_part.cpp:1001
void setAutoloadImages(bool enable)
Specifies whether images contained in the document should be loaded automatically or not...
Definition: khtml_part.cpp:1452
QAction * action(int index) const
virtual bool setHtmlSettingsProperty(HtmlSettingsType type, const QVariant &value)
Definition: khtml_ext.cpp:1235
void saveData(long id, QDataStream *str)
Save the data of cache entry id to the datastream str.
Definition: khtml_pagecache.cpp:267
KHTMLPopupGUIClient(KHTMLPart *khtml, const KUrl &url)
Definition: khtml_ext.cpp:389
DOM::Document document() const
Returns a reference to the DOM document.
Definition: khtml_part.cpp:1009
bool jScriptEnabled() const
Returns true if Javascript support is enabled or false otherwise.
Definition: khtml_part.cpp:1103
bool filterSearchUri(KUriFilterData &data)
QString url(AdjustPathOption trailing=LeaveTrailingSlash) const
virtual QList< Element > querySelectorAll(const QString &query, QueryMethod method) const
Definition: khtml_ext.cpp:1167
void sync()
void setAttribute(const QString &name, const QString &value)
void setNewTab(bool newTab)
bool isLocalFile() const
KHTMLTextExtension(KHTMLPart *part)
Definition: khtml_ext.cpp:1060
KHTMLHtmlExtension(KHTMLPart *part)
Definition: khtml_ext.cpp:1100
static int warningContinueCancel(QWidget *parent, const QString &text, const QString &caption=QString(), const KGuiItem &buttonContinue=KStandardGuiItem::cont(), const KGuiItem &buttonCancel=KStandardGuiItem::cancel(), const QString &dontAskAgainName=QString(), Options options=Notify)
virtual QString selectedText(Format format) const
Definition: khtml_ext.cpp:1076
virtual const QList< KParts::ReadOnlyPart * > frames() const
Definition: khtml_ext.cpp:985
KHTMLPart * parentPart()
Returns a pointer to the parent KHTMLPart if the part is a frame in an HTML frameset.
Definition: khtml_part.cpp:5359
HTMLElement body() const
The element that contains the content for the document.
Definition: html_document.cpp:126
KHTMLPartBrowserHostExtension(KHTMLPart *part)
Definition: khtml_ext.cpp:970
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:51:21 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:51:21 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.