HyperspaceExplorer 0.7.1
Menu4D.h
00001 /*
00002 Hyperspace Explorer - visualizing higher-dimensional geometry
00003 Copyright (C) 2010  Lene Preuss <lene.preuss@gmail.com>
00004 
00005 This program is free software; you can redistribute it and/or modify
00006 it under the terms of the GNU General Public License as published by
00007 the Free Software Foundation; either version 2 of the License, or
00008 (at your option) any later version.
00009 
00010 This program is distributed in the hope that it will be useful,
00011 but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 GNU General Public License for more details.
00014 
00015 You should have received a copy of the GNU General Public License along
00016 with this program; if not, write to the Free Software Foundation, Inc.,
00017 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00018 
00019 */
00020 
00021 #ifndef MENU4D_H
00022 #define MENU4D_H
00023 
00024 #include <QMenu>
00025 #include <map>
00026 
00027 #include "4DView.h"
00028 #include "FunctionFactory.h"
00029 
00030 class QString;
00031 class QMenuBar;
00032 class RealFunctionFactory;
00033 class SurfaceFactory;
00034 
00036 
00040 class C4DView::Menu4D: public QMenu {
00041 
00042     Q_OBJECT
00043 
00044 
00045     public:
00047         Menu4D(C4DView *);
00048 
00049     public slots:
00051         void customFunction();
00053         void customPolarFunction();
00055         void customSurface();
00057         void customComplexFunction();
00058 
00059         void Colors();          
00060         void Shade();           
00061         void Fog();             
00062         void Transparent();     
00063         void Light();           
00064         void Wireframe();       
00065         void Coordinates();     
00066         void setBackground();   
00067         void HyperFog();        
00068         void setColorManager(QAction *); 
00069 
00070         void RenderToImages();  
00071         void AnimationSettings(); 
00072         void Benchmark();       
00073         void RandomAnimation(); 
00074 
00075         void Help();            
00076         void about ();          
00077         void aboutQt ();        
00078 
00079     public:
00081         void addToMenuBar(QMenuBar *menuBar);
00083         void updateFunctionMenu(const QString &);
00085         QAction *&getAction(const QString &key);
00086 
00087     private:
00089         typedef std::map<QString, QAction *> ActionMapType;
00091         typedef std::map<QMenu *, ActionMapType> MenuMapType;
00092 
00094         QMenu *createMenu(const DisplayableClass &node);
00095 
00097         QAction *insertAction(QMenu *, const QString &, const char * = 0,
00098                               bool = true);
00100         QAction *insertAction(QMenu *, const std::string &, bool = true);
00101 
00102         C4DView *_parent;       
00103 
00104         QMenu *_appear;         
00105         QMenu *_color;          
00106         QMenu *_animation;      
00107         QMenu *_help;           
00108         QMenu *generated_;      
00109 
00110         MenuMapType _menuMap;    
00111 };
00112 
00113 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends

Generated on Mon Apr 9 2012 20:25:16 for HyperspaceExplorer 0.7.1 by doxygen 1.7.4  -  Hosted bySourceForge.net Logo