00001 /****************************************************************************** 00002 STDR Simulator - Simple Two DImensional Robot Simulator 00003 Copyright (C) 2013 STDR Simulator 00004 This program is free software; you can redistribute it and/or modify 00005 it under the terms of the GNU General Public License as published by 00006 the Free Software Foundation; either version 3 of the License, or 00007 (at your option) any later version. 00008 This program is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00011 GNU General Public License for more details. 00012 You should have received a copy of the GNU General Public License 00013 along with this program; if not, write to the Free Software Foundation, 00014 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00015 00016 Authors : 00017 * Manos Tsardoulias, etsardou@gmail.com 00018 * Aris Thallas, aris.thallas@gmail.com 00019 * Chris Zalidis, zalidis@gmail.com 00020 ******************************************************************************/ 00021 00022 #include <signal.h> 00023 #include "stdr_gui/stdr_gui_controller.h" 00024 #include "stdr_gui/stdr_gui_application.h" 00025 00026 void signalHandler(int sig); 00027 00034 int main(int argc,char **argv) 00035 { 00036 stdr_gui::CStdrApplication app(argc, argv); 00037 app.setAttribute(Qt::AA_DontShowIconsInMenus, false); 00038 ros::init(argc, argv, "stdr_gui_node", ros::init_options::NoSigintHandler); 00039 stdr_gui::CGuiController con(argc, argv); 00040 00041 // Add custom signal handlers 00042 signal(SIGTERM, signalHandler); 00043 signal(SIGINT, signalHandler); 00044 signal(SIGHUP, signalHandler); 00045 00046 con.init(); 00047 app.exec(); 00048 return 0; 00049 } 00050 00054 void signalHandler(int sig) 00055 { 00056 QApplication::quit(); 00057 }