aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Output/oss/settingsdialog.ui
blob: ec6bafcbdebd7167259788fed3571955bee9c01c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
7/***************************************************************************
 *   Copyright (C) 2010 by Ilya Kotov                                      *
 *   forkotov02@hotmail.ru                                                 *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/

#include <QDBusInterface>
#include <QDBusConnection>

#include "udisksdevice.h"


UDisksDevice::UDisksDevice(QDBusObjectPath o, QObject *parent)
        : QObject(parent)
{
    m_interface = new QDBusInterface("org.freedesktop.UDisks", o.path(),
                                     "org.freedesktop.UDisks.Device", QDBusConnection::systemBus(), this);
    m_interface->connection().connect("org.freedesktop.UDisks", o.path(),
                                      "org.freedesktop.UDisks.Device","Changed",
                                      this, SIGNAL(changed()));
    m_path = o;
}

QVariant UDisksDevice::property (const QString &key)
{
    return m_interface->property(key.toAscii().data());
}

UDisksDevice::~UDisksDevice()
{
}

QDBusObjectPath UDisksDevice::objectPath() const
{
    return m_path;
}
46 247 248 249 250 251 252 253 254 255
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
 <class>SettingsDialog</class>
 <widget class="QDialog" name="SettingsDialog">
  <property name="geometry">
   <rect>
    <x>0</x>
    <y>0</y>
    <width>430</width>
    <height>230</height>
   </rect>
  </property>
  <property name="windowTitle">
   <string>OSS Plugin Settings</string>
  </property>
  <layout class="QVBoxLayout" name="verticalLayout">
   <property name="leftMargin">
    <number>6</number>
   </property>
   <property name="rightMargin">
    <number>6</number>
   </property>
   <property name="bottomMargin">
    <number>6</number>
   </property>
   <item>
    <widget class="QTabWidget" name="tabWidget">
     <property name="currentIndex">
      <number>0</number>
     </property>
     <widget class="QWidget" name="tab">
      <attribute name="title">
       <string>Device Settings</string>
      </attribute>
      <layout class="QVBoxLayout">
       <property name="spacing">
        <number>6</number>
       </property>
       <property name="margin">
        <number>9</number>
       </property>
       <item>
        <widget class="QGroupBox" name="groupBox">
         <property name="title">
          <string>Audio device</string>
         </property>
         <layout class="QVBoxLayout">
          <item>
           <widget class="QLineEdit" name="lineEdit">
            <property name="text">
             <string/>
            </property>
           </widget>
          </item>
         </layout>
        </widget>
       </item>
       <item>
        <widget class="QGroupBox" name="groupBox_2">
         <property name="title">
          <string>Mixer device</string>
         </property>
         <layout class="QGridLayout">
          <property name="margin">
           <number>9</number>
          </property>
          <property name="spacing">
           <number>6</number>
          </property>
          <item row="0" column="0">
           <widget class="QLineEdit" name="lineEdit_2">
            <property name="text">
             <string/>
            </property>
           </widget>
          </item>
         </layout>
        </widget>
       </item>
      </layout>
     </widget>
     <widget class="QWidget" name="tab_2">
      <attribute name="title">
       <string>Advanced Settings</string>
      </attribute>
      <layout class="QVBoxLayout">
       <property name="spacing">
        <number>6</number>
       </property>
       <property name="margin">
        <number>9</number>
       </property>
       <item>
        <widget class="QGroupBox" name="groupBox_3">
         <property name="title">
          <string>Soundcard</string>
         </property>
         <layout class="QGridLayout">
          <property name="margin">
           <number>9</number>
          </property>
          <property name="spacing">
           <number>6</number>
          </property>
          <item row="3" column="1">
           <spacer>
            <property name="orientation">
             <enum>Qt::Vertical</enum>
            </property>
            <property name="sizeHint" stdset="0">
             <size>
              <width>20</width>
              <height>111</height>
             </size>
            </property>
           </spacer>
          </item>
          <item row="0" column="2">
           <spacer>
            <property name="orientation">
             <enum>Qt::Horizontal</enum>
            </property>
            <property name="sizeHint" stdset="0">
             <size>
              <width>188</width>
              <height>20</height>
             </size>
            </property>
           </spacer>
          </item>
          <item row="1" column="1">
           <widget class="QSpinBox" name="periodSpinBox">
            <property name="minimum">
             <number>20</number>
            </property>
            <property name="maximum">
             <number>5000</number>
            </property>
            <property name="value">
             <number>100</number>
            </property>
           </widget>
          </item>
          <item row="0" column="1">
           <widget class="QSpinBox" name="bufferSpinBox">
            <property name="minimum">
             <number>200</number>
            </property>
            <property name="maximum">
             <number>10000</number>
            </property>
            <property name="value">
             <number>500</number>
            </property>
           </widget>
          </item>
          <item row="0" column="0">
           <widget class="QLabel" name="label">
            <property name="text">
             <string>Buffer time (ms):</string>
            </property>
            <property name="alignment">
             <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
            </property>
           </widget>
          </item>
          <item row="1" column="0">
           <widget class="QLabel" name="label_2">
            <property name="text">
             <string>Period time (ms):</string>
            </property>
            <property name="alignment">
             <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
            </property>
           </widget>
          </item>
          <item row="1" column="2">
           <spacer>
            <property name="orientation">
             <enum>Qt::Horizontal</enum>
            </property>
            <property name="sizeHint" stdset="0">
             <size>
              <width>188</width>
              <height>20</height>
             </size>
            </property>
           </spacer>
          </item>
          <item row="2" column="1">
           <widget class="QCheckBox" name="checkBox">
            <property name="text">
             <string/>
            </property>
           </widget>
          </item>
          <item row="2" column="0">
           <widget class="QLabel" name="label_3">
            <property name="text">
             <string>PCM over Master</string>
            </property>
           </widget>
          </item>
         </layout>
        </widget>
       </item>
      </layout>
     </widget>
    </widget>
   </item>
   <item>
    <widget class="QDialogButtonBox" name="buttonBox">
     <property name="standardButtons">
      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
     </property>
    </widget>
   </item>
  </layout>
 </widget>
 <resources/>
 <connections>
  <connection>
   <sender>buttonBox</sender>
   <signal>accepted()</signal>
   <receiver>SettingsDialog</receiver>
   <slot>accept()</slot>
   <hints>
    <hint type="sourcelabel">
     <x>293</x>
     <y>213</y>
    </hint>
    <hint type="destinationlabel">
     <x>17</x>
     <y>227</y>
    </hint>
   </hints>
  </connection>
  <connection>
   <sender>buttonBox</sender>
   <signal>rejected()</signal>
   <receiver>SettingsDialog</receiver>
   <slot>reject()</slot>
   <hints>
    <hint type="sourcelabel">
     <x>325</x>
     <y>205</y>
    </hint>
    <hint type="destinationlabel">
     <x>432</x>
     <y>193</y>
    </hint>
   </hints>
  </connection>
 </connections>
</ui>