author | benmeyer <benmeyer> | 2002-10-02 17:22:50 (UTC) |
---|---|---|
committer | benmeyer <benmeyer> | 2002-10-02 17:22:50 (UTC) |
commit | 527e77d8244fb25d0bab39857eebbdfbcbfb807a (patch) (unidiff) | |
tree | f3ec7cee3573ef83d8d86f859c7c3de3a8b06b9f /noncore/net/networksetup/addconnectionimp.cpp | |
parent | 6e50141595ec2159d384c2cb9aaee4758eb720ea (diff) | |
download | opie-527e77d8244fb25d0bab39857eebbdfbcbfb807a.zip opie-527e77d8244fb25d0bab39857eebbdfbcbfb807a.tar.gz opie-527e77d8244fb25d0bab39857eebbdfbcbfb807a.tar.bz2 |
Add Connection function more filled in
Diffstat (limited to 'noncore/net/networksetup/addconnectionimp.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/networksetup/addconnectionimp.cpp | 38 |
1 files changed, 38 insertions, 0 deletions
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 @@ | |||
1 | #include "addconnectionimp.h" | ||
2 | #include <qlistview.h> | ||
3 | #include <qlist.h> | ||
4 | #include <qlabel.h> | ||
5 | #include <qheader.h> | ||
6 | |||
7 | /** | ||
8 | * Constructor | ||
9 | */ | ||
10 | AddConnectionImp::AddConnectionImp(QWidget *parent=0, const char *name=0, WFlags f=0):AddConnection(parent, name, f){ | ||
11 | connect(registeredServicesList, SIGNAL(selectionChanged()), this, SLOT(changed())); | ||
12 | registeredServicesList->header()->hide(); | ||
13 | }; | ||
14 | |||
15 | /** | ||
16 | * The current item changed, update the discription. | ||
17 | */ | ||
18 | void AddConnectionImp::changed(){ | ||
19 | QListViewItem *item = registeredServicesList->currentItem(); | ||
20 | if(item){ | ||
21 | help->setText(list[item->text(0)]); | ||
22 | } | ||
23 | } | ||
24 | |||
25 | /** | ||
26 | * Save a copy of newList for the discriptions and append them all to the view | ||
27 | * @param newList the new list of possible interfaces | ||
28 | */ | ||
29 | void AddConnectionImp::addConnections(QMap<QString, QString> newList){ | ||
30 | list = newList; | ||
31 | QMap<QString, QString>::Iterator it; | ||
32 | for( it = list.begin(); it != list.end(); ++it ) | ||
33 | QListViewItem *item = new QListViewItem(registeredServicesList, it.key()); | ||
34 | registeredServicesList->setCurrentItem(registeredServicesList->firstChild()); | ||
35 | } | ||
36 | |||
37 | // addserviceimp.cpp | ||
38 | |||