• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KIO

  • sources
  • kde-4.12
  • kdelibs
  • kio
  • bookmarks
kbookmarkdialog.cc
Go to the documentation of this file.
1 // -*- c-basic-offset:4; indent-tabs-mode:nil -*-
2 // vim: set ts=4 sts=4 sw=4 et:
3 /* This file is part of the KDE libraries
4  Copyright 2007 Daniel Teske <teske@squorn.de>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License version 2 as published by the Free Software Foundation.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 */
20 
21 #include "kbookmarkdialog.h"
22 #include "kbookmarkmanager.h"
23 #include "kbookmarkmenu.h"
24 #include "kbookmarkmenu_p.h"
25 #include <QFormLayout>
26 #include <QLabel>
27 #include <QTreeWidget>
28 #include <QHeaderView>
29 #include <klineedit.h>
30 #include <klocale.h>
31 #include <kiconloader.h>
32 #include <kinputdialog.h>
33 #include <kstandardguiitem.h>
34 
35 
36 KBookmark KBookmarkDialog::editBookmark(const KBookmark & bm)
37 {
38  if(!m_layout)
39  initLayoutPrivate();
40  setButtons( Ok | Cancel );
41  setButtonGuiItem( KDialog::Ok, KGuiItem(i18nc("@action:button", "Update" )) );
42  setCaption( i18nc("@title:window","Bookmark Properties") );
43  m_url->setVisible(!bm.isGroup());
44  m_urlLabel->setVisible(!bm.isGroup());
45  m_bm = bm;
46  m_title->setText(bm.fullText());
47  m_url->setText(bm.url().url());
48  m_comment->setVisible(true);
49  m_commentLabel->setVisible(true);
50  m_comment->setText(bm.description());
51  m_folderTree->setVisible(false);
52 
53  m_mode = EditBookmark;
54  aboutToShow(m_mode);
55 
56  if(exec() == QDialog::Accepted)
57  return m_bm;
58  else
59  return KBookmark();
60 
61 }
62 
63 KBookmark KBookmarkDialog::addBookmark(const QString & title, const KUrl & url, KBookmark parent)
64 {
65  if(!m_layout)
66  initLayoutPrivate();
67  if(parent.isNull())
68  parent = m_mgr->root();
69  setButtons( User1 | Ok | Cancel );
70  setButtonGuiItem( KDialog::Ok, KGuiItem( i18nc("@action:button", "Add" ), "bookmark-new") );
71  setCaption( i18nc("@title:window","Add Bookmark") );
72  setButtonGuiItem( User1, KGuiItem( i18nc("@action:button", "&New Folder..." ), "folder-new") );
73  m_url->setVisible(true);
74  m_urlLabel->setVisible(true);
75  m_title->setText(title);
76  m_url->setText(url.url());
77  m_comment->setText(QString());
78  m_comment->setVisible(true);
79  m_commentLabel->setVisible(true);
80  setParentBookmark(parent);
81  m_folderTree->setVisible(true);
82 
83  m_mode = NewBookmark;
84  aboutToShow(m_mode);
85 
86  if(exec() == QDialog::Accepted)
87  return m_bm;
88  else
89  return KBookmark();
90 }
91 
92 KBookmarkGroup KBookmarkDialog::addBookmarks(const QList<QPair<QString, QString> > & list, const QString & name, KBookmarkGroup parent)
93 {
94  if(!m_layout)
95  initLayoutPrivate();
96  if(parent.isNull())
97  parent = m_mgr->root();
98 
99  m_list = list;
100 
101  setButtons( User1 | Ok | Cancel);
102  setButtonGuiItem( KDialog::Ok, KGuiItem( i18nc("@action:button", "Add" ), "bookmark-new") );
103  setCaption( i18nc("@title:window","Add Bookmarks") );
104  setButtonGuiItem( User1, KGuiItem( i18nc("@action:button", "&New Folder..." ), "folder-new") );
105  m_url->setVisible(false);
106  m_urlLabel->setVisible(false);
107  m_title->setText(name);
108  m_comment->setVisible(true);
109  m_commentLabel->setVisible(true);
110  m_comment->setText(QString());
111  setParentBookmark(parent);
112  m_folderTree->setVisible(true);
113 
114  m_mode = NewMultipleBookmarks;
115  aboutToShow(m_mode);
116 
117  if(exec() == QDialog::Accepted)
118  return m_bm.toGroup();
119  else
120  return KBookmarkGroup();
121 }
122 
123 KBookmarkGroup KBookmarkDialog::selectFolder(KBookmark parent)
124 {
125  if(!m_layout)
126  initLayoutPrivate();
127  if(parent.isNull())
128  parent = m_mgr->root();
129  setButtons( User1 | Ok | Cancel );
130  setButtonGuiItem( KDialog::Ok, KStandardGuiItem::ok() );
131  setButtonGuiItem( User1, KGuiItem( i18nc("@action:button", "&New Folder..." ), "folder-new") );
132  setCaption( i18nc("@title:window","Select Folder"));
133  m_url->setVisible(false);
134  m_urlLabel->setVisible(false);
135  m_title->setVisible(false);
136  m_titleLabel->setVisible(false);
137  m_comment->setVisible(false);
138  m_commentLabel->setVisible(false);
139  setParentBookmark(parent);
140  m_folderTree->setVisible(true);
141 
142  m_mode = SelectFolder;
143  aboutToShow(m_mode);
144 
145  if(exec() == QDialog::Accepted)
146  return m_bm.toGroup();
147  else
148  return KBookmarkGroup();
149 }
150 
151 KBookmarkGroup KBookmarkDialog::createNewFolder(const QString & name, KBookmark parent)
152 {
153  if(!m_layout)
154  initLayoutPrivate();
155  if(parent.isNull())
156  parent = m_mgr->root();
157  setButtons( Ok | Cancel );
158  setButtonGuiItem( KDialog::Ok, KStandardGuiItem::ok() );
159  setCaption( i18nc("@title:window","New Folder"));
160  m_url->setVisible(false);
161  m_urlLabel->setVisible(false);
162  m_comment->setVisible(true);
163  m_commentLabel->setVisible(true);
164  m_comment->setText(QString());
165  m_title->setText(name);
166  setParentBookmark(parent);
167  m_folderTree->setVisible(true);
168 
169  m_mode = NewFolder;
170  aboutToShow(m_mode);
171 
172  if(exec() == QDialog::Accepted)
173  return m_bm.toGroup();
174  else
175  return KBookmarkGroup();
176 }
177 
178 void KBookmarkDialog::setParentBookmark(const KBookmark & bm)
179 {
180  QString address = bm.address();
181  KBookmarkTreeItem * item = static_cast<KBookmarkTreeItem *>(m_folderTree->topLevelItem(0));
182  while(true)
183  {
184  if(item->address() == bm.address())
185  {
186  m_folderTree->setCurrentItem(item);
187  return;
188  }
189  for(int i=0; i<item->childCount(); ++i)
190  {
191  KBookmarkTreeItem * child = static_cast<KBookmarkTreeItem *>(item->child(i));
192  if( KBookmark::commonParent(child->address(), address) == child->address())
193  {
194  item = child;
195  break;
196  }
197  }
198  }
199 }
200 
201 KBookmarkGroup KBookmarkDialog::parentBookmark()
202 {
203  KBookmarkTreeItem *item = dynamic_cast<KBookmarkTreeItem *>(m_folderTree->currentItem());
204  if(!item)
205  return m_mgr->root();
206  const QString &address = item->address();
207  return m_mgr->findByAddress(address).toGroup();
208 }
209 
210 void KBookmarkDialog::slotButtonClicked(int button)
211 {
212  if(button == Ok)
213  {
214  if(m_mode == NewFolder)
215  {
216  KBookmarkGroup parent = parentBookmark();
217  if(m_title->text().isEmpty())
218  m_title->setText("New Folder");
219  m_bm = parent.createNewFolder(m_title->text());
220  m_bm.setDescription(m_comment->text());
221  save(m_mode, m_bm);
222  m_mgr->emitChanged(parent);
223  } else if(m_mode == NewBookmark) {
224  KBookmarkGroup parent = parentBookmark();
225  if(m_title->text().isEmpty())
226  m_title->setText("New Bookmark");
227  m_bm = parent.addBookmark(m_title->text(), KUrl(m_url->text()));
228  m_bm.setDescription(m_comment->text());
229  save(m_mode, m_bm);
230  m_mgr->emitChanged(parent);
231  } else if(m_mode == NewMultipleBookmarks) {
232  KBookmarkGroup parent = parentBookmark();
233  if(m_title->text().isEmpty())
234  m_title->setText("New Folder");
235  m_bm = parent.createNewFolder(m_title->text());
236  m_bm.setDescription(m_comment->text());
237  QList< QPair<QString, QString> >::iterator it, end;
238  end = m_list.end();
239  for(it = m_list.begin(); it!= m_list.end(); ++it)
240  {
241  m_bm.toGroup().addBookmark( (*it).first, KUrl((*it).second));
242  }
243  save(m_mode, m_bm);
244  m_mgr->emitChanged(parent);
245  } else if(m_mode == EditBookmark) {
246  m_bm.setFullText(m_title->text());
247  m_bm.setUrl(KUrl(m_url->text()));
248  m_bm.setDescription(m_comment->text());
249  save(m_mode, m_bm);
250  m_mgr->emitChanged(m_bm.parentGroup());
251  } else if(m_mode == SelectFolder) {
252  m_bm = parentBookmark();
253  save(m_mode, m_bm);
254  }
255  }
256  KDialog::slotButtonClicked(button);
257 }
258 
259 void KBookmarkDialog::save(BookmarkDialogMode , const KBookmark & )
260 {
261 
262 }
263 
264 void KBookmarkDialog::aboutToShow(BookmarkDialogMode mode)
265 {
266  Q_UNUSED(mode);
267 }
268 
269 void KBookmarkDialog::initLayout()
270 {
271  QBoxLayout *vbox = new QVBoxLayout( m_main );
272  vbox->setMargin(0);
273  QFormLayout * form = new QFormLayout();
274  vbox->addLayout(form);
275 
276  form->addRow( m_titleLabel, m_title );
277  form->addRow( m_urlLabel, m_url );
278  form->addRow( m_commentLabel, m_comment );
279 
280  vbox->addWidget(m_folderTree);
281 }
282 
283 
284 void KBookmarkDialog::initLayoutPrivate()
285 {
286  m_main = new QWidget( this );
287  setMainWidget( m_main );
288  connect( this, SIGNAL( user1Clicked() ), SLOT( newFolderButton() ) );
289 
290  m_title = new KLineEdit( m_main );
291  m_title->setMinimumWidth(300);
292  m_titleLabel = new QLabel( i18nc("@label:textbox", "Name:" ), m_main );
293  m_titleLabel->setBuddy( m_title );
294 
295  m_url = new KLineEdit( m_main );
296  m_url->setMinimumWidth(300);
297  m_urlLabel = new QLabel( i18nc("@label:textbox", "Location:" ), m_main );
298  m_urlLabel->setBuddy( m_url );
299 
300  m_comment = new KLineEdit( m_main );
301  m_comment->setMinimumWidth(300);
302  m_commentLabel = new QLabel( i18nc("@label:textbox", "Comment:" ), m_main );
303  m_commentLabel->setBuddy( m_comment );
304 
305  m_folderTree = new QTreeWidget(m_main);
306  m_folderTree->setColumnCount(1);
307  m_folderTree->header()->hide();
308  m_folderTree->setSortingEnabled(false);
309  m_folderTree->setSelectionMode( QTreeWidget::SingleSelection );
310  m_folderTree->setSelectionBehavior( QTreeWidget::SelectRows );
311  m_folderTree->setMinimumSize( 60, 100 );
312  QTreeWidgetItem *root = new KBookmarkTreeItem(m_folderTree);
313  fillGroup( root, m_mgr->root() );
314 
315  initLayout();
316  m_layout = true;
317 }
318 
319 
320 KBookmarkDialog::KBookmarkDialog(KBookmarkManager * mgr, QWidget * parent )
321  : KDialog(parent),
322  m_folderTree(0), m_mgr(mgr), m_layout(false)
323 {
324 
325 }
326 
327 void KBookmarkDialog::newFolderButton()
328 {
329 
330  QString caption = parentBookmark().fullText().isEmpty() ?
331  i18nc("@title:window","Create New Bookmark Folder" ) :
332  i18nc("@title:window","Create New Bookmark Folder in %1" ,
333  parentBookmark().text() );
334  bool ok;
335  QString text = KInputDialog::getText( caption, i18nc("@label:textbox", "New folder:" ), QString(), &ok );
336  if ( !ok )
337  return;
338 
339  KBookmarkGroup group = parentBookmark().createNewFolder(text);
340  if ( !group.isNull() )
341  {
342  KBookmarkGroup parentGroup = group.parentGroup();
343  m_mgr->emitChanged( parentGroup );
344  m_folderTree->clear();
345  QTreeWidgetItem *root = new KBookmarkTreeItem(m_folderTree);
346  fillGroup(root, m_mgr->root(), group);
347  }
348 }
349 
350 void KBookmarkDialog::fillGroup( QTreeWidgetItem * parentItem, const KBookmarkGroup &group)
351 {
352  fillGroup(parentItem, group, KBookmarkGroup());
353 }
354 
355 void KBookmarkDialog::fillGroup(QTreeWidgetItem* parentItem, const KBookmarkGroup& group, const KBookmarkGroup& selectGroup)
356 {
357  for (KBookmark bk = group.first() ; !bk.isNull() ; bk = group.next(bk)) {
358  if (bk.isGroup()) {
359  const KBookmarkGroup bkGroup = bk.toGroup();
360  QTreeWidgetItem* item = new KBookmarkTreeItem(parentItem, m_folderTree, bkGroup);
361  if (selectGroup == bkGroup) {
362  m_folderTree->setCurrentItem(item);
363  }
364  fillGroup(item, bkGroup, selectGroup);
365  }
366  }
367 }
368 
369 /********************************************************************/
370 
371 KBookmarkTreeItem::KBookmarkTreeItem(QTreeWidget * tree)
372  : QTreeWidgetItem(tree), m_address("")
373 {
374  setText(0, i18nc("name of the container of all browser bookmarks","Bookmarks"));
375  setIcon(0, SmallIcon("bookmarks"));
376  tree->expandItem(this);
377  tree->setCurrentItem( this );
378  tree->setItemSelected( this, true );
379 }
380 
381 KBookmarkTreeItem::KBookmarkTreeItem(QTreeWidgetItem * parent, QTreeWidget * tree, const KBookmarkGroup &bk)
382  : QTreeWidgetItem(parent)
383 {
384  setIcon(0, SmallIcon(bk.icon()));
385  setText(0, bk.fullText() );
386  tree->expandItem(this);
387  m_address = bk.address();
388 }
389 
390 KBookmarkTreeItem::~KBookmarkTreeItem()
391 {
392 }
393 
394 QString KBookmarkTreeItem::address()
395 {
396  return m_address;
397 }
KBookmarkDialog::m_layout
bool m_layout
Definition: kbookmarkdialog.h:126
caption
QString caption()
KBookmarkDialog::m_urlLabel
QLabel * m_urlLabel
Definition: kbookmarkdialog.h:120
KBookmarkDialog::m_titleLabel
QLabel * m_titleLabel
Definition: kbookmarkdialog.h:119
KBookmark::parentGroup
KBookmarkGroup parentGroup() const
Definition: kbookmark.cc:460
kbookmarkmanager.h
KBookmarkDialog::aboutToShow
virtual void aboutToShow(BookmarkDialogMode mode)
aboutToShow is called immediately before exec() Reimplement this to show or hide UI elements for cert...
Definition: kbookmarkdialog.cc:264
KBookmarkTreeItem::KBookmarkTreeItem
KBookmarkTreeItem(QTreeWidget *tree)
Definition: kbookmarkdialog.cc:371
KBookmarkDialog::newFolderButton
void newFolderButton()
Definition: kbookmarkdialog.cc:327
KBookmarkDialog::createNewFolder
KBookmarkGroup createNewFolder(const QString &name, KBookmark parent=KBookmark())
A dialog to create a new folder.
Definition: kbookmarkdialog.cc:151
QTreeWidget
group
KBookmarkTreeItem::address
QString address()
Definition: kbookmarkdialog.cc:394
KBookmarkDialog::m_main
QWidget * m_main
Definition: kbookmarkdialog.h:115
KBookmarkDialog::NewFolder
Definition: kbookmarkdialog.h:78
QWidget
kstandardguiitem.h
KBookmark::toGroup
KBookmarkGroup toGroup() const
Convert this to a group - do this only if isGroup() returns true.
Definition: kbookmark.cc:465
KBookmarkManager
This class implements the reading/writing of bookmarks in XML.
Definition: kbookmarkmanager.h:65
KBookmarkDialog::setParentBookmark
void setParentBookmark(const KBookmark &bm)
selects the specified bookmark in the folder tree
Definition: kbookmarkdialog.cc:178
kiconloader.h
KDialog
QString
KBookmarkDialog::save
virtual void save(BookmarkDialogMode mode, const KBookmark &)
save all your custom data in this method This is called after the users has accepted() the dialog...
Definition: kbookmarkdialog.cc:259
klocale.h
KBookmarkDialog::m_mgr
KBookmarkManager * m_mgr
Definition: kbookmarkdialog.h:123
KBookmarkDialog::m_bm
KBookmark m_bm
Definition: kbookmarkdialog.h:124
KBookmark
Definition: kbookmark.h:34
KUrl
KBookmarkDialog::m_title
KLineEdit * m_title
Definition: kbookmarkdialog.h:117
KBookmarkDialog::m_url
KLineEdit * m_url
Definition: kbookmarkdialog.h:116
i18nc
QString i18nc(const char *ctxt, const char *text)
Ok
KBookmarkDialog::slotButtonClicked
void slotButtonClicked(int)
Definition: kbookmarkdialog.cc:210
KBookmarkDialog::addBookmark
KBookmark addBookmark(const QString &title, const KUrl &url, KBookmark parent=KBookmark())
shows a add Bookmark dialog Note: That this updates the bookmark and calls KBookmarkManager::emitChan...
Definition: kbookmarkdialog.cc:63
KBookmarkDialog::NewMultipleBookmarks
Definition: kbookmarkdialog.h:78
KBookmarkDialog::BookmarkDialogMode
BookmarkDialogMode
Definition: kbookmarkdialog.h:78
KBookmark::setFullText
void setFullText(const QString &fullText)
Set the text shown for the bookmark.
Definition: kbookmark.cc:321
KBookmark::icon
QString icon() const
Definition: kbookmark.cc:348
KGuiItem
KBookmarkGroup::addBookmark
KBookmark addBookmark(const KBookmark &bm)
Create a new bookmark, as the last child of this group Don't forget to use KBookmarkManager::self()->...
Definition: kbookmark.cc:212
KBookmark::isGroup
bool isGroup() const
Whether the bookmark is a group or a normal bookmark.
Definition: kbookmark.cc:283
KBookmarkDialog::editBookmark
KBookmark editBookmark(const KBookmark &bm)
shows a propeties dialog Note: That this updates the bookmark and calls KBookmarkManager::emitChanged...
Definition: kbookmarkdialog.cc:36
KBookmarkGroup
A group of bookmarks.
Definition: kbookmark.h:347
KBookmarkDialog::SelectFolder
Definition: kbookmarkdialog.h:78
KBookmarkDialog::selectFolder
KBookmarkGroup selectFolder(KBookmark start=KBookmark())
A dialog to select a folder.
Definition: kbookmarkdialog.cc:123
KBookmarkDialog::parentBookmark
KBookmarkGroup parentBookmark()
returns the selected bookmark in the folder tree, or the root (top-level) bookmark if none was select...
Definition: kbookmarkdialog.cc:201
KInputDialog::getText
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())
KBookmarkDialog::m_folderTree
QTreeWidget * m_folderTree
Definition: kbookmarkdialog.h:122
Cancel
KBookmarkDialog::initLayoutPrivate
void initLayoutPrivate()
Definition: kbookmarkdialog.cc:284
KBookmarkDialog::addBookmarks
KBookmarkGroup addBookmarks(const QList< QPair< QString, QString > > &list, const QString &name=QString(), KBookmarkGroup parent=KBookmarkGroup())
Creates a folder from a list of bookmarks Note: That this updates the bookmark and calls KBookmarkMan...
Definition: kbookmarkdialog.cc:92
KStandardGuiItem::ok
KGuiItem ok()
KBookmarkDialog::m_list
QList< QPair< QString, QString > > m_list
Definition: kbookmarkdialog.h:125
kinputdialog.h
KBookmarkManager::findByAddress
KBookmark findByAddress(const QString &address)
Definition: kbookmarkmanager.cc:515
KBookmarkDialog::EditBookmark
Definition: kbookmarkdialog.h:78
KLineEdit
KBookmarkManager::emitChanged
void emitChanged()
Saves the bookmark file and notifies everyone.
Definition: kbookmarkmanager.cc:545
kbookmarkmenu.h
KBookmarkManager::root
KBookmarkGroup root() const
This will return the root bookmark.
Definition: kbookmarkmanager.cc:464
KBookmark::description
QString description() const
Definition: kbookmark.cc:402
KBookmarkTreeItem::~KBookmarkTreeItem
~KBookmarkTreeItem()
Definition: kbookmarkdialog.cc:390
QLabel
KBookmarkDialog::m_comment
KLineEdit * m_comment
Definition: kbookmarkdialog.h:118
KBookmarkDialog::m_commentLabel
QLabel * m_commentLabel
Definition: kbookmarkdialog.h:121
SmallIcon
QPixmap SmallIcon(const QString &name, int force_size, int state, const QStringList &overlays)
KBookmarkDialog::fillGroup
void fillGroup(QTreeWidgetItem *parentItem, const KBookmarkGroup &group)
Definition: kbookmarkdialog.cc:350
KBookmark::commonParent
static QString commonParent(const QString &A, const QString &B)
Definition: kbookmark.cc:512
QPair
KBookmarkDialog::initLayout
virtual void initLayout()
initLayout is called to set the dialog up, indepent from the mode If you want to add widgets or a cus...
Definition: kbookmarkdialog.cc:269
KBookmarkTreeItem
Definition: kbookmarkmenu_p.h:73
klineedit.h
KUrl::url
QString url(AdjustPathOption trailing=LeaveTrailingSlash) const
KBookmarkDialog::NewBookmark
Definition: kbookmarkdialog.h:78
KBookmark::setUrl
void setUrl(const KUrl &url)
Set the URL of the bookmark.
Definition: kbookmark.cc:343
kbookmarkmenu_p.h
kbookmarkdialog.h
KLineEdit::setText
virtual void setText(const QString &)
KBookmark::isNull
bool isNull() const
Definition: kbookmark.cc:295
KBookmarkGroup::next
KBookmark next(const KBookmark &current) const
Return the next sibling of a child bookmark of this group.
Definition: kbookmark.cc:123
end
const KShortcut & end()
KBookmarkGroup::first
KBookmark first() const
Return the first child bookmark of this group.
Definition: kbookmark.cc:113
KBookmarkDialog::m_mode
BookmarkDialogMode m_mode
Definition: kbookmarkdialog.h:113
KBookmarkDialog::KBookmarkDialog
KBookmarkDialog(KBookmarkManager *, QWidget *=0)
Creates a new KBookmarkDialog.
Definition: kbookmarkdialog.cc:320
KBookmark::fullText
QString fullText() const
Text shown for the bookmark, not truncated.
Definition: kbookmark.cc:311
KBookmark::address
QString address() const
Return the "address" of this bookmark in the whole tree.
Definition: kbookmark.cc:471
KBookmark::url
KUrl url() const
URL contained by the bookmark.
Definition: kbookmark.cc:338
KBookmarkGroup::createNewFolder
KBookmarkGroup createNewFolder(const QString &text)
Create a new bookmark folder, as the last child of this group.
Definition: kbookmark.cc:157
QList
KBookmark::setDescription
void setDescription(const QString &description)
Set the description of the bookmark.
Definition: kbookmark.cc:412
KRecentDirs::list
QStringList list(const QString &fileClass)
Returns a list of directories associated with this file-class.
Definition: krecentdirs.cpp:60
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:02 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KIO

Skip menu "KIO"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal