Commit e78a09bb authored by Alexandre Lision's avatar Alexandre Lision

videopref: autostart preview

Refs #76906

Change-Id: I33c04ff0b5a003a0471ab2dbc806765d067134aa
parent 0f5538a4
...@@ -189,11 +189,9 @@ QMetaObject::Connection previewStopped; ...@@ -189,11 +189,9 @@ QMetaObject::Connection previewStopped;
CFRelease(newImage); CFRelease(newImage);
} }
- (IBAction)togglePreview:(id)sender { - (void) viewWillAppear
if([sender state] == NSOnState) {
Video::PreviewManager::instance()->startPreview(); Video::PreviewManager::instance()->startPreview();
else
Video::PreviewManager::instance()->stopPreview();
} }
- (void)viewWillDisappear - (void)viewWillDisappear
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="6751" systemVersion="14C1510" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct"> <document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="7706" systemVersion="14E46" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies> <dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="6751"/> <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="7706"/>
</dependencies> </dependencies>
<objects> <objects>
<customObject id="-2" userLabel="File's Owner" customClass="VideoPrefsVC"> <customObject id="-2" userLabel="File's Owner" customClass="VideoPrefsVC">
...@@ -96,39 +96,28 @@ ...@@ -96,39 +96,28 @@
<action selector="chooseRate:" target="-2" id="nye-jT-0NU"/> <action selector="chooseRate:" target="-2" id="nye-jT-0NU"/>
</connections> </connections>
</popUpButton> </popUpButton>
<customView wantsLayer="YES" canDrawConcurrently="YES" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="qAJ-w8-a6Q" userLabel="Preview"> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="DTo-76-fYS">
<rect key="frame" x="32" y="20" width="470" height="230"/> <rect key="frame" x="18" y="284" width="56" height="17"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="470" id="WVf-8f-i99"/>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="230" id="udn-lE-Jd4"/>
</constraints>
</customView>
<button verticalHuggingPriority="750" ambiguous="YES" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="qHu-4n-CTV">
<rect key="frame" x="32" y="257" width="122" height="19"/>
<buttonCell key="cell" type="roundRect" title="Test preview" bezelStyle="roundedRect" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="IGT-OE-qJj">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
<font key="font" metaFont="cellTitle"/>
</buttonCell>
<connections>
<action selector="togglePreview:" target="-2" id="Z1R-EV-1Na"/>
</connections>
</button>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="DTo-76-fYS">
<rect key="frame" x="18" y="284" width="53" height="17"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Camera" id="YCM-JC-jin"> <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Camera" id="YCM-JC-jin">
<font key="font" metaFont="systemBold"/> <font key="font" metaFont="systemBold"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell> </textFieldCell>
</textField> </textField>
<customView wantsLayer="YES" canDrawConcurrently="YES" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="qAJ-w8-a6Q" userLabel="Preview">
<rect key="frame" x="32" y="20" width="489" height="256"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="470" id="WVf-8f-i99"/>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="256" id="cpy-ph-ToC"/>
</constraints>
</customView>
</subviews> </subviews>
<constraints> <constraints>
<constraint firstAttribute="trailing" secondItem="qAJ-w8-a6Q" secondAttribute="trailing" constant="39" id="EIm-N6-noX"/> <constraint firstAttribute="trailing" secondItem="qAJ-w8-a6Q" secondAttribute="trailing" constant="20" id="EIm-N6-noX"/>
<constraint firstItem="qHu-4n-CTV" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="32" id="HL9-hR-8AT"/> <constraint firstItem="DTo-76-fYS" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="20" id="FJb-iY-SG3"/>
<constraint firstItem="qAJ-w8-a6Q" firstAttribute="top" secondItem="DTo-76-fYS" secondAttribute="bottom" constant="8" id="LbB-2Z-j9c"/>
<constraint firstAttribute="bottom" secondItem="qAJ-w8-a6Q" secondAttribute="bottom" constant="20" id="Sv6-Ls-4tS"/> <constraint firstAttribute="bottom" secondItem="qAJ-w8-a6Q" secondAttribute="bottom" constant="20" id="Sv6-Ls-4tS"/>
<constraint firstItem="qAJ-w8-a6Q" firstAttribute="top" secondItem="qHu-4n-CTV" secondAttribute="bottom" constant="8" id="cQh-RN-ARc"/>
<constraint firstItem="qAJ-w8-a6Q" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="32" id="gt3-zq-vOi"/> <constraint firstItem="qAJ-w8-a6Q" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="32" id="gt3-zq-vOi"/>
<constraint firstItem="qAJ-w8-a6Q" firstAttribute="leading" secondItem="qHu-4n-CTV" secondAttribute="leading" id="oaw-xG-gPo"/>
</constraints> </constraints>
<point key="canvasLocation" x="372.5" y="257"/> <point key="canvasLocation" x="372.5" y="257"/>
</customView> </customView>
......
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