• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 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
27class KBookmarkManager;
28class QWidget;
29class QLabel;
30class QTreeWidget;
31class KLineEdit;
32class QTreeWidgetItem;
33class QGridLayout;
34
44class KIO_EXPORT KBookmarkDialog : public KDialog
45{
46 Q_OBJECT
47
48public:
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
77protected:
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
132protected Q_SLOTS:
133 void newFolderButton();
134
135private:
136 void fillGroup(QTreeWidgetItem* parentItem, const KBookmarkGroup& group, const KBookmarkGroup& selectGroup);
137};
138
139#endif
140
KBookmarkDialog
This class provides a Dialog for editing properties, adding Bookmarks and creating new folders.
Definition: kbookmarkdialog.h:45
KBookmarkDialog::m_folderTree
QTreeWidget * m_folderTree
Definition: kbookmarkdialog.h:122
KBookmarkDialog::m_titleLabel
QLabel * m_titleLabel
Definition: kbookmarkdialog.h:119
KBookmarkDialog::m_layout
bool m_layout
Definition: kbookmarkdialog.h:126
KBookmarkDialog::m_bm
KBookmark m_bm
Definition: kbookmarkdialog.h:124
KBookmarkDialog::m_commentLabel
QLabel * m_commentLabel
Definition: kbookmarkdialog.h:121
KBookmarkDialog::m_list
QList< QPair< QString, QString > > m_list
Definition: kbookmarkdialog.h:125
KBookmarkDialog::m_comment
KLineEdit * m_comment
Definition: kbookmarkdialog.h:118
KBookmarkDialog::m_mode
BookmarkDialogMode m_mode
Definition: kbookmarkdialog.h:113
KBookmarkDialog::m_urlLabel
QLabel * m_urlLabel
Definition: kbookmarkdialog.h:120
KBookmarkDialog::m_mgr
KBookmarkManager * m_mgr
Definition: kbookmarkdialog.h:123
KBookmarkDialog::m_url
KLineEdit * m_url
Definition: kbookmarkdialog.h:116
KBookmarkDialog::m_main
QWidget * m_main
Definition: kbookmarkdialog.h:115
KBookmarkDialog::BookmarkDialogMode
BookmarkDialogMode
Definition: kbookmarkdialog.h:78
KBookmarkDialog::m_title
KLineEdit * m_title
Definition: kbookmarkdialog.h:117
KBookmarkGroup
A group of bookmarks.
Definition: kbookmark.h:348
KBookmarkManager
This class implements the reading/writing of bookmarks in XML.
Definition: kbookmarkmanager.h:66
KBookmark
Definition: kbookmark.h:35
KDialog
KLineEdit
KUrl
QLabel
QList
QPair
QTreeWidget
QWidget
kbookmark.h
kdialog.h
kurl.h
addBookmark
KAction * addBookmark(const QObject *recvr, const char *slot, QObject *parent)
name
const char * name(StandardAction id)
save
KAction * save(const QObject *recvr, const char *slot, QObject *parent)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 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.14.38 API Reference

Skip menu "kdelibs-4.14.38 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