From 71f9913b08f795153eb2f0cddcd265691fe28caf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Fri, 30 Dec 2016 16:12:25 +0100 Subject: [PATCH] [apps] Move the graph/cursor view to the apps root to be used by other app (as regression app) Change-Id: Ie3b7f1028333fe136b0ac761cc728a05a90ffc7f --- apps/Makefile | 1 + apps/{graph/graph => }/cursor_view.cpp | 4 ---- apps/{graph/graph => }/cursor_view.h | 7 ++----- apps/graph/Makefile | 1 - apps/graph/graph/graph_view.h | 2 +- 5 files changed, 4 insertions(+), 11 deletions(-) rename apps/{graph/graph => }/cursor_view.cpp (93%) rename apps/{graph/graph => }/cursor_view.h (66%) diff --git a/apps/Makefile b/apps/Makefile index 8509e8e10..5a579939d 100644 --- a/apps/Makefile +++ b/apps/Makefile @@ -9,6 +9,7 @@ include apps/statistics/Makefile app_objs += $(addprefix apps/,\ apps_container.o\ constant.o\ + cursor_view.o\ curve_view.o\ curve_view_with_banner.o\ curve_view_window.o\ diff --git a/apps/graph/graph/cursor_view.cpp b/apps/cursor_view.cpp similarity index 93% rename from apps/graph/graph/cursor_view.cpp rename to apps/cursor_view.cpp index e35ec74fd..3f94704c1 100644 --- a/apps/graph/graph/cursor_view.cpp +++ b/apps/cursor_view.cpp @@ -1,12 +1,8 @@ #include "cursor_view.h" -namespace Graph { - void CursorView::drawRect(KDContext * ctx, KDRect rect) const { KDCoordinate width = bounds().width(); KDCoordinate height = bounds().height(); ctx->fillRect(KDRect(width/2, 0, 1, height), KDColorBlack); ctx->fillRect(KDRect(0, height/2, width, 1), KDColorBlack); } - -} \ No newline at end of file diff --git a/apps/graph/graph/cursor_view.h b/apps/cursor_view.h similarity index 66% rename from apps/graph/graph/cursor_view.h rename to apps/cursor_view.h index 6a4668bed..d0c706a1d 100644 --- a/apps/graph/graph/cursor_view.h +++ b/apps/cursor_view.h @@ -1,15 +1,12 @@ -#ifndef GRAPH_CURSOR_VIEW_H -#define GRAPH_CURSOR_VIEW_H +#ifndef APPS_CURSOR_VIEW_H +#define APPS_CURSOR_VIEW_H #include -namespace Graph { class CursorView : public View { public: using View::View; void drawRect(KDContext * ctx, KDRect rect) const override; }; -} - #endif \ No newline at end of file diff --git a/apps/graph/Makefile b/apps/graph/Makefile index a28e90b82..b32de8cb3 100644 --- a/apps/graph/Makefile +++ b/apps/graph/Makefile @@ -6,7 +6,6 @@ app_objs += $(addprefix apps/graph/,\ graph/banner_view.o\ graph/graph_window.o\ graph/window_parameter_controller.o\ - graph/cursor_view.o\ graph/curve_parameter_controller.o\ graph/goto_parameter_controller.o\ graph/graph_controller.o\ diff --git a/apps/graph/graph/graph_view.h b/apps/graph/graph/graph_view.h index 070c6a2d6..8deea462d 100644 --- a/apps/graph/graph/graph_view.h +++ b/apps/graph/graph/graph_view.h @@ -3,7 +3,7 @@ #include #include "banner_view.h" -#include "cursor_view.h" +#include "../../cursor_view.h" #include "graph_window.h" #include "../../curve_view_with_banner.h" #include "../../constant.h"