- Qt 5.3
- Qt Multimedia
- Audio Recorder Example
- audiorecorder_small.ui Example File
- Qt 5.3.2 Reference Documentation

# audiorecorder_small.ui Example File

audiorecorder/audiorecorder_small.ui

    <?xml version="1.0" encoding="UTF-8"?>
    <ui version="4.0">
     <class>AudioRecorder</class>
     <widget class="QMainWindow" name="AudioRecorder">
      <property name="geometry">
       <rect>
        <x>0</x>
        <y>0</y>
        <width>420</width>
        <height>346</height>
       </rect>
      </property>
      <property name="windowTitle">
       <string>MainWindow</string>
      </property>
      <widget class="QWidget" name="centralwidget">
       <layout class="QGridLayout" name="gridLayout_5">
        <item row="0" column="0" colspan="3">
         <widget class="QScrollArea" name="scrollArea">
          <property name="focusPolicy">
           <enum>Qt::ClickFocus</enum>
          </property>
          <property name="widgetResizable">
           <bool>true</bool>
          </property>
          <widget class="QWidget" name="scrollAreaWidgetContents">
           <property name="geometry">
            <rect>
             <x>0</x>
             <y>0</y>
             <width>400</width>
             <height>277</height>
            </rect>
           </property>
           <layout class="QGridLayout" name="gridLayout_4">
            <item row="0" column="0">
             <widget class="QWidget" name="widget" native="true">
              <layout class="QGridLayout" name="gridLayout_3">
               <item row="3" column="0">
                <widget class="QLabel" name="label_6">
                 <property name="text">
                  <string>Audio Level:</string>
                 </property>
                </widget>
               </item>
               <item row="2" column="0">
                <spacer name="verticalSpacer">
                 <property name="orientation">
                  <enum>Qt::Vertical</enum>
                 </property>
                 <property name="sizeHint" stdset="0">
                  <size>
                   <width>20</width>
                   <height>29</height>
                  </size>
                 </property>
                </spacer>
               </item>
               <item row="1" column="0">
                <layout class="QGridLayout" name="gridLayout">
                 <item row="0" column="0">
                  <widget class="QRadioButton" name="constantQualityRadioButton">
                   <property name="text">
                    <string>Quality:</string>
                   </property>
                   <property name="checked">
                    <bool>true</bool>
                   </property>
                  </widget>
                 </item>
                 <item row="0" column="1">
                  <widget class="QRadioButton" name="constantBitrateRadioButton">
                   <property name="text">
                    <string>Bitrate:</string>
                   </property>
                  </widget>
                 </item>
                 <item row="1" column="0">
                  <widget class="QSlider" name="qualitySlider">
                   <property name="sizePolicy">
                    <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
                     <horstretch>1</horstretch>
                     <verstretch>0</verstretch>
                    </sizepolicy>
                   </property>
                   <property name="orientation">
                    <enum>Qt::Horizontal</enum>
                   </property>
                  </widget>
                 </item>
                 <item row="1" column="1">
                  <widget class="QComboBox" name="bitrateBox">
                   <property name="enabled">
                    <bool>false</bool>
                   </property>
                   <property name="sizePolicy">
                    <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
                     <horstretch>1</horstretch>
                     <verstretch>0</verstretch>
                    </sizepolicy>
                   </property>
                  </widget>
                 </item>
                </layout>
               </item>
               <item row="0" column="0">
                <layout class="QGridLayout" name="gridLayout_2">
                 <item row="3" column="0">
                  <widget class="QLabel" name="label_4">
                   <property name="text">
                    <string>Sample rate:</string>
                   </property>
                  </widget>
                 </item>
                 <item row="1" column="0">
                  <widget class="QLabel" name="label_2">
                   <property name="text">
                    <string>Audio Codec:</string>
                   </property>
                  </widget>
                 </item>
                 <item row="2" column="1">
                  <widget class="QComboBox" name="containerBox"/>
                 </item>
                 <item row="0" column="1">
                  <widget class="QComboBox" name="audioDeviceBox"/>
                 </item>
                 <item row="3" column="1">
                  <widget class="QComboBox" name="sampleRateBox"/>
                 </item>
                 <item row="1" column="1">
                  <widget class="QComboBox" name="audioCodecBox"/>
                 </item>
                 <item row="2" column="0">
                  <widget class="QLabel" name="label_3">
                   <property name="text">
                    <string>File Container:</string>
                   </property>
                  </widget>
                 </item>
                 <item row="0" column="0">
                  <widget class="QLabel" name="label">
                   <property name="text">
                    <string>Input Device:</string>
                   </property>
                  </widget>
                 </item>
                 <item row="4" column="0">
                  <widget class="QLabel" name="label_5">
                   <property name="text">
                    <string>Channels:</string>
                   </property>
                  </widget>
                 </item>
                 <item row="4" column="1">
                  <widget class="QComboBox" name="channelsBox"/>
                 </item>
                </layout>
               </item>
               <item row="4" column="0">
                <layout class="QVBoxLayout" name="levelsLayout"/>
               </item>
              </layout>
             </widget>
            </item>
           </layout>
          </widget>
         </widget>
        </item>
        <item row="1" column="0">
         <widget class="QPushButton" name="outputButton">
          <property name="text">
           <string>Output...</string>
          </property>
         </widget>
        </item>
        <item row="1" column="1">
         <widget class="QPushButton" name="recordButton">
          <property name="text">
           <string>Record</string>
          </property>
         </widget>
        </item>
        <item row="1" column="2">
         <widget class="QPushButton" name="pauseButton">
          <property name="enabled">
           <bool>false</bool>
          </property>
          <property name="text">
           <string>Pause</string>
          </property>
         </widget>
        </item>
       </layout>
      </widget>
      <widget class="QStatusBar" name="statusbar"/>
     </widget>
     <resources/>
     <connections>
      <connection>
       <sender>constantQualityRadioButton</sender>
       <signal>toggled(bool)</signal>
       <receiver>qualitySlider</receiver>
       <slot>setEnabled(bool)</slot>
       <hints>
        <hint type="sourcelabel">
         <x>113</x>
         <y>197</y>
        </hint>
        <hint type="destinationlabel">
         <x>115</x>
         <y>223</y>
        </hint>
       </hints>
      </connection>
      <connection>
       <sender>constantBitrateRadioButton</sender>
       <signal>toggled(bool)</signal>
       <receiver>bitrateBox</receiver>
       <slot>setEnabled(bool)</slot>
       <hints>
        <hint type="sourcelabel">
         <x>173</x>
         <y>259</y>
        </hint>
        <hint type="destinationlabel">
         <x>190</x>
         <y>291</y>
        </hint>
       </hints>
      </connection>
      <connection>
       <sender>outputButton</sender>
       <signal>clicked()</signal>
       <receiver>AudioRecorder</receiver>
       <slot>setOutputLocation()</slot>
       <hints>
        <hint type="sourcelabel">
         <x>46</x>
         <y>340</y>
        </hint>
        <hint type="destinationlabel">
         <x>6</x>
         <y>302</y>
        </hint>
       </hints>
      </connection>
      <connection>
       <sender>recordButton</sender>
       <signal>clicked()</signal>
       <receiver>AudioRecorder</receiver>
       <slot>toggleRecord()</slot>
       <hints>
        <hint type="sourcelabel">
         <x>191</x>
         <y>340</y>
        </hint>
        <hint type="destinationlabel">
         <x>113</x>
         <y>317</y>
        </hint>
       </hints>
      </connection>
      <connection>
       <sender>pauseButton</sender>
       <signal>clicked()</signal>
       <receiver>AudioRecorder</receiver>
       <slot>togglePause()</slot>
       <hints>
        <hint type="sourcelabel">
         <x>252</x>
         <y>334</y>
        </hint>
        <hint type="destinationlabel">
         <x>258</x>
         <y>346</y>
        </hint>
       </hints>
      </connection>
     </connections>
     <slots>
      <slot>setOutputLocation()</slot>
      <slot>toggleRecord()</slot>
      <slot>togglePause()</slot>
     </slots>
    </ui>