Isis Developer Reference
TreeViewHeader.h
Go to the documentation of this file.
1#ifndef TreeViewHeader_H
2#define TreeViewHeader_H
3
10/* SPDX-License-Identifier: CC0-1.0 */
11
12#include <QWidget>
13
14class QMouseEvent;
15class QPainter;
16class QPaintEvent;
17class QSize;
18class QString;
19
20namespace Isis {
21 class TreeViewContent;
22
30 class TreeViewHeader : public QWidget {
31
32 Q_OBJECT
33
34 public:
35 explicit TreeViewHeader(TreeViewContent *someContent,
36 QWidget *parent);
37 TreeViewHeader(const TreeViewHeader &other);
38 virtual ~TreeViewHeader();
39 QSize minimumSizeHint() const;
40 QString getText();
41 void setText(QString text);
42
43
44 QSize sizeHint() const {
45 return minimumSizeHint();
46 }
47
49
50
51 public slots:
52 void setActive(bool);
53 void handleFilterCountsChanged(int visibleTopLevelItemCount,
54 int topLevelItemCount);
55
56
57 signals:
58 void activated();
59
60
61 protected:
62 void mouseReleaseEvent(QMouseEvent *event);
63 void paintEvent(QPaintEvent *event);
64
65
66 private: // methods
67 void nullify();
68 void paintHeader(QPainter *painter, int rowheight);
69 void paintProgress(QPainter *painter, const QRect &rect, int min,
70 int max, int value);
71
72
73 private slots:
74 void updateFilterProgress(int newProgress);
75 void updateFilterProgressRange(int min, int max);
76 void updateRebuildProgress(int newProgress);
77 void updateRebuildProgressRange(int min, int max);
78
79
80 private: // data
81 TreeViewContent *m_content;
82 QString *m_headerText;
83 int m_filterProgress;
84 int m_filterProgressMin;
85 int m_filterProgressMax;
86 int m_rebuildProgress;
87 int m_rebuildProgressMin;
88 int m_rebuildProgressMax;
89 bool m_active;
90 int m_visibleCount;
91 int m_totalCount;
92 };
93}
94
95
96#endif
Definition TreeViewContent.h:36
Definition TreeViewHeader.h:30
void mouseReleaseEvent(QMouseEvent *event)
Definition TreeViewHeader.cpp:108
TreeViewHeader(TreeViewContent *someContent, QWidget *parent)
Definition TreeViewHeader.cpp:30
void paintEvent(QPaintEvent *event)
Definition TreeViewHeader.cpp:115
void setActive(bool)
Definition TreeViewHeader.cpp:94
void handleFilterCountsChanged(int visibleTopLevelItemCount, int topLevelItemCount)
Definition TreeViewHeader.cpp:99
QSize minimumSizeHint() const
Definition TreeViewHeader.cpp:62
TreeViewHeader & operator=(const TreeViewHeader &other)
Definition TreeViewHeader.cpp:79
QSize sizeHint() const
Definition TreeViewHeader.h:44
virtual ~TreeViewHeader()
Definition TreeViewHeader.cpp:54
QString getText()
Definition TreeViewHeader.cpp:67
void setText(QString text)
Definition TreeViewHeader.cpp:72
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16