FreeDebks  1.0.3
 All Classes Files Functions Variables Friends Pages
dataDefinitions.hpp
Go to the documentation of this file.
1 // --------------------------------------------------------------------
2 // Copyright © 2011-2013 Mathieu Schopfer
3 //
4 // This file is part of FreeDebks.
5 //
6 // FreeDebks is free software: you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation, either version 3 of the License, or
9 // (at your option) any later version.
10 //
11 // FreeDebks is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with FreeDebks. If not, see <http://www.gnu.org/licenses/>.
18 // --------------------------------------------------------------------
19 
24 #ifndef DATADEFINITIONS_HPP
25 #define DATADEFINITIONS_HPP
26 
27 class FdSubWindow;
28 class FdModelCoa;
29 class FdItemCoa;
30 class FdModelJournal;
31 class FdItemJournal;
32 class FdModelResults;
33 class FdItemResults;
35 
36 #include <QStringList>
37 #include <QDate>
38 #include <QVariant>
39 #include <QSharedPointer>
40 
44 typedef QSharedPointer<FdItemCoa> FdItemCoa_p;
45 
49 typedef QSharedPointer<FdItemJournal> FdItemJournal_p;
50 
54 typedef QSharedPointer<FdItemResults> FdItemResults_p;
55 
56 #include <iostream>
57 #include <cmath>
58 
59 using namespace std;
60 
61 enum CustomRoles { ValidityRole = 32 };
62 
68 enum CoaItemType {
69  RootType = 1,
70  CategoryType = 2,
71  AccountType = 3
72 };
73 
79 enum CoaColumn {
80  CoaId = 0,
81  CoaLabel = 1,
82  CoaBalanceSheet = 2,
83  CoaSigns = 3,
84  CoaInitial = 4,
85  CoaBalance = 5,
86  CoaColumnCount = 6
87 };
88 
92 enum AccountSignature {
93  MinusPlus = -1,
94  PlusMinus = 1
95 };
96 
102 enum JournalColumn {
103  JournalDate = 0,
104  JournalObject = 1,
105  JournalLabel = 2,
106  JournalDebitId = 3,
107  JournalDebitLabel = 4,
108  JournalCreditId = 5,
109  JournalCreditLabel = 6,
110  JournalAmount = 7,
111  JournalColumnCount = 8
112 };
113 
119 enum ResultsColumn {
120  ResultsId = 0,
121  ResultsLabel = 1,
122  ResultsCalculation = 2,
123  ResultsResult = 3,
124  ResultsColumnCount = 4
125 };
126 
132 enum AccountColumn {
133  AccountDate = 0,
134  AccountLabel = 1,
135  AccountCounterpart = 2,
136  AccountDebit = 3,
137  AccountCredit = 4,
138  AccountBalance = 5,
139  AccountColumnCount = 6
140 };
141 
142 #endif // DATADEFINITIONS_HPP