SiteResponseModel::SiteResponseModel(QObject * parent) : QThread(parent), m_calculator(0) { m_modified = false; m_hasResults = false; m_method = EquivalentLinear; m_okToContinue = true; m_isLoaded = false; connect(Units::instance(), SIGNAL(systemChanged(int)), this, SLOT(setModified())); m_randNumGen = new MyRandomNumGenerator(this); connect(m_randNumGen, SIGNAL(wasModified()), this, SLOT(setModified())); m_motionLibrary = new MotionLibrary(this); m_motionLibrary->setReadOnly(m_hasResults); connect(m_motionLibrary, SIGNAL(wasModified()), this, SLOT(setModified())); connect(this, SIGNAL(hasResultsChanged(bool)), m_motionLibrary, SLOT(setReadOnly(bool))); m_siteProfile = new SoilProfile(this); m_siteProfile->setReadOnly(m_hasResults); connect( m_siteProfile, SIGNAL(wasModified()), this, SLOT(setModified())); connect(this, SIGNAL(hasResultsChanged(bool)), m_siteProfile, SLOT(setReadOnly(bool))); m_outputCatalog = new OutputCatalog(this); m_outputCatalog->setReadOnly(m_hasResults); connect(m_motionLibrary, SIGNAL(wasModified()), this, SLOT(setModified())); connect(this, SIGNAL(hasResultsChanged(bool)), m_outputCatalog, SLOT(setReadOnly(bool))); connect(m_outputCatalog, SIGNAL(wasModified()), this, SLOT(setModified())); connect(this->motionLibrary(), SIGNAL(approachChanged(int)), m_outputCatalog->profilesCatalog(), SLOT(setApproach(int))); // Associate the output soil types catalog with the input soil types catalog // Should these have a stronger link? As in be the same object? m_outputCatalog->soilTypesCatalog()->setSoilTypeCatalog(m_siteProfile->soilTypeCatalog()); setCalculator(new EquivalentLinearCalculator(this)); m_notes = new QTextDocument(this); connect(m_notes, SIGNAL(contentsChanged()), this, SLOT(setModified())); Units::instance()->reset(); }
void ArbRamp::newRamp() { for(int i=0;i<nLines;i++) ui->tableWidget->removeRow(0); nLines=0; curFile=""; wasModified(); }
ArbRamp::ArbRamp(QWidget *parent) : QMainWindow(parent), ui(new Ui::ArbRamp) { ui->setupUi(this); curLine=-1; nLines=0; render=new RenderRamp(); ui->scrollArea->setWidget(render); delegate=new RampDelegate(ui->tableWidget); ui->tableWidget->setItemDelegate(delegate); setCurrentFile(""); curDir=""; readSettings(); addAction=new QAction(tr("Insert"),this); delAction=new QAction(tr("Delete"),this); updateAction=new QAction(tr("Update view"),this); ui->mainToolBar->addAction(addAction); ui->mainToolBar->addAction(delAction); ui->mainToolBar->addAction(updateAction); //Connect signal and slots. connect(ui->action_About,SIGNAL(triggered()),this,SLOT(about())); connect(ui->action_Quit,SIGNAL(triggered()),this,SLOT(close())); connect(ui->action_Save,SIGNAL(triggered()),this,SLOT(save())); connect(ui->actionSave_As,SIGNAL(triggered()),this,SLOT(saveAs())); connect(ui->action_Open,SIGNAL(triggered()),this,SLOT(open())); connect(ui->actionNew,SIGNAL(triggered()),this,SLOT(newRamp())); connect(ui->action_Export,SIGNAL(triggered()),this,SLOT(exportRamp())); connect(ui->mainToolBar,SIGNAL(actionTriggered(QAction*)),this, SLOT(chooseAction(QAction*))); connect(this,SIGNAL(renderUpdate(QList<QPoint>)),render, SLOT(updatePoints(QList<QPoint>))); connect(ui->tableWidget,SIGNAL(currentCellChanged(int,int,int,int)),this, SLOT(currentLine(int,int,int,int))); //So that wasModified has access to the real size of the RenderRamp object. show(); wasModified(); }
void File::setModified(bool modified) { if(m_modified != modified){ m_modified = modified; emit wasModified(m_modified); } }
void SoilType::setIsVaried(bool isVaried) { if ( m_isVaried != isVaried ) { emit wasModified(); } m_isVaried = isVaried; }
void SoilType::setNotes(const QString & notes) { if ( m_notes != notes ) { m_notes = notes; emit wasModified(); } }
void SoilType::setSaveData(bool saveData) { if ( m_saveData != saveData ) { m_saveData = saveData; emit wasModified(); } }
void SoilType::setDamping(double damping) { if ( m_damping != damping ) { m_damping = damping; emit wasModified(); } }
void NonlinearPropertyUncertainty::setLnStdev(double lnStdev) { if (fabs(m_lnStdev - lnStdev) > DBL_EPSILON) { m_lnStdev = lnStdev; emit maxChanged(lnStdev); emit wasModified(); } }
void SoilType::setNCycles(int nCycles) { if ( m_nCycles != nCycles ) { m_nCycles = nCycles; computeDarendeliCurves(); emit wasModified(); } }
void SoilType::setFreq(double freq) { if ( m_freq != freq ) { m_freq = freq; computeDarendeliCurves(); emit wasModified(); } }
void SoilType::setUntWt(double untWt) { if ( m_untWt != untWt ) { m_untWt = untWt; emit wasModified(); } }
void NonlinearPropertyUncertainty::setMax(double max) { if (fabs(m_max - max) > DBL_EPSILON) { m_max = max; emit maxChanged(m_max); emit wasModified(); } }
void NonlinearPropertyUncertainty::setMin(double min) { if (fabs(m_min - min) > DBL_EPSILON) { m_min = min; emit minChanged(m_min); emit wasModified(); } }
SoilProfile::SoilProfile(SiteResponseModel * parent) : MyAbstractTableModel(parent), m_siteResponseModel(parent) { MyRandomNumGenerator* randNumGen = m_siteResponseModel->randNumGen(); m_bedrock = new RockLayer; connect( m_bedrock, SIGNAL(wasModified()), this, SIGNAL(wasModified())); m_profileRandomizer = new ProfileRandomizer( randNumGen->gsl_pointer(), this); connect( m_profileRandomizer, SIGNAL(wasModified()), this, SIGNAL(wasModified())); m_nonlinearPropertyRandomizer = new NonlinearPropertyRandomizer( randNumGen->gsl_pointer(), this); connect( m_nonlinearPropertyRandomizer, SIGNAL(wasModified()), this, SIGNAL(wasModified())); m_soilTypeCatalog = new SoilTypeCatalog; connect(m_soilTypeCatalog, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SIGNAL(wasModified())); connect(Units::instance(), SIGNAL(systemChanged(int)), this, SLOT(updateUnits())); m_isVaried = false; m_profileCount = 100; m_inputDepth = -1; m_maxFreq = 20; m_waveFraction = 0.20; m_disableAutoDiscretization = false; m_waterTableDepth = 0.; m_layerSelectionMethod = MidDepth; }
void ArbRamp::chooseAction(QAction *action) { if(action==addAction) addPoint(); else if(action==delAction) delPoint(); else curLine=-1; wasModified(); }
void VelocityVariation::setStdev(double stdev) { if (fabs(m_stdev - stdev) > DBL_EPSILON) { m_stdev = stdev; emit stdevChanged(m_stdev); emit wasModified(); } }
bool ArbRamp::open() { QString fileName = QFileDialog::getOpenFileName( this,tr("Open Ramp"),curDir,tr("Ramp definition (*.rmp)")); if(fileName.isEmpty()||!readRamp(fileName)) return false; wasModified(); isModified=false; return true; }
void LayerThicknessVariation::setInitial(double initial) { if (fabs(m_initial - initial) > DBL_EPSILON) { m_initial = initial; emit initialChanged(m_initial); emit wasModified(); } }
void VelocityVariation::setCorrelExponent(double correlExponent) { if (fabs(m_correlExponent - correlExponent) > DBL_EPSILON) { m_correlExponent = correlExponent; emit correlExponentChanged(m_correlExponent); emit wasModified(); } }
void LayerThicknessVariation::setExponent(double exponent) { if (fabs(m_exponent - exponent) > DBL_EPSILON) { m_exponent = exponent; emit exponentChanged(m_exponent); emit wasModified(); } }
void VelocityVariation::setCorrelDelta(double correlDelta) { if (fabs(m_correlDelta - correlDelta) > DBL_EPSILON) { m_correlDelta = correlDelta; emit correlDeltaChanged(m_correlDelta); emit wasModified(); } }
void VelocityVariation::setCorrelIntercept(double correlIntercept) { if (fabs(m_correlIntercept - correlIntercept) > DBL_EPSILON) { m_correlIntercept = correlIntercept; emit correlInterceptChanged(m_correlIntercept); emit wasModified(); } }
void SoilType::setPi(double pi) { if (m_pi != pi) { m_pi = pi; computeDarendeliCurves(); emit wasModified(); } }
void SoilType::setOcr(double ocr) { if ( m_ocr != ocr ) { m_ocr = ocr; computeDarendeliCurves(); emit wasModified(); } }
void VelocityVariation::setStdevIsLayerSpecific(bool b) { if (m_stdevIsLayerSpecific != b) { m_stdevIsLayerSpecific = b; emit stdevIsLayerSpecificChanged(b); emit wasModified(); } }
void EquivalentLinearCalculator::setStrainRatio(double strainRatio) { if (m_strainRatio != strainRatio) { m_strainRatio = strainRatio; emit strainRatioChanged(m_strainRatio); emit wasModified(); } }
void LayerThicknessVariation::setEnabled(bool enabled) { if (m_enabled != enabled) { m_enabled = enabled; emit enabledChanged(this->enabled()); emit wasModified(); } }
void VelocityVariation::setCorrelFinal(double correlFinal) { if (fabs(m_correlFinal - correlFinal) > DBL_EPSILON) { m_correlFinal = correlFinal; emit correlFinalChanged(m_correlFinal); emit wasModified(); } }
void SoilType::setMeanStress(double meanStress) { if ( m_meanStress != meanStress ) { m_meanStress = meanStress; computeDarendeliCurves(); emit wasModified(); } }