- Notifications
You must be signed in to change notification settings - Fork 329
Replace int with std::chrono in for the timer->setInterval() argument #524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| | @@ -8,6 +8,8 @@ | |||
| #include <QWidget> | ||||
| #include <QQueue> | ||||
| | ||||
| #include <chrono> | ||||
| | ||||
| class ClientModel; | ||||
| | ||||
| QT_BEGIN_NAMESPACE | ||||
| | @@ -22,22 +24,22 @@ class TrafficGraphWidget : public QWidget | |||
| public: | ||||
| explicit TrafficGraphWidget(QWidget *parent = nullptr); | ||||
| void setClientModel(ClientModel *model); | ||||
| int getGraphRangeMins() const; | ||||
| std::chrono::minutes getGraphRange() const; | ||||
| Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just remove? It's not used. Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I concur - It appears to be part of the original implementation but never used for anything... it can and should be removed... Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @promag - great catch! Contributor Author There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
| ||||
| | ||||
| protected: | ||||
| void paintEvent(QPaintEvent *) override; | ||||
| | ||||
| public Q_SLOTS: | ||||
| void updateRates(); | ||||
| void setGraphRangeMins(int mins); | ||||
| void setGraphRange(std::chrono::minutes new_range); | ||||
| void clear(); | ||||
| | ||||
| private: | ||||
| void paintPath(QPainterPath &path, QQueue<float> &samples); | ||||
| | ||||
| QTimer *timer; | ||||
| float fMax; | ||||
| int nMins; | ||||
| std::chrono::minutes m_range{0}; | ||||
| QQueue<float> vSamplesIn; | ||||
| QQueue<float> vSamplesOut; | ||||
| quint64 nLastBytesIn; | ||||
| | ||||

Uh oh!
There was an error while loading. Please reload this page.