~ubuntu-branches/ubuntu/hoary/kdemultimedia/hoary

« back to all changes in this revision

Viewing changes to arts/modules/freeverbguifactory_impl.cc

  • Committer: Bazaar Package Importer
  • Author(s): Martin Schulze
  • Date: 2003-01-22 15:00:51 UTC
  • Revision ID: james.westby@ubuntu.com-20030122150051-uihwkdoxf15mi1tn
Tags: upstream-2.2.2
ImportĀ upstreamĀ versionĀ 2.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
    /*
 
2
 
 
3
    Copyright (C) 2001 Stefan Westerfeld
 
4
                       stefan@space.twc.de
 
5
 
 
6
    This library is free software; you can redistribute it and/or
 
7
    modify it under the terms of the GNU Library General Public
 
8
    License as published by the Free Software Foundation; either
 
9
    version 2 of the License, or (at your option) any later version.
 
10
  
 
11
    This library is distributed in the hope that it will be useful,
 
12
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
14
    Library General Public License for more details.
 
15
   
 
16
    You should have received a copy of the GNU Library General Public License
 
17
    along with this library; see the file COPYING.LIB.  If not, write to
 
18
    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 
19
    Boston, MA 02111-1307, USA.
 
20
 
 
21
    */
 
22
 
 
23
#include "artsmodules.h"
 
24
#include "debug.h"
 
25
#include "connect.h"
 
26
 
 
27
using namespace std;
 
28
using namespace Arts;
 
29
 
 
30
namespace Arts {
 
31
 
 
32
class FreeverbGuiFactory_impl : public FreeverbGuiFactory_skel
 
33
{
 
34
public:
 
35
        Widget createGui(Object freeverb);
 
36
};
 
37
 
 
38
REGISTER_IMPLEMENTATION(FreeverbGuiFactory_impl);
 
39
 
 
40
};
 
41
 
 
42
Widget FreeverbGuiFactory_impl::createGui(Object object)
 
43
{
 
44
        arts_return_val_if_fail(!object.isNull(), Arts::Widget::null());
 
45
 
 
46
        Synth_FREEVERB freeverb = DynamicCast(object);
 
47
        arts_return_val_if_fail(!freeverb.isNull(), Arts::Widget::null());
 
48
 
 
49
        Widget panel;
 
50
        panel.width(330); panel.height(80); panel.show();
 
51
 
 
52
        Poti roomsize;
 
53
        roomsize.x(20); roomsize.y(10); roomsize.text("roomsize");
 
54
        roomsize.color("red"); roomsize.min(0); roomsize.max(1);
 
55
        roomsize.value(freeverb.roomsize());
 
56
        roomsize.parent(panel);
 
57
        roomsize.show();
 
58
        connect(roomsize,"value_changed", freeverb, "roomsize");
 
59
        panel._addChild(roomsize,"roomsizeWidget");
 
60
 
 
61
        Poti damp;
 
62
        damp.x(80); damp.y(10); damp.text("damp");
 
63
        damp.color("red"); damp.min(0); damp.max(1);
 
64
        damp.value(freeverb.damp());
 
65
        damp.parent(panel);
 
66
        damp.show();
 
67
        connect(damp,"value_changed", freeverb, "damp");
 
68
        panel._addChild(damp,"dampWidget");
 
69
 
 
70
        Poti wet;
 
71
        wet.x(140); wet.y(10); wet.text("wet");
 
72
        wet.color("red"); wet.min(0); wet.max(1);
 
73
        wet.value(freeverb.wet());
 
74
        wet.parent(panel);
 
75
        wet.show();
 
76
        connect(wet,"value_changed", freeverb, "wet");
 
77
        panel._addChild(wet,"wetWidget");
 
78
 
 
79
        Poti dry;
 
80
        dry.x(200); dry.y(10); dry.text("dry");
 
81
        dry.color("red"); dry.min(0); dry.max(1);
 
82
        dry.value(freeverb.dry());
 
83
        dry.parent(panel);
 
84
        dry.show();
 
85
        connect(dry,"value_changed", freeverb, "dry");
 
86
        panel._addChild(dry,"dryWidget");
 
87
 
 
88
        Poti width;
 
89
        width.x(260); width.y(10); width.text("width");
 
90
        width.color("red"); width.min(0); width.max(1);
 
91
        width.value(freeverb.width());
 
92
        width.parent(panel);
 
93
        width.show();
 
94
        connect(width,"value_changed", freeverb, "width");
 
95
        panel._addChild(width,"widthWidget");
 
96
 
 
97
        return panel;
 
98
}