Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/menus/menuenums.h
- This file was moved from kmymoney/menuenums.h.
1 | /*************************************************************************** | 1 | /*************************************************************************** | ||
---|---|---|---|---|---|
2 | menuenums.h | 2 | menuenums.h | ||
3 | ------------------- | 3 | ------------------- | ||
4 | copyright : (C) 2017 by Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com> | 4 | copyright : (C) 2017, 2018 by Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com> | ||
5 | 5 | | |||
6 | ***************************************************************************/ | 6 | ***************************************************************************/ | ||
7 | 7 | | |||
8 | /*************************************************************************** | 8 | /*************************************************************************** | ||
9 | * * | 9 | * * | ||
10 | * This program is free software; you can redistribute it and/or modify * | 10 | * This program is free software; you can redistribute it and/or modify * | ||
11 | * it under the terms of the GNU General Public License as published by * | 11 | * it under the terms of the GNU General Public License as published by * | ||
12 | * the Free Software Foundation; either version 2 of the License, or * | 12 | * the Free Software Foundation; either version 2 of the License, or * | ||
13 | * (at your option) any later version. * | 13 | * (at your option) any later version. * | ||
14 | * * | 14 | * * | ||
15 | ***************************************************************************/ | 15 | ***************************************************************************/ | ||
16 | 16 | | |||
17 | #ifndef MENUENUMS_H | 17 | #ifndef MENUENUMS_H | ||
18 | #define MENUENUMS_H | 18 | #define MENUENUMS_H | ||
19 | 19 | | |||
20 | #include "kmm_menus_export.h" | ||||
20 | #include <QHashFunctions> | 21 | #include <QHashFunctions> | ||
22 | #include <QHash> | ||||
23 | | ||||
21 | class QAction; | 24 | class QAction; | ||
22 | class QMenu; | 25 | class QMenu; | ||
23 | 26 | | |||
24 | namespace eMenu { | 27 | namespace eMenu { | ||
25 | enum class Action { | 28 | enum class Action { | ||
26 | // ************* | 29 | // ************* | ||
27 | // The File menu | 30 | // The File menu | ||
28 | // ************* | 31 | // ************* | ||
▲ Show 20 Lines • Show All 110 Lines • ▼ Show 20 Line(s) | 132 | enum class Menu { | |||
139 | MarkTransaction, | 142 | MarkTransaction, | ||
140 | MarkTransactionContext, | 143 | MarkTransactionContext, | ||
141 | OnlineJob | 144 | OnlineJob | ||
142 | }; | 145 | }; | ||
143 | 146 | | |||
144 | inline uint qHash(const Menu key, uint seed) { return ::qHash(static_cast<uint>(key), seed); } | 147 | inline uint qHash(const Menu key, uint seed) { return ::qHash(static_cast<uint>(key), seed); } | ||
145 | } | 148 | } | ||
146 | 149 | | |||
147 | extern QHash<eMenu::Action, QAction *> pActions; | 150 | KMM_MENUS_EXPORT extern QHash<eMenu::Action, QAction *> pActions; | ||
148 | extern QHash<eMenu::Menu, QMenu *> pMenus; | 151 | KMM_MENUS_EXPORT extern QHash<eMenu::Menu, QMenu *> pMenus; | ||
149 | 152 | | |||
150 | #endif | 153 | #endif |