test-HeadQt.cpp

Go to the documentation of this file.
00001 /*! @file Qt/test-HeadQt.cpp thest the robot head */
00002 
00003 // $HeadURL: svn://isvn.usc.edu/software/invt/trunk/saliency/src/Qt/test-HeadQt.cpp $
00004 // $Id: test-HeadQt.cpp 8353 2007-05-06 16:31:00Z lior $
00005 
00006 #include <qapplication.h>
00007 #include "Qt/ui/RobotHeadForm.h"
00008 #include "Component/ModelManager.H"
00009 #include "Devices/BeoHead.H"
00010 #include "Devices/DeviceOpts.H"
00011 #include "Media/FrameSeries.H"
00012 #include "Transport/FrameInfo.H"
00013 #include "Transport/TransportOpts.H"
00014 #include "Component/ParamMap.H"
00015 #include "Component/GlobalOpts.H"
00016 #include "Simulation/SimulationOpts.H"
00017 #include "Simulation/SimEventQueueConfigurator.H"
00018 #include "rutz/shared_ptr.h"
00019 #include "rutz/trace.h"
00020 #include "QtUtil/Util.H"
00021 
00022 int main( int argc, const char ** argv )
00023 {
00024 
00025   ModelManager mgr("Robot Head");
00026 
00027   nub::soft_ref<BeoHead> beoHead(new BeoHead(mgr));
00028   mgr.addSubComponent(beoHead);
00029 
00030   mgr.exportOptions(MC_RECURSE);
00031 
00032  /* mgr.setOptionValString(&OPT_FrameGrabberStreaming, "false");
00033   mgr.setOptionValString(&OPT_FrameGrabberType, "V4L");
00034   mgr.setOptionValString(&OPT_FrameGrabberChannel, "1");
00035   mgr.setOptionValString(&OPT_FrameGrabberHue, "0");
00036   mgr.setOptionValString(&OPT_FrameGrabberContrast, "16384");
00037   mgr.setOptionValString(&OPT_FrameGrabberDims, "320x240");
00038 
00039   if (mgr.parseCommandLine(argc, argv, "", 0, 0) == false) return(1);
00040 
00041   nub::soft_ref<FrameIstream> gb;
00042   gb = gbc->getFrameGrabber();
00043   if (gb.isInvalid())
00044     LFATAL("You need to select a frame grabber type via the "
00045         "--fg-type=XX command-line option for this program "
00046         "to be useful");*/
00047 
00048 
00049 
00050   mgr.start();
00051 
00052   QApplication a( argc, argv2qt(argc, argv) );
00053   RobotHeadForm *w = new RobotHeadForm;
00054   w->init(mgr, beoHead);
00055   w->show();
00056   a.connect( &a, SIGNAL( lastWindowClosed() ), &a, SLOT( quit() ) );
00057   return a.exec();
00058 }
Generated on Sun May 8 08:05:33 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3