<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>camera.ui Example File | Qt Multimedia 5.12.2</title> <link rel="stylesheet" type="text/css" href="style/offline-simple.css" /> <script type="text/javascript"> document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css"); // loading style sheet breaks anchors that were jumped to before // so force jumping to anchor again setTimeout(function() { var anchor = location.hash; // need to jump to different anchor first (e.g. none) location.hash = "#"; setTimeout(function() { location.hash = anchor; }, 0); }, 0); </script> </head> <body> <div class="header" id="qtdocheader"> <div class="main"> <div class="main-rounded"> <div class="navigationbar"> <table><tr> <td >Qt 5.12</td><td ><a href="qtmultimedia-index.html">Qt Multimedia</a></td><td ><a href="qtmultimedia-multimediawidgets-camera-example.html">Camera Example</a></td><td >camera.ui Example File</td></tr></table><table class="buildversion"><tr> <td id="buildversion" width="100%" align="right"><a href="qtmultimedia-index.html">Qt 5.12.2 Reference Documentation</a></td> </tr></table> </div> </div> <div class="content"> <div class="line"> <div class="content mainContent"> <div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div> <h1 class="title">camera.ui Example File</h1> <span class="subtitle">multimediawidgets/camera/camera.ui</span> <!-- $$$multimediawidgets/camera/camera.ui-description --> <div class="descr"> <a name="details"></a> <pre class="cpp"> <?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> <class>Camera</class> <widget class="QMainWindow" name="Camera"> <property name="geometry"> <rect> <x>0</x> <y>0</y> <width>668</width> <height>422</height> </rect> </property> <property name="windowTitle"> <string>Camera</string> </property> <widget class="QWidget" name="centralwidget"> <layout class="QGridLayout" name="gridLayout_3"> <item row="0" column="0" rowspan="3"> <widget class="QStackedWidget" name="stackedWidget"> <property name="sizePolicy"> <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <horstretch>1</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> <property name="palette"> <palette> <active> <colorrole role="Base"> <brush brushstyle="SolidPattern"> <color alpha="255"> <red>255</red> <green>255</green> <blue>255</blue> </color> </brush> </colorrole> <colorrole role="Window"> <brush brushstyle="SolidPattern"> <color alpha="255"> <red>145</red> <green>145</green> <blue>145</blue> </color> </brush> </colorrole> </active> <inactive> <colorrole role="Base"> <brush brushstyle="SolidPattern"> <color alpha="255"> <red>255</red> <green>255</green> <blue>255</blue> </color> </brush> </colorrole> <colorrole role="Window"> <brush brushstyle="SolidPattern"> <color alpha="255"> <red>145</red> <green>145</green> <blue>145</blue> </color> </brush> </colorrole> </inactive> <disabled> <colorrole role="Base"> <brush brushstyle="SolidPattern"> <color alpha="255"> <red>145</red> <green>145</green> <blue>145</blue> </color> </brush> </colorrole> <colorrole role="Window"> <brush brushstyle="SolidPattern"> <color alpha="255"> <red>145</red> <green>145</green> <blue>145</blue> </color> </brush> </colorrole> </disabled> </palette> </property> <property name="currentIndex"> <number>0</number> </property> <widget class="QWidget" name="viewfinderPage"> <layout class="QGridLayout" name="gridLayout_5"> <item row="0" column="0"> <widget class="QCameraViewfinder" name="viewfinder" native="true"/> </item> </layout> </widget> <widget class="QWidget" name="previewPage"> <layout class="QGridLayout" name="gridLayout_4"> <item row="0" column="0"> <widget class="QLabel" name="lastImagePreviewLabel"> <property name="sizePolicy"> <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> <property name="frameShape"> <enum>QFrame::Box</enum> </property> <property name="text"> <string/> </property> </widget> </item> </layout> </widget> </widget> </item> <item row="1" column="1" colspan="2"> <widget class="QPushButton" name="lockButton"> <property name="text"> <string>Focus</string> </property> </widget> </item> <item row="2" column="1" colspan="2"> <widget class="QTabWidget" name="captureWidget"> <property name="currentIndex"> <number>0</number> </property> <widget class="QWidget" name="tab_2"> <attribute name="title"> <string>Image</string> </attribute> <layout class="QGridLayout" name="gridLayout"> <item row="0" column="0"> <widget class="QPushButton" name="takeImageButton"> <property name="enabled"> <bool>false</bool> </property> <property name="text"> <string>Capture Photo</string> </property> <property name="icon"> <iconset resource="camera.qrc"> <normaloff>:/images/shutter.svg</normaloff>:/images/shutter.svg</iconset> </property> </widget> </item> <item row="1" column="0"> <spacer name="verticalSpacer_2"> <property name="orientation"> <enum>Qt::Vertical</enum> </property> <property name="sizeHint" stdset="0"> <size> <width>20</width> <height>161</height> </size> </property> </spacer> </item> <item row="2" column="0"> <widget class="QLabel" name="label"> <property name="text"> <string>Exposure Compensation:</string> </property> </widget> </item> <item row="3" column="0"> <widget class="QSlider" name="exposureCompensation"> <property name="minimum"> <number>-4</number> </property> <property name="maximum"> <number>4</number> </property> <property name="pageStep"> <number>2</number> </property> <property name="orientation"> <enum>Qt::Horizontal</enum> </property> <property name="tickPosition"> <enum>QSlider::TicksAbove</enum> </property> </widget> </item> </layout> </widget> <widget class="QWidget" name="tab"> <attribute name="title"> <string>Video</string> </attribute> <layout class="QGridLayout" name="gridLayout_2"> <item row="0" column="0"> <widget class="QPushButton" name="recordButton"> <property name="text"> <string>Record</string> </property> </widget> </item> <item row="1" column="0"> <widget class="QPushButton" name="pauseButton"> <property name="text"> <string>Pause</string> </property> </widget> </item> <item row="2" column="0"> <widget class="QPushButton" name="stopButton"> <property name="text"> <string>Stop</string> </property> </widget> </item> <item row="3" column="0"> <spacer name="verticalSpacer"> <property name="orientation"> <enum>Qt::Vertical</enum> </property> <property name="sizeHint" stdset="0"> <size> <width>20</width> <height>76</height> </size> </property> </spacer> </item> <item row="4" column="0"> <widget class="QPushButton" name="muteButton"> <property name="text"> <string>Mute</string> </property> <property name="checkable"> <bool>true</bool> </property> </widget> </item> </layout> </widget> </widget> </item> </layout> </widget> <widget class="QMenuBar" name="menubar"> <property name="geometry"> <rect> <x>0</x> <y>0</y> <width>668</width> <height>21</height> </rect> </property> <widget class="QMenu" name="menuFile"> <property name="title"> <string>File</string> </property> <addaction name="actionStartCamera"/> <addaction name="actionStopCamera"/> <addaction name="separator"/> <addaction name="actionSettings"/> <addaction name="separator"/> <addaction name="actionExit"/> </widget> <widget class="QMenu" name="menuDevices"> <property name="title"> <string>Devices</string> </property> </widget> <addaction name="menuFile"/> <addaction name="menuDevices"/> </widget> <widget class="QStatusBar" name="statusbar"/> <action name="actionExit"> <property name="text"> <string>Exit</string> </property> </action> <action name="actionStartCamera"> <property name="text"> <string>Start Camera</string> </property> </action> <action name="actionStopCamera"> <property name="text"> <string>Stop Camera</string> </property> </action> <action name="actionSettings"> <property name="text"> <string>Settings</string> </property> </action> </widget> <customwidgets> <customwidget> <class>QCameraViewfinder</class> <extends>QWidget</extends> <header>qcameraviewfinder.h</header> <container>1</container> </customwidget> </customwidgets> <resources> <include location="camera.qrc"/> </resources> <connections> <connection> <sender>recordButton</sender> <signal>clicked()</signal> <receiver>Camera</receiver> <slot>record()</slot> <hints> <hint type="sourcelabel"> <x>647</x> <y>149</y> </hint> <hint type="destinationlabel"> <x>61</x> <y>238</y> </hint> </hints> </connection> <connection> <sender>stopButton</sender> <signal>clicked()</signal> <receiver>Camera</receiver> <slot>stop()</slot> <hints> <hint type="sourcelabel"> <x>647</x> <y>225</y> </hint> <hint type="destinationlabel"> <x>140</x> <y>236</y> </hint> </hints> </connection> <connection> <sender>pauseButton</sender> <signal>clicked()</signal> <receiver>Camera</receiver> <slot>pause()</slot> <hints> <hint type="sourcelabel"> <x>647</x> <y>187</y> </hint> <hint type="destinationlabel"> <x>234</x> <y>237</y> </hint> </hints> </connection> <connection> <sender>actionExit</sender> <signal>triggered()</signal> <receiver>Camera</receiver> <slot>close()</slot> <hints> <hint type="sourcelabel"> <x>-1</x> <y>-1</y> </hint> <hint type="destinationlabel"> <x>154</x> <y>130</y> </hint> </hints> </connection> <connection> <sender>takeImageButton</sender> <signal>clicked()</signal> <receiver>Camera</receiver> <slot>takeImage()</slot> <hints> <hint type="sourcelabel"> <x>625</x> <y>132</y> </hint> <hint type="destinationlabel"> <x>603</x> <y>169</y> </hint> </hints> </connection> <connection> <sender>lockButton</sender> <signal>clicked()</signal> <receiver>Camera</receiver> <slot>toggleLock()</slot> <hints> <hint type="sourcelabel"> <x>658</x> <y>75</y> </hint> <hint type="destinationlabel"> <x>453</x> <y>119</y> </hint> </hints> </connection> <connection> <sender>muteButton</sender> <signal>toggled(bool)</signal> <receiver>Camera</receiver> <slot>setMuted(bool)</slot> <hints> <hint type="sourcelabel"> <x>647</x> <y>377</y> </hint> <hint type="destinationlabel"> <x>5</x> <y>280</y> </hint> </hints> </connection> <connection> <sender>exposureCompensation</sender> <signal>valueChanged(int)</signal> <receiver>Camera</receiver> <slot>setExposureCompensation(int)</slot> <hints> <hint type="sourcelabel"> <x>559</x> <y>367</y> </hint> <hint type="destinationlabel"> <x>665</x> <y>365</y> </hint> </hints> </connection> <connection> <sender>actionSettings</sender> <signal>triggered()</signal> <receiver>Camera</receiver> <slot>configureCaptureSettings()</slot> <hints> <hint type="sourcelabel"> <x>-1</x> <y>-1</y> </hint> <hint type="destinationlabel"> <x>333</x> <y>210</y> </hint> </hints> </connection> <connection> <sender>actionStartCamera</sender> <signal>triggered()</signal> <receiver>Camera</receiver> <slot>startCamera()</slot> <hints> <hint type="sourcelabel"> <x>-1</x> <y>-1</y> </hint> <hint type="destinationlabel"> <x>333</x> <y>210</y> </hint> </hints> </connection> <connection> <sender>actionStopCamera</sender> <signal>triggered()</signal> <receiver>Camera</receiver> <slot>stopCamera()</slot> <hints> <hint type="sourcelabel"> <x>-1</x> <y>-1</y> </hint> <hint type="destinationlabel"> <x>333</x> <y>210</y> </hint> </hints> </connection> </connections> <slots> <slot>record()</slot> <slot>pause()</slot> <slot>stop()</slot> <slot>enablePreview(bool)</slot> <slot>configureCaptureSettings()</slot> <slot>takeImage()</slot> <slot>startCamera()</slot> <slot>toggleLock()</slot> <slot>setMuted(bool)</slot> <slot>stopCamera()</slot> <slot>setExposureCompensation(int)</slot> </slots> </ui> </pre> </div> <!-- @@@multimediawidgets/camera/camera.ui --> </div> </div> </div> </div> </div> <div class="footer"> <p> <acronym title="Copyright">©</acronym> 2019 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners.<br/> The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation.<br/> Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners. </p> </div> </body> </html>