Example #1
0
QToasterBrowserLCD::QToasterBrowserLCD(QWidget *parent)
  : QToasterLCD(parent)
  , ui(new Ui::QToasterBrowserLCD)
{
  ui->setupUi(this);
  createSkin();
  ui->stompAEdit->setText("-");
  ui->stompBEdit->setText("-");
  ui->stompCEdit->setText("-");
  ui->stompDEdit->setText("-");
  ui->stompXEdit->setText("-");
  ui->stompModEdit->setText("-");
  ui->reverbEdit->setText("REV");
  ui->delayEdit->setText("DLY");
  ui->rigNameEdit->setText("-");
  ui->rigAuthorEdit->setText("-");
  ui->rigTypeEdit->setText("Guitar Rig");
  ui->ampNameEdit->setText("-");

  ui->stompAEdit->setStyleSheet("border-radius: 3px");

  setStompAEnabled(false);
  setStompBEnabled(false);
  setStompCEnabled(false);
  setStompDEnabled(false);
  setStompXEnabled(false);
  setStompModEnabled(false);
  setDelayEnabled(false);
  setReverbEnabled(false);

  setColor(mColor);
}
//! constructor
CGUIEnvironment::CGUIEnvironment(io::IFileSystem* fs, video::IVideoDriver* driver, IOSOperator* op)
	: IGUIElement(EGUIET_ELEMENT, 0, 0, 0, core::rect<s32>(core::position2d<s32>(0,0),
	                                                       driver ? driver->getScreenSize() : core::dimension2d<s32>(0,0))),
	Hovered(0), CurrentSkin(0), Driver(driver),
	Focus(0), FileSystem(fs), UserReceiver(0), Operator(op)
{
	if (Driver)
		Driver->grab();

	if (FileSystem)
		FileSystem->grab();

	if (Operator)
		Operator->grab();

	#ifdef _DEBUG
	IGUIEnvironment::setDebugName("CGUIEnvironment IGUIEnvironment");
	IGUIElement::setDebugName("CGUIEnvironment IGUIElement");
	#endif

	loadBuidInFont();

	IGUISkin* skin = createSkin(EGST_WINDOWS_METALLIC);
	setSkin(skin);
	skin->drop();
}
Example #3
0
QMultiColorLed::QMultiColorLed(QWidget *parent)
  : QWidget(parent)
  , mColor(Off)
{
  createSkin();
  resize(sSkinPixmaps[Off].width(), sSkinPixmaps[Off].height());
}
Example #4
0
QToasterTunerLCD::QToasterTunerLCD(QWidget *parent)
  : QToasterLCD(parent)
  , ui(new Ui::QToasterTunerLCD)
{
  ui->setupUi(this);
  createSkin();
  createIndexSkin();
  setIndexPosition(100);
}
Example #5
0
bool DBArmature::initWithName(const std::string &name,const std::string &textureName)
{
    CC_SAFE_RELEASE_NULL(_eventDataMgr);
    _eventDataMgr = DBEventDataMgr::create();
    CC_SAFE_RETAIN(_eventDataMgr);
    
    DragonBonesData* dragonBonesData = DBCCFactory::getInstance()->getDragonBonesData(name);
    if (!dragonBonesData)
    {
        return false;
    }
    
    float version = atof(dragonBonesData->version.c_str());
    if (version >= 4.5)
    {
        this->_skewEnable = true;
    }
    
    _pArmatureData = dragonBonesData->getArmatureData(name);
    if (!_pArmatureData)
    {
        _pArmatureData = dragonBonesData->getArmatureDataFirst();
        if (!_pArmatureData)
        {
            return false;
        }
    }
    
    _name = name;
    DBAnimation* animation = DBAnimation::create(this);
    this->setAnimation(animation);
    animation->setAnimationDataList(_pArmatureData->animationDataList);
    
    for (size_t i = 0, l = _pArmatureData->boneDataList.size(); i < l; ++i)
    {
        createBone(_pArmatureData->boneDataList.at(i));
    }

    buildIK();
    updateBoneCache();
    createSkin(textureName);
    
    
    this->setCascadeColorEnabled(true);
    this->setCascadeOpacityEnabled(true);
    
    
    // update armature pose
    getAnimation()->play();
    update(0);
    getAnimation()->stop();
    
    dragonBonesData->retain();
    
    return true;
}
Example #6
0
bool LayerGridSelect::init()
{
	auto isInit = false;
	do 
	{
		CC_BREAK_IF(!Node::init());

		idObserverSet(ID_OBSERVER::LAYER_GRID_SELECT);
		ManagerUI::getInstance()->attach(this);

		createSkin();

		isInit = true;
	} while (0);
	return isInit;
}
Example #7
0
	void TestWindow::onDoModal()
	{
		createSkin();
	}
//--------------------------------------------------------------
void testApp::update(){
    
    //  Do the FFT
    //
    float avg_power = 0.0f;
	myFft.powerSpectrum(0,(int)bufferSize/2, left, bufferSize, magnitude, phase, power, &avg_power);
	for (int i = 0; i < (int)(bufferSize/2); i++){
		freq[i] = magnitude[i];
	}
    FFTanalyzer.calculate(freq);
    
    //  Add FFT averages
    //
    vector<float> newAverage;
    newAverage.assign(FFTanalyzer.averages,FFTanalyzer.averages+18);
    if(averages.size()>0){
        for(int i = 0; i < newAverage.size(); i++){
            newAverage[i] /= ofNoise(ofGetElapsedTimef()*0.1,(float)i/((float)newAverage.size()))*100;
        }
    }
    newAverage.push_back(ofNoise(ofGetElapsedTimef()*0.1));
    newAverage.push_back(ofNoise(ofGetElapsedTimef()*0.1));
    averages.push_back( newAverage );
    while(averages.size()>large){
        averages.erase(averages.begin());
    }
    
    vector<float> newPeaks;
    newPeaks.assign(FFTanalyzer.peaks,FFTanalyzer.peaks+18);
    peaks.push_back( newPeaks );
    while(peaks.size()>large){
        peaks.erase(peaks.begin());
    }
    
    
    //  Align and rotate
    //
    float phi   = (1.0+sqrtf(5.0))/2.0;
    float grow  = (1.0+phi);
    float stepGrow  = grow*0.001;
    float radio     = 1.0;
    offSet          = ofPoint(0,0);
    
    int lineWidth;
    points.clear();
    
    ofMatrix4x4 matrix;
    for (int i = 0; i < averages.size(); i++){
        radio += radio*stepGrow;
        float size = radio*grow;
        offSet = ofPoint(size,size*-0.5);
        
        ofPolyline line = freqArc( peaks[i], offSet, PI-0.65, 0.0f+0.65, size );
        line = line.getSmoothed(1);
        lineWidth = line.size();
        
        matrix.rotate(1.0, 1.0 , 0.0, 0.0);
        for (int j = 0; j < lineWidth; j++){
            points.push_back( matrix*line[j] );
        }
    }
    
    //  Make the mesh
    //
    createSkin(lineWidth);
    
    //  Set the camera
    //
    depthOfField.setFocalDistance(dof);
    
    if (averages.size() < 1190){
        cam.setDistance(offSet.x*2.0);
    }
//    else {
//        cam.setDistance(117.254);
//    }
//    
//    cam.setOrientation( ofVec3f(sin(ofGetElapsedTimef()*0.1)*180,
//                                0.0,
//                                cos(ofGetElapsedTimef()*0.05)*45 ));
    
    ofSetWindowTitle(ofToString(ofGetFrameRate()));
}