#include <networksarea.hh>
Public Member Functions | |
CNetworksArea () | |
A constructor. | |
~CNetworksArea () | |
A destructor. | |
void | openCircuitFile () |
Circuit opening method. | |
void | solveCircuit () |
Circuit solving method. | |
void | clearCircuit () |
Circuit clearing method. | |
Protected Member Functions | |
bool | mf_drawNetting () |
Draws netting. | |
bool | mf_drawArrow (int fieldX, int fieldY, int rot=0, float proportion=0.6) |
Draws arrow. | |
Gdk::Point | mf_fieldCoords (Gdk::Point coords) |
Function returning network field coords. | |
CElement * | mf_getFieldElement (Gdk::Point fieldCoords) |
Return a pointer to element in a field. | |
void | mf_drawCircuit () |
Circuit drawing method. | |
bool | on_networksarea_configure_event (GdkEventConfigure *event) |
bool | on_networksarea_expose_event (GdkEventExpose *event) |
bool | on_networksarea_motion_notify_event (GdkEventMotion *event) |
bool | on_networksarea_button_press_event (GdkEventButton *event) |
bool | on_networksarea_button_release_event (GdkEventButton *event) |
Protected Attributes | |
Glib::RefPtr< Gdk::Pixmap > | m_RefPixmap_NetworksArea |
A pixmap where the circuit is drawn. | |
Glib::RefPtr< Gdk::GC > | m_RefGC_NetworksArea |
Main gtkmm graphics context used as argument in all drawing functions. | |
Gdk::Color | m_Color_Blue |
Color variable. | |
Gdk::Color | m_Color_Green |
Color variable. | |
Gdk::Color | m_Color_Red |
Color variable. | |
Gdk::Color | m_Color_Black |
Color variable. | |
Gdk::Color | m_Color_White |
Color variable. | |
Gdk::Color | m_Color_Beige |
Color variable. | |
Gdk::Color | m_Color_BG |
Gdk::Color | m_Color_FG |
Gdk::Color | m_Color_Element |
Gdk::Color | m_Color_Node |
Gdk::Color | m_Color_Branch |
Gdk::Color | m_Color_NameText |
Gdk::Color | m_Color_ValueText |
Gdk::Color | m_Color_FrameBG |
Gdk::Color | m_Color_Chart |
Gdk::Color | m_Color_Axis |
int | m_SquareSize |
Netting field size. | |
int | m_NodeSize |
Node size. | |
CCircuit | m_Circuit_Edited |
Edited Circuit. | |
CCircuitSolver | m_circuitKiller |
CCircuitSolver variable used to solver m_Circuit_Edited. | |
RLC::CSignalFrame | m_SignalFrame_Element |
Signal frame variable. | |
bool | m_circuitIsChanged |
If true the circuit is changed. | |
bool | m_pixmapIsConfigured |
If true the pixmap is configured. | |
bool | m_circuitIsLoaded |
If true the circuit is loaded. | |
bool | m_circuitIsSolved |
If true the circuit is solved. | |
Glib::RefPtr< Pango::Context > | m_RefContext_Main |
Pango context mostly used for drawing Layout objects. | |
Friends | |
class | CCircuit |
class | CElement |
class | CVoltage |
class | CVoltage_u |
class | CVoltage_i |
class | CCurent |
class | CCurent_u |
class | CCurent_i |
class | CResistor |
class | CCapasistor |
class | CInductor |
class | CNode |
class | CSignalFrame |
This class handles everything that is connected with drawing. It also handles opening the circuit to draw.
|
A constructor. Reads config, set variables, connect singals with handlers, allocates color maps. |
|
A destructor. Does not really do anything for now. |
|
Circuit clearing method. This calls clearing methods for m_Circuit_Edited and m_circuitKiller in a secure way of opening another file for example. |
|
Draws arrow. This method is used to draw arrows oriented in 4 possible ways: right, left, up, down. This is used to draw elements with arrow, for example voltages or currents.
|
|
Circuit drawing method. This method draws a network netting and a circuit itself. It clears a m_RefPixmap_NetworksArea so that the circuit is not drawn one on another/ In future this will be only called when the circuit will really change. |
|
Draws netting. Draws the basic netting that is at a background. The field size it defined in m_squareSize variable.
|
|
Function returning network field coords. This function converts normal pixel coords to network field coords.
|
|
Return a pointer to element in a field. This function returns a pointer to CElement object that is placed in a field that coords are given.
|
|
|
|
|
|
|
|
|
|
|
|
Circuit opening method. Calls file chooser dialog, to give user a way to select circuit file. Then loads it, and draw. |
|
Circuit solving method. After calling this a m_Circuit_Edited will be solved by m_circuitKiller.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Edited Circuit.
|
|
If true the circuit is changed. The same as some variables below this is a state variable used mostly for drawing and keeping circuit states. |
|
If true the circuit is loaded.
|
|
If true the circuit is solved.
|
|
CCircuitSolver variable used to solver m_Circuit_Edited.
|
|
|
|
Color variable. Used so that we don's have to reallocate it every time we use it. Other color variables are the same. |
|
|
|
Color variable. Used so that we don's have to reallocate it every time we use it. Other color variables are the same. |
|
Color variable. Used so that we don's have to reallocate it every time we use it. Other color variables are the same. |
|
|
|
|
|
|
|
|
|
|
|
Color variable. Used so that we don's have to reallocate it every time we use it. Other color variables are the same. |
|
|
|
|
|
Color variable. Used so that we don's have to reallocate it every time we use it. Other color variables are the same. |
|
|
|
Color variable. Used so that we don's have to reallocate it every time we use it. Other color variables are the same. |
|
Node size. This is a node size defined as 0.15 of m_SquareSize so that a proporction is good (const know) after resizing a network. |
|
If true the pixmap is configured.
|
|
Pango context mostly used for drawing Layout objects.
|
|
Main gtkmm graphics context used as argument in all drawing functions.
|
|
A pixmap where the circuit is drawn.
|
|
Signal frame variable. This represents a frame with a signal that shows up when a mouse is over a element after solving the circuit. |
|
Netting field size. This is the length of a side of the square (field) that is the background for drawing circuits. |