KexiTableViewPrivate::KexiTableViewPrivate(KexiTableView* t) : appearance(t) { clearVariables(); tv = t; editOnDoubleClick = true; //Qt4 pBufferPm = 0; disableDrawContents = false; navigatorEnabled = true; contextMenuEnabled = true; skipKeyPress = false; //moved vScrollBarValueChanged_enabled = true; //moved scrollbarToolTipsEnabled = true; //moved scrollBarTipTimerCnt = 0; //moved scrollBarTip = 0; ensureCellVisibleOnShow = QPoint(-1, -1); internal_bottomMargin = tv->horizontalScrollBar()->sizeHint().height() / 2; highlightedRecord = -1; moveCursorOnMouseRelease = false; horizontalHeaderVisible = true; recentCellWithToolTip = QPoint(-1, -1); dragIndicatorRubberBand = 0; firstTimeEnsureCellVisible = true; insideResizeEvent = false; }
MaterialInfo::~MaterialInfo() { if (tga1) { tga1->wait(); delete tga1; tga1 = NULL; } if (tga2) { tga2->wait(); delete tga2; tga2 = NULL; } clearVariables(); if (cmbMaterials) { delete cmbMaterials; cmbMaterials = NULL; } if (toolbar) { delete toolbar; toolbar = NULL; } delete ui; }
Exchange::Exchange() : QThread() { multiCurrencyTradeSupport=false; exchangeDisplayOnlyCurrentPairOpenOrders=false; orderBookItemIsDedicatedOrder=false; supportsExchangeFee=true; supportsExchangeVolume=true; clearHistoryOnCurrencyChanged=false; exchangeTickerSupportsHiLowPrices=true; depthEnabledFlag=true; balanceDisplayAvailableAmount=true; minimumRequestIntervalAllowed=100; minimumRequestTimeoutAllowed=2000; decAmountFromOpenOrder=0.0; buySellAmountExcludedFee=false; calculatingFeeMode=0; supportsLoginIndicator=true; supportsAccountVolume=true; exchangeSupportsAvailableAmount=false; checkDuplicatedOID=false; isLastTradesTypeSupported=true; forceDepthLoad=false; clearVariables(); moveToThread(this); }
MidiEvent& MidiEvent::operator=(const vector<uchar>& bytes) { clearVariables(); this->resize(bytes.size()); for (int i=0; i<(int)this->size(); i++) { (*this)[i] = bytes[i]; } return *this; }
virtual void updateInternalState( Real aStepInterval ) { const VariableVector::size_type aSize( getReadOnlyVariableOffset() ); clearVariables(); fireProcesses(); setVariableVelocity( theTaylorSeries[ 0 ] ); DifferentialStepper::updateInternalState( aStepInterval ); }
MidiEvent& MidiEvent::operator=(const MidiMessage& message) { if (this == &message) { return *this; } clearVariables(); this->resize(message.size()); for (int i=0; i<(int)this->size(); i++) { (*this)[i] = message[i]; } return *this; }
void Exchange::run() { if(debugLevel)logThread->writeLogB(baseValues.exchangeName+" API Thread Started",2); clearVariables(); secondTimer=new QTimer; secondTimer->setSingleShot(true); connect(secondTimer,SIGNAL(timeout()),this,SLOT(secondSlot())); secondSlot(); exec(); }
tmp<volScalarField> forceEquation<T>::getMask() { clearVariables(); parse(maskExpression_); return tmp<volScalarField> ( new volScalarField ( getResult<volScalarField>() ) ); }
tmp<areaScalarField> faForceEquation<T>::getMask() { clearVariables(); parse(maskExpression_); return tmp<areaScalarField> ( new areaScalarField ( getScalar() ) ); }
void VariableSet::changeHand(const Hand *h, bool sticky) { if (sticky) { assert(mHand->getNumDOF() == h->getNumDOF()); assert(mHand->getEigenGrasps()->getSize() == h->getEigenGrasps()->getSize()); } mHand = h; if (!sticky) { clearVariables(); createVariables(); } }
void plStateDescriptor::read(hsStream* S) { if (S->readByte() != 1) throw hsBadParamException(__FILE__, __LINE__, "Bad plStateDescriptor IO Version"); fName = S->readSafeStr(); fVersion = S->readShort(); clearVariables(); fVariables.resize(S->readShort()); for (size_t i=0; i<fVariables.size(); i++) { fVariables[i] = new plVarDescriptor(); S->readBool(); // Redundant - tells us whether this is an SDVar or a SimpleVar fVariables[i]->read(S); } }
tmp<typename expressionSource<T>::resultField> expressionSource<T>::operator()() { clearVariables(); parse(expression_); if(!resultIsTyp<resultField>()) { FatalErrorIn("expressionSource<"+word(pTraits<T>::typeName)+">::operator()()") << "Result of " << expression_ << " is not a " << pTraits<T>::typeName << endl << exit(FatalError); } tmp<resultField> result(new resultField(getResult<resultField>())); return result; }
void AdaptiveDifferentialStepper::updateInternalState( Real aStepInterval ) { theStateFlag = false; clearVariables(); Integer theRejectedStepCounter( 0 ); while ( !calculate( aStepInterval ) ) { if ( ++theRejectedStepCounter >= theTolerableRejectedStepCount ) { THROW_EXCEPTION_INSIDE( SimulationError, String( "The times of rejections of step calculation " "exceeded a maximum tolerable count (" ) + stringCast( theTolerableRejectedStepCount ) + ")." ); } // shrink it if the error exceeds 110% aStepInterval = aStepInterval * safety * std::pow( getMaxErrorRatio(), -1.0 / getOrder() ); } const Real maxError( getMaxErrorRatio() ); // an extra calculation for resetting the activities of processes fireProcesses(); setTolerableStepInterval( aStepInterval ); theStateFlag = true; // grow it if error is 50% less than desired Real aNewStepInterval( aStepInterval ); if ( maxError < 0.5 ) { aNewStepInterval = aNewStepInterval * safety * std::pow( maxError, -1.0 / ( getOrder() + 1 ) ); } setNextStepInterval( aNewStepInterval ); DifferentialStepper::updateInternalState( aStepInterval ); }
void Module::unloadModule() { runScript(kScriptExit, this, _pc); handleActions(); _delayedActions.clear(); TwoDAReg.clear(); clearVariables(); clearScripts(); _tag.clear(); _ifo.unload(); ResMan.undo(_resModule); _newModule.clear(); _hasModule = false; }
void Module::unloadModule() { runScript(kScriptExit, this, _pc); handleActions(); _eventQueue.clear(); _delayedActions.clear(); TwoDAReg.clear(); clearVariables(); clearScripts(); _tag.clear(); _ifo.unload(); deindexResources(_resModule); _newModule.clear(); _hasModule = false; }
void faForceEquation<vector>::operator()(faMatrix<vector> &eq) { clearVariables(); DynamicList<label> cellIDs; if(!getMask(cellIDs,eq.psi().name())) { return; } Field<vector> values(cellIDs.size()); parse(valueExpression_); const areaVectorField &calculated=getVector(); forAll(cellIDs,i) { values[i]=calculated[cellIDs[i]]; } eq.setValues(cellIDs,values); }
void FaToDFA::setMode(Algorithm::modes _mode) { mode = _mode; play_timer->stop(); num = 0; actInstruction=HEADER; prewInstruction=HEADER; clearActInstruction(); clearVariables(); // because show correct solution break connectiom betwen user FA and user FA widget connect(dfa_widget,SIGNAL(FA_changed(FiniteAutomata*)),this,SLOT(setDFA(FiniteAutomata*))); switch (mode) { case PLAY_MODE: algorithm_widget->enableNext(); algorithm_widget->disablePrev(); dfa_widget->setFA(new FiniteAutomata()); //unselect instruction from algorithm window clearActInstruction(); history.clear(); actPos = 0; actInstruction = HEADER; //init start instruction because new regExp may appeare when pres step mode was in run saveStep(); break; case CHECK_MODE: case STEP_MODE: correct_FA = computeSolution(); break; case NONE: break; } if(mode == STEP_MODE) check_step_timer->start(CHECK_STEP_TIMEOUT); else check_step_timer->stop(); dfa_widget->clearStatus(); }
void forceEquation<T>::operator()(fvMatrix<T> &eq) { typedef GeometricField<T,fvPatchField,volMesh> resultField; clearVariables(); DynamicList<label> cellIDs; if(!getMask(cellIDs,eq.psi().name())) { return; } Field<T> values(cellIDs.size()); parse(valueExpression_); const resultField &calculated=getResult<resultField>(); forAll(cellIDs,i) { values[i]=calculated[cellIDs[i]]; } eq.setValues(cellIDs,values); }
MidiEvent& MidiEvent::operator=(const vector<int>& bytes) { clearVariables(); setMessage(bytes); return *this; }
void MaterialInfo::loadMaterial() { updating = true; if (material) { ui->scrollArea->setEnabled(true); setButtonColor(ui->btnColorAmbient, material->getColorAmbient()); setButtonColor(ui->btnColorDiffuse, material->getColorDiffuse()); setButtonColor(ui->btnColorEmission, material->getColorEmission()); setButtonColor(ui->btnColorSpecular, material->getColorSpecular()); ui->sldShininess->setValue(material->getShininess()); if (!ui->txtAlphaTest->hasFocus()) { ui->txtAlphaTest->setValue(material->getAlphaTest()); } ui->imgTexture1->setIcon(QIcon()); ui->imgTexture2->setIcon(QIcon()); QPixmapCache::clear(); Magic3D::Texture* texture = material->getTexture(0); if (texture) { QString file = UTILS_DEFAULT_PATH + QString::fromStdString(mainWindow->getProject()->getPathData()) + QString::fromStdString(Magic3D::ResourceManager::getTextures()->getPrefix(texture->type)) + QString::fromStdString(texture->file); if (tga1 && tga1->isFinished()) { tga1->wait(); delete tga1; tga1 = NULL; } if (!tga1) { tga1 = new LoadThread(ui->imgTexture1, file, texture, 0); connect(tga1, SIGNAL(finished(QImage*,QPushButton*,Magic3D::Texture*,int)), SLOT(loadFinished(QImage*,QPushButton*,Magic3D::Texture*,int))); tga1->start(QThread::LowestPriority); } ui->imgTexture1->setAutoFillBackground(false); ui->cmbTexture1->setCurrentIndex(ui->cmbTexture1->findText(QString::fromStdString(texture->getName()))); ui->rbClamp1->setChecked(texture->clamp); ui->rbRepeat1->setChecked(!texture->clamp); } else { ui->imgTexture1->setStyleSheet(tr("* {background-color : %1}").arg(QColor(128, 128, 128, 255).name())); ui->imgTexture1->setAutoFillBackground(true); ui->cmbTexture1->setCurrentIndex(ui->cmbTexture1->findText(UTILS_NONE)); } texture = material->getTexture(1); if (texture) { QString file = UTILS_DEFAULT_PATH + QString::fromStdString(mainWindow->getProject()->getPathData()) + QString::fromStdString(Magic3D::ResourceManager::getTextures()->getPrefix(texture->type)) + QString::fromStdString(texture->file); if (tga2 && tga2->isFinished()) { tga2->wait(); delete tga2; tga2 = NULL; } if (!tga2) { tga2 = new LoadThread(ui->imgTexture2, file, texture, 1); connect(tga2, SIGNAL(finished(QImage*,QPushButton*,Magic3D::Texture*,int)), SLOT(loadFinished(QImage*,QPushButton*,Magic3D::Texture*,int))); tga2->start(QThread::LowestPriority); } ui->imgTexture2->setAutoFillBackground(false); ui->cmbTexture2->setCurrentIndex(ui->cmbTexture2->findText(QString::fromStdString(texture->getName()))); ui->rbClamp2->setChecked(texture->clamp); ui->rbRepeat2->setChecked(!texture->clamp); } else { ui->imgTexture2->setStyleSheet(tr("* {background-color : %1}").arg(QColor(128, 128, 128, 255).name())); ui->imgTexture2->setAutoFillBackground(true); ui->cmbTexture2->setCurrentIndex(ui->cmbTexture2->findText(UTILS_NONE)); } Magic3D::Shader* shader = material->getShader(); if (shader) { ui->cmbShader->setCurrentIndex(ui->cmbShader->findText(QString::fromStdString(shader->getName()))); } else { ui->cmbShader->setCurrentIndex(ui->cmbShader->findText(UTILS_NONE)); } switch (material->getBlend()) { case Magic3D::eBLEND_ALPHA: ui->rbAlpha->setChecked(true); break; case Magic3D::eBLEND_ADD: ui->rbAdd->setChecked(true); break; case Magic3D::eBLEND_MULTIPLY: ui->rbMultiply->setChecked(true); break; case Magic3D::eBLEND_DIVIDE: ui->rbDivide->setChecked(true); break; case Magic3D::eBLEND_INVERT: ui->rbInvert->setChecked(true); break; case Magic3D::eBLEND_COLOR: ui->rbColor->setChecked(true); break; default: break; } clearVariables(); ui->gbShaderVars->setVisible(material->getVarCount() > 0); for (int i = 0; i < material->getVarCount(); i++) { Magic3D::MaterialVar* variable = material->getVar(i); MaterialVar* pnl = NULL; switch (variable->getType()) { case Magic3D::eSHADER_VAR_FLOAT: case Magic3D::eSHADER_VAR_FLOAT_VEC2: case Magic3D::eSHADER_VAR_FLOAT_VEC3: case Magic3D::eSHADER_VAR_FLOAT_VEC4: { pnl = new MaterialVar_Float(mainWindow); break; } case Magic3D::eSHADER_VAR_INT: case Magic3D::eSHADER_VAR_INT_VEC2: case Magic3D::eSHADER_VAR_INT_VEC3: case Magic3D::eSHADER_VAR_INT_VEC4: { pnl = new MaterialVar_Integer(mainWindow); break; } case Magic3D::eSHADER_VAR_BOOL: case Magic3D::eSHADER_VAR_BOOL_VEC2: case Magic3D::eSHADER_VAR_BOOL_VEC3: case Magic3D::eSHADER_VAR_BOOL_VEC4: { pnl = new MaterialVar_Boolean(mainWindow); break; } case Magic3D::eSHADER_VAR_FLOAT_MAT2: case Magic3D::eSHADER_VAR_FLOAT_MAT3: case Magic3D::eSHADER_VAR_FLOAT_MAT4: { pnl = new MaterialVar_Matrix(mainWindow); break; } case Magic3D::eSHADER_VAR_SAMPLER_2D: case Magic3D::eSHADER_VAR_SAMPLER_CUBE: { pnl = new MaterialVar_Texture(mainWindow); static_cast<MaterialVar_Texture*>(pnl)->updateTextureCombo(texturesList); break; } default: break; } if (pnl) { pnl->setMaterial(material); pnl->setMaterialVarIndex(i); pnl->setMaterialInfo(this); pnl->update(); variables.append(pnl); ui->layoutShaderVars->addWidget(pnl); } } } else { ui->scrollArea->setEnabled(false); setButtonColor(ui->btnColorAmbient, Magic3D::ColorRGBA()); setButtonColor(ui->btnColorDiffuse, Magic3D::ColorRGBA()); setButtonColor(ui->btnColorEmission, Magic3D::ColorRGBA()); setButtonColor(ui->btnColorSpecular, Magic3D::ColorRGBA()); ui->sldShininess->setValue(0); ui->imgTexture1->setIcon(QIcon()); ui->imgTexture2->setIcon(QIcon()); ui->cmbTexture1->setCurrentIndex(0); ui->cmbTexture2->setCurrentIndex(0); ui->cmbShader->setCurrentIndex(0); ui->txtAlphaTest->setValue(0.0f); clearVariables(); ui->gbShaderVars->setVisible(false); } ui->actDelete->setEnabled(material); updating = false; }
MidiEvent::MidiEvent(void) : MidiMessage() { clearVariables(); }
void Exchange_BitCurex::clearValues() { clearVariables(); if(julyHttp)julyHttp->clearPendingData(); }
void Exchange_BTCChina::clearValues() { if(julyHttpAuth)julyHttpAuth->clearPendingData(); if(julyHttpPublic)julyHttpPublic->clearPendingData(); clearVariables(); }
MidiEvent::MidiEvent(int command, int p1, int p2) : MidiMessage(command, p1, p2) { clearVariables(); }
VariableSet::~VariableSet() { clearVariables(); }
void Exchange_Cryptsy::clearValues() { clearVariables(); if(ShibeHttp)ShibeHttp->clearPendingData(); }
MidiEvent::MidiEvent(int command) : MidiMessage(command) { clearVariables(); }