Added allEntries and allGroups to MPDocument as adapter to KPKTree calls

This commit is contained in:
michael starke
2013-11-16 00:03:28 +01:00
parent eeb440fa1c
commit 190bca5201
2 changed files with 10 additions and 0 deletions

View File

@@ -69,6 +69,8 @@ APPKIT_EXTERN NSString *const MPDocumentGroupKey;
* @return matching group, nil if none was found
*/
- (KPKGroup *)findGroup:(NSUUID *)uuid;
- (NSArray *)allEntries;
- (NSArray *)allGroups;
- (void)useGroupAsTrash:(KPKGroup *)group;
- (void)useGroupAsTemplate:(KPKGroup *)group;

View File

@@ -283,6 +283,14 @@ typedef NS_ENUM(NSUInteger, MPAlertType) {
return [self.root groupForUUID:uuid];
}
- (NSArray *)allEntries {
return self.tree.allEntries;
}
- (NSArray *)allGroups {
return self.tree.allGroups;
}
- (BOOL)useTrash {
return self.tree.metaData.recycleBinEnabled;
}