main.cpp
Go to the documentation of this file.
00001 /*******************************************************************************
00002  *  TalkingHead - A talking head for robots
00003  *  Copyright (C) 2012 AG Aktives Sehen <agas@uni-koblenz.de>
00004  *                     Universitaet Koblenz-Landau
00005  *
00006  *  This program is free software: you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation, either version 3 of the License, or
00009  *  (at your option) any later version.
00010  *
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00014  *  Library General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU Library General Public
00017  *  License along with this library; if not, write to the Free Software
00018  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
00019  *  MA 02110-1301  USA or see <http://www.gnu.org/licenses/>.
00020  *******************************************************************************/
00021 
00022 #include <ros/ros.h>
00023 
00024 #include "MainWindow.h"
00025 #include "QtRosNode.h"
00026 
00027 int main( int argc, char *argv[] )
00028 {
00029     festival_initialize ( true, FESTIVAL_HEAP_SIZE );
00030 
00031     // Create application object
00032     QApplication app( argc, argv );
00033 
00034     app.setApplicationName( QString( "RobotFace" ) );
00035 
00036     MainWindow window;
00037 
00038     QIcon icon;
00039     icon.addFile(QString::fromUtf8("../logo.png"), QSize(), QIcon::Normal, QIcon::Off);
00040     window.setWindowIcon(icon);
00041 
00042     window.show();
00043 
00044     // Check for and move to second screen
00045     QRect screen_res = qApp->desktop()->screenGeometry(1/*screenNumber*/);
00046     window.move( screen_res.x(), screen_res.y() );
00047 
00048     // Initialize ROS
00049     QtRosNode qt_ros_node( argc, argv, "RobotFace", &window, &app );
00050     qt_ros_node.start();
00051 
00052     window.setNodeHandle( qt_ros_node.getNodeHandle() );
00053 
00054     app.exec();
00055 
00056     return 0;
00057 }


robot_face
Author(s): AGAS, Julian Giesen, David Gossow
autogenerated on Mon Oct 6 2014 04:10:26