[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kparts
From: Dawit Alemayehu <adawit () kde ! org>
Date: 2010-10-27 20:25:20
Message-ID: 20101027202520.E39A9AC89A () svn ! kde ! org
[Download RAW message or body]
SVN commit 1190484 by adawit:
- Added a new member function, hasSelection(), to HtmlExtension.
- Added a default "None" enumerator to QueryMethod to inidcated no querying is \
supported. Some implementations such as kget integration with Dolphin require the \
ability to change what query methods supported based on what is currently displayed, \
a local resource (file) or remote ones (ftp/sftp).
CCMAIL:dfaure@kde.org
M +5 -0 htmlextension.cpp
M +17 -2 htmlextension.h
--- trunk/KDE/kdelibs/kparts/htmlextension.cpp #1190483:1190484
@@ -35,6 +35,11 @@
{
}
+bool HtmlExtension::hasSelection() const
+{
+ return false;
+}
+
HtmlExtension * KParts::HtmlExtension::childObject( QObject *obj )
{
return KGlobal::findDirectChild<KParts::HtmlExtension *>(obj);
--- trunk/KDE/kdelibs/kparts/htmlextension.h #1190483:1190484
@@ -55,8 +55,22 @@
*/
static HtmlExtension *childObject( QObject *obj );
+ /**
+ * Returns the current base url of the part that implements this extension.
+ *
+ * This function is mostly used to resolve any relative URLs that might be
+ * returned when querying the part for URLs or links.
+ */
virtual KUrl baseUrl() const = 0;
+ /**
+ * Returns true if portions of the content in part that implements
+ * this extension are selected.
+ *
+ * By default this function returns false.
+ */
+ virtual bool hasSelection() const;
+
private:
// for future extensions
HtmlExtensionPrivate* const d;
@@ -82,8 +96,9 @@
* Query methods.
*/
enum QueryMethod {
- EntireContent = 0x01, /*!< Query the entire content. */
- SelectedContent = 0x02 /*!< Query only the user selected content, if \
any. */ + None = 0x00, /*!< Quering is not possible. */
+ EntireContent = 0x01, /*!< Query or can query the entire content. \
*/ + SelectedContent = 0x02 /*!< Query or can query only the user \
selected content, if any. */ };
Q_DECLARE_FLAGS(QueryMethods, QueryMethod)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic