Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

VolumeControl Class Reference

#include </home/clem/local/src/opie/core/applets/volumeapplet/volume.h>

Collaboration diagram for VolumeControl:

Collaboration graph
[legend]
List of all members.

Public Slots

void setVolume (int volumePerc)
void setMute (bool)

Public Member Functions

 VolumeControl (VolumeApplet *icon, bool showMic=false, QWidget *parent=0, const char *name=0)
bool volMuted () const
int volPercent () const
virtual void show (bool showmic)
 VolumeControl ()
 ~VolumeControl ()
void incVol (int ammount)
void decVol (int ammount)
int volume ()

Protected Slots

void volumeChanged (bool muted)
void micChanged (bool muted)

Protected Member Functions

virtual void keyPressEvent (QKeyEvent *e)

Private Types

enum  eUpdate {
  UPD_None, UPD_Vol, UPD_Mic, UPD_Bass,
  UPD_Treble
}

Private Slots

void volMoved (int percent)
void micMoved (int percent)
void alarmMoved (int percent)
void bassMoved (int percent)
void trebleMoved (int percent)
void volMuteToggled (bool)
void micMuteToggled (bool)
void alarmSoundToggled (bool)
void keyClickToggled (bool)
void screenTapToggled (bool)
void buttonChanged ()
void rateTimerDone ()

Private Member Functions

void readConfig (bool force=false)
void writeConfigEntry (const char *entry, int val, eUpdate upd)

Private Attributes

QSlider * volSlider
QSlider * bassSlider
QSlider * trebleSlider
QSlider * micSlider
QSlider * alarmSlider
Opie::Ui::OLedBoxvolLed
Opie::Ui::OLedBoxmicLed
Opie::Ui::OLedBoxalarmLed
QCheckBox * alarmBox
QCheckBox * tapBox
QCheckBox * keyBox
QPushButton * upButton
QPushButton * downButton
QTimer * rateTimer
int m_vol_percent
int m_mic_percent
int m_alarm_percent
int m_bass_percent
int m_treble_percent
bool m_vol_muted
bool m_mic_muted
bool m_snd_alarm
bool m_snd_touch
bool m_snd_key
VolumeAppletm_icon
int m_volumePerc

Member Enumeration Documentation

enum VolumeControl::eUpdate [private]
 

Enumeration values:
UPD_None 
UPD_Vol 
UPD_Mic 
UPD_Bass 
UPD_Treble 

Definition at line 73 of file volume.h.


Constructor & Destructor Documentation

VolumeControl::VolumeControl VolumeApplet icon,
bool  showMic = false,
QWidget *  parent = 0,
const char *  name = 0
 

Definition at line 238 of file volume.cpp.

References alarm_xpm, alarmBox, alarmLed, alarmMoved(), alarmSlider, alarmSoundToggled(), bass_xpm, bassMoved(), bassSlider, buttonChanged(), downButton, Opie::ODevice::inst(), keyBox, keyClickToggled(), l, Opie::Core::OResource::loadPixmap(), m_alarm_percent, m_icon, m_mic_muted, m_mic_percent, m_snd_alarm, m_snd_key, m_snd_touch, m_vol_muted, m_vol_percent, mic_xpm, micLed, micMoved(), micMuteToggled(), micSlider, model, Opie::Core::Model_Zaurus_SL5000, rateTimer, rateTimerDone(), readConfig(), screenTapToggled(), Opie::Core::OResource::SmallIcon, tapBox, tr, treble_xpm, trebleMoved(), trebleSlider, upButton, UPD_Mic, UPD_None, UPD_Vol, vol_xpm, volLed, volMoved(), volMuteToggled(), volSlider, and writeConfigEntry().

VolumeControl::VolumeControl  ) 
 

Definition at line 45 of file volumecontrol.cpp.

References volume().

VolumeControl::~VolumeControl  ) 
 

Definition at line 49 of file volumecontrol.cpp.


Member Function Documentation

void VolumeControl::alarmMoved int  percent  )  [private, slot]
 

Definition at line 652 of file volume.cpp.

References m_alarm_percent, UPD_None, and writeConfigEntry().

Referenced by VolumeControl().

void VolumeControl::alarmSoundToggled bool   )  [private, slot]
 

Definition at line 608 of file volume.cpp.

References m_snd_alarm, UPD_Vol, and writeConfigEntry().

Referenced by VolumeControl().

void VolumeControl::bassMoved int  percent  )  [private, slot]
 

Definition at line 663 of file volume.cpp.

References m_bass_percent, UPD_Bass, and writeConfigEntry().

Referenced by VolumeControl().

void VolumeControl::buttonChanged  )  [private, slot]
 

Definition at line 483 of file volume.cpp.

References downButton, RATE_TIMER_INTERVAL, rateTimer, rateTimerDone(), start, and upButton.

Referenced by VolumeControl().

void VolumeControl::decVol int  ammount  ) 
 

Definition at line 39 of file volumecontrol.cpp.

References setVolume(), and volume().

void VolumeControl::incVol int  ammount  ) 
 

Definition at line 34 of file volumecontrol.cpp.

References setVolume(), and volume().

void VolumeControl::keyClickToggled bool   )  [private, slot]
 

Definition at line 602 of file volume.cpp.

References m_snd_key, UPD_Vol, and writeConfigEntry().

Referenced by VolumeControl().

void VolumeControl::keyPressEvent QKeyEvent *  e  )  [protected, virtual]
 

Definition at line 465 of file volume.cpp.

References volLed, and volSlider.

void VolumeControl::micChanged bool  muted  )  [protected, slot]
 

Definition at line 589 of file volume.cpp.

References m_mic_muted, and readConfig().

void VolumeControl::micMoved int  percent  )  [private, slot]
 

Definition at line 642 of file volume.cpp.

References m_mic_percent, UPD_Mic, and writeConfigEntry().

Referenced by VolumeControl().

void VolumeControl::micMuteToggled bool   )  [private, slot]
 

Definition at line 623 of file volume.cpp.

References m_mic_muted, UPD_Mic, and writeConfigEntry().

Referenced by VolumeControl().

void VolumeControl::rateTimerDone  )  [private, slot]
 

Definition at line 495 of file volume.cpp.

References upButton, and volSlider.

Referenced by buttonChanged(), and VolumeControl().

void VolumeControl::readConfig bool  force = false  )  [private]
 

Definition at line 520 of file volume.cpp.

References alarmBox, alarmLed, alarmSlider, bassSlider, keyBox, m_alarm_percent, m_bass_percent, m_mic_muted, m_mic_percent, m_snd_alarm, m_snd_key, m_snd_touch, m_treble_percent, m_vol_muted, m_vol_percent, micLed, micSlider, tapBox, trebleSlider, volLed, and volSlider.

Referenced by micChanged(), show(), volumeChanged(), and VolumeControl().

void VolumeControl::screenTapToggled bool   )  [private, slot]
 

Definition at line 596 of file volume.cpp.

References m_snd_touch, UPD_Vol, and writeConfigEntry().

Referenced by VolumeControl().

void VolumeControl::setMute bool   )  [slot]
 

Definition at line 53 of file volumecontrol.cpp.

void VolumeControl::setVolume int  volumePerc  )  [slot]
 

Set the volume in percent volumePerc between 0 and 100

Definition at line 16 of file volumecontrol.cpp.

References m_volumePerc, Config::setGroup(), and Config::writeEntry().

Referenced by decVol(), and incVol().

void VolumeControl::show bool  showmic  )  [virtual]
 

Definition at line 503 of file volume.cpp.

References height, m_icon, readConfig(), width, Opie::MM::x, and Opie::MM::y.

void VolumeControl::trebleMoved int  percent  )  [private, slot]
 

Definition at line 675 of file volume.cpp.

References m_treble_percent, UPD_Treble, and writeConfigEntry().

Referenced by VolumeControl().

void VolumeControl::volMoved int  percent  )  [private, slot]
 

Definition at line 630 of file volume.cpp.

References m_icon, m_vol_percent, redraw(), UPD_Vol, and writeConfigEntry().

Referenced by VolumeControl().

bool VolumeControl::volMuted  )  const
 

Definition at line 455 of file volume.cpp.

References m_vol_muted.

void VolumeControl::volMuteToggled bool   )  [private, slot]
 

Definition at line 614 of file volume.cpp.

References m_icon, m_vol_muted, redraw(), UPD_Vol, and writeConfigEntry().

Referenced by VolumeControl().

int VolumeControl::volPercent  )  const
 

Definition at line 460 of file volume.cpp.

References m_vol_percent.

int VolumeControl::volume  ) 
 

Get the volume in percent

Returns:
volume percentage

Definition at line 7 of file volumecontrol.cpp.

References m_volumePerc.

Referenced by decVol(), incVol(), and VolumeControl().

void VolumeControl::volumeChanged bool  muted  )  [protected, slot]
 

Definition at line 575 of file volume.cpp.

References m_icon, m_vol_muted, m_vol_percent, readConfig(), and redraw().

void VolumeControl::writeConfigEntry const char *  entry,
int  val,
eUpdate  upd
[private]
 

Definition at line 687 of file volume.cpp.

References m_mic_muted, m_vol_muted, UPD_Bass, UPD_Mic, UPD_None, UPD_Treble, and UPD_Vol.

Referenced by alarmMoved(), alarmSoundToggled(), bassMoved(), keyClickToggled(), micMoved(), micMuteToggled(), screenTapToggled(), trebleMoved(), volMoved(), volMuteToggled(), and VolumeControl().


Member Data Documentation

QCheckBox* VolumeControl::alarmBox [private]
 

Definition at line 93 of file volume.h.

Referenced by readConfig(), and VolumeControl().

Opie::Ui::OLedBox* VolumeControl::alarmLed [private]
 

Definition at line 91 of file volume.h.

Referenced by readConfig(), and VolumeControl().

QSlider* VolumeControl::alarmSlider [private]
 

Definition at line 88 of file volume.h.

Referenced by readConfig(), and VolumeControl().

QSlider* VolumeControl::bassSlider [private]
 

Definition at line 85 of file volume.h.

Referenced by readConfig(), and VolumeControl().

QPushButton* VolumeControl::downButton [private]
 

Definition at line 97 of file volume.h.

Referenced by buttonChanged(), and VolumeControl().

QCheckBox* VolumeControl::keyBox [private]
 

Definition at line 95 of file volume.h.

Referenced by readConfig(), and VolumeControl().

int VolumeControl::m_alarm_percent [private]
 

Definition at line 102 of file volume.h.

Referenced by alarmMoved(), readConfig(), and VolumeControl().

int VolumeControl::m_bass_percent [private]
 

Definition at line 103 of file volume.h.

Referenced by bassMoved(), and readConfig().

VolumeApplet* VolumeControl::m_icon [private]
 

Definition at line 111 of file volume.h.

Referenced by show(), volMoved(), volMuteToggled(), volumeChanged(), and VolumeControl().

bool VolumeControl::m_mic_muted [private]
 

Definition at line 106 of file volume.h.

Referenced by micChanged(), micMuteToggled(), readConfig(), VolumeControl(), and writeConfigEntry().

int VolumeControl::m_mic_percent [private]
 

Definition at line 101 of file volume.h.

Referenced by micMoved(), readConfig(), and VolumeControl().

bool VolumeControl::m_snd_alarm [private]
 

Definition at line 107 of file volume.h.

Referenced by alarmSoundToggled(), readConfig(), and VolumeControl().

bool VolumeControl::m_snd_key [private]
 

Definition at line 109 of file volume.h.

Referenced by keyClickToggled(), readConfig(), and VolumeControl().

bool VolumeControl::m_snd_touch [private]
 

Definition at line 108 of file volume.h.

Referenced by readConfig(), screenTapToggled(), and VolumeControl().

int VolumeControl::m_treble_percent [private]
 

Definition at line 104 of file volume.h.

Referenced by readConfig(), and trebleMoved().

bool VolumeControl::m_vol_muted [private]
 

Definition at line 105 of file volume.h.

Referenced by readConfig(), volMuted(), volMuteToggled(), volumeChanged(), VolumeControl(), and writeConfigEntry().

int VolumeControl::m_vol_percent [private]
 

Definition at line 100 of file volume.h.

Referenced by readConfig(), volMoved(), volPercent(), volumeChanged(), and VolumeControl().

int VolumeControl::m_volumePerc [private]
 

Definition at line 43 of file volumecontrol.h.

Referenced by setVolume(), and volume().

Opie::Ui::OLedBox* VolumeControl::micLed [private]
 

Definition at line 90 of file volume.h.

Referenced by readConfig(), and VolumeControl().

QSlider* VolumeControl::micSlider [private]
 

Definition at line 87 of file volume.h.

Referenced by readConfig(), and VolumeControl().

QTimer* VolumeControl::rateTimer [private]
 

Definition at line 98 of file volume.h.

Referenced by buttonChanged(), and VolumeControl().

QCheckBox* VolumeControl::tapBox [private]
 

Definition at line 94 of file volume.h.

Referenced by readConfig(), and VolumeControl().

QSlider* VolumeControl::trebleSlider [private]
 

Definition at line 86 of file volume.h.

Referenced by readConfig(), and VolumeControl().

QPushButton* VolumeControl::upButton [private]
 

Definition at line 96 of file volume.h.

Referenced by buttonChanged(), rateTimerDone(), and VolumeControl().

Opie::Ui::OLedBox* VolumeControl::volLed [private]
 

Definition at line 89 of file volume.h.

Referenced by keyPressEvent(), readConfig(), and VolumeControl().

QSlider* VolumeControl::volSlider [private]
 

Definition at line 84 of file volume.h.

Referenced by keyPressEvent(), rateTimerDone(), readConfig(), and VolumeControl().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:55:25 2005 for OPIE by  doxygen 1.4.2