[education/rkward] rkward/windows: Implement kate tool window visibility change signal

Thomas Friedrichsmeier null at kde.org
Thu Apr 28 20:09:13 BST 2022


Git commit f6ac6b47e489e9ad448ad26526f52e1e91e60a3f by Thomas Friedrichsmeier.
Committed on 28/04/2022 at 19:08.
Pushed by tfry into branch 'master'.

Implement kate tool window visibility change signal

M  +12   -0    rkward/windows/katepluginintegration.cpp

https://invent.kde.org/education/rkward/commit/f6ac6b47e489e9ad448ad26526f52e1e91e60a3f

diff --git a/rkward/windows/katepluginintegration.cpp b/rkward/windows/katepluginintegration.cpp
index 0b57624a..a0d2c21d 100644
--- a/rkward/windows/katepluginintegration.cpp
+++ b/rkward/windows/katepluginintegration.cpp
@@ -341,6 +341,16 @@ public:
 		RK_TRACE (APP);
 	}
 
+	void showEvent(QShowEvent *e) override {
+		RKMDIWindow::showEvent(e);
+		emit toolVisibleChanged(true);
+	}
+
+	void hideEvent(QHideEvent *e) override {
+		RKMDIWindow::hideEvent(e);
+		emit toolVisibleChanged(false);
+	}
+
 /** This is a bit lame, but the plugin does not add itself to the parent widget's layout by itself. So we need this override
  *  to do that. Where did the good old KVBox go? */
 	void childEvent(QChildEvent *ev) override {
@@ -353,6 +363,8 @@ public:
 		}
 		RKMDIWindow::childEvent(ev);
 	}
+signals:
+	void toolVisibleChanged(bool);
 };
 
 QWidget* KatePluginIntegrationWindow::createToolView (KTextEditor::Plugin *plugin, const QString &identifier, KTextEditor::MainWindow::ToolViewPosition pos, const QIcon &icon, const QString &text) {


More information about the rkward-tracker mailing list