EditorWidget::EditorWidget(const SceneObject& object, QWidget* parent) : DockWidget(object, parent), loaded(false), undoAct(0), redoAct(0), cutAct(0), copyAct(0), pasteAct(0), deleteAct(0), canCopy(false), canUndo(false), canRedo(false) { setWindowTitle(tr("Editor")); textEdit = new EditorView(this); #ifdef _WIN32 QFont font("Courier New", 10); #else QFont font("Bitstream Vera Sans Mono", 9); #endif textEdit->setFont(font); textEdit->setLineWrapMode(QTextEdit::NoWrap); setWidget(textEdit); setFocusProxy(textEdit); QTextDocument* textDocument = textEdit->document(); connect(textDocument, SIGNAL(modificationChanged(bool)), this, SLOT(updateWindowTitle(bool))); connect(this, SIGNAL(visibilityChanged(bool)), this, SLOT(visibilityChanged(bool))); connect(Document::document, SIGNAL(aboutToSave()), this, SLOT(aboutToSave())); connect(Document::document, SIGNAL(saved()), this, SLOT(saved())); connect(textEdit, SIGNAL(copyAvailable(bool)), this, SLOT(copyAvailable(bool))); connect(textEdit, SIGNAL(undoAvailable(bool)), this, SLOT(undoAvailable(bool))); connect(textEdit, SIGNAL(redoAvailable(bool)), this, SLOT(redoAvailable(bool))); }
void tex::package(int c) { scal d; scal h; ptr p; d = box_max_depth; unsave(); save_ptr -= 3; if (mode == -HMODE) { cur_box = hpack(link(head), saved(2), saved(1)); } else { cur_box = vpackage(link(head), saved(2), saved(1), d); if (c == VTOP_CODE) { h = 0; p = list_ptr(cur_box); if (p != null && type(p) <= RULE_NODE) h = box_height(p); box_depth(cur_box) += box_height(cur_box) - h; box_height(cur_box) = h; } } pop_nest(); box_end(saved(0)); }
RideFile* RouteItem::ride() { if (ride_ != NULL) return ride_; // open the ride file qDebug() << "path" << path; qDebug() << "fileName" << fileName; qDebug() << path << "/" << fileName; QFile file(path + "/" + fileName); ride_ = RideFileFactory::instance().openRideFile(context, file, errors_); if (ride_ == NULL) return NULL; // failed to read ride setDirty(false); // we're gonna use on-disk so by // definition it is clean - but do it *after* // we read the file since it will almost // certainly be referenced by consuming widgets // stay aware of state changes to our ride // MainWindow saves and RideFileCommand modifies connect(ride_, SIGNAL(modified()), this, SLOT(modified())); connect(ride_, SIGNAL(saved()), this, SLOT(saved())); connect(ride_, SIGNAL(reverted()), this, SLOT(reverted())); return ride_; }
void wizardDisk::accept() { bool useGRUB = true; bool useGPT = false; bool force4K = false; QString zpoolName; if (comboPartition->currentIndex() == 0 ) useGPT = checkGPT->isChecked(); // Are we installing GRUB? useGRUB = checkGRUB->isChecked(); // When doing advanced ZFS setups, make sure to use GPT if ( radioAdvanced->isChecked() && groupZFSOpts->isChecked() ) useGPT = true; // When doing advanced ZFS setups, check if 4K is enabled if ( radioAdvanced->isChecked() && checkForce4K->isChecked() ) force4K = true; if ( radioAdvanced->isChecked() && groupZFSPool->isChecked() ) zpoolName = lineZpoolName->text(); if ( radioExpert->isChecked() ) emit saved(sysFinalDiskLayout, false, false, zpoolName, force4K); else emit saved(sysFinalDiskLayout, useGRUB, useGPT, zpoolName, force4K); close(); }
void tex::scan_math(ptr p) { int c; restart: get_nbrx_token(); reswitch: switch (cur_cmd) { case LETTER: case OTHER_CHAR: case CHAR_GIVEN: c = math_code(cur_chr); if (c == 0100000) { cur_cs = active_base[cur_chr]; cur_cmd = eq_type(cur_cs); cur_chr = equiv(cur_cs); x_token(); back_input(); goto restart; } break; case CHAR_NUM: scan_char_num(); cur_chr = cur_val; cur_cmd = CHAR_GIVEN; goto reswitch; case MATH_CHAR_NUM: scan_fifteen_bit_int(); c = cur_val; break; case MATH_GIVEN: c = cur_chr; break; case DELIM_NUM: scan_twenty_seven_bit_int(); c = cur_val / 010000; break; default: back_input(); scan_left_brace(); saved(0) = p; incr(save_ptr); push_math(MATH_GROUP); return; } math_type(p) = MATH_CHAR; character(p) = c % 256; if (c >= VAR_CODE && fam_in_range()) { fam(p) = cur_fam; } else { fam(p) = c / 256 % 16; } }
Config::Config(const ConfigFile& file) : notifyDatabase(*getDefaultMemoryPool()) { // Array to save string temporarily // Will be finally saved by loadValues() in the end of ctor Firebird::ObjectsArray<ConfigFile::String> tempStrings(getPool()); // Iterate through the known configuration entries for (unsigned int i = 0; i < MAX_CONFIG_KEY; i++) { values[i] = entries[i].default_value; if (entries[i].data_type == TYPE_STRING && values[i]) { ConfigFile::String expand((const char*)values[i]); if (file.macroParse(expand, NULL) && expand != (const char*) values[i]) { ConfigFile::String& saved(tempStrings.add()); saved = expand; values[i] = (ConfigValue) saved.c_str(); } } } loadValues(file); }
void WebvfxFilter::on_editButton_clicked() { ui->editButton->setDisabled(true); MAIN.editHTML(ui->fileLabel->toolTip()); connect(MAIN.htmlEditor(), SIGNAL(closed()), SLOT(onHtmlClosed())); connect(MAIN.htmlEditor(), SIGNAL(saved()), SLOT(on_reloadButton_clicked())); }
//----------------------------------------------------------------------- void ConfigFileEx::save(const DataStreamExPtr& _dataStream, const String& _separator, const String& _comments) { _dataStream->setEncoding("UTF-8"); SettingsBySection::iterator secIt; for(secIt = mSettings.begin(); secIt!=mSettings.end(); secIt++) { if(secIt->first.size() > 0) { String line = "[" + secIt->first + "]"; _dataStream->writeLine(line, EOL::CRLF); } SettingsMultiMap* sec = secIt->second; for(SettingsMultiMap::iterator it = sec->begin(); it != sec->end(); it++) { const String& key = it->first; const String& value = it->second; if(key.find_first_of(_comments) != 0) { String line = key + _separator + convertSpecialChars(value); _dataStream->writeLine(line, EOL::CRLF); } } } saved(); }
void tex::build_choices () { ptr p; unsave(); p = fin_mlist(null); switch (saved(-1)) { case 0: display_mlist(tail) = p; break; case 1: text_mlist(tail) = p; break; case 2: script_mlist(tail) = p; break; case 3: script_script_mlist(tail) = p; decr(save_ptr); return; } incr(saved(-1)); scan_left_brace(); push_math(MATH_CHOICE_GROUP); }
void wizardDisk::accept() { QString partType="none"; bool force4K = false; QString zpoolName; if (comboPartition->currentIndex() == 0 ) { if ( radioGPT->isChecked() ) { partType="GPT"; } else { partType="MBR"; } } // When doing advanced ZFS setups, make sure to use GPT if ( radioAdvanced->isChecked() && groupZFSOpts->isChecked() ) partType="GPT"; // When doing advanced ZFS setups, check if 4K is enabled if ( radioAdvanced->isChecked() && checkForce4K->isChecked() ) force4K = true; if ( radioAdvanced->isChecked() && groupZFSPool->isChecked() ) zpoolName = lineZpoolName->text(); /*if ( radioExpert->isChecked() ) emit saved(sysFinalDiskLayout, partType, zpoolName, force4K); else*/ emit saved(sysFinalDiskLayout, partType, zpoolName, force4K, checkRefind->isChecked()); close(); }
void widgetKeyboard::slotUpdateKbOnSys() { QString model, layout, variant; if ( comboBoxKeyboardModel->currentIndex() == -1 ) return; if ( ! listKbLayouts->currentItem() ) return; if ( ! listKbVariants->currentItem() ) return; model = comboBoxKeyboardModel->currentText(); model = model.remove(0, model.indexOf("- (") + 3 ); model.truncate(model.size() -1 ); layout = listKbLayouts->currentItem()->text(); layout = layout.remove(0, layout.indexOf("- (") + 3 ); layout.truncate(layout.size() -1 ); variant = listKbVariants->currentItem()->text(); if ( variant != "<none>" ) { variant = variant.remove(0, variant.indexOf("- (") + 3 ); variant.truncate(variant.size() -1 ); } else { variant = ""; } Scripts::Backend::changeKbMap(model, layout, variant); emit saved(model, layout, variant); }
ServiceBlock::ServiceBlock(int idC, QWidget *parent) : QDialog(parent), idCar(idC), ui(new Ui::ServiceBlock) { ui->setupUi(this); setCalendarColor(ui->deBegin->calendarWidget(),QColor(255,140,0)); setCalendarColor(ui->deEnd->calendarWidget(),QColor(255,140,0)); setCalendarColor(ui->deEvent->calendarWidget(),QColor(255,140,0)); setCalendarColor(ui->deGuarantee->calendarWidget(),QColor(255,140,0)); QSqlQueryModel * windTitle = new QSqlQueryModel(this); windTitle->setQuery(QString("SELECT Brand, Model, LicensePlate FROM car WHERE idCar = %1").arg(idCar)); this->setWindowTitle( QString("Naprawy - ") + windTitle->data(windTitle->index(windTitle->rowCount()-1,0)).toString() + QString(" ") + windTitle->data(windTitle->index(windTitle->rowCount()-1,1)).toString() + QString(" - ") + windTitle->data(windTitle->index(windTitle->rowCount()-1,2)).toString() ); connect(this,SIGNAL(saved()),this,SLOT(updateView()),Qt::DirectConnection); connect(this,SIGNAL(deleted()),this,SLOT(updateView())); // fill category combobox QStringList categoryList({QString("Silnik"),QString("Zawieszenie"),QString("Elektronika"), QString("Elektryka"),QString("Układ napędowy"),QString("Układ hamulcowy"), QString("Układ kierowniczy"),QString("Nadwozie")}); ui->cbCategory->addItems(categoryList); updateView(); isOpen = true; }
void dialogWPAEnterprise::slotClose() { int type = 0; if ( radioEAPTLS->isChecked() ) { type = 1; } if ( radioEAPTTLS->isChecked() ) { type = 2; } if ( radioEAPPEAP->isChecked() ) { type = 3; } if ( linePrivateKeyPassword->text() != linePrivateKeyPassword2->text() ) { QMessageBox::warning( this, "Network Key Error", "Error: The entered password keys do not match!\n" ); } else { emit saved( type, lineEAPIdentity->text(), lineAnonIdentity->text(), lineCACert->text(), lineClientCert->text(), linePrivateKeyFile->text(), linePrivateKeyPassword->text(), comboKeyMgmt->currentIndex(), comboPhase2->currentIndex() ); close(); } }
void tex::begin_insert_or_adjust () { if (cur_cmd == VADJUST) { cur_val = 255; } else { scan_eight_bit_int(); if (cur_val == 255) { print_err("You can't "); print_esc("insert"); print_int(255); help_insert_255(); error(); cur_val = 0; } } saved(0) = cur_val; incr(save_ptr); new_save_level(INSERT_GROUP); scan_left_brace(); normal_paragraph(); push_nest(); mode = -VMODE; prev_depth = IGNORE_DEPTH; }
wBooks::wBooks(business *bs, books *bk, QWidget *parent) : QWidget(parent), ui(new Ui::wBooks) { ui->setupUi(this); //business* b = mainWidget::currentBusiness(); anillado *a; for(int i = 0; i < bs->anilladoCount(); i++){ a = bs->anilladoAt(i); ui->anilladoComboBox->addItem(a->name(), a->internalID()); }; t_book = bk; if(t_book == 0){ setWindowTitle("Agregar Libro"); t_book = new books(); }else{ setWindowTitle("Modificar Libro"); ui->numeroSpinBox->setValue(t_book->number()); ui->nombreLineEdit->setText(t_book->name()); ui->simpleFazSpinBox->setValue(t_book->simpleFaz()); ui->doubleFazSpinBox->setValue(t_book->doubleFaz()); //ui->anilladoDoubleSpinBox->setValue(t_book->anillado()); ui->anilladoComboBox->setCurrentIndex(ui->anilladoComboBox->findData(t_book->anillados()->internalID())); }; connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(saved())); connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(closed())); }
void AbstractItem::gotCreated(QString _id) { if(id.isEmpty()) { id = _id; emit saved(); } }
bool TilesetDocument::save(const QString &fileName, QString *error) { TilesetFormat *tilesetFormat = mTileset->format(); if (!tilesetFormat || !(tilesetFormat->capabilities() & FileFormat::Write)) return false; // todo: workaround to avoid writing the tileset like an external tileset reference mTileset->setFileName(QString()); if (!tilesetFormat->write(*tileset(), fileName)) { if (error) *error = tilesetFormat->errorString(); return false; } undoStack()->setClean(); mTileset->setFileName(fileName); setFileName(fileName); mLastSaved = QFileInfo(fileName).lastModified(); emit saved(); return true; }
void wizardDisk::accept() { bool useGPT = false; if (comboPartition->currentIndex() == 0 ) useGPT = checkGPT->isChecked(); // When doing advanced ZFS setups, make sure to use GPT if ( radioAdvanced->isChecked() && groupZFSOpts->isChecked() ) useGPT = true; if ( radioExpert->isChecked() ) emit saved(sysFinalDiskLayout, false, false); else emit saved(sysFinalDiskLayout, true, useGPT); close(); }
void VisualWavesControl::controlPanel_Saved(void) { // save all of the tracks' presets for(unsigned int i = 0; i < tracks.size(); i++) { Track *t = tracks[i]; assert(t != NULL); FFTSplineControl &fftS = t->getFFTSplineControl(); fftS.savePreset(); unsigned int pId = fftS.getPresetId(); t->addFFTPreset(pId); TemporalSplineControl &tempS = t->getTemporalSplineControl(); tempS.savePreset(); pId = tempS.getPresetId(); t->addTemporalPreset(pId); } save(); if(saved != NULL) { saved(this); } }
void open( std::string const &domain, bool allowCreate, boost::shared_ptr<ISettings> &settings, IComplete *complete) { grab aholdof(lock_); boost::shared_ptr<ISettings>((ISettings *)0).swap(settings); std::map<std::string, boost::shared_ptr<ISettings> >::iterator ptr(settings_.find(domain)); std::map<std::string, boost::shared_ptr<ISettings> >::iterator saved(saved_.find(domain)); if (ptr != settings_.end()) { LogDebug << "FakeSettingsFactory::open(" << domain << ") getting from settings!"; settings = (*ptr).second; } else if (allowCreate) { bool allowed = (allowCreate_.find(domain) != allowCreate_.end()); if (allowed) { settings_[domain] = settings = boost::shared_ptr<ISettings>(new FakeSettings(this, domain)); } }else if(saved != saved_.end()) { LogDebug << "FakeSettingsFactory::open(" << domain << ") getting from saved"; settings_[domain] = settings = (*saved).second; } svc_.post(boost::bind(&IComplete::on_complete, complete)); }
void GraphiteSaveAction::slotTriggered() { GraphiteSaveDialog * gsd = new GraphiteSaveDialog( GraphiteSavedDesc().setUrl(mGraphiteWidget->desc().buildUrl().toString()), mGraphiteWidget->window() ); if( gsd->exec() == QDialog::Accepted ) { emit saved( mGraphiteWidget, gsd->savedDesc() ); } delete gsd; }
void MoodPreferences::save() { KConfig *config = ktagebuchapp->getConfig(); config->setGroup("Mood Plugin"); config->writeEntry("moods", preferencesDialog->getMoods() ); config->sync(); emit saved(); }
void tex::append_choices () { tail_append(new_choice()); incr(save_ptr); saved(-1) = 0; scan_left_brace(); push_math(MATH_CHOICE_GROUP); }
void tex::start_eq_no () { saved(0) = cur_chr; incr(save_ptr); push_math(MATH_SHIFT_GROUP); reg_define(int_reg[CUR_FAM_CODE], INT_REG, -1); if (every_math != null) begin_token_list(every_math, EVERY_MATH_TEXT); }
ApiTrace::ApiTrace() : m_needsSaving(false) { m_loader = new TraceLoader(); connect(this, SIGNAL(loadTrace(QString)), m_loader, SLOT(loadTrace(QString))); connect(this, SIGNAL(requestFrame(ApiTraceFrame*)), m_loader, SLOT(loadFrame(ApiTraceFrame*))); connect(m_loader, SIGNAL(framesLoaded(const QList<ApiTraceFrame*>)), this, SLOT(addFrames(const QList<ApiTraceFrame*>))); connect(m_loader, SIGNAL(frameContentsLoaded(ApiTraceFrame*,QVector<ApiTraceCall*>, QVector<ApiTraceCall*>,quint64)), this, SLOT(loaderFrameLoaded(ApiTraceFrame*,QVector<ApiTraceCall*>,QVector<ApiTraceCall*>,quint64))); connect(m_loader, SIGNAL(guessedApi(int)), this, SLOT(guessedApi(int))); connect(m_loader, SIGNAL(finishedParsing()), this, SLOT(finishedParsing())); connect(this, SIGNAL(loaderSearch(ApiTrace::SearchRequest)), m_loader, SLOT(search(ApiTrace::SearchRequest))); connect(m_loader, SIGNAL(searchResult(ApiTrace::SearchRequest,ApiTrace::SearchResult,ApiTraceCall*)), this, SLOT(loaderSearchResult(ApiTrace::SearchRequest,ApiTrace::SearchResult,ApiTraceCall*))); connect(this, SIGNAL(loaderFindFrameStart(ApiTraceFrame*)), m_loader, SLOT(findFrameStart(ApiTraceFrame*))); connect(this, SIGNAL(loaderFindFrameEnd(ApiTraceFrame*)), m_loader, SLOT(findFrameEnd(ApiTraceFrame*))); connect(m_loader, SIGNAL(foundFrameStart(ApiTraceFrame*)), this, SIGNAL(foundFrameStart(ApiTraceFrame*))); connect(m_loader, SIGNAL(foundFrameEnd(ApiTraceFrame*)), this, SIGNAL(foundFrameEnd(ApiTraceFrame*))); connect(this, SIGNAL(loaderFindCallIndex(int)), m_loader, SLOT(findCallIndex(int))); connect(m_loader, SIGNAL(foundCallIndex(ApiTraceCall*)), this, SIGNAL(foundCallIndex(ApiTraceCall*))); connect(m_loader, SIGNAL(startedParsing()), this, SIGNAL(startedLoadingTrace())); connect(m_loader, SIGNAL(parsed(int)), this, SIGNAL(loaded(int))); connect(m_loader, SIGNAL(finishedParsing()), this, SIGNAL(finishedLoadingTrace())); m_saver = new SaverThread(this); connect(m_saver, SIGNAL(traceSaved()), this, SLOT(slotSaved())); connect(m_saver, SIGNAL(traceSaved()), this, SIGNAL(saved())); m_loaderThread = new QThread(); m_loader->moveToThread(m_loaderThread); m_loaderThread->start(); }
WAccount::WAccount(WProtocol *protocol) : Account(QLatin1String("Weather"), protocol) { m_settings = new GeneralSettingsItem<WSettings>(Settings::Plugin, QIcon(":/icons/weather.png"), QT_TRANSLATE_NOOP("Weather", "Weather")); m_settings->connect(SIGNAL(saved()), this, SLOT(loadSettings())); Settings::registerItem(m_settings); connect(&m_manager, SIGNAL(finished(QNetworkReply*)), SLOT(onNetworkReply(QNetworkReply*))); loadSettings(); }
void wizardDisk::accept() { QString bootLoader; QString partType="none"; bool force4K = false; QString zpoolName; QString biosMode; if ( radioUEFI->isChecked() ) biosMode="efi"; else biosMode="pc"; if (comboPartition->currentIndex() == 0 ) { if ( radioGPT->isChecked() ) { partType="GPT"; } else { partType="MBR"; } } // Get the boot-loader if ( checkGRUB->isChecked() ) bootLoader="GRUB"; else bootLoader="BSD"; // When doing advanced ZFS setups, make sure to use GPT if ( radioAdvanced->isChecked() && groupZFSOpts->isChecked() ) partType="GPT"; // When doing advanced ZFS setups, check if 4K is enabled if ( radioAdvanced->isChecked() && checkForce4K->isChecked() ) force4K = true; if ( radioAdvanced->isChecked() && groupZFSPool->isChecked() ) zpoolName = lineZpoolName->text(); if ( radioExpert->isChecked() ) emit saved(sysFinalDiskLayout, QString("NONE"), partType, zpoolName, force4K, QString("")); else emit saved(sysFinalDiskLayout, bootLoader, partType, zpoolName, force4K, biosMode); close(); }
void wepConfig::saveAndClose() { //bool ok; //lineKey->text().toInt(&ok, 16); //if ( ok && ! radioHex->isChecked() ) // QMessageBox::warning( this, tr("Hex Key"), tr("Warning: The entered network is a valid hex key, but plain-text mode is enabled.") ); // //if ( ! ok && radioHex->isChecked() ) { // QMessageBox::warning( this, tr("Hex Key"), tr("Error: The specified key is not a valid hex key.") ); // return; //} if ( radioHex->isChecked() ) { emit saved(lineKey->text(), spinIndex->value(), true); } else { emit saved(lineKey->text(), spinIndex->value(), false); } close(); }
void SettingsWidget::save() { // if(!isModified()) // return; p->sleep = true; saveImpl(); p->clearValues(); p->sleep = false; emit saved(); }
std::pair<TER, bool> apply (Application& app, OpenView& view, STTx const& tx, ApplyFlags flags, beast::Journal j) { STAmountSO saved(view.info().parentCloseTime); auto pfresult = preflight(app, view.rules(), tx, flags, j); auto pcresult = preclaim(pfresult, app, view); return doApply(pcresult, app, view); }