| 1 | // -*- c-basic-offset:4; indent-tabs-mode:nil -*- |
|---|---|
| 2 | /* |
| 3 | This file is part of the KDE libraries |
| 4 | SPDX-FileCopyrightText: 2013 Jignesh Kakadiya <jigneshhk1992@gmail.com> |
| 5 | |
| 6 | SPDX-License-Identifier: LGPL-2.0-only |
| 7 | */ |
| 8 | #ifndef __kbookmarkdialog_p_h__ |
| 9 | #define __kbookmarkdialog_p_h__ |
| 10 | |
| 11 | #include "kbookmark.h" |
| 12 | #include "kbookmarkowner.h" |
| 13 | #include <QDialog> |
| 14 | |
| 15 | class KBookmarkDialog; |
| 16 | class KBookmarkManager; |
| 17 | class QDialogButtonBox; |
| 18 | class QLabel; |
| 19 | class QTreeWidget; |
| 20 | class QLineEdit; |
| 21 | class QTreeWidgetItem; |
| 22 | |
| 23 | class KBookmarkDialogPrivate |
| 24 | { |
| 25 | public: |
| 26 | explicit KBookmarkDialogPrivate(KBookmarkDialog *qq); |
| 27 | ~KBookmarkDialogPrivate(); |
| 28 | |
| 29 | typedef enum { NewFolder, NewBookmark, EditBookmark, NewMultipleBookmarks, SelectFolder } BookmarkDialogMode; |
| 30 | |
| 31 | void initLayout(); |
| 32 | void initLayoutPrivate(); |
| 33 | // selects the specified bookmark in the folder tree |
| 34 | void setParentBookmark(const KBookmark &bm); |
| 35 | KBookmarkGroup parentBookmark(); |
| 36 | void fillGroup(QTreeWidgetItem *parentItem, const KBookmarkGroup &group, const KBookmarkGroup &selectGroup = KBookmarkGroup()); |
| 37 | |
| 38 | KBookmarkDialog *const q; |
| 39 | BookmarkDialogMode mode; |
| 40 | QDialogButtonBox *buttonBox = nullptr; |
| 41 | QLineEdit *url = nullptr; |
| 42 | QLineEdit *title = nullptr; |
| 43 | QLineEdit *comment = nullptr; |
| 44 | QLabel *titleLabel = nullptr; |
| 45 | QLabel *urlLabel = nullptr; |
| 46 | QLabel *commentLabel; |
| 47 | QString icon; |
| 48 | QTreeWidget *folderTree = nullptr; |
| 49 | KBookmarkManager *mgr = nullptr; |
| 50 | KBookmark bm; |
| 51 | QList<KBookmarkOwner::FutureBookmark> list; |
| 52 | bool layout; |
| 53 | }; |
| 54 | |
| 55 | #endif |
| 56 |
