extragear/multimedia/amarok/src/configdialog/dialogs
Mark Kretschmann
kretschmann at kde.org
Mon Mar 9 13:20:31 CET 2009
SVN commit 937291 by markey:
I proudly present to you: Integrated Phonon configuration in Amarok :)
This mini patch makes it possible to configure the Phonon multimedia
component (including backends) directly from Amarok. Simply go to the
config dialog, then Playback, then click "Configure Phonon".
Sorry for breaking the "soft feature freeze", but I think this is
totally worth it, as it greatly improves usability.
CCMAIL: amarok-devel at kde.org
M +21 -3 PlaybackConfig.cpp
M +4 -1 PlaybackConfig.h
M +68 -54 PlaybackConfig.ui
--- trunk/extragear/multimedia/amarok/src/configdialog/dialogs/PlaybackConfig.cpp #937290:937291
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2004-2007 by Mark Kretschmann <markey at web.de> *
+ * Copyright (C) 2004-2009 by Mark Kretschmann <kretschmann at kde.org> *
* *
* 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 *
@@ -19,12 +19,18 @@
#include "PlaybackConfig.h"
+#include "Debug.h"
+#include <KCMultiDialog>
+
+
PlaybackConfig::PlaybackConfig( QWidget* parent )
: ConfigDialogBase( parent )
{
setupUi( this );
kcfg_FadeoutOnExit->setHidden( true );
+
+ connect( findChild<QPushButton*>( "pushButtonPhonon" ), SIGNAL( clicked() ), SLOT( configurePhonon() ) );
}
PlaybackConfig::~PlaybackConfig()
@@ -49,15 +55,27 @@
void
PlaybackConfig::updateSettings()
-{
-}
+{}
///////////////////////////////////////////////////////////////
// PRIVATE METHODS
///////////////////////////////////////////////////////////////
+void
+PlaybackConfig::configurePhonon() //SLOT
+{
+ DEBUG_BLOCK
+ KCMultiDialog* KCM = new KCMultiDialog();
+ KCM->setWindowTitle( i18n( "Configure Phonon - Amarok" ) );
+ KCM->addModule( "kcm_phonon" );
+ KCM->exec();
+
+ delete KCM;
+}
+
+
#include "PlaybackConfig.moc"
--- trunk/extragear/multimedia/amarok/src/configdialog/dialogs/PlaybackConfig.h #937290:937291
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2004-2007 by Mark Kretschmann <markey at web.de> *
+ * Copyright (C) 2004-2009 by Mark Kretschmann <kretschmann at kde.org> *
* *
* 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 *
@@ -35,6 +35,9 @@
virtual bool hasChanged();
virtual bool isDefault();
virtual void updateSettings();
+
+ private Q_SLOTS:
+ void configurePhonon();
};
--- trunk/extragear/multimedia/amarok/src/configdialog/dialogs/PlaybackConfig.ui #937290:937291
@@ -1,69 +1,83 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
<class>PlaybackConfig</class>
- <widget class="QWidget" name="PlaybackConfig" >
- <property name="geometry" >
+ <widget class="QWidget" name="PlaybackConfig">
+ <property name="geometry">
<rect>
<x>0</x>
<y>0</y>
- <width>334</width>
- <height>382</height>
+ <width>320</width>
+ <height>349</height>
</rect>
</property>
- <layout class="QGridLayout" name="gridLayout_2" >
- <property name="margin" >
- <number>0</number>
- </property>
- <item row="0" column="0" >
- <widget class="QGroupBox" name="opt_crossfade_2" >
- <property name="whatsThis" >
- <string><b>Quit Behavior</b>
-<p>On exit, Amarok can slowly fade the volume of the playing track (which is configurable), or stop playback immediately.</p></string>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <widget class="QGroupBox" name="groupBox_2">
+ <property name="title">
+ <string>Sound system configuration</string>
</property>
- <property name="title" >
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QPushButton" name="pushButtonPhonon">
+ <property name="text">
+ <string>Configure Phonon</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="opt_crossfade_2">
+ <property name="whatsThis">
+ <string><b>Quit Behavior</b>
+<p>On exit, Amarok can slowly fade the volume of the playing track (which is configurable), or stop playback immediately.</p></string>
+ </property>
+ <property name="title">
<string>Fadeout on track end</string>
</property>
- <layout class="QGridLayout" name="gridLayout" >
- <item row="0" column="0" >
- <widget class="QCheckBox" name="kcfg_Fadeout" >
- <property name="text" >
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0">
+ <widget class="QCheckBox" name="kcfg_Fadeout">
+ <property name="text">
<string>&Fadeout</string>
</property>
</widget>
</item>
- <item row="1" column="0" >
- <widget class="QLabel" name="fadeoutLengthLabel" >
- <property name="enabled" >
+ <item row="1" column="0">
+ <widget class="QLabel" name="fadeoutLengthLabel">
+ <property name="enabled">
<bool>false</bool>
</property>
- <property name="text" >
+ <property name="text">
<string>Fadeout &duration:</string>
</property>
- <property name="buddy" >
+ <property name="buddy">
<cstring>kcfg_FadeoutLength</cstring>
</property>
</widget>
</item>
- <item row="1" column="1" >
- <widget class="QSpinBox" name="kcfg_FadeoutLength" >
- <property name="enabled" >
+ <item row="1" column="1">
+ <widget class="QSpinBox" name="kcfg_FadeoutLength">
+ <property name="enabled">
<bool>false</bool>
</property>
- <property name="toolTip" >
+ <property name="toolTip">
<string>The length of the fadeout, in milliseconds.</string>
</property>
- <property name="suffix" >
+ <property name="suffix">
<string> ms</string>
</property>
- <property name="minimum" >
+ <property name="minimum">
<number>100</number>
</property>
- <property name="maximum" >
+ <property name="maximum">
<number>99999999</number>
</property>
- <property name="singleStep" >
+ <property name="singleStep">
<number>100</number>
</property>
- <property name="value" >
+ <property name="value">
<number>100</number>
</property>
</widget>
@@ -71,28 +85,28 @@
</layout>
</widget>
</item>
- <item row="1" column="0" >
- <widget class="QGroupBox" name="groupBox" >
- <property name="title" >
+ <item>
+ <widget class="QGroupBox" name="groupBox">
+ <property name="title">
<string>Miscellaneous</string>
</property>
- <layout class="QGridLayout" name="gridLayout_3" >
- <item row="0" column="0" >
- <widget class="QCheckBox" name="kcfg_FadeoutOnExit" >
- <property name="toolTip" >
+ <layout class="QGridLayout" name="gridLayout_3">
+ <item row="0" column="0">
+ <widget class="QCheckBox" name="kcfg_FadeoutOnExit">
+ <property name="toolTip">
<string>If checked, Amarok will fade out the music on program exit.</string>
</property>
- <property name="text" >
+ <property name="text">
<string>Fadeout on e&xit</string>
</property>
</widget>
</item>
- <item row="1" column="0" >
- <widget class="QCheckBox" name="kcfg_ResumePlayback" >
- <property name="toolTip" >
- <string>If checked, Amarok will<br>resume playback from where you left it the previous session -- just like a tape-player.</string>
+ <item row="1" column="0">
+ <widget class="QCheckBox" name="kcfg_ResumePlayback">
+ <property name="toolTip">
+ <string>If checked, Amarok will<br>resume playback from where you left it the previous session -- just like a tape-player.</string>
</property>
- <property name="text" >
+ <property name="text">
<string>&Resume playback on start</string>
</property>
</widget>
@@ -100,12 +114,12 @@
</layout>
</widget>
</item>
- <item row="2" column="0" >
- <spacer name="verticalSpacer" >
- <property name="orientation" >
+ <item>
+ <spacer name="verticalSpacer">
+ <property name="orientation">
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeHint" stdset="0" >
+ <property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
@@ -126,11 +140,11 @@
<receiver>fadeoutLengthLabel</receiver>
<slot>setEnabled(bool)</slot>
<hints>
- <hint type="sourcelabel" >
+ <hint type="sourcelabel">
<x>68</x>
<y>223</y>
</hint>
- <hint type="destinationlabel" >
+ <hint type="destinationlabel">
<x>291</x>
<y>225</y>
</hint>
@@ -142,11 +156,11 @@
<receiver>kcfg_FadeoutLength</receiver>
<slot>setEnabled(bool)</slot>
<hints>
- <hint type="sourcelabel" >
+ <hint type="sourcelabel">
<x>61</x>
<y>225</y>
</hint>
- <hint type="destinationlabel" >
+ <hint type="destinationlabel">
<x>440</x>
<y>229</y>
</hint>
More information about the Amarok-devel
mailing list