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()));
void setText(const QString &text)
virtual QVariant htmlSettingsProperty(HtmlSettingsType type) const
Definition: khtml_ext.cpp:1212
QString i18n(const char *text)
QUrl toUrl() const
QString readPathEntry(const QString &pKey, const QString &aDefault) const
KAction * print(const QObject *recvr, const char *slot, QObject *parent)
void truncate(int position)
void writePathEntry(const QString &pKey, const QString &path, WriteConfigFlags pFlags=Normal)
virtual KActionCollection * actionCollection() const
void setSeparator(bool b)
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:1478
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:2696
QString rsqueeze(const QString &str, int maxlen=40)
virtual void saveState(QDataStream &stream)
Definition: khtml_ext.cpp:96
const QMimeData * mimeData(Mode mode) const
#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:5482
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)
virtual bool hasFormat(const QString &mimeType) const
KAction * copy(const QObject *recvr, const char *slot, QObject *parent)
QObject * sender() const
void setURLDropHandlingEnabled(bool enable)
void reserve(int alloc)
void paste()
QString & prepend(QChar ch)
QVariant data() const
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:695
virtual QueryMethods supportedQueryMethods() const
Definition: khtml_ext.cpp:1115
void setIcon(const QIcon &icon)
QString host() const
Definition: khtml_childframe_p.h:44
void reparseConfiguration()
Definition: khtml_ext.cpp:357
void setPluginsEnabled(bool enable)
Enables or disables plugins, default is enabled.
Definition: khtml_part.cpp:1382
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:5394
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
QString & remove(int position, int n)
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
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
bool isEmpty() const
KHTMLPart * findFrameParent(KParts::ReadOnlyPart *callingPart, const QString &f, khtml::ChildFrame **childFrame, bool checkForNavigation)
Definition: khtml_part.cpp:5195
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:5692
virtual ~KHTMLPartBrowserHostExtension()
Definition: khtml_ext.cpp:976
void copy()
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
bool isReadOnly() const
KParts::BrowserHostExtension * browserHostExtension() const
Definition: khtml_part.cpp:1054
KHTMLView * view() const
Returns a pointer to the HTML document's view.
Definition: khtml_part.cpp:1059
virtual Element querySelector(const QString &query, QueryMethod method) const
Definition: khtml_ext.cpp:1135
const char * name() const
int indexOf(char ch, int from) const
void editableWidgetBlurred()
QString number(int n, int base)
By far the vast majority of objects (apart from text) that authors encounter when traversing a docume...
Definition: dom_element.h:209
void append(const T &value)
void setMetaRefreshEnabled(bool enable)
Enable/disable automatic forwarding by
Definition: khtml_part.cpp:1128
QString fromUtf8(const char *str, int size)
void enableAction(const char *name, bool enabled)
QWidget * topLevelWidget() const
QClipboard * clipboard()
bool inherits(const char *className) const
void cut()
QString protocol() const
KParts::BrowserExtension * browserExtension() const
Returns a pointer to the KParts::BrowserExtension.
Definition: khtml_part.cpp:1049
void setHorizontalScrollBarPolicy(Qt::ScrollBarPolicy)
bool isEmpty() const
bool isEmpty() const
QString trimmed() const
Node item(unsigned long index) const
Returns the index th item in the collection.
Definition: dom_node.cpp:475
void setTagName(const QString &tag)
const char * constData() const
static bool runCommand(const QString &cmd, QWidget *window)
static QString selectedTextAsOneLine(KHTMLPart *part)
Definition: khtml_ext.cpp:670
void setPass(const QString &pass)
void setText(const QString &text)
QString selectedTextAsHTML() const
Return the text the user has marked.
Definition: khtml_part.cpp:3080
void setJavaEnabled(bool enable)
Enables/disables Java applet support.
Definition: khtml_part.cpp:1363
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:5863
void setMimeData(QMimeData *src, Mode mode)
void slotTriggered(QAction *action)
Definition: khtml_ext.cpp:1049
void setImageData(const QVariant &image)
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())
void setData(const QVariant &userData)
QString quoteArg(const QString &arg)
static KUriFilter * self()
bool contains(QChar ch, Qt::CaseSensitivity cs) const
void editableWidgetFocused()
void setExtensionProxy(KParts::BrowserExtension *proxyExtension)
Definition: khtml_ext.cpp:153
virtual ~KHTMLZoomFactorAction()
Definition: khtml_ext.cpp:1045
void setForcesNewWindow(bool forcesNewWindow)
bool invokeMethod(QObject *obj, const char *member, Qt::ConnectionType type, QGenericReturnArgument ret, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3, QGenericArgument val4, QGenericArgument val5, QGenericArgument val6, QGenericArgument val7, QGenericArgument val8, QGenericArgument val9)
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
QString fileName() const
Element querySelector(const DOMString &query) const
Introduced in Selectors Level 1.
Definition: dom_doc.cpp:666
QString frameName
QString text(Mode mode) const
NodeList querySelectorAll(const DOMString &query) const
Introduced in Selectors Level 1.
Definition: dom_doc.cpp:676
void setReload(bool b)
QString & replace(int position, int n, QChar after)
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:1097
bool isValid() const
void cut()
void setDNSPrefetch(DNSPrefetch pmode)
Sets whether DNS Names found in loaded documents'anchors should be pre-fetched (pre-resolved).
Definition: khtml_part.cpp:1115
QString fileName(const DirectoryOptions &options=IgnoreTrailingSlash) const
QByteArray fromBase64(const QByteArray &base64)
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:6033
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:690
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)
int length() const
const int KDE_NO_EXPORT fastZoomSizes[]
bool toBool() const
virtual QString selectedText() const
Returns the text the user has marked.
Definition: khtml_part.cpp:3098
DOM::HTMLDocument htmlDocument() const
Returns a reference to the DOM HTML document (for non-HTML documents, returns null) ...
Definition: khtml_part.cpp:1004
void setAutoloadImages(bool enable)
Specifies whether images contained in the document should be loaded automatically or not...
Definition: khtml_part.cpp:1450
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
void paste()
DOM::Document document() const
Returns a reference to the DOM document.
Definition: khtml_part.cpp:1012
bool jScriptEnabled() const
Returns true if Javascript support is enabled or false otherwise.
Definition: khtml_part.cpp:1106
void setText(const QString &text, Mode mode)
bool filterSearchUri(KUriFilterData &data)
QString url(AdjustPathOption trailing=LeaveTrailingSlash) const
bool isReadOnly() 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 copy() const
void setHtml(const QString &html)
void setNewTab(bool newTab)
bool isLocalFile() const
int size() const
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
KHTMLTextExtension(KHTMLPart *part)
Definition: khtml_ext.cpp:1060
QObject * parent() const
KHTMLHtmlExtension(KHTMLPart *part)
Definition: khtml_ext.cpp:1100
bool open()
QString toString() const
void setVerticalScrollBarPolicy(Qt::ScrollBarPolicy)
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
void setEnabled(bool)
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:5356
HTMLElement body() const
The element that contains the content for the document.
Definition: html_document.cpp:124
KHTMLPartBrowserHostExtension(KHTMLPart *part)
Definition: khtml_ext.cpp:970
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:26:18 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:26:18 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.