• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ sParse函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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()));
}
开发者ID:AlFoX,项目名称:qt-client,代码行数:28,代码来源:woCluster.cpp


示例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()));
}
开发者ID:TouzaxA,项目名称:zNews,代码行数:9,代码来源:mainwindow.cpp


示例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();
}
开发者ID:TouzaxA,项目名称:zNews,代码行数:34,代码来源:mainwindow.cpp


示例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()));
}
开发者ID:ChristopherCotnoir,项目名称:qt-client,代码行数:10,代码来源:invoiceLineEdit.cpp


示例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);
}
开发者ID:Saturn49,项目名称:qt-client,代码行数:50,代码来源:xlineedit.cpp


示例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;
}
开发者ID:zoolib,项目名称:zoolib_old,代码行数:22,代码来源:ZASParser.cpp


示例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;
    }
}
开发者ID:TouzaxA,项目名称:zNews,代码行数:45,代码来源:mainwindow.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ sPopulate函数代码示例发布时间:2022-05-30
下一篇:
C++ sOnConnected函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap