1 /***************************************************************************
2                           viewenums.h
3                              -------------------
4     copyright            : (C) 2017 by Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com>
5 
6 ***************************************************************************/
7 
8 /***************************************************************************
9  *                                                                         *
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  *
12  *   the Free Software Foundation; either version 2 of the License, or     *
13  *   (at your option) any later version.                                   *
14  *                                                                         *
15  ***************************************************************************/
16 
17 #ifndef VIEWENUMS_H
18 #define VIEWENUMS_H
19 
20 #include <QHashFunctions>
21 
22 enum class View { Home = 0, Institutions, Accounts, Schedules, Categories, Tags,
23                   Payees, Ledgers, Investments, Reports, Budget, Forecast, OnlineJobOutbox, NewLedgers, None };
24 
qHash(const View key,uint seed)25 inline uint qHash(const View key, uint seed) { return ::qHash(static_cast<uint>(key), seed); }
26 
27 namespace eView {
28   enum class Tag { All = 0,
29                    Referenced, // used tags
30                    Unused,     // unused tags
31                    Opened,     // not closed tags
32                    Closed      // closed tags
33                  };
34 
35   enum class Intent {
36     None,
37     UpdateActions,
38     OpenContextMenu,
39     OpenObject,
40     ShowPayee,
41     ShowTransaction,
42     SynchronizeAccountInInvestmentView,
43     SynchronizeAccountInLedgersView,
44     ToggleColumn,
45     UpdateNetWorth,
46     UpdateProfit,
47     StartEnteringOverdueScheduledTransactions,
48     FinishEnteringOverdueScheduledTransactions,
49     EnterSchedule,
50     ReportProgress,
51     ReportProgressMessage,
52     SelectRegisterTransactions,
53     AccountReconciled,
54     SetOnlinePlugins
55   };
56 
57   enum class Action {
58     None,
59     Refresh,
60     SetDefaultFocus,
61     AboutToShow,
62     Print,
63     SwitchView,
64     ClosePayeeIdentifierSource,
65     EditInstitution,
66     EditSchedule,
67     CleanupBeforeFileClose,
68     InitializeAfterFileOpen,
69     DisableViewDepenedendActions,
70     ShowBalanceChart
71   };
72 
73 }
74 
75 #endif
76