MetriVis Overview | Download | User Manual | Development
Reference Overview | Design Documentation | Reference Backend | Reference Frontend

src/TimeLineVisualizer.h

Go to the documentation of this file.
00001 /*
00002  *   MetriVis - Metrics Visualization Application
00003  *
00004  *
00005  *   License notice:
00006  *
00007  *   This program is free software: you can redistribute it and/or modify
00008  *   it under the terms of the GNU General Public License as published by
00009  *   the Free Software Foundation, either version 3 of the License, or
00010  *   (at your option) any later version.
00011  *
00012  *   This program is distributed in the hope that it will be useful,
00013  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  *   GNU General Public License for more details.
00016  *
00017  *   You should have received a copy of the GNU General Public License
00018  *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
00019  *
00020  */
00021 
00022 
00029 #ifndef _METRIVIS_TIME_LINE_VISUALIZER_H
00030 #define _METRIVIS_TIME_LINE_VISUALIZER_H
00031 
00032 
00033 #include "container/MultiType.h"
00034 #include "pipeline/PipelineProcess.h"
00035 #include "BaseClass.h"
00036 #include <plplot/plstream.h>
00037 #include <cairo/cairo.h>
00038 
00039 namespace metrivis {
00040 
00041 
00051 cairo_status_t TimeLineCallBackFunction(void *closure,
00052                                         const unsigned char *data,
00053                                         unsigned int length);
00054 
00055 
00056 
00062 class TimeLineVisualizer : public PipelineProcess, public BaseClass {
00063 
00064 public:
00065 
00069   TimeLineVisualizer();
00070 
00074   virtual ~TimeLineVisualizer();
00075 
00082   virtual void Execute();
00083 
00091   virtual void Reset();
00092 
00093 
00100   cairo_status_t WriteImageData(const unsigned char *data, unsigned int length);
00101 
00102 
00112   void set_borders(double min_x, double min_y, double max_x, double max_y) {
00113     min_x_ = min_x;
00114     min_y_ = min_y;
00115     max_x_ = max_x;
00116     max_y_ = max_y;
00117   }
00118 
00119 
00128   void set_tile_index(int x, int y, int zoom) {
00129     x_ = x;
00130     y_ = y;
00131     zoom_ = zoom;
00132 
00133 //     Log(LOG_DEBUG, StrPrint("tile index: x=%i, y=%i, zoom=%i", x, y, zoom));
00134   }
00135 
00136 
00143   void set_debug(int debug_mode) {
00144     debug_mode_ = debug_mode;
00145   }
00146 
00147 
00152   void set_time_window(long min_time, long max_time) {
00153     time_window_min_ = min_time;
00154     time_window_max_ = max_time;
00155   }
00156 
00157 
00158 private:
00159 
00160   int frame_size_;    
00161 
00162   double min_x_;      
00163   double min_y_;      
00164   double max_x_;      
00165   double max_y_;      
00166 
00167   int x_;             
00168   int y_;             
00169   int zoom_;          
00170 
00171   long time_window_min_; 
00172   long time_window_max_; 
00173 
00174   int debug_mode_;    
00175 
00176 
00177 
00178   //plstream plplot_stream_; //!< PLplot drawing stream.
00179 };
00180 
00181 }
00182 
00183 #endif // _METRIVIS_TIME_LINE_VISUALIZER_H

Generated on Fri Feb 29 16:47:19 2008 for MetriVis by  doxygen 1.5.3