Temp commit
This commit is contained in:
@@ -43,10 +43,13 @@ enum {TREE, DESCRIPTION, OP_DATE, DEBIT, CREDIT, CATEGORY, ACCOUNT, OP_DELETE, C
|
||||
|
||||
enum {GRID_ID};
|
||||
|
||||
GridAccount::GridAccount(KissCount* kiss, wxWindow *parent, wxWindowID id) : wxGrid(parent, id), _fixCosts(0), _week1(0),
|
||||
_week2(0), _week3(0), _week4(0), _parent(parent), _kiss(kiss),
|
||||
_loadOperations(false),
|
||||
_curMonth(0), _curYear(0)
|
||||
GridAccount::GridAccount(KissCount* kiss, wxWindow *parent, wxWindowID id,
|
||||
bool canAddOperation, bool setWeek, bool synchronizeWithDatabase)
|
||||
: wxGrid(parent, id), _fixCosts(0), _week1(0),
|
||||
_week2(0), _week3(0), _week4(0), _parent(parent), _kiss(kiss),
|
||||
_canAddOperation(canAddOperation), _setWeek(setWeek),
|
||||
_databaseSynchronization(synchronizeWithDatabase), _loadOperations(false),
|
||||
_curMonth(0), _curYear(0)
|
||||
{
|
||||
wxBitmap deleteBitmap(wxT(DELETE_ICON), wxBITMAP_TYPE_PNG);
|
||||
wxBitmap checkedBitmap(wxT(CHECKED_ICON), wxBITMAP_TYPE_PNG);
|
||||
@@ -174,6 +177,13 @@ int GridAccount::GetDisplayedRow(const wxString& id)
|
||||
return -1;
|
||||
}
|
||||
|
||||
void GridAccount::ClearGrid()
|
||||
{
|
||||
std::vector<Operation> operations;
|
||||
|
||||
LoadOperations(&operations, false, false, 0, 0);
|
||||
}
|
||||
|
||||
void GridAccount::LoadOperations(std::vector<Operation>* operations, bool canAddOperation, bool setWeek, int month, int year)
|
||||
{
|
||||
std::vector<Operation>::iterator it;
|
||||
|
||||
@@ -41,13 +41,15 @@ typedef void (*updateOperationFunc)(Operation* op, void** params);
|
||||
class GridAccount : public wxGrid
|
||||
{
|
||||
public:
|
||||
GridAccount(KissCount* kiss, wxWindow *parent, wxWindowID id);
|
||||
GridAccount(KissCount* kiss, wxWindow *parent, wxWindowID id,
|
||||
bool canAddOperation, bool setWeek, bool synchronizeWithDatabase);
|
||||
~GridAccount();
|
||||
|
||||
wxPen GetColGridLinePen (int col);
|
||||
wxPen GetRowGridLinePen (int row);
|
||||
|
||||
void LoadOperations(std::vector<Operation>* operations, bool canAddOperation, bool setWeek, int month, int year);
|
||||
virtual void ClearGrid();
|
||||
void LoadOperations(std::vector<Operation>* operations, int month, int year);
|
||||
void InsertOperationWithWeek(User* user, Operation& op, int line, bool fix, int month, int year) ;
|
||||
void InsertOperation(User* user, Operation& op, int line, bool fix, int month, int year) ;
|
||||
|
||||
@@ -69,6 +71,8 @@ private:
|
||||
wxWindow* _parent;
|
||||
KissCount* _kiss;
|
||||
bool _displayLines;
|
||||
bool _canAddOperation, setWeek;
|
||||
bool _databaseSynchronization;
|
||||
wxString* _categories, *_accounts;
|
||||
std::vector<Operation>* _operations;
|
||||
bool _canAddOperation, _loadOperations;
|
||||
|
||||
Reference in New Issue
Block a user