VR-Exchange 2.2 API Documentation
plotterLegendDialog.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2013 VT MAK
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <namespace.h>
13 
14 #include <QtGui/QDialog>
15 #include <QtGui/QComboBox>
16 #include <QtGui/QItemDelegate>
17 
18 #include <map>
19 
20 class QMenu;
21 class DtString;
22 class QTableWidget;
23 class QTableWidgetItem;
24 
25 namespace MAKVrExchange
26 {
27 
28  class DtFrameratePlot;
29  class DtSeriesColorRecord;
30  class DtFrameratePlotSeries;
31  class DtLineStyleComboDelegate;
32  class DtLineColorSelectDelegate;
33 
36  class DT_DLL_LIBPORTALAPP DtPlotterLegendDialog : public QDialog
37  { Q_OBJECT;
38  public:
39 
41  DtPlotterLegendDialog( QWidget* parent = 0 );
42 
44  virtual ~DtPlotterLegendDialog();
45 
47  virtual void addItem( const DtSeriesColorRecord& rec,
48  const DtString& units, const DtString& description );
49 
51  virtual void removeSection( const DtString& sectionName );
52 
54  virtual void resizeToContents();
55 
56  protected:
57 
60  void initView();
61 
64  void connectToSignals();
65 
67  virtual QTableWidgetItem* getHeaderItem( const DtString& sectionName );
68 
71  virtual bool eventFilter( QObject* obj, QEvent* event );
72 
73  signals:
74 
76  void seriesToggled( const DtString& brokerName,
77  const DtString& fieldName, bool enabled );
78 
80  void seriesStyleChanged( const DtString& brokerName,
81  const DtString& fieldName, unsigned int style );
82 
84  void seriesColorChanged( const DtString& brokerName,
85  const DtString& fieldName, int r, int g, int b );
86 
87  protected slots:
88 
91  virtual void onTableWidgetItemChanged( QTableWidgetItem* item );
92 
95  virtual void onEnableAllSeries();
96 
99  virtual void onDisableAllSeries();
100 
101  private:
102 
105 
107  DtPlotterLegendDialog& operator = ( DtPlotterLegendDialog& other );
108 
109  protected:
110 
111  typedef std::map<DtString,QTableWidgetItem*> SectionHeaderMap;
113 
114  typedef std::map<DtString,QTableWidgetItem*> SeriesItemsMap;
115  typedef std::map<QTableWidgetItem*,SeriesItemsMap> HeaderSeriesItemsMap;
117 
119 
123  QTableWidget* myListWidget;
124 
125  };
126 
127 
128 }

Document ID: Generated on Mon Apr 15 17:15:50 EDT 2013 from SVN revision 126154
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)