Skip to content

Commit

Permalink
New podspec, new code organization, WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
escoz committed May 26, 2014
1 parent dc07132 commit 59b64c1
Show file tree
Hide file tree
Showing 220 changed files with 1,455 additions and 4,028 deletions.
39 changes: 0 additions & 39 deletions AppledocSettings.plist

This file was deleted.

5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# QuickDialog CHANGELOG

## 0.1.0

Initial release.
25 changes: 12 additions & 13 deletions sample/LoginInfo.m → Classes/Core/NSMutableArray+MoveObject.h
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
//
//
// Copyright 2011 ESCOZ Inc - http://escoz.com
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
// file except in compliance with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
// file except in compliance with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under
// the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
// the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
// ANY KIND, either express or implied. See the License for the specific language governing
// permissions and limitations under the License.
//
//

#import "LoginInfo.h"

@implementation LoginInfo
#import <Foundation/Foundation.h>

@synthesize password = _password;
@synthesize login = _login;
@interface NSMutableArray (MoveObject)

- (void)qd_moveObjectFromIndex:(NSUInteger)from toIndex:(NSUInteger)to;

@end
33 changes: 33 additions & 0 deletions Classes/Core/NSMutableArray+MoveObject.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
//
// Copyright 2011 ESCOZ Inc - http://escoz.com
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
// file except in compliance with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under
// the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
// ANY KIND, either express or implied. See the License for the specific language governing
// permissions and limitations under the License.
//

#import "NSMutableArray+MoveObject.h"

@implementation NSMutableArray (MoveObject)

- (void)qd_moveObjectFromIndex:(NSUInteger)from toIndex:(NSUInteger)to
{
if (to == from)
return;

id objectToMove = [self objectAtIndex:from];
[self removeObjectAtIndex:from];
if (to >= [self count]) {
[self addObject:objectToMove];
} else {
[self insertObject:objectToMove atIndex:to];
}
}
@end

18 changes: 18 additions & 0 deletions quickdialog/QAppearance.h → Classes/Core/QAppearance.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
//
// Copyright 2011 ESCOZ Inc - http://escoz.com
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
// file except in compliance with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under
// the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
// ANY KIND, either express or implied. See the License for the specific language governing
// permissions and limitations under the License.
//

#import <Foundation/Foundation.h>

@class QSection;
@class QuickDialogTableView;
@class QElement;


@interface QAppearance : NSObject<NSCopying>

Expand Down
27 changes: 17 additions & 10 deletions quickdialog/QAppearance.m → Classes/Core/QAppearance.m
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
//
// Copyright 2011 ESCOZ Inc - http://escoz.com
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
// file except in compliance with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under
// the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
// ANY KIND, either express or implied. See the License for the specific language governing
// permissions and limitations under the License.
//

#import "QAppearance.h"
#import "QSection.h"
#import "QElement.h"

@implementation QAppearance {

}

@synthesize sectionTitleFont = _sectionTitleFont;
@synthesize sectionTitleColor = _sectionTitleColor;
@synthesize sectionFooterFont = _sectionFooterFont;
@synthesize sectionFooterColor = _sectionFooterColor;
@synthesize entryAlignment = _entryAlignment;
@synthesize buttonAlignment = _buttonAlignment;
@synthesize selectedBackgroundView = _selectedBackgroundView;
@synthesize sectionTitleShadowColor = _sectionTitleShadowColor;


- (QAppearance *)init {
self = [super init];
if (self) {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#import "QBindingEvaluator.h"
#import "QuickDialog.h"
#import "QTextElement.h"

@interface QBindingEvaluator ()
+ (BOOL)stringIsEmpty:(NSString *)aString;
Expand Down Expand Up @@ -78,10 +79,7 @@ + (BOOL)stringIsEmpty:(NSString *) aString {
return YES;
}
aString = [aString stringByTrimmingCharactersInSet: [NSCharacterSet whitespaceAndNewlineCharacterSet]];
if ([aString length] == 0) {
return YES;
}
return NO;
return [aString length] == 0;
}

- (void)bindSection:(QSection *)section toCollection:(NSArray *)items {
Expand Down
24 changes: 12 additions & 12 deletions sample/SampleDataBuilder.h → Classes/Core/QDynamicDataSection.h
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
//
//
// Copyright 2011 ESCOZ Inc - http://escoz.com
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
// file except in compliance with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
// file except in compliance with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under
// the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
// the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
// ANY KIND, either express or implied. See the License for the specific language governing
// permissions and limitations under the License.
//


#import <Foundation/Foundation.h>

@class QRootElement;
#import "QSection.h"
@interface QDynamicDataSection : QSection {


@interface SampleDataBuilder : NSObject<QuickDialogEntryElementDelegate> {

}
@property(nonatomic, strong) NSString *emptyMessage;


+ (QRootElement *)create;
@end
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
//
// Copyright 2011 ESCOZ Inc - http://escoz.com
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
// file except in compliance with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under
// the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
// ANY KIND, either express or implied. See the License for the specific language governing
// permissions and limitations under the License.
//


#import "QDynamicDataSection.h"
#import "QuickDialog.h"
#import "QEmptyListElement.h"

@implementation QDynamicDataSection {
NSString *_emptyMessage;
BOOL showLoading;
}
@synthesize emptyMessage = _emptyMessage;


- (QDynamicDataSection *)init {
self = [super init];
Expand Down
32 changes: 17 additions & 15 deletions sample/LoginInfo.h → Classes/Core/QElement+Appearance.h
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
//
//
// Copyright 2011 ESCOZ Inc - http://escoz.com
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
// file except in compliance with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
// file except in compliance with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under
// the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
// the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
// ANY KIND, either express or implied. See the License for the specific language governing
// permissions and limitations under the License.
//


#import <Foundation/Foundation.h>
#import "QElement.h"

@class QAppearance;

@interface QElement (Appearance)

@interface LoginInfo : NSObject {
@property(nonatomic, retain) QAppearance *appearance;

@private
NSString *_password;
NSString *_login;
}
+ (QAppearance *)appearance;
+ (void)setAppearance:(QAppearance *)newAppearance;

@property(strong) NSString *login;
@property(strong) NSString *password;

@end
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
//
// Copyright 2011 ESCOZ Inc - http://escoz.com
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
// file except in compliance with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under
// the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
// ANY KIND, either express or implied. See the License for the specific language governing
// permissions and limitations under the License.
//


#import <objc/runtime.h>
#import "QElement+Appearance.h"
#import "QSection.h"
#import "QRootElement+JsonBuilder.h"
#import "QFlatAppearance.h"


static void * const KEY_APPEARANCE_OBJECT = (void*)&KEY_APPEARANCE_OBJECT;
Expand Down
File renamed without changes.
16 changes: 0 additions & 16 deletions quickdialog/QElement.m → Classes/Core/QElement.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,9 @@
#import "QuickDialog.h"

@implementation QElement {
@private
id _object;
NSString *_controllerAccessoryAction;
}

@synthesize enabled = _enabled;
@synthesize parentSection = _parentSection;
@synthesize key = _key;
@synthesize bind = _bind;

@synthesize onSelected = _onSelected;
@synthesize controllerAction = _controllerAction;
@synthesize object = _object;
@synthesize height = _height;
@synthesize hidden = _hidden;
@dynamic visibleIndex;
@synthesize controllerAccessoryAction = _controllerAccessoryAction;

@synthesize labelingPolicy = _labelingPolicy;

- (QElement *)init {
self = [super init];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// permissions and limitations under the License.
//


#import "QLabelElement.h"

@interface QEmptyListElement : QLabelElement {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
//

#import "QEmptyListElement.h"
#import "QElement+Appearance.h"
#import "QAppearance.h"

@implementation QEmptyListElement

Expand Down
File renamed without changes.
Loading

0 comments on commit 59b64c1

Please sign in to comment.