source: terepaima/terepaima-0.4.16/sources/bookmarkmenu.h

desarrollostretch
Last change on this file was 1f4adec, checked in by aosorio <aosorio@…>, 8 years ago

Agregado proyecto base, esto luego del dh_make -f

  • Property mode set to 100644
File size: 1.8 KB
Line 
1/*
2
3Copyright 2014 S. Razi Alavizadeh
4Copyright 2012-2014 Adam Reichold
5
6This file is part of qpdfview.
7
8qpdfview is free software: you can redistribute it and/or modify
9it under the terms of the GNU General Public License as published by
10the Free Software Foundation, either version 2 of the License, or
11(at your option) any later version.
12
13qpdfview is distributed in the hope that it will be useful,
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License
19along with qpdfview.  If not, see <http://www.gnu.org/licenses/>.
20
21*/
22
23#ifndef BOOKMARKMENU_H
24#define BOOKMARKMENU_H
25
26#include <QMenu>
27
28#include <QPair>
29
30class QFileInfo;
31
32#include "global.h"
33
34namespace qpdfview
35{
36
37class BookmarkMenu : public QMenu
38{
39    Q_OBJECT
40
41public:
42    BookmarkMenu(const QFileInfo& fileInfo, QWidget* parent = 0);
43
44    QString absoluteFilePath() const { return menuAction()->data().toString(); }
45
46    void addJumpToPageAction(int page, const QString& label);
47    void removeJumpToPageAction(int page);
48
49signals:
50    void openTriggered(const QString& filePath);
51    void openInNewTabTriggered(const QString& filePath);
52    void jumpToPageTriggered(const QString& filePath, int page);
53    void removeBookmarkTriggered(const QString& filePath);
54
55protected slots:
56    void on_open_triggered();
57    void on_openInNewTab_triggered();
58    void on_jumpToPage_triggered(QAction* action);
59    void on_removeBookmark_triggered();
60
61private:
62    Q_DISABLE_COPY(BookmarkMenu)
63
64    QAction* m_openAction;
65    QAction* m_openInNewTabAction;
66    QActionGroup* m_jumpToPageActionGroup;
67    QAction* m_separatorAction;
68    QAction* m_removeBookmarkAction;
69
70};
71
72} // qpdfview
73
74#endif // BOOKMARKMENU_H
Note: See TracBrowser for help on using the repository browser.