summaryrefslogtreecommitdiffstats
path: root/knetworkconf
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-10-10 14:57:34 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-10-10 14:57:34 -0500
commitbd1f9bec80cd6fdab00d3ba951a54a205584ad6d (patch)
tree595bc56a332f28f39476045484c6fe0146299290 /knetworkconf
parent914e923d52314022b64ee792d60590489be318af (diff)
downloadtdeadmin-bd1f9bec80cd6fdab00d3ba951a54a205584ad6d.tar.gz
tdeadmin-bd1f9bec80cd6fdab00d3ba951a54a205584ad6d.zip
Add handbookSection support to tabbed "Internet & Network" TDEControl modules
This relates to Bug 1850
Diffstat (limited to 'knetworkconf')
-rw-r--r--knetworkconf/knetworkconf/knetworkconf.cpp33
-rw-r--r--knetworkconf/knetworkconf/knetworkconf.h3
-rw-r--r--knetworkconf/knetworkconf/knetworkconfmodule.cpp5
-rw-r--r--knetworkconf/knetworkconf/knetworkconfmodule.h2
4 files changed, 37 insertions, 6 deletions
diff --git a/knetworkconf/knetworkconf/knetworkconf.cpp b/knetworkconf/knetworkconf/knetworkconf.cpp
index 8bf591c..1f9b808 100644
--- a/knetworkconf/knetworkconf/knetworkconf.cpp
+++ b/knetworkconf/knetworkconf/knetworkconf.cpp
@@ -518,6 +518,7 @@ void KNetworkConf::setReadOnly(bool state){
}
/** No descriptions */
void KNetworkConf::enableApplyButtonSlot(const TQString &text){
+ Q_UNUSED(text)
enableApplyButtonSlot();
}
/** No descriptions */
@@ -868,7 +869,7 @@ void KNetworkConf::addKnownHostSlot(){
dlg.exec();
- if (!dlg.kleIpAddress->text().isEmpty() && dlg.klbAliases->firstItem() > 0 )
+ if (!dlg.kleIpAddress->text().isEmpty() && dlg.klbAliases->firstItem() )
{
TQListViewItem * item = new TQListViewItem( klvKnownHosts, 0 );
@@ -911,7 +912,7 @@ void KNetworkConf::editKnownHostSlot()
dlg.exec();
TQString _aliases;
- if (!dlg.kleIpAddress->text().isEmpty() && dlg.klbAliases->firstItem() > 0 )
+ if (!dlg.kleIpAddress->text().isEmpty() && dlg.klbAliases->firstItem() )
{
TQListViewItem * item = klvKnownHosts->currentItem();
@@ -979,6 +980,9 @@ void KNetworkConf::setReadOnlySlot(bool state)
/*Shows a context menu when right-clicking in the interface list*/
void KNetworkConf::showInterfaceContextMenuSlot(TDEListView* lv, TQListViewItem* lvi, const TQPoint& pt)
{
+ Q_UNUSED(lv)
+ Q_UNUSED(lvi)
+
TDEPopupMenu *context = new TDEPopupMenu( this );
TQ_CHECK_PTR( context );
context->insertItem( "&Enable Interface", this, TQT_SLOT(enableInterfaceSlot()));
@@ -1063,12 +1067,12 @@ void KNetworkConf::createProfileSlot()
TQPtrList<KNetworkInfo> profiles = netInfo->getProfilesList();
KNetworkInfo *currentProfile = getProfile(profiles,newProfileName);
KNetworkInfo *newProfile = new KNetworkInfo();
-
+
//If there isn't a profile with the new name we add it to the list.
if (currentProfile == NULL)
{
- TQListViewItem *newItem = new TQListViewItem( klvProfilesList,newProfileName);
-
+ new TQListViewItem( klvProfilesList,newProfileName);
+
//memcpy(newProfile,netInfo,sizeof(netInfo) + sizeof(KRoutingInfo) + sizeof(KDNSInfo));
//Is there a better way to copy an object? the above memcpy doesn't do the trick
newProfile->setProfileName(newProfileName);
@@ -1078,7 +1082,7 @@ void KNetworkConf::createProfileSlot()
newProfile->setPlatformName(netInfo->getPlatformName());
newProfile->setProfilesList(netInfo->getProfilesList());
newProfile->setRoutingInfo(netInfo->getRoutingInfo());
-
+
profiles.append(newProfile);
netInfo->setProfilesList(profiles);
enableApplyButtonSlot();
@@ -1183,4 +1187,21 @@ void KNetworkConf::updateProfileSlot()
}
}
+TQString KNetworkConf::handbookSection() const
+{
+ // FIXME
+ // No context-sensitive help documentation currently exists for this module!
+ // This module is somewhat unique in having comprehensive usage documentation available, but this
+ // documentation is not organized by tab and is split up across multiple docbooks.
+ // A GUI-centric brief help docbook should be added with links back to the main Network Configuration help.
+ int index = tabWidget->currentPageIndex();
+ if (index == 0) {
+ //return "";
+ return TQString::null;
+ }
+ else {
+ return TQString::null;
+ }
+}
+
#include "knetworkconf.moc"
diff --git a/knetworkconf/knetworkconf/knetworkconf.h b/knetworkconf/knetworkconf/knetworkconf.h
index b215847..2ff75c5 100644
--- a/knetworkconf/knetworkconf/knetworkconf.h
+++ b/knetworkconf/knetworkconf/knetworkconf.h
@@ -39,6 +39,7 @@
#include <tqgroupbox.h>
#include <tqlabel.h>
#include <tqradiobutton.h>
+#include <tqtabwidget.h>
#include <tqlayout.h>
#include <kdialog.h>
#include <kinputdialog.h>
@@ -97,6 +98,8 @@ class KNetworkConf : public KNetworkConfDlg, virtual public KNetworkConfIface
void loadDNSInfo();
void loadNetworkProfiles();
+ TQString handbookSection() const;
+
private: // Private attributes
/** */
KNetworkConfigParser *config;
diff --git a/knetworkconf/knetworkconf/knetworkconfmodule.cpp b/knetworkconf/knetworkconf/knetworkconfmodule.cpp
index f2e7e8d..c05e500 100644
--- a/knetworkconf/knetworkconf/knetworkconfmodule.cpp
+++ b/knetworkconf/knetworkconf/knetworkconfmodule.cpp
@@ -113,6 +113,11 @@ TQString KNetworkConfModule::quickHelp() const
return i18n("%1Network configuration%2This module allows you to configure your TCP/IP settings.%3").arg("<h1>").arg("</h1><p>").arg("</p>");
}
+TQString KNetworkConfModule::handbookSection() const
+{
+ return conf->handbookSection();
+}
+
//#include "knetworkconfmodule.moc"
#include "knetworkconfmodule.moc"
diff --git a/knetworkconf/knetworkconf/knetworkconfmodule.h b/knetworkconf/knetworkconf/knetworkconfmodule.h
index f559477..8e7c41f 100644
--- a/knetworkconf/knetworkconf/knetworkconfmodule.h
+++ b/knetworkconf/knetworkconf/knetworkconfmodule.h
@@ -40,6 +40,8 @@ public:
TDEAboutData* aboutData() const;
TQString quickHelp() const;
+ virtual TQString handbookSection() const;
+
private slots:
void configChanged(bool);