void DecodeCallBack::onPDU ( const PDU& pdu)
{
    switch (pdu.channel())
    {
    case PDU::other:
        break;
    case PDU::le:
        break;    
    case PDU::bccmd:
        onBCCMDResponse(pdu);
        break;
    case PDU::hq:
        onHQRequest(pdu);
        break;
    case PDU::dm:
        break;
    case PDU::hciCommand:
        onHCIEvent(pdu);
        break;
    case PDU::hciACL:
        onHCIACLData(pdu);
        break;
    case PDU::hciSCO:
        onHCISCOData(pdu);
        break;
    case PDU::l2cap:
        break;
    case PDU::rfcomm:
        break;
    case PDU::sdp:
        break;
    case PDU::debug:
        onDebug(pdu);
        break;
    case PDU::upgrade:
        break;
    case PDU::vm:
        onVMData(pdu);
        break;
    case PDU::bcsp_channel_count:
        break;
    case PDU::lmp_debug:
        onLMPdebug(pdu);
        break;
    default:
        break;
    }
}
예제 #2
0
MainWindow::MainWindow(QWidget *parent, Qt::WFlags flags) : QMainWindow(parent, flags) {
	ui.setupUi(this);

	// setup the docking widgets
	controlWidget = new ControlWidget(this);
	propertyWidget = new PropertyWidget(this);

	// setup the toolbar
	ui.fileToolBar->addAction(ui.actionNewTerrain);
	ui.fileToolBar->addAction(ui.actionOpenTerrain);
	ui.areaToolBar->addAction(ui.actionAreaSelect);
	ui.areaToolBar->addAction(ui.actionAreaCreate);
	ui.areaToolBar->addAction(ui.actionHintLine);
	ui.areaToolBar->addAction(ui.actionAvenueSketch);

	ui.actionAreaSelect->setChecked(true);

	// register the menu's action handlers
	connect(ui.actionNewTerrain, SIGNAL(triggered()), this, SLOT(onNewTerrain()));
	connect(ui.actionOpenTerrain, SIGNAL(triggered()), this, SLOT(onLoadTerrain()));
	connect(ui.actionSaveTerrain, SIGNAL(triggered()), this, SLOT(onSaveTerrain()));
	connect(ui.actionLoadRoads, SIGNAL(triggered()), this, SLOT(onLoadRoads()));
	connect(ui.actionAddRoads, SIGNAL(triggered()), this, SLOT(onAddRoads()));
	connect(ui.actionSaveRoads, SIGNAL(triggered()), this, SLOT(onSaveRoads()));
	connect(ui.actionClearRoads, SIGNAL(triggered()), this, SLOT(onClearRoads()));
	connect(ui.actionLoadAreas, SIGNAL(triggered()), this, SLOT(onLoadAreas()));
	connect(ui.actionSaveAreas, SIGNAL(triggered()), this, SLOT(onSaveAreas()));
	connect(ui.actionSaveImage, SIGNAL(triggered()), this, SLOT(onSaveImage()));
	connect(ui.actionSaveImageHD, SIGNAL(triggered()), this, SLOT(onSaveImageHD()));
	connect(ui.actionLoadCamera, SIGNAL(triggered()), this, SLOT(onLoadCamera()));
	connect(ui.actionSaveCamera, SIGNAL(triggered()), this, SLOT(onSaveCamera()));
	connect(ui.actionResetCamera, SIGNAL(triggered()), this, SLOT(onResetCamera()));
	connect(ui.actionExit, SIGNAL(triggered()), this, SLOT(close()));
	connect(ui.menuArea, SIGNAL(aboutToShow()), this, SLOT(onAreaMenu()));
	connect(ui.actionAreaSelect, SIGNAL(triggered()), this, SLOT(onAreaSelect()));
	connect(ui.actionAreaCreate, SIGNAL(triggered()), this, SLOT(onAreaCreate()));
	connect(ui.actionAreaDelete, SIGNAL(triggered()), this, SLOT(onAreaDelete()));
	connect(ui.actionAreaDeleteAll, SIGNAL(triggered()), this, SLOT(onAreaDeleteAll()));
	connect(ui.actionHintLine, SIGNAL(triggered()), this, SLOT(onHintLine()));
	connect(ui.actionCutRoads, SIGNAL(triggered()), this, SLOT(onCutRoads()));
	connect(ui.actionHighwaySketch, SIGNAL(triggered()), this, SLOT(onHighwaySketch()));
	connect(ui.actionAvenueSketch, SIGNAL(triggered()), this, SLOT(onAvenueSketch()));
	connect(ui.actionStreetSketch, SIGNAL(triggered()), this, SLOT(onStreetSketch()));
	connect(ui.actionControlPoints, SIGNAL(triggered()), this, SLOT(onControlPoints()));

	connect(ui.actionGenerateBlocks, SIGNAL(triggered()), this, SLOT(onGenerateBlocks()));
	connect(ui.actionGenerateParcels, SIGNAL(triggered()), this, SLOT(onGenerateParcels()));
	connect(ui.actionGenerateBuildings, SIGNAL(triggered()), this, SLOT(onGenerateBuildings()));
	connect(ui.actionGenerateVegetation, SIGNAL(triggered()), this, SLOT(onGenerateVegetation()));
	connect(ui.actionGenerateAll, SIGNAL(triggered()), this, SLOT(onGenerateAll()));

	connect(ui.actionGenerateRegularGrid, SIGNAL(triggered()), this, SLOT(onGenerateRegularGrid()));
	connect(ui.actionGenerateCurvyGrid, SIGNAL(triggered()), this, SLOT(onGenerateCurvyGrid()));
	connect(ui.actionRotationVideo, SIGNAL(triggered()), this, SLOT(onRotationVideo()));
	connect(ui.actionInterpolationVideo, SIGNAL(triggered()), this, SLOT(onInterpolationVideo()));
	connect(ui.actionBlendingVideo, SIGNAL(triggered()), this, SLOT(onBlendingVideo()));
	connect(ui.actionGrowingVideo, SIGNAL(triggered()), this, SLOT(onGrowingVideo()));
	connect(ui.action3DVideo, SIGNAL(triggered()), this, SLOT(on3DVideo()));
	connect(ui.actionMountainVideo, SIGNAL(triggered()), this, SLOT(onMountainVideo()));
	connect(ui.actionTerrainGeneration, SIGNAL(triggered()), this, SLOT(onTerrainGeneration()));
	connect(ui.actionUpdateMountain, SIGNAL(triggered()), this, SLOT(onUpdateMountain()));
	connect(ui.actionTerrainSegmentation, SIGNAL(triggered()), this, SLOT(onTerrainSegmentation()));
	connect(ui.actionExtractContour, SIGNAL(triggered()), this, SLOT(onExtractContour()));

	connect(ui.actionTerrainDataConverter, SIGNAL(triggered()), this, SLOT(onTerrainDataConverter()));
	connect(ui.actionTerrainDataConverter2, SIGNAL(triggered()), this, SLOT(onTerrainDataConverter2()));
	connect(ui.actionCamera3D, SIGNAL(triggered()), this, SLOT(onCamera3D()));
	connect(ui.actionCameraFlyOver, SIGNAL(triggered()), this, SLOT(onCameraFlyOver()));

	connect(ui.actionControlWidget, SIGNAL(triggered()), this, SLOT(onShowControlWidget()));
	connect(ui.actionPropertyWidget, SIGNAL(triggered()), this, SLOT(onShowPropertyWidget()));
	connect(ui.actionDebug, SIGNAL(triggered()), this, SLOT(onDebug()));

	// setup the GL widget
	glWidget = new GLWidget3D(this);
	setCentralWidget(glWidget);

	controlWidget->show();
	addDockWidget(Qt::LeftDockWidgetArea, controlWidget);

	urbanGeometry = new UrbanGeometry(this);

	mode = MODE_AREA_SELECT;
}