Add elide mode for the audio devices, and store configdialog geometry.

git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@1476 05730e5d-ab1b-0410-a4ac-84af385074fa
This commit is contained in:
Thorvald Natvig 2009-01-25 13:42:34 +00:00
parent 048343f81e
commit b4258dc586
7 changed files with 61 additions and 41 deletions

View File

@ -79,6 +79,8 @@ AudioInputDialog::AudioInputDialog(Settings &st) : ConfigWidget(st) {
abSpeech->qcInside = Qt::yellow;
abSpeech->qcAbove = Qt::green;
qcbDevice->view()->setTextElideMode(Qt::ElideRight);
on_Tick_timeout();
}
@ -270,9 +272,14 @@ void AudioInputDialog::on_qcbSystem_currentIndexChanged(int) {
AudioInputRegistrar *air = AudioInputRegistrar::qmNew->value(qcbSystem->currentText());
ql = air->getDeviceChoices();
int idx = 0;
foreach(audioDevice d, ql) {
qcbDevice->addItem(d.first, d.second);
qcbDevice->setItemData(idx, d.first, Qt::ToolTipRole);
++idx;
}
qcbEcho->setEnabled(air->canEcho(s.qsAudioOutput));
}
@ -313,6 +320,8 @@ AudioOutputDialog::AudioOutputDialog(Settings &st) : ConfigWidget(st) {
qcbLoopback->addItem(tr("None"), Settings::None);
qcbLoopback->addItem(tr("Local"), Settings::Local);
qcbLoopback->addItem(tr("Server"), Settings::Server);
qcbDevice->view()->setTextElideMode(Qt::ElideRight);
}
QString AudioOutputDialog::title() const {
@ -389,8 +398,12 @@ void AudioOutputDialog::on_qcbSystem_currentIndexChanged(int) {
AudioOutputRegistrar *aor = AudioOutputRegistrar::qmNew->value(qcbSystem->currentText());
ql = aor->getDeviceChoices();
int idx = 0;
foreach(audioDevice d, ql) {
qcbDevice->addItem(d.first, d.second);
qcbDevice->setItemData(idx, d.first, Qt::ToolTipRole);
++idx;
}
bool canmute = aor->canMuteOthers();
qsOtherVolume->setEnabled(canmute);

View File

@ -5,8 +5,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>304</width>
<height>649</height>
<width>340</width>
<height>555</height>
</rect>
</property>
<property name="windowTitle" >
@ -32,7 +32,7 @@
<item row="0" column="1" >
<widget class="QComboBox" name="qcbSystem" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
<sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -74,8 +74,8 @@
<item row="0" column="4" >
<widget class="QComboBox" name="qcbDevice" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
<horstretch>0</horstretch>
<sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
@ -85,6 +85,12 @@
<property name="whatsThis" >
<string>&lt;b>This is the output method to use for audio.&lt;/b>&lt;br />Most likely you want to use DirectSound.</string>
</property>
<property name="sizeAdjustPolicy" >
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
</property>
<property name="minimumContentsLength" >
<number>16</number>
</property>
</widget>
</item>
<item row="1" column="4" >

View File

@ -5,8 +5,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>383</width>
<height>543</height>
<width>321</width>
<height>504</height>
</rect>
</property>
<property name="windowTitle" >
@ -32,7 +32,7 @@
<item row="0" column="1" >
<widget class="QComboBox" name="qcbSystem" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
<sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -74,8 +74,8 @@
<item row="0" column="4" >
<widget class="QComboBox" name="qcbDevice" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
<horstretch>0</horstretch>
<sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
@ -85,6 +85,12 @@
<property name="whatsThis" >
<string>&lt;b>This is the output method to use for audio.&lt;/b>&lt;br />Most likely you want to use DirectSound.</string>
</property>
<property name="sizeAdjustPolicy" >
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
</property>
<property name="minimumContentsLength" >
<number>16</number>
</property>
</widget>
</item>
<item row="1" column="4" >
@ -187,23 +193,6 @@
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="label_12" >
<property name="text" >
<string>Other Applications</string>
</property>
<property name="buddy" >
<cstring>qsVolume</cstring>
</property>
</widget>
</item>
<item row="2" column="2" >
<widget class="QLabel" name="qlOtherVolume" >
<property name="text" >
<string>TextLabel</string>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QLabel" name="label_6" >
<property name="text" >
@ -243,6 +232,23 @@
</property>
</widget>
</item>
<item row="2" column="2" >
<widget class="QLabel" name="qlOtherVolume" >
<property name="text" >
<string>TextLabel</string>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="label_12" >
<property name="text" >
<string>Other Applications</string>
</property>
<property name="buddy" >
<cstring>qsVolume</cstring>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QSlider" name="qsOtherVolume" >
<property name="toolTip" >
@ -263,18 +269,6 @@
</widget>
</item>
</layout>
<zorder>label_17</zorder>
<zorder>qsJitter</zorder>
<zorder>qlJitter</zorder>
<zorder>label_7</zorder>
<zorder>qsVolume</zorder>
<zorder>qlVolume</zorder>
<zorder>label_6</zorder>
<zorder>qsDelay</zorder>
<zorder>qlDelay</zorder>
<zorder>qlOtherVolume</zorder>
<zorder>label_12</zorder>
<zorder>qsOtherVolume</zorder>
</widget>
</item>
<item>

View File

@ -126,6 +126,9 @@ ConfigDialog::ConfigDialog(QWidget *p) : QDialog(p) {
restoreButton->setWhatsThis(tr("This button will restore the settings for the current page only to their defaults. Other pages will be not be changed.<br />"
"To restore all settings to their defaults, you will have to use this button on every page."
));
if (! g.s.qbaConfigGeometry.isEmpty())
restoreGeometry(g.s.qbaConfigGeometry);
}
void ConfigDialog::addPage(ConfigWidget *cw, unsigned int idx) {
@ -246,5 +249,6 @@ void ConfigDialog::apply() {
void ConfigDialog::accept() {
apply();
g.s.qbaConfigGeometry=saveGeometry();
QDialog::accept();
}

View File

@ -5,8 +5,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>449</width>
<height>108</height>
<width>600</width>
<height>200</height>
</rect>
</property>
<property name="windowTitle" >

View File

@ -276,6 +276,7 @@ void Settings::load() {
SAVELOAD(qbaMainWindowGeometry, "ui/geometry");
SAVELOAD(qbaMainWindowState, "ui/state");
SAVELOAD(qbaMinimalViewGeometry, "ui/minimalviewgeometry");
SAVELOAD(qbaConfigGeometry, "ui/ConfigGeometry");
SAVELOAD(qbaSplitterState, "ui/splitter");
SAVELOAD(qbaHeaderState, "ui/header");
SAVELOAD(qsUsername, "ui/username");
@ -412,6 +413,7 @@ void Settings::save() {
SAVELOAD(qbaMainWindowGeometry, "ui/geometry");
SAVELOAD(qbaMainWindowState, "ui/state");
SAVELOAD(qbaMinimalViewGeometry, "ui/minimalviewgeometry");
SAVELOAD(qbaConfigGeometry, "ui/ConfigGeometry");
SAVELOAD(qbaSplitterState, "ui/splitter");
SAVELOAD(qbaHeaderState, "ui/header");
SAVELOAD(qsUsername, "ui/username");

View File

@ -117,6 +117,7 @@ struct Settings {
QString qsSkin;
bool bFirstTime;
QByteArray qbaMainWindowGeometry, qbaMainWindowState, qbaMinimalViewGeometry, qbaSplitterState, qbaHeaderState;
QByteArray qbaConfigGeometry;
ChannelExpand ceExpand;
ChannelDrag ceChannelDrag;
bool bMinimalView;