aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-pdf/BookmarkMenu.cpp
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2019-04-03 15:21:17 -0400
committerKen Moore <ken@ixsystems.com>2019-04-03 15:21:17 -0400
commit8d5f1e04d7e4f24a4026804d62abe64883419bf2 (patch)
treee8de5a663e7c39db7979b61320a220bcbbdfa5ce /src-qt5/desktop-utils/lumina-pdf/BookmarkMenu.cpp
parentUpdate README.md (diff)
downloadlumina-8d5f1e04d7e4f24a4026804d62abe64883419bf2.tar.gz
lumina-8d5f1e04d7e4f24a4026804d62abe64883419bf2.tar.bz2
lumina-8d5f1e04d7e4f24a4026804d62abe64883419bf2.zip
Remove lumina-calculator and lumina-pdf from the lumina repo.
They have their own repos now (https://github.com/lumina-desktop/lumina-[pdf/calculator])
Diffstat (limited to 'src-qt5/desktop-utils/lumina-pdf/BookmarkMenu.cpp')
-rw-r--r--src-qt5/desktop-utils/lumina-pdf/BookmarkMenu.cpp58
1 files changed, 0 insertions, 58 deletions
diff --git a/src-qt5/desktop-utils/lumina-pdf/BookmarkMenu.cpp b/src-qt5/desktop-utils/lumina-pdf/BookmarkMenu.cpp
deleted file mode 100644
index bf487d2a..00000000
--- a/src-qt5/desktop-utils/lumina-pdf/BookmarkMenu.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-//===========================================
-// Lumina Desktop source code
-// Copyright (c) 2017, Ken Moore
-// Available under the 3-clause BSD license
-// See the LICENSE file for full details
-//===========================================
-
-#include "BookmarkMenu.h"
-#include "ui_BookmarkMenu.h"
-#include <LuminaXDG.h>
-#include <QPushButton>
-#include <QSplitter>
-
-BookmarkMenu::BookmarkMenu(Renderer *Backend, QWidget *parent)
- : QWidget(parent), ui(new Ui::BookmarkMenu()), BACKEND(Backend) {
- ui->setupUi(this);
- connect(ui->closeButton, &QPushButton::clicked, parent, [=]() {
- static_cast<QSplitter *>(parent)->setSizes(QList<int>()
- << 0 << this->width());
- });
- connect(ui->closeButton, &QPushButton::clicked, parent, [=]() {});
- connect(ui->bookmarks, &QTreeWidget::itemClicked, this,
- [=](QTreeWidgetItem *item) {
- Backend->handleLink(parent, item->data(1, Qt::UserRole).toString());
- });
-}
-
-void BookmarkMenu::loadBookmarks() {
- QTreeWidgetItem *item = nullptr, *parent = nullptr;
- QList<Bookmark *> bookmarks = BACKEND->getBookmarks();
-
- if (ui->bookmarks->topLevelItemCount() != 0) {
- ui->bookmarks->clear();
- }
-
- // Modfiy for more than 2 levels
- if (bookmarks.empty()) {
- item = new QTreeWidgetItem(ui->bookmarks);
- item->setText(0, "No Bookmarks");
- item->setData(1, Qt::UserRole, "");
- item->setIcon(0, LXDG::findIcon("bookmark-remove"));
- } else {
- foreach (Bookmark *bm, bookmarks) {
- if (bm->level == 0) {
- item = new QTreeWidgetItem(ui->bookmarks);
- parent = item;
- } else {
- item = new QTreeWidgetItem(parent);
- }
- item->setText(0, bm->title);
- item->setData(1, Qt::UserRole, bm->link);
- if (!bm->link.isEmpty())
- item->setIcon(0, LXDG::findIcon("bookmark-new"));
- else
- item->setIcon(0, LXDG::findIcon("bookmark-remove"));
- }
- }
-}
bgstack15