VR-Forces 4.0.4 Class Documentation
examples/exampleEmbedded/exampleEmbeddedMainWindow.h
Go to the documentation of this file.
00001 /****************************************************************************** 
00002 ** Copyright (c) 2008 MAK Technologies, Inc. 
00003 ** All rights reserved. 
00004 ******************************************************************************/ 
00005 /****************************************************************************** 
00006 ** $RCSfile: exampleEmbeddedMainWindow.h,v $ $Revision: 1.4 $ $State: Exp $ 
00007 ******************************************************************************/ 
00008 
00009 #ifndef exampleEmbeddedMainWindow_H
00010 #define exampleEmbeddedMainWindow_H
00011 
00012 // Include this header before any Qt header.
00013 #include <vrvUtil/signalslib.h>
00014 
00015 #include <vrvCore/DtDe.h>
00016 #include <vrvCore/DtVrvApplication.h> 
00017 #include <vrvCore/DtPluginManager.h>
00018 #include <vrvOsgQt/DtOsgAdapterQtWidget.h>
00019 #include <vrvOsgQt/DtSceneGraphTreeWidget.h>
00020 #include <vrvCore/DtWindow.h> 
00021 #include <vrvUtil/DtWindowConfiguration.h> 
00022 
00023 #include <QtGui/QMainWindow>
00024 #include <osg/Group>
00025 #include <osg/Node>
00026 
00027 class QAction;
00028 class QMenu;
00029 class QTreeWidget;
00030 class QTreeWidgetItem;
00031 
00032 
00034 class ExampleEmbeddedMainWindow : public QMainWindow
00035 {
00036 
00037    Q_OBJECT
00038 
00039 public:
00040 
00042    ExampleEmbeddedMainWindow();
00043 
00045    virtual ~ExampleEmbeddedMainWindow();
00046 
00047 
00048    // The adapter widgets. These will become owned and 
00049    // deleted by MainWindow.
00050    makVrv::DtOsgAdapterQtWidget* myMainOSGWidget;
00051    makVrv::DtOsgAdapterQtWidget* myMiniOsgWidget;
00052 
00053    void buildGui();
00054 
00055 public slots:
00056 
00057    void open();
00058    void closeFile();
00059 
00060 protected:
00061 
00063    void preDisplayEngineInitialize();      
00064    void createDisplayEngine();
00065    void overrideDisplayEngineFunctionality();      
00066    
00067 
00068    void initializeDisplayEngine();
00069 
00070    void postDisplayEngineInitialize();
00071 
00072    virtual void closeEvent(QCloseEvent *event);
00073 
00074    void createActions();
00075    void createMenus();
00076    void createToolBars();
00077    void createStatusBar();
00078 
00079 protected:
00080 
00081    makVrv::DtDe* myDe;
00082    makVrv::DtPluginManager* myPluginManager;
00083 
00084    makVrv::DtPage* mySceneGraphTreeWidget;
00085 
00086    QMenu* myFileMenu; 
00087    QToolBar* myFileToolBar;
00088    QAction* myOpenAction;
00089    QAction* myCloseAction;
00090    QAction* myExitAction;
00091 };
00092 
00093 class ExampleEmbeddedMainWindowViewCreator : public makVrv::DtWindowCreator
00094 {
00095 public:
00096    ExampleEmbeddedMainWindowViewCreator(ExampleEmbeddedMainWindow* window)
00097    {
00098       myWindow = window;
00099    }
00100 
00102    virtual makVrv::DtWindow* create(makVrv::DtDe&, makVrv::DtWindowConfiguration&);
00103 
00104 protected:
00105    ExampleEmbeddedMainWindow* myWindow;   
00106 };
00107 
00108 #endif 

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)