Debian Codegraph @

include/BookmarksPanel/BookmarksWidget.h

raw symbols SCIP
1 /*
2 * Copyright 2014 Mihai Niculescu <[email protected]>
3 *
4 * This file is part of EqualX Project (https://launchpad.net/equalx/)
5 *
6 * EqualX is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * EqualX is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #ifndef BOOKMARKSWIDGET_H
21 #define BOOKMARKSWIDGET_H
22
23 #include <QModelIndex>
24 #include <QWidget>
25 #include <QTimer>
26
27 namespace Ui {
28 class BookmarksWidget;
29 }
30
31 class QStandardItemModel;
32 class QActionGroup;
33 class QAction;
34
35 class BookmarksItemModel;
36 class DialogPreferencesFolder;
37 class DialogPreferencesBookmark;
38
39 class LibraryManager;
40 class LibraryModelData;
41
42 class BookmarksWidget : public QWidget
43 {
44 Q_OBJECT
45
46 public:
47 explicit BookmarksWidget(QWidget *parent = 0);
48 ~BookmarksWidget();
49
50 public slots:
51 void onDoubleClick(const QModelIndex& index);
52
53 void onOpen();
54 void onNewFolder();
55 void onCut();
56 void onCopy();
57 void onPaste();
58 void onDelete();
59 void onProperties();
60
61 void resetAutoSearchTimer(const QString&);
62
63 protected slots:
64 void searchBookmarks();
65
66 signals:
67 void activated(int);
68
69 protected:
70 void setupContextMenuActions();
71 void setupBookmarksSearchFields();
72
73 /*
74 void dragEnterEvent(QDragEnterEvent *event);
75 void dragLeaveEvent(QDragLeaveEvent *);
76 void dropEvent(QDropEvent *ev);
77 */
78 private:
79 Ui::BookmarksWidget *ui;
80 BookmarksItemModel* mModel;
81 QStandardItemModel* mSearchModel;
82 DialogPreferencesFolder* mDgPreferencesFolder;
83 DialogPreferencesBookmark* mDgPreferencesBookmark;
84 QActionGroup * mActionsGroupSearchBy;
85 QAction* mActionSearchByContent;
86
87 QModelIndex mCopiedRow;
88 bool mIsCutActive;
89
90 QTimer mAutoSearchTimer;
91 };
92
93 #endif // BOOKMARKSWIDGET_H