![]() |
CatNiP docutest
Sähköinen nuottikirja, HY-TKTKL-OHTUPROJ KESÄ11
|
00001 00011 #import <UIKit/UIKit.h> 00012 00013 #import "ScoreListButton.h" 00014 00015 @class CatNiPViewController; 00016 @class LocalCompositionData; 00017 @class CompositionData; 00018 00019 @interface ScorePopoverController : UITableViewController<UITableViewDelegate, UITableViewDataSource> 00020 { 00021 NSString *composer; 00022 NSString *composition; 00023 BOOL editable; 00024 CatNiPViewController *master; 00025 CompositionData *compositionData; 00026 } 00027 /*** Master viewController for nice functions calling for loading and showing sheet music ***/ 00028 @property (nonatomic, retain) IBOutlet CatNiPViewController *master; 00029 00030 /*** Basic info about score. ***/ 00031 @property (nonatomic, retain) NSString *composer; 00032 @property (nonatomic, retain) NSString *composition; 00033 @property (nonatomic, retain) CompositionData *compositionData; 00034 00035 // 00036 @property BOOL editable; 00037 00038 /*** Basic init with masterController set ***/ 00039 - (id)initWithStyle:(UITableViewStyle)style masterController:(CatNiPViewController *)controller compositionData:(CompositionData *)compData editable:(BOOL)ed; 00040 00041 /*** UITableViewDelegate protocol's functions ***/ 00042 - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section; 00043 - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section; 00044 - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath; 00045 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath; // loads, saves and shows sheets 00046 - (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath; 00047 00048 /*** UITableViewDataSource protocol's functions ***/ 00049 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath; 00050 - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView; 00051 - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath; 00052 - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath; 00053 00054 // accessory views for cells 00055 -(UIView *)createAccessoryViewForIndexPath:(NSIndexPath *)indexPath; 00056 -(UIView *)IMSLPAccessoryViewForIndexPath:(NSIndexPath *)indexPath; 00057 -(UIView *)LocalAccessoryViewForIndexPath:(NSIndexPath *)indexPath; 00058 00059 // different IMSLP accessoryviews 00060 -(UIView *)downloadableAccessoryViewForIndexPath:(NSIndexPath *)indexPath; 00061 -(UIView *)downloadingAccessoryViewForIndexPath:(NSIndexPath *)indexPath; 00062 -(UIView *)downloadedAccessoryViewForIndexPath:(NSIndexPath *)indexPath; 00063 00064 // buttons for accessory views 00065 -(ScoreListButton *)createDetailButtonForScore:(ScoreData *)score; 00066 -(ScoreListButton *)createDownloadButtonForScore:(ScoreData *)score; 00067 -(ScoreListButton *)createAddToPlaylistButtonForScore:(ScoreData *)score; 00068 -(ScoreListButton *)createCancelButtonForScore:(ScoreData *)score ; 00069 00070 // accessory views' buttons target-action methods 00071 -(void)downloadScore:(id)button; 00072 -(void)showDetailsForScore:(id)button; 00073 -(void)addToPlaylist:(id)button; 00074 -(void)cancelDownload:(id)button; 00075 00076 // update progressbar for download 00077 -(void)updateProgressView:(NSTimer *)nt; 00078 00079 @end