From 91724bfe2037fb7b7230a5f399173f66cd4b746d Mon Sep 17 00:00:00 2001 From: Victor Zarubkin Date: Mon, 7 May 2018 21:58:37 +0300 Subject: [PATCH] #0 [UI] refactoring --- profiler_gui/CMakeLists.txt | 20 ++-- profiler_gui/arbitrary_value_inspector.cpp | 2 +- profiler_gui/blocks_graphics_view.cpp | 41 +++++---- profiler_gui/blocks_graphics_view.h | 22 ++--- ...y_calculator.h => complexity_calculator.h} | 92 +++++++++++-------- ...y_frame_rate_viewer.cpp => fps_widget.cpp} | 22 ++--- ...{easy_frame_rate_viewer.h => fps_widget.h} | 28 +++--- ...phics_item.cpp => graphics_block_item.cpp} | 58 ++++++------ ..._graphics_item.h => graphics_block_item.h} | 30 +++--- profiler_gui/graphics_image_item.h | 2 +- ...meter_item.cpp => graphics_ruler_item.cpp} | 6 +- ...ronometer_item.h => graphics_ruler_item.h} | 8 +- ...s_scrollbar.cpp => graphics_scrollbar.cpp} | 32 +++---- ...phics_scrollbar.h => graphics_scrollbar.h} | 20 ++-- profiler_gui/main_window.cpp | 8 +- profiler_gui/{easy_qtimer.cpp => timer.cpp} | 4 +- profiler_gui/{easy_qtimer.h => timer.h} | 10 +- 17 files changed, 206 insertions(+), 199 deletions(-) rename profiler_gui/{easy_complexity_calculator.h => complexity_calculator.h} (74%) rename profiler_gui/{easy_frame_rate_viewer.cpp => fps_widget.cpp} (95%) rename profiler_gui/{easy_frame_rate_viewer.h => fps_widget.h} (91%) rename profiler_gui/{easy_graphics_item.cpp => graphics_block_item.cpp} (96%) rename profiler_gui/{easy_graphics_item.h => graphics_block_item.h} (90%) rename profiler_gui/{easy_chronometer_item.cpp => graphics_ruler_item.cpp} (99%) rename profiler_gui/{easy_chronometer_item.h => graphics_ruler_item.h} (97%) rename profiler_gui/{easy_graphics_scrollbar.cpp => graphics_scrollbar.cpp} (97%) rename profiler_gui/{easy_graphics_scrollbar.h => graphics_scrollbar.h} (94%) rename profiler_gui/{easy_qtimer.cpp => timer.cpp} (98%) rename profiler_gui/{easy_qtimer.h => timer.h} (97%) diff --git a/profiler_gui/CMakeLists.txt b/profiler_gui/CMakeLists.txt index 2068234..e23412c 100644 --- a/profiler_gui/CMakeLists.txt +++ b/profiler_gui/CMakeLists.txt @@ -25,25 +25,25 @@ if (Qt5Widgets_FOUND) common_types.h descriptors_tree_widget.h descriptors_tree_widget.cpp - easy_chronometer_item.h - easy_chronometer_item.cpp - easy_frame_rate_viewer.h - easy_frame_rate_viewer.cpp - easy_graphics_item.h - easy_graphics_item.cpp - easy_graphics_scrollbar.h - easy_graphics_scrollbar.cpp - easy_qtimer.h - easy_qtimer.cpp + fps_widget.h + fps_widget.cpp globals.h globals.cpp globals_qobjects.cpp + graphics_block_item.h + graphics_block_item.cpp graphics_image_item.h graphics_image_item.cpp + graphics_ruler_item.h + graphics_ruler_item.cpp + graphics_scrollbar.h + graphics_scrollbar.cpp graphics_slider_area.h graphics_slider_area.cpp main_window.h main_window.cpp + timer.h + timer.cpp thread_pool.h thread_pool.cpp thread_pool_task.h diff --git a/profiler_gui/arbitrary_value_inspector.cpp b/profiler_gui/arbitrary_value_inspector.cpp index 4a90825..ae24f04 100644 --- a/profiler_gui/arbitrary_value_inspector.cpp +++ b/profiler_gui/arbitrary_value_inspector.cpp @@ -78,7 +78,7 @@ #include #include "arbitrary_value_inspector.h" #include "globals.h" -#include "easy_complexity_calculator.h" +#include "complexity_calculator.h" ////////////////////////////////////////////////////////////////////////// diff --git a/profiler_gui/blocks_graphics_view.cpp b/profiler_gui/blocks_graphics_view.cpp index d491bab..d28bc76 100644 --- a/profiler_gui/blocks_graphics_view.cpp +++ b/profiler_gui/blocks_graphics_view.cpp @@ -19,7 +19,7 @@ * : * : * 2016/06/30 Victor Zarubkin: Replaced doubles with floats (in ProfBlockItem) for less memory consumption. * : -* : * 2016/09/15 Victor Zarubkin: Moved sources of BlocksGraphicsItem and GraphicsRulerItem to separate files. +* : * 2016/09/15 Victor Zarubkin: Moved sources of GraphicsBlockItem and GraphicsRulerItem to separate files. * : * : * * ----------------- : @@ -79,9 +79,9 @@ #include #include #include "blocks_graphics_view.h" -#include "easy_graphics_item.h" -#include "easy_chronometer_item.h" -#include "easy_graphics_scrollbar.h" +#include "graphics_block_item.h" +#include "graphics_ruler_item.h" +#include "graphics_scrollbar.h" #include "arbitrary_value_tooltip.h" #include "globals.h" @@ -349,15 +349,16 @@ qreal BlocksGraphicsView::chronoTimeAux() const ////////////////////////////////////////////////////////////////////////// -GraphicsRulerItem* BlocksGraphicsView::createChronometer(bool _main) +GraphicsRulerItem* BlocksGraphicsView::createRuler(bool _main) { - auto chronoItem = new GraphicsRulerItem(_main); - chronoItem->setColor(_main ? ::profiler_gui::CHRONOMETER_COLOR : ::profiler_gui::CHRONOMETER_COLOR2); - chronoItem->setBoundingRect(sceneRect()); - chronoItem->hide(); - scene()->addItem(chronoItem); + auto ruler = new GraphicsRulerItem(_main); - return chronoItem; + ruler->setColor(_main ? ::profiler_gui::CHRONOMETER_COLOR : ::profiler_gui::CHRONOMETER_COLOR2); + ruler->setBoundingRect(sceneRect()); + ruler->hide(); + scene()->addItem(ruler); + + return ruler; } ////////////////////////////////////////////////////////////////////////// @@ -517,7 +518,7 @@ void BlocksGraphicsView::setTree(const ::profiler::thread_blocks_tree_t& _blocks // Filling scene with items m_items.reserve(_blocksTree.size()); qreal y = EASY_GLOBALS.size.timeline_height; - const BlocksGraphicsItem *longestItem = nullptr, *mainThreadItem = nullptr; + const GraphicsBlockItem *longestItem = nullptr, *mainThreadItem = nullptr; for (const ::profiler::BlocksTreeRoot& t : sorted_roots) { if (m_items.size() == 0xff) @@ -534,7 +535,7 @@ void BlocksGraphicsView::setTree(const ::profiler::thread_blocks_tree_t& _blocks else if (!t.sync.empty()) x = time2position(easyBlocksTree(t.sync.front()).node->begin()); - auto item = new BlocksGraphicsItem(static_cast(m_items.size()), t); + auto item = new GraphicsBlockItem(static_cast(m_items.size()), t); if (t.depth) item->setLevels(t.depth); item->setPos(0, y); @@ -580,8 +581,8 @@ void BlocksGraphicsView::setTree(const ::profiler::thread_blocks_tree_t& _blocks // Create new chronometer item (previous item was destroyed by scene on scene()->clear()). // It will be shown on mouse right button click. - m_rulerItem = createChronometer(false); - m_selectionItem = createChronometer(true); + m_rulerItem = createRuler(false); + m_selectionItem = createRuler(true); bgItem->setBoundingRect(0, 0, m_sceneWidth, y); auto indicator = new TimelineIndicatorItem(); @@ -634,7 +635,7 @@ bool BlocksGraphicsView::getSelectionRegionForSaving(profiler::timestamp_t& _beg return true; } -qreal BlocksGraphicsView::setTree(BlocksGraphicsItem* _item, const ::profiler::BlocksTree::children_t& _children, qreal& _height, uint32_t& _maxDepthChild, qreal _y, short _level) +qreal BlocksGraphicsView::setTree(GraphicsBlockItem* _item, const ::profiler::BlocksTree::children_t& _children, qreal& _height, uint32_t& _maxDepthChild, qreal _y, short _level) { if (_children.empty()) { @@ -747,7 +748,7 @@ qreal BlocksGraphicsView::setTree(BlocksGraphicsItem* _item, const ::profiler::B ////////////////////////////////////////////////////////////////////////// -void BlocksGraphicsView::setScrollbar(BlocksGraphicsScrollbar* _scrollbar) +void BlocksGraphicsView::setScrollbar(GraphicsScrollbar* _scrollbar) { disconnect(&EASY_GLOBALS.events, &profiler_gui::GlobalSignals::chartSliderChanged, this, &This::onGraphicsScrollbarValueChange); disconnect(&EASY_GLOBALS.events, &profiler_gui::GlobalSignals::chartWheeled, this, &This::onGraphicsScrollbarWheel); @@ -885,7 +886,7 @@ void BlocksGraphicsView::onGraphicsScrollbarWheel(qreal _scenePos, int _wheelDel onWheel(_scenePos, _wheelDelta); } -void BlocksGraphicsView::scrollTo(const BlocksGraphicsItem* _item) +void BlocksGraphicsView::scrollTo(const GraphicsBlockItem* _item) { m_bUpdatingRect = true; auto vbar = verticalScrollBar(); @@ -2225,7 +2226,7 @@ void BlocksGraphicsView::onRefreshRequired() DiagramWidget::DiagramWidget(QWidget* _parent) : QWidget(_parent) , m_splitter(new QSplitter(Qt::Vertical, this)) - , m_scrollbar(new BlocksGraphicsScrollbar(px(85) + 2 + (EASY_GLOBALS.size.font_height << 1), this)) + , m_scrollbar(new GraphicsScrollbar(px(85) + 2 + (EASY_GLOBALS.size.font_height << 1), this)) , m_view(new BlocksGraphicsView(this)) , m_threadNamesWidget(new ThreadNamesWidget(m_view, m_scrollbar->height(), this)) { @@ -2545,7 +2546,7 @@ void ThreadNamesWidget::onIdleTimeout() const auto overlap = EASY_GLOBALS.size.threads_row_spacing >> 1; - BlocksGraphicsItem* intersectingItem = nullptr; + GraphicsBlockItem* intersectingItem = nullptr; for (auto item : items) { auto br = item->boundingRect(); diff --git a/profiler_gui/blocks_graphics_view.h b/profiler_gui/blocks_graphics_view.h index 04b1017..93f648b 100644 --- a/profiler_gui/blocks_graphics_view.h +++ b/profiler_gui/blocks_graphics_view.h @@ -15,7 +15,7 @@ * : * : * 2016/06/30 Victor Zarubkin: Replaced doubles with floats (in ProfBlockItem) for less memory consumption. * : -* : * 2016/09/15 Victor Zarubkin: Moved sources of BlocksGraphicsItem and GraphicsRulerItem to separate files. +* : * 2016/09/15 Victor Zarubkin: Moved sources of GraphicsBlockItem and GraphicsRulerItem to separate files. * : * : * * ----------------- : @@ -82,8 +82,8 @@ class QGraphicsProxyWidget; class BlocksGraphicsView; -class BlocksGraphicsItem; -class BlocksGraphicsScrollbar; +class GraphicsBlockItem; +class GraphicsScrollbar; class GraphicsRulerItem; ////////////////////////////////////////////////////////////////////////// @@ -123,10 +123,10 @@ private: using Parent = QGraphicsView; using This = BlocksGraphicsView; - using Items = ::std::vector; + using Items = ::std::vector; //using Keys = ::std::unordered_set >; - Items m_items; ///< Array of all BlocksGraphicsItem items + Items m_items; ///< Array of all GraphicsBlockItem items //Keys m_keys; ///< Pressed keyboard keys ::profiler_gui::TreeBlocks m_selectedBlocks; ///< Array of items which were selected by selection zone (GraphicsRulerItem) QTimer m_flickerTimer; ///< Timer for flicking behavior @@ -142,7 +142,7 @@ private: QPoint m_mousePressPos; ///< Last mouse global position (used by mousePressEvent and mouseMoveEvent) QPoint m_mouseMovePath; ///< Mouse move path between press and release of any button Qt::MouseButtons m_mouseButtons; ///< Pressed mouse buttons - BlocksGraphicsScrollbar* m_pScrollbar; ///< Pointer to the graphics scrollbar widget + GraphicsScrollbar* m_pScrollbar; ///< Pointer to the graphics scrollbar widget GraphicsRulerItem* m_selectionItem; ///< Pointer to the GraphicsRulerItem which is displayed when you press right mouse button and move mouse left or right. This item is used to select blocks to display in tree widget. GraphicsRulerItem* m_rulerItem; ///< Pointer to the GraphicsRulerItem which is displayed when you double click left mouse button and move mouse left or right. This item is used only to measure time. QWidget* m_popupWidget; ///< @@ -183,7 +183,7 @@ public: qreal chronoTime() const; qreal chronoTimeAux() const; - void setScrollbar(BlocksGraphicsScrollbar* _scrollbar); + void setScrollbar(GraphicsScrollbar* _scrollbar); void clear(); void setTree(const ::profiler::thread_blocks_tree_t& _blocksTree); @@ -217,16 +217,16 @@ private: void removePopup(); bool needToIgnoreMouseEvent() const; - GraphicsRulerItem* createChronometer(bool _main = true); + GraphicsRulerItem* createRuler(bool _main = true); bool moveChrono(GraphicsRulerItem* _chronometerItem, qreal _mouseX); void initMode(); int updateVisibleSceneRect(); void updateTimelineStep(qreal _windowWidth); void scaleTo(qreal _scale); - void scrollTo(const BlocksGraphicsItem* _item); + void scrollTo(const GraphicsBlockItem* _item); qreal mapToDiagram(qreal x) const; void onWheel(qreal _scenePos, int _wheelDelta); - qreal setTree(BlocksGraphicsItem* _item, const ::profiler::BlocksTree::children_t& _children, qreal& _height, uint32_t& _maxDepthChild, qreal _y, short _level); + qreal setTree(GraphicsBlockItem* _item, const ::profiler::BlocksTree::children_t& _children, qreal& _height, uint32_t& _maxDepthChild, qreal _y, short _level); void addSelectionToHierarchy(); @@ -348,7 +348,7 @@ class DiagramWidget : public QWidget private: class QSplitter* m_splitter; - BlocksGraphicsScrollbar* m_scrollbar; + GraphicsScrollbar* m_scrollbar; BlocksGraphicsView* m_view; ThreadNamesWidget* m_threadNamesWidget; diff --git a/profiler_gui/easy_complexity_calculator.h b/profiler_gui/complexity_calculator.h similarity index 74% rename from profiler_gui/easy_complexity_calculator.h rename to profiler_gui/complexity_calculator.h index 51d1dc0..884a415 100644 --- a/profiler_gui/easy_complexity_calculator.h +++ b/profiler_gui/complexity_calculator.h @@ -40,14 +40,14 @@ The Apache License, Version 2.0 (the "License"); **/ -#ifndef EASY_COMPLEXITY_CALCULATOR_H -#define EASY_COMPLEXITY_CALCULATOR_H +#ifndef COMPLEXITY_CALCULATOR_H +#define COMPLEXITY_CALCULATOR_H -#include -#include -#include #include +#include +#include #include +#include enum class ComplexityType : uint8_t { @@ -63,64 +63,78 @@ enum class ComplexityType : uint8_t }; template -TValue getAverage(const std::vector& derivatives) { - TValue result = std::accumulate(derivatives.begin(), derivatives.end(), TValue(0.0), [](TValue a, TValue b){ - if(std::isnormal(b)) { +TValue getAverage(const std::vector& derivatives) +{ + TValue result = std::accumulate(derivatives.begin(), derivatives.end(), TValue(0.0), [](TValue a, TValue b) + { + if (std::isnormal(b)) return a + b; - } return a; }); + return result / TValue(derivatives.size()); } template -std::vector calculateDerivatives(const std::map& input_array) { +std::vector calculateDerivatives(const std::map& input_array) +{ std::vector result; - for(auto it = input_array.cbegin(), next_it = input_array.cbegin()++; next_it != input_array.cend();it = next_it, ++next_it) { - auto x0 = it->first; - auto x1 = next_it->first; - auto y0 = it->second; - auto y1 = next_it->second; + for (auto it = input_array.cbegin(), next_it = input_array.cbegin()++; next_it != input_array.cend(); it = next_it, ++next_it) + { + const auto x0 = it->first; + const auto x1 = next_it->first; - result.push_back((y1-y0)/(x1-x0)); + const auto y0 = it->second; + const auto y1 = next_it->second; + + result.push_back((y1 - y0) / (x1 - x0)); } + return result; } template -std::map getLogarithmicChart(const std::map >& input) { +std::map getLogarithmicChart(const std::map >& input) +{ std::map result; - for(auto it: input) { + + for (auto it : input) + { result[static_cast(std::log2(it.first))] = std::log2(getAverage(it.second)); } + return result; } template -ComplexityType estimateComplexity(const std::map >& input) { - auto average = getAverage(calculateDerivatives(getLogarithmicChart(input))); +ComplexityType estimateComplexity(const std::map >& input) +{ + const auto average = getAverage(calculateDerivatives(getLogarithmicChart(input))); + const double estimate_angle = std::atan(double(average)) * 57.3; - double estimate_angle = std::atan(double(average))*57.3; - if(estimate_angle < 1.0) { + if (estimate_angle < 1) return ComplexityType::Constant; - }else if (estimate_angle < 10.0) { - return ComplexityType::Logarithmic; - }else if (estimate_angle < 30.0) { - return ComplexityType::Linear; - }else if (estimate_angle < 50.0) { - return ComplexityType::Quasilinear; - }else if (estimate_angle < 65.0) { - return ComplexityType::Quadratic; - }else if (estimate_angle < 70.0) { - return ComplexityType::Cubic; - }else if (estimate_angle < 85.0) { - return ComplexityType::Exponential; - }else{ - return ComplexityType::Factorial; - } - return ComplexityType::Unknown; + if (estimate_angle < 10) + return ComplexityType::Logarithmic; + + if (estimate_angle < 30) + return ComplexityType::Linear; + + if (estimate_angle < 50) + return ComplexityType::Quasilinear; + + if (estimate_angle < 65) + return ComplexityType::Quadratic; + + if (estimate_angle < 70) + return ComplexityType::Cubic; + + if (estimate_angle < 85) + return ComplexityType::Exponential; + + return ComplexityType::Factorial; } -#endif +#endif // COMPLEXITY_CALCULATOR_H diff --git a/profiler_gui/easy_frame_rate_viewer.cpp b/profiler_gui/fps_widget.cpp similarity index 95% rename from profiler_gui/easy_frame_rate_viewer.cpp rename to profiler_gui/fps_widget.cpp index 39439fe..e8c465a 100644 --- a/profiler_gui/easy_frame_rate_viewer.cpp +++ b/profiler_gui/fps_widget.cpp @@ -1,11 +1,11 @@ /************************************************************************ -* file name : easy_frame_rate_viewer.cpp +* file name : fps_widget.cpp * ----------------- : * creation time : 2017/04/02 * author : Victor Zarubkin * email : v.s.zarubkin@gmail.com * ----------------- : -* description : This file contains implementation of FpsViewerWidget widget. +* description : This file contains implementation of FpsWidget widget. * ----------------- : * change log : * 2017/04/02 Victor Zarubkin: Initial commit. * : @@ -57,7 +57,7 @@ #include #include #include -#include "easy_frame_rate_viewer.h" +#include "fps_widget.h" #include "globals.h" const int INTERVAL_WIDTH = 20; @@ -246,7 +246,7 @@ void FpsGraphicsItem::addPoint(uint32_t _maxFrameTime, uint32_t _avgFrameTime) ////////////////////////////////////////////////////////////////////////// -FpsViewerWidget::FpsViewerWidget(QWidget* _parent) : Parent(_parent), m_fpsItem(nullptr) +FpsWidget::FpsWidget(QWidget* _parent) : Parent(_parent), m_fpsItem(nullptr) { setCacheMode(QGraphicsView::CacheNone); //setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate); @@ -277,24 +277,24 @@ FpsViewerWidget::FpsViewerWidget(QWidget* _parent) : Parent(_parent), m_fpsItem( }); } -FpsViewerWidget::~FpsViewerWidget() +FpsWidget::~FpsWidget() { } -void FpsViewerWidget::clear() +void FpsWidget::clear() { m_fpsItem->clear(); scene()->update(); } -void FpsViewerWidget::addPoint(uint32_t _maxFrameTime, uint32_t _avgFrameTime) +void FpsWidget::addPoint(uint32_t _maxFrameTime, uint32_t _avgFrameTime) { m_fpsItem->addPoint(_maxFrameTime, _avgFrameTime); scene()->update(); } -void FpsViewerWidget::resizeEvent(QResizeEvent* _event) +void FpsWidget::resizeEvent(QResizeEvent* _event) { Parent::resizeEvent(_event); @@ -305,21 +305,21 @@ void FpsViewerWidget::resizeEvent(QResizeEvent* _event) scene()->update(); } -void FpsViewerWidget::hideEvent(QHideEvent* _event) +void FpsWidget::hideEvent(QHideEvent* _event) { Parent::hideEvent(_event); EASY_GLOBALS.fps_enabled = isVisible(); clear(); } -void FpsViewerWidget::showEvent(QShowEvent* _event) +void FpsWidget::showEvent(QShowEvent* _event) { Parent::showEvent(_event); EASY_GLOBALS.fps_enabled = isVisible(); clear(); } -void FpsViewerWidget::contextMenuEvent(QContextMenuEvent* _event) +void FpsWidget::contextMenuEvent(QContextMenuEvent* _event) { QMenu menu; QAction* action = nullptr; diff --git a/profiler_gui/easy_frame_rate_viewer.h b/profiler_gui/fps_widget.h similarity index 91% rename from profiler_gui/easy_frame_rate_viewer.h rename to profiler_gui/fps_widget.h index 602d615..323f04a 100644 --- a/profiler_gui/easy_frame_rate_viewer.h +++ b/profiler_gui/fps_widget.h @@ -1,11 +1,11 @@ /************************************************************************ -* file name : easy_frame_rate_viewer.cpp +* file name : fps_widget.cpp * ----------------- : * creation time : 2017/04/02 * author : Victor Zarubkin * email : v.s.zarubkin@gmail.com * ----------------- : -* description : This file contains declaration of FpsViewerWidget widget. +* description : This file contains declaration of FpsWidget widget. * ----------------- : * change log : * 2017/04/02 Victor Zarubkin: Initial commit. * : @@ -52,16 +52,16 @@ * : limitations under the License. ************************************************************************/ -#ifndef EASY__FRAME_RATE_VIEWER__H -#define EASY__FRAME_RATE_VIEWER__H +#ifndef FPS_WIDGET_H +#define FPS_WIDGET_H -#include -#include -#include -#include #include #include #include +#include +#include +#include +#include ////////////////////////////////////////////////////////////////////////// @@ -93,21 +93,21 @@ public: ////////////////////////////////////////////////////////////////////////// -class FpsViewerWidget : public QGraphicsView +class FpsWidget : public QGraphicsView { Q_OBJECT private: using Parent = QGraphicsView; - using This = FpsViewerWidget; + using This = FpsWidget; FpsGraphicsItem* m_fpsItem; public: - explicit FpsViewerWidget(QWidget* _parent = nullptr); - ~FpsViewerWidget() override; + explicit FpsWidget(QWidget* _parent = nullptr); + ~FpsWidget() override; void resizeEvent(QResizeEvent* _event) override; void hideEvent(QHideEvent* _event) override; @@ -120,8 +120,8 @@ public slots: void clear(); void addPoint(uint32_t _maxFrameTime, uint32_t _avgFrameTime); -}; // END of class FpsViewerWidget. +}; // END of class FpsWidget. ////////////////////////////////////////////////////////////////////////// -#endif // EASY__FRAME_RATE_VIEWER__H +#endif // FPS_WIDGET_H diff --git a/profiler_gui/easy_graphics_item.cpp b/profiler_gui/graphics_block_item.cpp similarity index 96% rename from profiler_gui/easy_graphics_item.cpp rename to profiler_gui/graphics_block_item.cpp index 522a9f8..82d3e70 100644 --- a/profiler_gui/easy_graphics_item.cpp +++ b/profiler_gui/graphics_block_item.cpp @@ -1,15 +1,11 @@ /************************************************************************ -* file name : easy_graphics_item.cpp +* file name : graphics_block_item.cpp * ----------------- : * creation time : 2016/09/15 * author : Victor Zarubkin * email : v.s.zarubkin@gmail.com * ----------------- : -* description : The file contains implementation of BlocksGraphicsItem. -* ----------------- : -* change log : * 2016/09/15 Victor Zarubkin: Moved sources from blocks_graphics_view.cpp -* : -* : * +* description : The file contains implementation of GraphicsBlockItem. * ----------------- : * license : Lightweight profiler library for c++ * : Copyright(C) 2016-2018 Sergey Yagovtsev, Victor Zarubkin @@ -55,7 +51,7 @@ #include #include #include -#include "easy_graphics_item.h" +#include "graphics_block_item.h" #include "blocks_graphics_view.h" #include "globals.h" @@ -107,7 +103,7 @@ const QPen HIGHLIGHTER_PEN = ([]() -> QPen { QPen p(profiler::colors::Black); p. ////////////////////////////////////////////////////////////////////////// -BlocksGraphicsItem::BlocksGraphicsItem(uint8_t _index, const profiler::BlocksTreeRoot& _root) +GraphicsBlockItem::GraphicsBlockItem(uint8_t _index, const profiler::BlocksTreeRoot& _root) : QGraphicsItem(nullptr) , m_threadName(::profiler_gui::decoratedThreadName(EASY_GLOBALS.use_decorated_thread_name, _root, EASY_GLOBALS.hex_thread_id)) , m_pRoot(&_root) @@ -115,23 +111,23 @@ BlocksGraphicsItem::BlocksGraphicsItem(uint8_t _index, const profiler::BlocksTre { } -BlocksGraphicsItem::~BlocksGraphicsItem() +GraphicsBlockItem::~GraphicsBlockItem() { } -void BlocksGraphicsItem::validateName() +void GraphicsBlockItem::validateName() { m_threadName = ::profiler_gui::decoratedThreadName(EASY_GLOBALS.use_decorated_thread_name, *m_pRoot, EASY_GLOBALS.hex_thread_id); } -const BlocksGraphicsView* BlocksGraphicsItem::view() const +const BlocksGraphicsView* GraphicsBlockItem::view() const { return static_cast(scene()->parent()); } ////////////////////////////////////////////////////////////////////////// -QRectF BlocksGraphicsItem::boundingRect() const +QRectF GraphicsBlockItem::boundingRect() const { return m_boundingRect; } @@ -176,7 +172,7 @@ struct EasyPainterInformation EASY_FINAL }; #ifdef EASY_GRAPHICS_ITEM_RECURSIVE_PAINT -void BlocksGraphicsItem::paintChildren(const float _minWidth, const int _narrowSizeHalf, const uint8_t _levelsNumber, +void GraphicsBlockItem::paintChildren(const float _minWidth, const int _narrowSizeHalf, const uint8_t _levelsNumber, QPainter* _painter, struct EasyPainterInformation& p, profiler_gui::EasyBlockItem& _item, const profiler_gui::EasyBlock& _itemBlock, RightBounds& _rightBounds, uint8_t _level, int8_t _mode) @@ -454,7 +450,7 @@ void BlocksGraphicsItem::paintChildren(const float _minWidth, const int _narrowS } #endif -void BlocksGraphicsItem::paint(QPainter* _painter, const QStyleOptionGraphicsItem*, QWidget*) +void GraphicsBlockItem::paint(QPainter* _painter, const QStyleOptionGraphicsItem*, QWidget*) { const bool gotItems = !m_levels.empty() && !m_levels.front().empty(); const bool gotSync = !m_pRoot->sync.empty(); @@ -1119,26 +1115,26 @@ void BlocksGraphicsItem::paint(QPainter* _painter, const QStyleOptionGraphicsIte ////////////////////////////////////////////////////////////////////////// -const ::profiler::BlocksTreeRoot* BlocksGraphicsItem::root() const +const ::profiler::BlocksTreeRoot* GraphicsBlockItem::root() const { return m_pRoot; } -const QString& BlocksGraphicsItem::threadName() const +const QString& GraphicsBlockItem::threadName() const { return m_threadName; } ////////////////////////////////////////////////////////////////////////// -QRect BlocksGraphicsItem::getRect() const +QRect GraphicsBlockItem::getRect() const { return view()->mapFromScene(m_boundingRect).boundingRect(); } ////////////////////////////////////////////////////////////////////////// -void BlocksGraphicsItem::getBlocks(qreal _left, qreal _right, ::profiler_gui::TreeBlocks& _blocks) const +void GraphicsBlockItem::getBlocks(qreal _left, qreal _right, ::profiler_gui::TreeBlocks& _blocks) const { // Search for first visible top-level item auto& level0 = m_levels.front(); @@ -1183,7 +1179,7 @@ void BlocksGraphicsItem::getBlocks(qreal _left, qreal _right, ::profiler_gui::Tr ////////////////////////////////////////////////////////////////////////// -const ::profiler_gui::EasyBlock* BlocksGraphicsItem::intersect(const QPointF& _pos, ::profiler::block_index_t& _blockIndex) const +const ::profiler_gui::EasyBlock* GraphicsBlockItem::intersect(const QPointF& _pos, ::profiler::block_index_t& _blockIndex) const { if (m_levels.empty() || m_levels.front().empty()) { @@ -1356,7 +1352,7 @@ const ::profiler_gui::EasyBlock* BlocksGraphicsItem::intersect(const QPointF& _p return nullptr; } -const ::profiler_gui::EasyBlock* BlocksGraphicsItem::intersectEvent(const QPointF& _pos) const +const ::profiler_gui::EasyBlock* GraphicsBlockItem::intersectEvent(const QPointF& _pos) const { if (m_pRoot->sync.empty()) { @@ -1407,36 +1403,36 @@ const ::profiler_gui::EasyBlock* BlocksGraphicsItem::intersectEvent(const QPoint ////////////////////////////////////////////////////////////////////////// -void BlocksGraphicsItem::setBoundingRect(qreal x, qreal y, qreal w, qreal h) +void GraphicsBlockItem::setBoundingRect(qreal x, qreal y, qreal w, qreal h) { m_boundingRect.setRect(x, y, w, h); } -void BlocksGraphicsItem::setBoundingRect(const QRectF& _rect) +void GraphicsBlockItem::setBoundingRect(const QRectF& _rect) { m_boundingRect = _rect; } ////////////////////////////////////////////////////////////////////////// -::profiler::thread_id_t BlocksGraphicsItem::threadId() const +::profiler::thread_id_t GraphicsBlockItem::threadId() const { return m_pRoot->thread_id; } ////////////////////////////////////////////////////////////////////////// -uint8_t BlocksGraphicsItem::levels() const +uint8_t GraphicsBlockItem::levels() const { return static_cast(m_levels.size()); } -float BlocksGraphicsItem::levelY(uint8_t _level) const +float GraphicsBlockItem::levelY(uint8_t _level) const { return static_cast(y() + static_cast(_level) * EASY_GLOBALS.size.graphics_row_full); } -void BlocksGraphicsItem::setLevels(uint8_t _levels) +void GraphicsBlockItem::setLevels(uint8_t _levels) { typedef decltype(m_levelsIndexes) IndexesT; static const auto MAX_CHILD_INDEX = ::profiler_gui::numeric_max(); @@ -1446,29 +1442,29 @@ void BlocksGraphicsItem::setLevels(uint8_t _levels) m_rightBounds.resize(_levels, -1e100); } -void BlocksGraphicsItem::reserve(uint8_t _level, unsigned int _items) +void GraphicsBlockItem::reserve(uint8_t _level, unsigned int _items) { m_levels[_level].reserve(_items); } ////////////////////////////////////////////////////////////////////////// -const BlocksGraphicsItem::Children& BlocksGraphicsItem::items(uint8_t _level) const +const GraphicsBlockItem::Children& GraphicsBlockItem::items(uint8_t _level) const { return m_levels[_level]; } -const ::profiler_gui::EasyBlockItem& BlocksGraphicsItem::getItem(uint8_t _level, unsigned int _index) const +const ::profiler_gui::EasyBlockItem& GraphicsBlockItem::getItem(uint8_t _level, unsigned int _index) const { return m_levels[_level][_index]; } -::profiler_gui::EasyBlockItem& BlocksGraphicsItem::getItem(uint8_t _level, unsigned int _index) +::profiler_gui::EasyBlockItem& GraphicsBlockItem::getItem(uint8_t _level, unsigned int _index) { return m_levels[_level][_index]; } -unsigned int BlocksGraphicsItem::addItem(uint8_t _level) +unsigned int GraphicsBlockItem::addItem(uint8_t _level) { m_levels[_level].emplace_back(); return static_cast(m_levels[_level].size() - 1); diff --git a/profiler_gui/easy_graphics_item.h b/profiler_gui/graphics_block_item.h similarity index 90% rename from profiler_gui/easy_graphics_item.h rename to profiler_gui/graphics_block_item.h index 701a9df..4f8d116 100644 --- a/profiler_gui/easy_graphics_item.h +++ b/profiler_gui/graphics_block_item.h @@ -1,17 +1,13 @@ /************************************************************************ -* file name : easy_graphics_item.h +* file name : graphics_block_item.h * ----------------- : * creation time : 2016/09/15 * author : Victor Zarubkin * email : v.s.zarubkin@gmail.com * ----------------- : -* description : The file contains declaration of BlocksGraphicsItem - an item +* description : The file contains declaration of GraphicsBlockItem - an item * : used to draw profiler blocks on graphics scene. * ----------------- : -* change log : * 2016/09/15 Victor Zarubkin: moved sources from blocks_graphics_view.h/.cpp -* : -* : * -* ----------------- : * license : Lightweight profiler library for c++ * : Copyright(C) 2016-2018 Sergey Yagovtsev, Victor Zarubkin * : @@ -53,8 +49,8 @@ * : limitations under the License. ************************************************************************/ -#ifndef EASY_GRAPHICS_ITEM_H -#define EASY_GRAPHICS_ITEM_H +#ifndef GRAPHICS_BLOCK_ITEM_H +#define GRAPHICS_BLOCK_ITEM_H #include @@ -71,12 +67,12 @@ class BlocksGraphicsView; -class BlocksGraphicsItem : public QGraphicsItem +class GraphicsBlockItem : public QGraphicsItem { - typedef ::profiler_gui::EasyItems Children; - typedef ::std::vector DrawIndexes; - typedef ::std::vector RightBounds; - typedef ::std::vector Sublevels; + using Children = profiler_gui::EasyItems; + using DrawIndexes = std::vector; + using RightBounds = std::vector; + using Sublevels = std::vector; DrawIndexes m_levelsIndexes; ///< Indexes of first item on each level from which we must start painting RightBounds m_rightBounds; ///< @@ -89,8 +85,8 @@ class BlocksGraphicsItem : public QGraphicsItem public: - explicit BlocksGraphicsItem(uint8_t _index, const::profiler::BlocksTreeRoot& _root); - virtual ~BlocksGraphicsItem(); + explicit GraphicsBlockItem(uint8_t _index, const::profiler::BlocksTreeRoot& _root); + virtual ~GraphicsBlockItem(); // Public virtual methods @@ -186,9 +182,9 @@ public: return m_index; } -}; // END of class BlocksGraphicsItem. +}; // END of class GraphicsBlockItem. ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// -#endif // EASY_GRAPHICS_ITEM_H +#endif // GRAPHICS_BLOCK_ITEM_H diff --git a/profiler_gui/graphics_image_item.h b/profiler_gui/graphics_image_item.h index 4f285e7..6b75736 100644 --- a/profiler_gui/graphics_image_item.h +++ b/profiler_gui/graphics_image_item.h @@ -5,7 +5,7 @@ #include #include -#include "easy_qtimer.h" +#include "timer.h" #include "thread_pool_task.h" class GraphicsImageItem : public QGraphicsItem diff --git a/profiler_gui/easy_chronometer_item.cpp b/profiler_gui/graphics_ruler_item.cpp similarity index 99% rename from profiler_gui/easy_chronometer_item.cpp rename to profiler_gui/graphics_ruler_item.cpp index a8e485a..8ab795a 100644 --- a/profiler_gui/easy_chronometer_item.cpp +++ b/profiler_gui/graphics_ruler_item.cpp @@ -1,5 +1,5 @@ /************************************************************************ -* file name : easy_chronometer_item.cpp +* file name : graphics_ruler_item.cpp * ----------------- : * creation time : 2016/09/15 * author : Victor Zarubkin @@ -52,11 +52,11 @@ * : limitations under the License. ************************************************************************/ +#include #include #include -#include #include "blocks_graphics_view.h" -#include "easy_chronometer_item.h" +#include "graphics_ruler_item.h" #include "globals.h" ////////////////////////////////////////////////////////////////////////// diff --git a/profiler_gui/easy_chronometer_item.h b/profiler_gui/graphics_ruler_item.h similarity index 97% rename from profiler_gui/easy_chronometer_item.h rename to profiler_gui/graphics_ruler_item.h index 59fe875..da8ff1d 100644 --- a/profiler_gui/easy_chronometer_item.h +++ b/profiler_gui/graphics_ruler_item.h @@ -1,5 +1,5 @@ /************************************************************************ -* file name : easy_chronometer_item.h +* file name : graphics_ruler_item.h * ----------------- : * creation time : 2016/09/15 * author : Victor Zarubkin @@ -53,8 +53,8 @@ * : limitations under the License. ************************************************************************/ -#ifndef EASY_CHRONOMETER_ITEM_H -#define EASY_CHRONOMETER_ITEM_H +#ifndef GRAPHICS_RULER_ITEM_H +#define GRAPHICS_RULER_ITEM_H #include #include @@ -168,4 +168,4 @@ private: ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// -#endif // EASY_CHRONOMETER_ITEM_H +#endif // GRAPHICS_RULER_ITEM_H diff --git a/profiler_gui/easy_graphics_scrollbar.cpp b/profiler_gui/graphics_scrollbar.cpp similarity index 97% rename from profiler_gui/easy_graphics_scrollbar.cpp rename to profiler_gui/graphics_scrollbar.cpp index a540de0..615118d 100644 --- a/profiler_gui/easy_graphics_scrollbar.cpp +++ b/profiler_gui/graphics_scrollbar.cpp @@ -1,5 +1,5 @@ /************************************************************************ -* file name : easy_graphics_scrollbar.cpp +* file name : graphics_scrollbar.cpp * ----------------- : * creation time : 2016/07/04 * author : Victor Zarubkin @@ -58,7 +58,7 @@ #include #include #include -#include "easy_graphics_scrollbar.h" +#include "graphics_scrollbar.h" #include "globals.h" ////////////////////////////////////////////////////////////////////////// @@ -148,7 +148,7 @@ void GraphicsHistogramItem::paintMouseIndicator(QPainter* _painter, qreal _top, void GraphicsHistogramItem::paintByPtr(QPainter* _painter) { - const auto widget = static_cast(scene()->parent()); + const auto widget = static_cast(scene()->parent()); const bool bindMode = widget->bindMode(); const auto currentScale = widget->getWindowScale(); const auto bottom = m_boundingRect.bottom(); @@ -239,7 +239,7 @@ void GraphicsHistogramItem::paintByPtr(QPainter* _painter) void GraphicsHistogramItem::paintById(QPainter* _painter) { - const auto widget = static_cast(scene()->parent()); + const auto widget = static_cast(scene()->parent()); const bool bindMode = widget->bindMode(); const auto currentScale = widget->getWindowScale(); const auto bottom = m_boundingRect.bottom(); @@ -785,7 +785,7 @@ void GraphicsHistogramItem::onModeChanged() if (!isImageUpdatePermitted()) return; - const auto widget = static_cast(scene()->parent()); + const auto widget = static_cast(scene()->parent()); if (!widget->bindMode() && EASY_GLOBALS.auto_adjust_histogram_height) { m_topValue = m_maxValue; @@ -1141,7 +1141,7 @@ void GraphicsHistogramItem::updateImageAsync(QRectF _boundingRect, HistRegime _r ////////////////////////////////////////////////////////////////////////// -BlocksGraphicsScrollbar::BlocksGraphicsScrollbar(int _initialHeight, QWidget* _parent) +GraphicsScrollbar::GraphicsScrollbar(int _initialHeight, QWidget* _parent) : Parent(_parent) , m_histogramItem(nullptr) { @@ -1171,14 +1171,14 @@ BlocksGraphicsScrollbar::BlocksGraphicsScrollbar(int _initialHeight, QWidget* _p connect(&EASY_GLOBALS.events, &profiler_gui::GlobalSignals::allDataGoingToBeDeleted, this, &This::clear); } -BlocksGraphicsScrollbar::~BlocksGraphicsScrollbar() +GraphicsScrollbar::~GraphicsScrollbar() { } ////////////////////////////////////////////////////////////////////////// -void BlocksGraphicsScrollbar::onThreadViewChanged() +void GraphicsScrollbar::onThreadViewChanged() { if (m_histogramItem->isVisible()) { @@ -1187,7 +1187,7 @@ void BlocksGraphicsScrollbar::onThreadViewChanged() } } -void BlocksGraphicsScrollbar::onExpectedFrameTimeChanged() +void GraphicsScrollbar::onExpectedFrameTimeChanged() { if (m_histogramItem->isVisible()) { @@ -1196,13 +1196,13 @@ void BlocksGraphicsScrollbar::onExpectedFrameTimeChanged() } } -void BlocksGraphicsScrollbar::onAutoAdjustHistogramChanged() +void GraphicsScrollbar::onAutoAdjustHistogramChanged() { if (m_histogramItem->isVisible()) m_histogramItem->onModeChanged(); } -void BlocksGraphicsScrollbar::onDisplayOnlyFramesOnHistogramChanged() +void GraphicsScrollbar::onDisplayOnlyFramesOnHistogramChanged() { if (m_histogramItem->isVisible()) m_histogramItem->rebuildSource(GraphicsHistogramItem::Hist_Id); @@ -1210,18 +1210,18 @@ void BlocksGraphicsScrollbar::onDisplayOnlyFramesOnHistogramChanged() ////////////////////////////////////////////////////////////////////////// -void BlocksGraphicsScrollbar::clear() +void GraphicsScrollbar::clear() { setHistogramSource(0, nullptr); Parent::clear(); } -profiler::thread_id_t BlocksGraphicsScrollbar::hystThread() const +profiler::thread_id_t GraphicsScrollbar::hystThread() const { return m_histogramItem->threadId(); } -void BlocksGraphicsScrollbar::setHistogramSource(profiler::thread_id_t _thread_id, const profiler_gui::EasyItems* _items) +void GraphicsScrollbar::setHistogramSource(profiler::thread_id_t _thread_id, const profiler_gui::EasyItems* _items) { if (m_bLocked) return; @@ -1230,7 +1230,7 @@ void BlocksGraphicsScrollbar::setHistogramSource(profiler::thread_id_t _thread_i scene()->update(); } -void BlocksGraphicsScrollbar::setHistogramSource(profiler::thread_id_t _thread_id, profiler::block_id_t _block_id) +void GraphicsScrollbar::setHistogramSource(profiler::thread_id_t _thread_id, profiler::block_id_t _block_id) { if (m_bLocked) return; @@ -1239,7 +1239,7 @@ void BlocksGraphicsScrollbar::setHistogramSource(profiler::thread_id_t _thread_i scene()->update(); } -void BlocksGraphicsScrollbar::mousePressEvent(QMouseEvent* _event) +void GraphicsScrollbar::mousePressEvent(QMouseEvent* _event) { Parent::mousePressEvent(_event); if ((m_mouseButtons & Qt::RightButton) && _event->modifiers()) diff --git a/profiler_gui/easy_graphics_scrollbar.h b/profiler_gui/graphics_scrollbar.h similarity index 94% rename from profiler_gui/easy_graphics_scrollbar.h rename to profiler_gui/graphics_scrollbar.h index 96bc657..1e93333 100644 --- a/profiler_gui/easy_graphics_scrollbar.h +++ b/profiler_gui/graphics_scrollbar.h @@ -1,5 +1,5 @@ /************************************************************************ -* file name : easy_graphics_scrollbar.h +* file name : graphics_scrollbar.h * ----------------- : * creation time : 2016/07/04 * author : Victor Zarubkin @@ -52,14 +52,14 @@ * : limitations under the License. ************************************************************************/ -#ifndef EASY__GRAPHICS_SCROLLBAR__H -#define EASY__GRAPHICS_SCROLLBAR__H +#ifndef GRAPHICS_SCROLLBAR_H +#define GRAPHICS_SCROLLBAR_H #include #include #include #include -#include "easy_qtimer.h" +#include "timer.h" #include "graphics_slider_area.h" ////////////////////////////////////////////////////////////////////////// @@ -142,21 +142,21 @@ private: ////////////////////////////////////////////////////////////////////////// -class BlocksGraphicsScrollbar : public GraphicsSliderArea +class GraphicsScrollbar : public GraphicsSliderArea { Q_OBJECT private: using Parent = GraphicsSliderArea; - using This = BlocksGraphicsScrollbar; + using This = GraphicsScrollbar; GraphicsHistogramItem* m_histogramItem = nullptr; public: - explicit BlocksGraphicsScrollbar(int _initialHeight, QWidget* _parent = nullptr); - ~BlocksGraphicsScrollbar() override; + explicit GraphicsScrollbar(int _initialHeight, QWidget* _parent = nullptr); + ~GraphicsScrollbar() override; void clear() override; void mousePressEvent(QMouseEvent* _event) override; @@ -180,8 +180,8 @@ private slots: void onAutoAdjustHistogramChanged(); void onDisplayOnlyFramesOnHistogramChanged(); -}; // END of class BlocksGraphicsScrollbar. +}; // END of class GraphicsScrollbar. ////////////////////////////////////////////////////////////////////////// -#endif // EASY__GRAPHICS_SCROLLBAR__H +#endif // GRAPHICS_SCROLLBAR_H diff --git a/profiler_gui/main_window.cpp b/profiler_gui/main_window.cpp index 231936c..c73b65c 100644 --- a/profiler_gui/main_window.cpp +++ b/profiler_gui/main_window.cpp @@ -101,7 +101,7 @@ #include "blocks_tree_widget.h" #include "blocks_graphics_view.h" #include "descriptors_tree_widget.h" -#include "easy_frame_rate_viewer.h" +#include "fps_widget.h" #include "globals.h" #include @@ -284,7 +284,7 @@ MainWindow::MainWindow() : Parent(), m_theme("default"), m_lastAddress("localhos m_fpsViewer = new DockWidget("FPS Monitor", this); m_fpsViewer->setObjectName("ProfilerGUI_FPS"); - m_fpsViewer->setWidget(new FpsViewerWidget(this)); + m_fpsViewer->setWidget(new FpsWidget(this)); m_fpsViewer->setAllowedAreas(Qt::TopDockWidgetArea | Qt::BottomDockWidgetArea); addDockWidget(Qt::TopDockWidgetArea, m_graphicsView); @@ -1687,7 +1687,7 @@ void MainWindow::checkFrameTimeReady() uint32_t maxTime = 0, avgTime = 0; if (m_listener.frameTime(maxTime, avgTime)) { - static_cast(m_fpsViewer->widget())->addPoint(maxTime, avgTime); + static_cast(m_fpsViewer->widget())->addPoint(maxTime, avgTime); } else if (m_fpsRequestTimer.isActive()) { @@ -2339,7 +2339,7 @@ void MainWindow::onConnectClicked(bool) m_connectAction->setText(tr("Disconnect")); if (m_fpsViewer->isVisible()) - static_cast(m_fpsViewer->widget())->clear(); + static_cast(m_fpsViewer->widget())->clear(); if (!m_fpsRequestTimer.isActive()) m_fpsRequestTimer.start(EASY_GLOBALS.fps_timer_interval); diff --git a/profiler_gui/easy_qtimer.cpp b/profiler_gui/timer.cpp similarity index 98% rename from profiler_gui/easy_qtimer.cpp rename to profiler_gui/timer.cpp index 5c8e490..e94ab1b 100644 --- a/profiler_gui/easy_qtimer.cpp +++ b/profiler_gui/timer.cpp @@ -1,5 +1,5 @@ /************************************************************************ -* file name : easy_qtimer.h +* file name : timer.cpp * ----------------- : * creation time : 2016/12/05 * author : Victor Zarubkin @@ -53,7 +53,7 @@ * : limitations under the License. ************************************************************************/ -#include "easy_qtimer.h" +#include "timer.h" ////////////////////////////////////////////////////////////////////////// diff --git a/profiler_gui/easy_qtimer.h b/profiler_gui/timer.h similarity index 97% rename from profiler_gui/easy_qtimer.h rename to profiler_gui/timer.h index 6b12ebd..68f7c59 100644 --- a/profiler_gui/easy_qtimer.h +++ b/profiler_gui/timer.h @@ -1,5 +1,5 @@ /************************************************************************ -* file name : easy_qtimer.h +* file name : timer.h * ----------------- : * creation time : 2016/12/05 * author : Victor Zarubkin @@ -53,11 +53,11 @@ * : limitations under the License. ************************************************************************/ -#ifndef EASY__QTIMER__H -#define EASY__QTIMER__H +#ifndef TIMER_H +#define TIMER_H -#include #include +#include ////////////////////////////////////////////////////////////////////////// @@ -95,4 +95,4 @@ private slots: ////////////////////////////////////////////////////////////////////////// -#endif // EASY__QTIMER__H +#endif // TIMER_H