summaryrefslogtreecommitdiffstats
path: root/arts/modules/effects/stereocompressorguifactory_impl.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2020-12-08 22:26:17 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2020-12-08 22:26:17 +0900
commitfce86b22a2367f1be1f9aae5e1ba3d18d1371b74 (patch)
tree707fe84fef0569a152e632ce1e16407f9d19a3d2 /arts/modules/effects/stereocompressorguifactory_impl.cpp
parent41fa1afc2c571b909acd0312e4eebb4a0b21e3c2 (diff)
downloadtdemultimedia-fce86b22a2367f1be1f9aae5e1ba3d18d1371b74.tar.gz
tdemultimedia-fce86b22a2367f1be1f9aae5e1ba3d18d1371b74.zip
Renaming of files in preparation for code style tools.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'arts/modules/effects/stereocompressorguifactory_impl.cpp')
-rw-r--r--arts/modules/effects/stereocompressorguifactory_impl.cpp111
1 files changed, 111 insertions, 0 deletions
diff --git a/arts/modules/effects/stereocompressorguifactory_impl.cpp b/arts/modules/effects/stereocompressorguifactory_impl.cpp
new file mode 100644
index 00000000..295ad65d
--- /dev/null
+++ b/arts/modules/effects/stereocompressorguifactory_impl.cpp
@@ -0,0 +1,111 @@
+/* This file is part of the KDE project
+ Copyright (C) 2002 Arnold Krille <arnold@arnoldarts.de>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License version 2 as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+
+*/
+
+#include <tdeglobal.h>
+#include <tdelocale.h>
+
+#include "artsmoduleseffects.h"
+#include "connect.h"
+#include "debug.h"
+
+using namespace Arts;
+
+namespace Arts {
+
+class StereoCompressorGuiFactory_impl : virtual public StereoCompressorGuiFactory_skel
+{
+public:
+ Widget createGui( Object object )
+ {
+ TDEGlobal::locale()->insertCatalogue( "artsmodules" );
+
+ arts_return_val_if_fail(!object.isNull(), Arts::Widget::null() );
+
+ Synth_STEREO_COMPRESSOR comp = DynamicCast(object);
+ arts_return_val_if_fail(!comp.isNull(), Arts::Widget::null());
+
+ Poti attack;
+ attack.caption(i18n("attack").utf8().data());
+ attack.color("blue");
+ attack.min(0.1); attack.max(250);
+ attack.value( comp.attack() );
+ attack.range(250);
+ connect( attack, "value_changed", comp, "attack" );
+
+ Poti release;
+ release.caption(i18n("release").utf8().data());
+ release.color("blue");
+ release.min(0.1); release.max(250);
+ release.value( comp.release() );
+ release.range(250);
+ connect( release, "value_changed", comp, "release" );
+
+ Poti threshold;
+ threshold.caption(i18n("thresh.").utf8().data());
+ threshold.min(0.00001); threshold.max(1);
+ threshold.value( comp.threshold() );
+ threshold.logarithmic( 2.0 );
+ threshold.range(200);
+ connect( threshold, "value_changed", comp, "threshold" );
+
+ Poti ratio;
+ ratio.caption(i18n("ratio").utf8().data());
+ ratio.min(0); ratio.max(1);
+ ratio.value( comp.ratio() );
+ ratio.range(200);
+ connect( ratio, "value_changed", comp, "ratio" );
+
+ Poti output;
+ output.caption(i18n("output").utf8().data());
+ output.min(0.1); output.max(10.0);
+ output.value( comp.output() );
+ output.logarithmic( 2.0 );
+ output.range(200);
+ connect( output, "value_changed", comp, "output" );
+
+ Button bon;
+ bon.text(i18n("Bypass").utf8().data());
+ bon.toggle( true );
+ connect( bon, "pressed_changed", comp, "thru" );
+
+ LayoutBox hbox;
+ hbox.direction( LeftToRight ); hbox.layoutmargin( 5 ); hbox.spacing( 5 );
+ PopupBox timesbox;
+ timesbox.name( "Timings" ); timesbox.direction( LeftToRight );
+ LayoutBox times;
+ times.direction( LeftToRight ); times.spacing( 5 );
+
+ hbox.addWidget( timesbox );
+ times.addSpace( 5 );
+ times.addWidget( attack );
+ times.addWidget( release );
+ times.addSpace( 5 );
+ timesbox.widget( times );
+ hbox.addWidget( threshold );
+ hbox.addWidget( ratio );
+ hbox.addWidget( output );
+ hbox.addWidget( bon );
+ hbox.addStretch( 10 );
+
+ return hbox;
+ }
+};
+REGISTER_IMPLEMENTATION(StereoCompressorGuiFactory_impl);
+
+}