diff mbox series

[2/3] kernel-shark: Avoid redrawing the graphs when switching the keyboard focus

Message ID 20191216133917.31690-2-y.karadz@gmail.com (mailing list archive)
State Accepted
Commit 68a1bfbcc66eb1e2f0a0c79869b78250d738d4e4
Headers show
Series [1/3] kernel-shark: Simplify the way collections handle data requests | expand

Commit Message

Yordan Karadzhov Dec. 16, 2019, 1:39 p.m. UTC
Reimplementing the event handler of the focus event, in order to avoid
the update (redrawing) of the graphs every time when the OpenGL widget
grabs / releases the focus of the keyboard. This is done because we do
not need to redraw, while on the other hand on large data-sets, redrawing
can take a lot of time.

Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
---
 kernel-shark/src/KsGLWidget.hpp | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
diff mbox series

Patch

diff --git a/kernel-shark/src/KsGLWidget.hpp b/kernel-shark/src/KsGLWidget.hpp
index 3d428b1..c6fd787 100644
--- a/kernel-shark/src/KsGLWidget.hpp
+++ b/kernel-shark/src/KsGLWidget.hpp
@@ -64,6 +64,24 @@  public:
 
 	void loadColors();
 
+	/**
+	 * Reimplementing the event handler of the focus event, in order to
+	 * avoid the update (redrawing) of the graphs every time when the
+	 * widget grabs the focus of the keyboard. This is done because we do
+	 * not need to redraw, while on the other hand on large data-sets,
+	 * redrawing can take a lot of time.
+	 */
+	void focusInEvent(QFocusEvent* e) override {}
+
+	/**
+	 * Reimplementing the event handler of the focus event, in order to
+	 * avoid the update (redrawing) of the graphs every time when the
+	 * widget releases the focus of the keyboard. This is done because we
+	 * do not need to redraw, while on the other hand on large data-sets,
+	 * redrawing can take a lot of time.
+	 */
+	void focusOutEvent(QFocusEvent* e) override {}
+
 	/**
 	 * Provide the widget with a pointer to the Dual Marker state machine
 	 * object.