uvsim::MainWindow Class Reference

MainWindow Class. More...

#include <MainWindow.h>

Collaboration diagram for uvsim::MainWindow:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 MainWindow (BaseObjectType *cobject, const Glib::RefPtr< Gtk::Builder > &glade)
 Constructor.

Public Attributes

UgvSystem m_ugvSystem
Guide m_guide
 Creating Guide object named m_guide.
FlightPlanflightPlan
 Pointer to FlightPlan object named flightPlan.
std::string ManualButton
std::string AutomaticButton

Private Member Functions

virtual bool on_key_press_event (GdkEventKey *event)
 Sets either quit the program (if Esc is pressed) or continue the program with various functions (if other key is pressed).
virtual bool on_button_press_event (GdkEventButton *event)
 Modifies the waypoint as soon as the user clicks the mouse.
double calculateDistance (double x1, double y1, double x2, double y2)
 This member function calculates the distance between two points.
void keyboardInput (int keyval)
 Selects the key-input from user and perform zoomming, panning, drawing waypoints, or modifying waypoints.
void About ()
 Runs the "about" message dialog.
void Commands ()
 u Runs the "commands" message dialog.
void offControl ()
void automaticControl ()
void manualControl ()

Private Attributes

const Glib::RefPtr
< Gtk::Builder > & 
m_glade
 Reference to Gtk::Builder object named m_glade.
Gtk::MenuItem * m_Commands
 Pointer to Gtk::MenuItem named m_Commands.
Gtk::MenuItem * m_About
 Pointer to Gtk::MenuItem named m_About.
Gtk::RadioButton * m_OffControl
 Pointer to Gtk::RadioButton named m_offControl.
Gtk::RadioButton * m_AutomaticControl
 Pointer to Gtk::Radiobutton named m_AutomaticControl.
Gtk::RadioButton * m_ManualControl
 Pointer to Gtk::RadioButton named m_ManualControl.
MapAream_pMapArea
 Pointer to object class MapArea named m_pMapArea.
HUDViewm_HUDView
 Pointer to object class HUDView named m_HUDView.
ThreeDViewm_ThreeDView
 Pointer to object class ThreeDView named m_ThreeDView.

Detailed Description

MainWindow Class.

This class does the mvc (model, view, and control) of the simulator. It has the object m_guide which is derived from Guide class. The object have the all the waypoints data. This functions as the model. It also has the MapArea class which is represented by the view of the map. This class assigns all the keys needed to run the simulator such as "+" and "-" for zooming, arrow for panning, "M" or "m" to move waypoint, "A" or "a" to add waypoint, and "D" or "d" to delete waypoint as a way of control. It also handles the widget to display the configuration and about dialog. This class is the main core of the GUI simulation program.

GUI.png

The Whole Graphical User Interface.

Definition at line 41 of file MainWindow.h.


Constructor & Destructor Documentation

uvsim::MainWindow::MainWindow ( BaseObjectType *  cobject,
const Glib::RefPtr< Gtk::Builder > &  glade 
)

Constructor.

Parameters:
cobject : The base drawing object.
glade : The reference to Gtk::Builder associated with the glade file.

Definition at line 34 of file MainWindow.cc.

Here is the call graph for this function:


Member Function Documentation

void uvsim::MainWindow::About (  )  [private]

Runs the "about" message dialog.

Definition at line 82 of file MainWindow.cc.

Here is the caller graph for this function:

void uvsim::MainWindow::automaticControl (  )  [private]

Definition at line 104 of file MainWindow.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

double uvsim::MainWindow::calculateDistance ( double  x1,
double  y1,
double  x2,
double  y2 
) [private]

This member function calculates the distance between two points.

Parameters:
x1 : The abscissa of first point. u
y1 : The ordinate of first point.
x2 : The abscissa of second point.
y2 : The ordinate of second point.
Returns:
Distance between two points.

Definition at line 579 of file MainWindow.cc.

Here is the caller graph for this function:

void uvsim::MainWindow::Commands (  )  [private]

u Runs the "commands" message dialog.

Definition at line 74 of file MainWindow.cc.

Here is the caller graph for this function:

void uvsim::MainWindow::keyboardInput ( int  keyval  )  [private]

Selects the key-input from user and perform zoomming, panning, drawing waypoints, or modifying waypoints.

Parameters:
keyval : The key that is inputted.

Definition at line 149 of file MainWindow.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void uvsim::MainWindow::manualControl (  )  [private]

Definition at line 118 of file MainWindow.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void uvsim::MainWindow::offControl (  )  [private]

Definition at line 91 of file MainWindow.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

bool uvsim::MainWindow::on_button_press_event ( GdkEventButton *  event  )  [private, virtual]

Modifies the waypoint as soon as the user clicks the mouse.

Parameters:
event : Pointer to an event that is occuring.

Definition at line 423 of file MainWindow.cc.

Here is the call graph for this function:

bool uvsim::MainWindow::on_key_press_event ( GdkEventKey *  event  )  [private, virtual]

Sets either quit the program (if Esc is pressed) or continue the program with various functions (if other key is pressed).

Parameters:
event : The pointer to an event that is occuring.
Returns:
true if a key is pressed.

Definition at line 135 of file MainWindow.cc.

Here is the call graph for this function:


Member Data Documentation

Definition at line 62 of file MainWindow.h.

Pointer to FlightPlan object named flightPlan.

Definition at line 60 of file MainWindow.h.

Gtk::MenuItem* uvsim::MainWindow::m_About [private]

Pointer to Gtk::MenuItem named m_About.

Definition at line 77 of file MainWindow.h.

Gtk::RadioButton* uvsim::MainWindow::m_AutomaticControl [private]

Pointer to Gtk::Radiobutton named m_AutomaticControl.

Definition at line 85 of file MainWindow.h.

Gtk::MenuItem* uvsim::MainWindow::m_Commands [private]

Pointer to Gtk::MenuItem named m_Commands.

Definition at line 73 of file MainWindow.h.

const Glib::RefPtr<Gtk::Builder>& uvsim::MainWindow::m_glade [private]

Reference to Gtk::Builder object named m_glade.

Get the glade file.

Definition at line 69 of file MainWindow.h.

Creating Guide object named m_guide.

Definition at line 56 of file MainWindow.h.

Pointer to object class HUDView named m_HUDView.

Definition at line 97 of file MainWindow.h.

Gtk::RadioButton* uvsim::MainWindow::m_ManualControl [private]

Pointer to Gtk::RadioButton named m_ManualControl.

Definition at line 89 of file MainWindow.h.

Gtk::RadioButton* uvsim::MainWindow::m_OffControl [private]

Pointer to Gtk::RadioButton named m_offControl.

Definition at line 81 of file MainWindow.h.

Pointer to object class MapArea named m_pMapArea.

Definition at line 93 of file MainWindow.h.

Pointer to object class ThreeDView named m_ThreeDView.

Definition at line 101 of file MainWindow.h.

Definition at line 51 of file MainWindow.h.

Definition at line 61 of file MainWindow.h.


The documentation for this class was generated from the following files:

Generated on Mon Nov 9 12:57:11 2009 for uvsim by  doxygen 1.6.1