stdr_gui_node.cpp
Go to the documentation of this file.
1 /******************************************************************************
2  STDR Simulator - Simple Two DImensional Robot Simulator
3  Copyright (C) 2013 STDR Simulator
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; either version 3 of the License, or
7  (at your option) any later version.
8  This program is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  GNU General Public License for more details.
12  You should have received a copy of the GNU General Public License
13  along with this program; if not, write to the Free Software Foundation,
14  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 
16  Authors :
17  * Manos Tsardoulias, etsardou@gmail.com
18  * Aris Thallas, aris.thallas@gmail.com
19  * Chris Zalidis, zalidis@gmail.com
20 ******************************************************************************/
21 
22 #include <signal.h>
25 
26 void signalHandler(int sig);
27 
34 int main(int argc,char **argv)
35 {
36  stdr_gui::CStdrApplication app(argc, argv);
37  app.setAttribute(Qt::AA_DontShowIconsInMenus, false);
38  ros::init(argc, argv, "stdr_gui_node", ros::init_options::NoSigintHandler);
39  stdr_gui::CGuiController con(argc, argv);
40 
41  // Add custom signal handlers
42  signal(SIGTERM, signalHandler);
43  signal(SIGINT, signalHandler);
44  signal(SIGHUP, signalHandler);
45 
46  con.init();
47  app.exec();
48  return 0;
49 }
50 
54 void signalHandler(int sig)
55 {
56  QApplication::quit();
57 }
app
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
Inherits QApplications. Created to overload the notify function.
void signalHandler(int sig)
Signal handler, kills QApplication.
int main(int argc, char **argv)
The main node function.
bool init()
Initializes the ROS spin and Qt threads.


stdr_gui
Author(s): Manos Tsardoulias
autogenerated on Mon Jun 10 2019 15:15:16