Diffstat (limited to 'noncore/comm/keypebble/kvncbookmarkdlg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/comm/keypebble/kvncbookmarkdlg.cpp | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/noncore/comm/keypebble/kvncbookmarkdlg.cpp b/noncore/comm/keypebble/kvncbookmarkdlg.cpp index 8556d49..ef2fa12 100644 --- a/noncore/comm/keypebble/kvncbookmarkdlg.cpp +++ b/noncore/comm/keypebble/kvncbookmarkdlg.cpp | |||
@@ -1,66 +1,52 @@ | |||
1 | #include <qframe.h> | ||
2 | #include <qvbox.h> | ||
3 | #include <qcheckbox.h> | ||
4 | #include <qspinbox.h> | ||
5 | #include <qlabel.h> | ||
6 | #include <qlayout.h> | ||
7 | #include <qwhatsthis.h> | ||
8 | #include <qfile.h> | ||
9 | #include <qdir.h> | 1 | #include <qdir.h> |
10 | #include <qstring.h> | ||
11 | #include <qapplication.h> | ||
12 | #include <qlineedit.h> | ||
13 | #include <qtextstream.h> | 2 | #include <qtextstream.h> |
14 | #include <qpushbutton.h> | ||
15 | #include <qlistbox.h> | 3 | #include <qlistbox.h> |
16 | #include <qpe/config.h> | ||
17 | #include <qpe/global.h> | 4 | #include <qpe/global.h> |
18 | #include "krfbserver.h" | ||
19 | #include "kvncbookmarkdlg.h" | 5 | #include "kvncbookmarkdlg.h" |
20 | 6 | ||
21 | KVNCBookmarkDlg::KVNCBookmarkDlg( QWidget * parent, const char * name, WFlags f ) | 7 | KVNCBookmarkDlg::KVNCBookmarkDlg( QWidget * parent, const char * name, WFlags f ) |
22 | 8 | ||
23 | : KVNCBookmarkDlgBase( parent, name,f) | 9 | : KVNCBookmarkDlgBase( parent, name,f) |
24 | { | 10 | { |
25 | readBookmarks(); | 11 | readBookmarks(); |
26 | refresh(); | 12 | refresh(); |
27 | 13 | ||
28 | } | 14 | } |
29 | 15 | ||
30 | KVNCBookmarkDlg::~KVNCBookmarkDlg() | 16 | KVNCBookmarkDlg::~KVNCBookmarkDlg() |
31 | { | 17 | { |
32 | } | 18 | } |
33 | 19 | ||
34 | void KVNCBookmarkDlg::addBookmark(KRFBServer * server) | 20 | void KVNCBookmarkDlg::addBookmark(KRFBServer * server) |
35 | { | 21 | { |
36 | if (server) { | 22 | if (server) { |
37 | servers.append(server); | 23 | servers.append(server); |
38 | bookmarkList->insertItem(server->name); | 24 | bookmarkList->insertItem(server->name); |
39 | writeBookmarks(); | 25 | writeBookmarks(); |
40 | refresh(); | 26 | refresh(); |
41 | } | 27 | } |
42 | } | 28 | } |
43 | 29 | ||
44 | void KVNCBookmarkDlg::deleteBookmark(QString name) | 30 | void KVNCBookmarkDlg::deleteBookmark(QString name) |
45 | { | 31 | { |
46 | KRFBServer * server=0; | 32 | KRFBServer * server=0; |
47 | for ( server=servers.first(); server != 0; server=servers.next() ) { | 33 | for ( server=servers.first(); server != 0; server=servers.next() ) { |
48 | if (server->name==name) { | 34 | if (server->name==name) { |
49 | servers.remove(servers.at()); | 35 | servers.remove(servers.at()); |
50 | writeBookmarks(); | 36 | writeBookmarks(); |
51 | refresh(); | 37 | refresh(); |
52 | return; | 38 | return; |
53 | } | 39 | } |
54 | } | 40 | } |
55 | } | 41 | } |
56 | KRFBServer *KVNCBookmarkDlg::getServer(QString name) | 42 | KRFBServer *KVNCBookmarkDlg::getServer(QString name) |
57 | { | 43 | { |
58 | KRFBServer * server=0; | 44 | KRFBServer * server=0; |
59 | for ( server=servers.first(); server != 0; server=servers.next() ) { | 45 | for ( server=servers.first(); server != 0; server=servers.next() ) { |
60 | if (server->name==name) | 46 | if (server->name==name) |
61 | 47 | ||
62 | return server; | 48 | return server; |
63 | } | 49 | } |
64 | return 0; | 50 | return 0; |
65 | } | 51 | } |
66 | 52 | ||