Changeset 446 in flair-src for trunk/tools/VrpnLite/src/VrpnLite.cpp


Ignore:
Timestamp:
09/14/21 11:04:41 (4 months ago)
Author:
Sanahuja Guillaume
Message:

vrpnlite: add headless mode and kill button

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/VrpnLite/src/VrpnLite.cpp

    r434 r446  
    1717#include <Thread.h>
    1818#include <UdpSocket.h>
     19#include <TabWidget.h>
     20#include <Tab.h>
     21#include <PushButton.h>
    1922#include <FrameworkManager.h>
    2023#include <Quaternion.h>
     
    2427using namespace flair::core;
    2528using namespace flair::sensor;
     29using namespace flair::gui;
    2630
    2731VrpnLite::VrpnLite(int vrpnLitePort,string vrpnServerAddress): Thread(getFrameworkManager(),"VrpnLite",90) {
    2832  vrpnclient=new VrpnClient("vrpn", vrpnServerAddress,80);
     33  Tab* tab=new Tab(vrpnclient->GetTabWidget(),"Main");
     34  killButton=new PushButton(tab->NewRow(),"kill");
    2935  dataSocket = new UdpSocket(this,"client socket",vrpnLitePort);
    3036  vrpnclient->Start();
     
    4046 
    4147  while (!ToBeStopped()) {
     48    if(killButton->Clicked()) SafeStop();
     49   
    4250    if(vrpnobjects.size()>0) {
    4351      //wait for last one to be sure all are up to date
Note: See TracChangeset for help on using the changeset viewer.