diff --git a/contrib/mobile/drawMesh.cpp b/contrib/mobile/drawMesh.cpp index e9ea34e99f9d6853478a06455f403b346ce257e6..e608153f1c159802a8ff98acbe7aadc1a74db0e2 100644 --- a/contrib/mobile/drawMesh.cpp +++ b/contrib/mobile/drawMesh.cpp @@ -35,6 +35,7 @@ extern unsigned int getColorByEntity(GEntity *e); void drawMeshVertex(GVertex *e) { if(!CTX::instance()->mesh.points && !CTX::instance()->mesh.pointsNum) return; + if(!CTX::instance()->mesh.points) return; std::vector<GLfloat> vertex; std::vector<GLubyte> color; for(unsigned int i = 0; i < e->mesh_vertices.size(); i++){ diff --git a/contrib/mobile/drawString.h b/contrib/mobile/drawString.h index 7d4556e0d701030ae901d4817cf03367ae4efb41..7e144440113816cfdfe2072f4ccf5d9cd3cbbe08 100644 --- a/contrib/mobile/drawString.h +++ b/contrib/mobile/drawString.h @@ -15,7 +15,6 @@ class drawString { private: - bool _changed; // UNUSED ?? std::string _text; // Text to draw float _color[4]; // Text color int _size; // Text size in px diff --git a/contrib/mobile/iOS/Onelab.xcodeproj/project.pbxproj b/contrib/mobile/iOS/Onelab.xcodeproj/project.pbxproj index 13482edb65aadf2772b9237bf285c4fdfaebb55d..34cd4555d0c27783ab132f89abe59b68ca44cce3 100644 --- a/contrib/mobile/iOS/Onelab.xcodeproj/project.pbxproj +++ b/contrib/mobile/iOS/Onelab.xcodeproj/project.pbxproj @@ -38,6 +38,7 @@ 9CEAE86E17AF824B00813524 /* iosGModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CEAE86D17AF824B00813524 /* iosGModel.cpp */; }; 9CEAE87D17AFD5BB00813524 /* SplitViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9CEAE87C17AFD5BB00813524 /* SplitViewController.mm */; }; 9CEAECC717A91CD20014D229 /* ModelListController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9CEAECC617A91CD20014D229 /* ModelListController.mm */; }; + 9CF34DE417C62FC500A3D5E3 /* PostProcessingViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9CF34DE317C62FC500A3D5E3 /* PostProcessingViewController.mm */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -90,6 +91,8 @@ 9CEAECC617A91CD20014D229 /* ModelListController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ModelListController.mm; sourceTree = "<group>"; usesTabs = 1; }; 9CF1C1EE17AA8997002CD2E3 /* Onelab-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Onelab-Info.plist"; sourceTree = "<group>"; }; 9CF1C1F117AA8A7D002CD2E3 /* Onelab-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Onelab-Prefix.pch"; sourceTree = "<group>"; }; + 9CF34DE217C62FC500A3D5E3 /* PostProcessingViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PostProcessingViewController.h; sourceTree = "<group>"; }; + 9CF34DE317C62FC500A3D5E3 /* PostProcessingViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PostProcessingViewController.mm; sourceTree = "<group>"; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -181,6 +184,8 @@ 9C9608531712C16400E1D4A0 /* DetailViewController.mm */, 9C1C10F817BA5E7D00BFD483 /* PostProViewController.h */, 9C1C10F917BA5E7D00BFD483 /* PostProViewController.mm */, + 9CF34DE217C62FC500A3D5E3 /* PostProcessingViewController.h */, + 9CF34DE317C62FC500A3D5E3 /* PostProcessingViewController.mm */, 9C9608721712C47200E1D4A0 /* EAGLView.h */, 9C9608731712C47200E1D4A0 /* EAGLView.mm */, 9C96089E1712C8EB00E1D4A0 /* emulatorFix.c */, @@ -282,6 +287,7 @@ 9CC6EBB717BA0A38001CA21A /* drawGeom.cpp in Sources */, 9CC6EBB917BA1CC7001CA21A /* drawMesh.cpp in Sources */, 9C1C10FA17BA5E7D00BFD483 /* PostProViewController.mm in Sources */, + 9CF34DE417C62FC500A3D5E3 /* PostProcessingViewController.mm in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/contrib/mobile/iOS/Onelab/DetailViewController.mm b/contrib/mobile/iOS/Onelab/DetailViewController.mm index 1f05ca799940988ff778f0f689aa8c852f67469a..978da58f1c2c96d6de0abcbb57e3e98b31a2ea8e 100644 --- a/contrib/mobile/iOS/Onelab/DetailViewController.mm +++ b/contrib/mobile/iOS/Onelab/DetailViewController.mm @@ -69,18 +69,15 @@ } else { - UIBarButtonItem *postpro = [[UIBarButtonItem alloc] initWithTitle:@"Post processing" style:UIBarButtonItemStyleBordered target:self action:@selector(showPostpro)]; - UIBarButtonItem *more = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(showMore:)]; UIBarButtonItem *model = [[UIBarButtonItem alloc] initWithTitle:@"Models list" style:UIBarButtonItemStyleBordered target:self action:@selector(showModelsList)]; - NSArray *btns = [[NSArray alloc] initWithObjects:model, postpro, more, nil]; - [self.navigationItem setRightBarButtonItems:btns]; + [self.navigationItem setRightBarButtonItem:model]; } } - (IBAction)pinch:(UIPinchGestureRecognizer *)sender { if([sender numberOfTouches] != 2) return; - float mScale; + float mScale = scaleFactor; if (sender.state == UIGestureRecognizerStateBegan) mScale = scaleFactor; else if(sender.state == UIGestureRecognizerStateChanged) @@ -89,8 +86,6 @@ scaleFactor *= [sender scale]; mScale = scaleFactor; } - else - mScale = 1.0f; mScale = MAX(0.1, mScale); glView->mContext->eventHandler(2,mScale); [glView drawView]; @@ -118,6 +113,7 @@ - (IBAction)tap:(UITapGestureRecognizer *)sender { sender.numberOfTapsRequired = 2; + sender.numberOfTouchesRequired = 1; if(sender.state == UIGestureRecognizerStateEnded){ scaleFactor = 1; glView->mContext->eventHandler(10); @@ -149,25 +145,6 @@ [self performSegueWithIdentifier:@"showSettingsSegue" sender:self]; } -- (void) showPostpro -{ - if(PView::list.size() <= 0) - { - UIAlertView *alert; - alert = [[UIAlertView alloc] initWithTitle:@"Post proccessing" message:@"No post processing data" delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil, nil]; - [alert show]; - return; - } - [self performSegueWithIdentifier:@"showPostProSegue" sender:self]; -} - --(void)hidePostpro -{ - for(UIView *v in self.view.subviews) - if(v.tag == -1) - [v removeFromSuperview]; -} - -(void) showAlert:(std::string)msg title:(std::string) title { UIAlertView *alert; diff --git a/contrib/mobile/iOS/Onelab/MasterViewController.h b/contrib/mobile/iOS/Onelab/MasterViewController.h index 5481562a884705417698cdc7b389c1bd360de35c..fffafe15a635c91f2209d6e0e0411ae4c05a9ab7 100644 --- a/contrib/mobile/iOS/Onelab/MasterViewController.h +++ b/contrib/mobile/iOS/Onelab/MasterViewController.h @@ -16,9 +16,12 @@ @private NSMutableArray *_sections; NSMutableArray *_sectionstitle; + NSDate *_lastRefresh; UIBarButtonItem *runButton; UIBarButtonItem *stopButton; + + UISegmentedControl *control; } @property (strong, nonatomic) DetailViewController *detailViewController; diff --git a/contrib/mobile/iOS/Onelab/MasterViewController.mm b/contrib/mobile/iOS/Onelab/MasterViewController.mm index b77e757fec91128ed0322a19ff5c158d4bd3e906..e4ed839fa4dd51a038473222e997fdff61d6803b 100644 --- a/contrib/mobile/iOS/Onelab/MasterViewController.mm +++ b/contrib/mobile/iOS/Onelab/MasterViewController.mm @@ -8,6 +8,7 @@ #import "MasterViewController.h" #import "DetailViewController.h" +#import "PostProViewController.h" #import "AppDelegate.h" #import "parameter.h" @@ -28,9 +29,13 @@ - (void)viewDidLoad { [super viewDidLoad]; + // Do any additional setup after loading the view, typically from a nib. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(refreshParameters:) name:@"refreshParameters" object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(resetParameters:) name:@"resetParameters" object:nil]; + + self.navigationItem.title = @"Parameters"; + if(((AppDelegate *)[UIApplication sharedApplication].delegate)->compute){ // Only on iPhone/iPod runButton = [[UIBarButtonItem alloc] initWithTitle:@"Stop" style:UIBarButtonItemStyleBordered target:self action:@selector(stopRunning)]; [runButton setTitle:@"Stop"]; @@ -43,18 +48,38 @@ runButton.possibleTitles = [NSSet setWithObjects:@"Run", @"Stop", nil]; self.navigationItem.leftItemsSupplementBackButton = YES; // Only for iPhone/iPod self.navigationItem.leftBarButtonItem = runButton; - - UIBarButtonItem *refresh = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh target:self action:@selector(resetParameters:)]; - self.navigationItem.rightBarButtonItem = refresh; - self.detailViewController = (DetailViewController *)[[self.splitViewController.viewControllers lastObject] topViewController]; _sections = [[NSMutableArray alloc] init]; _sectionstitle = [[NSMutableArray alloc] init]; + + [self.navigationController setToolbarHidden:NO]; + control = [[UISegmentedControl alloc] initWithItems:[[NSArray alloc] initWithObjects:@"Parmeters", @"Views", nil]]; + control.segmentedControlStyle = UISegmentedControlStyleBar; + UIBarButtonItem *controlBtn = [[UIBarButtonItem alloc] initWithCustomView:control]; + UIBarButtonItem *flexibleSpace = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil]; + self.toolbarItems = [[NSArray alloc] initWithObjects:flexibleSpace, controlBtn, flexibleSpace, nil]; + [control addTarget:self action:@selector(indexDidChangeForSegmentedControl:) forControlEvents:UIControlEventValueChanged]; +} +- (void)viewWillAppear:(BOOL)animated +{ + [self refreshParameters:nil]; + control.selectedSegmentIndex = 0; + [super viewWillAppear:animated]; } -- (void) addParameterNumber:(onelab::number)p inSection:(NSMutableArray*)section +- (void)indexDidChangeForSegmentedControl:(id)sender { - if(p.getChoices().size() && p.getChoices().size() == p.getValueLabels().size()) { // enumeration + PostProViewController *postProViewController = [[PostProViewController alloc] init]; + [postProViewController setPreviousViewController:self]; + //[self.navigationController setViewControllers:[[NSArray alloc] initWithObjects:postProViewController, nil] animated:NO]; + [postProViewController.navigationItem setHidesBackButton:YES]; + [self.navigationController pushViewController:postProViewController animated:YES]; +} +- (void)addParameterNumber:(onelab::number)p atIndexPath:(NSIndexPath*)indexPath +{ + NSLog(@"Add %s at (%d,%d)", p.getName().c_str(), indexPath.section, indexPath.row); + NSMutableArray* section = [_sections objectAtIndex:indexPath.section]; + if(p.getChoices().size() && p.getChoices().size() == p.getValueLabels().size()) { // enumeration parameterNumberList *param = [[parameterNumberList alloc] initWithNumber:p]; [section addObject:param]; } @@ -71,86 +96,106 @@ parameterNumberRange *param = [[parameterNumberRange alloc] initWithNumber:p]; [section addObject:param]; } + [self.tableView beginUpdates]; + [self.tableView insertRowsAtIndexPaths:[[NSArray alloc] initWithObjects:indexPath, nil] withRowAnimation:UITableViewRowAnimationAutomatic]; + [self.tableView endUpdates]; } -- (void) addParameterString:(onelab::string)p inSection:(NSMutableArray*)section +- (void)addParameterString:(onelab::string)p atIndexPath:(NSIndexPath*)indexPath { - parameterStringList *param = [[parameterStringList alloc] initWithString:p]; + NSMutableArray* section = [_sections objectAtIndex:indexPath.section]; + parameterStringList *param = [[parameterStringList alloc] initWithString:p]; [section addObject:param]; + [self.tableView beginUpdates]; + [self.tableView insertRowsAtIndexPaths:[[NSArray alloc] initWithObjects:indexPath, nil] withRowAnimation:UITableViewRowAnimationAutomatic]; + [self.tableView endUpdates]; } - -- (void) getAvailableParam +- (void)addSection:(NSMutableArray*)s withTitle:(NSString*)t withParameterNumber:(onelab::number)p +{ + [_sections addObject:s]; + [_sectionstitle addObject:t]; + [self.tableView beginUpdates]; + [self.tableView insertSections:[[NSIndexSet alloc] initWithIndex:[_sections count]-1] withRowAnimation:UITableViewRowAnimationAutomatic]; + [self.tableView endUpdates]; + [self addParameterNumber:p atIndexPath:[NSIndexPath indexPathForRow:0 inSection:[_sections count]-1]]; +} +- (void)addSection:(NSMutableArray*)s withTitle:(NSString*)t withParameterString:(onelab::string)p { - std::vector<onelab::number> number; + [_sections addObject:s]; + [_sectionstitle addObject:t]; + [self.tableView beginUpdates]; + [self.tableView insertSections:[[NSIndexSet alloc] initWithIndex:[_sections count]-1] withRowAnimation:UITableViewRowAnimationAutomatic]; + [self.tableView endUpdates]; + [self addParameterString:p atIndexPath:[NSIndexPath indexPathForRow:0 inSection:[_sections count]-1]]; +} +- (void)refreshTableView +{ + if(!_lastRefresh) _lastRefresh = [NSDate date]; + else { + if([_lastRefresh timeIntervalSinceNow] >= -1) return; + _lastRefresh = [NSDate date]; + } + std::vector<onelab::number> number; onelab::server::instance()->get(number); - for(int i=0;i<number.size();i++) - { - if(!number[i].getVisible()) continue; - NSString *name=[NSString stringWithCString:number[i].getName().c_str() encoding:[NSString defaultCStringEncoding]]; - NSString * sectiontitle = [[name componentsSeparatedByString:@"/"] objectAtIndex:0]; - bool found = false; - - for(int j=0;j<[_sectionstitle count];j++) - { - NSString *title = [_sectionstitle objectAtIndex:j]; - if([title isEqualToString:sectiontitle]) // the section already exists - { - NSMutableArray *section = [_sections objectAtIndex:j]; - for(int k=0; k<[section count];k++) - if([[[section objectAtIndex: k] getName] isEqualToString:name]) { - parameter * p = [section objectAtIndex: k]; - [p refresh]; + + // + for(int i=0;i<number.size();i++) { + if(!number[i].getVisible()) continue; // Do not add invisible parameter + NSString *name=[NSString stringWithCString:number[i].getName().c_str() encoding:[NSString defaultCStringEncoding]]; + NSString *sectiontitle = [[name componentsSeparatedByString:@"/"] objectAtIndex:0]; + Boolean found = false; + + for(int iSection=0; iSection<[_sectionstitle count]; iSection++) { // Check if the section exist + if([sectiontitle isEqualToString:[_sectionstitle objectAtIndex:iSection]]) { + NSMutableArray *section = [_sections objectAtIndex:iSection]; + for(int iparameter = 0; iparameter<[section count]; iparameter++) { + if([[[section objectAtIndex: iparameter] getName] isEqualToString:name]) { // The parameter is in the section + parameter * p = [section objectAtIndex: iparameter]; + [p refresh]; // just refresh the parameter found = true; break; - } - if(!found) - [self addParameterNumber:number[i] inSection:section]; - found = true; - break; - } - } - if(found) continue; - // we have to create the section - NSMutableArray *newSection = [[NSMutableArray alloc] init]; - [_sections addObject:newSection]; - [_sectionstitle addObject:sectiontitle]; - [self addParameterNumber:number[i] inSection:[_sections lastObject]]; - } - std::vector<onelab::string> string; + } + } + if(!found) // The parameter is not in the section, add it + [self addParameterNumber:number[i] atIndexPath:[NSIndexPath indexPathForRow:[section count] inSection:iSection]]; + found = true; break; + } + } + if(found) continue; // the parameter is in the tableView + // The section have to be create + NSMutableArray *newSection = [[NSMutableArray alloc] init]; + [self addSection:newSection withTitle:sectiontitle withParameterNumber:number[0]]; + } + std::vector<onelab::string> string; onelab::server::instance()->get(string); - for(int i=0;i<string.size();i++) - { - if(!string[i].getVisible()) continue; - if(string[i].getKind() == "file") continue; - NSString *name=[NSString stringWithCString:string[i].getName().c_str() encoding:[NSString defaultCStringEncoding]]; - NSString * sectiontitle = [[name componentsSeparatedByString:@"/"] objectAtIndex:0]; - bool found = false; - - for(int j=0;j<[_sectionstitle count];j++) - { - NSString *title = [_sectionstitle objectAtIndex:j]; - if([title isEqualToString:sectiontitle]) // the section already exists - { - NSMutableArray *section = [_sections objectAtIndex:j]; - for(int k=0; k<[section count];k++) - if([[(parameter*)[section objectAtIndex: k] getName] isEqualToString:name]) { - parameter * p = [section objectAtIndex: k]; - [p refresh]; + + // + for(int i=0;i<string.size();i++) { + if(!string[i].getVisible() || string[i].getKind() == "file") continue; // Do not add invisible parameter + NSString *name=[NSString stringWithCString:string[i].getName().c_str() encoding:[NSString defaultCStringEncoding]]; + NSString *sectiontitle = [[name componentsSeparatedByString:@"/"] objectAtIndex:0]; + Boolean found = false; + + for(int iSection=0; iSection<[_sectionstitle count]; iSection++) { // Check if the section exist + if([sectiontitle isEqualToString:[_sectionstitle objectAtIndex:iSection]]) { + NSMutableArray *section = [_sections objectAtIndex:iSection]; + for(int iparameter = 0; iparameter<[section count]; iparameter++) { + if([[[section objectAtIndex: iparameter] getName] isEqualToString:name]) { // The parameter is in the section + parameter * p = [section objectAtIndex: iparameter]; + [p refresh]; // just refresh the parameter found = true; break; - } // the parameters is already in the section - if(!found) - [self addParameterString:string[i] inSection:section]; - found = true; - break; - } - } - if(found) continue; - // we have to create the section - NSMutableArray *newSection = [[NSMutableArray alloc] init]; - [_sections addObject:newSection]; - [_sectionstitle addObject:sectiontitle]; - [self addParameterString:string[i] inSection:[_sections lastObject]]; - } + } + } + if(!found) // The parameter is not in the section, add it + [self addParameterString:string[i] atIndexPath:[NSIndexPath indexPathForRow:[section count] inSection:iSection]]; + found = true; break; + } + } + if(found) continue; // the parameter is in the tableView + // The section have to be create + NSMutableArray *newSection = [[NSMutableArray alloc] init]; + [self addSection:newSection withTitle:sectiontitle withParameterString:string[0]]; + } } - (void)viewDidUnload @@ -159,21 +204,14 @@ // Release any retained subviews of the main view. } -- (void)viewWillAppear:(BOOL)animated -{ - [super viewWillAppear:animated]; - [self getAvailableParam]; - [self.tableView reloadData]; -} - - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return YES; } - (void)refreshParameters:(id)sender { - [self getAvailableParam]; // Get the param - [self.tableView reloadData]; + [self refreshTableView]; // Get the param + [self.tableView setNeedsDisplay]; } - (void)resetParameters:(id)sender { @@ -181,8 +219,7 @@ [_sections removeAllObjects]; [_sectionstitle removeAllObjects]; [self.tableView reloadData]; - [self getAvailableParam]; // Get the param - [self.tableView reloadData]; + [self refreshParameters:sender]; onelab_cb("check"); [[NSNotificationCenter defaultCenter] postNotificationName:@"requestRender" object:nil]; } @@ -216,6 +253,7 @@ #pragma mark - Table View + - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return [_sections count]; @@ -248,6 +286,7 @@ cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; else return cell; + [cell setSelectionStyle:UITableViewCellSelectionStyleNone]; [cell setUserInteractionEnabled:!([tmp isReadOnly])]; [tmp setLabelFrame:CGRectMake(20, 5, cell.frame.size.width - 40, cell.frame.size.height/2)]; [cell addSubview:[tmp getLabel]]; diff --git a/contrib/mobile/iOS/Onelab/ModelListController.mm b/contrib/mobile/iOS/Onelab/ModelListController.mm index 16768f92c273b374499decf16d1ea5c9183c630e..92b2aee9538ec769e33b8981e1673f5f958f1692 100644 --- a/contrib/mobile/iOS/Onelab/ModelListController.mm +++ b/contrib/mobile/iOS/Onelab/ModelListController.mm @@ -101,6 +101,7 @@ -(void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName attributes:(NSDictionary *)attributeDict { currentElement = elementName; + //[currentElementValue release]; currentElementValue = nil; } -(void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string diff --git a/contrib/mobile/iOS/Onelab/PostProViewController.h b/contrib/mobile/iOS/Onelab/PostProViewController.h index 673258703be6fc29be2f4acdfccaf0e2fe770ec7..0d16297eab6ddb74aef067b70d755c07fdee5c3f 100644 --- a/contrib/mobile/iOS/Onelab/PostProViewController.h +++ b/contrib/mobile/iOS/Onelab/PostProViewController.h @@ -9,5 +9,10 @@ #import <UIKit/UIKit.h> @interface PostProViewController : UITableViewController <UITextFieldDelegate> - +{ +@private + UIViewController *_prevViewController; + UISegmentedControl *control; +} +- (void)setPreviousViewController:(UIViewController*)prev; @end diff --git a/contrib/mobile/iOS/Onelab/PostProViewController.mm b/contrib/mobile/iOS/Onelab/PostProViewController.mm index 5d03e189685a4e93fc714d7f2d7c7e5d2273dd7c..91974db7d14b090ec2d87f5409f3de4abf02e38d 100644 --- a/contrib/mobile/iOS/Onelab/PostProViewController.mm +++ b/contrib/mobile/iOS/Onelab/PostProViewController.mm @@ -7,7 +7,10 @@ // #import "PostProViewController.h" +#import "MasterViewController.h" +#import "PostProcessingViewController.h" +#include <gmsh/Context.h> #include <gmsh/PView.h> #include <gmsh/PViewData.h> #include <gmsh/PViewOptions.h> @@ -31,11 +34,33 @@ { [super viewDidLoad]; - // Uncomment the following line to preserve selection between presentations. - // self.clearsSelectionOnViewWillAppear = NO; - - // Uncomment the following line to display an Edit button in the navigation bar for this view controller. - // self.navigationItem.rightBarButtonItem = self.editButtonItem; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(refreshParameters:) name:@"refreshParameters" object:nil]; + + self.navigationItem.title = @"Options"; + + [self.navigationController setToolbarHidden:NO]; + control = [[UISegmentedControl alloc] initWithItems:[[NSArray alloc] initWithObjects:@"Parmeters", @"Views", nil]]; + control.segmentedControlStyle = UISegmentedControlStyleBar; + UIBarButtonItem *controlBtn = [[UIBarButtonItem alloc] initWithCustomView:control]; + UIBarButtonItem *flexibleSpace = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil]; + self.toolbarItems = [[NSArray alloc] initWithObjects:flexibleSpace, controlBtn, flexibleSpace, nil]; + [control addTarget:self action:@selector(indexDidChangeForSegmentedControl:) forControlEvents:UIControlEventValueChanged]; +} +- (void)viewWillAppear:(BOOL)animated +{ + control.selectedSegmentIndex = 1; + [super viewWillAppear:animated]; +} + +- (void)setPreviousViewController:(UIViewController*)prev +{ + _prevViewController = prev; +} + +- (void)indexDidChangeForSegmentedControl:(id)sender +{ + //[self.navigationController setViewControllers:[[NSArray alloc] initWithObjects:_prevViewController, nil] animated:NO]; + [self.navigationController popViewControllerAnimated:YES]; } - (void)didReceiveMemoryWarning @@ -44,16 +69,52 @@ // Dispose of any resources that can be recreated. } +- (void)refreshParameters:(id)sender +{ + NSInteger nrow = [self.tableView numberOfRowsInSection:1]; + if(nrow < PView::list.size()-1) + { + NSMutableArray *array = [[NSMutableArray alloc] init]; + for(NSInteger i = nrow; i<PView::list.size(); i++) + [array addObject:[NSIndexPath indexPathForRow:i-nrow inSection:1]]; + [self.tableView insertRowsAtIndexPaths:[NSArray arrayWithArray:array] withRowAnimation:UITableViewRowAnimationAutomatic]; + } +} + #pragma mark - Table view data source - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { - return 1; + return 2; + /** + Section Name + 0 Options (Show mesh, Show geometry) + 1 Post-processing + **/ +} + +-(NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section +{ + switch (section) { + case 0: + return @"Display options"; + case 1: + return @"Result options"; + default: + return @"Other options"; + } } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - return PView::list.size(); + switch (section) { + case 0: + return 4; + case 1: + return PView::list.size(); + default: + return 0; + } } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath @@ -64,68 +125,91 @@ else return cell; [cell setFrame:CGRectMake(cell.frame.origin.x, cell.frame.origin.x, tableView.frame.size.width, cell.frame.size.height)]; - int i = PView::list.size() - 1 - indexPath.row; - UISwitch *showHide = [[UISwitch alloc] initWithFrame: CGRectMake(10, 10, 100, 30)]; - UILabel *lbl = [[UILabel alloc] initWithFrame:CGRectMake(10 + (showHide.frame.size.width), 10, (cell.bounds.size.width - 100)/3, 30)]; - lbl.textAlignment = NSTextAlignmentCenter; - UIButton *intervalType = [UIButton buttonWithType:UIButtonTypeRoundedRect]; - intervalType.frame = CGRectMake(10 + showHide.frame.size.width + lbl.frame.size.width, 10, (cell.bounds.size.width - 100)/3, 30); - UITextField *nbIso = [[UITextField alloc] initWithFrame:CGRectMake(10 + showHide.frame.size.width + lbl.frame.size.width + intervalType.frame.size.width, 10, (cell.bounds.size.width - 100)/3, 30)]; - [showHide setOn:(PView::list[i]->getOptions()->visible == 1)]; - [showHide setTag:i]; - [showHide addTarget:self action:@selector(PViewVisible:) forControlEvents:UIControlEventValueChanged]; - [lbl setBackgroundColor: [UIColor clearColor]]; - [lbl setText:[NSString stringWithCString:PView::list[i]->getData()->getName().c_str() encoding:[NSString defaultCStringEncoding]]]; - [intervalType setTag:i]; - switch (PView::list[i]->getOptions()->intervalsType) { - case 3: // ISO - [intervalType setTitle:@"Use Iso-values" forState:UIControlStateNormal]; + switch (indexPath.section) { + case 0: + { + [cell setSelectionStyle:UITableViewCellSelectionStyleNone]; + UISwitch *showHideOptions = [[UISwitch alloc] initWithFrame: CGRectMake(10, 10, 100, 30)]; + UILabel *lblOptions = [[UILabel alloc] initWithFrame:CGRectMake(10 + (showHideOptions.frame.size.width)+25 , 10, (cell.bounds.size.width - (showHideOptions.frame.size.width) - 25), 30)]; + if(indexPath.row == 0) { + [lblOptions setText:@"Show geometry points"]; + [showHideOptions setOn:(CTX::instance()->geom.points)]; + [showHideOptions addTarget:self action:@selector(setShowGeomPoints:) forControlEvents:UIControlEventValueChanged]; + } + else if(indexPath.row == 1) { + [lblOptions setText:@"Show geometry lines"]; + [showHideOptions setOn:(CTX::instance()->geom.lines)]; + [showHideOptions addTarget:self action:@selector(setShowGeomLines:) forControlEvents:UIControlEventValueChanged]; + } + else if(indexPath.row == 2) { + [lblOptions setText:@"Show mesh lines"]; + [showHideOptions setOn:(CTX::instance()->mesh.lines)]; + [showHideOptions addTarget:self action:@selector(setShowMeshLines:) forControlEvents:UIControlEventValueChanged]; + } + else if(indexPath.row == 3) { + [lblOptions setText:@"Show mesh edges"]; + [showHideOptions setOn:(CTX::instance()->mesh.surfacesEdges || CTX::instance()->mesh.volumesEdges)]; + [showHideOptions addTarget:self action:@selector(setShowMeshEdges:) forControlEvents:UIControlEventValueChanged]; + } + [cell addSubview:showHideOptions]; + [cell addSubview:lblOptions]; + } break; - case 1: // CONTINIOUS - [intervalType setTitle:@"Use Continous map" forState:UIControlStateNormal]; - break; - case 2: // DISCRETE - [intervalType setTitle:@"Use Filled iso-values" forState:UIControlStateNormal]; + case 1: + { + [cell setSelectionStyle:UITableViewCellSelectionStyleGray]; + int i = PView::list.size() - 1 - indexPath.row; + cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; + UISwitch *showHide = [[UISwitch alloc] initWithFrame: CGRectMake(10, 10, 100, 30)]; + UILabel *lbl = [[UILabel alloc] initWithFrame:CGRectMake(25 + (showHide.frame.size.width), 10, (cell.bounds.size.width - showHide.frame.size.width - 50), 30)]; + [showHide setOn:(PView::list[i]->getOptions()->visible == 1)]; + [showHide setTag:i]; + [showHide addTarget:self action:@selector(PViewVisible:) forControlEvents:UIControlEventValueChanged]; + [lbl setBackgroundColor: [UIColor clearColor]]; + [lbl setText:[NSString stringWithCString:PView::list[i]->getData()->getName().c_str() encoding:[NSString defaultCStringEncoding]]]; + [cell addSubview:showHide]; + [cell addSubview:lbl]; + } break; } - [intervalType addTarget:self action:@selector(PViewIntervalType:) forControlEvents:UIControlEventTouchDown]; - [nbIso setBorderStyle:UITextBorderStyleRoundedRect]; - [nbIso setText:[NSString stringWithFormat:@"%d",PView::list[i]->getOptions()->nbIso]]; - [nbIso setKeyboardType:UIKeyboardTypeNumberPad]; - [nbIso addTarget:self action:@selector(PViewNbIso:) forControlEvents:UIControlEventValueChanged]; - [nbIso setTag:i]; - [nbIso setDelegate:self]; - [cell addSubview:nbIso]; - [cell addSubview:intervalType]; - [cell addSubview:showHide]; - [cell addSubview:lbl]; return cell; } --(IBAction)PViewVisible:(id)sender +-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { - PView::list[((UISwitch*)sender).tag]->getOptions()->visible = (((UISwitch*)sender).on)? 1 : 0; - [[NSNotificationCenter defaultCenter] postNotificationName:@"requestRender" object:nil]; + if(indexPath.section != 1) return; + UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"iPadStoryboard" bundle:nil]; + PostProcessingViewController *postPro = [storyboard instantiateViewControllerWithIdentifier:@"PostProcessingViewController"]; + [postPro setPView:PView::list[[tableView numberOfRowsInSection:1]-1- indexPath.row]]; + [self.navigationController pushViewController:postPro animated:YES]; } --(IBAction)PViewIntervalType:(id)sender +- (void)setShowGeomPoints:(UISwitch*)sender { - if( [[((UIButton *)sender) titleForState:UIControlStateNormal] isEqual: @"Use Iso-values"]) - { - [((UIButton *)sender) setTitle:@"Use Continous map" forState:UIControlStateNormal]; - PView::list[((UIButton *)sender).tag]->getOptions()->intervalsType = 1; - } - else if( [[((UIButton *)sender) titleForState:UIControlStateNormal] isEqual: @"Use Continous map"]) - { - [((UIButton *)sender) setTitle:@"Use Filled iso-values" forState:UIControlStateNormal]; - PView::list[((UIButton *)sender).tag]->getOptions()->intervalsType = 2; - } - else if( [[((UIButton *)sender) titleForState:UIControlStateNormal] isEqual: @"Use Filled iso-values"]) - { - [((UIButton *)sender) setTitle:@"Use Iso-values" forState:UIControlStateNormal]; - PView::list[((UIButton *)sender).tag]->getOptions()->intervalsType = 3; - } - PView::list[((UIButton *)sender).tag]->setChanged(true); + CTX::instance()->geom.points = sender.on; + [[NSNotificationCenter defaultCenter] postNotificationName:@"requestRender" object:nil]; +} +- (void)setShowGeomLines:(UISwitch*)sender +{ + CTX::instance()->geom.lines = sender.on; + [[NSNotificationCenter defaultCenter] postNotificationName:@"requestRender" object:nil]; +} +- (void)setShowMeshEdges:(UISwitch*)sender +{ + CTX::instance()->mesh.surfacesEdges = sender.on; + CTX::instance()->mesh.volumesEdges = sender.on; + CTX::instance()->mesh.changed = YES; + [[NSNotificationCenter defaultCenter] postNotificationName:@"requestRender" object:nil]; +} +- (void)setShowMeshLines:(UISwitch*)sender +{ + CTX::instance()->mesh.lines = sender.on; + CTX::instance()->mesh.changed = YES; + [[NSNotificationCenter defaultCenter] postNotificationName:@"requestRender" object:nil]; +} +-(IBAction)PViewVisible:(id)sender +{ + PView::list[((UISwitch*)sender).tag]->getOptions()->visible = (((UISwitch*)sender).on)? 1 : 0; [[NSNotificationCenter defaultCenter] postNotificationName:@"requestRender" object:nil]; } diff --git a/contrib/mobile/iOS/Onelab/PostProcessingViewController.h b/contrib/mobile/iOS/Onelab/PostProcessingViewController.h new file mode 100644 index 0000000000000000000000000000000000000000..b2df8653bb61dc90825c7c33867e1d5660d619e3 --- /dev/null +++ b/contrib/mobile/iOS/Onelab/PostProcessingViewController.h @@ -0,0 +1,28 @@ +// +// PostProcessingViewController.h +// Onelab +// +// Created by Maxime Graulich on 22/08/13. +// Copyright (c) 2013 Maxime Graulich. All rights reserved. +// + +#import <UIKit/UIKit.h> + +#include <gmsh/PView.h> +#include <gmsh/PViewData.h> +#include <gmsh/PViewOptions.h> + +@interface PostProcessingViewController : UIViewController <UIPickerViewDataSource, UIPickerViewDelegate> +{ +@private + PView *_pview; +} + +@property (weak, nonatomic) IBOutlet UILabel *Name; +@property (weak, nonatomic) IBOutlet UIPickerView *IntervalsType; +@property (weak, nonatomic) IBOutlet UITextField *Intervals; +@property (weak, nonatomic) IBOutlet UISlider *RaiseZ; + +- (void)setPView:(PView*)p; + +@end diff --git a/contrib/mobile/iOS/Onelab/PostProcessingViewController.mm b/contrib/mobile/iOS/Onelab/PostProcessingViewController.mm new file mode 100644 index 0000000000000000000000000000000000000000..7b980105c56a4130cd2be32807c3b41bb2f66353 --- /dev/null +++ b/contrib/mobile/iOS/Onelab/PostProcessingViewController.mm @@ -0,0 +1,84 @@ +// +// PostProcessingViewController.m +// Onelab +// +// Created by Maxime Graulich on 22/08/13. +// Copyright (c) 2013 Maxime Graulich. All rights reserved. +// + +#import "PostProcessingViewController.h" + +@interface PostProcessingViewController () + +@end + +@implementation PostProcessingViewController + +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil +{ + self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; + if (self) { + // Custom initialization + } + return self; +} + +- (void)setPView:(PView*)p +{ + _pview = p; +} + +- (void)viewDidLoad +{ + [super viewDidLoad]; + // Do any additional setup after loading the view. + if(_pview) + { + [_Name setText:[NSString stringWithCString:_pview->getData()->getName().c_str() encoding:[NSString defaultCStringEncoding]]]; + [_IntervalsType setDataSource:self]; + [_IntervalsType setDelegate:self]; + [_IntervalsType selectRow:_pview->getOptions()->intervalsType-1 inComponent:0 animated:YES]; + [_Intervals setText:[NSString stringWithFormat:@"%d",_pview->getOptions()->nbIso]]; + [_RaiseZ setValue:_pview->getOptions()->raise[2]]; + [_RaiseZ addTarget:self action:@selector(slideRaiseZ:) forControlEvents:UIControlEventValueChanged]; + } +} +-(NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView +{ + return 1; +} +-(NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component +{ + return 3; +} +-(NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component +{ + NSArray *name = [[NSArray alloc] initWithObjects:@"Iso-values", @"Continuous map", @"Filled iso-values", nil]; + return [name objectAtIndex:row]; +} +-(void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component +{ + _pview->getOptions()->intervalsType = 1+row; + _pview->setChanged(true); + [[NSNotificationCenter defaultCenter] postNotificationName:@"requestRender" object:nil]; +} +- (void)slideRaiseZ:(UISlider*)sender +{ + _pview->getOptions()->raise[2] = sender.value; + _pview->setChanged(true); + [[NSNotificationCenter defaultCenter] postNotificationName:@"requestRender" object:nil]; +} +- (void)didReceiveMemoryWarning +{ + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +- (void)viewDidUnload { + [self setName:nil]; + [self setIntervalsType:nil]; + [self setIntervals:nil]; + [self setRaiseZ:nil]; + [super viewDidUnload]; +} +@end diff --git a/contrib/mobile/iOS/Onelab/SplitViewController.mm b/contrib/mobile/iOS/Onelab/SplitViewController.mm index 0b51aef27f45bbddd81d36952cb33e8c0589841b..8431eba784483f99395950044868c30c82bfda03 100644 --- a/contrib/mobile/iOS/Onelab/SplitViewController.mm +++ b/contrib/mobile/iOS/Onelab/SplitViewController.mm @@ -33,12 +33,12 @@ detailViewController = (DetailViewController *)v; } } - /*UINavigationController *left = [self.viewControllers objectAtIndex:0]; // left UINavigationController (Master) + UINavigationController *left = [self.viewControllers objectAtIndex:0]; // left UINavigationController (Master) for(UIViewController *v in left.viewControllers){ - if ([v isKindOfClass:[MasterViewController class]]) { - masterViewController = (MasterViewController *)v; + if ([v isKindOfClass:[MasterViewController class]]) { + masterViewController = (MasterViewController *)v; + } } - }*/ self.delegate = detailViewController; [self setPresentsWithGesture:NO]; } diff --git a/contrib/mobile/iOS/Onelab/en.lproj/iPadStoryboard.storyboard b/contrib/mobile/iOS/Onelab/en.lproj/iPadStoryboard.storyboard index dc577c049e3a9df4451501fea964ab7cc8f9357d..fe2668e88fadfe7b78cbacf0f15c44e7aa6ed48d 100644 --- a/contrib/mobile/iOS/Onelab/en.lproj/iPadStoryboard.storyboard +++ b/contrib/mobile/iOS/Onelab/en.lproj/iPadStoryboard.storyboard @@ -8,24 +8,31 @@ <!--Navigation Controller--> <scene sceneID="14"> <objects> - <navigationController id="3" sceneMemberID="viewController"> - <navigationBar key="navigationBar" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" id="6"> + <navigationController toolbarHidden="NO" id="3" sceneMemberID="viewController"> + <simulatedNavigationBarMetrics key="simulatedTopBarMetrics" barStyle="blackTranslucent" prompted="NO"/> + <simulatedToolbarMetrics key="simulatedBottomBarMetrics" barStyle="blackTranslucent"/> + <navigationBar key="navigationBar" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" barStyle="blackTranslucent" id="6"> + <rect key="frame" x="0.0" y="-44" width="0.0" height="44"/> <autoresizingMask key="autoresizingMask"/> </navigationBar> + <toolbar key="toolbar" opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" barStyle="blackTranslucent" id="YDU-Oo-Ie9"> + <rect key="frame" x="0.0" y="724" width="320" height="44"/> + <autoresizingMask key="autoresizingMask"/> + </toolbar> <connections> <segue destination="19" kind="relationship" relationship="rootViewController" id="25"/> </connections> </navigationController> <placeholder placeholderIdentifier="IBFirstResponder" id="13" sceneMemberID="firstResponder"/> </objects> - <point key="canvasLocation" x="440" y="-806"/> + <point key="canvasLocation" x="316" y="-806"/> </scene> <!--Detail View Controller - Detail--> <scene sceneID="16"> <objects> <viewController storyboardIdentifier="DetailViewController" title="Detail" id="4" customClass="DetailViewController" sceneMemberID="viewController"> <view key="view" multipleTouchEnabled="YES" contentMode="scaleToFill" id="26" customClass="EAGLView"> - <rect key="frame" x="0.0" y="64" width="703" height="660"/> + <rect key="frame" x="0.0" y="20" width="703" height="704"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> <simulatedOrientationMetrics key="simulatedOrientationMetrics" orientation="landscapeRight"/> @@ -39,7 +46,6 @@ <simulatedToolbarMetrics key="simulatedBottomBarMetrics"/> <connections> <outlet property="glView" destination="26" id="i7d-I7-Zhz"/> - <segue destination="89M-FT-oxV" kind="push" identifier="showPostProSegue" id="KRo-ZG-16Y"/> </connections> </viewController> <placeholder placeholderIdentifier="IBFirstResponder" id="15" sceneMemberID="firstResponder"/> @@ -61,16 +67,16 @@ <objects> <tableViewController storyboardIdentifier="PostProViewController" id="89M-FT-oxV" customClass="PostProViewController" sceneMemberID="viewController"> <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="4WQ-dq-nwm"> - <rect key="frame" x="0.0" y="64" width="703" height="660"/> + <rect key="frame" x="0.0" y="20" width="320" height="748"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <simulatedOrientationMetrics key="simulatedOrientationMetrics" orientation="landscapeRight"/> <prototypes> <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="postProCell" id="rgB-ht-LVb"> - <rect key="frame" x="0.0" y="22" width="703" height="44"/> + <rect key="frame" x="0.0" y="22" width="320" height="44"/> <autoresizingMask key="autoresizingMask"/> <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center"> - <rect key="frame" x="0.0" y="0.0" width="703" height="43"/> + <rect key="frame" x="0.0" y="0.0" width="320" height="43"/> <autoresizingMask key="autoresizingMask"/> <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> </view> @@ -82,10 +88,72 @@ </connections> </tableView> <navigationItem key="navigationItem" title="Post-processing" id="Zld-KM-OS3"/> + <connections> + <segue destination="59P-em-ZXH" kind="push" identifier="showPViewSegue" id="UaH-Jh-G3U"/> + </connections> </tableViewController> <placeholder placeholderIdentifier="IBFirstResponder" id="3Aw-Tm-Dq6" userLabel="First Responder" sceneMemberID="firstResponder"/> </objects> - <point key="canvasLocation" x="2000" y="340"/> + <point key="canvasLocation" x="1280" y="-800"/> + </scene> + <!--Post Processing View Controller--> + <scene sceneID="inJ-Ob-bP0"> + <objects> + <viewController storyboardIdentifier="PostProcessingViewController" id="59P-em-ZXH" customClass="PostProcessingViewController" sceneMemberID="viewController"> + <view key="view" contentMode="scaleToFill" id="bA2-5p-eQu"> + <rect key="frame" x="0.0" y="20" width="320" height="748"/> + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> + <subviews> + <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="PView Name" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="zvL-DY-CD8"> + <rect key="frame" x="20" y="54" width="280" height="32"/> + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> + <fontDescription key="fontDescription" type="system" pointSize="24"/> + <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> + <nil key="highlightedColor"/> + </label> + <pickerView contentMode="scaleToFill" id="KcQ-1V-heQ"> + <rect key="frame" x="0.0" y="94" width="320" height="216"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/> + </pickerView> + <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="21" borderStyle="roundedRect" textAlignment="center" minimumFontSize="17" id="NrM-45-dY4"> + <rect key="frame" x="117" y="318" width="183" height="30"/> + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> + <fontDescription key="fontDescription" type="system" pointSize="14"/> + <textInputTraits key="textInputTraits"/> + </textField> + <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Intervals" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="ol0-Ou-YBJ"> + <rect key="frame" x="20" y="322" width="89" height="21"/> + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> + <fontDescription key="fontDescription" type="system" pointSize="17"/> + <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Raise (Z)" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="IVB-fp-jdZ"> + <rect key="frame" x="20" y="356" width="89" height="21"/> + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> + <fontDescription key="fontDescription" type="system" pointSize="17"/> + <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> + <nil key="highlightedColor"/> + </label> + <slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" minValue="-5" maxValue="5" id="mjo-81-vMy"> + <rect key="frame" x="115" y="355" width="187" height="23"/> + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> + </slider> + </subviews> + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> + <simulatedOrientationMetrics key="simulatedOrientationMetrics" orientation="landscapeRight"/> + </view> + <navigationItem key="navigationItem" id="Zf1-f8-ob0"/> + <connections> + <outlet property="Intervals" destination="NrM-45-dY4" id="xkE-Wc-sCj"/> + <outlet property="IntervalsType" destination="KcQ-1V-heQ" id="RiS-30-aUS"/> + <outlet property="Name" destination="zvL-DY-CD8" id="4Jw-ou-0yu"/> + <outlet property="RaiseZ" destination="mjo-81-vMy" id="BJw-p9-bSq"/> + </connections> + </viewController> + <placeholder placeholderIdentifier="IBFirstResponder" id="URb-SK-Z2A" userLabel="First Responder" sceneMemberID="firstResponder"/> + </objects> + <point key="canvasLocation" x="1759" y="-811"/> </scene> <!--Split View Controller--> <scene sceneID="18"> @@ -109,7 +177,7 @@ <objects> <tableViewController id="dVI-Oo-Sq4" customClass="ModelListController" sceneMemberID="viewController"> <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="OmH-vi-qhj"> - <rect key="frame" x="0.0" y="64" width="768" height="960"/> + <rect key="frame" x="0.0" y="20" width="768" height="1004"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <prototypes> @@ -134,7 +202,10 @@ <scene sceneID="Rhc-IE-crY"> <objects> <navigationController definesPresentationContext="YES" id="dwa-Pq-2vA" sceneMemberID="viewController"> - <navigationBar key="navigationBar" contentMode="scaleToFill" id="3bj-vr-d0C"> + <simulatedNavigationBarMetrics key="simulatedTopBarMetrics" barStyle="blackTranslucent"/> + <nil key="simulatedBottomBarMetrics"/> + <navigationBar key="navigationBar" contentMode="scaleToFill" barStyle="blackTranslucent" id="3bj-vr-d0C"> + <rect key="frame" x="0.0" y="-44" width="0.0" height="44"/> <autoresizingMask key="autoresizingMask"/> </navigationBar> <connections> @@ -150,7 +221,7 @@ <objects> <tableViewController storyboardIdentifier="" title="Master" clearsSelectionOnViewWillAppear="NO" id="19" customClass="MasterViewController" sceneMemberID="viewController"> <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="singleLineEtched" allowsSelection="NO" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" id="20"> - <rect key="frame" x="0.0" y="64" width="320" height="704"/> + <rect key="frame" x="0.0" y="20" width="320" height="748"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/> <simulatedOrientationMetrics key="simulatedOrientationMetrics" orientation="landscapeRight"/> @@ -182,16 +253,22 @@ </connections> </tableView> <navigationItem key="navigationItem" title="Settings" id="40"/> + <connections> + <segue destination="89M-FT-oxV" kind="push" id="fTD-MC-twP"/> + </connections> </tableViewController> <placeholder placeholderIdentifier="IBFirstResponder" id="23" sceneMemberID="firstResponder"/> </objects> - <point key="canvasLocation" x="851" y="-807"/> + <point key="canvasLocation" x="795" y="-806"/> </scene> <!--Navigation Controller--> <scene sceneID="50"> <objects> <navigationController id="42" sceneMemberID="viewController"> - <navigationBar key="navigationBar" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" id="43"> + <simulatedNavigationBarMetrics key="simulatedTopBarMetrics" barStyle="blackTranslucent" prompted="NO"/> + <nil key="simulatedBottomBarMetrics"/> + <navigationBar key="navigationBar" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" barStyle="blackTranslucent" id="43"> + <rect key="frame" x="0.0" y="-44" width="0.0" height="44"/> <autoresizingMask key="autoresizingMask"/> </navigationBar> <connections> @@ -203,35 +280,6 @@ <point key="canvasLocation" x="336" y="340"/> </scene> </scenes> - <classes> - <class className="DetailViewController" superclassName="UIViewController"> - <source key="sourceIdentifier" type="project" relativePath="./Classes/DetailViewController.h"/> - <relationships> - <relationship kind="action" name="pinch:" candidateClass="UIPinchGestureRecognizer"/> - <relationship kind="action" name="tap:" candidateClass="UITapGestureRecognizer"/> - <relationship kind="outlet" name="detailDescriptionLabel" candidateClass="UILabel"/> - </relationships> - </class> - <class className="EAGLView" superclassName="UIView"> - <source key="sourceIdentifier" type="project" relativePath="./Classes/EAGLView.h"/> - </class> - <class className="MasterViewController" superclassName="UITableViewController"> - <source key="sourceIdentifier" type="project" relativePath="./Classes/MasterViewController.h"/> - </class> - <class className="ModelListController" superclassName="UITableViewController"> - <source key="sourceIdentifier" type="project" relativePath="./Classes/ModelListController.h"/> - </class> - <class className="PostProViewController" superclassName="UITableViewController"> - <source key="sourceIdentifier" type="project" relativePath="./Classes/PostProViewController.h"/> - <relationships> - <relationship kind="action" name="PViewIntervalType:"/> - <relationship kind="action" name="PViewVisible:"/> - </relationships> - </class> - <class className="SplitViewController" superclassName="UISplitViewController"> - <source key="sourceIdentifier" type="project" relativePath="./Classes/SplitViewController.h"/> - </class> - </classes> <simulatedMetricsContainer key="defaultSimulatedMetrics"> <simulatedStatusBarMetrics key="statusBar" statusBarStyle="blackTranslucent"/> <simulatedOrientationMetrics key="orientation"/>