本文整理汇总了C++中sParse函数的典型用法代码示例。如果您正苦于以下问题:C++ sParse函数的具体用法?C++ sParse怎么用?C++ sParse使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了sParse函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: disconnect
void WoLineEdit::sSearch()
{
disconnect(this, SIGNAL(editingFinished()), this, SLOT(sParse()));
woSearch* newdlg = searchFactory();
if (newdlg)
{
ParameterList params;
params.append("wo_id", _id);
params.append("woType", _woType);
if (_warehouseid != -1)
params.append("warehous_id", _warehouseid);
newdlg->set(params);
int id = newdlg->exec();
setId(id);
}
else
QMessageBox::critical(this, tr("A System Error Occurred at %1::%2.")
.arg(__FILE__)
.arg(__LINE__),
tr("%1::sList() not yet defined")
.arg(metaObject()->className()));
connect(this, SIGNAL(editingFinished()), this, SLOT(sParse()));
}
示例2: connect
void MainWindow::manageSlots() {
connect(nTitle, SIGNAL(textChanged(QString)), this, SLOT(sParse()));
connect(editor, SIGNAL(textChanged()), this, SLOT(sParse()));
connect(parse, SIGNAL(triggered()), this, SLOT(sParse()));
connect(open, SIGNAL(triggered()), this, SLOT(sOpen()));
connect(save, SIGNAL(triggered()), this, SLOT(sSave()));
connect(newN, SIGNAL(triggered()), this, SLOT(sNew()));
connect(about, SIGNAL(triggered()), this, SLOT(aboutProgramme()));
}
示例3: QMainWindow
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) {
currentFile = 0;
setMinimumSize(800, 600);
middleArea = new QWidget;
titleLayout = new QHBoxLayout;
lbl = new QLabel("Titre :");
nTitle = new QLineEdit;
nTitle->setText("Titre de votre news");
titleLayout->addWidget(lbl);
titleLayout->addWidget(nTitle);
mainLayout = new QVBoxLayout;
editor = new QTextEdit;
editor->setText("Insérez ici le contenu de votre news");
view = new QWebView;
mainLayout->addLayout(titleLayout);
mainLayout->addWidget(editor);
mainLayout->addWidget(view);
middleArea->setLayout(mainLayout);
setCentralWidget(middleArea);
buildMenu();
buildDock();
sParse();
news = new News;
manageSlots();
}
示例4: XLineEdit
InvoiceLineEdit::InvoiceLineEdit(QWidget *pParent, const char *name) :
XLineEdit(pParent, name)
{
_custid = -1;
_coheadid = -1;
_invoiceNumber = "";
_id = -1;
connect(this, SIGNAL(editingFinished()), this, SLOT(sParse()));
}
示例5: QLineEdit
XLineEdit::XLineEdit(QWidget *parent, const char *name) :
QLineEdit(parent)
{
if (! name && objectName().isEmpty())
setObjectName("XLineEdit");
setAcceptDrops(FALSE);
#ifdef Q_WS_MAC
QFont f = font();
f.setPointSize(f.pointSize() - 2);
setFont(f);
#endif
_parsed = true;
_valid = false;
_isNull = true;
_id = -1;
connect(this, SIGNAL(editingFinished()), this, SLOT(sParse()));
_listAct = new QAction(tr("List..."), this);
_listAct->setShortcut(QKeySequence(tr("Ctrl+Shift+L")));
_listAct->setShortcutContext(Qt::WidgetShortcut);
_listAct->setToolTip(tr("List all records"));
connect(_listAct, SIGNAL(triggered()), this, SIGNAL(requestList()));
addAction(_listAct);
_searchAct = new QAction(tr("Search..."), this);
_searchAct->setShortcut(QKeySequence(tr("Ctrl+Shift+Space")));
_searchAct->setShortcutContext(Qt::WidgetShortcut);
_searchAct->setToolTip(tr("Search on specific criteria"));
connect(_searchAct, SIGNAL(triggered()), this, SIGNAL(requestSearch()));
addAction(_searchAct);
_aliasAct = new QAction(tr("Alias..."), this);
_aliasAct->setShortcut(QKeySequence(tr("Ctrl+Shift+A")));
_aliasAct->setShortcutContext(Qt::WidgetShortcut);
_aliasAct->setToolTip(tr("List of alias records"));
connect(_aliasAct, SIGNAL(triggered()), this, SIGNAL(requestAlias()));
addAction(_aliasAct);
_copyProject = new QAction(tr("New From..."), this);
_copyProject->setShortcut(QKeySequence(tr("Ctrl+Shift+C")));
_copyProject->setShortcutContext(Qt::WidgetShortcut);
_copyProject->setToolTip(tr("Copy Project From Selected"));
connect(_copyProject, SIGNAL(triggered()), this, SIGNAL(requestCopy()));
addAction(_copyProject);
_mapper = new XDataWidgetMapper(this);
}
示例6: sParse
/**
This is the entry point for parsing when you have a source file's path. It just
attempts to open the file and passes it on to the stream-taking sParse, which is
responsible for actually catching and reporting parse exceptions.
*/
bool ZASParser::sParse(const string& iPath, ParseHandler& iParseHandler,
const StreamProvider& iStreamProvider,
const ErrorHandler& iErrorHandler, IncludeHandler* iIncludeHandler)
{
ZFileSpec fileSpecUsed;
if (ZRef<ZStreamerR> theStreamer
= iStreamProvider.ProvideStreamSource(ZFileSpec(), iPath, true, fileSpecUsed))
{
return sParse(fileSpecUsed, theStreamer->GetStreamR(),
iParseHandler, iStreamProvider, iErrorHandler, iIncludeHandler);
}
else
{
iErrorHandler.ReportError("Could not open source file \"" + iPath + "\"");
}
return false;
}
示例7: dom
void MainWindow::openNews(QString path) {
QString title;
QString content;
// On va ouvrir le fichier XML et en extraire ce dont on a besoin
QDomDocument dom("news_xml");
QFile newsFile(path);
if(newsFile.exists()) {
if(!newsFile.open(QIODevice::ReadOnly)) {
QMessageBox::critical(this, "Impossible d'ouvrir le fichier", "Erreur lors de l'ouverture de " + path);
qApp->exit();
}
if(!dom.setContent(&newsFile, false)) {
newsFile.close();
QMessageBox::critical(this, "Impossible de parser le XML", "Impossible d'analyser le fichier " + path);
qApp->exit();
}
QDomElement racine = dom.documentElement();
racine = racine.firstChildElement();
while(!racine.isNull()) {
if(racine.tagName() == "header") {
QDomElement elm = racine.firstChildElement();
while(!elm.isNull()) {
if(elm.tagName() == "title") {
title = elm.text();
}
elm = elm.nextSiblingElement();
}
}
racine = racine.nextSiblingElement();
if(racine.tagName() == "content") {
content = trim(racine.text());
}
racine = racine.nextSiblingElement();
}
news->setContent(content);
news->setTitle(title);
nTitle->setText(title);
editor->setText(content);
sParse();
setWindowTitle("zNews - " + newsFile.fileName());
newsFile.close();
currentFile = &newsFile;
}
}