From 527e77d8244fb25d0bab39857eebbdfbcbfb807a Mon Sep 17 00:00:00 2001 From: benmeyer Date: Wed, 02 Oct 2002 17:22:50 +0000 Subject: Add Connection function more filled in --- (limited to 'noncore/net/networksetup/addconnectionimp.cpp') diff --git a/noncore/net/networksetup/addconnectionimp.cpp b/noncore/net/networksetup/addconnectionimp.cpp new file mode 100644 index 0000000..ee7bd97 --- a/dev/null +++ b/noncore/net/networksetup/addconnectionimp.cpp @@ -0,0 +1,38 @@ +#include "addconnectionimp.h" +#include +#include +#include +#include + +/** + * Constructor + */ +AddConnectionImp::AddConnectionImp(QWidget *parent=0, const char *name=0, WFlags f=0):AddConnection(parent, name, f){ + connect(registeredServicesList, SIGNAL(selectionChanged()), this, SLOT(changed())); + registeredServicesList->header()->hide(); +}; + +/** + * The current item changed, update the discription. + */ +void AddConnectionImp::changed(){ + QListViewItem *item = registeredServicesList->currentItem(); + if(item){ + help->setText(list[item->text(0)]); + } +} + +/** + * Save a copy of newList for the discriptions and append them all to the view + * @param newList the new list of possible interfaces + */ +void AddConnectionImp::addConnections(QMap newList){ + list = newList; + QMap::Iterator it; + for( it = list.begin(); it != list.end(); ++it ) + QListViewItem *item = new QListViewItem(registeredServicesList, it.key()); + registeredServicesList->setCurrentItem(registeredServicesList->firstChild()); +} + +// addserviceimp.cpp + -- cgit v0.9.0.2