Hurricane Design Viewer


InspectorWidget.h
1
2// -*- C++ -*-
3//
4// This file is part of the Coriolis Software.
5// Copyright (c) UPMC/LIP6 2008-2018, All Rights Reserved
6//
7// +-----------------------------------------------------------------+
8// | H U R R I C A N E |
9// | V L S I B a c k e n d D a t a - B a s e |
10// | |
11// | Author : Jean-Paul CHAPUT |
12// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
13// | =============================================================== |
14// | C++ Header : "./hurricane/viewer/InspectorWidget.h" |
15// +-----------------------------------------------------------------+
16
17
18#ifndef HURRICANE_INSPECTOR_WIDGET_H
19#define HURRICANE_INSPECTOR_WIDGET_H
20
21
22#include <QWidget>
23#include "hurricane/Commons.h"
24#include "hurricane/Occurrence.h"
25
26
27class QSortFilterProxyModel;
28class QModelIndex;
29class QTableView;
30class QLineEdit;
31class QComboBox;
32class QHeaderView;
33
34
35namespace Hurricane {
36
37
38 class RecordModel;
39
40
41 class InspectorWidget : public QWidget {
42
43 public:
44 typedef vector<Slot*> SlotsVector;
45
46 private:
47 class History {
48 public:
49 History ();
50 ~History ();
51 void push ( Slot*, Record* );
52 void pop ();
53 void back ();
54 void goTo ( int depth );
55 void clear ( bool inDelete=false );
56 void setComboBox ( QComboBox* comboBox );
57 void setRootRecord ( Record* rootRecord );
58 size_t getDepth () const;
59 Slot* getSlot () const;
60 private:
61 size_t _depth;
62 SlotsVector _slots;
63 QComboBox* _comboBox;
64 private:
65 History ( const History& );
66 History& operator= ( const History& );
67 };
68
69 Q_OBJECT;
70
71 public:
72 InspectorWidget ( QWidget* parent=NULL );
74 void setRootRecord ( Record* );
76 private slots:
77 void textFilterChanged ();
78 void historyChanged ( int depth );
79 void forkInspector ( const QModelIndex& );
80 protected:
81 bool eventFilter ( QObject*, QEvent* );
82 private:
83 void _setRootRecord ( Record* );
84 void pushSlot ( Slot*, Record* record=NULL );
85 void popSlot ();
86 void back ();
87 bool setSlot ( Record* record=NULL );
88
89 private:
90 RecordModel* _baseModel;
91 QSortFilterProxyModel* _sortModel;
92 QComboBox* _historyComboBox;
93 QTableView* _view;
94 QLineEdit* _filterPatternLineEdit;
95 int _rowHeight;
96 History _history;
97 Occurrence _rootOccurrence;
98 };
99
100
101} // End of Hurricane namespace.
102
103
104#endif // __HURRICANE_INSPECTOR_WIDGET__
InspectorWidget(QWidget *parent=NULL)
void setRootOccurrence(Occurrence &)
void setRootRecord(Record *)


Generated by doxygen 1.13.2 on Fri Sep 27 2024 Return to top of page
Hurricane Design Viewer Copyright © 2008-2020 Sorbonne Universite All rights reserved