1 #ifndef CARMA_UI_RTD_MONITORTABLE_H
2 #define CARMA_UI_RTD_MONITORTABLE_H
19 #include <boost/shared_ptr.hpp>
21 #include <carma/ui/rtd/common/RtDisplay.h>
29 class MonitorContainer;
51 class MonitorTableVisitor;
52 typedef boost::shared_ptr<MonitorTableVisitor> MonitorTableVisitorPtr;
54 struct MonitorColumnInfo {
55 ::std::string heading;
58 MonitorColumnInfo( const ::std::string & inHeading,
63 typedef boost::shared_ptr<MonitorTable> MonitorTablePtr;
65 class MonitorTable :
public RtTable {
83 static MonitorTablePtr makeTable(
84 const ::std::vector<MonitorColumnInfo>& columns,
88 bool unitsInRowLabels=
true,
89 bool switchRowsAndColumns=
false,
90 const MonitorTableVisitorPtr visitor=MonitorTableVisitorPtr(),
91 bool displayRowLabels=
true);
109 static MonitorTablePtr makeTable(
110 const MonitorColumnInfo& column,
112 int hierarchyDepth=1,
114 bool unitsInRowLabels=
true,
115 bool switchRowsAndColumns=
false,
116 const MonitorTableVisitorPtr visitor=MonitorTableVisitorPtr(),
117 const bool displayRowLabels=
true);
135 static MonitorTablePtr makeTable(
136 const ::std::string& heading,
139 int hierarchyDepth=1,
141 bool unitsInRowLabels=
true,
142 bool switchRowsAndColumns=
false,
143 const MonitorTableVisitorPtr visitor=MonitorTableVisitorPtr(),
144 const bool displayRowLabels=
true);
162 static MonitorTablePtr makeTable(
163 const std::vector<std::string>& headings,
164 const std::vector<const monitor::MonitorContainer*>& containers,
166 int hierarchyDepth =1,
168 bool unitsInRowLabels=
true,
169 bool switchRowsAndColumns=
false,
170 const MonitorTableVisitorPtr visitor=MonitorTableVisitorPtr(),
171 bool displayRowLabels=
true);
189 static MonitorTablePtr makeTable(
190 const std::vector< std::string >& headings,
191 const std::vector<monitor::MonitorContainer*>& containers,
193 int hierarchyDepth=1,
195 bool unitsInRowLabels=
true,
196 bool switchRowsAndColumns=
false,
197 const MonitorTableVisitorPtr visitor=MonitorTableVisitorPtr(),
198 bool displayRowLabels=
true);
200 virtual ~MonitorTable();
212 static int autoFitColumnWidth(
213 const ::std::vector< const monitor::MonitorContainer * > & containers,
216 const MonitorTableVisitorPtr visitor );
228 static int autoFitColumnWidth(
232 const MonitorTableVisitorPtr visitor );
244 static int autoFitColumnWidth(
245 const ::std::vector< monitor::MonitorContainer * > & containers,
248 const MonitorTableVisitorPtr visitor );
260 static int autoFitColumnWidth(
261 const ::std::vector< MonitorColumnInfo > & columns,
264 const MonitorTableVisitorPtr visitor );
276 static int autoFitColumnWidth(
277 const MonitorColumnInfo & column,
280 const MonitorTableVisitorPtr visitor );
304 const std::vector<MonitorColumnInfo>& columns,
308 bool unitsInRowLabels,
309 bool switchRowsAndColumns,
310 const MonitorTableVisitorPtr visitor,
311 bool displayRowLabels);
314 static ::std::vector< int > getWidths(
318 const MonitorTableVisitorPtr visitor );
321 bool unitsInRowLabels,
322 bool switchRowsAndColumns,
323 const MonitorTableVisitorPtr visitor,
324 const bool displayRowLabels);
326 void addContainerMonitorPoints(
328 const MonitorTableVisitorPtr visitor,
329 const int defaultWidth,
330 const ::std::vector< int > & individualWidths );
332 const int hierarchyDepth_;
const int AUTO_SIZE
Indicate to MonitorSingleTableFolder that we want column widths to be automatically calculated with a...
const int AUTO_SIZE_EACH_COLUMN
Indicate to MonitorSingleTableFolder that we want column widths to be automatically calculated with e...
Abstract base class for a monitor point.
A generic monitor system container base class.