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

KIO

  • sources
  • kde-4.14
  • kdelibs
  • 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 private:
136  void fillGroup(QTreeWidgetItem* parentItem, const KBookmarkGroup& group, const KBookmarkGroup& selectGroup);
137 };
138 
139 #endif
140 
KBookmarkDialog::m_layout
bool m_layout
Definition: kbookmarkdialog.h:126
kdialog.h
KBookmarkDialog::m_urlLabel
QLabel * m_urlLabel
Definition: kbookmarkdialog.h:120
KBookmarkDialog::m_titleLabel
QLabel * m_titleLabel
Definition: kbookmarkdialog.h:119
QWidget
kurl.h
KBookmarkDialog::m_main
QWidget * m_main
Definition: kbookmarkdialog.h:115
name
const char * name(StandardAction id)
KBookmarkManager
This class implements the reading/writing of bookmarks in XML.
Definition: kbookmarkmanager.h:65
QGridLayout
KDialog
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
QTreeWidget
KBookmarkDialog::BookmarkDialogMode
BookmarkDialogMode
Definition: kbookmarkdialog.h:78
addBookmark
KAction * addBookmark(const QObject *recvr, const char *slot, QObject *parent)
KBookmarkGroup
A group of bookmarks.
Definition: kbookmark.h:347
QString
QList
QPair
KBookmarkDialog::m_folderTree
QTreeWidget * m_folderTree
Definition: kbookmarkdialog.h:122
KBookmarkDialog::m_list
QList< QPair< QString, QString > > m_list
Definition: kbookmarkdialog.h:125
KLineEdit
kbookmark.h
QTreeWidgetItem
KBookmarkDialog::m_comment
KLineEdit * m_comment
Definition: kbookmarkdialog.h:118
KBookmarkDialog::m_commentLabel
QLabel * m_commentLabel
Definition: kbookmarkdialog.h:121
save
KAction * save(const QObject *recvr, const char *slot, QObject *parent)
QLabel
KBookmarkDialog
This class provides a Dialog for editing properties, adding Bookmarks and creating new folders...
Definition: kbookmarkdialog.h:44
KBookmarkDialog::m_mode
BookmarkDialogMode m_mode
Definition: kbookmarkdialog.h:113
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-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:52 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
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • 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