summaryrefslogtreecommitdiff
path: root/noncore/multimedia/powerchord/powerchordbase.cpp
Side-by-side diff
Diffstat (limited to 'noncore/multimedia/powerchord/powerchordbase.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/powerchord/powerchordbase.cpp12
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,70 +1,74 @@
/****************************************************************************
** Form implementation generated from reading ui file 'powerchordbase.ui'
**
** Created: Sun Jan 13 23:05:11 2002
** by: The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "powerchordbase.h"
-
#include "fretboard.h"
#include "vumeter.h"
+
+/* OPIE */
+#include <opie2/odebug.h>
+#include <qpe/resource.h>
+using namespace Opie::Core;
+
+/* QT */
#include <qcombobox.h>
#include <qlabel.h>
#include <qlistbox.h>
#include <qpushbutton.h>
#include <qspinbox.h>
#include <qtabwidget.h>
#include <qlayout.h>
#include <qtooltip.h>
-#include <qpe/resource.h>
-
/*
* Constructs a PowerchordBase which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'
*/
PowerchordBase::PowerchordBase( QWidget* parent, const char* name, WFlags fl )
: QWidget( parent, name, fl )
{
simulation_timer = 0;
audio_timer = 0;
// setPalette( QPalette( QColor( 232, 227, 215) ) );
// QPixmap image0(QString("/opt/Qtopia/pics/powerchord/image0"));
QPixmap image1 = Resource::loadPixmap( "powerchord/image1");
QPixmap image2 = Resource::loadPixmap( "powerchord/image2");
QPixmap image3 = Resource::loadPixmap( "powerchord/image3");
QPixmap image4 = Resource::loadPixmap( "powerchord/image4");
QPixmap image5 = Resource::loadPixmap( "powerchord/image5");
image6 = Resource::loadPixmap( "powerchord/image6");
image_open = Resource::loadPixmap( "powerchord/image_open");
// image0.setMask(image0.createHeuristicMask());
image1.setMask(image1.createHeuristicMask());
// image2.setMask(image2.createHeuristicMask());
// image3.setMask(image3.createHeuristicMask());
// image4.setMask(image4.createHeuristicMask());
// image5.setMask(image5.createHeuristicMask());
// image6->setMask(image6->createHeuristicMask());
// image_open->setMask(image_open->createHeuristicMask());
if ( !name )
setName( "PowerchordBase" );
resize( 240, 284 );
setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, sizePolicy().hasHeightForWidth() ) );
setMinimumSize( QSize( 240, 284 ) );
setMaximumSize( QSize( 240, 284 ) );
setCaption( tr( "Powerchord" ) );
tabs = new QTabWidget( this, "tabs" );
tabs->setEnabled( TRUE );
tabs->setGeometry( QRect( 0, 0, 240, 286 ) );
tabs->setTabPosition( QTabWidget::Bottom );
tab = new QWidget( tabs, "tab" );
chordkey = new QComboBox( FALSE, tab, "chordkey" );
chordkey->insertItem( tr( "maj" ) );
@@ -535,51 +539,51 @@ void PowerchordBase::tuner_start_cb(){
}
simulation_x = -45;
simulation_v = 0;
simulation_iter = 0;
tuner_pic1->setPixmap( image_open );
simulation_timer->start(100);
}
}
#include <stdio.h>
void PowerchordBase::tuner_simulation_cb(){
if (simulation_x < -10 || simulation_x > 10){
simulation_v = (simulation_v/2)-(simulation_x/5);
}
simulation_x += simulation_v;
simulation_iter++;
if (simulation_x > 50){
simulation_x = 50;
}
if (simulation_x < -50){
simulation_x = -50;
}
if (simulation_iter > 50){
simulation_timer->stop();
emit frequency_change(0);
tuner_pic1->setPixmap( image6 );
}else{
emit frequency_change(simulation_x);
}
}
/*
* Destroys the object and frees any allocated resources
*/
PowerchordBase::~PowerchordBase()
{
// no need to delete child widgets, Qt does it all for us
}
void PowerchordBase::change_handler()
{
- qWarning( "PowerchordBase::change_handler(): Not implemented yet!" );
+ owarn << "PowerchordBase::change_handler(): Not implemented yet!" << oendl;
}