include_directories(/usr/lib/oss/include)
-
-include(CheckCXXSourceCompiles)
-check_cxx_source_compiles("
- #include <memory>
- int main() { std::shared_ptr<int> p; return 0; }
-" HAVE_STD_SHARED_PTR)
-check_cxx_source_compiles("
- #include <tr1/memory>
- int main() { std::tr1::shared_ptr<int> p; return 0; }
-" HAVE_STD_TR1_SHARED_PTR)
-
-
-configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
-
add_subdirectory( pics )
add_subdirectory( profiles )
#add_subdirectory( tests )
+++ /dev/null
-include(CheckIncludeFiles)
-include(CheckTypeSize)
-include(CheckStructMember)
-include(MacroBoolTo01)
-
-macro_bool_to_01(OGGVORBIS_FOUND HAVE_VORBIS)
-
-check_include_files(machine/endian.h HAVE_MACHINE_ENDIAN_H)
-# Linux has <endian.h>, FreeBSD has <sys/endian.h> and Solaris has neither.
-check_include_files(endian.h HAVE_ENDIAN_H)
-check_include_files(sys/endian.h HAVE_SYS_ENDIAN_H)
-check_include_files(unistd.h HAVE_UNISTD_H)
}
MixerToolBox::instance()->removeMixer(mixer);
// Check whether the Global Master disappeared, and select a new one if necessary
- shared_ptr<MixDevice> md = Mixer::getGlobalMasterMD();
+ std::shared_ptr<MixDevice> md = Mixer::getGlobalMasterMD();
if (globalMasterMixerDestroyed || md.get() == 0)
{
// We don't know what the global master should be now.
// So lets play stupid, and just select the recommended master of the first device
if (Mixer::mixers().count() > 0)
{
- shared_ptr<MixDevice> master =
+ std::shared_ptr<MixDevice> master =
((Mixer::mixers())[0])->getLocalMasterMD();
if (master.get() != 0)
{
Mixer* mixer = Mixer::getGlobalMasterMixer(); // only needed for the awkward construct below
if (mixer == 0)
return; // e.g. when no soundcard is available
- shared_ptr<MixDevice> md = Mixer::getGlobalMasterMD();
+ std::shared_ptr<MixDevice> md = Mixer::getGlobalMasterMD();
if (md.get() == 0)
return; // shouldn't happen, but lets play safe
Mixer* mixer = Mixer::getGlobalMasterMixer();
if (mixer == 0)
return; // e.g. when no soundcard is available
- shared_ptr<MixDevice> md = Mixer::getGlobalMasterMD();
+ std::shared_ptr<MixDevice> md = Mixer::getGlobalMasterMD();
if (md.get() == 0)
return; // shouldn't happen, but lets play safe
Mixer* mixer = Mixer::getGlobalMasterMixer();
if (mixer == 0)
return; // e.g. when no soundcard is available
- shared_ptr<MixDevice> md = Mixer::getGlobalMasterMD();
+ std::shared_ptr<MixDevice> md = Mixer::getGlobalMasterMD();
if (md.get() == 0)
return; // shouldn't happen, but lets play safe
md->toggleMute();
#ifndef KMIX_H
#define KMIX_H
-
-#include <config.h>
-
// Qt
#include <QString>
-
#include <QLabel>
#include <qlist.h>
#include <QVBoxLayout>
#include <QPushButton>
#include <QTimer>
-class KTabWidget;
// KDE
+class KTabWidget;
class KAccel;
class KAction;
#include <kxmlguiwindow.h>
if ( mixerMasterCard != 0 ) {
config.writeEntry( "MasterMixer", mixerMasterCard->id() );
}
- shared_ptr<MixDevice> mdMaster = Mixer::getGlobalMasterMD();
+ std::shared_ptr<MixDevice> mdMaster = Mixer::getGlobalMasterMD();
if ( mdMaster ) {
config.writeEntry( "MasterMixerDevice", mdMaster->id() );
}
MixerToolBox::instance()->removeMixer(mixer);
// Check whether the Global Master disappeared, and select a new one if necessary
- shared_ptr<MixDevice> md = Mixer::getGlobalMasterMD();
+ std::shared_ptr<MixDevice> md = Mixer::getGlobalMasterMD();
if ( globalMasterMixerDestroyed || md.get() == 0 ) {
// We don't know what the global master should be now.
// So lets play stupid, and just select the recommended master of the first device
if ( Mixer::mixers().count() > 0 ) {
- shared_ptr<MixDevice> master = ((Mixer::mixers())[0])->getLocalMasterMD();
+ std::shared_ptr<MixDevice> master = ((Mixer::mixers())[0])->getLocalMasterMD();
if ( master.get() != 0 ) {
QString localMaster = master->id();
Mixer::setGlobalMaster( ((Mixer::mixers())[0])->id(), localMaster, false);
#ifndef KMIXD_H
#define KMIXD_H
-
-#include <config.h>
-
// Qt
#include <QString>
#include <QtDBus/QtDBus>
-
-#include <qlist.h>
+#include <QList>
#include <QTimer>
// KDE
/* This code is being #include'd from mixer.cpp */
-#include <config.h>
-
#include "mixer_backend.h"
#include "core/mixer.h"
explicit Mixer_ALSA(Mixer *mixer, int device = -1 );
~Mixer_ALSA();
- virtual int readVolumeFromHW( const QString& id, shared_ptr<MixDevice> md );
- virtual int writeVolumeToHW ( const QString& id, shared_ptr<MixDevice> md );
+ virtual int readVolumeFromHW( const QString& id, std::shared_ptr<MixDevice> md );
+ virtual int writeVolumeToHW ( const QString& id, std::shared_ptr<MixDevice> md );
virtual void setEnumIdHW( const QString& id, unsigned int);
virtual unsigned int enumIdHW(const QString& id);
virtual bool prepareUpdateFromHW();
qDeleteAll(enumList); // clear temporary list
}
- shared_ptr<MixDevice> md = mdNew->addToPool();
+ std::shared_ptr<MixDevice> md = mdNew->addToPool();
m_mixDevices.append( md );
int
-Mixer_ALSA::readVolumeFromHW( const QString& id, shared_ptr<MixDevice> md )
+Mixer_ALSA::readVolumeFromHW( const QString& id, std::shared_ptr<MixDevice> md )
{
Volume& volumePlayback = md->playbackVolume();
Volume& volumeCapture = md->captureVolume();
// Refresh the capture switch information of *all* controls of this card.
// Doing it for all is necessary, because enabling one record source often
// automatically disables another record source (due to the hardware design)
- foreach ( shared_ptr<MixDevice> md, m_mixDevices )
+ foreach ( std::shared_ptr<MixDevice> md, m_mixDevices )
{
bool isRecsrc = isRecsrcHW( md->id() );
// kDebug() << "Mixer::setRecordSource(): isRecsrcHW(" << md->id() << ") =" << isRecsrc;
}
int
-Mixer_ALSA::writeVolumeToHW( const QString& id, shared_ptr<MixDevice> md )
+Mixer_ALSA::writeVolumeToHW( const QString& id, std::shared_ptr<MixDevice> md )
{
Volume& volumePlayback = md->playbackVolume();
Volume& volumeCapture = md->captureVolume();
void Mixer_Backend::freeMixDevices()
{
- foreach (shared_ptr<MixDevice> md, m_mixDevices)
+ foreach (std::shared_ptr<MixDevice> md, m_mixDevices)
md->close();
m_mixDevices.clear();
int ret = Mixer::OK_UNCHANGED;
- foreach (shared_ptr<MixDevice> md, m_mixDevices )
+ foreach (std::shared_ptr<MixDevice> md, m_mixDevices )
{
//bool debugMe = (md->id() == "PCM:0" );
bool debugMe = false;
* first device in the device list. Backends can override this (i.e. the ALSA Backend does so).
* The users preference is NOT returned by this method - see the Mixer class for that.
*/
-shared_ptr<MixDevice> Mixer_Backend::recommendedMaster()
+std::shared_ptr<MixDevice> Mixer_Backend::recommendedMaster()
{
if ( m_recommendedMaster )
{
void readSetFromHWforceUpdate() const;
/// Volume Read
- virtual int readVolumeFromHW( const QString& id, shared_ptr<MixDevice> ) = 0;
+ virtual int readVolumeFromHW( const QString& id, std::shared_ptr<MixDevice> ) = 0;
/// Volume Write
- virtual int writeVolumeToHW( const QString& id, shared_ptr<MixDevice> ) = 0;
+ virtual int writeVolumeToHW( const QString& id, std::shared_ptr<MixDevice> ) = 0;
/// Enums
virtual void setEnumIdHW(const QString& id, unsigned int);
/// Overwrite in the backend if the backend can see changes without polling
virtual bool needsPolling() { return true; }
- shared_ptr<MixDevice> recommendedMaster();
+ std::shared_ptr<MixDevice> recommendedMaster();
/**
* Return a translated error text for the given error number.
******************************************************************************************/
bool m_isOpen;
// The MixDevice that would qualify best as MasterDevice (according to the taste of the Backend developer)
- shared_ptr<MixDevice> m_recommendedMaster;
+ std::shared_ptr<MixDevice> m_recommendedMaster;
// The Mixer is stored her only for one reason: The backend creates the MixDevice's, and it has shown
// that it is helpful if the MixDevice's know their corresponding Mixer. KMix lived 10 years without that,
// but just believe me. It's *really* better, for example, you can put controls of different soundcards in
* readVolumeFromHW() should be used only for hotplug (and even that should go away). Everything should operate via
* the slot volumeChanged in the future.
*/
-int Mixer_MPRIS2::readVolumeFromHW( const QString& /*id*/, shared_ptr<MixDevice> /*md*/)
+int Mixer_MPRIS2::readVolumeFromHW( const QString& /*id*/, std::shared_ptr<MixDevice> /*md*/)
{
// Everything is done by notifications => no code neccessary
return Mixer::OK_UNCHANGED;
*/
void Mixer_MPRIS2::playbackStateChanged(MPrisControl* mad, MediaController::PlayState playState)
{
- shared_ptr<MixDevice> md = m_mixDevices.get(mad->getId());
+ std::shared_ptr<MixDevice> md = m_mixDevices.get(mad->getId());
md->getMediaController()->setPlayState(playState);
QMetaObject::invokeMethod(this, "announceGUI", Qt::QueuedConnection);
// ControlManager::instance().announce(_mixer->id(), ControlChangeType::GUI, QString("MixerMPRIS2.playbackStateChanged"));
*/
void Mixer_MPRIS2::volumeChanged(MPrisControl* mad, double newVolume)
{
- shared_ptr<MixDevice> md = m_mixDevices.get(mad->getId());
+ std::shared_ptr<MixDevice> md = m_mixDevices.get(mad->getId());
int volInt = newVolume *100;
if (GlobalConfig::instance().data.debugVolume)
kDebug() << "changed" << volInt;
volumeChangedInternal(md, volInt);
}
-void Mixer_MPRIS2::volumeChangedInternal(shared_ptr<MixDevice> md, int volumePercentage)
+void Mixer_MPRIS2::volumeChangedInternal(std::shared_ptr<MixDevice> md, int volumePercentage)
{
if ( md->isVirtuallyMuted() && volumePercentage == 0)
{
* @param md
* @return
*/
-int Mixer_MPRIS2::writeVolumeToHW( const QString& id, shared_ptr<MixDevice> md )
+int Mixer_MPRIS2::writeVolumeToHW( const QString& id, std::shared_ptr<MixDevice> md )
{
Volume& vol = md->playbackVolume();
double volFloat = 0;
}
// -2- Remove MixDevice from internal list
- shared_ptr<MixDevice> md = m_mixDevices.get(id);
+ std::shared_ptr<MixDevice> md = m_mixDevices.get(id);
if (md)
{
// We know about the player that is unregistering => remove internally
virtual int open();
virtual int close();
- virtual int readVolumeFromHW( const QString& id, shared_ptr<MixDevice> );
- virtual int writeVolumeToHW( const QString& id, shared_ptr<MixDevice> );
+ virtual int readVolumeFromHW( const QString& id, std::shared_ptr<MixDevice> );
+ virtual int writeVolumeToHW( const QString& id, std::shared_ptr<MixDevice> );
virtual void setEnumIdHW(const QString& id, unsigned int);
virtual unsigned int enumIdHW(const QString& id);
virtual bool moveStream( const QString& id, const QString& destId );
// void asyncAddMprisControl(QString busDestination);
// void messageQueueThreadLoop();
int addAllRunningPlayersAndInitHotplug();
- void volumeChangedInternal(shared_ptr<MixDevice> md, int volumePercentage);
+ void volumeChangedInternal(std::shared_ptr<MixDevice> md, int volumePercentage);
QString busDestinationToControlId(const QString& busDestination);
MixDevice::ChannelType getChannelTypeFromPlayerId(const QString& id);
{
for(int i=0; i< m_mixDevices.count() ; i++ )
{
- shared_ptr<MixDevice> md = m_mixDevices[i];
+ std::shared_ptr<MixDevice> md = m_mixDevices[i];
bool isRecsrc = ( (recsrcMask & ( 1<<devnum)) != 0 );
md->setRecSource(isRecsrc);
} // for all controls
}
-int Mixer_OSS::readVolumeFromHW( const QString& id, shared_ptr<MixDevice> md )
+int Mixer_OSS::readVolumeFromHW( const QString& id, std::shared_ptr<MixDevice> md )
{
int ret = 0;
-int Mixer_OSS::writeVolumeToHW( const QString& id, shared_ptr<MixDevice> md)
+int Mixer_OSS::writeVolumeToHW( const QString& id, std::shared_ptr<MixDevice> md)
{
int volume;
int devnum = id2num(id);
virtual ~Mixer_OSS();
virtual QString errorText(int mixer_error);
- virtual int readVolumeFromHW( const QString& id, shared_ptr<MixDevice> );
- virtual int writeVolumeToHW ( const QString& id, shared_ptr<MixDevice> );
+ virtual int readVolumeFromHW( const QString& id, std::shared_ptr<MixDevice> );
+ virtual int writeVolumeToHW ( const QString& id, std::shared_ptr<MixDevice> );
virtual QString getDriverName();
bool masterChosen = false;
bool masterHeuristicAvailable = false;
bool saveAsMasterHeuristc = false;
- shared_ptr<MixDevice> masterHeuristic;
+ std::shared_ptr<MixDevice> masterHeuristic;
oss_mixext ext;
ext.dev = m_devnum;
name,
cType);
- shared_ptr<MixDevice> md = md_ptr->addToPool();
+ std::shared_ptr<MixDevice> md = md_ptr->addToPool();
m_mixDevices.append(md);
if(isCapture)
name,
cType);
- shared_ptr<MixDevice> md = md_ptr->addToPool();
+ std::shared_ptr<MixDevice> md = md_ptr->addToPool();
m_mixDevices.append(md);
if(isCapture)
name,
cType);
- shared_ptr<MixDevice> md = md_ptr->addToPool();
+ std::shared_ptr<MixDevice> md = md_ptr->addToPool();
m_mixDevices.append(md);
if(isCapture)
}
md_ptr->addEnums(enumValuesRef);
- shared_ptr<MixDevice> md = md_ptr->addToPool();
+ std::shared_ptr<MixDevice> md = md_ptr->addToPool();
m_mixDevices.append(md);
}
}
return true;
}
-int Mixer_OSS4::readVolumeFromHW(const QString& id, shared_ptr<MixDevice> md)
+int Mixer_OSS4::readVolumeFromHW(const QString& id, std::shared_ptr<MixDevice> md)
{
oss_mixext extinfo;
oss_mixer_value mv;
return 0;
}
-int Mixer_OSS4::writeVolumeToHW(const QString& id, shared_ptr<MixDevice> md)
+int Mixer_OSS4::writeVolumeToHW(const QString& id, std::shared_ptr<MixDevice> md)
{
int volume = 0;
virtual QString getDriverName();
virtual bool CheckCapture(oss_mixext *ext);
virtual bool prepareUpdateFromHW();
- virtual int readVolumeFromHW(const QString& id, shared_ptr<MixDevice> md);
- virtual int writeVolumeToHW(const QString& id, shared_ptr<MixDevice> md );
+ virtual int readVolumeFromHW(const QString& id, std::shared_ptr<MixDevice> md);
+ virtual int writeVolumeToHW(const QString& id, std::shared_ptr<MixDevice> md );
virtual void setEnumIdHW(const QString& id, unsigned int idx);
virtual unsigned int enumIdHW(const QString& id);
void Mixer_PULSE::updateRecommendedMaster(devmap* map)
{
unsigned int prio = 0;
- shared_ptr<MixDevice> res;
+ std::shared_ptr<MixDevice> res;
MixSet::iterator iter;
for (iter = m_mixDevices.begin(); iter != m_mixDevices.end(); ++iter) {
// We need to find the MixDevice that goes with this widget and remove it.
MixSet::iterator iter;
- shared_ptr<MixDevice> md;
+ std::shared_ptr<MixDevice> md;
for (iter = m_mixDevices.begin(); iter != m_mixDevices.end(); ++iter)
{
if ((*iter)->id() == id)
return num;
}
-int Mixer_PULSE::readVolumeFromHW( const QString& id, shared_ptr<MixDevice> md )
+int Mixer_PULSE::readVolumeFromHW( const QString& id, std::shared_ptr<MixDevice> md )
{
devmap *map = get_widget_map(m_devnum, id);
return 0;
}
-int Mixer_PULSE::writeVolumeToHW( const QString& id, shared_ptr<MixDevice> md )
+int Mixer_PULSE::writeVolumeToHW( const QString& id, std::shared_ptr<MixDevice> md )
{
devmap::iterator iter;
if (KMIXPA_PLAYBACK == m_devnum)
Mixer_PULSE(Mixer *mixer, int devnum);
virtual ~Mixer_PULSE();
- virtual int readVolumeFromHW( const QString& id, shared_ptr<MixDevice> );
- virtual int writeVolumeToHW ( const QString& id, shared_ptr<MixDevice> );
+ virtual int readVolumeFromHW( const QString& id, std::shared_ptr<MixDevice> );
+ virtual int writeVolumeToHW ( const QString& id, std::shared_ptr<MixDevice> );
virtual bool moveStream( const QString& id, const QString& destId );
// FUNCTION : Mixer::readVolumeFromHW
// DESCRIPTION : Read the audio information from the driver.
//======================================================================
-int Mixer_SUN::readVolumeFromHW( const QString& id, shared_ptr<MixDevice> md )
+int Mixer_SUN::readVolumeFromHW( const QString& id, std::shared_ptr<MixDevice> md )
{
audio_info_t audioinfo;
int devnum = id2num(id);
// FUNCTION : Mixer::writeVolumeToHW
// DESCRIPTION : Write the specified audio settings to the hardware.
//======================================================================
-int Mixer_SUN::writeVolumeToHW( const QString& id, shared_ptr<MixDevice> md )
+int Mixer_SUN::writeVolumeToHW( const QString& id, std::shared_ptr<MixDevice> md )
{
uint_t gain;
uchar_t balance;
virtual ~Mixer_SUN();
virtual QString errorText(int mixer_error);
- virtual int readVolumeFromHW( const QString& id, shared_ptr<MixDevice> );
- virtual int writeVolumeToHW ( const QString& id, shared_ptr<MixDevice> );
+ virtual int readVolumeFromHW( const QString& id, std::shared_ptr<MixDevice> );
+ virtual int writeVolumeToHW ( const QString& id, std::shared_ptr<MixDevice> );
virtual QString getDriverName();
+++ /dev/null
-/* config.h. Generated by cmake from config.h.cmake */
-/* Don't add anything new here!!! Use per-directory generated files. */
-
-/* Define if you ogg/vorbis installed */
-#cmakedefine HAVE_VORBIS ${OGGVORBIS_VERSION}
-
-/* Define to 1 if you have the <machine/endian.h> header file. */
-#cmakedefine HAVE_MACHINE_ENDIAN_H 1
-
-/* Define to 1 if you have the <endian.h> header file. */
-#cmakedefine HAVE_SYS_ENDIAN_H 1
-
-/* Define to 1 if you have the <sys/endian.h> header file. */
-#cmakedefine HAVE_ENDIAN_H 1
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#cmakedefine HAVE_UNISTD_H 1
-
-/* Define to 1 if <tr1/memory> exists and defines std::tr1::shared_ptr. */
-#cmakedefine HAVE_STD_TR1_SHARED_PTR 1
-
-/* Define to 1 if <memory> exists and defines std::shared_ptr. */
-#cmakedefine HAVE_STD_SHARED_PTR 1
#include <QMap>
-shared_ptr<MixDevice> ControlPool::TheEmptyDevice; // = shared_ptr<MixDevice>(ControlPool::TheEmptyDevicePtr);
+std::shared_ptr<MixDevice> ControlPool::TheEmptyDevice; // = std::shared_ptr<MixDevice>(ControlPool::TheEmptyDevicePtr);
ControlPool::ControlPool()
{
- pool = new QMap<QString, shared_ptr<MixDevice> >();
+ pool = new QMap<QString, std::shared_ptr<MixDevice> >();
}
ControlPool* ControlPool::_instance = 0;
* @return
*/
-shared_ptr<MixDevice> ControlPool::add(const QString& key, MixDevice* md)
+std::shared_ptr<MixDevice> ControlPool::add(const QString& key, MixDevice* md)
{
- shared_ptr<MixDevice> controlFromPool(get(key));
+ std::shared_ptr<MixDevice> controlFromPool(get(key));
if ( controlFromPool.get() != 0)
{
kDebug() << "----ControlPool already cached key=" << key;
// else: Add the control to the pool
kDebug() << "----ControlPool add key=" << key;
- shared_ptr<MixDevice> mdShared(md);
+ std::shared_ptr<MixDevice> mdShared(md);
pool->insert(key, mdShared);
return mdShared;
* @param key
* @return The Control wrapped in QSharedPointer. If not found, a QSharedPointer that points to null.
*/
-shared_ptr<MixDevice> ControlPool::get(const QString& key)
+std::shared_ptr<MixDevice> ControlPool::get(const QString& key)
{
- shared_ptr<MixDevice> mixDeviceShared = pool->value(key, TheEmptyDevice);
+ std::shared_ptr<MixDevice> mixDeviceShared = pool->value(key, TheEmptyDevice);
return mixDeviceShared;
}
#ifndef CONTROL_POOL_H
#define CONTROL_POOL_H
-#include "config.h"
-
-#if defined(HAVE_STD_SHARED_PTR)
#include <memory>
-using std::shared_ptr;
-#elif defined(HAVE_STD_TR1_SHARED_PTR)
-#include <tr1/memory>
-using std::tr1::shared_ptr;
-#endif
#include "core/mixdevice.h"
public:
static ControlPool* instance();
- shared_ptr<MixDevice> add(const QString& key, MixDevice* mixDevice);
- shared_ptr<MixDevice> get(const QString& key);
+ std::shared_ptr<MixDevice> add(const QString& key, MixDevice* mixDevice);
+ std::shared_ptr<MixDevice> get(const QString& key);
private:
virtual ~ControlPool() {};
- QMap<QString, shared_ptr<MixDevice> > *pool;
+ QMap<QString, std::shared_ptr<MixDevice> > *pool;
static ControlPool* _instance;
- static shared_ptr<MixDevice> TheEmptyDevice;
+ static std::shared_ptr<MixDevice> TheEmptyDevice;
};
#endif
#ifndef MASTERCONTROL_H_
#define MASTERCONTROL_H_
-#include "config.h"
-
-#if defined(HAVE_STD_SHARED_PTR)
-#include <memory>
-using std::shared_ptr;
-#elif defined(HAVE_STD_TR1_SHARED_PTR)
-#include <tr1/memory>
-using std::tr1::shared_ptr;
-#endif
-
#include <QString>
class MasterControl
* You must not use this MixDevice after calling close().
* <br>
* The necessity stems from a memory leak due to object cycle (MixDevice<->DBusControlWrapper), so the reference
- * counting shared_ptr has no chance to clean up. See Bug 309464 for background information.
+ * counting std::shared_ptr has no chance to clean up. See Bug 309464 for background information.
*/
void MixDevice::close()
{
}
-shared_ptr<MixDevice> MixDevice::addToPool()
+std::shared_ptr<MixDevice> MixDevice::addToPool()
{
// kDebug() << "id=" << _mixer->id() << ":" << _id;
- shared_ptr<MixDevice> thisSharedPtr(this);
- //shared_ptr<MixDevice> thisSharedPtr = ControlPool::instance()->add(fullyQualifiedId, this);
+ std::shared_ptr<MixDevice> thisSharedPtr(this);
+ // std::shared_ptr<MixDevice> thisSharedPtr = ControlPool::instance()->add(fullyQualifiedId, this);
_dbusControlWrapper = new DBusControlWrapper( thisSharedPtr, dbusPath() );
return thisSharedPtr;
}
#ifndef MixDevice_h
#define MixDevice_h
-#include "config.h"
-
-#if defined(HAVE_STD_SHARED_PTR)
#include <memory>
-using std::shared_ptr;
-#elif defined(HAVE_STD_TR1_SHARED_PTR)
-#include <tr1/memory>
-using std::tr1::shared_ptr;
-#endif
//KMix
#include "core/MediaController.h"
+#include "core/volume.h"
+
class Mixer;
class MixSet;
class ProfControl;
-#include "core/volume.h"
class DBusControlWrapper;
// KDE
void close();
- shared_ptr<MixDevice> addToPool();
+ std::shared_ptr<MixDevice> addToPool();
const QString& iconName() const { return _iconName; }
const long MixDeviceComposite::VolMax = 10000;
-MixDeviceComposite::MixDeviceComposite( Mixer* mixer, const QString& id, QList<shared_ptr<MixDevice> >& mds, const QString& name, ChannelType type ) :
+MixDeviceComposite::MixDeviceComposite( Mixer* mixer, const QString& id, QList<std::shared_ptr<MixDevice> >& mds, const QString& name, ChannelType type ) :
MixDevice( mixer, id, name, type ) // this will use doNotRestore == true
{
setArtificial(true);
_compositePlaybackVolume->addVolumeChannel(Volume::LEFT);
_compositePlaybackVolume->addVolumeChannel(Volume::RIGHT);
- QListIterator<shared_ptr<MixDevice> > it(mds);
+ QListIterator<std::shared_ptr<MixDevice> > it(mds);
while ( it.hasNext()) {
- shared_ptr<MixDevice> md = it.next();
+ std::shared_ptr<MixDevice> md = it.next();
_mds.append(md);
}
}
long MixDeviceComposite::calculateVolume(Volume::VolumeType vt)
{
- QListIterator<shared_ptr<MixDevice> > it(_mds);
+ QListIterator<std::shared_ptr<MixDevice> > it(_mds);
long volSum = 0;
int volCount = 0;
while ( it.hasNext())
{
- shared_ptr<MixDevice> md = it.next();
+ std::shared_ptr<MixDevice> md = it.next();
Volume& vol = ( vt == Volume::CaptureVT ) ? md->captureVolume() : md->playbackVolume();
if (vol.hasVolume() && (vol.maxVolume() != 0) ) {
bool MixDeviceComposite::isMuted()
{
bool isMuted = false;
- QListIterator<shared_ptr<MixDevice> > it(_mds);
+ QListIterator<std::shared_ptr<MixDevice> > it(_mds);
while ( it.hasNext()) {
- shared_ptr<MixDevice> md = it.next();
+ std::shared_ptr<MixDevice> md = it.next();
isMuted |= md->isMuted();
if ( isMuted ) break; // Enough. It can't get more true :-)
}
void MixDeviceComposite::setMuted(bool value)
{
- QListIterator<shared_ptr<MixDevice> > it(_mds);
+ QListIterator<std::shared_ptr<MixDevice> > it(_mds);
while ( it.hasNext()) {
- shared_ptr<MixDevice> md = it.next();
+ std::shared_ptr<MixDevice> md = it.next();
md->setMuted(value);
}
}
bool MixDeviceComposite::isRecSource()
{
bool isRecSource = false;
- QListIterator<shared_ptr<MixDevice> > it(_mds);
+ QListIterator<std::shared_ptr<MixDevice> > it(_mds);
while ( it.hasNext()) {
- shared_ptr<MixDevice> md = it.next();
+ std::shared_ptr<MixDevice> md = it.next();
isRecSource |= md->isRecSource();
if ( isRecSource ) break; // Enough. It can't get more true :-)
}
void MixDeviceComposite::setRecSource(bool value)
{
- QListIterator<shared_ptr<MixDevice> > it(_mds);
+ QListIterator<std::shared_ptr<MixDevice> > it(_mds);
while ( it.hasNext()) {
- shared_ptr<MixDevice> md = it.next();
+ std::shared_ptr<MixDevice> md = it.next();
md->setRecSource(value);
}
}
bool MixDeviceComposite::isEnum()
{
bool isEnum = true;
- QListIterator<shared_ptr<MixDevice> > it(_mds);
+ QListIterator<std::shared_ptr<MixDevice> > it(_mds);
while ( it.hasNext()) {
- shared_ptr<MixDevice> md = it.next();
+ std::shared_ptr<MixDevice> md = it.next();
isEnum &= md->isEnum();
if ( ! isEnum ) break; // Enough. It can't get more false :-)
}
* @par name is the readable name. This one is presented to the user in the GUI
* @par type The control type. It is only used to find an appropriate icon
*/
- MixDeviceComposite( Mixer* mixer, const QString& id, QList<shared_ptr<MixDevice> >& mds, const QString& name, ChannelType type );
+ MixDeviceComposite( Mixer* mixer, const QString& id, QList<std::shared_ptr<MixDevice> >& mds, const QString& name, ChannelType type );
// MixDevice( Mixer* mixer, const QString& id, const QString& name, const QString& iconName = "", bool doNotRestore = false, MixSet* moveDestinationMixSet = 0 );
~MixDeviceComposite();
long calculateVolume(Volume::VolumeType vt);
Mixer *_mixer;
- QList<shared_ptr<MixDevice> > _mds;
+ QList<std::shared_ptr<MixDevice> > _mds;
static const long VolMax;
// set new settings
for(int i=0; i<_mixerBackend->m_mixDevices.count() ; i++ )
{
- shared_ptr<MixDevice> md = _mixerBackend->m_mixDevices[i];
+ std::shared_ptr<MixDevice> md = _mixerBackend->m_mixDevices[i];
if ( md.get() == 0 )
continue;
if ( ok )
{
recreateId();
- shared_ptr<MixDevice> recommendedMaster = _mixerBackend->recommendedMaster();
+ std::shared_ptr<MixDevice> recommendedMaster = _mixerBackend->recommendedMaster();
if ( recommendedMaster.get() != 0 )
{
QString recommendedMasterStr = recommendedMaster->id();
return _mixerBackend->m_mixDevices.count();
}
-shared_ptr<MixDevice> Mixer::operator[](int num)
+std::shared_ptr<MixDevice> Mixer::operator[](int num)
{
- shared_ptr<MixDevice> md = _mixerBackend->m_mixDevices.at( num );
+ std::shared_ptr<MixDevice> md = _mixerBackend->m_mixDevices.at( num );
return md;
}
m_balance = balance;
- shared_ptr<MixDevice> master = getLocalMasterMD();
+ std::shared_ptr<MixDevice> master = getLocalMasterMD();
if ( master.get() == 0 )
{
// no master device available => return
}
-shared_ptr<MixDevice> Mixer::getGlobalMasterMD()
+std::shared_ptr<MixDevice> Mixer::getGlobalMasterMD()
{
return getGlobalMasterMD(true);
}
-shared_ptr<MixDevice> Mixer::getGlobalMasterMD(bool fallbackAllowed)
+std::shared_ptr<MixDevice> Mixer::getGlobalMasterMD(bool fallbackAllowed)
{
- shared_ptr<MixDevice> mdRet;
- shared_ptr<MixDevice> firstDevice;
+ std::shared_ptr<MixDevice> mdRet;
+ std::shared_ptr<MixDevice> firstDevice;
Mixer *mixer = fallbackAllowed ?
Mixer::getGlobalMasterMixer() : Mixer::getGlobalMasterMixerNoFalback();
if ( mixer == 0 )
return mdRet;
- foreach (shared_ptr<MixDevice> md, mixer->_mixerBackend->m_mixDevices )
+ foreach (std::shared_ptr<MixDevice> md, mixer->_mixerBackend->m_mixDevices )
{
if ( md.get() == 0 )
continue; // invalid
-shared_ptr<MixDevice> Mixer::getLocalMasterMD()
+std::shared_ptr<MixDevice> Mixer::getLocalMasterMD()
{
return find( _masterDevicePK );
}
}
-shared_ptr<MixDevice> Mixer::find(const QString& mixdeviceID)
+std::shared_ptr<MixDevice> Mixer::find(const QString& mixdeviceID)
{
- shared_ptr<MixDevice> mdRet;
+ std::shared_ptr<MixDevice> mdRet;
- foreach (shared_ptr<MixDevice> md, _mixerBackend->m_mixDevices )
+ foreach (std::shared_ptr<MixDevice> md, _mixerBackend->m_mixDevices )
{
if ( md.get() == 0 )
continue; // invalid
}
-shared_ptr<MixDevice> Mixer::getMixdeviceById( const QString& mixdeviceID )
+std::shared_ptr<MixDevice> Mixer::getMixdeviceById( const QString& mixdeviceID )
{
kDebug() << "id=" << mixdeviceID << "md=" << _mixerBackend->m_mixDevices.get(mixdeviceID).get()->id();
return _mixerBackend->m_mixDevices.get(mixdeviceID);
-// shared_ptr<MixDevice> md;
+// std::shared_ptr<MixDevice> md;
// int num = _mixerBackend->id2num(mixdeviceID);
// if ( num!=-1 && num < (int)size() )
// {
- It is fast (no copying of Volume objects required)
- It is easy to understand ( read - modify - commit )
*/
-void Mixer::commitVolumeChange(shared_ptr<MixDevice> md)
+void Mixer::commitVolumeChange(std::shared_ptr<MixDevice> md)
{
_mixerBackend->writeVolumeToHW(md->id(), md);
if (md->isEnum())
void Mixer::increaseOrDecreaseVolume( const QString& mixdeviceID, bool decrease )
{
- shared_ptr<MixDevice> md= getMixdeviceById( mixdeviceID );
+ std::shared_ptr<MixDevice> md= getMixdeviceById( mixdeviceID );
if (md.get() != 0)
{
Volume& volP=md->playbackVolume();
static int numDrivers();
QString getDriverName();
- shared_ptr<MixDevice> find(const QString& devPK);
+ std::shared_ptr<MixDevice> find(const QString& devPK);
static Mixer* findMixer( const QString& mixer_id);
void volumeSave( KConfig *config );
/// Returns a pointer to the mix device with the given number
// TODO remove this method. Only used by ViewDockAreaPopup: dockMD = (*mixer)[0];
- shared_ptr<MixDevice> operator[](int val_i_num);
+ std::shared_ptr<MixDevice> operator[](int val_i_num);
/// Returns a pointer to the mix device whose type matches the value
/// given by the parameter and the array MixerDevNames given in
/// mixer_oss.cpp (0 is Volume, 4 is PCM, etc.)
- shared_ptr<MixDevice> getMixdeviceById( const QString& deviceID );
+ std::shared_ptr<MixDevice> getMixdeviceById( const QString& deviceID );
/// Open/grab the mixer for further intraction
bool openIfValid();
At the moment it is only used for selecting the Mixer to use in KMix's DockIcon.
******************************************/
static void setGlobalMaster(QString ref_card, QString ref_control, bool preferred);
- static shared_ptr<MixDevice> getGlobalMasterMD();
- static shared_ptr<MixDevice> getGlobalMasterMD(bool fallbackAllowed);
+ static std::shared_ptr<MixDevice> getGlobalMasterMD();
+ static std::shared_ptr<MixDevice> getGlobalMasterMD(bool fallbackAllowed);
static Mixer* getGlobalMasterMixer();
static Mixer* getGlobalMasterMixerNoFalback();
static MasterControl& getGlobalMasterPreferred();
/******************************************
The recommended master of this Mixer.
******************************************/
- shared_ptr<MixDevice> getLocalMasterMD();
+ std::shared_ptr<MixDevice> getLocalMasterMD();
void setLocalMasterMD(QString&);
/// get the actual MixSet
virtual int mediaNext(QString id) { return _mixerBackend->mediaNext(id); };
- void commitVolumeChange( shared_ptr<MixDevice> md );
+ void commitVolumeChange( std::shared_ptr<MixDevice> md );
public slots:
void readSetFromHWforceUpdate() const;
// not one defined in the kmixrc.
// So lets just set the first card as master card.
if ( Mixer::mixers().count() > 0 ) {
- shared_ptr<MixDevice> master = Mixer::mixers().first()->getLocalMasterMD();
+ std::shared_ptr<MixDevice> master = Mixer::mixers().first()->getLocalMasterMD();
if ( master ) {
QString controlId = master->id();
Mixer::setGlobalMaster( Mixer::mixers().first()->id(), controlId, true);
else {
// setGlobalMaster was already set after reading the configuration.
// So we must make the local master consistent
- shared_ptr<MixDevice> md = Mixer::getGlobalMasterMD();
+ std::shared_ptr<MixDevice> md = Mixer::getGlobalMasterMD();
QString mdID = md->id();
md->mixer()->setLocalMasterMD(mdID);
}
m_name = group.readEntry( "name", m_name );
bool have_success = false, have_fail = false;
- foreach ( shared_ptr<MixDevice> md, *this)
+ foreach ( std::shared_ptr<MixDevice> md, *this)
{
if ( md->read( config, grp ) )
have_success = true;
conf.writeEntry( "name", m_name );
bool have_success = false, have_fail = false;
- foreach ( shared_ptr<MixDevice> md, *this)
+ foreach ( std::shared_ptr<MixDevice> md, *this)
{
if ( md->write( config, grp ) )
have_success = true;
m_name = name;
}
-shared_ptr<MixDevice> MixSet::get(QString id)
+std::shared_ptr<MixDevice> MixSet::get(QString id)
{
- shared_ptr<MixDevice> mdRet;
+ std::shared_ptr<MixDevice> mdRet;
- foreach ( shared_ptr<MixDevice> md, *this)
+ foreach ( std::shared_ptr<MixDevice> md, *this)
{
if ( md->id() == id )
{
{
for (int i=0; i < count() ; i++ )
{
- shared_ptr<MixDevice> md = operator[](i);
+ std::shared_ptr<MixDevice> md = operator[](i);
if ( md->id() == id )
{
removeAt(i);
#include "core/mixdevice.h"
-class MixSet : public QList <shared_ptr<MixDevice> >
+class MixSet : public QList <std::shared_ptr<MixDevice> >
{
public:
~MixSet();
QString name() { return m_name; }
void setName( const QString &name );
- shared_ptr<MixDevice> get(QString id);
+ std::shared_ptr<MixDevice> get(QString id);
void removeById(QString id);
#include "core/mixer.h"
#include "core/volume.h"
-DBusControlWrapper::DBusControlWrapper(shared_ptr<MixDevice> parent, const QString& path)
+DBusControlWrapper::DBusControlWrapper(std::shared_ptr<MixDevice> parent, const QString& path)
: QObject(0)
{
// kDebug() << "QDBusConnection for control created" << path;
Q_PROPERTY(bool hasCaptureSwitch READ hasCaptureSwitch)
public:
- DBusControlWrapper(shared_ptr<MixDevice> parent, const QString& path);
+ DBusControlWrapper(std::shared_ptr<MixDevice> parent, const QString& path);
~DBusControlWrapper();
void increaseVolume();
void decreaseVolume();
void toggleMute();
private:
- shared_ptr<MixDevice> m_md;
+ std::shared_ptr<MixDevice> m_md;
QString id();
QString readableName();
QStringList DBusMixerWrapper::controls()
{
QStringList result;
- foreach ( shared_ptr<MixDevice> md, m_mixer->getMixSet() )
+ foreach ( std::shared_ptr<MixDevice> md, m_mixer->getMixSet() )
{
result.append( md->dbusPath() );
}
QString DBusMixerWrapper::masterControl()
{
- shared_ptr<MixDevice> md = m_mixer->getLocalMasterMD();
+ std::shared_ptr<MixDevice> md = m_mixer->getLocalMasterMD();
// XXX: Since empty object path is invalid, using "/"
return md ? md->dbusPath() : QString("/");
}
QString DBusMixSetWrapper::currentMasterControl() const
{
- shared_ptr<MixDevice> masterControl = Mixer::getGlobalMasterMD();
+ std::shared_ptr<MixDevice> masterControl = Mixer::getGlobalMasterMD();
return masterControl ? masterControl->id() : QString();
}
m_vboxForScrollView = new KVBox(); //m_scrollableChannelSelector->viewport()
- shared_ptr<MixDevice> master = mixer->getLocalMasterMD();
+ std::shared_ptr<MixDevice> master = mixer->getLocalMasterMD();
QString masterKey = ( master.get() != 0 ) ? master->id() : "----noMaster---"; // Use non-matching name as default
const MixSet& mixset = mixer->getMixSet();
MixSet& mset = const_cast<MixSet&>(mixset);
for( int i=0; i< mset.count(); ++i )
{
- shared_ptr<MixDevice> md = mset[i];
+ std::shared_ptr<MixDevice> md = mset[i];
// Create a RadioButton for each MixDevice (excluding Enum's)
if ( md->playbackVolume().hasVolume() )
{
QWidget *qw = mdws[i];
if ( qw->inherits("MixDeviceWidget") ) {
MixDeviceWidget *mdw = static_cast<MixDeviceWidget*>(qw);
- shared_ptr<MixDevice> md = mdw->mixDevice();
+ std::shared_ptr<MixDevice> md = mdw->mixDevice();
QString mdName = md->readableName();
int splitted = -1;
if ( menu == 0)
return; // We do not use a menu
- shared_ptr<MixDevice> md = Mixer::getGlobalMasterMD();
+ std::shared_ptr<MixDevice> md = Mixer::getGlobalMasterMD();
if ( md.get() != 0 && md->hasMuteSwitch() ) {
// Put "Mute" selector in context menu
KToggleAction *action = actionCollection()->add<KToggleAction>( "dock_mute" );
void
KMixDockWidget::setVolumeTip()
{
- shared_ptr<MixDevice> md = Mixer::getGlobalMasterMD();
+ std::shared_ptr<MixDevice> md = Mixer::getGlobalMasterMD();
QString tip;
int virtualToolTipValue = 0;
void KMixDockWidget::updatePixmap()
{
- shared_ptr<MixDevice> md = Mixer::getGlobalMasterMD();
+ std::shared_ptr<MixDevice> md = Mixer::getGlobalMasterMD();
char newPixmapType;
if ( !md )
void
KMixDockWidget::trayWheelEvent(int delta,Qt::Orientation wheelOrientation)
{
- shared_ptr<MixDevice> md = Mixer::getGlobalMasterMD();
+ std::shared_ptr<MixDevice> md = Mixer::getGlobalMasterMD();
if ( md.get() == 0 )
return;
void
KMixDockWidget::dockMute()
{
- shared_ptr<MixDevice> md = Mixer::getGlobalMasterMD();
+ std::shared_ptr<MixDevice> md = Mixer::getGlobalMasterMD();
if ( md )
{
md->toggleMute();
void KMixDockWidget::updateDockMuteAction ( KToggleAction* dockMuteAction )
{
- shared_ptr<MixDevice> md = Mixer::getGlobalMasterMD();
+ std::shared_ptr<MixDevice> md = Mixer::getGlobalMasterMD();
if ( md && dockMuteAction != 0 )
{
Volume& vol = md->playbackVolume().hasVolume() ? md->playbackVolume() : md->captureVolume();
* Class that represents an Enum element (a select one-from-many selector)
* The orientation (horizontal, vertical) is ignored
*/
-MDWEnum::MDWEnum( shared_ptr<MixDevice> md,
+MDWEnum::MDWEnum( std::shared_ptr<MixDevice> md,
Qt::Orientation orientation,
QWidget* parent, ViewBase* view, ProfControl* par_pctl) :
MixDeviceWidget(md, false, orientation, parent, view, par_pctl),
Q_OBJECT
public:
- MDWEnum( shared_ptr<MixDevice> md,
+ MDWEnum( std::shared_ptr<MixDevice> md,
Qt::Orientation orientation,
QWidget* parent, ViewBase* view, ProfControl* pctl);
~MDWEnum();
// Qt
#include <QString>
-MDWMoveAction::MDWMoveAction(shared_ptr<MixDevice> md, QObject *parent)
+MDWMoveAction::MDWMoveAction(std::shared_ptr<MixDevice> md, QObject *parent)
: KAction(parent), m_mixDevice(md)
{
Q_ASSERT(md);
Q_OBJECT
public:
- MDWMoveAction(shared_ptr<MixDevice> md, QObject *parent);
+ MDWMoveAction(std::shared_ptr<MixDevice> md, QObject *parent);
~MDWMoveAction();
signals:
void triggered(bool checked);
private:
- shared_ptr<MixDevice> m_mixDevice;
+ std::shared_ptr<MixDevice> m_mixDevice;
};
#endif
*
* Due to the many options, this is the most complicated MixDeviceWidget subclass.
*/
-MDWSlider::MDWSlider(shared_ptr<MixDevice> md, bool showMuteLED, bool showCaptureLED
+MDWSlider::MDWSlider(std::shared_ptr<MixDevice> md, bool showMuteLED, bool showCaptureLED
, bool includeMixerName, bool small, Qt::Orientation orientation, QWidget* parent
, ViewBase* view
, ProfControl* par_ctl
_mdwMoveActions->addAction( QString("-"), a);
m_moveMenu->addAction( a );
- foreach (shared_ptr<MixDevice> md, *ms)
+ foreach (std::shared_ptr<MixDevice> md, *ms)
{
a = new MDWMoveAction(md, _mdwMoveActions);
_mdwMoveActions->addAction( QString("moveto") + md->id(), a);
Q_OBJECT
public:
- MDWSlider( shared_ptr<MixDevice> md,
+ MDWSlider( std::shared_ptr<MixDevice> md,
bool includePlayback, bool includeCapture,
bool includeMixerName, bool small, Qt::Orientation,
QWidget* parent, ViewBase* view, ProfControl *pctl);
* SHOULD honor these values - those who do not might not be suitable for placing in
* the panel applet or any other smallish settings.
*/
-MixDeviceWidget::MixDeviceWidget(shared_ptr<MixDevice> md,
+MixDeviceWidget::MixDeviceWidget(std::shared_ptr<MixDevice> md,
bool small, Qt::Orientation orientation,
QWidget* parent, ViewBase* view, ProfControl* par_pctl) :
QWidget( parent ), m_mixdevice( md ), m_view( view ), _pctl(par_pctl),
Q_OBJECT
public:
- MixDeviceWidget( shared_ptr<MixDevice> md,
+ MixDeviceWidget( std::shared_ptr<MixDevice> md,
bool small, Qt::Orientation orientation,
QWidget* parent, ViewBase*, ProfControl * );
virtual ~MixDeviceWidget();
void addActionToPopup( KAction *action );
- shared_ptr<MixDevice> mixDevice() { return m_mixdevice; }
+ std::shared_ptr<MixDevice> mixDevice() { return m_mixdevice; }
virtual void setColors( QColor high, QColor low, QColor back );
virtual void setIcons( bool value );
protected:
- shared_ptr<MixDevice> m_mixdevice;
+ std::shared_ptr<MixDevice> m_mixdevice;
KActionCollection* _mdwActions;
KActionCollection* _mdwPopupActions;
ViewBase* m_view;
void OSDWidget::controlsChange(int changeType)
{
ControlChangeType::Type type = ControlChangeType::fromInt(changeType);
- shared_ptr<MixDevice> master = Mixer::getGlobalMasterMD();
+ std::shared_ptr<MixDevice> master = Mixer::getGlobalMasterMD();
switch (type )
{
case ControlChangeType::Volume:
void ViewBase::createDeviceWidgets()
{
_setMixSet();
- foreach ( shared_ptr<MixDevice> md, _mixSet )
+ foreach ( std::shared_ptr<MixDevice> md, _mixSet )
{
QWidget* mdw = add(md); // a) Let the View implementation do its work
_mdws.append(mdw); // b) Add it to the local list
while (!_mdws.isEmpty())
delete _mdws.takeFirst();
- // _mixSet contains shared_ptr instances, so clear() should be enough to prevent mem leak
+ // _mixSet contains std::shared_ptr instances, so clear() should be enough to prevent mem leak
_mixSet.clear(); // Clean up our _mixSet so we can reapply our GUIProfile
}
if (qmdw->inherits("MixDeviceWidget"))
{
MixDeviceWidget* mdw = (MixDeviceWidget*) qmdw;
- shared_ptr<MixDevice> md = mdw->mixDevice();
+ std::shared_ptr<MixDevice> md = mdw->mixDevice();
QString devgrp = md->configGroupName(grp);
KConfigGroup devcg = config->group(devgrp);
if (qmdw->inherits("MixDeviceWidget"))
{
MixDeviceWidget* mdw = (MixDeviceWidget*) qmdw;
- shared_ptr<MixDevice> md = mdw->mixDevice();
+ std::shared_ptr<MixDevice> md = mdw->mixDevice();
//kDebug(67100) << " grp=" << grp.toAscii();
//kDebug(67100) << " mixer=" << view->id().toAscii();
/**
* Creates a suitable representation for the given MixDevice.
*/
- virtual QWidget* add(shared_ptr<MixDevice>) = 0;
+ virtual QWidget* add(std::shared_ptr<MixDevice>) = 0;
// This method is called after a configuration update (show/hide controls, split/unsplit).
virtual void configurationUpdate() = 0;
foreach ( Mixer* mixer, _mixers )
{
// kDebug() << "ADD? mixerId=" << mixer->id();
- shared_ptr<MixDevice>dockMD = mixer->getLocalMasterMD();
+ std::shared_ptr<MixDevice>dockMD = mixer->getLocalMasterMD();
if ( !dockMD && mixer->size() > 0 )
{
// If we have no dock device yet, we will take the first available mixer device.
// Add all application streams
foreach ( Mixer* mixer2 , _mixers )
{
- foreach ( shared_ptr<MixDevice> md, mixer2->getMixSet() )
+ foreach ( std::shared_ptr<MixDevice> md, mixer2->getMixSet() )
{
if (md->isApplicationStream())
{
}
-QWidget* ViewDockAreaPopup::add(shared_ptr<MixDevice> md)
+QWidget* ViewDockAreaPopup::add(std::shared_ptr<MixDevice> md)
{
bool vertical = (GlobalConfig::instance().data.getTraypopupOrientation() == Qt::Vertical); // I am wondering whether using vflags for this would still make sense
/*
ViewDockAreaPopup(QWidget* parent, QString id, ViewBase::ViewFlags vflags, QString guiProfileId, KMixWindow *dockW);
virtual ~ViewDockAreaPopup();
- virtual QWidget* add(shared_ptr<MixDevice> md);
+ virtual QWidget* add(std::shared_ptr<MixDevice> md);
virtual void constructionFinished();
virtual void refreshVolumeLevels();
virtual void showContextMenu();
}
-QWidget* ViewSliders::add(shared_ptr<MixDevice> md)
+QWidget* ViewSliders::add(std::shared_ptr<MixDevice> md)
{
MixDeviceWidget *mdw;
Qt::Orientation orientation = GlobalConfig::instance().data.getToplevelOrientation();
_layoutMDW->addWidget(emptyStreamHint);
#ifdef TEST_MIXDEVICE_COMPOSITE
- QList<shared_ptr<MixDevice> > mds; // For temporary test
+ QList<std::shared_ptr<MixDevice> > mds; // For temporary test
#endif
// This method iterates the controls from the Profile
// The following for-loop could be simplified by using a std::find_if
for ( int i=0; i<mixset.count(); i++ )
{
- shared_ptr<MixDevice> md = mixset[i];
+ std::shared_ptr<MixDevice> md = mixset[i];
if ( md->id().contains(idRegexp) )
{
ViewSliders(QWidget* parent, QString id, Mixer* mixer, ViewBase::ViewFlags vflags, QString guiProfileId, KActionCollection *actColl);
virtual ~ViewSliders();
- virtual QWidget* add(shared_ptr<MixDevice>);
+ virtual QWidget* add(std::shared_ptr<MixDevice>);
virtual void constructionFinished();
virtual void configurationUpdate();