Commit 4ba18028 authored by Alexandre Lision's avatar Alexandre Lision

cleanup: better project hierarchy

- adapt file names to match our convention
- sort code in subgroups (no more Sources and Headers groups)

Refs #71037

Change-Id: I585b85b9ba8f86407efc9127f29010117b5ee674
parent 9f319b7b
......@@ -30,35 +30,63 @@ MESSAGE("LibRingClient is here:" ${LIB_RING_CLIENT_INCLUDE_DIR})
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w")
#Files to compile
SET(ringclient_SRCS
src/main.mm
src/AppDelegate.mm
src/RingWindowController.mm
src/ConversationsViewController.mm
src/PreferencesViewController.mm
SET(ringclient_CONTROLLERS
src/QNSTreeController.mm
src/QNSTreeController.h
src/CurrentCallVC.mm
src/CurrentCallVC.h
src/GeneralPrefsVC.mm
src/RingWizardWC.mm
src/RingWizardWC.h
src/RingWindowController.mm
src/RingWindowController.h
src/ConversationsVC.mm
src/ConversationsVC.h
src/PreferencesVC.mm
src/PreferencesVC.h
src/AccGeneralVC.mm
src/AccAudioVC.mm
src/AccGeneralVC.h
src/AccVideoVC.mm
src/AccVideoVC.h
src/AccAudioVC.mm
src/AccAudioVC.h
src/AccRingVC.mm
src/AccRingVC.h
src/AccAdvancedVC.mm
src/AccAdvancedVC.h
src/AccSecurityVC.mm
src/AccountsVC.mm
src/CurrentCallVC.mm
src/AccSecurityVC.h
src/AudioPrefsVC.mm
src/AudioPrefsVC.h
src/AccountsVC.mm
src/AccountsVC.h
src/VideoPrefsVC.mm
src/GeneralPrefsVC.mm
src/RingWizardWC.mm
src/HistoryViewController.mm
src/VideoPrefsVC.h
src/GeneralPrefsVC.h
src/HistoryVC.mm
src/HistoryVC.h
src/PersonsVC.mm
src/PersonsVC.h)
src/delegates/ImageManipulationDelegate.mm
SET(ringclient_BACKENDS
src/backends/AddressBookBackend.mm
src/backends/MinimalHistoryBackend.mm
src/backends/AddressBookBackend.h
src/backends/MinimalHistoryBackend.h)
src/views/PersonCell.mm
SET(ringclient_VIEWS
src/views/CallView.mm
src/views/CallView.h
src/views/PersonCell.mm
src/views/PersonCell.h)
SET(ringclient_OTHERS
src/main.mm
src/AppDelegate.mm
src/AppDelegate.h
src/delegates/ImageManipulationDelegate.mm
src/delegates/ImageManipulationDelegate.h)
src/backends/AddressBookBackend.mm
src/backends/MinimalHistoryBackend.mm)
SET(ringclient_XIBS
MainMenu
......@@ -77,37 +105,7 @@ SET(ringclient_XIBS
PreferencesScreen
RingWizard)
SET(ringclient_HDRS
src/AppDelegate.h
src/RingWindowController.h
src/CurrentCallVC.h
src/ConversationsViewController.h
src/PreferencesViewController.h
src/AccGeneralVC.h
src/AccVideoVC.h
src/AccAudioVC.h
src/AccRingVC.h
src/AccAdvancedVC.h
src/AccSecurityVC.h
src/AudioPrefsVC.h
src/AccountsVC.h
src/VideoPrefsVC.h
src/GeneralPrefsVC.h
src/HistoryViewController.h
src/RingWizardWC.h
src/QNSTreeController.h
src/PersonsVC.h
src/delegates/ImageManipulationDelegate.h
src/views/PersonCell.h
src/views/CallView.h
src/backends/AddressBookBackend.h
src/backends/MinimalHistoryBackend.h)
# Icons
# This part tells CMake where to find and install the file itself
SET(myApp_ICON ${CMAKE_CURRENT_SOURCE_DIR}/data/appicon.icns)
SET_SOURCE_FILES_PROPERTIES(${myApp_ICON} PROPERTIES
......@@ -136,13 +134,23 @@ FOREACH(xib ${ringclient_XIBS})
ENDFOREACH()
ADD_EXECUTABLE(${PROJ_NAME} MACOSX_BUNDLE
${ringclient_SRCS}
${ringclient_HDRS}
${ringclient_CONTROLLERS}
${ringclient_BACKENDS}
${ringclient_VIEWS}
${ringclient_OTHERS}
${ringclient_XIBS_FOR_EXECUTABLE}
${myApp_ICON}
Credits.rtf
${ring_ICONS})
# Follow Xcode hierarchy principles
SOURCE_GROUP("Controllers" FILES ${ringclient_CONTROLLERS})
SOURCE_GROUP("Backends" FILES ${ringclient_BACKENDS})
SOURCE_GROUP("CustomViews" FILES ${ringclient_VIEWS})
SOURCE_GROUP("Classes" FILES ${ringclient_OTHERS})
SOURCE_GROUP("Resources\\Interface Builder" FILES ${ringclient_XIBS_FOR_EXECUTABLE})
TARGET_LINK_LIBRARIES( ${PROJ_NAME}
${LIB_RING_CLIENT_LIBRARY}
${Qt5Core_LIBRARIES}
......
......@@ -33,7 +33,7 @@
#import <Cocoa/Cocoa.h>
#import "QNSTreeController.h"
@interface ConversationsViewController : NSViewController <NSOutlineViewDelegate> {
@interface ConversationsVC : NSViewController <NSOutlineViewDelegate> {
}
......
......@@ -27,7 +27,7 @@
* shall include the source code for the parts of OpenSSL used as well
* as that of the covered work.
*/
#import "ConversationsViewController.h"
#import "ConversationsVC.h"
#import <callmodel.h>
#import <QtCore/qitemselectionmodel.h>
......@@ -36,7 +36,7 @@
#define COLUMNID_CONVERSATIONS @"ConversationsColumn" // the single column name in our outline view
@interface ConversationsViewController ()
@interface ConversationsVC ()
@property CurrentCallVC* currentVC;
@property (assign) IBOutlet NSView *currentCallView;
......@@ -45,7 +45,7 @@
@end
@implementation ConversationsViewController
@implementation ConversationsVC
@synthesize conversationsView;
@synthesize treeController;
@synthesize currentVC;
......
......@@ -32,7 +32,7 @@
#import <Cocoa/Cocoa.h>
@interface HistoryViewController : NSViewController <NSOutlineViewDelegate> {
@interface HistoryVC : NSViewController <NSOutlineViewDelegate> {
}
......
......@@ -27,7 +27,7 @@
* shall include the source code for the parts of OpenSSL used as well
* as that of the covered work.
*/
#import "HistoryViewController.h"
#import "HistoryVC.h"
#import <categorizedhistorymodel.h>
#import <QSortFilterProxyModel>
......@@ -42,14 +42,14 @@
#define COLUMNID_CONTACTMETHOD @"ContactMethodColumn" // the single column name in our outline view
#define COLUMNID_DATE @"DateColumn" // the single column name in our outline view
@interface HistoryViewController()
@interface HistoryVC()
@property NSTreeController *treeController;
@property (assign) IBOutlet NSOutlineView *historyView;
@property QSortFilterProxyModel *historyProxyModel;
@end
@implementation HistoryViewController
@implementation HistoryVC
@synthesize treeController;
@synthesize historyView;
@synthesize historyProxyModel;
......
......@@ -32,7 +32,7 @@
#import <Cocoa/Cocoa.h>
@interface PreferencesViewController : NSViewController <NSToolbarDelegate>
@interface PreferencesVC : NSViewController <NSToolbarDelegate>
- (void) close;
@property (nonatomic, assign) NSViewController *currentVC;
......
......@@ -27,7 +27,7 @@
* shall include the source code for the parts of OpenSSL used as well
* as that of the covered work.
*/
#import "PreferencesViewController.h"
#import "PreferencesVC.h"
#import <QuartzCore/QuartzCore.h>
......@@ -39,13 +39,13 @@
#import "AudioPrefsVC.h"
#import "VideoPrefsVC.h"
@interface PreferencesViewController ()
@interface PreferencesVC ()
@property NSButton* toggleAdvancedSettings;
@end
@implementation PreferencesViewController
@implementation PreferencesVC
@synthesize toggleAdvancedSettings;
static NSString* const kProfilePrefsIdentifier = @"ProfilesPrefsIdentifier";
......
......@@ -31,14 +31,14 @@
#define RINGWINDOWCONTROLLER_H
#import <Cocoa/Cocoa.h>
#import "HistoryViewController.h"
#import "PreferencesViewController.h"
#import "HistoryVC.h"
#import "PreferencesVC.h"
@interface RingWindowController : NSWindowController <NSToolbarDelegate, NSTextFieldDelegate>{
IBOutlet NSView *currentView;
}
@property (nonatomic, assign) NSViewController *myCurrentViewController;
@property PreferencesViewController* preferencesViewController;
@property PreferencesVC* preferencesViewController;
- (IBAction)openPreferences:(id)sender;
- (IBAction)closePreferences:(NSToolbarItem *)sender;
......
......@@ -62,7 +62,7 @@ static NSString* const kCallButtonIdentifer = @"CallButtonIdentifier";
}
NSToolbar* tb = [[NSToolbar alloc] initWithIdentifier: @"PreferencesToolbar"];
self.preferencesViewController = [[PreferencesViewController alloc] initWithNibName:@"PreferencesScreen" bundle:nil];
self.preferencesViewController = [[PreferencesVC alloc] initWithNibName:@"PreferencesScreen" bundle:nil];
self.myCurrentViewController = self.preferencesViewController;
NSLayoutConstraint* test = [NSLayoutConstraint constraintWithItem:self.preferencesViewController.view
......
......@@ -254,13 +254,13 @@
</connections>
<point key="canvasLocation" x="529.5" y="361"/>
</window>
<viewController id="jzj-dD-ryc" customClass="HistoryViewController">
<viewController id="jzj-dD-ryc" customClass="HistoryVC">
<connections>
<outlet property="historyView" destination="rr8-UC-gGF" id="8NW-8O-X5L"/>
<outlet property="view" destination="9uI-D5-KRt" id="hCt-k1-UV2"/>
</connections>
</viewController>
<viewController id="txt-J3-pzW" customClass="ConversationsViewController">
<viewController id="txt-J3-pzW" customClass="ConversationsVC">
<connections>
<outlet property="conversationsView" destination="zcl-pp-rGb" id="YXp-WN-UmC"/>
<outlet property="currentCallView" destination="tSW-YT-asL" id="r2r-Q3-clc"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment