/* * MathPlanner 3.1 - Mathematical design tool. * Copyright(C) 2002 Jarmo Nikkanen * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation. * * You should have received a copy of the GNU General Public License with this program. * */ #ifndef _MATHPLANNER_DATA_SYMBOL_H #define _MATHPLANNER_DATA_SYMBOL_H #include "Header.h" #include #include #include class integer_object : public m_base_object { private: QString name; QString letter; QString index_string; m_display_box *let; m_display_box *index; class math_node *integer_value; class math_node *global_value; int integer_no; bool symbol,protect; void BreakName(); void CreateName(); public: integer_object(DataStorage *); integer_object(QString,class ApplicationControl *,class m_function_object *,class string_object *); ~integer_object(); QString GetName(); void SendCall(int); bool isSymbol(); DataStorage *BuildStorage(); void KeyReceived(key_code); void KeyFeedback(key_code); void CalculateBounds(); void MoveTo(QPoint); void Draw(class QPainter *); void Reset(); bool AutoDeletion(); class math_node Calculate(); void Build(); void SetValue(math_node); math_node *GetIntegerPointer(); int GetIntegerNo(); QColor GetColor(int id=0); QFont GetFont(int id=0); }; class value_object : public m_base_object { private: QString letter; m_display_box *let; public: value_object(DataStorage *); value_object(QString,class ApplicationControl *,m_function_object *,class string_object *); ~value_object(); class DataStorage *BuildStorage(); void KeyReceived(key_code); void KeyFeedback(key_code); void CalculateBounds(); void MoveTo(QPoint); void Draw(class QPainter *); void Reset(); void Build(); bool AutoDeletion(); class math_node Calculate(); QColor GetColor(int id=0); QFont GetFont(int id=0); }; class symbol_object : public m_base_object { private: QString letter; public: symbol_object(DataStorage *); symbol_object(QString,int ty,ApplicationControl *,m_function_object *,class string_object *); DataStorage *BuildStorage(); void KeyReceived(key_code); void CalculateBounds(); void MoveTo(QPoint); void Draw(QPainter *); void SetSymbol(QString); QColor GetColor(int id=0); QFont GetFont(int id=0); }; class imaginary_object : public m_base_object { private: QString letter; int Opr; public: imaginary_object(DataStorage *); imaginary_object(int op,ApplicationControl *,m_function_object *,class string_object *); DataStorage *BuildStorage(); void KeyReceived(key_code); void CalculateBounds(); class math_node Calculate(); void MoveTo(QPoint); void Draw(QPainter *); QColor GetColor(int id=0); QFont GetFont(int id=0); }; class unit_object : public m_base_object { private: QString unit; public: unit_object(DataStorage *); unit_object(ApplicationControl *,m_function_object *,class string_object *); DataStorage *BuildStorage(); void KeyReceived(key_code); void CalculateBounds(); class math_node Calculate(); void MoveTo(QPoint); void Draw(QPainter *); QColor GetColor(int id=0); QFont GetFont(int id=0); base_object_message *CreateControlObject(); void MessageReceived(DataStorage *msg,int rec); }; class unit_mes : public base_object_message { Q_OBJECT class QLineEdit *text; class QComboBox *combo; class QHBox *hbox; public: unit_mes(ApplicationControl *); ~unit_mes(); QWidget *MainWidget(); //void ReadState(m_base_object *); public slots: void Combo(int); }; #endif