[education/rkward] rkward: Add settings icons

Thomas Friedrichsmeier null at kde.org
Sun Mar 13 09:26:37 GMT 2022


Git commit d5c357a18e006b3cadc9bc119c261cf2628e31b4 by Thomas Friedrichsmeier.
Committed on 13/03/2022 at 09:26.
Pushed by tfry into branch 'master'.

Add settings icons

M  +1    -0    rkward/misc/rkstandardicons.h
M  +6    -0    rkward/settings/rksettingsmodulecommandeditor.cpp
M  +1    -0    rkward/settings/rksettingsmodulecommandeditor.h
M  +7    -0    rkward/settings/rksettingsmoduleconsole.cpp
M  +1    -0    rkward/settings/rksettingsmoduleconsole.h
M  +6    -0    rkward/settings/rksettingsmodulegeneral.cpp
M  +1    -0    rkward/settings/rksettingsmodulegeneral.h
M  +7    -1    rkward/settings/rksettingsmodulegraphics.cpp
M  +1    -0    rkward/settings/rksettingsmodulegraphics.h
M  +6    -1    rkward/settings/rksettingsmodulekateplugins.cpp
M  +1    -0    rkward/settings/rksettingsmodulekateplugins.h
M  +6    -0    rkward/settings/rksettingsmoduleobjectbrowser.cpp
M  +1    -0    rkward/settings/rksettingsmoduleobjectbrowser.h
M  +6    -0    rkward/settings/rksettingsmoduleoutput.cpp
M  +1    -0    rkward/settings/rksettingsmoduleoutput.h
M  +6    -0    rkward/settings/rksettingsmoduleplugins.cpp
M  +1    -0    rkward/settings/rksettingsmoduleplugins.h
M  +11   -0    rkward/settings/rksettingsmoduler.cpp
M  +3    -1    rkward/settings/rksettingsmoduler.h
M  +6    -1    rkward/settings/rksettingsmodulewatch.cpp
M  +1    -0    rkward/settings/rksettingsmodulewatch.h

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

diff --git a/rkward/misc/rkstandardicons.h b/rkward/misc/rkstandardicons.h
index 4710a9ab..a1fbec08 100644
--- a/rkward/misc/rkstandardicons.h
+++ b/rkward/misc/rkstandardicons.h
@@ -1,3 +1,4 @@
+
 /***************************************************************************
                           rkstandardicons  -  description
                              -------------------
diff --git a/rkward/settings/rksettingsmodulecommandeditor.cpp b/rkward/settings/rksettingsmodulecommandeditor.cpp
index ace9d770..147ae93b 100644
--- a/rkward/settings/rksettingsmodulecommandeditor.cpp
+++ b/rkward/settings/rksettingsmodulecommandeditor.cpp
@@ -33,6 +33,7 @@
 
 #include "../misc/rkspinbox.h"
 #include "../misc/rkcommonfunctions.h"
+#include "../misc/rkstandardicons.h"
 #include "../core/robject.h"
 #include "../rkglobals.h"
 #include "../debug.h"
@@ -171,6 +172,11 @@ QString RKSettingsModuleCommandEditor::caption() const {
 	return(i18n("Script editor"));
 }
 
+QIcon RKSettingsModuleCommandEditor::icon() const {
+	RK_TRACE(SETTINGS);
+	return RKStandardIcons::getIcon(RKStandardIcons::WindowCommandEditor);
+}
+
 void RKSettingsModuleCommandEditor::applyChanges () {
 	RK_TRACE (SETTINGS);
 
diff --git a/rkward/settings/rksettingsmodulecommandeditor.h b/rkward/settings/rksettingsmodulecommandeditor.h
index 48f9395d..e9fc1681 100644
--- a/rkward/settings/rksettingsmodulecommandeditor.h
+++ b/rkward/settings/rksettingsmodulecommandeditor.h
@@ -115,6 +115,7 @@ public:
 	static void validateSettingsInteractive (QList<RKSetupWizardItem*>*) {};
 
 	QString caption() const override;
+	QIcon icon() const override;
 
 	static const RKCodeCompletionSettings* completionSettings() { return &completion_settings; };
 
diff --git a/rkward/settings/rksettingsmoduleconsole.cpp b/rkward/settings/rksettingsmoduleconsole.cpp
index 53e38d5b..8efc7536 100644
--- a/rkward/settings/rksettingsmoduleconsole.cpp
+++ b/rkward/settings/rksettingsmoduleconsole.cpp
@@ -28,6 +28,7 @@
 
 #include "../rbackend/rcommand.h"
 #include "../misc/rkspinbox.h"
+#include "../misc/rkstandardicons.h"
 #include "../rkglobals.h"
 
 #include "../debug.h"
@@ -139,3 +140,9 @@ QString RKSettingsModuleConsole::caption() const {
 	return(i18n("Console"));
 }
 
+QIcon RKSettingsModuleConsole::icon() const {
+	RK_TRACE(SETTINGS);
+
+	return RKStandardIcons::getIcon(RKStandardIcons::WindowConsole);
+}
+
diff --git a/rkward/settings/rksettingsmoduleconsole.h b/rkward/settings/rksettingsmoduleconsole.h
index 032471d4..8f320a81 100644
--- a/rkward/settings/rksettingsmoduleconsole.h
+++ b/rkward/settings/rksettingsmoduleconsole.h
@@ -61,6 +61,7 @@ public:
 	static void saveCommandHistory (const QStringList &list);
 
 	QString caption() const override;
+	QIcon icon() const override;
 
 	QUrl helpURL () override { return QUrl ("rkward://page/rkward_console#settings"); };
 private:
diff --git a/rkward/settings/rksettingsmodulegeneral.cpp b/rkward/settings/rksettingsmodulegeneral.cpp
index 7bda5334..50eff635 100644
--- a/rkward/settings/rksettingsmodulegeneral.cpp
+++ b/rkward/settings/rksettingsmodulegeneral.cpp
@@ -33,6 +33,7 @@
 #include "../misc/getfilenamewidget.h"
 #include "../misc/rkspinbox.h"
 #include "../misc/rkcommonfunctions.h"
+#include "../misc/rkstandardicons.h"
 #include "../rkglobals.h"
 #include "../version.h"
 #include "../debug.h"
@@ -177,6 +178,11 @@ QString RKSettingsModuleGeneral::caption() const {
 	return(i18n("General"));
 }
 
+QIcon RKSettingsModuleGeneral::icon() const {
+	RK_TRACE(SETTINGS);
+	return RKStandardIcons::getIcon(RKStandardIcons::RKWardIcon);
+}
+
 void RKSettingsModuleGeneral::applyChanges () {
 	RK_TRACE (SETTINGS);
 	new_files_path = files_choser->getLocation ();
diff --git a/rkward/settings/rksettingsmodulegeneral.h b/rkward/settings/rksettingsmodulegeneral.h
index 3ccd1b1d..dcf6b3ce 100644
--- a/rkward/settings/rksettingsmodulegeneral.h
+++ b/rkward/settings/rksettingsmodulegeneral.h
@@ -59,6 +59,7 @@ public:
 	static void validateSettingsInteractive (QList<RKSetupWizardItem*>*) {};
 
 	QString caption() const override;
+	QIcon icon() const override;
 
 /// returns the directory-name where the logfiles should reside
 	static QString &filesPath () { return files_path; };
diff --git a/rkward/settings/rksettingsmodulegraphics.cpp b/rkward/settings/rksettingsmodulegraphics.cpp
index d3c2a7ab..d408ea62 100644
--- a/rkward/settings/rksettingsmodulegraphics.cpp
+++ b/rkward/settings/rksettingsmodulegraphics.cpp
@@ -34,8 +34,9 @@
 #include "../rbackend/rkrinterface.h"
 #include "../misc/rkspinbox.h"
 #include "../misc/rkcommonfunctions.h"
-#include "../debug.h"
+#include "../misc/rkstandardicons.h"
 #include "../core/robject.h"
+#include "../debug.h"
 
 // static members
 RKConfigValue<double> RKSettingsModuleGraphics::graphics_width {"graphics_width", 7.0};
@@ -163,6 +164,11 @@ QString RKSettingsModuleGraphics::caption() const {
 	return(i18n("Onscreen Graphics"));
 }
 
+QIcon RKSettingsModuleGraphics::icon() const {
+	RK_TRACE(SETTINGS);
+	return RKStandardIcons::getIcon(RKStandardIcons::WindowX11);
+}
+
 void RKSettingsModuleGraphics::applyChanges () {
 	RK_TRACE (SETTINGS);
 
diff --git a/rkward/settings/rksettingsmodulegraphics.h b/rkward/settings/rksettingsmodulegraphics.h
index c56bb1a0..075a3c40 100644
--- a/rkward/settings/rksettingsmodulegraphics.h
+++ b/rkward/settings/rksettingsmodulegraphics.h
@@ -50,6 +50,7 @@ public:
 	static void validateSettingsInteractive (QList<RKSetupWizardItem*>*) {};
 
 	QString caption() const override;
+	QIcon icon() const override;
 	QUrl helpURL () override { return QUrl ("rkward://page/rkward_plot_history#scd_settings"); };
 
 	enum DefaultDevice {
diff --git a/rkward/settings/rksettingsmodulekateplugins.cpp b/rkward/settings/rksettingsmodulekateplugins.cpp
index e22e1a25..20958577 100644
--- a/rkward/settings/rksettingsmodulekateplugins.cpp
+++ b/rkward/settings/rksettingsmodulekateplugins.cpp
@@ -25,6 +25,7 @@
 #include <KLocalizedString>
 #include <KConfigGroup>
 #include <KConfig>
+#include <QIcon>
 
 #include "../windows/katepluginintegration.h"
 #include "../misc/rkcommonfunctions.h"
@@ -101,6 +102,10 @@ void RKSettingsModuleKatePlugins::syncConfig(KConfig *config, RKConfigBase::Conf
 
 QString RKSettingsModuleKatePlugins::caption() const {
 	RK_TRACE(SETTINGS);
-
 	return i18n("Kate Plugins");
 }
+
+QIcon RKSettingsModuleKatePlugins::icon() const {
+	RK_TRACE(SETTINGS);
+	return QIcon::fromTheme("kate");
+}
diff --git a/rkward/settings/rksettingsmodulekateplugins.h b/rkward/settings/rksettingsmodulekateplugins.h
index cdf17503..ca588bfb 100644
--- a/rkward/settings/rksettingsmodulekateplugins.h
+++ b/rkward/settings/rksettingsmodulekateplugins.h
@@ -37,6 +37,7 @@ public:
 	static void validateSettingsInteractive(QList<RKSetupWizardItem*>*) {};
 
 	QString caption() const override;
+	QIcon icon() const override;
 
 	static QStringList pluginsToLoad() { return plugins_to_load; };
 private:
diff --git a/rkward/settings/rksettingsmoduleobjectbrowser.cpp b/rkward/settings/rksettingsmoduleobjectbrowser.cpp
index ce3111c6..eee4151e 100644
--- a/rkward/settings/rksettingsmoduleobjectbrowser.cpp
+++ b/rkward/settings/rksettingsmoduleobjectbrowser.cpp
@@ -29,6 +29,7 @@
 
 #include "../rkglobals.h"
 #include "../misc/multistringselector.h"
+#include "../misc/rkstandardicons.h"
 #include "rksettings.h"
 #include "rksettingsmodulegeneral.h"
 #include "../debug.h"
@@ -94,6 +95,11 @@ QString RKSettingsModuleObjectBrowser::caption() const {
 	return(i18n("Workspace"));
 }
 
+QIcon RKSettingsModuleObjectBrowser::icon() const {
+	RK_TRACE(SETTINGS);
+	return RKStandardIcons::getIcon(RKStandardIcons::WindowWorkspaceBrowser);
+}
+
 void writeSettings (KConfigGroup &cg, bool *settings) {
 	cg.writeEntry ("show hidden vars", settings[RKObjectListViewSettings::ShowObjectsHidden]);
 	cg.writeEntry ("show label field", settings[RKObjectListViewSettings::ShowFieldsLabel]);
diff --git a/rkward/settings/rksettingsmoduleobjectbrowser.h b/rkward/settings/rksettingsmoduleobjectbrowser.h
index 8c62e824..8d7bd5ce 100644
--- a/rkward/settings/rksettingsmoduleobjectbrowser.h
+++ b/rkward/settings/rksettingsmoduleobjectbrowser.h
@@ -40,6 +40,7 @@ public:
 
 /** @returns the caption ("Workspace Browser") */
 	QString caption() const override;
+	QIcon icon() const override;
 
 	void save(KConfig *config) override { syncConfig(config, RKConfigBase::SaveConfig); };
 	static void syncConfig(KConfig *config, RKConfigBase::ConfigSyncAction a);
diff --git a/rkward/settings/rksettingsmoduleoutput.cpp b/rkward/settings/rksettingsmoduleoutput.cpp
index cecfa4dc..b8031c95 100644
--- a/rkward/settings/rksettingsmoduleoutput.cpp
+++ b/rkward/settings/rksettingsmoduleoutput.cpp
@@ -31,6 +31,7 @@
 #include "../misc/getfilenamewidget.h"
 #include "../misc/rkcommonfunctions.h"
 #include "../misc/rkspinbox.h"
+#include "../misc/rkstandardicons.h"
 #include "../rbackend/rkrinterface.h"
 #include "../debug.h"
 
@@ -194,6 +195,11 @@ QString RKSettingsModuleOutput::caption() const {
 	return(i18n("Output"));
 }
 
+QIcon RKSettingsModuleOutput::icon() const{
+	RK_TRACE(SETTINGS);
+	return RKStandardIcons::getIcon(RKStandardIcons::WindowOutput);
+}
+
 void RKSettingsModuleOutput::applyChanges () {
 	RK_TRACE (SETTINGS);
 
diff --git a/rkward/settings/rksettingsmoduleoutput.h b/rkward/settings/rksettingsmoduleoutput.h
index 77bbf576..a9a1d027 100644
--- a/rkward/settings/rksettingsmoduleoutput.h
+++ b/rkward/settings/rksettingsmoduleoutput.h
@@ -82,6 +82,7 @@ public:
 	static void validateSettingsInteractive (QList<RKSetupWizardItem*>*) {};
 
 	QString caption() const override;
+	QIcon icon() const override;
 
 	static bool autoShow () { return auto_show; };
 	static bool autoRaise () { return auto_raise; };
diff --git a/rkward/settings/rksettingsmoduleplugins.cpp b/rkward/settings/rksettingsmoduleplugins.cpp
index 75a275e5..ecea376b 100644
--- a/rkward/settings/rksettingsmoduleplugins.cpp
+++ b/rkward/settings/rksettingsmoduleplugins.cpp
@@ -30,6 +30,7 @@
 #include <QVBoxLayout>
 #include <QPushButton>
 #include <QFileDialog>
+#include <QIcon>
 
 #include "../rkward.h"
 #include "../rkglobals.h"
@@ -102,6 +103,11 @@ QString RKSettingsModulePlugins::caption() const {
 	return(i18n("RKWard Plugins"));
 }
 
+QIcon RKSettingsModulePlugins::icon() const {
+	RK_TRACE(SETTINGS);
+	return QIcon::fromTheme("plugins");
+}
+
 void RKSettingsModulePlugins::applyChanges () {
 	RK_TRACE (SETTINGS);
 
diff --git a/rkward/settings/rksettingsmoduleplugins.h b/rkward/settings/rksettingsmoduleplugins.h
index 9360dd1d..e015a80c 100644
--- a/rkward/settings/rksettingsmoduleplugins.h
+++ b/rkward/settings/rksettingsmoduleplugins.h
@@ -47,6 +47,7 @@ public:
 	static void validateSettingsInteractive (QList<RKSetupWizardItem*>*) {};
 
 	QString caption() const override;
+	QIcon icon() const override;
 
 	/** @returns a list of active plugin maps */
 	static QStringList pluginMaps ();
diff --git a/rkward/settings/rksettingsmoduler.cpp b/rkward/settings/rksettingsmoduler.cpp
index f00b7d85..c4636ff2 100755
--- a/rkward/settings/rksettingsmoduler.cpp
+++ b/rkward/settings/rksettingsmoduler.cpp
@@ -40,6 +40,7 @@
 #include "../misc/rkprogresscontrol.h"
 #include "../misc/rkcommonfunctions.h"
 #include "../misc/rkspinbox.h"
+#include "../misc/rkstandardicons.h"
 #include "../rbackend/rkrinterface.h"
 #include "../rbackend/rksessionvars.h"
 #include "../rkglobals.h"
@@ -180,6 +181,11 @@ QString RKSettingsModuleR::caption() const {
 	return(i18n("R-Backend"));
 }
 
+QIcon RKSettingsModuleR::icon() const {
+	RK_TRACE(SETTINGS);
+	return QIcon::fromTheme("emblem-system-symbolic");
+}
+
 void RKSettingsModuleR::applyChanges () {
 	RK_TRACE (SETTINGS);
 
@@ -440,6 +446,11 @@ QString RKSettingsModuleRPackages::caption() const {
 	return(i18n("R-Packages"));
 }
 
+QIcon RKSettingsModuleRPackages::icon() const {
+	RK_TRACE(SETTINGS);
+	return RKStandardIcons::getIcon(RKStandardIcons::ObjectPackageEnvironment);
+}
+
 #define SELECT_CRAN_MIRROR_COMMAND 123
 void RKSettingsModuleRPackages::selectCRANMirror () {
 	RK_TRACE (SETTINGS);
diff --git a/rkward/settings/rksettingsmoduler.h b/rkward/settings/rksettingsmoduler.h
index ef926ffb..92ad3d7e 100644
--- a/rkward/settings/rksettingsmoduler.h
+++ b/rkward/settings/rksettingsmoduler.h
@@ -45,7 +45,8 @@ public:
 	static void validateSettingsInteractive (QList<RKSetupWizardItem*>*) {};
 
 	QString caption() const override;
-	
+	QIcon icon() const override;
+
 /** generate the commands needed to set the R run time options */
 	static QStringList makeRRunTimeOptionCommands ();
 
@@ -120,6 +121,7 @@ public:
 	static QStringList essentialPackages () { return essential_packages.split ("\n"); };
 
 	QString caption() const override;
+	QIcon icon() const override;
 public slots:
 	void settingChanged ();
 	void addLibLoc (QStringList *string_list);
diff --git a/rkward/settings/rksettingsmodulewatch.cpp b/rkward/settings/rksettingsmodulewatch.cpp
index dbbadba3..309cd574 100644
--- a/rkward/settings/rksettingsmodulewatch.cpp
+++ b/rkward/settings/rksettingsmodulewatch.cpp
@@ -29,6 +29,7 @@
 #include "../rbackend/rcommand.h"
 #include "../misc/rkcommonfunctions.h"
 #include "../misc/rkspinbox.h"
+#include "../misc/rkstandardicons.h"
 #include "rksettings.h"
 #include "../rkglobals.h"
 
@@ -243,7 +244,11 @@ void RKSettingsModuleWatch::applyChanges () {
 	
 QString RKSettingsModuleWatch::caption() const {
 	RK_TRACE(SETTINGS);
-
 	return(i18n("Command log"));
 }
 
+QIcon RKSettingsModuleWatch::icon() const {
+	RK_TRACE(SETTINGS);
+	return RKStandardIcons::getIcon(RKStandardIcons::WindowCommandLog);
+}
+
diff --git a/rkward/settings/rksettingsmodulewatch.h b/rkward/settings/rksettingsmodulewatch.h
index cfe939f1..7ec7a90b 100644
--- a/rkward/settings/rksettingsmodulewatch.h
+++ b/rkward/settings/rksettingsmodulewatch.h
@@ -51,6 +51,7 @@ public:
 	static uint maxLogLines () { return max_log_lines; };
 
 	QString caption() const override;
+	QIcon icon() const override;
 public slots:
 	void changedSetting (int);
 private:


More information about the rkward-tracker mailing list