MainWindow Class. More...
#include <MainWindow.h>
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. | |
FlightPlan * | flightPlan |
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. | |
MapArea * | m_pMapArea |
Pointer to object class MapArea named m_pMapArea. | |
HUDView * | m_HUDView |
Pointer to object class HUDView named m_HUDView. | |
ThreeDView * | m_ThreeDView |
Pointer to object class ThreeDView named m_ThreeDView. |
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.
The Whole Graphical User Interface.
Definition at line 41 of file MainWindow.h.
uvsim::MainWindow::MainWindow | ( | BaseObjectType * | cobject, | |
const Glib::RefPtr< Gtk::Builder > & | glade | |||
) |
Constructor.
cobject | : The base drawing object. | |
glade | : The reference to Gtk::Builder associated with the glade file. |
Definition at line 34 of file MainWindow.cc.
void uvsim::MainWindow::About | ( | ) | [private] |
Runs the "about" message dialog.
Definition at line 82 of file MainWindow.cc.
void uvsim::MainWindow::automaticControl | ( | ) | [private] |
Definition at line 104 of file MainWindow.cc.
double uvsim::MainWindow::calculateDistance | ( | double | x1, | |
double | y1, | |||
double | x2, | |||
double | y2 | |||
) | [private] |
This member function calculates the distance between two points.
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. |
Definition at line 579 of file MainWindow.cc.
void uvsim::MainWindow::Commands | ( | ) | [private] |
u Runs the "commands" message dialog.
Definition at line 74 of file MainWindow.cc.
void uvsim::MainWindow::keyboardInput | ( | int | keyval | ) | [private] |
Selects the key-input from user and perform zoomming, panning, drawing waypoints, or modifying waypoints.
keyval | : The key that is inputted. |
Definition at line 149 of file MainWindow.cc.
void uvsim::MainWindow::manualControl | ( | ) | [private] |
Definition at line 118 of file MainWindow.cc.
void uvsim::MainWindow::offControl | ( | ) | [private] |
Definition at line 91 of file MainWindow.cc.
bool uvsim::MainWindow::on_button_press_event | ( | GdkEventButton * | event | ) | [private, virtual] |
Modifies the waypoint as soon as the user clicks the mouse.
event | : Pointer to an event that is occuring. |
Definition at line 423 of file MainWindow.cc.
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).
event | : The pointer to an event that is occuring. |
Definition at line 135 of file MainWindow.cc.
std::string uvsim::MainWindow::AutomaticButton |
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.
HUDView* uvsim::MainWindow::m_HUDView [private] |
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.
MapArea* uvsim::MainWindow::m_pMapArea [private] |
Pointer to object class MapArea named m_pMapArea.
Definition at line 93 of file MainWindow.h.
ThreeDView* uvsim::MainWindow::m_ThreeDView [private] |
Pointer to object class ThreeDView named m_ThreeDView.
Definition at line 101 of file MainWindow.h.
Definition at line 51 of file MainWindow.h.
std::string uvsim::MainWindow::ManualButton |
Definition at line 61 of file MainWindow.h.