author | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
commit | 16cf79e90b5217f8d4bfce2a0fa817ae4b73db36 (patch) (unidiff) | |
tree | 0701eae15aa606a0211a2fccfde0eafdac69357c /noncore/multimedia/powerchord | |
parent | 8d2d2664e5f544b8292806e617deb7a0e4170dc0 (diff) | |
download | opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.zip opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.gz opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.bz2 |
convert to Opie Debugging Framework
-rw-r--r-- | noncore/multimedia/powerchord/config.in | 6 | ||||
-rw-r--r-- | noncore/multimedia/powerchord/powerchord.pro | 3 | ||||
-rw-r--r-- | noncore/multimedia/powerchord/powerchordbase.cpp | 12 |
3 files changed, 12 insertions, 9 deletions
diff --git a/noncore/multimedia/powerchord/config.in b/noncore/multimedia/powerchord/config.in index ab1512b..5db784a 100644 --- a/noncore/multimedia/powerchord/config.in +++ b/noncore/multimedia/powerchord/config.in | |||
@@ -1,7 +1,7 @@ | |||
1 | config POWERCHORD | 1 | config POWERCHORD |
2 | boolean "opie-powerchord (guitar chord generator and tuning)" | 2 | boolean "opie-powerchord (guitar chord generator and tuning)" |
3 | default "n" | 3 | default "n" |
4 | depends ( LIBQPE || LIBQPE-X11 ) | 4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE |
5 | comment "opie-powerchord needs a libqpe" | 5 | comment "opie-powerchord needs a libqpe and libopiecore2" |
6 | depends !(( LIBQPE || LIBQPE-X11 ) ) | 6 | depends !(( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE ) |
7 | 7 | ||
diff --git a/noncore/multimedia/powerchord/powerchord.pro b/noncore/multimedia/powerchord/powerchord.pro index 917c88f..f7af6d6 100644 --- a/noncore/multimedia/powerchord/powerchord.pro +++ b/noncore/multimedia/powerchord/powerchord.pro | |||
@@ -1,27 +1,26 @@ | |||
1 | TEMPLATE= app | 1 | TEMPLATE= app |
2 | CONFIG = qt warn_on | 2 | CONFIG = qt warn_on |
3 | 3 | ||
4 | HEADERS = powerchord.h \ | 4 | HEADERS = powerchord.h \ |
5 | fretboard.h \ | 5 | fretboard.h \ |
6 | chordengine.h \ | 6 | chordengine.h \ |
7 | vumeter.h \ | 7 | vumeter.h \ |
8 | gs.h gt.h \ | 8 | gs.h gt.h \ |
9 | powerchordbase.h | 9 | powerchordbase.h |
10 | 10 | ||
11 | SOURCES = main.cpp \ | 11 | SOURCES = main.cpp \ |
12 | powerchord.cpp \ | 12 | powerchord.cpp \ |
13 | fretboard.cpp \ | 13 | fretboard.cpp \ |
14 | chordengine.cpp \ | 14 | chordengine.cpp \ |
15 | vumeter.cpp \ | 15 | vumeter.cpp \ |
16 | gs.cpp gt.cpp \ | 16 | gs.cpp gt.cpp \ |
17 | powerchordbase.cpp | 17 | powerchordbase.cpp |
18 | 18 | ||
19 | INCLUDEPATH+= $(OPIEDIR)/include | 19 | INCLUDEPATH+= $(OPIEDIR)/include |
20 | DEPENDPATH+= $(OPIEDIR)/include | 20 | DEPENDPATH+= $(OPIEDIR)/include |
21 | LIBS += -lqpe | 21 | LIBS += -lqpe -lopiecore2 |
22 | #INTERFACES= powerchordbase.ui | ||
23 | DESTDIR = $(OPIEDIR)/bin | 22 | DESTDIR = $(OPIEDIR)/bin |
24 | TARGET = powerchord | 23 | TARGET = powerchord |
25 | 24 | ||
26 | include ( $(OPIEDIR)/include.pro ) | 25 | include ( $(OPIEDIR)/include.pro ) |
27 | 26 | ||
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 | ||