Example #1
0
// set player name
void LiveInfo::setPlayer( int color, const QString &txt )
{
	(color == cheng4::ctWhite ? ui->engineLabel : ui->engineLabel_2)->setText( txt );
	// reset engine stats
	setDepth( color, 0 );
	setScore( color, 0 );
	setNodes( color, 0, 0 );
	setPV( color, QString() );
}
Example #2
0
int caClock::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QwtAnalogClock::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        if (_id < 2)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 2;
    }
#ifndef QT_NO_PROPERTIES
      else if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast< QString*>(_v) = getPV(); break;
        case 1: *reinterpret_cast< timeType*>(_v) = getTimeType(); break;
        case 2: *reinterpret_cast< QColor*>(_v) = getBaseColor(); break;
        case 3: *reinterpret_cast< bool*>(_v) = getScaleDefaultColor(); break;
        case 4: *reinterpret_cast< QColor*>(_v) = getScaleColor(); break;
        case 5: *reinterpret_cast< colMode*>(_v) = getColorMode(); break;
        }
        _id -= 6;
    } else if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: setPV(*reinterpret_cast< QString*>(_v)); break;
        case 1: setTimeType(*reinterpret_cast< timeType*>(_v)); break;
        case 2: setBaseColor(*reinterpret_cast< QColor*>(_v)); break;
        case 3: setScaleDefaultColor(*reinterpret_cast< bool*>(_v)); break;
        case 4: setScaleColor(*reinterpret_cast< QColor*>(_v)); break;
        case 5: setColorMode(*reinterpret_cast< colMode*>(_v)); break;
        }
        _id -= 6;
    } else if (_c == QMetaObject::ResetProperty) {
        _id -= 6;
    } else if (_c == QMetaObject::QueryPropertyDesignable) {
        _id -= 6;
    } else if (_c == QMetaObject::QueryPropertyScriptable) {
        _id -= 6;
    } else if (_c == QMetaObject::QueryPropertyStored) {
        _id -= 6;
    } else if (_c == QMetaObject::QueryPropertyEditable) {
        _id -= 6;
    } else if (_c == QMetaObject::QueryPropertyUser) {
        _id -= 6;
    }
#endif // QT_NO_PROPERTIES
    return _id;
}
Example #3
0
int caNumeric::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = ENumeric::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    
#ifndef QT_NO_PROPERTIES
     if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast< QString*>(_v) = getPV(); break;
        case 1: *reinterpret_cast< QColor*>(_v) = getForeground(); break;
        case 2: *reinterpret_cast< QColor*>(_v) = getBackground(); break;
        case 3: *reinterpret_cast< SourceMode*>(_v) = getPrecisionMode(); break;
        case 4: *reinterpret_cast< bool*>(_v) = getFixedFormat(); break;
        case 5: *reinterpret_cast< SourceMode*>(_v) = getLimitsMode(); break;
        case 6: *reinterpret_cast< double*>(_v) = getMaxValue(); break;
        case 7: *reinterpret_cast< double*>(_v) = getMinValue(); break;
        }
        _id -= 8;
    } else if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: setPV(*reinterpret_cast< QString*>(_v)); break;
        case 1: setForeground(*reinterpret_cast< QColor*>(_v)); break;
        case 2: setBackground(*reinterpret_cast< QColor*>(_v)); break;
        case 3: setPrecisionMode(*reinterpret_cast< SourceMode*>(_v)); break;
        case 4: setFixedFormat(*reinterpret_cast< bool*>(_v)); break;
        case 5: setLimitsMode(*reinterpret_cast< SourceMode*>(_v)); break;
        case 6: setMaxValue(*reinterpret_cast< double*>(_v)); break;
        case 7: setMinValue(*reinterpret_cast< double*>(_v)); break;
        }
        _id -= 8;
    } else if (_c == QMetaObject::ResetProperty) {
        _id -= 8;
    } else if (_c == QMetaObject::QueryPropertyDesignable) {
        _id -= 8;
    } else if (_c == QMetaObject::QueryPropertyScriptable) {
        _id -= 8;
    } else if (_c == QMetaObject::QueryPropertyStored) {
        _id -= 8;
    } else if (_c == QMetaObject::QueryPropertyEditable) {
        _id -= 8;
    } else if (_c == QMetaObject::QueryPropertyUser) {
        _id -= 8;
    }
#endif // QT_NO_PROPERTIES
    return _id;
}
Example #4
0
MainWindow::MainWindow(files_control *files) : /*QMainWindow(parent) , */ui(new Ui::MainWindow)
{
	this->files = files;
	ui->setupUi(this);

	resize(minimumWidth(), minimumHeight());

	seznam_ = new seznam();
	PV = new long double(0);
	R = new double(0);
	T = new unsigned short int(0);
	popl = new double(0);
	popl_last = new double(0);
	vysledna_hodnota = new QString();

	ui->r_line->hide();
	ui->r_label_3->hide();

	ui->poplatek_line->hide();
	ui->skutecny_label->hide();
	ui->procento->hide();

	ui->poplatek_line->setText("0,00");

	//********** doplnovani comboboxu ************
	for(int i = 0; i < 13; i++)
	{
	   ui->r_combo->addItem(QString("MIX %1: %2 %3").arg(i+1).arg(files->PA(i),6, 'f', 2).arg("p.a.", 5));
	}
	ui->r_combo->addItem(QString::fromUtf8("VlastnĂ­ hodnota"));

	//********** dosazovani hodnot ************
	connect(this->ui->r_combo, SIGNAL(currentIndexChanged(int)), this , SLOT(rLineVlastniSelected(int)));
	connect(this->ui->pv_line, SIGNAL(textChanged(QString)), this , SLOT(setPV(QString)));
	connect(this->ui->t_line, SIGNAL(textChanged(QString)), this, SLOT(setT(QString)));
	connect(this->ui->r_line, SIGNAL(textChanged(QString)), this, SLOT(setR(QString)));
	connect(this, SIGNAL(anyValueChanged()), this, SLOT(calculate()));
	connect(this->ui->otaznik_button, SIGNAL(clicked()), this, SLOT(otaznikClick()));
	connect(this->ui->action_close_window, SIGNAL(triggered()), this, SLOT(close()));
	connect(this->ui->poplatek_check, SIGNAL(clicked()), this, SLOT(poplatekChecked()));
	connect(this->ui->poplatek_line, SIGNAL(textChanged(QString)), this, SLOT(setPopl(QString)));

	rLineVlastniSelected(1);

	this->setWindowTitle(APP_NAME);

	this->ui->otaznik_button->setIcon(QIcon(QPixmap(":/img/info.png")));
}