Browse Source

Added support for handbookDocPath(). This relates to bug 1850.

tags/r14.0.0
Michele Calgaro 4 years ago
parent
commit
01d88b2886

+ 5
- 0
tdeui/tdecmodule.cpp View File

@@ -208,6 +208,11 @@ TQString TDECModule::quickHelp() const
return d->_quickHelp;
}

TQString TDECModule::handbookDocPath() const
{
return TQString::null;
}

TQString TDECModule::handbookSection() const
{
return TQString::null;

+ 10
- 0
tdeui/tdecmodule.h View File

@@ -178,6 +178,16 @@ public:
virtual TQString quickHelp() const;

/**
* If the handbook's docPath string of the currently displayed content
* (for example in tabbed control center modules) differs from the docPath string
* of the currently displaying container, this method returns the relevant docPath string
*
* @returns a TQString containing the relevant handbook's docPath string or TQString::null
* if no specific docPath string is required (i.e. the container docPath is sufficient)
*/
virtual TQString handbookDocPath() const;
/**
* If a specific handbook section is relevant to the currently displayed content
* (for example tabbed control center modules) this method returns the relevant section name
*

+ 7
- 3
tdeutils/kcmultidialog.cpp View File

@@ -189,10 +189,14 @@ void KCMultiDialog::slotHelp()
for( ModuleList::Iterator it = m_modules.begin(); it != end; ++it ) {
if( pageIndex( ( TQWidget * )( *it ).kcm->parent() ) == curPageIndex )
{
docPath = ( *it ).kcm->moduleInfo().docPath();
TDECModuleProxy * m = ( *it ).kcm;
TDECModuleProxy *m = (*it).kcm;
docPath = m->handbookDocPath();
if (docPath == TQString::null)
docPath = m->moduleInfo().docPath();
TQString section = m->handbookSection();
if (section != "") {
if (section != TQString::null) {
docPath = TQString( "%1#%2" ).arg( docPath ).arg( section );
}
break;

+ 12
- 0
tdeutils/tdecmoduleproxy.cpp View File

@@ -598,6 +598,18 @@ const TDEAboutData * TDECModuleProxy::aboutData() const
}
}

TQString TDECModuleProxy::handbookDocPath() const
{
if( !d->rootMode ) {
return realModule() ? realModule()->handbookDocPath() : TQString::null;
}
else {
/* This needs fixing, perhaps cache a handbookSection() copy
* while in root mode? */
return TQString::null;
}
}

TQString TDECModuleProxy::handbookSection() const
{
if( !d->rootMode ) {

+ 5
- 0
tdeutils/tdecmoduleproxy.h View File

@@ -158,6 +158,11 @@ public:
const TDEAboutData * aboutData() const;

/**
* @return the module's handbookDocPath()
*/
TQString handbookDocPath() const;

/**
* @return the module's handbookSection()
*/
TQString handbookSection() const;

Loading…
Cancel
Save