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

« back to all changes in this revision

Viewing changes to arts/modules/mixers/simplemixerchannelguifactory_impl.cc

  • 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
#include "artsmodulesmixers.h"
 
2
#include "debug.h"
 
3
#include "connect.h"
 
4
 
 
5
#include <kglobal.h>
 
6
#include <klocale.h>
 
7
 
 
8
namespace Arts {
 
9
        class SimpleMixerChannelGuiFactory_impl : virtual public SimpleMixerChannelGuiFactory_skel {
 
10
                public:
 
11
                        Widget createGui(Object object)
 
12
                        {
 
13
                                KGlobal::locale()->insertCatalogue( "artsmodules" );
 
14
                                arts_return_val_if_fail(!object.isNull(), Arts::Widget::null());
 
15
                                SimpleMixerChannel ch = DynamicCast(object);
 
16
                                arts_return_val_if_fail(!ch.isNull(), Arts::Widget::null());
 
17
 
 
18
                                Arts::LayoutBox vbox;
 
19
                                vbox.direction( Arts::TopToBottom );
 
20
 
 
21
                                Poti high;
 
22
                                high.caption(i18n("volume","high").utf8().data());
 
23
                                high.color("blue"); high.min(-12); high.max(12);
 
24
                                high.value(ch.equalizerLeft().high());
 
25
                                connect(high,"value_changed", ch.equalizerLeft(), "high");
 
26
                                connect(high,"value_changed", ch.equalizerRight(), "high");
 
27
                                vbox.addWidget( high );
 
28
 
 
29
                                Poti mid;
 
30
                                mid.caption(i18n("volume","mid").utf8().data());
 
31
                                mid.color("blue"); mid.min(-12); mid.max(12);
 
32
                                mid.value(ch.equalizerLeft().mid());
 
33
                                connect(mid,"value_changed", ch.equalizerLeft(), "mid");
 
34
                                connect(mid,"value_changed", ch.equalizerRight(), "mid");
 
35
                                vbox.addWidget( mid );
 
36
 
 
37
                                Poti low;
 
38
                                low.caption(i18n("volume","low").utf8().data());
 
39
                                low.color("blue"); low.min(-12); low.max(12);
 
40
                                low.value(ch.equalizerLeft().low());
 
41
                                connect(low,"value_changed", ch.equalizerLeft(), "low");
 
42
                                connect(low,"value_changed", ch.equalizerRight(), "low");
 
43
                                vbox.addWidget( low );
 
44
 
 
45
                                Poti frequency;
 
46
                                frequency.caption(i18n("frequency").utf8().data());
 
47
                                frequency.color("darkgreen"); frequency.min(200); frequency.max(10000);
 
48
                                frequency.value(ch.equalizerLeft().frequency());
 
49
                                frequency.logarithmic(2.0);
 
50
                                connect(frequency,"value_changed", ch.equalizerLeft(), "frequency");
 
51
                                connect(frequency,"value_changed", ch.equalizerRight(), "frequency");
 
52
                                vbox.addWidget( frequency );
 
53
 
 
54
                                Poti q;
 
55
                                q.caption(i18n( "q" ).utf8().data());
 
56
                                q.color("darkgreen"); q.min(0.01); q.max(10);
 
57
                                q.value(ch.equalizerLeft().q());
 
58
                                q.logarithmic(2.0);
 
59
                                connect(q,"value_changed", ch.equalizerLeft(), "q");
 
60
                                connect(q,"value_changed", ch.equalizerRight(), "q");
 
61
                                vbox.addWidget( q );
 
62
 
 
63
                                Poti pan;
 
64
                                pan.caption(i18n("pan").utf8().data());
 
65
                                pan.color("grey"); pan.min(-1.0); pan.max(1.0);
 
66
                                pan.value(ch.pan());
 
67
                                connect(pan,"value_changed",ch,"pan");
 
68
                                vbox.addWidget( pan );
 
69
 
 
70
                                Fader volume;
 
71
                                volume.caption(i18n("volume").utf8().data());
 
72
                                volume.color("red"); volume.min(0.01); volume.max(4);
 
73
                                volume.value(ch.volumeLeft());
 
74
                                connect(volume,"value_changed", ch, "volumeLeft");
 
75
                                connect(volume,"value_changed", ch, "volumeRight");
 
76
                                vbox.addWidget( volume );
 
77
 
 
78
                                return vbox;
 
79
                        }
 
80
        };
 
81
        REGISTER_IMPLEMENTATION(SimpleMixerChannelGuiFactory_impl);
 
82
}
 
83
 
 
84
 
 
85
// vim:ts=4:sw=4
 
86