[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kio/bookmarks
From: Daniel Teske <teske () squorn ! de>
Date: 2007-08-31 22:26:59
Message-ID: 1188599219.434723.6963.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 707063 by teske:
Add two convenience function showInToolbar and setShowInToolbar.
Which can be used to set wheter the given bookmark is shown
in a filtered toolbar.
M +17 -0 kbookmark.cc
M +14 -0 kbookmark.h
--- trunk/KDE/kdelibs/kio/bookmarks/kbookmark.cc #707062:707063
@@ -343,6 +343,23 @@
element.setAttribute("icon", icon);
}
+bool KBookmark::showInToolbar() const
+{
+ if(element.hasAttribute("showintoolbar"))
+ {
+ bool show = element.attribute("showintoolbar") == "yes";
+ const_cast<QDomElement *>(&element)->removeAttribute("showintoolbar");
+ const_cast<KBookmark *>(this)->setShowInToolbar(show);
+ }
+ return metaDataItem("showintoolbar") == "yes";
+}
+
+
+void KBookmark::setShowInToolbar(bool show)
+{
+ setMetaDataItem("showintoolbar", show ? "yes" : "no");
+}
+
KBookmarkGroup KBookmark::parentGroup() const
{
return KBookmarkGroup( element.parentNode().toElement() );
--- trunk/KDE/kdelibs/kio/bookmarks/kbookmark.h #707062:707063
@@ -145,7 +145,21 @@
*/
void setIcon(const QString &icon);
+
/**
+ * @return if the bookmark should be shown in the toolbar
+ * (used by the filtered toolbar)
+ *
+ */
+ bool showInToolbar() const;
+
+ /**
+ * Set wheter this bookmark is show in a filterd toolbar
+ */
+ void setShowInToolbar(bool show);
+
+
+ /**
* @return the group containing this bookmark
*/
KBookmarkGroup parentGroup() const;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic