Diffstat (limited to 'noncore/multimedia/powerchord/powerchordbase.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/powerchord/powerchordbase.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/noncore/multimedia/powerchord/powerchordbase.cpp b/noncore/multimedia/powerchord/powerchordbase.cpp index 4fb5dda..0694ba3 100644 --- a/noncore/multimedia/powerchord/powerchordbase.cpp +++ b/noncore/multimedia/powerchord/powerchordbase.cpp | |||
@@ -1,46 +1,50 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** Form implementation generated from reading ui file 'powerchordbase.ui' | 2 | ** Form implementation generated from reading ui file 'powerchordbase.ui' |
3 | ** | 3 | ** |
4 | ** Created: Sun Jan 13 23:05:11 2002 | 4 | ** Created: Sun Jan 13 23:05:11 2002 |
5 | ** by: The User Interface Compiler (uic) | 5 | ** by: The User Interface Compiler (uic) |
6 | ** | 6 | ** |
7 | ** WARNING! All changes made in this file will be lost! | 7 | ** WARNING! All changes made in this file will be lost! |
8 | ****************************************************************************/ | 8 | ****************************************************************************/ |
9 | #include "powerchordbase.h" | 9 | #include "powerchordbase.h" |
10 | |||
11 | #include "fretboard.h" | 10 | #include "fretboard.h" |
12 | #include "vumeter.h" | 11 | #include "vumeter.h" |
12 | |||
13 | /* OPIE */ | ||
14 | #include <opie2/odebug.h> | ||
15 | #include <qpe/resource.h> | ||
16 | using namespace Opie::Core; | ||
17 | |||
18 | /* QT */ | ||
13 | #include <qcombobox.h> | 19 | #include <qcombobox.h> |
14 | #include <qlabel.h> | 20 | #include <qlabel.h> |
15 | #include <qlistbox.h> | 21 | #include <qlistbox.h> |
16 | #include <qpushbutton.h> | 22 | #include <qpushbutton.h> |
17 | #include <qspinbox.h> | 23 | #include <qspinbox.h> |
18 | #include <qtabwidget.h> | 24 | #include <qtabwidget.h> |
19 | #include <qlayout.h> | 25 | #include <qlayout.h> |
20 | #include <qtooltip.h> | 26 | #include <qtooltip.h> |
21 | #include <qpe/resource.h> | ||
22 | |||
23 | 27 | ||
24 | /* | 28 | /* |
25 | * Constructs a PowerchordBase which is a child of 'parent', with the | 29 | * Constructs a PowerchordBase which is a child of 'parent', with the |
26 | * name 'name' and widget flags set to 'f' | 30 | * name 'name' and widget flags set to 'f' |
27 | */ | 31 | */ |
28 | PowerchordBase::PowerchordBase( QWidget* parent, const char* name, WFlags fl ) | 32 | PowerchordBase::PowerchordBase( QWidget* parent, const char* name, WFlags fl ) |
29 | : QWidget( parent, name, fl ) | 33 | : QWidget( parent, name, fl ) |
30 | { | 34 | { |
31 | simulation_timer = 0; | 35 | simulation_timer = 0; |
32 | audio_timer = 0; | 36 | audio_timer = 0; |
33 | 37 | ||
34 | // setPalette( QPalette( QColor( 232, 227, 215) ) ); | 38 | // setPalette( QPalette( QColor( 232, 227, 215) ) ); |
35 | 39 | ||
36 | // QPixmap image0(QString("/opt/Qtopia/pics/powerchord/image0")); | 40 | // QPixmap image0(QString("/opt/Qtopia/pics/powerchord/image0")); |
37 | QPixmap image1 = Resource::loadPixmap( "powerchord/image1"); | 41 | QPixmap image1 = Resource::loadPixmap( "powerchord/image1"); |
38 | QPixmap image2 = Resource::loadPixmap( "powerchord/image2"); | 42 | QPixmap image2 = Resource::loadPixmap( "powerchord/image2"); |
39 | QPixmap image3 = Resource::loadPixmap( "powerchord/image3"); | 43 | QPixmap image3 = Resource::loadPixmap( "powerchord/image3"); |
40 | QPixmap image4 = Resource::loadPixmap( "powerchord/image4"); | 44 | QPixmap image4 = Resource::loadPixmap( "powerchord/image4"); |
41 | QPixmap image5 = Resource::loadPixmap( "powerchord/image5"); | 45 | QPixmap image5 = Resource::loadPixmap( "powerchord/image5"); |
42 | image6 = Resource::loadPixmap( "powerchord/image6"); | 46 | image6 = Resource::loadPixmap( "powerchord/image6"); |
43 | image_open = Resource::loadPixmap( "powerchord/image_open"); | 47 | image_open = Resource::loadPixmap( "powerchord/image_open"); |
44 | 48 | ||
45 | // image0.setMask(image0.createHeuristicMask()); | 49 | // image0.setMask(image0.createHeuristicMask()); |
46 | image1.setMask(image1.createHeuristicMask()); | 50 | image1.setMask(image1.createHeuristicMask()); |
@@ -559,27 +563,27 @@ void PowerchordBase::tuner_simulation_cb(){ | |||
559 | 563 | ||
560 | if (simulation_x < -50){ | 564 | if (simulation_x < -50){ |
561 | simulation_x = -50; | 565 | simulation_x = -50; |
562 | } | 566 | } |
563 | 567 | ||
564 | if (simulation_iter > 50){ | 568 | if (simulation_iter > 50){ |
565 | simulation_timer->stop(); | 569 | simulation_timer->stop(); |
566 | emit frequency_change(0); | 570 | emit frequency_change(0); |
567 | tuner_pic1->setPixmap( image6 ); | 571 | tuner_pic1->setPixmap( image6 ); |
568 | }else{ | 572 | }else{ |
569 | emit frequency_change(simulation_x); | 573 | emit frequency_change(simulation_x); |
570 | } | 574 | } |
571 | } | 575 | } |
572 | 576 | ||
573 | /* | 577 | /* |
574 | * Destroys the object and frees any allocated resources | 578 | * Destroys the object and frees any allocated resources |
575 | */ | 579 | */ |
576 | PowerchordBase::~PowerchordBase() | 580 | PowerchordBase::~PowerchordBase() |
577 | { | 581 | { |
578 | // no need to delete child widgets, Qt does it all for us | 582 | // no need to delete child widgets, Qt does it all for us |
579 | } | 583 | } |
580 | 584 | ||
581 | void PowerchordBase::change_handler() | 585 | void PowerchordBase::change_handler() |
582 | { | 586 | { |
583 | qWarning( "PowerchordBase::change_handler(): Not implemented yet!" ); | 587 | owarn << "PowerchordBase::change_handler(): Not implemented yet!" << oendl; |
584 | } | 588 | } |
585 | 589 | ||