CatNiP prefinal
Sähköinen nuottikirja, HY-TKTKL-OHTUPROJ KESÄ11
|
Delegate and datasource for CatNipViewController's tableviews' when LIBRARYTYPE == IMSLP. More...
#import <IMSLPDelegateDataSource.h>
Public Member Functions | |
(UITableViewCell *) | - cellForRowAtLeftTable: |
creates cell for master.libraryTableViewLeft | |
(UITableViewCell *) | - cellForRowAtRightTable: |
creates cell for master.libraryTableViewRight | |
(void) | - changeLibraryTypeToIMSLP |
sets master's tableviews' delegates and datasources to this and reloads their data. | |
(void) | - didSelectRowAtLeftTable: |
libraryTableViewLeft's implementation of tableView:didSelectRowAtIndexPath:. | |
(void) | - didSelectRowAtRightTable: |
libraryTableViewRight's implementation of tableView:didSelectRowAtIndexPath:. | |
(id) | - initWithMaster: |
Basic init with master controller set. | |
(NSInteger) | - numberOfSectionsInTableView: |
UITableViewDataSource protocol function's dummy implementation. | |
(BOOL) | - tableView:canEditRowAtIndexPath: |
UITableViewDataSource function's implementation. | |
(BOOL) | - tableView:canMoveRowAtIndexPath: |
UITableViewDataSource function's implementation. | |
(UITableViewCell *) | - tableView:cellForRowAtIndexPath: |
Mandatory UITableViewDataSource function's implementation. | |
(void) | - tableView:commitEditingStyle:forRowAtIndexPath: |
UITableViewDataSource function's implementation. | |
(void) | - tableView:didSelectRowAtIndexPath: |
UITableViewDelegate protocol function's implementation. | |
(CGFloat) | - tableView:heightForFooterInSection: |
UITableViewDelegate protocol function's implementation. | |
(CGFloat) | - tableView:heightForHeaderInSection: |
UITableViewDelegate protocol function's implementation. | |
(CGFloat) | - tableView:heightForRowAtIndexPath: |
UITableViewDelegate protocol function's implementation. | |
(void) | - tableView:moveRowAtIndexPath:toIndexPath: |
UITableViewDataSource function's implementation. | |
(NSInteger) | - tableView:numberOfRowsInSection: |
Mandatory UITableViewDataSource protocol function's implementation. | |
(UIView *) | - tableView:viewForFooterInSection: |
UITableViewDelegate protocol function's implementation. | |
(UIView *) | - tableView:viewForHeaderInSection: |
UITableViewDelegate protocol function's implementation. | |
Protected Attributes | |
CatNiPViewController * | master |
Properties | |
NSMutableArray * | composers |
NSMutableArray * | compositions |
IBOutlet CatNiPViewController * | master |
Delegate and datasource for CatNipViewController's tableviews' when LIBRARYTYPE == IMSLP.
All composers are downloaded when application launches and compositions of spesific composer and scores of spesific composition are downloaded when user select's so.
API up to date 28.6.2011
Definition at line 16 of file IMSLPDelegateDataSource.h.
- (UITableViewCell *) cellForRowAtLeftTable: | (NSIndexPath *) | indexPath |
creates cell for master.libraryTableViewLeft
Creates standard cell for application and assigns cell.textLabel.text = [composers objectAtIndex:[indexPath row]].
cellForRowAtLeftTable | indexPath for cell to be created in left table |
Definition at line 94 of file IMSLPDelegateDataSource.m.
- (UITableViewCell *) cellForRowAtRightTable: | (NSIndexPath *) | indexPath |
creates cell for master.libraryTableViewRight
Creates standard cell for application and assigns cell.textLabel.text = [compositions objectAtIndex:[indexPath row]].
cellForRowAtRightTable | for cell to be created in right table |
Definition at line 110 of file IMSLPDelegateDataSource.m.
- (void) changeLibraryTypeToIMSLP |
sets master's tableviews' delegates and datasources to this and reloads their data.
Definition at line 300 of file IMSLPDelegateDataSource.m.
References composers.
- (void) didSelectRowAtLeftTable: | (NSIndexPath *) | indexPath |
libraryTableViewLeft's implementation of tableView:didSelectRowAtIndexPath:.
Shows libraryViewRight if hidden and reloads it's data.
didSelectRowAtLeftTable | choosing the left library table |
Definition at line 205 of file IMSLPDelegateDataSource.m.
References master, IMSLPQueryHelper::readIMSLPCategory:reportTo:withMethod:, and CatNiPViewController::showViewWithAnimation:.
- (void) didSelectRowAtRightTable: | (NSIndexPath *) | indexPath |
libraryTableViewRight's implementation of tableView:didSelectRowAtIndexPath:.
Downloads information about all scores associated with this composition from IMSLP and shows them in scorepopover when downloading is finished.
didSelectRowAtRightTable | location of the new selected row in libraryTableViewRight |
Definition at line 222 of file IMSLPDelegateDataSource.m.
References IMSLPQueryHelper::readIMSLPPage:composerName:reportTo:withMethod:.
- (id) initWithMaster: | (CatNiPViewController *) | m |
Basic init with master controller set.
Definition at line 24 of file IMSLPDelegateDataSource.m.
- (NSInteger) numberOfSectionsInTableView: | (UITableView *) | tableView |
UITableViewDataSource protocol function's dummy implementation.
Check framework's API for details.
numberOfSectionsInTableView |
Definition at line 49 of file IMSLPDelegateDataSource.m.
- (BOOL) tableView: | (UITableView *) | tableView | |
canEditRowAtIndexPath: | (NSIndexPath *) | indexPath | |
UITableViewDataSource function's implementation.
dummy implementation. Check framework's API if you want to add functionality in here.
Definition at line 144 of file IMSLPDelegateDataSource.m.
- (BOOL) tableView: | (UITableView *) | tableView | |
canMoveRowAtIndexPath: | (NSIndexPath *) | indexPath | |
UITableViewDataSource function's implementation.
dummy implementation. Check framework's API if you want to add functionality in here.
Definition at line 133 of file IMSLPDelegateDataSource.m.
- (UITableViewCell *) tableView: | (UITableView *) | tableView | |
cellForRowAtIndexPath: | (NSIndexPath *) | indexPath | |
Mandatory UITableViewDataSource function's implementation.
Calls proper UITableView's tableView:cellForRowAtIndexPath for which the cell is needed.
tableView | libraryTableViewLeft or libraryTableViewRight |
cellForRowAtIndexPath | indexPath for cell to be created in tableView |
Definition at line 78 of file IMSLPDelegateDataSource.m.
References cellForRowAtLeftTable:, cellForRowAtRightTable:, CatNiPViewController::libraryTableViewLeft, CatNiPViewController::libraryTableViewRight, and master.
- (void) tableView: | (UITableView *) | tableView | |
commitEditingStyle: | (UITableViewCellEditingStyle) | editingStyle | |
forRowAtIndexPath: | (NSIndexPath *) | indexPath | |
UITableViewDataSource function's implementation.
dummy implementation. Check framework's API if you want to add functionality in here.
Definition at line 153 of file IMSLPDelegateDataSource.m.
- (void) tableView: | (UITableView *) | tableView | |
didSelectRowAtIndexPath: | (NSIndexPath *) | indexPath | |
UITableViewDelegate protocol function's implementation.
Calls spesified tableView's handler to determine behaviour. Check framework's API for details.
tableView | object informing the delegate about the new row selection. |
didSelectRowAtIndexPath | location of the new selected row in tableView |
Definition at line 193 of file IMSLPDelegateDataSource.m.
References didSelectRowAtLeftTable:, didSelectRowAtRightTable:, CatNiPViewController::libraryTableViewLeft, CatNiPViewController::libraryTableViewRight, and master.
- (CGFloat) tableView: | (UITableView *) | tableView | |
heightForFooterInSection: | (NSInteger) | section | |
UITableViewDelegate protocol function's implementation.
Add some padding in the footer of libraryTableViewLeft and libraryTableViewRight so that last elements will show for user even if the keyboard is visible.
tableView | libraryTableViewLeft or libraryTableViewRight |
heightForFooterInSection | Currently only one section (0) in tableViews |
Definition at line 243 of file IMSLPDelegateDataSource.m.
- (CGFloat) tableView: | (UITableView *) | tableView | |
heightForHeaderInSection: | (NSInteger) | section | |
UITableViewDelegate protocol function's implementation.
All headers have height of 40.
tableView | |
heightForHeaderInSection |
Definition at line 272 of file IMSLPDelegateDataSource.m.
- (CGFloat) tableView: | (UITableView *) | tableView | |
heightForRowAtIndexPath: | (NSIndexPath *) | indexPath | |
UITableViewDelegate protocol function's implementation.
Calculate table's row height dynamically based on cell.textLabel.text length. Height is calculated with following formula: (([cell.textLabel.text length] / 34) * 17) + 50
tableView | libraryTableViewLeft or libraryTableViewRight for which the height is calculated |
heightForRowAtIndexPath | the row for which the height is calculated |
Definition at line 176 of file IMSLPDelegateDataSource.m.
References CatNiPViewController::libraryTableViewLeft, CatNiPViewController::libraryTableViewRight, and master.
- (void) tableView: | (UITableView *) | tableView | |
moveRowAtIndexPath: | (NSIndexPath *) | fromIndexPath | |
toIndexPath: | (NSIndexPath *) | toIndexPath | |
UITableViewDataSource function's implementation.
dummy implementation. Check framework's API if you want to add functionality in here.
Definition at line 122 of file IMSLPDelegateDataSource.m.
- (NSInteger) tableView: | (UITableView *) | tableView | |
numberOfRowsInSection: | (NSInteger) | section | |
Mandatory UITableViewDataSource protocol function's implementation.
Check framework's API for details.
tableView | libraryTableViewLeft or libraryTableViewRight |
numberOfRowsInSection |
Definition at line 63 of file IMSLPDelegateDataSource.m.
References CatNiPViewController::libraryTableViewLeft, CatNiPViewController::libraryTableViewRight, and master.
- (UIView *) tableView: | (UITableView *) | tableView | |
viewForFooterInSection: | (NSInteger) | section | |
UITableViewDelegate protocol function's implementation.
Add some padding in the footer of libraryTableViewLeft and libraryTableViewRight so that last elements will show for user even if the keyboard is visible.
tableView | libraryTableViewLeft or libraryTableViewRight |
viewForFooterInSection | Currently only one section (0) in tableViews |
Definition at line 257 of file IMSLPDelegateDataSource.m.
- (UIView *) tableView: | (UITableView *) | tableView | |
viewForHeaderInSection: | (NSInteger) | section | |
UITableViewDelegate protocol function's implementation.
tableView | libraryTableViewLeft or libraryTableViewRight |
viewForHeaderInSection | 0 or 1 |
Definition at line 284 of file IMSLPDelegateDataSource.m.
References composers, CatNiPViewController::libraryTableViewLeft, CatNiPViewController::libraryTableViewRight, and master.
- (CatNiPViewController*) master [protected] |
Definition at line 21 of file IMSLPDelegateDataSource.h.
- (NSMutableArray *) composers [read, write, copy] |
Definition at line 19 of file IMSLPDelegateDataSource.h.
- (NSMutableArray *) compositions [read, write, copy] |
Definition at line 20 of file IMSLPDelegateDataSource.h.
- (IBOutlet CatNiPViewController*) master [read, write, retain] |
Definition at line 24 of file IMSLPDelegateDataSource.h.