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

KIO

  • kio
  • bookmarks
kbookmarkdialog.h
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 #ifndef __kbookmarkdialog_h
21 #define __kbookmarkdialog_h
22 
23 #include "kbookmark.h"
24 #include <kdialog.h>
25 #include <kurl.h>
26 
27 class KBookmarkManager;
28 class QWidget;
29 class QLabel;
30 class QTreeWidget;
31 class KLineEdit;
32 class QTreeWidgetItem;
33 class QGridLayout;
34 
44 class KIO_EXPORT KBookmarkDialog : public KDialog
45 {
46  Q_OBJECT
47 
48 public:
52  KBookmarkDialog( KBookmarkManager *, QWidget * = 0);
57  KBookmark editBookmark(const KBookmark & bm);
62  KBookmark addBookmark(const QString & title, const KUrl & url, KBookmark parent = KBookmark());
67  KBookmarkGroup addBookmarks(const QList< QPair<QString, QString> > & list, const QString & name = QString(), KBookmarkGroup parent = KBookmarkGroup());
71  KBookmarkGroup createNewFolder(const QString & name, KBookmark parent = KBookmark());
75  KBookmarkGroup selectFolder(KBookmark start = KBookmark());
76 
77 protected:
78  typedef enum { NewFolder, NewBookmark, EditBookmark, NewMultipleBookmarks, SelectFolder } BookmarkDialogMode;
85  virtual void initLayout();
91  virtual void aboutToShow(BookmarkDialogMode mode);
97  virtual void save(BookmarkDialogMode mode, const KBookmark &);
98 
102  void setParentBookmark(const KBookmark & bm);
107  KBookmarkGroup parentBookmark();
108 
109 
110  void slotButtonClicked(int);
111 
112  // TODO KDE5: move all these variables to a d pointer; make as many methods private as possible.
113  BookmarkDialogMode m_mode;
114  void fillGroup( QTreeWidgetItem * parentItem, const KBookmarkGroup &group);
115  QWidget * m_main;
116  KLineEdit * m_url;
117  KLineEdit * m_title;
118  KLineEdit * m_comment;
119  QLabel * m_titleLabel;
120  QLabel * m_urlLabel;
121  QLabel * m_commentLabel;
122  QTreeWidget * m_folderTree;
123  KBookmarkManager * m_mgr;
124  KBookmark m_bm;
125  QList<QPair<QString, QString> > m_list;
126  bool m_layout;
127  // WARNING: do not add new member variables here; replace one of the pointers with a d pointer,
128  // assuming that variable isn't used anywhere in apps...
129 
130  void initLayoutPrivate();
131 
132 protected Q_SLOTS:
133  void newFolderButton();
134 };
135 
136 #endif
137 
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Fri Jul 12 2013 08:54:02 by doxygen 1.8.3.1 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-4.10.5 API Reference

Skip menu "kdelibs-4.10.5 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
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
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