From 88a2e255141f97ac65c65fd89b5ef9a30b9138c4 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 3 Oct 2014 23:13:17 -0500 Subject: Add mechanism by which sections of relevant docbooks may be opened automatically based on active tab in TDECModule Fix up several tabbed TDEControl modules to use this mechanism Fix a couple of docbooks with missing section IDs This relates to Bug 1850 --- kcontrol/performance/kcmperformance.cpp | 17 ++++++++++++++++- kcontrol/performance/kcmperformance.h | 2 ++ 2 files changed, 18 insertions(+), 1 deletion(-) (limited to 'kcontrol/performance') diff --git a/kcontrol/performance/kcmperformance.cpp b/kcontrol/performance/kcmperformance.cpp index 93c5019a6..84959e34d 100644 --- a/kcontrol/performance/kcmperformance.cpp +++ b/kcontrol/performance/kcmperformance.cpp @@ -49,7 +49,7 @@ Config::Config( TQWidget* parent_P, const char* ) " You can configure settings that improve TDE performance here." )); TQVBoxLayout *topLayout = new TQVBoxLayout( this ); - TQTabWidget* tabs = new TQTabWidget( this ); + tabs = new TQTabWidget( this ); konqueror_widget = new Konqueror( tabs ); konqueror_widget->layout()->setMargin( KDialog::marginHint() ); connect( konqueror_widget, TQT_SIGNAL( changed()), TQT_SLOT( changed())); @@ -85,6 +85,21 @@ void Config::defaults() load( true ); } +TQString Config::handbookSection() const + { + int index = tabs->currentPageIndex(); + if (index == 0) { + //return "konqueror-performance"; + return TQString::null; + } + else if (index == 1) { + return "system-performance"; + } + else { + return TQString::null; + } + } + KonquerorConfig::KonquerorConfig( TQWidget* parent_P, const char* ) : TDECModule( parent_P, "kcmperformance" ) { diff --git a/kcontrol/performance/kcmperformance.h b/kcontrol/performance/kcmperformance.h index a9963e18a..7e0660c60 100644 --- a/kcontrol/performance/kcmperformance.h +++ b/kcontrol/performance/kcmperformance.h @@ -37,9 +37,11 @@ class Config virtual void load( bool useDefaults ); virtual void save(); virtual void defaults(); + virtual TQString handbookSection() const; private: Konqueror* konqueror_widget; SystemWidget* system_widget; + TQTabWidget* tabs; }; class KonquerorConfig -- cgit v1.2.3