Skip to content

Commit

Permalink
Cleaning up the demo app
Browse files Browse the repository at this point in the history
  • Loading branch information
escoz authored and ironfounderson committed Aug 26, 2011
1 parent a2cc3d5 commit 2397210
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 33 deletions.
2 changes: 1 addition & 1 deletion quickdialog/QBadgeElement.m
Expand Up @@ -11,10 +11,10 @@
// ANY KIND, either express or implied. See the License for the specific language governing
// permissions and limitations under the License.
//

#import "QBadgeTableCell.h"
#import "QuickDialogTableView.h"


@implementation QBadgeElement
@synthesize badgeColor = _badgeColor;
@synthesize badge = _badge;
Expand Down
62 changes: 31 additions & 31 deletions sample/DummyDataBuilder.m
Expand Up @@ -65,7 +65,7 @@ + (QRootElement *)createWithInitAndKey {
}


+ (QRootElement *)createSubForm1Root {
+ (QRootElement *)createSampleFormRoot {
QRootElement *subForm = [[QRootElement alloc] init];
QSection *subsection = [[QSection alloc] initWithTitle:@"SubSection"];
subForm.grouped = YES;
Expand Down Expand Up @@ -105,8 +105,8 @@ + (QRootElement *)createSubForm1Root {
+ (QRootElement *)createSlidersRoot {
QRootElement *sliders = [[QRootElement alloc] init];
sliders.grouped = YES;
sliders.title = @"sliders";
QSection *detailsSection = [[QSection alloc] initWithTitle:@"Change some things"];
sliders.title = @"Sliders";
QSection *detailsSection = [[QSection alloc] initWithTitle:@"Slide left and right"];

[sliders addSection:detailsSection];

Expand All @@ -117,7 +117,7 @@ + (QRootElement *)createSlidersRoot {
return sliders;
}

+ (QElement *)createGeneralControlsRoot {
+ (QElement *)createSampleControls {
QRootElement *root = [[QRootElement alloc] init];
root.grouped = YES;
root.title = @"Sample Controls";
Expand Down Expand Up @@ -197,9 +197,9 @@ + (QElement *)createGeneralControlsRoot {
return root;
}

+ (QElement *)createRadioSectionsRoot {
+ (QElement *)createRadioRoot {
QRootElement *root = [[QRootElement alloc] init];
root.title = @"Radio elements";
root.title = @"Radio";
root.grouped = YES;

QSection *section1 = [[QSection alloc] initWithTitle:@"Radio element with push"];
Expand All @@ -215,9 +215,9 @@ + (QElement *)createRadioSectionsRoot {
return root;
}

+ (QRootElement *)createHtmlRoot {
+ (QRootElement *)createWebAndMapRoot {
QRootElement *root = [[QRootElement alloc] init];
root.title = @"Web and map elements";
root.title = @"Web and map";

QWebElement *element1 = [[QWebElement alloc] initWithTitle:@"ESCOZ Inc" url:@"http://escoz.com"];
QWebElement *element2 = [[QWebElement alloc] initWithTitle:@"Quicklytics" url:@"http://escoz.com/quicklytics"];
Expand All @@ -232,9 +232,9 @@ + (QRootElement *)createHtmlRoot {
return root;
}

+ (QRootElement *)createTextElementsRoot {
+ (QRootElement *)createTextRoot {
QRootElement *root = [[QRootElement alloc] init];
root.title = @"Text elements";
root.title = @"Text";

QTextElement *element1 = [[QTextElement alloc] initWithText:
@"Preparing for her flight\n"
Expand Down Expand Up @@ -354,6 +354,7 @@ + (QRootElement *)createDateTimeRoot {
root.grouped = YES;

QSection *section = [[QSection alloc] init];
section.title = @"Inline editing";

QDateTimeInlineElement *el2 = [[QDateTimeInlineElement alloc] initWithTitle:@"Today" date:[NSDate date]];
[section addElement:el2];
Expand All @@ -367,7 +368,7 @@ + (QRootElement *)createDateTimeRoot {
[section addElement:el4];

QSection *section2 = [[QSection alloc] init];

section2.title = @"Push editing";

QDateTimeElement *el5 = [[QDateTimeElement alloc] initWithTitle:@"Time only" date:[NSDate date]];
el5.mode = UIDatePickerModeTime;
Expand All @@ -390,28 +391,27 @@ + (QRootElement *)create {
QRootElement *root = [[QRootElement alloc] init];
root.grouped = YES;
root.title = @"QuickForms!";
QSection *section0 = [[QSection alloc] init];
section0.headerView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"quickdialog"]];
[section0 addElement:[LoginController createLoginForm]];
[section0 addElement:[self createGeneralControlsRoot]];

QSection *section1 = [[QSection alloc] initWithTitle:@"Usage examples"];

[section1 addElement:[self createLabelsRoot]];
[section1 addElement:[self createSlidersRoot]];
[section1 addElement:[self createRadioSectionsRoot]];
[section1 addElement:[self createHtmlRoot]];
[section1 addElement:[self createTextElementsRoot]];
[section1 addElement:[self createDateTimeRoot]];
[section1 addElement:[self createSortingRoot]];

[section1 addElement:[self createSubForm1Root]];
QSection *sectionSamples = [[QSection alloc] init];
sectionSamples.headerView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"quickdialog"]];
[sectionSamples addElement:[LoginController createLoginForm]];
[sectionSamples addElement:[self createSampleControls]];
[sectionSamples addElement:[self createSampleFormRoot]];

QSection *sectionElements = [[QSection alloc] initWithTitle:@"Usage examples"];

[sectionElements addElement:[self createLabelsRoot]];
[sectionElements addElement:[self createSlidersRoot]];
[sectionElements addElement:[self createRadioRoot]];
[sectionElements addElement:[self createWebAndMapRoot]];
[sectionElements addElement:[self createTextRoot]];
[sectionElements addElement:[self createDateTimeRoot]];
[sectionElements addElement:[self createSortingRoot]];

[section1 addElement:[self createWithInitDefault]];
[section1 addElement:[self createWithInitAndKey]];
[sectionElements addElement:[self createWithInitDefault]];
[sectionElements addElement:[self createWithInitAndKey]];

[root addSection:section0];
[root addSection:section1];
[root addSection:sectionSamples];
[root addSection:sectionElements];


return root;
Expand Down
1 change: 0 additions & 1 deletion sample/quickdialogexample-Prefix.pch
Expand Up @@ -4,7 +4,6 @@

#ifdef __OBJC__


#import "QElement.h"
#import "QRootElement.h"
#import "QLabelElement.h"
Expand Down

0 comments on commit 2397210

Please sign in to comment.