EventSearch::EventSearch(QWidget *parent) : QWidget(parent) { // Heisann mainLayout = new QGridLayout(this); setLayout(mainLayout); includeDates = new QCheckBox(QString("Inkluder datoområde?")); mainLayout->addWidget(includeDates, 0, 0, 1, 2); fromLabel = new QLabel("&Fra:", this); fromSearch = new QDateEdit(this); fromLabel->setBuddy(fromSearch); mainLayout->addWidget(fromLabel, 1, 0); mainLayout->addWidget(fromSearch, 1, 1); toLabel = new QLabel("&Til:", this); toSearch = new QDateEdit(this); toLabel->setBuddy(toSearch); mainLayout->addWidget(toLabel, 2, 0); mainLayout->addWidget(toSearch, 2, 1); titleLabel = new QLabel("T&ittel:", this); titleSearch = new QLineEdit(this); titleLabel->setBuddy(titleSearch); mainLayout->addWidget(titleLabel, 3, 0); mainLayout->addWidget(titleSearch, 3, 1); descriptionLabel = new QLabel("&Beskrivelse:", this); descriptionSearch = new QLineEdit(this); descriptionLabel->setBuddy(descriptionSearch); mainLayout->addWidget(descriptionLabel, 4, 0); mainLayout->addWidget(descriptionSearch, 4, 1); participantLabel = new QLabel("&Deltager:", this); participantSearch = new QLineEdit(this); participantLabel->setBuddy(participantSearch); mainLayout->addWidget(participantLabel, 5, 0); mainLayout->addWidget(participantSearch, 5, 1); search = new QPushButton("&Søk", this); mainLayout->addWidget(search, 6, 0); clear = new QPushButton("&Rens", this); mainLayout->addWidget(clear, 6, 1); connect(clear, SIGNAL(clicked()), this, SLOT(clearFields())); connect(search, SIGNAL(clicked()), this, SLOT(searchClicked())); connect(includeDates, SIGNAL(toggled(bool)), this, SLOT(setDateFieldState(bool))); includeDates->setChecked(false); setDateFieldState(false); //connect(this, SIGNAL(queryArgs(const EventHandler::QueryArgs&)), this, SLOT(debugQuery(const EventHandler::QueryArgs&))); clearFields(); }
void Card::deleteRecord(void){ QSqlDatabase db; db.removeDatabase("qt_sql_default_connection"); db = QSqlDatabase::addDatabase("QMYSQL"); db.setHostName("www.themindspot.com"); db.setPort(3306); db.setDatabaseName("themind1_AMS"); db.setUserName("themind1_ams"); db.setPassword("nerdsrule"); db.open(); QSqlQuery record; record.prepare("DELETE FROM SurveyPerson WHERE surveyPersonID = ?"); record.addBindValue(cardID->text().toInt()); record.exec(); record.clear(); db.close(); clearFields(); emit newRecord(); return; }
/*! * \brief GUI::ChangeDeleteUserDialog::slotDeleteUser * Löscht den aktuellen Benutzer aus der Datenbank und ruft * die Funktionen slotUpdateUserList und clearFileds auf. */ void GUI::ChangeDeleteUserDialog::slotDeleteUser() { bool deletedUser = false; if(mSelectedEmail.isEmpty()) { QMessageBox::information(this, "Benutzer loeschen", "Benutzer in der Liste anwaehlen."); } else { if(ui->passwordLineEdit->text() == mHousehold->getUserPassword()) { for(int i = 0; i < mUserList.size(); i++) { if(mUserList.at(i).getEmail() == ui->emailLineEdit->text()) { if(mHousehold->deleteUser(mUserList.at(i).getUserId())) { slotUpdateUserList(); clearFields(); deletedUser = true; } } } } else { QMessageBox::information(this, "Benutzer loeschen", "Passwort eingeben"); } } if(!deletedUser) { QMessageBox::information(this, "Benutzer loeschen", "Benutzer in der Liste anwaehlen und in Email Feld nicht ändern."); } }
void ossimNitfSensraTag::parseStream(std::istream& in) { clearFields(); in.read(theRefRow, REF_ROW_SIZE); in.read(theRefCol, REF_COL_SIZE); in.read(theSensorModel, SENSOR_MODEL_SIZE); in.read(theSensorMount, SENSOR_MOUNT_SIZE); in.read(theSensorLoc, SENSOR_LOC_SIZE); in.read(theSensorAltSrc, SENSOR_ALT_SRC_SIZE); in.read(theSensorAlt, SENSOR_ALT_SIZE); in.read(theSensorAltUnit, SENSOR_ALT_UNIT_SIZE); in.read(theSensorAgl, SENSOR_AGL_SIZE); in.read(theSensorPitch, SENSOR_PITCH_SIZE); in.read(theSensorRoll, SENSOR_ROLL_SIZE); in.read(theSensorYaw, SENSOR_YAW_SIZE); in.read(thePlatformPitch, PLATFORM_PITCH_SIZE); in.read(thePlatformRoll, PLATFORM_ROLL_SIZE); in.read(thePlatformHdg, PLATFORM_HDG_SIZE); in.read(theGroundSpdSrc, GROUND_SPD_SRC_SIZE); in.read(theGroundSpeed, GROUND_SPEED_SIZE); in.read(theGroundSpdUnit, GROUND_SPD_UNIT_SIZE); in.read(theGroundTrack, GROUND_TRACK_SIZE); in.read(theVerticalVel, VERTICAL_VEL_SIZE); in.read(theVertVelUnit, VERT_VEL_UNIT_SIZE); in.read(theSwathFrames, SWATH_FRAMES_SIZE); in.read(theNSwaths, N_SWATHS_SIZE); in.read(theSpotNum, SPOT_NUM_SIZE); }
void rspfNitfIchipbTag::parseStream(std::istream& in) { clearFields(); in.read(theXfrmFlag, XFRM_FLAG_SIZE); in.read(theScaleFactor, SCALE_FACTOR_SIZE); in.read(theAnamrphCorr, ANAMRPH_CORR_SIZE); in.read(theScanBlock, SCANBLK_NUM_SIZE); in.read(theOpRow11, OP_ROW_11_SIZE); in.read(theOpCol11, OP_COL_11_SIZE); in.read(theOpRow12, OP_ROW_12_SIZE); in.read(theOpCol12, OP_COL_12_SIZE); in.read(theOpRow21, OP_ROW_21_SIZE); in.read(theOpCol21, OP_COL_21_SIZE); in.read(theOpRow22, OP_ROW_22_SIZE); in.read(theOpCol22, OP_COL_22_SIZE); in.read(theFiRow11, FI_ROW_11_SIZE); in.read(theFiCol11, FI_COL_11_SIZE); in.read(theFiRow12, FI_ROW_12_SIZE); in.read(theFiCol12, FI_COL_12_SIZE); in.read(theFiRow21, FI_ROW_21_SIZE); in.read(theFiCol21, FI_COL_21_SIZE); in.read(theFiRow22, FI_ROW_22_SIZE); in.read(theFiCol22, FI_COL_22_SIZE); in.read(theFullImageRow, FI_ROW_SIZE); in.read(theFullImageCol, FI_COL_SIZE); }
rspfErrorCode rspfRpfImageDisplayParameterSubheader::parseStream(istream& in, rspfByteOrder byteOrder) { clearFields(); if(in) { theStartOffset = in.tellg(); in.read((char*)&theNumberOfImageRows, 4); in.read((char*)&theNumberOfImageCodesPerRow, 4); in.read((char*)&theImageCodeBitLength, 1); theEndOffset = in.tellg(); rspfEndian anEndian; if(anEndian.getSystemEndianType() != byteOrder) { anEndian.swap(theNumberOfImageRows); anEndian.swap(theNumberOfImageCodesPerRow); } } else { return rspfErrorCodes::RSPF_ERROR; } return rspfErrorCodes::RSPF_OK; }
OFile& OFile::rewind() { // we use here "hard" rewind, which means close/reopen // the reason is that normal rewind does not work when in append mode // moreover, we can take a backup of the file plumed_assert(fp); clearFields(); if(gzfp) { #ifdef __PLUMED_HAS_ZLIB gzclose((gzFile)gzfp); #endif } else fclose(fp); if(!comm || comm->Get_rank()==0) { std::string fname=this->path; size_t found=fname.find_last_of("/\\"); std::string directory=fname.substr(0,found+1); std::string file=fname.substr(found+1); std::string backup=directory+backstring +".last."+file; int check=rename(fname.c_str(),backup.c_str()); plumed_massert(check==0,"renaming "+fname+" into "+backup+" failed for reason: "+strerror(errno)); } if(gzfp) { #ifdef __PLUMED_HAS_ZLIB gzfp=(void*)gzopen(const_cast<char*>(this->path.c_str()),"w9"); #endif } else fp=std::fopen(const_cast<char*>(path.c_str()),"w"); return *this; }
void ossimNitfCsexraTag::parseStream(std::istream& in) { clearFields(); in.read(theSensor, 6); in.read(theTileFirstLine, 12); in.read(theImageTimeDuration, 12); in.read(theMaxGsd, 5); in.read(theAlongScanGsd, 5); in.read(theCrossScanGsd, 5); in.read(theGeoMeanGsd, 5); in.read(theAlongScanVertGsd, 5); in.read(theCrossScanVertGsd, 5); in.read(theGeoMeanVertGsd, 5); in.read(theGeoBetaAngle, 5); in.read(theDynamicRange, 5); in.read(theLine, 7); in.read(theSamples, 5); in.read(theAngleToNorth, 7); in.read(theObliquityAngle, 6); in.read(theAzOfObliquity, 7); in.read(theGrdCover, 1); in.read(theSnowDepthCategory, 1); in.read(theSunAzimuth, 7); in.read(theSunElevation, 7); in.read(thePredictedNiirs, 3); in.read(theCircularError, 3); in.read(theLinearError, 3); }
void ossimNitfRsmecaIsg::parseStream(std::istream& in) { clearFields(); in.read(m_numopg, NUMOPG_SIZE); m_opgNum = ossimString(m_numopg).toUInt32(); m_errCovNum = (m_opgNum * (m_opgNum + 1)) / 2; ossim_uint32 i = 0; char temp1[FLOAT21_SIZE+1]; temp1[FLOAT21_SIZE] = '\0'; m_errcvg.resize(m_errCovNum); for (i=0; i < m_errCovNum; ++i) { in.read(temp1, FLOAT21_SIZE); m_errcvg[i] = FILL21; m_errcvg[i] = temp1; } in.read(m_tcdf, TCDF_SIZE); in.read(m_ncseg, NCSEG_SIZE); m_corSegNum = ossimString(m_ncseg).toUInt32(); m_corseg.resize(m_corSegNum); m_tauseg.resize(m_corSegNum); for (i=0; i < m_corSegNum; ++i) { in.read(temp1, FLOAT21_SIZE); m_corseg[i] = FILL21; m_corseg[i] = temp1; in.read(temp1, FLOAT21_SIZE); m_tauseg[i] = FILL21; m_tauseg[i] = temp1; } }
void ossimNitfTextHeaderV2_0::parseStream(std::istream &in) { if(in) { clearFields(); in.read(theFilePartType, 2); in.read(theTextId, 10); in.read(theDataAndTime, 14); in.read(theTextTitle, 80); in.read(theTextSecurityClassification, 1); in.read(theTextCodewords, 40); in.read(theTextControlAndHandling, 40); in.read(theTextReleasingInstructions, 40); in.read(theTextClassificationAuthority, 20); in.read(theTextSecurityControlNumber, 20); in.read(theTextSecurityDowngrade, 6); if(ossimString(theTextSecurityDowngrade) == "999998") { in.read(theTextSecurityDowngradeEvent, 40); } in.read(theTextEncyption, 1); in.read(theTextFormat, 3); in.read(theExtSubheaderDataLength, 5); long dataLength = ossimString(theExtSubheaderDataLength).toLong(); if(dataLength > 0) { in.read(theExtSubheaderOverflow, 3); // ignore the data for now in.ignore(dataLength - 3); } } }
bool ossimQuickbirdMetaData::open(const ossimFilename& imageFile) { static const char MODULE[] = "ossimQuickbirdMetaData::open"; clearFields(); //retrieve information from the metadata file //if the Quickbird tif is 02APR01105228-M1BS-000000128955_01_P001.TIF //the metadata file will be 02APR01105228-M1BS-000000128955_01_P001.IMD ossimFilename metadatafile = imageFile; metadatafile.setExtension(ossimString("IMD")); if( parseMetaData(metadatafile) == false ) { if(traceDebug()) { ossimNotify(ossimNotifyLevel_WARN) << MODULE << " errors parsing metadata" << std::endl; } return false; } return true; }
void ossimNitfUse00aTag::parseStream(std::istream& in) { clearFields(); in.read(theAngleToNorth, ANGLE_TO_NORTH_SIZE); in.read(theMeanGsd, MEAN_GSD_SIZE); in.read(theField3, FIELD3_SIZE); in.read(theDynamicRange, DYNAMIC_RANGE_SIZE); in.read(theField5, FIELD5_SIZE); in.read(theField6, FIELD6_SIZE); in.read(theField7, FIELD7_SIZE); in.read(theOblAng, OBL_ANG_SIZE); in.read(theRollAng, ROLL_ANG_SIZE); in.read(theField10, FIELD10_SIZE); in.read(theField11, FIELD11_SIZE); in.read(theField12, FIELD12_SIZE); in.read(theField13, FIELD13_SIZE); in.read(theField14, FIELD14_SIZE); in.read(theField15, FIELD15_SIZE); in.read(theField16, FIELD16_SIZE); in.read(theNRef, N_REF_SIZE); in.read(theRevNum, REV_NUM_SIZE); in.read(theNSeg, N_SEG_SIZE); in.read(theMaxLpSeg, MAX_LP_SEG_SIZE); in.read(theField20, FIELD20_SIZE); in.read(theField21, FIELD21_SIZE); in.read(theSunEl, SUN_EL_SIZE); in.read(theSunAz, SUN_AZ_SIZE); }
void __fastcall TfrmRequestCompetitorsListEdit::bbtnUpdateCompetitorClick( TObject *Sender) { TPerson personToStore = dmCurrentState->getPerson(); TCompetitor *competitor =(TCompetitor*)competitorsList->Items[strgrdCompetitorsList->Row -1]; //Изменить его основные атрибуты, в соответствии с данными формы personToStore.setSurname(lbledtSurname->Text.Trim()); personToStore.setName(lbledtName->Text.Trim()); personToStore.setPatronymic(lbledtPatronymic->Text.Trim()); //Убрать из базы данных боевые версии для участника competitor->eraseFightVersion(); //Убрать участника из категорий TCategory::uncategory(competitor->getId()); //Заносим измения в базу данных if(CompetitorIntoDatabase(personToStore, competitor)){ //Определить участника в категорию TCategory::destributeCompetitor(*competitor, dmCurrentState->getCompetition()); //изменить пиктограмму и подпись кнопок closeEditMode(); //Очистить поля clearFields(); //Изменить значения в таблице addToCompetitorStringGrid(*competitor, strgrdCompetitorsList->Row, strgrdCompetitorsList); dmCurrentState->setPerson(personToStore); } }
void __fastcall TfrmRequestCompetitorsListEdit::bbtnAddCompetitorClick( TObject *Sender) { //Перосна, которую будем сохранять TPerson personToStore; //Будем сохранять субъект из полей на форме personToStore.setId(0); personToStore.setSurname(lbledtSurname->Text.Trim()); personToStore.setName(lbledtName->Text.Trim()); personToStore.setPatronymic(lbledtPatronymic->Text.Trim()); //Если в базе есть такой субъект, получить его идентификатор personToStore.likeAs(); //Создать нового участника TCompetitor *newCompetitor = new TCompetitor(); //Передать участника с формы, в базу данных if(CompetitorIntoDatabase(personToStore, newCompetitor)){ //Добавить участника в список competitorsList->Add(newCompetitor); //Определить участника в категорию TCategory::destributeCompetitor(*newCompetitor, dmCurrentState->getCompetition()); //Доавить участника в конец string grid addToCompetitorStringGrid(*newCompetitor, competitorsList->Count, strgrdCompetitorsList); //Увеличить количество строк strgrdCompetitorsList->RowCount = competitorsList->Count+1; //Очистить поля, для ввода нового участника clearFields(); //Установить персону как текущую dmCurrentState->setPerson(personToStore); } }
void PropertiesWidget::updateRegisterInfo(boost::shared_ptr<ChimeraTK::RegisterInfo> const& registerInfo) { // There are node elements ("modules") which don't have register information if(!registerInfo) { clearFields(); return; } setEnabled(true); ui.registerPathDisplay->setText(static_cast<const std::string&>(registerInfo->getRegisterName()).c_str()); setShape( registerInfo->getNumberOfDimensions(), registerInfo->getNumberOfChannels(), registerInfo->getNumberOfElements()); setType(registerInfo->getDataDescriptor()); // Try to cast to the old, numeric addressed registerInfo. auto numericAddressedInfo = boost::dynamic_pointer_cast<ChimeraTK::RegisterInfoMap::RegisterInfo>(registerInfo); // If the cast succeeded fill the numeric addressed and fixed point fields. // This info only exists for this type of registers. if(numericAddressedInfo) { setAddress(numericAddressedInfo->bar, numericAddressedInfo->address, numericAddressedInfo->nBytes); setFixedPointInfo(numericAddressedInfo->width, numericAddressedInfo->nFractionalBits, numericAddressedInfo->signedFlag, registerInfo->getNumberOfDimensions()); } else { ui.numericalAddressGroupBox->hide(); ui.fixedPointGroupBox->hide(); } }
ossimNitfRpcBase::ossimNitfRpcBase() : ossimNitfRegisteredTag() { // Set the tag length in base. setTagLength(1041); clearFields(); }
rspfRpfBoundaryRectRecord::rspfRpfBoundaryRectRecord() : m_zone(), m_coverage(), m_numberOfFramesNorthSouth(0), m_numberOfFramesEastWest(0) { clearFields(); }
Card::Card(QSqlQueryModel *personModel, QSqlQueryModel *responseModel, QWidget *parent) : CardUI(parent){ setFormPersonMap(personModel); setFormResponseMap(responseModel); connect(submitNew, SIGNAL(clicked()), this, SLOT(addRecord())); connect(submitEdit, SIGNAL(clicked()), this, SLOT(editRecord())); connect(submitReset, SIGNAL(clicked()), this, SLOT(clearFields())); connect(submitDelete,SIGNAL(clicked()), this, SLOT(deleteRecord())); }
void StartWindow::on_new_button_pressed() { user = false; save_actual_parameters(); parameters->addNew(); insertParametersNames(); clearFields(); old_choosen = ""; user = true; }
void ossimNitfLocalCartographicTag::parseStream(std::istream& in) { clearFields(); in.read(theLengthUnits, 3); in.read(theEastingInterval, 5); in.read(theNorthingInterval, 5); in.read(theEastingReferenceOrigin, 15); in.read(theNorthingReferenceOrigin, 15); }
/*! * \brief GUI::ChangeDeleteUserDialog::slotChangeUser * Ändert die Daten des angezeigten Benutzers in der Datenbank, * aktualisiert die Benutzerliste und bereinigt alle Benutzerdatenfelder. */ void GUI::ChangeDeleteUserDialog::slotChangeUser() { if(mSelectedEmail.isEmpty()) { QMessageBox::information(this, "Benutzerdate aendern", "Benutzer in der Liste anwaehlen."); } else { if(ui->passwordLineEdit->text() == mHousehold->getUserPassword() && ui->confirmPasswordLineEdit->text() == ui->confirmAgainPasswordLineEdit->text()) { for(int i = 0; i < mUserList.size(); i++) { if(mUserList.at(i).getUserId() == mSelectedUserId) { logic::User lUser; lUser.setUserId(mSelectedUserId); lUser.setFirstName(ui->forenameLineEdit->text()); lUser.setLastName(ui->familyNameLineEdit->text()); lUser.setBirthDate(ui->birthDayDateEdit->date()); if(ui->lockedCheckBox->isChecked()) { lUser.setLocked(true); } else { lUser.setLocked(false); } lUser.setLoginTries(mUserList.at(i).getLoginTries()); lUser.setEmail(ui->emailLineEdit->text()); if(!ui->confirmPasswordLineEdit->text().isEmpty()) { lUser.setPassword(hashPasw(ui->confirmPasswordLineEdit->text())); } else { lUser.setPassword(mUserList.at(i).getPassword()); } lUser.setBalance(ui->balanceLineEdit->text().toDouble()); if(mHousehold->updateUser(lUser)) { slotUpdateUserList(); clearFields(); } } } } else { QMessageBox::information(this, "Benutzerdaten aendern", "Passwort eingeben"); } } }
/*! * \brief GUI::ChangeDeleteUserDialog::slotInsertUser * Überprüft ob alle Eingabefelder ausgefüllt wurden und fügt, * wenn das Ergebnis der Prüfung positiv war, einen neuen User hinzu. */ void GUI::ChangeDeleteUserDialog::slotInsertUser() { if(ui->forenameLineEdit->text().isEmpty()) { QMessageBox::information(this, "Benutzer hinzufuegen", "Vorname eingeben"); } else if(ui->familyNameLineEdit->text().isEmpty()) { QMessageBox::information(this, "Benutzer hinzufuegen", "Familienname eingeben"); } else if(ui->emailLineEdit->text().isEmpty() || !mValidEmail) { QMessageBox::information(this, "Benutzer hinzufuegen", "Gültige Emailadresse eingeben"); } else if(ui->confirmPasswordLineEdit->text().isEmpty() || ui->confirmPasswordLineEdit->text() != ui->confirmAgainPasswordLineEdit->text()) { QMessageBox::information(this, "Benutzer hinzufuegen", "Passwort eingeben"); } else { if(ui->passwordLineEdit->text() == mHousehold->getUserPassword()) { logic::User user; user.setEmail(ui->emailLineEdit->text()); if(ui->lockedCheckBox->isChecked()) { user.setLocked(true); user.setLoginTries(3); } else { user.setLocked(false); user.setLoginTries(0); } user.setPassword(hashPasw(ui->confirmPasswordLineEdit->text())); user.setBalance(ui->balanceLineEdit->text().toDouble()); user.setFirstName(ui->forenameLineEdit->text()); user.setLastName(ui->familyNameLineEdit->text()); user.setBirthDate(ui->birthDayDateEdit->date()); if(!mHousehold->insertUser(user)) { QMessageBox::information(this, "Benutzer hinzufuegen", "Benutzer konnte nicht hinzugefuegt werden"); } clearFields(); } else { QMessageBox::information(this, "Benutzer hinzufuegen", "Richtiges Passwort eingeben"); } } slotUpdateUserList(); }
void __fastcall TfrmRequestCompetitorsListEdit::bbtnCancelCompetitorClick( TObject *Sender) { if(MessageDlg("Отменить изменения данных?", mtConfirmation, TMsgDlgButtons() << mbYes << mbNo, 0) == mrYes){ //-- отменить измения участника clearFields(); closeEditMode(); } }
void ossimNitfRpcBase::parseStream(std::istream& in) { clearFields(); in.read(theSuccess, SUCCESS_SIZE); in.read(theErrorBias, ERROR_BIAS_SIZE); in.read(theErrRand, ERR_RAND_SIZE); in.read(theLineOffset, LINE_OFFSET_SIZE); in.read(theSampleOffset, SAMPLE_OFFSET_SIZE); in.read(theGeodeticLatOffset, GEODETIC_LAT_OFFSET_SIZE); in.read(theGeodeticLonOffset, GEODETIC_LON_OFFSET_SIZE); in.read(theGeodeticHeightOffset, GEODETIC_HEIGHT_OFFSET_SIZE); in.read(theLineScale, LINE_SCALE_SIZE); in.read(theSampleScale, SAMPLE_SCALE_SIZE); in.read(theGeodeticLatScale, GEODETIC_LAT_SCALE_SIZE); in.read(theGeodeticLonScale, GEODETIC_LON_SCALE_SIZE); in.read(theGeodeticHeightScale, GEODETIC_HEIGHT_SCALE_SIZE); ossim_uint32 idx = 0; char temp1[LINE_NUMERATOR_COEFFICIENT_SIZE+1]; temp1[LINE_NUMERATOR_COEFFICIENT_SIZE] = '\0'; for(idx = 0; idx < LINE_NUMERATOR_COEFFICIENT_COUNT; ++idx) { in.read(temp1, LINE_NUMERATOR_COEFFICIENT_SIZE); theLineNumeratorCoefficient[idx] = temp1; } char temp2[LINE_DENOMINATOR_COEFFICIENT_SIZE+1]; temp2[LINE_DENOMINATOR_COEFFICIENT_SIZE] = '\0'; for(idx = 0; idx < LINE_DENOMINATOR_COEFFICIENT_COUNT; ++idx) { in.read(temp2, LINE_DENOMINATOR_COEFFICIENT_SIZE); theLineDenominatorCoefficient[idx] = temp2; } char temp3[SAMPLE_NUMERATOR_COEFFICIENT_SIZE+1]; temp3[SAMPLE_NUMERATOR_COEFFICIENT_SIZE] = '\0'; for(idx = 0; idx < SAMPLE_NUMERATOR_COEFFICIENT_COUNT; ++idx) { in.read(temp3, SAMPLE_NUMERATOR_COEFFICIENT_SIZE); theSampleNumeratorCoefficient[idx] = temp3; } char temp4[SAMPLE_DENOMINATOR_COEFFICIENT_SIZE+1]; temp4[SAMPLE_DENOMINATOR_COEFFICIENT_SIZE] = '\0'; for(idx = 0; idx < SAMPLE_DENOMINATOR_COEFFICIENT_COUNT; ++idx) { in.read(temp4, SAMPLE_DENOMINATOR_COEFFICIENT_SIZE); theSampleDenominatorCoefficient[idx] = temp4; } }
void StartWindow::on_delte_buton_pressed() { user = false; std::string tmp = choose_combo_box.get_active_text(); if (tmp != "") { parameters->remove(tmp); insertParametersNames(); old_choosen = ""; } clearFields(); user = true; }
rspfErrorCode rspfRpfBoundaryRectRecord::parseStream(std::istream& in, rspfByteOrder byteOrder) { if(in) { clearFields(); in.read((char*)&m_productDataType, 5); in.read((char*)&m_compressionRatio, 5); in.read((char*)&m_scale, 12); in.read((char*)&m_zone, 1); in.read((char*)&m_producer, 5); rspfString tmpScale(m_scale); tmpScale.trim(); if (!tmpScale.empty()) { if (tmpScale.beforePos(2) != "1:") { if (tmpScale.afterPos(tmpScale.size()-2)!="M" && tmpScale.afterPos(tmpScale.size()-2)!="K") { int tmpScaleValue = tmpScale.toInt(); if (tmpScaleValue > 0) { tmpScale = rspfString("1:" + tmpScale); memset(m_scale, ' ', 12); memcpy(m_scale, tmpScale.c_str(), 12); } } } } m_coverage.parseStream(in, byteOrder); in.read((char*)&m_numberOfFramesNorthSouth, 4); in.read((char*)&m_numberOfFramesEastWest, 4); if( rspf::byteOrder() != byteOrder ) { rspfEndian anEndian; anEndian.swap(m_numberOfFramesNorthSouth); anEndian.swap(m_numberOfFramesEastWest); } } else { return rspfErrorCodes::RSPF_ERROR; } return rspfErrorCodes::RSPF_OK; }
ReceiptManager::ReceiptManager(const QString dbConnectionsString, const int id, QWidget *parent) : QDialog(parent), SqlExtension(dbConnectionsString), ui(new Ui::ReceiptManager) { ui->setupUi(this); clearFields(); fillFields(id); ui->pushButtonAddReceipt->setText("Обновить квитанцию"); ui->pushButtonAddReceipt->setProperty("mode",id); setWindowTitle("Управление квитанцией №"+id); connect(ui->pushButtonAddReceipt, SIGNAL(clicked()), this, SLOT(accept())); connect(ui->pushButtonClose,SIGNAL(clicked()),this, SLOT(reject())); }
/*! * \brief GUI::ChangeDeleteUserDialog::ChangeDeleteUserDialog * Konstruktor setzt alle Passwortfelder auf den Passwort echomode und ruft die Funktionen connects, * slotUpdateUserList und clearFields auf. * \param household * \param parent */ GUI::ChangeDeleteUserDialog::ChangeDeleteUserDialog(logic::Household *household, QWidget *parent) : QDialog(parent), mHousehold(household), ui(new Ui::ChangeDeleteUserDialog) { ui->setupUi(this); ui->confirmPasswordLineEdit->setEchoMode(QLineEdit::Password); ui->confirmAgainPasswordLineEdit->setEchoMode(QLineEdit::Password); ui->passwordLineEdit->setEchoMode(QLineEdit::Password); mHousehold->retrieveUserList(mUserList); connects(); slotUpdateUserList(); clearFields(); }
void Card::addRecord(void){ if ( readyToSubmit() == false){ return; } QSqlDatabase db; db.removeDatabase("qt_sql_default_connection"); db = QSqlDatabase::addDatabase("QMYSQL"); db.setHostName("www.themindspot.com"); db.setPort(3306); db.setDatabaseName("themind1_AMS"); db.setUserName("themind1_ams"); db.setPassword("nerdsrule"); db.open(); QSqlQuery record; record.prepare("INSERT INTO `SurveyPerson` (`surveyPersonID`, `surveyID`, `firstName`, `middleInitial`, `lastName`, `emailAddress`, `emailDomain`, `isMember`)" "VALUES (:id, :sid, :f, :mi, :l, :ea, :ed, :member)"); record.bindValue(":id", NULL); record.bindValue(":sid", 1); record.bindValue(":f",fnText->text()); record.bindValue(":mi",miText->text()); record.bindValue(":l",lnText->text()); record.bindValue(":ea",eaText->text()); record.bindValue(":ed",edText->text()); record.bindValue(":member",isMember->isChecked()); record.exec(); int spid = record.lastInsertId().toInt(); record.prepare("INSERT INTO `SurveyResult` (`surveyResultID`, `surveyPersonID`, `q0`, `q1`, `q2`, `q3`, `q4`, `q5`)" "VALUES (:id, :spid, :q0, :q1, :q2, :q3, :q4, :q5)"); record.bindValue(":id", NULL); record.bindValue(":spid", spid); record.bindValue(":q0",q0->isChecked()); record.bindValue(":q1",q1->isChecked()); record.bindValue(":q2",q2->isChecked()); record.bindValue(":q3",q3->isChecked()); record.bindValue(":q4",q4->isChecked()); record.bindValue(":q5",q5->isChecked()); record.exec(); db.close(); clearFields(); emit newRecord(); return; }
ReceiptManager::ReceiptManager(const QString dbConnectionsString, QWidget *parent) : QDialog(parent), SqlExtension(dbConnectionsString), ui(new Ui::ReceiptManager) { ui->setupUi(this); clearFields(); QSettings settings; branch = settings.value("db/CurrentBranch").toInt(); ui->pushButtonAddReceipt->setProperty("mode",0); setWindowTitle("Добавление квитанции"); ui->pushButtonAddReceipt->setText("Добавить квитанцию"); connect(ui->pushButtonAddReceipt, SIGNAL(clicked()), this, SLOT(accept())); connect(ui->pushButtonClose,SIGNAL(clicked()),this, SLOT(reject())); }