void Logbook::deleteHistory(const HistoryItem &item) { if ( item.id != LINK_ITEM_ID_UNDEFINED ) { deleteHistory(item.id); } else { deleteHistory(item.url); } }
void vcvs::initTR (void) { nr_double_t t = getPropertyDouble ("T"); initDC (); deleteHistory (); if (t > 0.0) { setHistory (true); initHistory (t); setC (VSRC_1, NODE_1, 0.0); setC (VSRC_1, NODE_4, 0.0); } }
// Destructor deletes a circuit object. circuit::~circuit () { if (size > 0) { delete[] MatrixS; delete[] MatrixN; freeMatrixMNA (); freeMatrixHB (); delete[] nodes; } deleteHistory (); }
void vccs::initTR (void) { nr_double_t t = getPropertyDouble ("T"); initDC (); deleteHistory (); if (t > 0.0) { setISource (true); setHistory (true); initHistory (t); clearY (); } }
// Initialize transient analysis. void digital::initTR (void) { nr_double_t t = getPropertyDouble ("t"); initDC (); deleteHistory (); if (t > 0.0) { delay = true; setHistory (true); initHistory (t); setC (VSRC_1, NODE_OUT, 1); } }
void cccs::initTR (void) { nr_double_t t = getPropertyDouble ("T"); initDC (); deleteHistory (); if (t > 0.0) { setISource (true); setHistory (true); initHistory (t); setB (NODE_1, VSRC_1, +1.0); setB (NODE_2, VSRC_1, +0.0); setB (NODE_3, VSRC_1, -0.0); setB (NODE_4, VSRC_1, -1.0); } }
END_TEST START_TEST(Server_HistorizingUpdateUpdate) { UA_HistoryDataBackend backend = UA_HistoryDataBackend_Memory(1, 1); UA_HistorizingNodeIdSettings setting; setting.historizingBackend = backend; setting.maxHistoryDataResponseSize = 1000; setting.historizingUpdateStrategy = UA_HISTORIZINGUPDATESTRATEGY_USER; serverMutexLock(); UA_StatusCode ret = gathering->registerNodeId(server, gathering->context, &outNodeId, setting); serverMutexUnlock(); ck_assert_str_eq(UA_StatusCode_name(ret), UA_StatusCode_name(UA_STATUSCODE_GOOD)); // fill backend with insert ck_assert_str_eq(UA_StatusCode_name(updateHistory(UA_PERFORMUPDATETYPE_INSERT, testData, NULL, NULL)) , UA_StatusCode_name(UA_STATUSCODE_GOOD)); testResult(testDataSorted, NULL); // delete some values ck_assert_str_eq(UA_StatusCode_name(deleteHistory(DELETE_START_TIME, DELETE_STOP_TIME)), UA_StatusCode_name(UA_STATUSCODE_GOOD)); testResult(testDataAfterDelete, NULL); // update all and insert some UA_StatusCode *result; size_t resultSize = 0; ck_assert_str_eq(UA_StatusCode_name(updateHistory(UA_PERFORMUPDATETYPE_UPDATE, testDataSorted, &result, &resultSize)) , UA_StatusCode_name(UA_STATUSCODE_GOOD)); for (size_t i = 0; i < resultSize; ++i) { ck_assert_str_eq(UA_StatusCode_name(result[i]), UA_StatusCode_name(testDataUpdateResult[i])); } UA_Array_delete(result, resultSize, &UA_TYPES[UA_TYPES_STATUSCODE]); UA_HistoryData data; UA_HistoryData_init(&data); testResult(testDataSorted, &data); for (size_t i = 0; i < data.dataValuesSize; ++i) { ck_assert_uint_eq(data.dataValues[i].hasValue, true); ck_assert(data.dataValues[i].value.type == &UA_TYPES[UA_TYPES_INT64]); ck_assert_uint_eq(*((UA_Int64*)data.dataValues[i].value.data), UA_PERFORMUPDATETYPE_UPDATE); } UA_HistoryData_deleteMembers(&data); UA_HistoryDataBackend_Memory_deleteMembers(&setting.historizingBackend); }
void tline::initTR (void) { nr_double_t l = getPropertyDouble ("L"); nr_double_t z = getPropertyDouble ("Z"); deleteHistory (); if (l > 0.0) { setVoltageSources (2); allocMatrixMNA (); setHistory (true); initHistory (l / C0); setB (NODE_1, VSRC_1, +1); setB (NODE_2, VSRC_2, +1); setC (VSRC_1, NODE_1, +1); setC (VSRC_2, NODE_2, +1); setD (VSRC_1, VSRC_1, -z); setD (VSRC_2, VSRC_2, -z); } else { setVoltageSources (1); allocMatrixMNA (); voltageSource (VSRC_1, NODE_1, NODE_2); } }
void deleteLayer(int num){ int i; //レイヤーが一つしかない時は動作しない if(layer_num==1)return; //履歴を削除 deleteHistory(num); printf("test in deleteLayer\n"); //削除したいレイヤーを一番最後へ持っていく for(i=num;i<(layer_num-1);i++){ swapLayer(i,i+1); } //削除 XDestroyWindow(dis,layer[i]); XFreePixmap(dis,layer_mask[i]); XFreePixmap(dis,layer_expose[i]); XDestroyWindow(dis,layer_item[i]); layer_num--; //最後のレイヤーが選択されていた時は、その手前のレイヤーを選択状態にする。 if(selected_layer>layer_num-1){ selected_layer=layer_num-1; } }
//****************************************************************~HistoryNode()************************************************************************ // Destructor calls deleteHistory() to deallocate all allocated memory //****************************************************************************************************************************************************** HistoryNode::~HistoryNode() { deleteHistory(); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { browser_ = new WebBrowser; browser_->loadSettings(); browser_->GoHome(); //setCentralWidget(browser_); // PESTAÑAS QTabWidget *tabWidgetMainWindow = new QTabWidget(this); tabWidgetMainWindow->setMinimumSize(800,600); tabWidgetMainWindow->addTab(browser_, "Pestaña 1"); tabWidgetMainWindow->addTab(new WebBrowser, "Pestaña 2"); tabWidgetMainWindow->setCurrentIndex(1); tabWidgetMainWindow->show(); setCentralWidget(tabWidgetMainWindow); zoomVar = 1; // inicialización del zoom // inicializamos los menus mainMenu_ = new QMenuBar(this); setMenuBar(mainMenu_); mnuArchivo_ = new QMenu(tr("&Archivo"), this); //mainMenu_ -> addMenu(mnuArchivo_); mnuEditar_ = new QMenu(tr("&Editar"), this); //mainMenu_ -> addMenu(mnuEditar_); mnuVer_ = new QMenu(tr("&Ver"), this); mainMenu_ -> addMenu(mnuVer_); actPlusZoom = new QAction(tr("&Aumentar zoom"), this); actPlusZoom -> setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Plus)); mnuVer_->addAction(actPlusZoom); connect(actPlusZoom, SIGNAL(triggered()), this, SLOT(setPlusZoom())); actMinusZoom_ = new QAction(tr("&Disminuir zoom"), this); actMinusZoom_ -> setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Minus)); mnuVer_->addAction(actMinusZoom_); connect(actMinusZoom_, SIGNAL(triggered()), this, SLOT(setMinusZoom())); mnuMarcadores_ = new QMenu(tr("&Marcadores"), this); mainMenu_ -> addMenu(mnuMarcadores_); actAddBookmark_ = new QAction(tr("&Añadir a marcadores"), this); actAddBookmark_ -> setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_O)); mnuMarcadores_->addAction(actAddBookmark_); connect(actAddBookmark_, SIGNAL(triggered()), this, SLOT(addMarcador())); mnuHerramientas_ = new QMenu(tr("&Herramientas"), this); mainMenu_ -> addMenu(mnuHerramientas_); actSetHomepage_ = new QAction(tr("Establecer como pagina principal"), this); mnuHerramientas_->addAction(actSetHomepage_); connect(actSetHomepage_, SIGNAL(triggered()), browser_, SLOT(setHomepage())); mnuHistorial_ = new QMenu(tr("&Historial"), this); mainMenu_ -> addMenu(mnuHistorial_); actDeleteHistory_ = new QAction(tr("&Borrar el historial"), this); actDeleteHistory_->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_D)); mnuHistorial_->addAction(actDeleteHistory_); connect(actDeleteHistory_, SIGNAL(triggered()), this, SLOT(deleteHistory())); showHistory(); readBookmarkFile(); for (int i = 0; i < bookmarkList.size(); ++i) { QAction* tmp = new QAction(tr(bookmarkList.at(i).toLocal8Bit().constData()), this); mnuMarcadores_->addAction(tmp); connect(tmp,SIGNAL(triggered()),this,SLOT(PulsarMarcador())); } }