Exemplo n.º 1
0
OsgForm::OsgForm(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::OsgForm),
    m_root(new osg::Group),
    m_loadedModel(new osg::MatrixTransform),
    m_viewToolBar(new QToolBar),
    m_viewMenuBar(new QMenuBar)
{
    ui->setupUi(this);
    setupUserInterface();
    m_root->setName("root");
    m_loadedModel->setName("loadedModel");
    m_root->addChild(m_loadedModel);


    ui->osg3dView->setScene(m_root);
    m_viewingCore = ui->osg3dView->getViewingCore();

    connect(ui->osg3dView, SIGNAL(pickObject(QVector<osg::ref_ptr<osg::Node> >)),
            this, SLOT(handlePick(QVector<osg::ref_ptr<osg::Node> >)));

    connect(ui->osg3dView, SIGNAL(mouseModeChanged(Osg3dView::MouseMode)),
            this, SLOT(announceMouseMode(Osg3dView::MouseMode)));

    connect(ui->osg3dView, SIGNAL(updated()),
            this, SLOT(updateCameraDisplay()));

    connect(ui->osg3dView, SIGNAL(toggleMenuBar()),
            this, SLOT(toggle3dMenu()));
    connect(ui->osg3dView, SIGNAL(toggleToolBar()),
            this, SLOT(toggle3dTools()));
}
Exemplo n.º 2
0
moviemanager::moviemanager()
    : KXmlGuiWindow()
{
    //this shows the UI
    setupGUI();

    //calling all the user defined functions
    //initializing the application
    setupUserInterface();
}