-
Notifications
You must be signed in to change notification settings - Fork 217
/
AnonymizationPanelController.mm
69 lines (49 loc) · 1.94 KB
/
AnonymizationPanelController.mm
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
/*=========================================================================
Program: OsiriX
Copyright (c) OsiriX Team
All rights reserved.
Distributed under GNU - LGPL
See http://www.osirix-viewer.com/copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
=========================================================================*/
#import "AnonymizationPanelController.h"
#import "AnonymizationViewController.h"
#import "NSFileManager+N2.h"
@interface AnonymizationPanelController ()
@property(retain,readwrite) AnonymizationViewController* anonymizationViewController;
@end
@implementation AnonymizationPanelController
@synthesize containerView;
@synthesize anonymizationViewController;
@synthesize end;
@synthesize representedObject;
-(id)initWithTags:(NSArray*)shownDcmTags values:(NSArray*)values {
return [self initWithTags:shownDcmTags values:values nibName:@"AnonymizationPanel"];
}
-(id)initWithTags:(NSArray*)shownDcmTags values:(NSArray*)values nibName:(NSString*)nibName {
self = [super initWithWindowNibName:nibName];
[self window]; // load
self.anonymizationViewController = [[[AnonymizationViewController alloc] initWithTags:shownDcmTags values:values] autorelease];
self.anonymizationViewController.view.frame = containerView.bounds;
[containerView addSubview:self.anonymizationViewController.view];
[self.anonymizationViewController adaptBoxToAnnotations];
return self;
}
-(void)dealloc {
NSLog(@"AnonymizationPanelController dealloc");
self.anonymizationViewController = NULL;
self.representedObject = NULL;
[super dealloc];
}
#pragma mark Panel
-(IBAction)actionOk:(NSView*)sender {
end = AnonymizationPanelOk;
[NSApp endSheet:self.window];
}
-(IBAction)actionCancel:(NSView*)sender {
end = AnonymizationPanelCancel;
[NSApp endSheet:self.window returnCode:NSRunAbortedResponse];
}
@end