CatNiP docutest
Sähköinen nuottikirja, HY-TKTKL-OHTUPROJ KESÄ11
LocalDelegateDataSource Class Reference

#import <LocalDelegateDataSource.h>

Collaboration diagram for LocalDelegateDataSource:

List of all members.

Public Member Functions

(void) - alertView:clickedButtonAtIndex:
 Alertview's buttons target-action method.
(void) - changeLibraryTypeToLocal
 sets master's tableviews' delegates and datasources to this and reloads their data.
(UITableViewCell *) - createTableCellLeft:
 Prototype for libTabL's tableView:cellForRowAtIndexPath function.
(UITableViewCell *) - createTableCellRight:
 Prototype for libTabR's tableView:cellForRowAtIndexPath function.
(void) - didSelectRowAtLeftTable:
 libraryTableViewLeft's implementation of tableView:didSelectRowAtIndexPath.
(void) - didSelectRowAtRightTable:
 libraryTableViewRight's implementation of tableView:didSelectRowAtIndexPath.
(id) - initWithMaster:
 Basic init with master set.
(NSInteger) - numberOfSectionsInTableView:
 UITableViewDataSource protocol function's 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:
 Commits either composer or composition delete from local data.
(void) - tableView:didSelectRowAtIndexPath:
 UITableViewDelegate protocol function's implementation.
(UITableViewCellEditingStyle) - tableView:editingStyleForRowAtIndexPath:
 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.
(void) - updateTables
 Updates libraryTableViews, composerDictionary etc.

Protected Attributes

CatNiPViewControllermaster

Properties

NSMutableArray * allLocalScores
NSMutableDictionary * composerDictionary
 Stores composer's (key) all compositions (CompositionData objects) as NSMutableArray (value)
NSArray * composers
NSArray * compositions
IBOutlet CatNiPViewControllermaster

Member Function Documentation

- (void) alertView: (UIAlertView *)  alertView
clickedButtonAtIndex: (NSInteger)  buttonIndex 

Alertview's buttons target-action method.

Asks confirmation of composer or composition delete.

Here is the call graph for this function:

- (void) changeLibraryTypeToLocal

sets master's tableviews' delegates and datasources to this and reloads their data.

Here is the call graph for this function:

- (UITableViewCell *) createTableCellLeft: (NSIndexPath *)  indexPath

Prototype for libTabL's tableView:cellForRowAtIndexPath function.

Creates standard cell for application and assigns cell.textLabel.text = composers[[indexPath row]].

Parameters:
createTableCellLeftindexPath for cell
Returns:
UITableViewCell for given parametres

Here is the caller graph for this function:

- (UITableViewCell *) createTableCellRight: (NSIndexPath *)  indexPath

Prototype for libTabR's tableView:cellForRowAtIndexPath function.

Creates standard cell for application and assigns cell.textLabel.text = compositions[[indexPath row]].

Parameters:
createTableCellRightindexPath for cell
Returns:
UITableViewCell for given parametres

Here is the caller graph for this function:

- (void) didSelectRowAtLeftTable: (NSIndexPath *)  indexPath

libraryTableViewLeft's implementation of tableView:didSelectRowAtIndexPath.

Shows libraryTableViewRight if hidden and reloads it's data.

Parameters:
didSelectRowAtLeftTablelocation of the new selected row in libraryTableViewLeft

Here is the caller graph for this function:

- (void) didSelectRowAtRightTable: (NSIndexPath *)  indexPath

libraryTableViewRight's implementation of tableView:didSelectRowAtIndexPath.

Opens scorepopover for selected composition.

Parameters:
didSelectRowAtRightTablelocation of the new selected row in libraryTableViewRight

Here is the caller graph for this function:

- (id) initWithMaster: (CatNiPViewController *)  m

Basic init with master set.

- (NSInteger) numberOfSectionsInTableView: (UITableView *)  tableView

UITableViewDataSource protocol function's implementation.

Check framework's API for details.

Parameters:
numberOfSectionsInTableView
Returns:
1
- (BOOL) tableView: (UITableView *)  tableView
canEditRowAtIndexPath: (NSIndexPath *)  indexPath 

UITableViewDataSource function's implementation.

Returns:
returns YES
- (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.

Returns:
NO;
- (UITableViewCell *) tableView: (UITableView *)  tableView
cellForRowAtIndexPath: (NSIndexPath *)  indexPath 

Mandatory UITableViewDataSource function's implementation.

Calls proper UITableView's tableView:cellForRowAtIndexPath for which the cell is needed.

Check framework's API for details.

Parameters:
tableViewlibraryTableViewLeft or libraryTableViewRight
cellForRowAtIndexPathindexPath for cell to be created in tableView
Returns:
UITableViewCell for given parametres

Here is the call graph for this function:

- (void) tableView: (UITableView *)  tableView
commitEditingStyle: (UITableViewCellEditingStyle)  editingStyle
forRowAtIndexPath: (NSIndexPath *)  indexPath 

Commits either composer or composition delete from local data.

Asks confirmation in alert view before deleting takes place.

Check framework's API for details.

- (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.

Parameters:
tableViewobject informing the delegate about the new row selection.
didSelectRowAtIndexPathlocating the new selected row in tableView

Here is the call graph for this function:

- (UITableViewCellEditingStyle) tableView: (UITableView *)  tableView
editingStyleForRowAtIndexPath: (NSIndexPath *)  indexPath 

UITableViewDelegate protocol function's implementation.

Everything is deletable when LIBRARYTYPE == LOCAL

Check frameworks API for details.

Returns:
UITableViewCellEditingStyleDelete
- (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.

Parameters:
tableViewlibraryTableViewLeft or libraryTableViewRight
heightForFooterInSectionCurrently only one section (0) in tableViews
Returns:
Footer's height as CGFloat type, currently 350.
- (CGFloat) tableView: (UITableView *)  tableView
heightForHeaderInSection: (NSInteger)  section 

UITableViewDelegate protocol function's implementation.

All headers have height of 40.

Returns:
40
- (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

Parameters:
tableViewfor which the height is calculated
heightForRowAtIndexPaththe row for which the height is calculated
Returns:
row's height in CGFloat type
- (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.

- (NSInteger) tableView: (UITableView *)  tableView
numberOfRowsInSection: (NSInteger)  section 

Mandatory UITableViewDataSource protocol function's implementation.

Check framework's API for details.

Parameters:
tableView
numberOfRowsInSection
Returns:
number of composers or compositions depending on tableView
- (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.

Parameters:
tableViewlibraryTableViewLeft or libraryTableViewRight
heightForFooterInSectionCurrently only one section (0) in tableViews
Returns:
footer's view.
- (UIView *) tableView: (UITableView *)  tableView
viewForHeaderInSection: (NSInteger)  section 

UITableViewDelegate protocol function's implementation.

Parameters:
tableViewlibraryTableViewLeft or libraryTableViewRight
viewForHeaderInSection0
Returns:
Header view for section in tableView
- (void) updateTables

Updates libraryTableViews, composerDictionary etc.

relevant data to current.

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

- (CatNiPViewController*) master [protected]

Property Documentation

- (NSMutableArray*) allLocalScores [read, write, retain]
- (NSMutableDictionary*) composerDictionary [read, write, retain]

Stores composer's (key) all compositions (CompositionData objects) as NSMutableArray (value)

- (NSArray *) composers [read, write, copy]
- (NSArray *) compositions [read, write, copy]
- (IBOutlet CatNiPViewController*) master [read, write, retain]

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Enumerations Enumerator Properties Defines