21 #ifndef GANTTSTATUSVIEW_H
22 #define GANTTSTATUSVIEW_H
25 #include "statusview.h"
30 #include <QScrollArea>
45 bool isTimeScaleVisible();
51 QCheckBox *mTimeScaleVisibleCheck;
61 void setPixelsPerSecond(
int);
64 void paintEvent(QPaintEvent *e)
override;
78 bool isFree()
const {
return mIsFree; }
79 bool fullyIdle()
const {
return m_jobs.count() == 1 && isFree(); }
83 void update(
const Job &job);
86 void paintEvent(QPaintEvent *e)
override;
87 void resizeEvent(QResizeEvent *e)
override;
91 void drawGraph(QPainter &p);
92 QColor colorForStatus(
const Job &job)
const;
99 , next_text_width(0) {}
102 bool operator==(
const JobData &d)
104 return job == d.job && clock == d.clock;
109 mutable int next_text_width;
110 mutable QPixmap text_cache;
115 QList<JobData> m_jobs;
130 QString id()
const override {
return QStringLiteral(
"gantt"); }
132 void removeNode(
unsigned int hostid)
override;
133 void checkNode(
unsigned int hostid)
override;
135 void start()
override;
136 void stop()
override;
138 void configureView()
override;
139 bool isPausable()
override {
return true; }
140 bool isConfigurable()
override {
return true; }
142 QWidget *widget()
const override;
145 void update(
const Job &job)
override;
148 void slotConfigChanged();
155 void unregisterNode(
unsigned int hostid);
159 QScopedPointer<QScrollArea> m_widget;
161 QGridLayout *m_topLayout;
165 using SlotList = QList<GanttProgress *>;
166 typedef QMap<unsigned int, SlotList> NodeMap;
168 typedef QMap<unsigned int, int> AgeMap;
170 typedef QMap<unsigned int, GanttProgress *> JobMap;
172 typedef QMap<unsigned int, QVBoxLayout *> NodeLayoutMap;
173 NodeLayoutMap mNodeLayouts;
174 typedef QMap<unsigned int, int> NodeRowMap;
175 NodeRowMap mNodeRows;
176 typedef QMap<unsigned int, QWidget *> NodeLabelMap;
177 NodeLabelMap mNodeLabels;
178 QTimer *m_progressTimer;
185 int mMinimumProgressHeight;
Definition: ganttstatusview.h:122
Definition: ganttstatusview.h:70
Definition: ganttstatusview.h:38
Definition: statusview.h:39