Delegate for month overawe
This commit is contained in:
parent
095e1a8fd1
commit
6540cdad77
@ -30,6 +30,7 @@
|
||||
E2218D621EF41415004298F6 /* CollectionViewMonth.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2218D611EF41415004298F6 /* CollectionViewMonth.swift */; };
|
||||
E2218D641EF45F37004298F6 /* LossDistributionPie.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2218D631EF45F37004298F6 /* LossDistributionPie.swift */; };
|
||||
E2218D671EF463B4004298F6 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E2218D661EF463B4004298F6 /* QuartzCore.framework */; };
|
||||
E2218D691EF478C0004298F6 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E2218CA81EF2D37B004298F6 /* Assets.xcassets */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
@ -451,6 +452,7 @@
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
E2218D691EF478C0004298F6 /* Assets.xcassets in Resources */,
|
||||
E2218D5E1EF3DD6F004298F6 /* CollectionViewItemMonth.xib in Resources */,
|
||||
E2218D541EF32BC4004298F6 /* Document.xib in Resources */,
|
||||
E2218D3B1EF32764004298F6 /* Graph.icns in Resources */,
|
||||
@ -547,7 +549,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.12;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.11;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
@ -591,7 +593,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.12;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.11;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = macosx;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<subviews>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3aE-Wf-9eZ">
|
||||
<rect key="frame" x="18" y="90" width="26" height="22"/>
|
||||
<rect key="frame" x="18" y="100" width="26" height="22"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="01" id="hZ1-E9-nbm">
|
||||
<font key="font" metaFont="system" size="17"/>
|
||||
@ -31,7 +31,7 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ios-8D-sSB">
|
||||
<rect key="frame" x="58" y="65" width="59" height="17"/>
|
||||
<rect key="frame" x="58" y="75" width="59" height="17"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" id="axa-F2-XeS">
|
||||
<font key="font" metaFont="system"/>
|
||||
@ -40,7 +40,7 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bOH-fN-p3a">
|
||||
<rect key="frame" x="18" y="65" width="36" height="17"/>
|
||||
<rect key="frame" x="18" y="75" width="36" height="17"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Loss:" id="6Hu-ZO-t9e">
|
||||
<font key="font" metaFont="system"/>
|
||||
@ -49,13 +49,31 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="B0U-sm-QBD" customClass="LossDistributionPie" customModule="Graphic_Analysis_2" customModuleProvider="target">
|
||||
<rect key="frame" x="20" y="20" width="37" height="37"/>
|
||||
<rect key="frame" x="20" y="10" width="37" height="37"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
</customView>
|
||||
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ftO-kx-Le5" customClass="LossDistributionPie" customModule="Graphic_Analysis_2" customModuleProvider="target">
|
||||
<rect key="frame" x="78" y="20" width="37" height="37"/>
|
||||
<rect key="frame" x="78" y="10" width="37" height="37"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
</customView>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nbG-Sm-rH7">
|
||||
<rect key="frame" x="26" y="50" width="24" height="17"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="AM" id="xPq-iI-lK1">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CuG-p6-mV1">
|
||||
<rect key="frame" x="84" y="50" width="24" height="17"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="PM" id="SQW-qO-YRY">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
</subviews>
|
||||
<point key="canvasLocation" x="138.5" y="169"/>
|
||||
</customView>
|
||||
|
||||
@ -47,3 +47,16 @@ extension CollectionViewMonth: NSCollectionViewDataSource {
|
||||
return item2
|
||||
}
|
||||
}
|
||||
|
||||
extension CollectionViewMonth : NSCollectionViewDelegate {
|
||||
func collectionView(_ collectionView: NSCollectionView, didSelectItemsAt indexPaths: Set<IndexPath>) {
|
||||
guard let layer = (collectionView.item(at: indexPaths.first!) as? CollectionViewItemMonth)?.view.layer else { return }
|
||||
layer.borderColor = NSColor.gray.cgColor
|
||||
}
|
||||
|
||||
func collectionView(_ collectionView: NSCollectionView, didDeselectItemsAt indexPaths: Set<IndexPath>) {
|
||||
guard let layer = (collectionView.item(at: indexPaths.first!) as? CollectionViewItemMonth)?.view.layer else { return }
|
||||
layer.borderColor = NSColor.clear.cgColor
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -73,7 +73,7 @@ class Document: NSDocument {
|
||||
collectionViewYear.dataSource = yearDatasource
|
||||
collectionViewYear.delegate = yearDatasource
|
||||
collectionViewMonth.dataSource = monthDatasource
|
||||
//collectionViewMonth.delegate = monthDatasource
|
||||
collectionViewMonth.delegate = monthDatasource
|
||||
}
|
||||
|
||||
override func shouldCloseWindowController(_ windowController: NSWindowController, delegate: Any?, shouldClose shouldCloseSelector: Selector?, contextInfo: UnsafeMutableRawPointer?) {
|
||||
|
||||
@ -17,8 +17,8 @@
|
||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" animationBehavior="default" id="QvC-M9-y7g">
|
||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES"/>
|
||||
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
|
||||
<rect key="contentRect" x="0.0" y="87" width="1272" height="715"/>
|
||||
<windowPositionMask key="initialPositionMask" topStrut="YES"/>
|
||||
<rect key="contentRect" x="8" y="85" width="1272" height="715"/>
|
||||
<rect key="screenRect" x="0.0" y="0.0" width="1280" height="800"/>
|
||||
<value key="minSize" type="size" width="1272" height="715"/>
|
||||
<value key="maxSize" type="size" width="1272" height="715"/>
|
||||
|
||||
@ -44,7 +44,7 @@
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>208</string>
|
||||
<string>216</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.utilities</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
version 2.0
|
||||
build 208
|
||||
build 216
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>4.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>26</string>
|
||||
<string>27</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.utilities</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
version 4.0
|
||||
build 26
|
||||
build 27
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user