当前位置: 首页>>代码示例>>C++>>正文


C++ saved函数代码示例

本文整理汇总了C++中saved函数的典型用法代码示例。如果您正苦于以下问题:C++ saved函数的具体用法?C++ saved怎么用?C++ saved使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了saved函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: DockWidget

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)));
}
开发者ID:alon,项目名称:bhuman2009fork,代码行数:28,代码来源:EditorWidget.cpp

示例2: unsave

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));
}
开发者ID:syntheticpp,项目名称:cpptex,代码行数:25,代码来源:boxlist.c

示例3: qDebug

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_;
}
开发者ID:cernst72,项目名称:GoldenCheetah,代码行数:28,代码来源:RouteItem.cpp

示例4: get_nbrx_token

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;
	}
	}
开发者ID:syntheticpp,项目名称:cpptex,代码行数:60,代码来源:mathlist.c

示例5: notifyDatabase

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);
}
开发者ID:glaubitz,项目名称:firebird,代码行数:25,代码来源:config.cpp

示例6: connect

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()));
}
开发者ID:dyf128,项目名称:shotcut,代码行数:7,代码来源:webvfxfilter.cpp

示例7: convertSpecialChars

	//-----------------------------------------------------------------------
	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();
	}
开发者ID:raduetsya,项目名称:GothOgre,代码行数:27,代码来源:GothOgre_ConfigFileEx.cpp

示例8: unsave

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);
	}
开发者ID:syntheticpp,项目名称:cpptex,代码行数:16,代码来源:mathlist.c

示例9: saved

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();
}
开发者ID:trueos,项目名称:trueos-utils-qt5,代码行数:31,代码来源:wizardDisk.cpp

示例10: saved

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);
}
开发者ID:DJHartley,项目名称:pcbsd,代码行数:32,代码来源:dialogKeyboard.cpp

示例11: QDialog

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;
}
开发者ID:RStravinsky,项目名称:CarReservation,代码行数:33,代码来源:serviceblock.cpp

示例12: saved

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();
    }
}
开发者ID:biddyweb,项目名称:pcbsd,代码行数:29,代码来源:dialogwpaenterprise.cpp

示例13: scan_eight_bit_int

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;
	}
开发者ID:syntheticpp,项目名称:cpptex,代码行数:25,代码来源:boxlist.c

示例14: QWidget

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()));

}
开发者ID:jcapoduri,项目名称:C2Si-BlueSystem,代码行数:30,代码来源:wbooks.cpp

示例15: saved

void AbstractItem::gotCreated(QString _id)
{
	if(id.isEmpty()) {
		id = _id;
		emit saved();
	}
}
开发者ID:Raven24,项目名称:FSugar,代码行数:7,代码来源:abstractitem.cpp


注:本文中的saved函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。