~ubuntu-branches/ubuntu/breezy/kdemultimedia/breezy

« back to all changes in this revision

Viewing changes to noatun/modules/winskin/waVolumeSlider.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2005-03-24 04:48:58 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050324044858-8ff88o9jxej6ii3d
Tags: 4:3.4.0-0ubuntu3
Add kubuntu_02_hide_arts_menu_entries.diff to hide artsbuilder and artscontrol k-menu entries

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
  jumpslider for winamp skins
 
3
  Copyright (C) 1998  Martin Vogt
 
4
 
 
5
  This program is free software; you can redistribute it and/or modify
 
6
  it under the terms of the GNU General Public License as published by
 
7
  the Free Software Foundation.
 
8
 
 
9
  For more information look at the file COPYRIGHT in this package
 
10
 
 
11
 */
 
12
 
 
13
 
 
14
#include <waVolumeSlider.h>
 
15
 
 
16
 
 
17
WaVolumeSlider::WaVolumeSlider() : WaWidget(_WA_MAPPING_VOLUME_BAR)
 
18
{
 
19
 
 
20
}
 
21
 
 
22
 
 
23
WaVolumeSlider::~WaVolumeSlider()
 
24
{
 
25
}
 
26
 
 
27
 
 
28
void WaVolumeSlider::buildGui()
 
29
{
 
30
    ws = new WaSlider(_WA_MAPPING_VOLUME_BAR, _WA_MAPPING_VOLUME_SLIDER, true);
 
31
 
 
32
    ws->setPixmapSliderButtonUp(_WA_SKIN_VOLUME_SLIDER_NORM);
 
33
    ws->setPixmapSliderButtonDown(_WA_SKIN_VOLUME_SLIDER_PRES);
 
34
    ws->setPixmapSliderBar(_WA_SKIN_VOLUME_BAR);
 
35
 
 
36
    connect(ws, SIGNAL(valueChanged(int)), this,
 
37
            SIGNAL(volumeSetValue(int)));
 
38
    connect(ws, SIGNAL(sliderPressed()), SIGNAL(sliderPressed()));
 
39
    connect(ws, SIGNAL(sliderReleased()), SIGNAL(sliderReleased()));
 
40
}
 
41
 
 
42
void WaVolumeSlider::setVolumeValue(int val)
 
43
{
 
44
    int currVal = ws->value();
 
45
    if (currVal != val) {
 
46
        ws->setValue(val);
 
47
    }
 
48
}
 
49
 
 
50
 
 
51
#include "waVolumeSlider.moc"