本文整理汇总了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)));
}
示例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));
}
示例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_;
}
示例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;
}
}
示例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);
}
示例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()));
}
示例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();
}
示例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);
}
示例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();
}
示例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);
}
示例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;
}
示例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();
}
}
示例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;
}
示例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()));
}
示例15: saved
void AbstractItem::gotCreated(QString _id)
{
if(id.isEmpty()) {
id = _id;
emit saved();
}
}