console_master.h
Go to the documentation of this file.
00001 // *****************************************************************************
00002 //
00003 // Copyright (c) 2015, Southwest Research Institute® (SwRI®)
00004 // All rights reserved.
00005 //
00006 // Redistribution and use in source and binary forms, with or without
00007 // modification, are permitted provided that the following conditions are met:
00008 //     * Redistributions of source code must retain the above copyright
00009 //       notice, this list of conditions and the following disclaimer.
00010 //     * Redistributions in binary form must reproduce the above copyright
00011 //       notice, this list of conditions and the following disclaimer in the
00012 //       documentation and/or other materials provided with the distribution.
00013 //     * Neither the name of Southwest Research Institute® (SwRI®) nor the
00014 //       names of its contributors may be used to endorse or promote products
00015 //       derived from this software without specific prior written permission.
00016 //
00017 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00018 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00019 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00020 // ARE DISCLAIMED. IN NO EVENT SHALL Southwest Research Institute® BE LIABLE 
00021 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
00022 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 
00023 // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
00024 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
00025 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
00026 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00027 // DAMAGE.
00028 //
00029 // *****************************************************************************
00030 
00031 #ifndef SWRI_CONSOLE_CONSOLE_MASTER_H_
00032 #define SWRI_CONSOLE_CONSOLE_MASTER_H_
00033 
00034 #include <string>
00035 #include <QObject>
00036 #include <QList>
00037 #include <QFont>
00038 #include <rosgraph_msgs/Log.h>
00039 #include <swri_console/log_database.h>
00040 #include <swri_console/bag_reader.h>
00041 
00042 #include "ros_thread.h"
00043 
00044 namespace swri_console
00045 {
00046 typedef std::vector<rosgraph_msgs::LogConstPtr> MessageList;
00047 
00048 class ConsoleWindow;
00049 class ConsoleMaster : public QObject
00050 {
00051   Q_OBJECT;
00052 
00053  public:  
00054   ConsoleMaster(int argc, char** argv);
00055   virtual ~ConsoleMaster();
00056 
00057  public Q_SLOTS:
00058   void createNewWindow();
00059   void fontSelectionChanged(const QFont &font);
00060   void selectFont();
00061 
00062  Q_SIGNALS:
00063   void fontChanged(const QFont &font);
00064 
00065  private:
00066   BagReader bag_reader_;
00067 
00068   // All ROS operations are done on a separate thread to ensure they do not
00069   // cause the GUI thread to block.
00070   RosThread ros_thread_;
00071   
00072   bool connected_;
00073 
00074   QList<ConsoleWindow*> windows_;
00075 
00076   LogDatabase db_;
00077 
00078   QFont window_font_;
00079 };  // class ConsoleMaster
00080 }  // namespace swri_console
00081 #endif  // SWRI_CONSOLE_CONSOLE_MASTER_H_


swri_console
Author(s): Elliot Johnson
autogenerated on Tue Sep 12 2017 03:09:35