|
HyperspaceExplorer 0.7.1
|
The menu for the C4DView and handlers for menu events. More...
#include <Menu4D.h>

Public Slots | |
| void | customFunction () |
| "Object/f:R^3 -> R/Custom function" menu item selected | |
| void | customPolarFunction () |
| "Object/f:R^3 -> R/Custom polar function" menu item selected | |
| void | customSurface () |
| "Object/Surfaces/Custom surface" menu item selected | |
| void | customComplexFunction () |
| "Object/Surfaces/f:C -> C/Custom complex function" menu item selected | |
| void | Colors () |
| "Appearance/Colors" menu item selected | |
| void | Shade () |
| "Appearance/Shading" menu item selected | |
| void | Fog () |
| "Appearance/Depth Cue" menu item selected | |
| void | Transparent () |
| "Appearance/Transparence" menu item selected | |
| void | Light () |
| "Appearance/Lighting" menu item selected | |
| void | Wireframe () |
| "Appearance/Wireframe" menu item selected | |
| void | Coordinates () |
| "Appearance/Coordinate Cross" menu item selected | |
| void | setBackground () |
| "Appearance/Set Background Color" menu item selected | |
| void | HyperFog () |
| "Appearance/4D Depth Cue" menu item selected | |
| void | setColorManager (QAction *) |
| "Appearance/Coloring Scheme" submenu item selected | |
| void | RenderToImages () |
| "Animation/Render to Images" menu item selected | |
| void | AnimationSettings () |
| "Animation/Animation Settings" menu item selected | |
| void | Benchmark () |
| "Animation/Benchmark" menu item selected | |
| void | RandomAnimation () |
| "Animation/Random Animation" menu item selected | |
| void | Help () |
| "Help/Online Help" menu item selected | |
| void | about () |
| "Help/About" menu item selected | |
| void | aboutQt () |
| "Help/About Qt" menu item selected | |
Public Member Functions | |
| Menu4D (C4DView *) | |
| Creates the application's main menu and all its submenus. | |
| void | addToMenuBar (QMenuBar *menuBar) |
| Add the menu to a QMenuBar. | |
| void | updateFunctionMenu (const QString &) |
| Set the selected function as checked and uncheck all the others. | |
| QAction *& | getAction (const QString &key) |
| Search for the QAction associated with a menu item. | |
Private Types | |
|
typedef std::map< QString, QAction * > | ActionMapType |
| Assigns a QAction to a menu title. | |
|
typedef std::map< QMenu *, ActionMapType > | MenuMapType |
| Manages an ActionMap for each submenu. | |
Private Member Functions | |
| QMenu * | createMenu (const DisplayableClass &node) |
| Creates a menu with submenus from a DisplayableClass. | |
| QAction * | insertAction (QMenu *, const QString &, const char *=0, bool=true) |
| insert a menu item with a specified slot into a specified menu | |
| QAction * | insertAction (QMenu *, const std::string &, bool=true) |
| insert a menu item creating a Surface object into a specified menu | |
Private Attributes | |
| C4DView * | _parent |
| the C4DView containing this menu | |
| QMenu * | _appear |
| The "Appearance" menu. | |
| QMenu * | _color |
| The "Appearance/Color Schemes" submenu. | |
| QMenu * | _animation |
| The "Animation" menu. | |
| QMenu * | _help |
| The "Help" menu. | |
| QMenu * | generated_ |
| The auto-generated Displayable menu. | |
| MenuMapType | _menuMap |
| Keeps the QActions belonging to the menu entries. | |
The menu for the C4DView and handlers for menu events.
This class has been outsourced from C4DView to keep C4DView to a managable size.
| C4DView::Menu4D::Menu4D | ( | C4DView * | _parent | ) |
Creates the application's main menu and all its submenus.
This Constructor is where the menu structure is defined; if you want to change the menu, do it here.
Basically this happens by inserting all the menu items and the QActions they trigger manually. The application of TemplatedRealFunctionFactory<Function> as Factory object _helps to save a lot of redundant code, but still every menu item must be specified manually.
References _animation, _appear, _color, _help, about(), AnimationSettings(), std::vector< _Tp, _Alloc >::begin(), begin(), Benchmark(), std::cerr, Colors(), Coordinates(), copy(), createMenu(), std::vector< _Tp, _Alloc >::end(), end(), Fog(), generated_, getAction(), UI::ViewImpl::getColors(), UI::ViewImpl::getCoordinates(), UI::ViewImpl::getFog(), UI::ViewImpl::getLighting(), DisplayableClass::getRootNode(), UI::ViewImpl::getShading(), UI::ViewImpl::getSolid(), UI::ViewImpl::getTransparence(), UI::ViewImpl::getWriteImages(), Help(), HyperFog(), insertAction(), Loki::SingletonHolder< T, CreationPolicy >::Instance(), Light(), RandomAnimation(), RenderToImages(), setBackground(), setColorManager(), UI::ViewImpl::setSolid(), Shade(), Transparent(), and Wireframe().

| void C4DView::Menu4D::about | ( | ) | [slot] |
"Help/About" menu item selected
Open an "About"-Dialog telling a few basics about the software
Referenced by Menu4D().

| void C4DView::Menu4D::aboutQt | ( | ) | [slot] |
"Help/About Qt" menu item selected
Open an "About Qt"-Dialog
| void C4DView::Menu4D::addToMenuBar | ( | QMenuBar * | menuBar | ) |
Add the menu to a QMenuBar.
| menuBar | The menu bar you want augmented with the menu |
References Loki::SingletonHolder< T, CreationPolicy >::Instance().
Referenced by C4DView::C4DView().


| void C4DView::Menu4D::AnimationSettings | ( | ) | [slot] |
"Animation/Animation Settings" menu item selected
Show a dialog to adjust _animation settings - where to write image files and how many files to write.
References UI::Dialogs::AnimationDialogImpl::getDir(), UI::Dialogs::AnimationDialogImpl::getFrames(), UI::Dialogs::AnimationDialogImpl::getPrefix(), and Loki::SingletonHolder< T, CreationPolicy >::Instance().
Referenced by Menu4D().


| void C4DView::Menu4D::Benchmark | ( | ) | [slot] |
| void C4DView::Menu4D::Colors | ( | ) | [slot] |
"Appearance/Colors" menu item selected
Toggle colors
Referenced by Menu4D().

| void C4DView::Menu4D::Coordinates | ( | ) | [slot] |
"Appearance/Coordinate Cross" menu item selected
Switch coordinate cross on or off
Change menu items accordingly
Referenced by Menu4D().

| void C4DView::Menu4D::customComplexFunction | ( | ) | [slot] |
"Object/Surfaces/f:C -> C/Custom complex function" menu item selected
Display a CustomComplexFunction object
References C4DView::CustomFunctionSlot< function >::createCustomSurface().

| void C4DView::Menu4D::customFunction | ( | ) | [slot] |
"Object/f:R^3 -> R/Custom function" menu item selected
Display a CustomFunction object
References C4DView::CustomFunctionSlot< function >::createCustomFunction().

| void C4DView::Menu4D::customPolarFunction | ( | ) | [slot] |
"Object/f:R^3 -> R/Custom polar function" menu item selected
Display a CustomPolarFunction object
References C4DView::CustomFunctionSlot< function >::createCustomFunction().

| void C4DView::Menu4D::customSurface | ( | ) | [slot] |
"Object/Surfaces/Custom surface" menu item selected
Display a CustomSurface object
References C4DView::CustomFunctionSlot< function >::createCustomSurface().

| void C4DView::Menu4D::Fog | ( | ) | [slot] |
"Appearance/Depth Cue" menu item selected
Toggle fog/depth cue
Referenced by Menu4D().

| QAction *& C4DView::Menu4D::getAction | ( | const QString & | key | ) |
Search for the QAction associated with a menu item.
| key | The title of the wanted menu item |
key References std::map< _Key, _Tp, _Compare, _Alloc >::begin(), std::map< _Key, _Tp, _Compare, _Alloc >::count(), and std::map< _Key, _Tp, _Compare, _Alloc >::end().
Referenced by Menu4D().


| void C4DView::Menu4D::Help | ( | ) | [slot] |
"Help/Online Help" menu item selected
Display _help window
References C4DView::_helpFile.
Referenced by Menu4D().

| void C4DView::Menu4D::HyperFog | ( | ) | [slot] |
"Appearance/4D Depth Cue" menu item selected
Switch 4D depth cue on or off Change menu items accordingly
Referenced by Menu4D().

| QAction * C4DView::Menu4D::insertAction | ( | QMenu * | _menu, |
| const QString & | title, | ||
| const char * | slot = 0, |
||
| bool | checkable = true |
||
| ) | [private] |
insert a menu item with a specified slot into a specified menu
Insert a menu item with a specified slot into a specified menu and into the hash map storing the actions by menu title. This is necessary to find the menus whenever you want to change the item titles.
| _menu | the menu you want to add the item to |
| title | the title of the item |
| slot | The function triggered by the item's selection. If it is null, you have to connect the returned action to a slot by yourself. |
| checkable | whether the menu item is checkable |
References C4DView::_menu.
Referenced by createMenu(), and Menu4D().

| void C4DView::Menu4D::Light | ( | ) | [slot] |
"Appearance/Lighting" menu item selected
Switch lighting on or off
Change menu items accordingly
Referenced by Menu4D().

| void C4DView::Menu4D::RandomAnimation | ( | ) | [slot] |
"Animation/Random Animation" menu item selected
Animate the object whith the rotation of the animation changing randomly every couple of seconds
Referenced by Menu4D().

| void C4DView::Menu4D::RenderToImages | ( | ) | [slot] |
"Animation/Render to Images" menu item selected
Switch rendering to files on or off
Change menu items accordingly
Referenced by Menu4D().

| void C4DView::Menu4D::setBackground | ( | ) | [slot] |
"Appearance/Set Background Color" menu item selected
Pop up a color selector and set the background to the chosen color
Referenced by Menu4D().

| void C4DView::Menu4D::setColorManager | ( | QAction * | a | ) | [slot] |
"Appearance/Coloring Scheme" submenu item selected
Set ColorManager to the selected menu item
check current menu item, uncheck others
References std::vector< _Tp, _Alloc >::begin(), std::vector< _Tp, _Alloc >::end(), and Loki::SingletonHolder< T, CreationPolicy >::Instance().
Referenced by C4DView::C4DView(), and Menu4D().


| void C4DView::Menu4D::Shade | ( | ) | [slot] |
"Appearance/Shading" menu item selected
Toggle shading
Referenced by Menu4D().

| void C4DView::Menu4D::Transparent | ( | ) | [slot] |
"Appearance/Transparence" menu item selected
Toggle object transparency
Referenced by Menu4D().

| void C4DView::Menu4D::updateFunctionMenu | ( | const QString & | item | ) |
Set the selected function as checked and uncheck all the others.
| item | Title of the item whose checking status is toggled |
| void C4DView::Menu4D::Wireframe | ( | ) | [slot] |
"Appearance/Wireframe" menu item selected
Switch between wireframe and solid display
Account for antialiasing only in wireframe mode
Change menu items accordingly
Referenced by Menu4D().

1.7.4
-
Hosted by