copasi API  0.1
Public Types | Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes
CQExpressionWidget Class Reference

#include <CQExpressionWidget.h>

List of all members.

Public Types

enum  MoveType {
  None, Left, Right, Mouse,
  Unknown
}
enum  ActionType { NoAction, SelectToLeft, SelectToRight, Undo }
enum  ExpressionType { InitialExpression, TransientExpression, ObjectiveFunctions }

Public Slots

void slotTextChanged ()
void slotSelectObject ()

Signals

void valid (bool valid)

Public Member Functions

 CQExpressionWidget (QWidget *parent=0, const char *name=0)
 ~CQExpressionWidget ()
void writeMathML (std::ostream &out) const
CQValidator< QTextEdit > * getValidator ()
void setFunction (const std::string &function)
std::string getFunction () const
void setExpression (const std::string &expression)
std::string getExpression () const
void setExpressionType (const ExpressionType &expressionType)
void setBoolean (bool isBoolean)
bool isValid ()

Protected Slots

void slotCursorPositionChanged ()
void slotSelectionChanged ()

Protected Member Functions

virtual void keyPressEvent (QKeyEvent *e)
virtual void mousePressEvent (QMouseEvent *e)
bool isInObject (int pos)

Protected Attributes

int mOldPar
int mOldPos
int mOldPar1
int mOldPos1
int mOldPar2
int mOldPos2
CCopasiSimpleSelectionTree::ObjectClasses mObjectClasses
std::map< std::string, const
CCopasiObject * > 
mParseList
const CCopasiObjectmpCurrentObject
QString mNewName
QColor mSavedColor
QColor mChangedColor
int mAnchorPos

Detailed Description

The class for writing/editing a mathematical expression


Member Enumeration Documentation

Enumeration of action type

Enumerator:
NoAction 
SelectToLeft 
SelectToRight 
Undo 

Enumeration of expression type

Enumerator:
InitialExpression 
TransientExpression 
ObjectiveFunctions 

Enumeration of movement type

Enumerator:
None 
Left 
Right 
Mouse 
Unknown 

Constructor & Destructor Documentation

CQExpressionWidget::CQExpressionWidget ( QWidget *  parent = 0,
const char *  name = 0 
)
CQExpressionWidget::~CQExpressionWidget ( )

Member Function Documentation

std::string CQExpressionWidget::getExpression ( ) const

Retrieve the expression from the widget in string format

Returns:
std::string expression
std::string CQExpressionWidget::getFunction ( ) const

Retrieve the function from the widget in string format

Returns:
std::string function
CQValidator< QTextEdit > * CQExpressionWidget::getValidator ( )
bool CQExpressionWidget::isInObject ( int  pos) [protected]

Function to check whether the given cursor position is in object

bool CQExpressionWidget::isValid ( )

Check validity of expression

Returns:
bool expression
void CQExpressionWidget::keyPressEvent ( QKeyEvent *  e) [protected, virtual]

Function to control key press event

void CQExpressionWidget::mousePressEvent ( QMouseEvent *  e) [protected, virtual]

Function to control mouse press event

void CQExpressionWidget::setBoolean ( bool  isBoolean)

Set the boolean

Parameters:
boolisBoolean
void CQExpressionWidget::setExpression ( const std::string &  expression)

Set the expression for the widget

Parameters:
conststd::string & expression
void CQExpressionWidget::setExpressionType ( const ExpressionType expressionType)

Set the type of the current expression

Parameters:
constExpressionType & expressionType
void CQExpressionWidget::setFunction ( const std::string &  function)

Set the function for the widget

Parameters:
conststd::string & function
void CQExpressionWidget::slotCursorPositionChanged ( ) [protected, slot]

Slot for being activated whenever the cursor is moved

void CQExpressionWidget::slotSelectionChanged ( ) [protected, slot]

Slot for being activated whenever the selection is changed

void CQExpressionWidget::slotSelectObject ( ) [slot]

Slot for selecting an object

void CQExpressionWidget::slotTextChanged ( ) [slot]

Slot for being activated whenever the text on Expression Widget is changed

This slot checks any characters that are newly typed on Expression Widget.

void CQExpressionWidget::valid ( bool  valid) [signal]

Signal for being sent whenever the expression is valid

void CQExpressionWidget::writeMathML ( std::ostream &  out) const

Write display mathml of the expression into the ostream "out"


Member Data Documentation

return anchor position -> new 16.09.09

QString CQExpressionWidget::mNewName [protected]

Function to indicate whether we are dealing with an INITIAL or TRANSIENT expression

int CQExpressionWidget::mOldPar [protected]
int CQExpressionWidget::mOldPos [protected]
std::map< std::string, const CCopasiObject * > CQExpressionWidget::mParseList [protected]
QColor CQExpressionWidget::mSavedColor [protected]

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