00001 /* 00002 * MainWindow.h 00003 * Copyright (C) Eduardo Wiputra 2009 <ewiputra@users.sourceforge.net> 00004 * 00005 * MainWindow.h is free software: you can redistribute it and/or modify it 00006 * under the terms of the GNU General Public License as published by the 00007 * Free Software Foundation, either version 3 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * MainWindow.h is distributed in the hope that it will be useful, but 00011 * WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00013 * See the GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License along 00016 * with this program. If not, see <http://www.gnu.org/licenses/>. 00017 */ 00018 00019 #ifndef MainWindow_H 00020 #define MainWindow_H 00021 00022 #include <gtkmm.h> 00023 00024 #include "MapArea.h" 00025 #include "HUDView.h" 00026 #include "ThreeDView.h" 00027 #include "uvsim/guidance/Guide.h" 00028 #include "uvsim/systems/UgvSystem.h" 00029 00030 namespace uvsim 00031 { 00032 00033 // Forward Declarations 00034 class MapArea; 00035 00041 class MainWindow: public Gtk::Window 00042 { 00043 public: 00049 MainWindow(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& glade); 00050 00051 UgvSystem m_ugvSystem; 00052 00056 Guide m_guide; 00060 FlightPlan *flightPlan; 00061 std::string ManualButton; 00062 std::string AutomaticButton; 00063 00064 private: 00069 const Glib::RefPtr<Gtk::Builder> & m_glade; 00073 Gtk::MenuItem * m_Commands; 00077 Gtk::MenuItem * m_About; 00081 Gtk::RadioButton * m_OffControl; 00085 Gtk::RadioButton * m_AutomaticControl; 00089 Gtk::RadioButton * m_ManualControl; 00093 MapArea * m_pMapArea; 00097 HUDView * m_HUDView; 00101 ThreeDView * m_ThreeDView; 00102 /* Gtk::Scale * m_MapZoom; 00103 Gtk::Button * m_Button1; 00104 Gtk::Button * m_Button2; 00105 Gtk::Button * m_Button3; 00106 u Gtk::Button * m_Button4; 00107 void on_Scroll1(); 00108 void on_Button1(); 00109 void on_Button2(); 00110 void on_Button3(); 00111 void on_Button4();*/ 00112 00118 virtual bool on_key_press_event(GdkEventKey *event); 00123 virtual bool on_button_press_event(GdkEventButton *event); 00132 double calculateDistance (double x1, double y1, double x2, double y2); 00137 void keyboardInput(int keyval); 00141 void About(); 00145 void Commands(); 00146 void offControl(); 00147 void automaticControl(); 00148 void manualControl(); 00149 }; 00150 } 00151 00152 #endif 00153 // vim:ts=4:sw=4