File indexing completed on 2024-12-01 12:30:22

0001 //  -*- c-basic-offset:4; indent-tabs-mode:nil -*-
0002 /*
0003     This file is part of the KDE libraries
0004     SPDX-FileCopyrightText: 2013 Jignesh Kakadiya <jigneshhk1992@gmail.com>
0005 
0006     SPDX-License-Identifier: LGPL-2.0-only
0007 */
0008 #ifndef __kbookmarkdialog_p_h__
0009 #define __kbookmarkdialog_p_h__
0010 
0011 #include "kbookmark.h"
0012 #include <QDialog>
0013 
0014 class KBookmarkDialog;
0015 class KBookmarkManager;
0016 class QDialogButtonBox;
0017 class QLabel;
0018 class QTreeWidget;
0019 class QLineEdit;
0020 class QTreeWidgetItem;
0021 
0022 class KBookmarkDialogPrivate
0023 {
0024 public:
0025     explicit KBookmarkDialogPrivate(KBookmarkDialog *qq);
0026     ~KBookmarkDialogPrivate();
0027 
0028     typedef enum { NewFolder, NewBookmark, EditBookmark, NewMultipleBookmarks, SelectFolder } BookmarkDialogMode;
0029 
0030     void initLayout();
0031     void initLayoutPrivate();
0032     // selects the specified bookmark in the folder tree
0033     void setParentBookmark(const KBookmark &bm);
0034     KBookmarkGroup parentBookmark();
0035     void fillGroup(QTreeWidgetItem *parentItem, const KBookmarkGroup &group, const KBookmarkGroup &selectGroup = KBookmarkGroup());
0036 
0037     KBookmarkDialog *const q;
0038     BookmarkDialogMode mode;
0039     QDialogButtonBox *buttonBox = nullptr;
0040     QLineEdit *url = nullptr;
0041     QLineEdit *title = nullptr;
0042     QLineEdit *comment = nullptr;
0043     QLabel *titleLabel = nullptr;
0044     QLabel *urlLabel = nullptr;
0045     QLabel *commentLabel;
0046     QString icon;
0047     QTreeWidget *folderTree = nullptr;
0048     KBookmarkManager *mgr = nullptr;
0049     KBookmark bm;
0050     QList<KBookmarkOwner::FutureBookmark> list;
0051     bool layout;
0052 };
0053 
0054 #endif