1396
by Adam Reichold
Add inert infrastructure for a recently closed menu. |
1 |
/*
|
2 |
||
3 |
Copyright 2013 Adam Reichold
|
|
4 |
||
5 |
This file is part of qpdfview.
|
|
6 |
||
7 |
qpdfview is free software: you can redistribute it and/or modify
|
|
8 |
it under the terms of the GNU General Public License as published by
|
|
9 |
the Free Software Foundation, either version 2 of the License, or
|
|
10 |
(at your option) any later version.
|
|
11 |
||
12 |
qpdfview is distributed in the hope that it will be useful,
|
|
13 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15 |
GNU General Public License for more details.
|
|
16 |
||
17 |
You should have received a copy of the GNU General Public License
|
|
18 |
along with qpdfview. If not, see <http://www.gnu.org/licenses/>.
|
|
19 |
||
20 |
*/
|
|
21 |
||
22 |
#ifndef RECENTLYCLOSEDMENU_H
|
|
23 |
#define RECENTLYCLOSEDMENU_H
|
|
24 |
||
2036
by Adam Reichold
Make the recently used and closed as well as the tabs and bookmarks menus show the absolute file paths as tool tips. |
25 |
#include "miscellaneous.h" |
1396
by Adam Reichold
Add inert infrastructure for a recently closed menu. |
26 |
|
1518
by Adam Reichold
Make proper use of application and anonymous namespaces and fix a few header guards. |
27 |
namespace qpdfview |
28 |
{
|
|
29 |
||
2036
by Adam Reichold
Make the recently used and closed as well as the tabs and bookmarks menus show the absolute file paths as tool tips. |
30 |
class RecentlyClosedMenu : public ToolTipMenu |
1396
by Adam Reichold
Add inert infrastructure for a recently closed menu. |
31 |
{
|
32 |
Q_OBJECT
|
|
33 |
||
34 |
public: |
|
35 |
explicit RecentlyClosedMenu(int count, QWidget *parent = 0); |
|
36 |
||
1402
by Adam Reichold
Do some renaming and add mnemonic for recently closed menu. |
37 |
void addTabAction(QAction* tabAction); |
1397
by Adam Reichold
Flesh out interface for recently closed menu. |
38 |
|
39 |
signals: |
|
1402
by Adam Reichold
Do some renaming and add mnemonic for recently closed menu. |
40 |
void tabActionTriggered(QAction* tabAction); |
1397
by Adam Reichold
Flesh out interface for recently closed menu. |
41 |
|
1960
by Adam Reichold
Extend the recently used menu with slots to trigger the newest and oldest actions. |
42 |
public slots: |
43 |
void triggerFirstTabAction(); |
|
44 |
void triggerLastTabAction(); |
|
45 |
||
1397
by Adam Reichold
Flesh out interface for recently closed menu. |
46 |
protected slots: |
1402
by Adam Reichold
Do some renaming and add mnemonic for recently closed menu. |
47 |
void on_tabAction_triggered(QAction* tabAction); |
1397
by Adam Reichold
Flesh out interface for recently closed menu. |
48 |
void on_clearList_triggered(); |
1396
by Adam Reichold
Add inert infrastructure for a recently closed menu. |
49 |
|
50 |
private: |
|
51 |
Q_DISABLE_COPY(RecentlyClosedMenu) |
|
52 |
||
53 |
int m_count; |
|
54 |
||
1402
by Adam Reichold
Do some renaming and add mnemonic for recently closed menu. |
55 |
QActionGroup* m_tabActionGroup; |
1397
by Adam Reichold
Flesh out interface for recently closed menu. |
56 |
QAction* m_separatorAction; |
57 |
QAction* m_clearListAction; |
|
1396
by Adam Reichold
Add inert infrastructure for a recently closed menu. |
58 |
|
59 |
};
|
|
60 |
||
1518
by Adam Reichold
Make proper use of application and anonymous namespaces and fix a few header guards. |
61 |
} // qpdfview |
62 |
||
1396
by Adam Reichold
Add inert infrastructure for a recently closed menu. |
63 |
#endif // RECENTLYCLOSEDMENU_H |