Diffstat (limited to 'noncore/multimedia/powerchord/fretboard.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/powerchord/fretboard.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/noncore/multimedia/powerchord/fretboard.cpp b/noncore/multimedia/powerchord/fretboard.cpp index bf78e4c..2e48f26 100644 --- a/noncore/multimedia/powerchord/fretboard.cpp +++ b/noncore/multimedia/powerchord/fretboard.cpp @@ -1,51 +1,49 @@ // // FretBoard class to display interface for chord finder application // // Copyright (c) 2001 Camilo Mesias // camilo@mesias.co.uk // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -//#include <FL/Fl.H> -//#include <FL/Fl_Widget.H> -//#include <FL/fl_draw.H> -#include <stdio.h> -#include <qpe/resource.h> #include "fretboard.h" + +#include <opie2/oresource.h> + #include <qpainter.h> void FretBoard::refresh(){ ce.calculate(); emit nameChanged(QString(ce.label())); for (int i=0;i<6;i++){ Finger(i, ce.finger(i)); // yuk switch (i) { case 0: emit s1nameChanged(QString(ce.name(i))); break; case 1: emit s2nameChanged(QString(ce.name(i))); break; case 2: emit s3nameChanged(QString(ce.name(i))); break; case 3: emit s4nameChanged(QString(ce.name(i))); break; case 4: @@ -53,52 +51,52 @@ void FretBoard::refresh(){ break; case 5: emit s6nameChanged(QString(ce.name(i))); break; } } update(); } FretBoard::FretBoard(QWidget *parent, const char *name ) : QWidget( parent, name ), ce() { ce.base(9); ce.chord(0); ce.fret(0); ce.span(1); ce.vary(7); ce.tune(0); refresh(); // setPalette( QPalette( QColor( 250, 250, 200) ) ); - stringtop_pix = Resource::loadPixmap( "powerchord/stringtop_s"); - string_pix = Resource::loadPixmap( "powerchord/string_s"); - finger_pix = Resource::loadPixmap( "powerchord/justfing_s"); - mute_pix = Resource::loadPixmap( "powerchord/muted_s"); + stringtop_pix = Opie::Core::OResource::loadPixmap( "powerchord/stringtop_s"); + string_pix = Opie::Core::OResource::loadPixmap( "powerchord/string_s"); + finger_pix = Opie::Core::OResource::loadPixmap( "powerchord/justfing_s"); + mute_pix = Opie::Core::OResource::loadPixmap( "powerchord/muted_s"); // box(FL_NO_BOX); // finger[0] = OPEN; // finger[1] = OPEN; // finger[2] = OPEN; // finger[3] = OPEN; // finger[4] = OPEN; // finger[5] = OPEN; initial_fret = 0; // label(FL_NORMAL_LABEL, "Chord"); } // int FretBoard::Finger(int f){ // if (f < 0 || f > 5){ // fprintf(stderr, "Error - finger value was %d\n", f); // return 0; // } // return finger[f]; // } void FretBoard::Finger(int f, int position){ |