Mercurial > hg > svgui
comparison widgets/Fader.cpp @ 706:97ea68f62c1f imaf_enc
Merge from default branch
author | Chris Cannam |
---|---|
date | Thu, 05 Dec 2013 09:47:02 +0000 |
parents | 1a0dfcbffaf1 |
children | 44675ab217a3 |
comparison
equal
deleted
inserted
replaced
678:26c5f7fd4807 | 706:97ea68f62c1f |
---|---|
55 resize(116, 23); | 55 resize(116, 23); |
56 | 56 |
57 QString background_path = ":/icons/fader_background.png"; | 57 QString background_path = ":/icons/fader_background.png"; |
58 bool ok = m_back.load(background_path); | 58 bool ok = m_back.load(background_path); |
59 if (ok == false) { | 59 if (ok == false) { |
60 std::cerr << "Fader: Error loading pixmap" << std::endl; | 60 cerr << "Fader: Error loading pixmap" << endl; |
61 } | 61 } |
62 | 62 |
63 QString leds_path = ":/icons/fader_leds.png"; | 63 QString leds_path = ":/icons/fader_leds.png"; |
64 ok = m_leds.load(leds_path); | 64 ok = m_leds.load(leds_path); |
65 if (ok == false) { | 65 if (ok == false) { |
66 std::cerr << "Error loading pixmap" << std::endl; | 66 cerr << "Error loading pixmap" << endl; |
67 } | 67 } |
68 | 68 |
69 QString knob_path = ":/icons/fader_knob.png"; | 69 QString knob_path = ":/icons/fader_knob.png"; |
70 ok = m_knob.load(knob_path); | 70 ok = m_knob.load(knob_path); |
71 if (ok == false) { | 71 if (ok == false) { |
72 std::cerr << "Error loading pixmap" << std::endl; | 72 cerr << "Error loading pixmap" << endl; |
73 } | 73 } |
74 | 74 |
75 QString clip_path = ":/icons/fader_knob_red.png"; | 75 QString clip_path = ":/icons/fader_knob_red.png"; |
76 ok = m_clip.load(clip_path); | 76 ok = m_clip.load(clip_path); |
77 if (ok == false) { | 77 if (ok == false) { |
78 std::cerr << "Error loading pixmap" << std::endl; | 78 cerr << "Error loading pixmap" << endl; |
79 } | 79 } |
80 } | 80 } |
81 | 81 |
82 Fader::~Fader() | 82 Fader::~Fader() |
83 { | 83 { |
220 .arg(db < 0.0 ? "-" : "") | 220 .arg(db < 0.0 ? "-" : "") |
221 .arg(abs(int(db))) | 221 .arg(abs(int(db))) |
222 .arg(abs(int(db * 10.0) % 10)) | 222 .arg(abs(int(db * 10.0) % 10)) |
223 .arg(abs(int(db * 100.0) % 10)); | 223 .arg(abs(int(db * 100.0) % 10)); |
224 } | 224 } |
225 std::cerr << "Fader: setting tooltip to \"" << text << "\"" << std::endl; | 225 cerr << "Fader: setting tooltip to \"" << text << "\"" << endl; |
226 QWidget::setToolTip(text); | 226 QWidget::setToolTip(text); |
227 update(); | 227 update(); |
228 } | 228 } |
229 } | 229 } |
230 | 230 |