Ejemplo n.º 1
0
/*XmdvToolMainWnd::XmdvToolMainWnd(QWidget *parent)
: QMainWindow(parent)
{

	//To display help in QT Assistant
	assistant = new Assistant;

	m_pipelineManager = new PipelineManager(this);

	m_viewManager = new ViewManager(this);

	if (this->objectName().isEmpty())
		this->setObjectName(QString::fromUtf8("XmdvToolMainWnd"));
	this->resize(1000, 600);
	this->setWindowIcon(ICON_PA);

	m_mdiArea = new QMdiArea(this);
	this->setCentralWidget(m_mdiArea);
	m_viewManager->setMdiArea(m_mdiArea);
	connect(m_mdiArea, SIGNAL(subWindowActivated(QMdiSubWindow*)),
			m_viewManager, SLOT(mdiSubWindowActivated(QMdiSubWindow*)) );

	m_handleFiles = new HandleFiles(this);
	m_handleView = new HandleView(this);
	m_handleBrush = new HandleBrush(this);
	m_handleTools = new HandleTools(this);
	m_handleZoom = new HandleZoom(this);

	initFileActions();
	initViewActions();
	initBrushActions();
	initToolsActions();
	initWindowActions();
	initVisActions();
	initZoomActions();
	initHelpActions();

	initMenuBar();
	initFileMenu();
	initViewMenu();
	initBrushMenu();
	initToolsMenu();
	initWindowMenu();
	initHelpMenu();

    initToolBarTop();
	initToolBarRight();
	initStatusBar();

	this->setMouseTracking(true);
}*/
XmdvToolMainWnd::XmdvToolMainWnd(QWidget *parent, RInside &R)
:QMainWindow(parent),m_R(R)
{
   // m_R = R.instance();
    assistant = new Assistant;

    m_pipelineManager = new PipelineManager(this);

    m_viewManager = new ViewManager(this);

    if (this->objectName().isEmpty())
        this->setObjectName(QString::fromUtf8("XmdvToolMainWnd"));
    this->resize(1000, 600);
    this->setWindowIcon(ICON_PA);

    m_mdiArea = new QMdiArea(this);
    this->setCentralWidget(m_mdiArea);
    m_viewManager->setMdiArea(m_mdiArea);
    connect(m_mdiArea, SIGNAL(subWindowActivated(QMdiSubWindow*)),
            m_viewManager, SLOT(mdiSubWindowActivated(QMdiSubWindow*)) );

    m_handleFiles = new HandleFiles(this);
    m_handleView = new HandleView(this);
    m_handleBrush = new HandleBrush(this);
    m_handleTools = new HandleTools(this);
    m_handleZoom = new HandleZoom(this);

    initFileActions();
    initViewActions();
    initBrushActions();
    initToolsActions();
    initWindowActions();
    initVisActions();
    initZoomActions();
    initHelpActions();

    initMenuBar();
    initFileMenu();
    initViewMenu();
    initBrushMenu();
    initToolsMenu();
    initWindowMenu();
    initHelpMenu();

    initToolBarTop();
    initToolBarRight();
    initStatusBar();

    this->setMouseTracking(true);
}
Ejemplo n.º 2
0
OccView::OccView(Document* document):
    m_document(document),
    m_mode(Selection)
{
    QSurfaceFormat format;
    format.setDepthBufferSize(16);
    format.setStencilBufferSize(1);
    setFormat(format);

    m_view = m_document->viewer()->CreateView();

    m_widget = QWidget::createWindowContainer(this);
    m_map.insert(m_widget, m_document);

    initCursors();
    initViewActions();
    initRenderActions();
}