-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathAppDelegate.h
97 lines (75 loc) · 3.26 KB
/
AppDelegate.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
//
// ovb3_AppDelegate.h
// ovb3
//
// Created by Jesus Renero Quintero on 28/12/11.
// Copyright 2013 Jesus Renero Quintero. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import "ActionsProxy.h"
#import "PieChart.h"
#import "BarGraph.h"
#import "YearGraph.h"
// TAB numbers.
#define TABLE_TAB 0
#define MOVEMENTS_TAB 1
#define PIECHART_TAB 2
@interface AppDelegate : NSObject <NSTabViewDelegate, NSTableViewDataSource>
{
NSWindow *window;
NSTabView *__strong tabView;
NSPersistentStoreCoordinator *persistentStoreCoordinator;
NSManagedObjectModel *managedObjectModel;
NSManagedObjectContext *managedObjectContext;
NSMutableDictionary *tableEntriesDictionary;
// Actions Proxy. All the actions detected by the Application delegate
// are sent to the actions proxy for proper handling, and avoiding
// having too much complexity here.
ActionsProxy* sendAction;
// Menu flags to control activation
BOOL matchingEnabled;
// Flag to control whether it is the first time the app executes.
BOOL MDFirstRun;
IBOutlet NSDatePicker *fromDatePick;
IBOutlet NSDatePicker *toDatePick;
IBOutlet NSSearchField *searchFieldOutlet;
IBOutlet NSArrayController *tableEntriesController;
IBOutlet NSArrayController *categoriesController;
IBOutlet NSArrayController *selectableCategoriesController;
IBOutlet NSTableView *tableView;
IBOutlet PieChart *pieChartView;
IBOutlet BarGraph *bargraphView;
IBOutlet YearGraph *yearGraphView;
}
@property (nonatomic, strong) IBOutlet NSWindow *window;
@property (strong) IBOutlet NSTabView *tabView;
@property (nonatomic, strong, readonly) NSPersistentStoreCoordinator *persistentStoreCoordinator;
@property (nonatomic, strong, readonly) NSManagedObjectModel *managedObjectModel;
@property (nonatomic, strong, readonly) NSManagedObjectContext *managedObjectContext;
@property (nonatomic, strong) NSMutableDictionary *tableEntriesDictionary;
@property (nonatomic, strong) ActionsProxy *sendAction;
@property (assign) BOOL matchingEnabled;
@property (assign) BOOL tablePopUpCellChanged;
@property (assign) BOOL MDFirstRun;
@property (nonatomic, strong) IBOutlet NSDatePicker *fromDatePick;
@property (nonatomic, strong) IBOutlet NSDatePicker *toDatePick;
@property (nonatomic, strong) IBOutlet NSSearchField *searchFieldOutlet;
@property (nonatomic, strong) IBOutlet NSArrayController *tableEntriesController;
@property (nonatomic, strong) IBOutlet NSArrayController *categoriesController;
@property (nonatomic, strong) IBOutlet NSArrayController *selectableCategoriesController;
@property (nonatomic, strong) IBOutlet NSTableView *tableView;
@property (nonatomic, strong) IBOutlet PieChart *pieChartView;
@property (nonatomic, strong) IBOutlet BarGraph *bargraphView;
@property (nonatomic, strong) IBOutlet YearGraph *yearGraphView;
@property (atomic) int selectedTab;
// -- METHODS
- (void) applicationDidFinishLaunching:(NSNotification *)aNotification;
- (NSMutableDictionary *)tableEntriesDictionary;
- (IBAction) saveAction:(id)sender;
- (IBAction) openAction:(id)sender;
- (IBAction) drawPieChartAction:(id)sender;
- (IBAction) drawYearlyDistributionAction:(id)sender;
- (IBAction) doMatchDatabaseEntries:(id)sender;
- (IBAction) selectPopUpCellAction:(id)sender;
- (NSArray *)categoriesSortDescriptors;
@end