HyperspaceExplorer 0.7.1
Public Member Functions | Private Slots | Private Member Functions
UI::Dialogs::PolarDialogImpl Class Reference

A Dialog to enter a function from $ R^3 \rightarrow R $ in polar coordinates. More...

#include <PolarDialogImpl.h>

Inheritance diagram for UI::Dialogs::PolarDialogImpl:
Inheritance graph
[legend]
Collaboration diagram for UI::Dialogs::PolarDialogImpl:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 PolarDialogImpl (QWidget *parent=0, Qt::WFlags f=0)

Private Slots

virtual bool checkValidity ()
virtual bool loadFunction ()

Private Member Functions

virtual bool functionPresent (const QString &)
virtual void writeSource ()

Detailed Description

A Dialog to enter a function from $ R^3 \rightarrow R $ in polar coordinates.

The function is evaluated as $ \vec{x} = f(\theta, \phi, \psi) $.

The function will then be compiled into a dynamic library and loaded to be displayed on screen

Todo:
Make the above definition mathematically correct
Author:
Helge Preuss <lene.preuss@gmail.com>

Constructor & Destructor Documentation

UI::Dialogs::PolarDialogImpl::PolarDialogImpl ( QWidget *  parent = 0,
Qt::WFlags  f = 0 
)

PolarDialogImpl c'tor taking parameters for the parent ComplexDialog, which in turn inherited them from QDialog displays the dialog

Parameters:
parentparent widget (NULL)
fwindow flags

References checkValidity(), and loadFunction().

Here is the call graph for this function:


Member Function Documentation

bool UI::Dialogs::PolarDialogImpl::checkValidity ( ) [private, virtual, slot]

this function is called when the user clicks the OK button in the Function Dialog. checks whether all fields are filled in, whether the given function is valid C++ syntax, ie. whether it compiles, and whether the compiled code links into a dynamic library. as a side effect, it generates this library. finally, it checks whether the library can be loaded. if so, it accepts the input. also, this function creates a directory structure "plugins/real" under the resource directory and changes the CWD to that folder for the duration of checkValidity (). the name for this function is chosen rather unfortunately, i guess.

Returns:
success

Referenced by PolarDialogImpl().

Here is the caller graph for this function:

bool UI::Dialogs::PolarDialogImpl::functionPresent ( const QString &  libName) [private, virtual]

loads the dynamic library given by libName, if it exists and can be loaded. then it checks whether a function named f () is present. if so, returns true. else borks with an error message.

Parameters:
libNamefilename for the selected DLL
Returns:
success

Implements UI::Dialogs::PluginCreator.

bool UI::Dialogs::PolarDialogImpl::loadFunction ( ) [private, virtual, slot]

display and load the selected DLL into current address space loads a dynamic library, which can be selected by the user on a QFileDialog. calls loadFunction () below. see there.

Returns:
success (?)

Implements UI::Dialogs::PluginCreator.

Referenced by PolarDialogImpl().

Here is the caller graph for this function:

void UI::Dialogs::PolarDialogImpl::writeSource ( ) [private, virtual]

write a C++ source file, containing the given function and some framework to make it compilable by g++ (there is currently no support for other compilers). the resulting file "<function-name>.C" defines the function f () and the function symbolic (), which returns the function in symbolic terms, not in C++ syntax.

Implements UI::Dialogs::PluginCreator.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends

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