transport: empty test for sqlite converter
[abstract.git] / view / aaTreeViewLedger.h
blobfcf09c387b024f9b95a9de972c7383a8789bfa7b
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim:set ts=2 sw=2 sts=2 et cindent tw=79 ft=cpp: */
3 /*
4 * Copyright (C) 2008 Sergey Yanovich <ynvich@gmail.com>
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 2 of the
9 * License, or (at your option) any later version.
11 * This program 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 GNU
14 * General Public License for more details.
16 * You should have received a copy of the GNU General Public
17 * License along with this program; if not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
22 #ifndef AATREEVIEWLEDGER_H
23 #define AATREEVIEWLEDGER_H 1
25 #define AA_TREEVIEWLEDGER_CID \
26 {0xe4baa3c6, 0xf605, 0x48e4, {0xb2, 0xbc, 0x2c, 0x04, 0x2e, 0x99, 0x37, 0xd2}}
27 #define AA_TREEVIEWLEDGER_CONTRACT "@aasii.org/view/tree-general-ledger;1"
29 #include "aaTreeView.h"
31 class aaITransaction;
32 class nsACString;
34 class aaTreeViewLedger : public aaTreeView
36 public:
37 aaTreeViewLedger();
38 NS_DECL_ISUPPORTS_INHERITED
40 NS_IMETHOD GetRowCount(PRInt32 *aRowCount);
42 protected:
43 NS_IMETHOD convertSortColumnToString(nsITreeColumn* col, nsACString& name) {
44 return NS_ERROR_NOT_IMPLEMENTED;
46 private:
47 virtual ~aaTreeViewLedger();
48 friend class aaViewTest;
50 static nsresult (*const colFuncs[])(aaITransaction *, PRUint32 flags,
51 nsAString &);
52 static nsresult getColumn0(aaITransaction *transaction, PRUint32 flags,
53 nsAString & _retval);
54 static nsresult getColumn1(aaITransaction *transaction, PRUint32 flags,
55 nsAString & _retval);
56 static nsresult getColumn2(aaITransaction *transaction, PRUint32 flags,
57 nsAString & _retval);
58 static nsresult getColumn3(aaITransaction *transaction, PRUint32 flags,
59 nsAString & _retval);
60 static nsresult getColumn4(aaITransaction *transaction, PRUint32 flags,
61 nsAString & _retval);
62 static nsresult getColumn5(aaITransaction *transaction, PRUint32 flags,
63 nsAString & _retval);
64 static nsresult getColumn6(aaITransaction *transaction, PRUint32 flags,
65 nsAString & _retval);
66 static nsresult getColumn7(aaITransaction *transaction, PRUint32 flags,
67 nsAString & _retval);
69 virtual nsresult doGetCellText(PRInt32 row, nsITreeColumn *col,
70 nsAString & _retval);
71 PRInt32 getIndexFromRow(PRInt32 row) const { return row / 2; }
72 PRInt32 getRowFromIndex(PRInt32 row) const { return row * 2; }
73 PRInt32 getOffsetFromRow(PRInt32 row) const {
74 return row - getRowFromIndex(getIndexFromRow(row)); }
77 #endif /* AATREEVIEWLEDGER_H */