Isis 3 Programmer Reference
TreeViewHeader.h
1 #ifndef TreeViewHeader_H
2 #define TreeViewHeader_H
3 
4 #include <QWidget>
5 
6 class QMouseEvent;
7 class QPainter;
8 class QPaintEvent;
9 class QSize;
10 class QString;
11 
12 namespace Isis {
13  class TreeViewContent;
14 
22  class TreeViewHeader : public QWidget {
23 
24  Q_OBJECT
25 
26  public:
27  explicit TreeViewHeader(TreeViewContent *someContent,
28  QWidget *parent);
29  TreeViewHeader(const TreeViewHeader &other);
30  virtual ~TreeViewHeader();
31  QSize minimumSizeHint() const;
32  QString getText();
33  void setText(QString text);
34 
35 
36  QSize sizeHint() const {
37  return minimumSizeHint();
38  }
39 
40  TreeViewHeader &operator=(const TreeViewHeader &other);
41 
42 
43  public slots:
44  void setActive(bool);
45  void handleFilterCountsChanged(int visibleTopLevelItemCount,
46  int topLevelItemCount);
47 
48 
49  signals:
50  void activated();
51 
52 
53  protected:
54  void mouseReleaseEvent(QMouseEvent *event);
55  void paintEvent(QPaintEvent *event);
56 
57 
58  private: // methods
59  void nullify();
60  void paintHeader(QPainter *painter, int rowheight);
61  void paintProgress(QPainter *painter, const QRect &rect, int min,
62  int max, int value);
63 
64 
65  private slots:
66  void updateFilterProgress(int newProgress);
67  void updateFilterProgressRange(int min, int max);
68  void updateRebuildProgress(int newProgress);
69  void updateRebuildProgressRange(int min, int max);
70 
71 
72  private: // data
73  TreeViewContent *m_content;
74  QString *m_headerText;
75  int m_filterProgress;
76  int m_filterProgressMin;
77  int m_filterProgressMax;
78  int m_rebuildProgress;
79  int m_rebuildProgressMin;
80  int m_rebuildProgressMax;
81  bool m_active;
82  int m_visibleCount;
83  int m_totalCount;
84  };
85 }
86 
87 
88 #endif
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31