qoccmainwindow.h

Go to the documentation of this file.
00001 /************************************************************************************
00002 **
00003 ** This file is part of the QtOPENCASCADE Toolkit.
00004 **
00005 ** Copyright (C) 2006, 2007, 2008 QtOCC Team Members
00006 **               Peter Dolbey, Marc Britten, Stephane Routelous
00007 **               Stefan Boeykens, Pawel Dobrolowski, Walter Steffe
00008 **               Álvaro Castro Castilla, Dirk Burski, Fotis Sioutis
00009 **
00010 ** This library is free software; you can redistribute it and/or
00011 ** modify it under the terms of the GNU Lesser General Public
00012 ** License as published by the Free Software Foundation; either
00013 ** version 2.1 of the License, or (at your option) any later version.
00014 ** 
00015 ** This library is distributed in the hope that it will be useful,
00016 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018 ** Lesser General Public License for more details.
00019 ** 
00020 ** You should have received a copy of the GNU Lesser General Public
00021 ** License along with this library; if not, write to the Free Software
00022 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00023 **
00024 ***********************************************************************************/
00025 
00026 #ifndef MAINWINDOW_H
00027 #define MAINWINDOW_H
00028 
00029 #include <QtCore/QVariant>
00030 #include <QtGui/QAction>
00031 #include <QtGui/QApplication>
00032 #include <QtGui/QButtonGroup>
00033 #include <QtGui/QDockWidget>
00034 #include <QtGui/QMainWindow>
00035 #include <QtGui/QMenu>
00036 #include <QtGui/QMenuBar>
00037 #include <QtGui/QStatusBar>
00038 #include <QtGui/QTabWidget>
00039 #include <QtGui/QTextEdit>
00040 #include <QtGui/QToolBar>
00041 #include <QtGui/QTreeWidget>
00042 #include <QtGui/QWidget>
00043 
00044 #include "qocccontroller.h"
00045 #include "qoccframe.h"
00046 #include "qocc3dwidget.h"
00047 #include "qoccinputoutput.h"
00048 
00049 class QAction;
00050 class QLabel;
00051 class QMenu;
00052 
00053 class QOCC_DECLSPEC QoccMainWindow : public QMainWindow
00054 {
00055     Q_OBJECT
00056 
00057 public:
00058 
00059     QoccMainWindow();
00060         ~QoccMainWindow() {};
00061         
00062 signals:
00063         void fileOpening();
00064         void fileOpened();
00065 
00066 private slots:
00067     void fileNew();
00068     void fileOpen();
00069     void fileSave();
00070     void filePrint();
00071         void fileClose();
00072 
00073     void undo();
00074     void redo();
00075     void cut();
00076     void copy();
00077     void paste();
00078     void about();
00079         void bottle();
00080     void aboutQt();
00081         //void xyzPosition ( Qocc3dWidget* widget );
00082         //void addPoint (V3d_Coordinate X, V3d_Coordinate Y, V3d_Coordinate Z);
00083 
00084         void statusMessage (const QString aMessage);
00085 
00086         void selectNeutralPoint( void );
00087         void selectVertices( void );
00088         void selectEdges( void );
00089         void selectWires( void );
00090         void selectFaces( void );
00091         void selectShells( void );
00092         void selectSolids( void );
00093         void selectCompSolids( void );
00094         void selectCompounds( void );
00095         void selectShapes( void );
00096 
00097         void circleCentre( void );
00098         void line2Pt( void );
00099         void vertex( void );
00100         void cancelDraw( void );
00101 
00102 private:
00103         QAction* createAction(  const QString& caption, 
00104                                                         const QString& shortcut, 
00105                                                         const QString& tip,
00106                                                         const char* slot,
00107                                                         const QObject* target = NULL);
00108 
00109     void createActions( void );
00110     void createMenus( void );
00111         void createToolBars( void );
00112 
00113     QMenu *fileMenu;
00114     QMenu *editMenu;
00115         QMenu *drawMenu;
00116         QMenu *viewMenu;
00117         QMenu *viewActionsMenu;
00118         QMenu *viewDisplayMenu;
00119     QMenu *formatMenu;
00120     QMenu *helpMenu;
00121         QMenu *gridMenu;
00122         QMenu *selectMenu;
00123 
00124     QAction *newAction;
00125     QAction *openAction;
00126     QAction *saveAction;
00127     QAction *printAction;
00128     QAction *exitAction;
00129     QAction *undoAction;
00130     QAction *redoAction;
00131     QAction *cutAction;
00132     QAction *copyAction;
00133     QAction *pasteAction;
00134     QAction *aboutAction;
00135 
00136         QAction *fitAction;
00137         QAction *fitAllAction;
00138         QAction *zoomAction;
00139         QAction *panAction;
00140         QAction *rotAction;
00141 
00142         QAction *gridXYAction;
00143         QAction *gridXZAction;
00144         QAction *gridYZAction;
00145         QAction *gridOnAction;
00146         QAction *gridOffAction;
00147         QAction *gridRectAction;
00148         QAction *gridCircAction;
00149 
00150         QAction *viewFrontAction;
00151         QAction *viewBackAction;
00152         QAction *viewTopAction;
00153         QAction *viewBottomAction;
00154         QAction *viewLeftAction;
00155         QAction *viewRightAction;
00156         QAction *viewAxoAction;
00157         QAction *viewResetAction;
00158         QAction *viewGridAction;                // Grid view action 
00159 
00160         QAction *selectNeutralAction;
00161         QAction *selectCompoundAction;  // TopAbs_COMPOUND
00162         QAction *selectCompSolidAction; // TopAbs_COMPSOLID
00163         QAction *selectSolidAction;             // TopAbs_SOLID
00164         QAction *selectShellAction;             // TopAbs_SHELL
00165         QAction *selectFaceAction;              // TopAbs_FACE
00166         QAction *selectWireAction;              // TopAbs_WIRE
00167         QAction *selectEdgeAction;              // TopAbs_EDGE
00168         QAction *selectVertexAction;    // TopAbs_VERTEX
00169         QAction *selectShapeAction;             // TopAbs_SHAPE
00170 
00171         QAction *pointAction;
00172         QAction *circle2PtAction;               // Circle drawing action
00173         QAction *line2PtAction;                 // Line drawing action
00174         QAction *cancelDrawAction;
00175 
00176         QAction *backgroundAction;
00177 
00178     QAction *aboutQtAction;
00179 
00180         //Sample Action
00181         QAction *bottleAction;
00182         QoccController* myController;
00183 
00184         QTabBar*                myTabBar;
00185     QTabWidget*         myTabWidget;
00186     QWidget*            myTab;
00187 
00188     QoccFrame*      mySketchFrame;
00189         QoccFrame*      myGeometryFrame;
00190         QoccFrame*      myAssemblyFrame;
00191         QoccFrame*      myMeshFrame;
00192 
00193         QToolBar*               drawToolBar;
00194         
00195         QString myLastFolder;
00196 
00197 };
00198 
00199 #endif
00200 

Generated on Sat Feb 23 21:22:18 2008 for QtGEOM by  doxygen 1.4.7