X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fwidgets%2Fpatternbox.cpp;h=fe4e2498764874d8f1a2c7e22bda67695fbd0cfb;hb=2ee84c5948ede7fc2f7b4435c5edef42a030ac05;hp=94f4d9375a839ecc7f0cfc8da4f022aa21106372;hpb=48105dec9198cf5a81dd9286010d0d45e28f70c3;p=architektonas diff --git a/src/widgets/patternbox.cpp b/src/widgets/patternbox.cpp index 94f4d93..fe4e249 100644 --- a/src/widgets/patternbox.cpp +++ b/src/widgets/patternbox.cpp @@ -16,9 +16,9 @@ #include "patternbox.h" -#include "rs_pattern.h" -#include "rs_patternlist.h" -#include "rs_debug.h" +#include "pattern.h" +#include "patternlist.h" +#include "debug.h" /** * Default Constructor. You must call init manually if you choose @@ -36,17 +36,24 @@ PatternBox::~PatternBox() } /** - * Initialisation (called manually and only once). + * Initialization (called manually and only once). */ void PatternBox::init() { QStringList patterns; - for(RS_Pattern * f=RS_PATTERNLIST->firstPattern(); f!=NULL; f=RS_PATTERNLIST->nextPattern()) + for(Pattern * f=PATTERNLIST->firstPattern(); f!=NULL; f=PATTERNLIST->nextPattern()) patterns.append(f->getFileName()); +#if 0 +std::cout << "patterns size = " << patterns.size() << std::endl; + +for(int i=0; iprint("PatternBox::setPattern %s\n", pName.toLatin1().data()); -// setCurrentText(pName); + DEBUG->print("PatternBox::setPattern %s\n", pName.toAscii().data()); setItemText(currentIndex(), pName); slotPatternChanged(currentIndex()); } @@ -77,11 +83,11 @@ void PatternBox::setPattern(const QString & pName) */ void PatternBox::slotPatternChanged(int index) { - RS_DEBUG->print("PatternBox::slotPatternChanged %d\n", index); - currentPattern = RS_PATTERNLIST->requestPattern(currentText()); + DEBUG->print("PatternBox::slotPatternChanged %d\n", index); + currentPattern = PATTERNLIST->requestPattern(currentText()); - if (currentPattern!=NULL) - RS_DEBUG->print("Current pattern is (%d): %s\n", index, currentPattern->getFileName().toLatin1().data()); + if (currentPattern) + DEBUG->print("Current pattern is (%d): %s\n", index, currentPattern->getFileName().toAscii().data()); emit patternChanged(currentPattern); }