File indexing completed on 2024-05-12 16:44:10

0001 /*
0002     SPDX-FileCopyrightText: 2017 Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com>
0003     SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 
0006 #ifndef WIDGETENUMS_H
0007 #define WIDGETENUMS_H
0008 
0009 #include <qnamespace.h>
0010 
0011 namespace eWidgets {
0012 
0013 enum class SortField {
0014     Unknown = 0,      ///< unknown sort criteria
0015     PostDate = 1,     ///< sort by post date
0016     EntryDate,        ///< sort by entry date
0017     Payee,            ///< sort by payee name
0018     Value,            ///< sort by value
0019     NoSort,               ///< sort by number field
0020     EntryOrder,       ///< sort by entry order
0021     Type,             ///< sort by CashFlowDirection
0022     Category,         ///< sort by Category
0023     ReconcileState,   ///< sort by reconciliation state
0024     Security,         ///< sort by security (only useful for investment accounts)
0025     // insert new values in front of this line
0026     MaxFields,
0027 };
0028 
0029 namespace eTransaction {
0030 enum class Column {
0031     Number = 0,
0032     Date,
0033     Account,
0034     Security,
0035     Detail,
0036     ReconcileFlag,
0037     Payment,
0038     Deposit,
0039     Quantity,
0040     Price,
0041     Value,
0042     Balance,
0043     // insert new values above this line
0044     LastColumn,
0045 };
0046 }
0047 
0048 namespace eTransactionForm {
0049 enum class Column {
0050     Label1 = 0,
0051     Value1,
0052     Label2,
0053     Value2,
0054     // insert new values above this line
0055     LastColumn,
0056 };
0057 }
0058 
0059 namespace eTabBar {
0060 enum class SignalEmission {
0061     Normal = 0,      // standard signal behaviour
0062     Never,           // don't signal selection of a tab at all
0063     Always,          // always signal selection of a tab
0064 };
0065 }
0066 
0067 namespace eRegister {
0068 enum class ItemState {
0069     Any,
0070     Imported,
0071     Matched,
0072     Erroneous,
0073     NotMarked,
0074     NotReconciled,
0075     Cleared,
0076     Scheduled,
0077 };
0078 
0079 enum class Action {
0080     None = -1,
0081     Check = 0,
0082     /* these should be values which qt 3.3 never uses for QTab:
0083      * qt starts upwards from 0
0084      */
0085     Deposit = 12201,
0086     Transfer = 12202,
0087     Withdrawal = 12203,
0088     Atm,
0089     // insert new values above this line
0090     LastAction,
0091 };
0092 
0093 enum class CashFlowDirection {
0094     Deposit = 0,          //< transaction is deposit
0095     Payment,              //< transaction is payment
0096     Unknown,              //< transaction cashflow is unknown
0097 };
0098 
0099 enum class DetailColumn {
0100     PayeeFirst = 0,       ///< show the payee on the first row of the transaction in the details column and the account on the second
0101     AccountFirst,         ///< show the account on the first row of the transaction in the details column and the payee on the second
0102 };
0103 }
0104 
0105 namespace ValidationFeedback {
0106 enum class MessageType {
0107     None,
0108     Positive,
0109     Information,
0110     Warning,
0111     Error,
0112 };
0113 }
0114 
0115 namespace Selector {
0116 enum class Role {
0117     Id = Qt::UserRole,      /**< The id is stored in this role in column 0 as a string.*/
0118     Key = Qt::UserRole + 1, /**< The key is stored in this role in column 0 as a string.*/
0119 };
0120 }
0121 
0122 }
0123 
0124 #endif