void SearchWidget::findStation(const QString& str) { removeMatches(); matchString(str.toStdString()); removeContent(); updateContent(); }
Notebook::Notebook(QWidget *parent) : QWidget(parent) { setupUi(this); titleLine->setReadOnly(true); contentText->setReadOnly(true); cancelButton->hide(); submitButton->hide(); nextButton->setEnabled(false); previousButton->setEnabled(false); editButton->setEnabled(false); removeButton->setEnabled(false); dialog = new FindDialog; connect(addButton, SIGNAL(clicked()), this, SLOT(addNote())); connect(submitButton, SIGNAL(clicked()), this, SLOT(submitNote())); connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancel())); connect(nextButton, SIGNAL(clicked()), this, SLOT(next())); connect(previousButton, SIGNAL(clicked()), this, SLOT(previous())); connect(editButton, SIGNAL(clicked()), this, SLOT(editContent())); connect(removeButton, SIGNAL(clicked()), this, SLOT(removeContent())); connect(findButton, SIGNAL(clicked()), this, SLOT(findTitle())); connect(saveButton, SIGNAL(clicked()), this, SLOT(saveToFile())); connect(loadButton, SIGNAL(clicked()), this, SLOT(loadFromFile())); }
void wyToast::setContent(wyNode* c) { // remove old content node removeContent(); // save new content node m_content = c; addContent(); // set flag m_dirty = true; }
unsigned NetworkResourcesData::ResourceData::evictContent() { m_isContentEvicted = true; return removeContent(); }
//! ---o void Container::clearContents(){ for(Component::Ref childRef : getContents()) { // don't use the children directly, but use this virtual function getContents to work with specialized types. removeContent(childRef.get()); } }
/** Supprime l'element @return true si l'operation s'est bien passee, false sinon */ bool XmlElementDefinition::remove() { removeContent(); emit(removed(name_)); return(true); }
void Script::_load() { removeContent(); Str source; try { File sourceFile(getFilename().getData(), "r"); char *data = (char *)ALLOCATE(sourceFile.getSize()); sourceFile.read(sourceFile.getSize(), data); source = Str(sourceFile.getSize(), data); DEALLOCATE(data); } catch (const FileException& e) { THROW(ResourceIOException, "script", getFilename(), e.getString()); } scripting::ASTNode *ast; try { ast = scripting::parse(source); } catch (const scripting::ParseException& e) { THROW(ResourceIOException, "script", getFilename(), Str::format("%d:%d: %s", e.scriptLine, e.scriptColumn, e.message)); } //printAST(0, ast); scripting::Bytecode code; try { code = scripting::generateBytecode(ast); } catch (const scripting::ByteCodeGenException& e) { THROW(ResourceIOException, "script", getFilename(), e.message); } DELETE(ast); //Str disasm = scripting::disasm(code); //std::cout << disasm.getData() << std::endl; { context = NEW(scripting::Context, scriptEngine); try { class_ = context->run(code, List<scripting::Value>()); } catch (scripting::UnhandledExcException& e) { scripting::Value exc = e.getException(); if (exc.type == scripting::ValueType::Exception) { THROW(ResourceIOException, "script", getFilename(), ((scripting::ExceptionData *)exc.p)->error.getData()); } else { THROW(ResourceIOException, "script", getFilename(), "Unhandled exception"); } } } }
Script::~Script() { removeContent(); }
unsigned NetworkResourcesData::ResourceData::purgeContent() { m_isContentPurged = true; return removeContent(); }