您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ trigger函数代码示例

51自学网 2021-06-03 08:58:40
  C++
这篇教程C++ trigger函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中trigger函数的典型用法代码示例。如果您正苦于以下问题:C++ trigger函数的具体用法?C++ trigger怎么用?C++ trigger使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了trigger函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: receiver_cb

static void receiver_cb (SockMuxReceiver *rec,                         guint message_id,                         const guint8 *data,                         guint size,                         gpointer userdata){  GChecksum *checksum2 = g_checksum_new(G_CHECKSUM_SHA1);  if (userdata != rec)    {      g_error("userdata = %p, rec = %p", userdata, rec);      quit();      return;    }  if (message_id != step)    {      g_error("message_id = %d, step = %d", message_id, step);      quit();      return;    }  g_message("%s() - rec %p, message_id 0x%0x, size %d",            __func__, rec, message_id, size);  g_checksum_update(checksum2, data, size);  if (!g_str_equal(g_checksum_get_string(checksum),                   g_checksum_get_string(checksum2)))    {      g_error("Checksum mismatch! Expected '%s', got '%s'",              g_checksum_get_string(checksum),              g_checksum_get_string(checksum2));      quit();      return;    }  g_checksum_free(checksum2);  trigger();}
开发者ID:zonque,项目名称:sockmux-glib,代码行数:39,


示例2: switch

void RS_ActionDrawLineRectangle::coordinateEvent(RS_CoordinateEvent* e) {	if (!e) return;    RS_Vector mouse = e->getCoordinate();    switch (getStatus()) {    case SetCorner1:		pPoints->corner1 = mouse;        graphicView->moveRelativeZero(mouse);        setStatus(SetCorner2);        break;    case SetCorner2:		pPoints->corner2 = mouse;        trigger();        setStatus(SetCorner1);        break;    default:        break;    }}
开发者ID:Aly1029,项目名称:LibreCAD,代码行数:22,


示例3: snapPoint

void RS_ActionModifyScale::mouseReleaseEvent(QMouseEvent* e) {    if (e->button()==Qt::LeftButton) {        RS_Vector mouse = snapPoint(e);        switch (getStatus()) {        case SetReferencePoint:            setStatus(ShowDialog);            if (RS_DIALOGFACTORY->requestScaleDialog(data)) {                data.referencePoint = referencePoint;                trigger();                finish();            }            break;        default:            break;        }    } else if (e->button()==Qt::RightButton) {        deletePreview();        init(getStatus()-1);    }}
开发者ID:Samsagax,项目名称:LibreCAD,代码行数:22,


示例4: TestShuttle

void TestShuttle() {	gSystem->Load("libSHUTTLE");        gSystem->Load("libRLDAP");	gSystem->Load("libTest");	AliLog::SetGlobalDebugLevel(1); 	AliShuttleConfig config("pcalice290.cern.ch", 389, "o=alice,dc=cern,dc=ch");        config.Print();	AliShuttleTrigger trigger(&config);	AliShuttle* shuttle = trigger.GetShuttle();	TestITSPreprocessor *itsPrep = new AliITSPreprocessor("ITS",shuttle);	trigger.CollectNew();	/*	TTimeStamp currentTime;	shuttle.Process(1, currentTime.GetSec() - 18 * 3600, 		currentTime.GetSec());*/}
开发者ID:alisw,项目名称:AliRoot,代码行数:22,


示例5: loadgamerest

void loadgamerest(){    if(demoplayback || !f) return;            if(gzgeti()!=ents.length()) return loadgameout();    loopv(ents)    {        ents[i].spawned = gzgetc(f)!=0;           if(ents[i].type==CARROT && !ents[i].spawned) trigger(ents[i].attr1, ents[i].attr2, true);    };    restoreserverstate(ents);        gzread(f, player1, sizeof(dynent));    player1->lastaction = lastmillis;        int nmonsters = gzgeti();    dvector &monsters = getmonsters();    if(nmonsters!=monsters.length()) return loadgameout();    loopv(monsters)    {        gzread(f, monsters[i], sizeof(dynent));        monsters[i]->enemy = player1;                                       // lazy, could save id of enemy instead        monsters[i]->lastaction = monsters[i]->trigger = lastmillis+500;    // also lazy, but no real noticable effect on game        if(monsters[i]->state==CS_DEAD) monsters[i]->lastaction = 0;    };    restoremonsterstate();        int nplayers = gzgeti();    loopi(nplayers) if(!gzget())    {        dynent *d = getclient(i);        assert(d);        gzread(f, d, sizeof(dynent));            };        conoutf("savegame restored");    if(demoloading) startdemo(); else stop();};
开发者ID:jhunt,项目名称:cube,代码行数:38,


示例6: switch

	void CNotificationManager::showStateNotification(libnutcommon::DeviceState state) {		if (!m_NotificationsEnabled)			return;				CUIDevice * uiDevice = qobject_cast<CUIDevice *>(sender());		if (!uiDevice)			return;				QString message;		switch (state) {		case libnutcommon::DS_UP:			message = tr("%2 is now up and running on network: %1")				.arg(currentNetwork(uiDevice->device()));			break;		case libnutcommon::DS_UNCONFIGURED:			message = tr("%2 got carrier (to network: %1) but needs configuration./n/nClick here to open the device details.")				.arg(currentNetwork(uiDevice->device()));			break;		case libnutcommon::DS_ACTIVATED:			message = tr("%1 is now activated and waits for carrier.");			break;		case libnutcommon::DS_DEACTIVATED:			message = tr("%1 is now deactivated");			break;		default:			return;		}				{			QSystemTrayIcon * trayIcon = m_UIDeviceIcons.value(uiDevice, NULL);			message = message.arg(trayIcon && trayIcon->isVisible() ? tr("Device") : uiDevice->device()->getName());		}				if (state == libnutcommon::DS_UNCONFIGURED)			showMessage(QString(), message, uiDevice->m_ShowEnvironmentsAction, SLOT(trigger()), uiDevice);		else			showMessage(QString(), message, NULL, NULL, uiDevice);	}
开发者ID:stbuehler,项目名称:nut,代码行数:38,


示例7: catchEntity

void RS_ActionModifyTrim::mouseReleaseEvent(RS_MouseEvent* e) {    if (RS2::qtToRsButtonState(e->button())==RS2::LeftButton) {        RS_Vector mouse = graphicView->toGraph(e->x(), e->y());        RS_Entity* se = catchEntity(e);        switch (getStatus()) {        case ChooseLimitEntity:            limitCoord = mouse;            limitEntity = se;            if (limitEntity!=NULL /*&& limitEntity->isAtomic()*/) {                limitEntity->setHighlighted(true);                graphicView->drawEntity(limitEntity);                setStatus(ChooseTrimEntity);            }            break;        case ChooseTrimEntity:            trimCoord = mouse;            trimEntity = se;            if (trimEntity!=NULL && trimEntity->isAtomic()) {                trigger();            }            break;        default:            break;        }    } else if (RS2::qtToRsButtonState(e->button())==RS2::RightButton) {        deletePreview();        deleteSnapper();        if (limitEntity!=NULL) {            limitEntity->setHighlighted(false);            graphicView->drawEntity(limitEntity);        }        init(getStatus()-1);    }}
开发者ID:Akaur,项目名称:qdraw,代码行数:38,


示例8: deletePreview

void RS_ActionDrawLineTangent2::mouseReleaseEvent(QMouseEvent* e) {    if (e->button()==Qt::RightButton) {        deletePreview();        if(getStatus()>=0){            init(getStatus()-1);            if(circle1!=NULL){                circle1->setHighlighted(false);                graphicView->redraw(RS2::RedrawDrawing);                deletePreview();            }        }        return;    }    switch (getStatus()) {    case SetCircle1:    {        circle1 = catchEntity(e, circleType, RS2::ResolveAll);        if(circle1==NULL) return;        if(circle1->rtti()!=RS2::EntityCircle &&                circle1->rtti()!=RS2::EntityEllipse &&                circle1->rtti()!=RS2::EntityArc                ) {            circle1=NULL;            return;        }        circle1->setHighlighted(true);        setStatus(getStatus()+1);        graphicView->redraw(RS2::RedrawDrawing);    }        break;    case SetCircle2:        if(valid) trigger();        break;    }}
开发者ID:CERobertson,项目名称:LibreCAD,代码行数:38,


示例9: switch

void RS_ActionDrawEllipseFociPoint::coordinateEvent(RS_CoordinateEvent* e) {    if (e==NULL) {        return;    }    RS_Vector mouse = e->getCoordinate();    switch (getStatus()) {    case SetFocus1:        graphicView->moveRelativeZero(mouse);        focus1=mouse;        setStatus(SetFocus2);        break;    case SetFocus2:        c=0.5*focus1.distanceTo(mouse);        if(c>RS_TOLERANCE){            graphicView->moveRelativeZero(mouse);            focus2=mouse;            center=(focus1+focus2)*0.5;            major=focus1-center;            major /= c ;            setStatus(SetPoint);        }        break;    case SetPoint:        point=mouse;        d=0.5*(focus1.distanceTo(point)+focus2.distanceTo(point));        if (d > c+ RS_TOLERANCE) {            graphicView->moveRelativeZero(mouse);            trigger();        }        break;    default:        break;    }}
开发者ID:chenchizhao,项目名称:LibreCAD,代码行数:38,


示例10: popgrab

void Cascade::press(int x,int y)  {  int xpos, ypos;  if(help)    help->deactivate();  if(state)    { /* Already pressed */    if(x<0 || x>=gtwidth()+2 || y<0 || y>=gtheight()+2)      { /* Mouse is outside our window */      popgrab();      }    else      {      greedygrab(0);      }    return;    }  trigger();  if(!gtmom()->is_menu)    {    calcpos(gtouter()->gtwin(),&xpos,&ypos);    m->stx(xpos);    m->sty(ypos+gth()+2);    }  else    {    calcpos(gtouter()->gtwin(),&xpos,&ypos);    m->stx(xpos+gtw()+2);    m->sty(ypos);    }  grab(this,0);  state=1;  m->enable();  }
开发者ID:baruch,项目名称:joes-sandbox,代码行数:38,


示例11: switch

void RS_ActionDrawCircleTan1_2P::mouseReleaseEvent(QMouseEvent* e) {    // Proceed to next status    if (e->button()==Qt::LeftButton) {        switch (getStatus()) {        case SetCircle1:        {            RS_Entity*  en = catchCircle(e);			if (!en) return;            circle = static_cast<RS_AtomicEntity*>(en);            circle->setHighlighted(true);            graphicView->redraw(RS2::RedrawDrawing);            setStatus(getStatus()+1);        }            break;        case SetPoint1:        case SetPoint2:        {            RS_CoordinateEvent ce(snapPoint(e));            coordinateEvent(&ce);        }            break;        case SetCenter:			pPoints->coord=graphicView->toGraph(e->x(),e->y());            if(preparePreview()) trigger();            break;        default:            break;        }    } else if (e->button()==Qt::RightButton) {        // Return to last status:        if(getStatus()>0){            deletePreview();        }        init(getStatus()-1);    }}
开发者ID:Aly1029,项目名称:LibreCAD,代码行数:38,


示例12: sanity_check

void AISyncServer::remove(AISyncClient* client){#ifdef SYNC_TESTSUITE  sanity_check();#endif  client_list_t::iterator client_iter = mClients.begin();  synceventset_t remaining_ready_events = (synceventset_t)-1;		// All clients are ready.  synceventset_t remaining_pending_events = 0;						// At least one client is ready (waiting for the other clients thus).  client_list_t::iterator found_client = mClients.end();  while (client_iter != mClients.end())  {	if (client_iter->mClientPtr == client)	{	  found_client = client_iter;	}	else	{	  remaining_ready_events &= client_iter->mReadyEvents;	  remaining_pending_events |= client_iter->mReadyEvents;	}	++client_iter;  }  llassert(found_client != mClients.end());  // This must be the same as client->mReadyEvents.  llassert(found_client->mReadyEvents == client->mReadyEvents);  mClients.erase(found_client);  synceventset_t old_ready_events = mReadyEvents;  mReadyEvents = remaining_ready_events;  mPendingEvents = remaining_pending_events;  trigger(old_ready_events);  client->mServer.reset();  client->deregistered();#ifdef SYNC_TESTSUITE  sanity_check();#endif}
开发者ID:RouterGray,项目名称:Singularity-OldIntel,代码行数:38,


示例13: trystart

static void trystart(){	int f;	switch(f = fork())	{		case -1:			write_log(fdlogwf, WARNING, "unable to fork for ", service, ", sleeping 60 seconds/n");			deepsleep(60);			trigger();			return;		case 0:			sig_uncatch(sig_child);			sig_unblock(sig_child);			execvp(cmd[0], cmdp);			write_log(fdlogwf, FATAL, "unable to start ", cmd[0], "/n");			_exit(1);	}	flagpaused = 0;	pid = f;	pidchange();	announce();	deepsleep(1);}
开发者ID:lipeng-wei,项目名称:supervise,代码行数:23,


示例14: switch

void RS_ActionDrawLinePolygonCorCor::coordinateEvent(RS_CoordinateEvent* e) {    if (e==NULL) {        return;    }    RS_Vector mouse = e->getCoordinate();    switch (getStatus()) {    case SetCorner1:        corner1 = mouse;        setStatus(SetCorner2);        graphicView->moveRelativeZero(mouse);        break;    case SetCorner2:        corner2 = mouse;        trigger();        break;    default:        break;    }}
开发者ID:PlastecProfiles,项目名称:LibreCAD,代码行数:23,


示例15: get_period

 void Scheduler::terminate() {     if(m_use_external_clock)     {         /* If we're set to use an external trigger, we need to generate the          * necessary triggers internally to wind down all of the tasks to          * allow for a clean exit.          */         const units::Nanoseconds s_period = get_period();         while(sched_unwind_tics)         {             usleep(s_period / 1000);             trigger();         }     }     else     {         this->lock();         m_sched_impl->sync.condition_satisfied();         m_sched_impl->sync.release();         this->unlock();     } }
开发者ID:adnap117,项目名称:libSPRITE,代码行数:23,


示例16: disconnect

void ActionButton::setAction(Action *AAction){	if (FAction != AAction)	{		if (FAction)		{			disconnect(FAction,0,this,0);		}		FAction = AAction;		onActionChanged();		if (FAction)		{			connect(this,SIGNAL(clicked()),FAction,SLOT(trigger()));			connect(FAction,SIGNAL(changed()),SLOT(onActionChanged()));			connect(FAction,SIGNAL(actionDestroyed(Action *)),SLOT(onActionDestroyed(Action *)));			setActionString(AAction->data(Action::DR_UserDefined  + 1).toString());		}		emit actionChanged();	}}
开发者ID:Rambler-ru,项目名称:Contacts,代码行数:23,


示例17: QAction

bool KDEIntegration::registerGlobalShortcut(const QString &id, const QKeySequence &key, QAction *action){#ifdef USE_KDE5    QAction *act = _shortcuts.value(id);    if (!act) {        act = new QAction(action->text(), this);        act->setObjectName(id);        _shortcuts.insert(id, act);    }    KGlobalAccel::setGlobalShortcut(act, key);#else    //KGlobalAccel::setGlobalShortcut()    KAction *act = _shortcuts.value(id);    if (!act) {        act = new KAction(action->text(), this);        act->setObjectName(id);        _shortcuts.insert(id, act);    }    act->setGlobalShortcut(KShortcut(key));#endif    connect(act, SIGNAL(triggered()), action, SLOT(trigger()), Qt::UniqueConnection);    return true;}
开发者ID:Ri0n,项目名称:QtNote,代码行数:23,


示例18: defined

void tst_QScriptEngineDebugger::debuggerSignals(){#if defined(Q_OS_WINCE) && _WIN32_WCE < 0x600    QSKIP("skipped due to high mem usage until task 261062 is fixed", SkipAll);#endif    QScriptEngine engine;    QScriptEngineDebugger debugger;    debugger.attachTo(&engine);    debugger.setAutoShowStandardWindow(false);    QSignalSpy evaluationSuspendedSpy(&debugger, SIGNAL(evaluationSuspended()));    QSignalSpy evaluationResumedSpy(&debugger, SIGNAL(evaluationResumed()));    QObject::connect(&debugger, SIGNAL(evaluationSuspended()),                     debugger.action(QScriptEngineDebugger::ContinueAction),                     SLOT(trigger()));    engine.evaluate("123");    QCOMPARE(evaluationSuspendedSpy.count(), 0);    QCOMPARE(evaluationResumedSpy.count(), 0);    engine.evaluate("debugger");    QCoreApplication::processEvents();    QCOMPARE(evaluationSuspendedSpy.count(), 1);    QCOMPARE(evaluationResumedSpy.count(), 1);}
开发者ID:RS102839,项目名称:qt,代码行数:23,


示例19: switch

void RS_ActionDrawCircleTan2::mouseReleaseEvent(QMouseEvent* e) {    // Proceed to next status    if (e->button()==Qt::LeftButton) {        switch (getStatus()) {        case SetCircle1:        case SetCircle2: {            RS_Entity*  en = catchCircle(e);			if (en==nullptr) return;            circles.resize(getStatus());            circles.push_back(static_cast<RS_AtomicEntity*>(en));            if(getStatus()==SetCircle1 || getCenters()){                circles.at(circles.size()-1)->setHighlighted(true);                graphicView->redraw(RS2::RedrawDrawing);                setStatus(getStatus()+1);            }        }            break;        case SetCenter:            coord= graphicView->toGraph(e->x(), e->y());            if( preparePreview()) trigger();            break;        default:            break;        }    } else if (e->button()==Qt::RightButton) {        // Return to last status:        if(getStatus()>0){            circles[getStatus()-1]->setHighlighted(false);            circles.pop_back();            graphicView->redraw(RS2::RedrawDrawing);            deletePreview();        }        init(getStatus()-1);    }}
开发者ID:Harpalus,项目名称:LibreCAD,代码行数:37,


示例20: switch

void LC_ActionDrawCircle2PR::coordinateEvent(RS_CoordinateEvent* e) {    if (e==NULL) {        return;    }    RS_Vector mouse = e->getCoordinate();    switch (getStatus()) {    case SetPoint1:        point1 = mouse;        graphicView->moveRelativeZero(mouse);        setStatus(SetPoint2);        break;    case SetPoint2:		if(mouse.distanceTo(point1) <= 2.*data->radius){            point2 = mouse;            graphicView->moveRelativeZero(mouse);            setStatus(SelectCenter);        }else{            RS_DIALOGFACTORY->commandMessage(tr("radius=%1 is too small for points selected/ndistance between points=%2 is larger than diameter=%3").											 arg(data->radius).arg(point1.distanceTo(point2)).arg(2.*data->radius));        }        break;    case SelectCenter: {        bool showPreview=preparePreview(mouse);		if(showPreview || data->isValid())            trigger();        else            RS_DIALOGFACTORY->commandMessage(tr("Select from two possible circle centers"));    }        break;    default:        break;    }}
开发者ID:CERobertson,项目名称:LibreCAD,代码行数:37,


示例21: QSystemTrayIcon

void BitcoinGUI::createTrayIcon(){    QMenu *trayIconMenu;#ifndef Q_WS_MAC    trayIcon = new QSystemTrayIcon(this);    trayIconMenu = new QMenu(this);    trayIcon->setContextMenu(trayIconMenu);    trayIcon->setToolTip("Bitcoin client");    trayIcon->setIcon(QIcon(":/icons/toolbar"));    connect(trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)),            this, SLOT(trayIconActivated(QSystemTrayIcon::ActivationReason)));    trayIcon->show();#else    // Note: On Mac, the dock icon is used to provide the tray's functionality.    MacDockIconHandler *dockIconHandler = MacDockIconHandler::instance();    connect(dockIconHandler, SIGNAL(dockIconClicked()), openBitcoinAction, SLOT(trigger()));    trayIconMenu = dockIconHandler->dockMenu();#endif    // Configuration of the tray icon (or dock icon) icon menu    trayIconMenu->addAction(openBitcoinAction);    trayIconMenu->addSeparator();    trayIconMenu->addAction(messageAction);#ifndef FIRST_CLASS_MESSAGING    trayIconMenu->addSeparator();#endif    trayIconMenu->addAction(receiveCoinsAction);    trayIconMenu->addAction(sendCoinsAction);    trayIconMenu->addSeparator();    trayIconMenu->addAction(optionsAction);#ifndef Q_WS_MAC // This is built-in on Mac    trayIconMenu->addSeparator();    trayIconMenu->addAction(quitAction);#endif    notificator = new Notificator(tr("bitcoin-qt"), trayIcon);}
开发者ID:jondoh,项目名称:bitcoin,代码行数:37,


示例22: switch

void RS_ActionModifyStretch::coordinateEvent(RS_CoordinateEvent* e) {    if (e==NULL) {        return;    }    RS_Vector mouse = e->getCoordinate();    switch (getStatus()) {    case SetFirstCorner:        firstCorner = mouse;        setStatus(SetSecondCorner);        break;    case SetSecondCorner:        secondCorner = mouse;        deletePreview();        setStatus(SetReferencePoint);        break;    case SetReferencePoint:        referencePoint = mouse;        graphicView->moveRelativeZero(referencePoint);        setStatus(SetTargetPoint);        break;    case SetTargetPoint:        targetPoint = mouse;        graphicView->moveRelativeZero(targetPoint);        trigger();        //finish();        break;    default:        break;    }}
开发者ID:0825732889,项目名称:LibreCAD,代码行数:37,


示例23: QDialog

OpenFileDlg::OpenFileDlg(QWidget *parent, CR3View * docView):    QDialog(parent),    m_ui(new Ui::OpenFileDlg),    m_docview(docView){    m_ui->setupUi(this);    addAction(m_ui->actionGoToBegin);    addAction(m_ui->actionNextPage);    addAction(m_ui->actionPrevPage);    addAction(m_ui->actionGoToFirstPage);    addAction(m_ui->actionGoToLastPage);    QAction *actionRemoveFile = m_ui->actionRemoveFile;    QShortcut* kbd = new QShortcut(Qt::Key_AltGr, this); // quick hack to delete files on K4NT with KBD key    connect(kbd, SIGNAL(activated()), actionRemoveFile, SLOT(trigger()));    addAction(actionRemoveFile);    QAction *actionSelect = m_ui->actionSelectFile;    actionSelect->setShortcut(Qt::Key_Select);    addAction(actionSelect);    folder = QIcon(":/icons/folder_sans_32.png");    file = QIcon(":/icons/book_text_32.png");    arrowUp = QIcon(":/icons/arrow_full_up_32.png");    m_ui->FileList->setItemDelegate(new FileListDelegate());    QString lastPathName;    QString lastName;    if(!docView->GetLastPathName(&lastPathName))#ifdef i386        CurrentDir = "/home/";#else        CurrentDir = "/mnt/us/documents/";#endif    else {
开发者ID:jiedo,项目名称:coolreader-kindle-qt,代码行数:37,


示例24: switch

void RS_ActionDrawLine::coordinateEvent(RS_CoordinateEvent* e) {    RS_DEBUG->print("RS_ActionDrawLine::coordinateEvent");    if (e==NULL) {        RS_DEBUG->print("RS_ActionDrawLine::coordinateEvent: event was NULL");        return;    }    RS_Vector mouse = e->getCoordinate();	if(pPoints->data.startpoint.valid == false && getStatus()==SetEndpoint) setStatus(SetStartpoint);    switch (getStatus()) {    case SetStartpoint:		pPoints->data.startpoint = mouse;        addHistory(mouse);		pPoints->start = pPoints->data.startpoint;        setStatus(SetEndpoint);        graphicView->moveRelativeZero(mouse);        updateMouseButtonHints();        break;    case SetEndpoint:		if((mouse-pPoints->data.startpoint).squared() > RS_TOLERANCE2) {            //refuse zero length lines			pPoints->data.endpoint = mouse;            addHistory(mouse);            trigger();			pPoints->data.startpoint = pPoints->data.endpoint;			if(pPoints->history.size()>=2) updateMouseButtonHints();        }        //graphicView->moveRelativeZero(mouse);        break;    default:        break;    }    RS_DEBUG->print("RS_ActionDrawLine::coordinateEvent: OK");}
开发者ID:Joeycc,项目名称:LibreCAD,代码行数:37,


示例25: snapPoint

void RS_ActionDrawLineHorVert::mouseReleaseEvent(QMouseEvent* e) {    if (e->button()==Qt::LeftButton) {        RS_Vector mouse = snapPoint(e);        switch (getStatus()) {        case SetStartpoint:            p1 = mouse;            setStatus(SetEndpoint);            break;        case SetEndpoint:            p2 = mouse;            trigger();            setStatus(SetStartpoint);            break;        default:            break;        }    } else if (e->button()==Qt::RightButton) {        deletePreview();        init(getStatus()-1);    }}
开发者ID:0825732889,项目名称:LibreCAD,代码行数:24,


示例26: switch

void RS_ActionDrawCircle2P::coordinateEvent(RS_CoordinateEvent* e) {    if (e==NULL) {        return;    }    RS_Vector mouse = e->getCoordinate();    switch (getStatus()) {    case SetPoint1:        point1 = mouse;        graphicView->moveRelativeZero(mouse);        setStatus(SetPoint2);        break;    case SetPoint2:        point2 = mouse;        graphicView->moveRelativeZero(mouse);        trigger();        break;    default:        break;    }}
开发者ID:JGabriel85,项目名称:LibreCAD,代码行数:24,


示例27: qiLogError

  void SignalBase::operator()(      qi::AutoAnyReference p1,      qi::AutoAnyReference p2,      qi::AutoAnyReference p3,      qi::AutoAnyReference p4,      qi::AutoAnyReference p5,      qi::AutoAnyReference p6,      qi::AutoAnyReference p7,      qi::AutoAnyReference p8)  {    qi::AutoAnyReference* vals[8]= {&p1, &p2, &p3, &p4, &p5, &p6, &p7, &p8};    std::vector<qi::AnyReference> params;    for (unsigned i = 0; i < 8; ++i)      if (vals[i]->isValid())        params.push_back(*vals[i]);    qi::Signature signature = qi::makeTupleSignature(params);    if (signature != _p->signature)    {      qiLogError() << "Dropping emit: signature mismatch: " << signature.toString() <<" " << _p->signature.toString();      return;    }    trigger(params, _p->defaultCallType);  }
开发者ID:cgestes,项目名称:libqi,代码行数:24,


示例28: DAQmxStartTask

double DAQManager::getVoltage(){    float64 sum;    int32 read;#ifdef _WIN32	DAQmxStartTask(adcTaskHandle);	trigger();	while(!dataAcquired);	dataAcquired=0;	DAQmxStopTask(adcTaskHandle);#elif __APPLE__    /*bool32 isDone;    DAQmxBaseIsTaskDone(adcTaskHandle,&isDone);*/    DAQmxBaseReadAnalogF64(adcTaskHandle, SAMPLE_COUNT, 10.0, DAQmx_Val_GroupByScanNumber, data, SAMPLE_COUNT, &read, NULL);    /*while(!isDone);    DAQmxBaseStopTask(adcTaskHandle);    DAQmxBaseClearTask(adcTaskHandle);*/#endif    sum = 0;    for (int i = 0; i < SAMPLE_COUNT; ++i){        sum += voltageData[i];    }    return sum / SAMPLE_COUNT;}
开发者ID:lionel88cn,项目名称:SpectrumScanner,代码行数:24,


示例29: refreshList

void Inspector::update(double deltaTime){    BasicButton::update(deltaTime);    refreshList();    //check if we need scrollBar and make one if we do	if (scrollBar){		if (listSize.y>listDisplaySize){			trigger(scrollBar);			placeScrollBar();		}else {			scrollBar->remove();			scrollBar=NULL;		}        scrollBar->bHidden=!bOpen;	}	else{		if (listSize.y>listDisplaySize){			createScrollBar();            scrollBar->bHidden=!bOpen;		}	}}
开发者ID:ElementalSpork,项目名称:Moviesandbox,代码行数:24,



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


C++ triggerAction函数代码示例
C++ triangulate函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。