Source

headstak / StakItem.h

Full commit
/**
 headstak - a stack for your head
 
 Copyright (C) 2012 dreadtech.com
 
 This program 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 3 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.
 
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 **/
//
//  StakItem.h
//  headstak
//
//  Created by Veghead on 3/11/12.


#import <Foundation/Foundation.h>

@class StakItemView;
@class StakView;
@class StakDB;

@interface StakItem : NSDictionary
{
    StakItemView *_view;
    StakDB *_db;
}

@property (nonatomic,strong) StakItemView *view;
@property (nonatomic,strong) StakDB *db;
@property (nonatomic,strong) NSString *itemDescription;
@property (nonatomic,strong) NSDate *pushTime;
@property (nonatomic,strong) NSDate *popTime;
@property (nonatomic) NSUInteger itemType;
@property (nonatomic) NSUInteger itemId;

- (StakItemView *)viewInStakView:(StakView *)stakView;
- (id)initWithDictionary:(NSDictionary *)dict inDb:(StakDB *)db;
- (id)initNewItemOfType:(NSUInteger)type inDb:(StakDB *)db;
- (void)save;
- (NSColor *)colour;

@end