| 1 | /* Copyright 2013 Kjetil S. Matheussen |
| 2 | |
| 3 | This program is free software; you can redistribute it and/or |
| 4 | modify it under the terms of the GNU General Public License |
| 5 | as published by the Free Software Foundation; either version 2 |
| 6 | of the License, or (at your option) any later version. |
| 7 | |
| 8 | This program is distributed in the hope that it will be useful, |
| 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | GNU General Public License for more details. |
| 12 | |
| 13 | You should have received a copy of the GNU General Public License |
| 14 | along with this program; if not, write to the Free Software |
| 15 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ |
| 16 | |
| 17 | #include <stdio.h> |
| 18 | |
| 19 | #include "Qt_compressor_widget.h"cxx . . $ `<file>/Qt/Qt_compressor_widget.h`/ |
| 20 | |
| 21 | #include <QPainter> |
| 22 | #include <QMouseEvent> |
| 23 | #include <QTimer> |
| 24 | #include <QFileDialog> |
| 25 | #include <QMessageBox> |
| 26 | |
| 27 | #define INCLUDE_MYLINE_AND_MYRECTcxx . . $ `Qt/Qt_compressor_widget_callbacks.h:27:9`! 1 |
| 28 | # include "compressor_vertical_sliders.cpp"cxx . . $ `<file>/Qt/compressor_vertical_sliders.cpp`/ |
| 29 | #undef INCLUDE_MYLINE_AND_MYRECTcxx . . $ `Qt/Qt_compressor_widget_callbacks.h:27:9`! |
| 30 | |
| 31 | namespace cvscxx . . $ cvs/{ |
| 32 | |
| 33 | struct MyColorcxx . . $ cvs/MyColor#{ |
| 34 | QColorcxx . . $ QColor# colcxx . . $ cvs/MyColor#col.; |
| 35 | MyColorcxx . . $ cvs/MyColor#MyColor(b1146eedae1e1d0b).(int r,int g,int b) |
| 36 | : colcxx . . $ cvs/MyColor#col.(r,g,b) |
| 37 | {} |
| 38 | |
| 39 | MyColorcxx . . $ cvs/MyColor#MyColor(406700690822ecf).(QColorcxx . . $ QColor# col) |
| 40 | : colcxx . . $ cvs/MyColor#col.(col) |
| 41 | {} |
| 42 | |
| 43 | MyColorcxx . . $ cvs/MyColor#MyColor(d4f767463ce0a6b3).(int colnum) |
| 44 | #ifdef COMPILING_RADIUM |
| 45 | : col(static_cast<EditorWidget*>(root->song->tracker_windows->os_visual.widget)->colors[colnum]) |
| 46 | #else |
| 47 | : colcxx . . $ cvs/MyColor#col.(g_colorscxx . . $ g_colors.[colnum]) |
| 48 | #endif |
| 49 | {} |
| 50 | |
| 51 | MyColorcxx . . $ cvs/MyColor#MyColor(49f6e7a06ebc5aa8).() |
| 52 | #ifdef COMPILING_RADIUM |
| 53 | : col(static_cast<EditorWidget*>(root->song->tracker_windows->os_visual.widget)->colors[11]) |
| 54 | #else |
| 55 | : colcxx . . $ cvs/MyColor#col.(g_colorscxx . . $ g_colors.[11]) |
| 56 | #endif |
| 57 | {} |
| 58 | |
| 59 | MyColorcxx . . $ cvs/MyColor# lightercxx . . $ cvs/MyColor#lighter(372ef7c421a52c36).(int p){ |
| 60 | return MyColorcxx . . $ cvs/MyColor#(colcxx . . $ cvs/MyColor#col..lightcxx . . $ QColor#light(a312dab4e0811e0).(80)); |
| 61 | } |
| 62 | |
| 63 | MyColorcxx . . $ cvs/MyColor# darkercxx . . $ cvs/MyColor#darker(372ef7c421a52c36).(int p){ |
| 64 | return MyColorcxx . . $ cvs/MyColor#(colcxx . . $ cvs/MyColor#col..lightcxx . . $ QColor#light(a312dab4e0811e0).(80)); |
| 65 | } |
| 66 | |
| 67 | void setAlphacxx . . $ cvs/MyColor#setAlpha(d4f767463ce0a6b3).(int a){ |
| 68 | colcxx . . $ cvs/MyColor#col..setAlphacxx . . $ QColor#setAlpha(d4f767463ce0a6b3).(a); |
| 69 | } |
| 70 | }; |
| 71 | |
| 72 | static inline MyColorcxx . . $ cvs/MyColor# mix_colorscxx . . $ cvs/mix_colors(5beb090e9530825b).(const MyColorcxx . . $ cvs/MyColor# &c1, const MyColorcxx . . $ cvs/MyColor# &c2, float how_much){ |
| 73 | return MyColorcxx . . $ cvs/MyColor#(mix_colorscxx . . $ mix_colors(79a36d4b1e5ae7b0).(c1.colcxx . . $ cvs/MyColor#col.,c2.colcxx . . $ cvs/MyColor#col.,how_much)); |
| 74 | } |
| 75 | |
| 76 | struct MyImagecxx . . $ cvs/MyImage#{ |
| 77 | QImagecxx . . $ QImage# imagecxx . . $ cvs/MyImage#image.; |
| 78 | QPaintercxx . . $ QPainter# qpcxx . . $ cvs/MyImage#qp.; |
| 79 | MyImagecxx . . $ cvs/MyImage#MyImage(3e454b8ccf442868).(int width,int height) |
| 80 | : imagecxx . . $ cvs/MyImage#image.(width,height,QImagecxx . . $ QImage#::Format_RGB32cxx . . $ QImage#Format_RGB32.) |
| 81 | , qpcxx . . $ cvs/MyImage#qp.(&imagecxx . . $ cvs/MyImage#image.) |
| 82 | { |
| 83 | } |
| 84 | }; |
| 85 | |
| 86 | struct MyPaintercxx . . $ cvs/MyPainter#{ |
| 87 | QPaintercxx . . $ QPainter# *pcxx . . $ cvs/MyPainter#p.; |
| 88 | MyColorcxx . . $ cvs/MyColor# colcxx . . $ cvs/MyPainter#col.; |
| 89 | QPencxx . . $ QPen# pencxx . . $ cvs/MyPainter#pen.; |
| 90 | QLinearGradientcxx . . $ QLinearGradient# gradientcxx . . $ cvs/MyPainter#gradient.; |
| 91 | bool use_gradientcxx . . $ cvs/MyPainter#use_gradient.; |
| 92 | int _thicknesscxx . . $ cvs/MyPainter#_thickness.; |
| 93 | |
| 94 | MyPaintercxx . . $ cvs/MyPainter#MyPainter(c81d535d1ac9d52).(QPaintercxx . . $ QPainter# *p) |
| 95 | : pcxx . . $ cvs/MyPainter#p.(p) |
| 96 | , use_gradientcxx . . $ cvs/MyPainter#use_gradient.(false) |
| 97 | , _thicknesscxx . . $ cvs/MyPainter#_thickness.(1) |
| 98 | { |
| 99 | p->setPencxx . . $ QPainter#setPen(af0a25dfda3214db).(pencxx . . $ cvs/MyPainter#pen.); |
| 100 | } |
| 101 | |
| 102 | MyPaintercxx . . $ cvs/MyPainter#MyPainter(8a04056369b6c38d).(MyImagecxx . . $ cvs/MyImage# *image) |
| 103 | : pcxx . . $ cvs/MyPainter#p.(&image->qpcxx . . $ cvs/MyImage#qp.) |
| 104 | , use_gradientcxx . . $ cvs/MyPainter#use_gradient.(false) |
| 105 | , _thicknesscxx . . $ cvs/MyPainter#_thickness.(1) |
| 106 | { |
| 107 | pcxx . . $ cvs/MyPainter#p.->setPencxx . . $ QPainter#setPen(af0a25dfda3214db).(pencxx . . $ cvs/MyPainter#pen.); |
| 108 | } |
| 109 | |
| 110 | void setGradientcxx . . $ cvs/MyPainter#setGradient(41cb549beba415bb).(int x1, int y1, int x2, int y2, const MyColorcxx . . $ cvs/MyColor# &c1, const MyColorcxx . . $ cvs/MyColor# &c2){ |
| 111 | gradientcxx . . $ cvs/MyPainter#gradient. =cxx . . $ QLinearGradient#`operator=`(b0ffb83354d62bd2). QLinearGradientcxx . . $ QLinearGradient#QLinearGradient(52a61fa14d44b641).(x1,y1,x2,y2); |
| 112 | gradientcxx . . $ cvs/MyPainter#gradient..setColorAtcxx . . $ QGradient#setColorAt(e8a5895791b6fa8c).(0,c1.colcxx . . $ cvs/MyColor#col.); |
| 113 | gradientcxx . . $ cvs/MyPainter#gradient..setColorAtcxx . . $ QGradient#setColorAt(e8a5895791b6fa8c).(1,c2.colcxx . . $ cvs/MyColor#col.); |
| 114 | pcxx . . $ cvs/MyPainter#p.->setPencxx . . $ QPainter#setPen(af0a25dfda3214db).(QPencxx . . $ QPen#QPen(c1f9b1cc0228302b).(QBrushcxx . . $ QBrush#QBrush(cbd511d3bf8d464c).(gradientcxx . . $ cvs/MyPainter#gradient.),_thicknesscxx . . $ cvs/MyPainter#_thickness.)); |
| 115 | use_gradientcxx . . $ cvs/MyPainter#use_gradient. = true; |
| 116 | } |
| 117 | |
| 118 | void unsetGradientcxx . . $ cvs/MyPainter#unsetGradient(49f6e7a06ebc5aa8).(){ |
| 119 | use_gradientcxx . . $ cvs/MyPainter#use_gradient.=false; |
| 120 | } |
| 121 | |
| 122 | void drawImagecxx . . $ cvs/MyPainter#drawImage(a5a6dd23101862a1).(int x,int y,MyImagecxx . . $ cvs/MyImage# *image){ |
| 123 | pcxx . . $ cvs/MyPainter#p.->drawImagecxx . . $ QPainter#drawImage(24e2182690a926fc).(x,y,image->imagecxx . . $ cvs/MyImage#image.); |
| 124 | } |
| 125 | |
| 126 | void drawRectcxx . . $ cvs/MyPainter#drawRect(8d721085ee12c0d8).(const int x1,const int y1,const int x2,const int y2, const MyColorcxx . . $ cvs/MyColor# &col){ |
| 127 | if(use_gradientcxx . . $ cvs/MyPainter#use_gradient.==false){ |
| 128 | pencxx . . $ cvs/MyPainter#pen..setColorcxx . . $ QPen#setColor(129a55e114526ad3).(col.colcxx . . $ cvs/MyColor#col.); |
| 129 | pcxx . . $ cvs/MyPainter#p.->setPencxx . . $ QPainter#setPen(af0a25dfda3214db).(pencxx . . $ cvs/MyPainter#pen.); |
| 130 | } |
| 131 | pcxx . . $ cvs/MyPainter#p.->drawRectcxx . . $ QPainter#drawRect(748afa4755bc9595).(x1,y1,x2-x1,y2-y1); |
| 132 | } |
| 133 | void drawRectcxx . . $ cvs/MyPainter#drawRect(20f4596baf7dbac).(const MyRect &rect,const MyColorcxx . . $ cvs/MyColor# &col){ |
| 134 | drawRectcxx . . $ cvs/MyPainter#drawRect(8d721085ee12c0d8).(rect.x1,rect.y1,rect.x2,rect.y2,col); |
| 135 | } |
| 136 | |
| 137 | |
| 138 | void fillRectcxx . . $ cvs/MyPainter#fillRect(8d721085ee12c0d8).(const int x1,const int y1,const int x2,const int y2, const MyColorcxx . . $ cvs/MyColor# &col){ |
| 139 | if(use_gradientcxx . . $ cvs/MyPainter#use_gradient.==false) |
| 140 | pcxx . . $ cvs/MyPainter#p.->fillRectcxx . . $ QPainter#fillRect(b6f7dd7f1bbb6c84).(x1,y1,x2-x1,y2-y1,col.colcxx . . $ cvs/MyColor#col.); |
| 141 | else |
| 142 | pcxx . . $ cvs/MyPainter#p.->fillRectcxx . . $ QPainter#fillRect(ff2dfc9476cb4488).(x1,y1,x2-x1,y2-y1,QBrushcxx . . $ QBrush#QBrush(cbd511d3bf8d464c).(gradientcxx . . $ cvs/MyPainter#gradient.)); |
| 143 | } |
| 144 | |
| 145 | void fillRectcxx . . $ cvs/MyPainter#fillRect(20f4596baf7dbac).(const MyRect &rect,const MyColorcxx . . $ cvs/MyColor# &col){ |
| 146 | fillRectcxx . . $ cvs/MyPainter#fillRect(8d721085ee12c0d8).(rect.x1,rect.y1,rect.x2,rect.y2,col); |
| 147 | } |
| 148 | |
| 149 | void setThicknesscxx . . $ cvs/MyPainter#setThickness(d4f767463ce0a6b3).(int thickness){ |
| 150 | _thicknesscxx . . $ cvs/MyPainter#_thickness.=thickness; |
| 151 | pencxx . . $ cvs/MyPainter#pen..setWidthcxx . . $ QPen#setWidth(d4f767463ce0a6b3).(thickness); |
| 152 | } |
| 153 | |
| 154 | void drawLinecxx . . $ cvs/MyPainter#drawLine(8d721085ee12c0d8).(const int x1,const int y1,const int x2,const int y2, const MyColorcxx . . $ cvs/MyColor# &col){ |
| 155 | if(use_gradientcxx . . $ cvs/MyPainter#use_gradient.==false){ |
| 156 | pencxx . . $ cvs/MyPainter#pen..setColorcxx . . $ QPen#setColor(129a55e114526ad3).(col.colcxx . . $ cvs/MyColor#col.); |
| 157 | pcxx . . $ cvs/MyPainter#p.->setPencxx . . $ QPainter#setPen(af0a25dfda3214db).(pencxx . . $ cvs/MyPainter#pen.); |
| 158 | } |
| 159 | |
| 160 | bool anti = x1!=x2 && y1!=y2; |
| 161 | |
| 162 | if(anti) |
| 163 | pcxx . . $ cvs/MyPainter#p.->setRenderHintscxx . . $ QPainter#setRenderHints(686c9363a780b925).(QPaintercxx . . $ QFlags#QFlags(93d577a3e9528307).::Antialiasingcxx . . $ QPainter#Antialiasing.,true); |
| 164 | |
| 165 | pcxx . . $ cvs/MyPainter#p.->drawLinecxx . . $ QPainter#drawLine(748afa4755bc9595).(x1,y1,x2,y2); |
| 166 | |
| 167 | if(anti) |
| 168 | pcxx . . $ cvs/MyPainter#p.->setRenderHintscxx . . $ QPainter#setRenderHints(686c9363a780b925).(QPaintercxx . . $ QFlags#QFlags(93d577a3e9528307).::Antialiasingcxx . . $ QPainter#Antialiasing.,false); |
| 169 | } |
| 170 | |
| 171 | void drawLinecxx . . $ cvs/MyPainter#drawLine(51253c7414724c0b).(const MyLine &l, const MyColorcxx . . $ cvs/MyColor# &col){ |
| 172 | drawLinecxx . . $ cvs/MyPainter#drawLine(8d721085ee12c0d8).(l.x1,l.y1,l.x2,l.y2, col); |
| 173 | } |
| 174 | |
| 175 | int getTextWidthcxx . . $ cvs/MyPainter#getTextWidth(89800cbf2a9b278f).(stdcxx . . $ std/::stringcxx . . $ std/string# text){ |
| 176 | const QFontMetricscxx . . $ QFontMetrics# fn = QFontMetricscxx . . $ QFontMetrics#QFontMetrics(d0a4bd0c8524b912).(QFontcxx . . $ QFont#QFont(49f6e7a06ebc5aa8).()); |
| 177 | return fn.widthcxx . . $ QFontMetrics#width(91f46685ef4c12b5).(QStringcxx . . $ QString#::fromStdStringcxx . . $ QString#fromStdString(24a2e9bdf24626eb).(text)); |
| 178 | } |
| 179 | |
| 180 | void drawTextcxx . . $ cvs/MyPainter#drawText(6615cf30cb3ea5f3).(const MyRect &rect, stdcxx . . $ std/::stringcxx . . $ std/string# text, const MyColorcxx . . $ cvs/MyColor# &col){ |
| 181 | if(use_gradientcxx . . $ cvs/MyPainter#use_gradient.==false){ |
| 182 | pencxx . . $ cvs/MyPainter#pen..setColorcxx . . $ QPen#setColor(129a55e114526ad3).(col.colcxx . . $ cvs/MyColor#col.); |
| 183 | pcxx . . $ cvs/MyPainter#p.->setPencxx . . $ QPainter#setPen(af0a25dfda3214db).(pencxx . . $ cvs/MyPainter#pen.); |
| 184 | } |
| 185 | |
| 186 | pcxx . . $ cvs/MyPainter#p.->drawTextcxx . . $ QPainter#drawText(26e93c81cbf08633).(rect.x1,rect.y1,rect.width(),rect.height(), |
| 187 | Qtcxx . . $ Qt/::AlignTopcxx . . $ Qt/AlignTop.|cxx . . $ Qt/`operator|`(6ff00bf3a2570bcb).Qtcxx . . $ Qt/::AlignLeftcxx . . $ Qt/AlignLeft., |
| 188 | QStringcxx . . $ QString#::fromStdStringcxx . . $ QString#fromStdString(24a2e9bdf24626eb).(text)); |
| 189 | } |
| 190 | |
| 191 | void drawVerticalTextcxx . . $ cvs/MyPainter#drawVerticalText(6a04f36f6088565a).(int x, int y, stdcxx . . $ std/::stringcxx . . $ std/string# text, const MyColorcxx . . $ cvs/MyColor# &col){ |
| 192 | if(use_gradientcxx . . $ cvs/MyPainter#use_gradient.==false){ |
| 193 | pencxx . . $ cvs/MyPainter#pen..setColorcxx . . $ QPen#setColor(129a55e114526ad3).(col.colcxx . . $ cvs/MyColor#col.); |
| 194 | pcxx . . $ cvs/MyPainter#p.->setPencxx . . $ QPainter#setPen(af0a25dfda3214db).(pencxx . . $ cvs/MyPainter#pen.); |
| 195 | } |
| 196 | pcxx . . $ cvs/MyPainter#p.->savecxx . . $ QPainter#save(49f6e7a06ebc5aa8).(); |
| 197 | QPointcxx . . $ QPoint# pointcxx . . $ QPoint#QPoint(3e454b8ccf442868).(x,y); |
| 198 | pcxx . . $ cvs/MyPainter#p.->translatecxx . . $ QPainter#translate(bc12c9ec15586e6a).(x,0);//point);//x, y); |
| 199 | pcxx . . $ cvs/MyPainter#p.->rotatecxx . . $ QPainter#rotate(ba8836b59fb42830).(90); // or 270 |
| 200 | //p->scale((box.x2-box.x1)/12,1.0); |
| 201 | //point = p->xFormDev(point); |
| 202 | pcxx . . $ cvs/MyPainter#p.->drawTextcxx . . $ QPainter#drawText(c89d651b24440698).(5,-5,QStringcxx . . $ QString#::fromStdStringcxx . . $ QString#fromStdString(24a2e9bdf24626eb).(text)); |
| 203 | pcxx . . $ cvs/MyPainter#p.->restorecxx . . $ QPainter#restore(49f6e7a06ebc5aa8).(); |
| 204 | } |
| 205 | }; |
| 206 | |
| 207 | struct MyWidgetcxx . . $ cvs/MyWidget#{ |
| 208 | struct MyQWidgetcxx . . $ cvs/MyWidget#MyQWidget# : public QWidgetcxx . . $ QWidget#{ |
| 209 | |
| 210 | MyWidgetcxx . . $ cvs/MyWidget# *mywidgetcxx . . $ cvs/MyWidget#MyQWidget#mywidget.; |
| 211 | MyQWidgetcxx . . $ cvs/MyWidget#MyQWidget#MyQWidget(ed38ac614ce8e55b).(QWidgetcxx . . $ QWidget# *parent, MyWidgetcxx . . $ cvs/MyWidget# *mywidget) : QWidgetcxx . . $ QWidget#QWidget(872e7b0c281abd8d).(parent),mywidgetcxx . . $ cvs/MyWidget#MyQWidget#mywidget.(mywidget){ |
| 212 | } |
| 213 | |
| 214 | void mousePressEventcxx . . $ cvs/MyWidget#MyQWidget#mousePressEvent(702858a82d06265c). ( QMouseEventcxx . . $ QMouseEvent# * event ){ |
| 215 | if(mywidgetcxx . . $ cvs/MyWidget#MyQWidget#mywidget.->mousePresscxx . . $ cvs/MyWidget#mousePress(cf9ef193275fa6d8).(event->xcxx . . $ QMouseEvent#x(455f465bc33b4cdf).(),event->ycxx . . $ QMouseEvent#y(455f465bc33b4cdf).())) |
| 216 | event->acceptcxx . . $ QEvent#accept(49f6e7a06ebc5aa8).(); |
| 217 | } |
| 218 | void mouseMoveEventcxx . . $ cvs/MyWidget#MyQWidget#mouseMoveEvent(702858a82d06265c). ( QMouseEventcxx . . $ QMouseEvent# * event ){ |
| 219 | if(mywidgetcxx . . $ cvs/MyWidget#MyQWidget#mywidget.->mouseMovecxx . . $ cvs/MyWidget#mouseMove(cf9ef193275fa6d8).(event->xcxx . . $ QMouseEvent#x(455f465bc33b4cdf).(),event->ycxx . . $ QMouseEvent#y(455f465bc33b4cdf).())) |
| 220 | event->acceptcxx . . $ QEvent#accept(49f6e7a06ebc5aa8).(); |
| 221 | } |
| 222 | void mouseReleaseEventcxx . . $ cvs/MyWidget#MyQWidget#mouseReleaseEvent(702858a82d06265c). ( QMouseEventcxx . . $ QMouseEvent# * event ){ |
| 223 | if(mywidgetcxx . . $ cvs/MyWidget#MyQWidget#mywidget.->mouseReleasecxx . . $ cvs/MyWidget#mouseRelease(cf9ef193275fa6d8).(event->xcxx . . $ QMouseEvent#x(455f465bc33b4cdf).(),event->ycxx . . $ QMouseEvent#y(455f465bc33b4cdf).())) |
| 224 | event->acceptcxx . . $ QEvent#accept(49f6e7a06ebc5aa8).(); |
| 225 | } |
| 226 | |
| 227 | void paintEventcxx . . $ cvs/MyWidget#MyQWidget#paintEvent(f239c9e85d61a220). ( QPaintEventcxx . . $ QPaintEvent# * ev ){ |
| 228 | QPaintercxx . . $ QPainter# qpcxx . . $ QPainter#QPainter(dd2eedc069b0ab5f).(this); |
| 229 | MyPaintercxx . . $ cvs/MyPainter# pcxx . . $ cvs/MyPainter#MyPainter(c81d535d1ac9d52).(&qp); |
| 230 | mywidgetcxx . . $ cvs/MyWidget#MyQWidget#mywidget.->repaintcxx . . $ cvs/MyWidget#repaint(4c1e117cfdeab271).(&p); |
| 231 | } |
| 232 | |
| 233 | virtual void resizeEventcxx . . $ cvs/MyWidget#MyQWidget#resizeEvent(eeeec21cf8dc0387). ( QResizeEventcxx . . $ QResizeEvent# * event ){ |
| 234 | mywidgetcxx . . $ cvs/MyWidget#MyQWidget#mywidget.->resizedcxx . . $ cvs/MyWidget#resized(49f6e7a06ebc5aa8).(); |
| 235 | } |
| 236 | }; |
| 237 | |
| 238 | MyQWidgetcxx . . $ cvs/MyWidget#MyQWidget# wcxx . . $ cvs/MyWidget#w.; |
| 239 | |
| 240 | MyWidgetcxx . . $ cvs/MyWidget#MyWidget(5d22bdacc48458e8).(void *parent) |
| 241 | : wcxx . . $ cvs/MyWidget#w.(static_cast<QWidgetcxx . . $ QWidget#*>(parent),this) |
| 242 | {} |
| 243 | |
| 244 | void updatecxx . . $ cvs/MyWidget#update(748afa4755bc9595).(int x1,int y1,int x2,int y2){ |
| 245 | wcxx . . $ cvs/MyWidget#w..updatecxx . . $ QWidget#update(748afa4755bc9595).(x1,y1,x2-x1,y2-y1); |
| 246 | } |
| 247 | void updatecxx . . $ cvs/MyWidget#update(73afc3747a524c7b).(const MyRect &r){ |
| 248 | updatecxx . . $ cvs/MyWidget#update(748afa4755bc9595).(r.x1,r.y1,r.x2,r.y2); |
| 249 | } |
| 250 | |
| 251 | void updatecxx . . $ cvs/MyWidget#update(49f6e7a06ebc5aa8).(){ |
| 252 | wcxx . . $ cvs/MyWidget#w..updatecxx . . $ QWidget#update(49f6e7a06ebc5aa8).(); |
| 253 | } |
| 254 | |
| 255 | int widthcxx . . $ cvs/MyWidget#width(b126dc7c1de90089).(){return wcxx . . $ cvs/MyWidget#w..widthcxx . . $ QWidget#width(455f465bc33b4cdf).();} |
| 256 | int heightcxx . . $ cvs/MyWidget#height(b126dc7c1de90089).(){return wcxx . . $ cvs/MyWidget#w..heightcxx . . $ QWidget#height(455f465bc33b4cdf).();} |
| 257 | |
| 258 | bool isVisiblecxx . . $ cvs/MyWidget#isVisible(c9857a73d68e59ba).(){return wcxx . . $ cvs/MyWidget#w..isVisiblecxx . . $ QWidget#isVisible(50ce9a9e25b4a850).();} |
| 259 | bool isEnabledcxx . . $ cvs/MyWidget#isEnabled(c9857a73d68e59ba).(){ |
| 260 | //printf("w is %s\n",w.isEnabled()?"enabled":"disabled"); |
| 261 | return wcxx . . $ cvs/MyWidget#w..isEnabledcxx . . $ QWidget#isEnabled(50ce9a9e25b4a850).(); |
| 262 | } |
| 263 | |
| 264 | virtual void resizedcxx . . $ cvs/MyWidget#resized(49f6e7a06ebc5aa8).() = 0; |
| 265 | |
| 266 | //virtual void repaint(MyPainter *p){} |
| 267 | virtual void repaintcxx . . $ cvs/MyWidget#repaint(4c1e117cfdeab271).(MyPaintercxx . . $ cvs/MyPainter# *p) = 0; |
| 268 | |
| 269 | virtual bool mousePresscxx . . $ cvs/MyWidget#mousePress(cf9ef193275fa6d8).(int x, int y) = 0; |
| 270 | |
| 271 | virtual bool mouseMovecxx . . $ cvs/MyWidget#mouseMove(cf9ef193275fa6d8).(int x, int y) = 0; |
| 272 | |
| 273 | virtual bool mouseReleasecxx . . $ cvs/MyWidget#mouseRelease(cf9ef193275fa6d8).(int x, int y) = 0; |
| 274 | }; |
| 275 | |
| 276 | struct MyTimercxx . . $ cvs/MyTimer#{ |
| 277 | |
| 278 | struct MyQTimercxx . . $ cvs/MyTimer#MyQTimer# : public QTimercxx . . $ QTimer#{ |
| 279 | MyTimercxx . . $ cvs/MyTimer# *mytimercxx . . $ cvs/MyTimer#MyQTimer#mytimer.; |
| 280 | |
| 281 | MyQTimercxx . . $ cvs/MyTimer#MyQTimer#MyQTimer(a4e3c1a0d487e1ff).(MyTimercxx . . $ cvs/MyTimer# *mytimer) : mytimercxx . . $ cvs/MyTimer#MyQTimer#mytimer.(mytimer) {} |
| 282 | |
| 283 | void timerEventcxx . . $ cvs/MyTimer#MyQTimer#timerEvent(b9e57d1150f23bf5).(QTimerEventcxx . . $ QTimerEvent# * e){ // virtual method from QTimer |
| 284 | mytimercxx . . $ cvs/MyTimer#MyQTimer#mytimer.->timercxx . . $ cvs/MyTimer#timer(49f6e7a06ebc5aa8).(); |
| 285 | } |
| 286 | }; |
| 287 | |
| 288 | MyQTimercxx . . $ cvs/MyTimer#MyQTimer# qtimercxx . . $ cvs/MyTimer#qtimer.; |
| 289 | |
| 290 | MyTimercxx . . $ cvs/MyTimer#MyTimer(49f6e7a06ebc5aa8).() : qtimercxx . . $ cvs/MyTimer#qtimer.(this) {} |
| 291 | |
| 292 | virtual void timercxx . . $ cvs/MyTimer#timer(49f6e7a06ebc5aa8).() = 0; |
| 293 | |
| 294 | void startTimercxx . . $ cvs/MyTimer#startTimer(d4f767463ce0a6b3).(int interval_in_milliseconds){ |
| 295 | qtimercxx . . $ cvs/MyTimer#qtimer..setIntervalcxx . . $ QTimer#setInterval(d4f767463ce0a6b3).(interval_in_milliseconds); |
| 296 | qtimercxx . . $ cvs/MyTimer#qtimer..startcxx . . $ QTimer#start(49f6e7a06ebc5aa8).(); |
| 297 | } |
| 298 | }; |
| 299 | |
| 300 | } // namespace cvs |
| 301 | |
| 302 | |
| 303 | |
| 304 | #include "../audio/system_compressor_wrapper_proc.h"cxx . . $ `<file>/audio/system_compressor_wrapper_proc.h`/ |
| 305 | |
| 306 | |
| 307 | #ifdef COMPILING_RADIUM |
| 308 | |
| 309 | // I'm pretty sure it's not necessary to test for plugin!=NULL in these three functons. |
| 310 | // Normally, I'm 100% sure it's safe, but these functions can also be called from a timer. |
| 311 | // |
| 312 | static void set_compressor_parameter(struct Patch *patch, int num,float value){ |
| 313 | SoundPlugin *plugin = (SoundPlugin*)patch->patchdata; |
| 314 | if(plugin!=NULL) |
| 315 | PLUGIN_set_effect_value(plugin, 0, plugin->type->num_effects+EFFNUM_COMP_RATIO+num, value, PLUGIN_NONSTORED_TYPE, PLUGIN_STORE_VALUE); |
| 316 | } |
| 317 | |
| 318 | #else // COMPILING_RADIUM |
| 319 | |
| 320 | static void set_compressor_parametercxx . . $ set_compressor_parameter(11a1b181ddb9d33c).(struct Patchcxx . . $ Patch# *patch, int num,float value){ |
| 321 | SoundPlugin *plugin = (SoundPlugin*)patch->patchdatacxx . . $ Patch#patchdata.; |
| 322 | if(plugin!=NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) |
| 323 | COMPRESSOR_set_parameter(plugin->compressorcxx . . $ SoundPlugin#compressor.,num,value); |
| 324 | } |
| 325 | |
| 326 | #endif // #else COMPILING_RADIUM |
| 327 | |
| 328 | static float get_compressor_parametercxx . . $ get_compressor_parameter(93d36f247079c9cd).(struct Patchcxx . . $ Patch# *patch, int num){ |
| 329 | SoundPlugin *plugin = (SoundPlugin*)patch->patchdatacxx . . $ Patch#patchdata.; |
| 330 | if(plugin!=NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) |
| 331 | return COMPRESSOR_get_parameter(plugin->compressorcxx . . $ SoundPlugin#compressor.,num); |
| 332 | else |
| 333 | return 0.0f; |
| 334 | } |
| 335 | |
| 336 | static float get_graph_valuecxx . . $ get_graph_value(93d36f247079c9cd).(struct Patchcxx . . $ Patch# *patch, int num){ |
| 337 | SoundPlugin *plugin = (SoundPlugin*)patch->patchdatacxx . . $ Patch#patchdata.; |
| 338 | if(plugin!=NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) |
| 339 | return COMPRESSOR_get_graph_value(plugin->compressorcxx . . $ SoundPlugin#compressor.,num); |
| 340 | else |
| 341 | return 0.0; |
| 342 | } |
| 343 | |
| 344 | |
| 345 | //#ifdef COMPILING_RADIUM |
| 346 | //namespace radium_comp{ // got an error trying to use anonymous namespace here. |
| 347 | //#endif |
| 348 | |
| 349 | |
| 350 | #include "compressor_vertical_sliders.cpp"cxx . . $ `<file>/Qt/compressor_vertical_sliders.cpp`/ |
| 351 | |
| 352 | |
| 353 | static double OS_get_double_from_stringcxx . . $ OS_get_double_from_string(9a18bdb0e56c1bc2).(const char *s){ |
| 354 | QLocalecxx . . $ QLocale#::setDefaultcxx . . $ QLocale#setDefault(5c1b5ae6bc7ef6b4).(QLocalecxx . . $ QLocale#QLocale(a0465d0afca1f93d).::Ccxx . . $ QLocale#C.); |
| 355 | QStringcxx . . $ QString# stringcxx . . $ QString#QString(85c52e162fed56f9).(s); |
| 356 | return string.toDoublecxx . . $ QString#toDouble(1bd8e57dd4a29c14).(); |
| 357 | } |
| 358 | |
| 359 | static float read_floatcxx . . $ read_float(4b932ce4af91b5e4).(FILEcxx . . $ FILE# *file){ |
| 360 | char temp[512] = {0}; |
| 361 | |
| 362 | fgets(temp,500,file); |
| 363 | |
| 364 | return OS_get_double_from_stringcxx . . $ OS_get_double_from_string(9a18bdb0e56c1bc2).(temp); |
| 365 | } |
| 366 | |
| 367 | |
| 368 | class Compressor_widgetcxx . . $ Compressor_widget# : public QWidgetcxx . . $ QWidget#, public Uicxx . . $ Ui/::Compressor_widgetcxx . . $ Ui/Compressor_widget#{ |
| 369 | Q_OBJECTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:170:9`! |
| 370 | |
| 371 | public: |
| 372 | bool initingcxx . . $ Compressor_widget#initing.; |
| 373 | cvscxx . . $ cvs/::Compcxx . . $ cvs/Comp# *compcxx . . $ Compressor_widget#comp.; |
| 374 | struct Patchcxx . . $ Patch# *_patchcxx . . $ Compressor_widget#_patch.; |
| 375 | |
| 376 | Compressor_widgetcxx . . $ Compressor_widget#Compressor_widget(1ca34c841ca366a4).(struct Patchcxx . . $ Patch# *patch, QWidgetcxx . . $ QWidget# *parent=NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) |
| 377 | : QWidgetcxx . . $ QWidget#QWidget(872e7b0c281abd8d).(parent) |
| 378 | , _patchcxx . . $ Compressor_widget#_patch.(patch) |
| 379 | { |
| 380 | initingcxx . . $ Compressor_widget#initing. = true; |
| 381 | setupUicxx . . $ Ui_Compressor_widget#setupUi(108f35f7aa7f3cf9).(this); |
| 382 | |
| 383 | QWidgetcxx . . $ QWidget# *parent_for_comp = this; |
| 384 | compcxx . . $ Compressor_widget#comp. = new cvscxx . . $ cvs/::Compcxx . . $ cvs/Comp#(patch,parent_for_comp); |
| 385 | |
| 386 | #ifdef COMPILING_RADIUM |
| 387 | comp->w.setEnabled(false); |
| 388 | #else |
| 389 | attack_slidercxx . . $ Ui_Compressor_widget#attack_slider.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 390 | release_slidercxx . . $ Ui_Compressor_widget#release_slider.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 391 | enable_checkboxcxx . . $ Ui_Compressor_widget#enable_checkbox.->setVisiblecxx . . $ QWidget#setVisible(b45ddcbc8423892c).(false); |
| 392 | #endif |
| 393 | verticalLayoutcxx . . $ Ui_Compressor_widget#verticalLayout.->insertWidgetcxx . . $ QBoxLayout#insertWidget(7be466a1409c23e).(1,&compcxx . . $ Compressor_widget#comp.->wcxx . . $ cvs/MyWidget#w.); |
| 394 | |
| 395 | #ifdef COMPILING_RADIUM |
| 396 | // Enable MyQSlider and MyQCheckBox to take care of undo/redo. |
| 397 | { |
| 398 | SoundPlugin *plugin = (SoundPlugin*)_patch->patchdata; |
| 399 | attack_slider->_patch = patch; |
| 400 | attack_slider->_effect_num = plugin->type->num_effects+EFFNUM_COMP_ATTACK; |
| 401 | release_slider->_patch = patch; |
| 402 | release_slider->_effect_num = plugin->type->num_effects+EFFNUM_COMP_RELEASE; |
| 403 | enable_checkbox->_patch = patch; |
| 404 | enable_checkbox->_effect_num = plugin->type->num_effects+EFFNUM_COMP_ONOFF; |
| 405 | } |
| 406 | #endif |
| 407 | |
| 408 | update_guicxx . . $ Compressor_widget#update_gui(49f6e7a06ebc5aa8).(); |
| 409 | initingcxx . . $ Compressor_widget#initing. = false; |
| 410 | } |
| 411 | |
| 412 | float get_exp_valuecxx . . $ Compressor_widget#get_exp_value(cec7714f2b1be9b5).(double val, double max_val, double y1, double y2){ |
| 413 | return scale_doublecxx . . $ scale_double(3078559e8193abf4).(expcxx . . $ exp(fee4f1d22bc8e617).(val/max_val), |
| 414 | expcxx . . $ exp(fee4f1d22bc8e617).(0.0),expf(1.0), |
| 415 | y1,y2 |
| 416 | ); |
| 417 | } |
| 418 | |
| 419 | float get_exp_inverted_valuecxx . . $ Compressor_widget#get_exp_inverted_value(cec7714f2b1be9b5).(double y, double max_val, double y1, double y2){ |
| 420 | return max_val * logcxx . . $ log(fee4f1d22bc8e617).(scale_doublecxx . . $ scale_double(3078559e8193abf4).(y,y1,y2,expcxx . . $ exp(fee4f1d22bc8e617).(0.0),expcxx . . $ exp(fee4f1d22bc8e617).(1.0))); |
| 421 | } |
| 422 | |
| 423 | void update_guicxx . . $ Compressor_widget#update_gui(49f6e7a06ebc5aa8).(){ |
| 424 | compcxx . . $ Compressor_widget#comp.->set_gui_parameterscxx . . $ cvs/Comp#set_gui_parameters(49f6e7a06ebc5aa8).(); |
| 425 | attack_slidercxx . . $ Ui_Compressor_widget#attack_slider.->setValuecxx . . $ QAbstractSlider#setValue(d4f767463ce0a6b3).(get_exp_inverted_valuecxx . . $ Compressor_widget#get_exp_inverted_value(cec7714f2b1be9b5).(get_compressor_parametercxx . . $ get_compressor_parameter(93d36f247079c9cd).(_patchcxx . . $ Compressor_widget#_patch., COMP_EFF_ATTACKcxx . . $ COMP_EFF_ATTACK.),1000,0,max_attack_releasecxx . . $ max_attack_release.)); |
| 426 | release_slidercxx . . $ Ui_Compressor_widget#release_slider.->setValuecxx . . $ QAbstractSlider#setValue(d4f767463ce0a6b3).(get_exp_inverted_valuecxx . . $ Compressor_widget#get_exp_inverted_value(cec7714f2b1be9b5).(get_compressor_parametercxx . . $ get_compressor_parameter(93d36f247079c9cd).(_patchcxx . . $ Compressor_widget#_patch., COMP_EFF_RELEASEcxx . . $ COMP_EFF_RELEASE.),1000,0,max_attack_releasecxx . . $ max_attack_release.)); |
| 427 | |
| 428 | SoundPlugin *plugin = (SoundPlugin*)_patchcxx . . $ Compressor_widget#_patch.->patchdatacxx . . $ Patch#patchdata.; |
| 429 | enable_checkboxcxx . . $ Ui_Compressor_widget#enable_checkbox.->setCheckedcxx . . $ QAbstractButton#setChecked(b45ddcbc8423892c).(plugin->compcxx . . $ SoundPlugin#comp..is_on); |
| 430 | |
| 431 | //paint_all=true; |
| 432 | //updateBackgroundImage(); |
| 433 | //comp->update(); |
| 434 | updatecxx . . $ QWidget#update(49f6e7a06ebc5aa8).(); |
| 435 | } |
| 436 | |
| 437 | void loadcxx . . $ Compressor_widget#load(4e51b35ce1bea96b).(QStringcxx . . $ QString# filename, bool complain_if_file_not_found = true){ |
| 438 | FILEcxx . . $ FILE# *file = fopen(filename.toUtf8cxx . . $ QString#toUtf8(ef52b713090bc85a).().constDatacxx . . $ QByteArray#constData(a9f41ea0e82d88cf).(),"r"); |
| 439 | |
| 440 | if(file==NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!){ |
| 441 | if(complain_if_file_not_found){ |
| 442 | QMessageBoxcxx . . $ QMessageBox# msgBoxcxx . . $ QMessageBox#QMessageBox(108f35f7aa7f3cf9).; |
| 443 | msgBox.setTextcxx . . $ QMessageBox#setText(3520e46b33348bf6).("Could not open file \""+cxx . . $ operator+(c75c3ae4eb9af1a8).filename+cxx . . $ operator+(3d22f08efddf8107)."\"."); |
| 444 | msgBox.setStandardButtonscxx . . $ QMessageBox#setStandardButtons(4a518dc19368b384).(QMessageBoxcxx . . $ QFlags#QFlags(93d577a3e9528307).::Okcxx . . $ QMessageBox#Ok.); |
| 445 | msgBox.setDefaultButtoncxx . . $ QMessageBox#setDefaultButton(7bbe32d9411e0477).(QMessageBoxcxx . . $ QMessageBox#::Okcxx . . $ QMessageBox#Ok.); |
| 446 | msgBox.execcxx . . $ QDialog#exec(b126dc7c1de90089).(); |
| 447 | } |
| 448 | return; |
| 449 | } |
| 450 | |
| 451 | set_compressor_parametercxx . . $ set_compressor_parameter(11a1b181ddb9d33c).(_patchcxx . . $ Compressor_widget#_patch., COMP_EFF_RATIOcxx . . $ COMP_EFF_RATIO.,read_floatcxx . . $ read_float(4b932ce4af91b5e4).(file)); // ratio |
| 452 | set_compressor_parametercxx . . $ set_compressor_parameter(11a1b181ddb9d33c).(_patchcxx . . $ Compressor_widget#_patch., COMP_EFF_THRESHOLDcxx . . $ COMP_EFF_THRESHOLD.,read_floatcxx . . $ read_float(4b932ce4af91b5e4).(file)); // threshold |
| 453 | set_compressor_parametercxx . . $ set_compressor_parameter(11a1b181ddb9d33c).(_patchcxx . . $ Compressor_widget#_patch., COMP_EFF_ATTACKcxx . . $ COMP_EFF_ATTACK.,read_floatcxx . . $ read_float(4b932ce4af91b5e4).(file)); // attack |
| 454 | set_compressor_parametercxx . . $ set_compressor_parameter(11a1b181ddb9d33c).(_patchcxx . . $ Compressor_widget#_patch., COMP_EFF_RELEASEcxx . . $ COMP_EFF_RELEASE.,read_floatcxx . . $ read_float(4b932ce4af91b5e4).(file)); // release |
| 455 | //set_compressor_parameter(INPUT_VOLUME,read_float(file)); // input volume (currently not used) |
| 456 | read_floatcxx . . $ read_float(4b932ce4af91b5e4).(file); // input volume (currently not used) |
| 457 | set_compressor_parametercxx . . $ set_compressor_parameter(11a1b181ddb9d33c).(_patchcxx . . $ Compressor_widget#_patch., COMP_EFF_OUTPUT_VOLUMEcxx . . $ COMP_EFF_OUTPUT_VOLUME.,read_floatcxx . . $ read_float(4b932ce4af91b5e4).(file)); // output volume |
| 458 | |
| 459 | int x = read_floatcxx . . $ read_float(4b932ce4af91b5e4).(file); |
| 460 | int y = read_floatcxx . . $ read_float(4b932ce4af91b5e4).(file); |
| 461 | int width = read_floatcxx . . $ read_float(4b932ce4af91b5e4).(file); |
| 462 | int height = read_floatcxx . . $ read_float(4b932ce4af91b5e4).(file); |
| 463 | |
| 464 | if(width>0 && height>0){ |
| 465 | movecxx . . $ QWidget#move(3e454b8ccf442868).(x,y); |
| 466 | resizecxx . . $ QWidget#resize(3e454b8ccf442868).(width,height); |
| 467 | } |
| 468 | |
| 469 | fclose(file); |
| 470 | |
| 471 | compcxx . . $ Compressor_widget#comp.->background_image_must_be_updatedcxx . . $ cvs/Comp#background_image_must_be_updated.=true; |
| 472 | |
| 473 | update_guicxx . . $ Compressor_widget#update_gui(49f6e7a06ebc5aa8).(); |
| 474 | } |
| 475 | |
| 476 | void savecxx . . $ Compressor_widget#save(7df51288a9ebd664).(QStringcxx . . $ QString# filename){ |
| 477 | FILEcxx . . $ FILE# *file = fopen(filename.toUtf8cxx . . $ QString#toUtf8(ef52b713090bc85a).().constDatacxx . . $ QByteArray#constData(a9f41ea0e82d88cf).(),"w"); |
| 478 | |
| 479 | if(file==NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!){ |
| 480 | QMessageBoxcxx . . $ QMessageBox# msgBoxcxx . . $ QMessageBox#QMessageBox(108f35f7aa7f3cf9).; |
| 481 | msgBox.setTextcxx . . $ QMessageBox#setText(3520e46b33348bf6).("Could not save file."cxx . . $ QString#QString(85c52e162fed56f9).); |
| 482 | msgBox.setStandardButtonscxx . . $ QMessageBox#setStandardButtons(4a518dc19368b384).(QMessageBoxcxx . . $ QFlags#QFlags(93d577a3e9528307).::Okcxx . . $ QMessageBox#Ok.); |
| 483 | msgBox.setDefaultButtoncxx . . $ QMessageBox#setDefaultButton(7bbe32d9411e0477).(QMessageBoxcxx . . $ QMessageBox#::Okcxx . . $ QMessageBox#Ok.); |
| 484 | msgBox.execcxx . . $ QDialog#exec(b126dc7c1de90089).(); |
| 485 | return; |
| 486 | } |
| 487 | |
| 488 | fprintf(file,"%f\n%f\n%f\n%f\n%f\n%f\n", |
| 489 | get_compressor_parametercxx . . $ get_compressor_parameter(93d36f247079c9cd).(_patchcxx . . $ Compressor_widget#_patch., COMP_EFF_RATIOcxx . . $ COMP_EFF_RATIO.), |
| 490 | get_compressor_parametercxx . . $ get_compressor_parameter(93d36f247079c9cd).(_patchcxx . . $ Compressor_widget#_patch., COMP_EFF_THRESHOLDcxx . . $ COMP_EFF_THRESHOLD.), |
| 491 | get_compressor_parametercxx . . $ get_compressor_parameter(93d36f247079c9cd).(_patchcxx . . $ Compressor_widget#_patch., COMP_EFF_ATTACKcxx . . $ COMP_EFF_ATTACK.), |
| 492 | get_compressor_parametercxx . . $ get_compressor_parameter(93d36f247079c9cd).(_patchcxx . . $ Compressor_widget#_patch., COMP_EFF_RELEASEcxx . . $ COMP_EFF_RELEASE.), |
| 493 | //get_compressor_parameter(INPUT_VOLUME), |
| 494 | 0.0f, // input volume (in dB) |
| 495 | get_compressor_parametercxx . . $ get_compressor_parameter(93d36f247079c9cd).(_patchcxx . . $ Compressor_widget#_patch., COMP_EFF_OUTPUT_VOLUMEcxx . . $ COMP_EFF_OUTPUT_VOLUME.) |
| 496 | ); |
| 497 | |
| 498 | fprintf(file,"%d\n%d\n%d\n%d\n", |
| 499 | poscxx . . $ QWidget#pos(75d69cfbd3c4b2dd).().xcxx . . $ QPoint#x(455f465bc33b4cdf).(),poscxx . . $ QWidget#pos(75d69cfbd3c4b2dd).().ycxx . . $ QPoint#y(455f465bc33b4cdf).(), |
| 500 | widthcxx . . $ QWidget#width(455f465bc33b4cdf).(),heightcxx . . $ QWidget#height(455f465bc33b4cdf).() |
| 501 | ); |
| 502 | |
| 503 | fclose(file); |
| 504 | } |
| 505 | |
| 506 | public slotscxx . . $ `<external>/1208926524888476972/qobjectdefs.h:88:14`!: |
| 507 | |
| 508 | void on_enable_checkbox_toggledcxx . . $ Compressor_widget#on_enable_checkbox_toggled(b45ddcbc8423892c).(bool val){ |
| 509 | #ifdef COMPILING_RADIUM |
| 510 | SoundPlugin *plugin = (SoundPlugin*)_patch->patchdata; |
| 511 | PLUGIN_set_effect_value(plugin, 0, plugin->type->num_effects+EFFNUM_COMP_ONOFF, val==true?1.0:0.0, PLUGIN_NONSTORED_TYPE, PLUGIN_STORE_VALUE); |
| 512 | |
| 513 | attack_slider->setEnabled(val); |
| 514 | release_slider->setEnabled(val); |
| 515 | comp->background_image_must_be_updated=true; |
| 516 | comp->w.setEnabled(val); |
| 517 | #endif |
| 518 | } |
| 519 | |
| 520 | void on_attack_slider_valueChangedcxx . . $ Compressor_widget#on_attack_slider_valueChanged(d4f767463ce0a6b3).(int val){ |
| 521 | float attack = get_exp_valuecxx . . $ Compressor_widget#get_exp_value(cec7714f2b1be9b5).(val,1000,0,max_attack_releasecxx . . $ max_attack_release.); |
| 522 | set_compressor_parametercxx . . $ set_compressor_parameter(11a1b181ddb9d33c).(_patchcxx . . $ Compressor_widget#_patch., COMP_EFF_ATTACKcxx . . $ COMP_EFF_ATTACK.,attack); |
| 523 | char temp[512]; |
| 524 | sprintf(temp,"Attack: %.2fms",attack); |
| 525 | SLIDERPAINTER_set_stringcxx . . $ SLIDERPAINTER_set_string(f94ce0ad34af9600).(attack_slidercxx . . $ Ui_Compressor_widget#attack_slider.->_paintercxx . . $ MyQSlider#_painter., tempcxx . . $ QString#QString(85c52e162fed56f9).); |
| 526 | } |
| 527 | |
| 528 | void on_release_slider_valueChangedcxx . . $ Compressor_widget#on_release_slider_valueChanged(d4f767463ce0a6b3).(int val){ |
| 529 | float release = get_exp_valuecxx . . $ Compressor_widget#get_exp_value(cec7714f2b1be9b5).(val,1000,0,max_attack_releasecxx . . $ max_attack_release.); |
| 530 | set_compressor_parametercxx . . $ set_compressor_parameter(11a1b181ddb9d33c).(_patchcxx . . $ Compressor_widget#_patch., COMP_EFF_RELEASEcxx . . $ COMP_EFF_RELEASE.,release); |
| 531 | char temp[512]; |
| 532 | sprintf(temp,"Release: %.2fms",release); |
| 533 | SLIDERPAINTER_set_stringcxx . . $ SLIDERPAINTER_set_string(f94ce0ad34af9600).(release_slidercxx . . $ Ui_Compressor_widget#release_slider.->_paintercxx . . $ MyQSlider#_painter., tempcxx . . $ QString#QString(85c52e162fed56f9).); |
| 534 | } |
| 535 | |
| 536 | void on_bypass_toggledcxx . . $ Compressor_widget#on_bypass_toggled(b45ddcbc8423892c).(bool val){ |
| 537 | printf("bypass: %d\n",(int)val); |
| 538 | set_compressor_parametercxx . . $ set_compressor_parameter(11a1b181ddb9d33c).(_patchcxx . . $ Compressor_widget#_patch., COMP_EFF_BYPASScxx . . $ COMP_EFF_BYPASS.,val==true?1.0f:0.0f); |
| 539 | } |
| 540 | |
| 541 | void on_load_button_pressedcxx . . $ Compressor_widget#on_load_button_pressed(49f6e7a06ebc5aa8).(void){ |
| 542 | printf("load pressed\n"); |
| 543 | |
| 544 | QStringcxx . . $ QString# filename = QFileDialogcxx . . $ QFileDialog#::getOpenFileNamecxx . . $ QFileDialog#getOpenFileName(a6b29be4bec65236).(this, "Load Effect configuration"cxx . . $ QString#QString(85c52e162fed56f9)., ""cxx . . $ QString#QString(85c52e162fed56f9)., "Radium Compressor Configuration (*.rcc)"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 545 | |
| 546 | if(filename==cxx . . $ QString#`operator==`(7d4bdb1abc417636)."") |
| 547 | return; |
| 548 | |
| 549 | loadcxx . . $ Compressor_widget#load(4e51b35ce1bea96b).(filenamecxx . . $ QString#QString(132dd6869045752b).); |
| 550 | } |
| 551 | |
| 552 | void on_save_button_pressedcxx . . $ Compressor_widget#on_save_button_pressed(49f6e7a06ebc5aa8).(void){ |
| 553 | printf("save pressed\n"); |
| 554 | |
| 555 | QStringcxx . . $ QString# filename = QFileDialogcxx . . $ QFileDialog#::getSaveFileNamecxx . . $ QFileDialog#getSaveFileName(a6b29be4bec65236).(this, "Save Effect configuration"cxx . . $ QString#QString(85c52e162fed56f9)., ""cxx . . $ QString#QString(85c52e162fed56f9)., "Radium Compressor Configuration (*.rcc)"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 556 | |
| 557 | if(filename==cxx . . $ QString#`operator==`(7d4bdb1abc417636)."") |
| 558 | return; |
| 559 | |
| 560 | savecxx . . $ Compressor_widget#save(7df51288a9ebd664).(filenamecxx . . $ QString#QString(132dd6869045752b).); |
| 561 | } |
| 562 | }; |
| 563 | |
| 564 | //#ifdef COMPILING_RADIUM |
| 565 | //} // radium_comp namespace |
| 566 | //#endif |
| 567 |