You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
2.3 KiB
68 lines
2.3 KiB
15 years ago
|
/***************************************************************************
|
||
|
alsa-config-mixer-setting.cpp - description
|
||
|
-------------------
|
||
|
begin : Mon Aug 15 2005
|
||
|
copyright : (C) 2005 by Martin Witte
|
||
|
email : witte@kawo1.rwth-aachen.de
|
||
|
***************************************************************************/
|
||
|
|
||
|
/***************************************************************************
|
||
|
* *
|
||
|
* 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. *
|
||
|
* *
|
||
|
***************************************************************************/
|
||
|
|
||
|
#include "alsa-config-mixer-setting.h"
|
||
|
|
||
12 years ago
|
#include <tdeconfig.h>
|
||
15 years ago
|
|
||
|
AlsaConfigMixerSetting::AlsaConfigMixerSetting()
|
||
|
: m_card(-1),
|
||
14 years ago
|
m_name(TQString()),
|
||
15 years ago
|
m_use(false),
|
||
|
m_active(false),
|
||
|
m_volume(-1)
|
||
|
{
|
||
|
}
|
||
|
|
||
12 years ago
|
AlsaConfigMixerSetting::AlsaConfigMixerSetting(TDEConfig *c, const TQString &prefix)
|
||
15 years ago
|
{
|
||
|
m_card = c->readNumEntry (prefix+"card", -1);
|
||
14 years ago
|
m_name = c->readEntry (prefix+"name", TQString());
|
||
15 years ago
|
m_use = c->readBoolEntry (prefix+"use", false);
|
||
|
m_active = c->readBoolEntry (prefix+"active", false);
|
||
|
m_volume = c->readDoubleNumEntry(prefix+"volume", 0);
|
||
|
}
|
||
|
|
||
14 years ago
|
AlsaConfigMixerSetting::AlsaConfigMixerSetting(int card, const TQString &name, bool use, bool active, float volume)
|
||
15 years ago
|
: m_card(card),
|
||
|
m_name(name),
|
||
|
m_use(use),
|
||
|
m_active(active),
|
||
|
m_volume(volume)
|
||
|
{
|
||
|
}
|
||
|
|
||
|
AlsaConfigMixerSetting::~AlsaConfigMixerSetting()
|
||
|
{
|
||
|
}
|
||
|
|
||
14 years ago
|
TQString AlsaConfigMixerSetting::getIDString(int card, const TQString &name)
|
||
15 years ago
|
{
|
||
14 years ago
|
return TQString::number(card) + "-" + name;
|
||
15 years ago
|
}
|
||
|
|
||
12 years ago
|
void AlsaConfigMixerSetting::saveState(TDEConfig *c, const TQString &prefix) const
|
||
15 years ago
|
{
|
||
|
c->writeEntry(prefix+"card", m_card);
|
||
|
c->writeEntry(prefix+"name", m_name);
|
||
|
c->writeEntry(prefix+"use", m_use);
|
||
|
c->writeEntry(prefix+"active", m_active);
|
||
|
c->writeEntry(prefix+"volume", m_volume);
|
||
|
}
|
||
|
|
||
|
|