void QtOSGViewer::_InitGUI(bool bCreateStatusBar)
{
    osg::ArgumentParser arguments(0, NULL);

//    _qCentralWidget.reset(new QWidget());
//    _qCentralWidget->adjustSize();
//    _qCentralLayout = new QGridLayout;
//    _qCentralLayout->addWidget(_posgWidget,0,0);
//    _qCentralWidget->setLayout(_qCentralLayout);
//    setCentralWidget(_qCentralWidget);

    _posgWidget = new ViewerWidget(GetEnv());
    setCentralWidget(_posgWidget);

    // initialize the environment
    _ivRoot = new osg::Group();
    _ivRoot->ref();

    _qtree = new QTreeView;

    _CreateActions();
    _CreateMenus();
    _CreateToolsBar();
    if( bCreateStatusBar ) {
        _CreateStatusBar();
    }
    _CreateDockWidgets();

    resize(1024, 750);

    // toggle switches
    _bDisplayGrid = false;
    _bDisplayIK = false;
    _bDisplayFPS = false;
    _bJointHilit = true;
    _bDynamicReplan = false;
    _bVelPredict = true;
    _bDynSim = false;
    _bControl = true;
    _bGravity = true;
    _bTimeElapsed = false;
    _bSensing = false;
    _bMemory = true;
    _bHardwarePlan = false;
    _bShareBitmap = true;
    _bManipTracking = false;
    _bAntialiasing = false;
    _viewGeometryMode = VG_RenderOnly;
}
CIndicatorEditorMainWindow::CIndicatorEditorMainWindow(QWidget* parent)
    : QMainWindow(parent)
{
	m_nClassType = ClassType_CIndicatorEditorMainWindow;
	m_colorValue = Qt::black;
	m_nFontActionType = FontActionType_Begin;

 	_CreateActions();
 	_CreateMenus();
 	_CreateToolBars();

    setupUi(this);

	_CreateConnect();

}
Exemple #3
0
Bool RPGGame::OnInitialize()
{
    // Initialize everything
    _CreateActions();

    GraphicsManager::Create();
    GraphicsFn->Initialize();
    _CreateLightsMaterials();
    _CreateBitmaps();
    _CreateTextures();
    _CreateInstancedGeometry();

    EntityManager::Create();
    EntityFn->Initialize();

    AnimationManager::Create();
    AnimationFn->Initialize();

    GameplayManager::Create();
    GameplayFn->Initialize();
    _CreateWorld();

    InterfaceManager::Create();
    InterfaceFn->Initialize();

    // Load player character
    PCharacter * pPlayer = (PCharacter*)( GameplayFn->GetCharacter(TEXT("Shiki")) );
    pPlayer->AddSkill( SKILLID_MAGE_FIREBOLT );
    pPlayer->AddSkill( SKILLID_MAGE_ICENOVA );

	// Debug
    WorldFn->ToggleDebugDraw( true );

    GPU2DColor hDebugTextColor = Color4::White;
    m_pDebugTextBrush = New GPU2DSolidColorBrush( RenderingFn->GetScreen2DContext() );
    m_pDebugTextBrush->SetColor( &hDebugTextColor );
    m_pDebugTextBrush->Bind();

    m_pDebugTextFormat = New GPU2DTextFormat();
    m_pDebugTextFormat->Bind( LOCALENAME_EN_US, GPU2DFONTFAMILY_ARIAL, GPU2DFONT_WEIGHT_NORMAL, GPU2DFONT_STYLE_NORMAL, GPU2DFONT_STRETCH_NORMAL, 10.0f );
    m_pDebugTextFormat->SetTextAlignment( GPU2DTEXT_ALIGNMENT_LEADING );
    m_pDebugTextFormat->SetParagraphAlignment( GPU2DTEXT_PARAGRAPHALIGNMENT_CENTER );

    // Done
    return true;
}
CClientMainWindowMenuBar::CClientMainWindowMenuBar(QWidget *parent)
    : QMenuBar(parent)
{
    //this->resize(200, 300);
	m_pClientLoginWindow = NULL;

	m_Menu_Files = NULL;

	m_pAction_ConnectToServer = NULL;

	m_pClientLoginWindow = new CClientLoginWindow(this);

	_CreateActions();
	_CreateMenus();
	_TranslateLanguage();
	_CreateConnect();
}
Bool EngineTests::OnInitialize()
{
    // Initialize everything
    _CreateActions();
    _CreateEffects();
    _CreateInstancedGeometry();
    _CreateWorld();

    m_pBackboardModel = New TestBackboardModel( this );
    GUIFn->SetBackboardModel( m_pBackboardModel );

    // Debug
    WorldFn->ToggleDebugDraw( true );

    GPU2DColor hDebugTextColor = Color4::White;
    m_pDebugTextBrush = New GPU2DSolidColorBrush( RenderingFn->GetScreen2DContext() );
    m_pDebugTextBrush->SetColor( &hDebugTextColor );
    m_pDebugTextBrush->Bind();

    m_pDebugTextFormat = New GPU2DTextFormat();
    m_pDebugTextFormat->Bind( LOCALENAME_EN_US, GPU2DFONTFAMILY_ARIAL, GPU2DFONT_WEIGHT_NORMAL, GPU2DFONT_STYLE_NORMAL, GPU2DFONT_STRETCH_NORMAL, 10.0f );
    m_pDebugTextFormat->SetTextAlignment( GPU2DTEXT_ALIGNMENT_LEADING );
    m_pDebugTextFormat->SetParagraphAlignment( GPU2DTEXT_PARAGRAPHALIGNMENT_CENTER );

    m_pFloor->SetDebugFlags( WORLD_DEBUGDRAW_GIZMOS | WORLD_DEBUGDRAW_PROXIES | WORLD_DEBUGDRAW_JOINTS | WORLD_DEBUGDRAW_CONTACTS | WORLD_DEBUGDRAW_CONTACTPOINTS );
    m_pCharacter->SetDebugFlags( WORLD_DEBUGDRAW_GIZMOS | WORLD_DEBUGDRAW_PROXIES | WORLD_DEBUGDRAW_JOINTS | WORLD_DEBUGDRAW_CONTACTS | WORLD_DEBUGDRAW_CONTACTPOINTS );

    for( UInt i = 0; i < ENGINE_TEST_STACK_SIZE; ++i ) {
        if ( m_arrBallStack[i] != NULL )
            m_arrBallStack[i]->SetDebugFlags( WORLD_DEBUGDRAW_PROXIES | WORLD_DEBUGDRAW_JOINTS | WORLD_DEBUGDRAW_CONTACTS | WORLD_DEBUGDRAW_CONTACTPOINTS );
        if ( m_arrBoxStack[i] != NULL )
            m_arrBoxStack[i]->SetDebugFlags( WORLD_DEBUGDRAW_PROXIES | WORLD_DEBUGDRAW_JOINTS | WORLD_DEBUGDRAW_CONTACTS | WORLD_DEBUGDRAW_CONTACTPOINTS );
    }

    if ( m_pFixedObject != NULL )
        m_pFixedObject->SetDebugFlags( WORLD_DEBUGDRAW_GIZMOS | WORLD_DEBUGDRAW_PROXIES | WORLD_DEBUGDRAW_JOINTS | WORLD_DEBUGDRAW_CONTACTS | WORLD_DEBUGDRAW_CONTACTPOINTS );
    if ( m_pObjectA != NULL )
        m_pObjectA->SetDebugFlags( WORLD_DEBUGDRAW_GIZMOS | WORLD_DEBUGDRAW_PROXIES | WORLD_DEBUGDRAW_JOINTS | WORLD_DEBUGDRAW_CONTACTS | WORLD_DEBUGDRAW_CONTACTPOINTS );
    if ( m_pObjectB != NULL )
        m_pObjectB->SetDebugFlags( WORLD_DEBUGDRAW_GIZMOS | WORLD_DEBUGDRAW_PROXIES | WORLD_DEBUGDRAW_JOINTS | WORLD_DEBUGDRAW_CONTACTS | WORLD_DEBUGDRAW_CONTACTPOINTS );

    // Done
    return true;
}
void CClientMainWindowToolBar::_Init()
{
	m_pMyBarTypeHeler = NULL;
	m_pMyBarTypeHeler = new CMyBarTypeHeler();
	m_nCurrentInstrumentID = DEFVALUE_Int_InstrumentID;
	m_nCurrentBarType = m_pMyBarTypeHeler->getBarTypeByString(DEFVALUE_String_HistoryBarType);


	_CreateActions();
	_AddAction();
	translateLanguage();
	_CreateConnect();

	if (m_nCurrentBarType == DAY)
	{
		m_pAction_BarInfo_D1->setChecked(true);//default 
		m_pAction_BarInfo_D1->trigger();//default 
	}

}
CClientMainWindowMenuBar::CClientMainWindowMenuBar(QWidget *parent)
    : QMenuBar(parent)
{
    //this->resize(200, 300);

	m_pAction_ReConnect = NULL;
	m_pAction_ChangePassword = NULL;
	m_pAction_Exit = NULL;

	m_Menu_Files = NULL;
	m_Menu_View = NULL;
	m_Menu_Insert = NULL;
	m_Menu_Tools = NULL;
	m_Menu_Window = NULL;
	m_Menu_Help = NULL;


	_CreateActions();
	_CreateMenus();
	_TranslateLanguage();
}