File: PRCEqualize.m

package info (click to toggle)
price.app 1.1.0-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 1,676 kB
  • ctags: 42
  • sloc: objc: 7,974; ansic: 192; makefile: 40
file content (65 lines) | stat: -rw-r--r-- 1,595 bytes parent folder | download | duplicates (4)
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
//
//  PRCEqualize.m
//  PRICE
//  Image Equalization Controller
//
//  Created by Riccardo Mottola on Fri Dec 05 2003.
//  Copyright (c) 2003-2010 Carduus. All rights reserved.
//
// This application is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

#import "PRCEqualize.h"
#import "PREqualize.h"
#import "MyDocument.h"

@implementation PRCEqualize

- (id)init
{
  if ((self = [super init]))
  {
    filter = [[PREqualize alloc] init];
  }
  return self;
}

- (IBAction)showFilter:(id)sender
{
  [super showFilter:sender];
  
    if (!equalWindow)
        [NSBundle loadNibNamed:@"Equalize" owner:self];
    [equalWindow makeKeyAndOrderFront:nil];

    [self parametersChanged:self];
}

- (NSArray *)encodeParameters
{
  NSArray    *parameters;
  int        index;
  int        space;
  
  index = [colorSpaceChoice indexOfSelectedItem];
  space = COLOR_SPACE_RGB;
  if (index == 0)
    space = COLOR_SPACE_RGB;
  else if (index == 1)
    space = COLOR_SPACE_YUV;
  
  /* encode parameters */
  parameters = [NSArray arrayWithObjects:
    [NSNumber numberWithInt:space],
    nil];
  
  return parameters;
}


- (void)closeFilterPanel
{
    [equalWindow performClose:nil];
}

@end