コード例 #1
0
ファイル: ColorVarWidget.cpp プロジェクト: JoelKronander/brdf
ColorVarWidget::ColorVarWidget(QString name, float r, float g, float b)
{
	QHBoxLayout *layout = new QHBoxLayout;

	// add the label with this parameter's name
	QLabel* label = new QLabel( name );
    QFont font = label->font();
    font.setBold( true );
    label->setFont( font );
	layout->addWidget( label );


	// create the button that displays the color
	colorButton = new ColorVarButton( );
	colorButton->setFixedWidth( 65 );
	colorButton->setFixedHeight( 22 );
	connect(colorButton, SIGNAL(clicked()), this, SLOT(showColorChanger()));
	layout->addWidget( colorButton );
        connect(colorButton, SIGNAL(setToDefault()), this, SLOT(setToDefault()));

	// set the color to the input
	color.setRgbF( r, g, b );
        defaultColor = color;
	resetButtonColor();
	

	// layout stuff
	setContentsMargins( 0, 0, 0, 0 );
	layout->setMargin( 1 );
	setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Fixed );

	setLayout(layout);
}
コード例 #2
0
ファイル: configure.cpp プロジェクト: cidarLuis/nano11uxx
Configure::Configure() {
	EEPROM::read(0, &m_ble, sizeof(m_ble));
	if ( m_ble.length!=sizeof(m_ble) ) {
		setToDefault();
		save();
	}
}
コード例 #3
0
ファイル: Options.cpp プロジェクト: dkouzoup/BC-RTI
/*
 *	s e t T o M P C
 */
returnValue Options::setToMPC( )
{
	setToDefault( );

	enableRamping                 =  BT_FALSE;
	enableFarBounds               =  BT_TRUE;
	enableFlippingBounds          =  BT_FALSE;
	enableRegularisation          =  BT_TRUE;
	enableNZCTests                =  BT_FALSE;
	enableDriftCorrection         =  0;
	enableEqualities              =  BT_TRUE;

	#ifdef __USE_SINGLE_PRECISION__
	terminationTolerance          =  1.0e3 * EPS;
	#else
	terminationTolerance          =  1.0e9 * EPS;
	#endif

	initialStatusBounds           =  ST_INACTIVE;
	numRegularisationSteps        =  1;
	#ifdef __USE_SINGLE_PRECISION__
	numRefinementSteps            =  2;
	#else
	numRefinementSteps            =  0;
	#endif

	return SUCCESSFUL_RETURN;
}
コード例 #4
0
ファイル: main.cpp プロジェクト: rosen90/GitHub
void logicButtons(bool temp[]) {
	for (int i = 0; i < NUMBER_OF_BUTTON; ++i) {
		if (temp[i] == true) {
			switch (i) {
			case 0:
			    if(!lockButtons)
                {
                    startStopGame();
                }
				temp[i] = false;
				break;
			case 1:
			    if(!lockButtons)
                {
                    setToDefault();
                    loadGame(board);
                    if(availableMatches() == 0)
                    {
                        startStopGame();
                    }
                }
				temp[i] = false;
				break;
			case 2:
				showHelp();
				temp[i] = false;
				break;
			case 3:
				startStopSound();
				temp[i] = false;
				break;
			}
		}
	}
}
コード例 #5
0
void GameApplication::startStopGame() {
	if (board.isStarted()) {
		board.stop();
		startStopTimer();
		setToDefault();
	} else {
		if (!theGameIsOver()) {
			board.start();
			startStopTimer();
			bet();
			setToDefault();
		} else {
			gameOver = true;
		}
	}
}
コード例 #6
0
void Animation::calculateAnimation()
{
    if((SDL_GetTicks() - startTicks) < 1000)
    {
        Texture::setTexture(animations[(SDL_GetTicks() - startTicks) / 100]);
    }
    else
    {
            Texture::setTexture(animations[0]);
            setToDefault();
    }
}
コード例 #7
0
ファイル: FloatVarWidget.cpp プロジェクト: JoelKronander/brdf
FloatVarWidget::FloatVarWidget(QString name, float minVal, float maxVal, float defaultVal)
    : QGroupBox(name), minValue(minVal), maxValue(maxVal), defaultValue(defaultVal), updatingValue(false)
{
    QHBoxLayout *layout = new QHBoxLayout;

    // slider
    slider = new QSlider(Qt::Horizontal);
    slider->setMinimum( 0 );
    slider->setMaximum( 1000 );
    slider->setValue( floatToSlider(defaultVal) );
    slider->setMinimumWidth( 130 );
    slider->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
    connect(slider, SIGNAL(valueChanged(int)), this, SLOT(sliderChanged(int)));
    layout->addWidget( slider );

    // edit control
    edit = new FloatVarEdit;
    edit->setMinimumWidth( 20 );
    edit->setMaximumWidth( 80 );
    edit->setText( QString().setNum(defaultVal) );
    edit->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
    edit->setFixedHeight( 20 );
    QFont font = edit->font();
    font.setPointSize( 9.0 );
    edit->setFont( font );
    connect(edit, SIGNAL(editingFinished()), this, SLOT(textChanged()));
    layout->addWidget( edit );
    connect(edit, SIGNAL(setToDefault()), this, SLOT(setToDefault()));

    layout->setMargin( 0 );
    layout->setContentsMargins( 0, 2, 0, 3 );

    setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Fixed );

    setLayout(layout);
}
コード例 #8
0
ファイル: Options.cpp プロジェクト: dkouzoup/BC-RTI
BEGIN_NAMESPACE_QPOASES


/*****************************************************************************
 *  P U B L I C                                                              *
 *****************************************************************************/


/*
 *	O p t i o n s
 */
Options::Options( )
{
	setToDefault( );
}
コード例 #9
0
ファイル: Options.cpp プロジェクト: dkouzoup/BC-RTI
/*
 *	s e t T o R e l i a b l e
 */
returnValue Options::setToReliable( )
{
	setToDefault( );

	enableFullLITests             =  BT_TRUE;
	enableCholeskyRefactorisation =  1;

	#ifdef __USE_SINGLE_PRECISION__
	numRefinementSteps            =  3;
	#else
	numRefinementSteps            =  2;
	#endif

	return SUCCESSFUL_RETURN;
}
コード例 #10
0
void GameApplication::logicButtons(bool temp[]) {
	for (int i = 0; i < NUMBER_OF_BUTTON; ++i) {
		if (temp[i] == true) {
			switch (i) {
			case 0:
				if (!lockButtons) {
					startStopGame();
				}
				if (chunk) {
					Mix_PlayChannel(-1, click, 0);
				}
				temp[i] = false;
				break;
			case 1:
				if (!lockButtons) {
					setToDefault();
					loadGame(board);
					if (availableMatches() == 0) {
						startStopGame();
					}
				}
				if (chunk) {
					Mix_PlayChannel(-1, click, 0);
				}
				temp[i] = false;
				break;
			case 2:
				showHelp();
				if (chunk) {
					Mix_PlayChannel(-1, click, 0);
				}
				temp[i] = false;
				break;
			case 3:
				startStopSound();
				if (chunk) {
					Mix_PlayChannel(-1, click, 0);
				}
				temp[i] = false;
				break;
			}
		}
	}
}
コード例 #11
0
ファイル: settingswindow.cpp プロジェクト: Reemjd/genius
void SettingsWindow::on_defaultButton_clicked()
{
  setToDefault();
}
コード例 #12
0
ファイル: pVehicle.cpp プロジェクト: gbaumgart/vt
pVehicleDesc::pVehicleDesc()	//constructor sets to default
{
	setToDefault();
}
コード例 #13
0
ファイル: pFluid.cpp プロジェクト: gbaumgart/vt
pFluidDesc::pFluidDesc()
{

	setToDefault();
}
コード例 #14
0
SearchOptions::SearchOptions()
{
  setToDefault();
}