author | harlekin <harlekin> | 2002-06-16 20:44:48 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-06-16 20:44:48 (UTC) |
commit | 56788c49b68bae137a51b089b911f7ec4977c33f (patch) (unidiff) | |
tree | cea3983dbb842348d1881d7f7d8ef2679d571d14 /noncore/net/opietooth/manager/scandialog.cpp | |
parent | 5c098847f0fd716c4fe697e5eb314111a4ae5df1 (diff) | |
download | opie-56788c49b68bae137a51b089b911f7ec4977c33f.zip opie-56788c49b68bae137a51b089b911f7ec4977c33f.tar.gz opie-56788c49b68bae137a51b089b911f7ec4977c33f.tar.bz2 |
remoteDevice part II
Diffstat (limited to 'noncore/net/opietooth/manager/scandialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opietooth/manager/scandialog.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/noncore/net/opietooth/manager/scandialog.cpp b/noncore/net/opietooth/manager/scandialog.cpp index 8a7ea01..bd7d23c 100644 --- a/noncore/net/opietooth/manager/scandialog.cpp +++ b/noncore/net/opietooth/manager/scandialog.cpp | |||
@@ -115,53 +115,53 @@ namespace OpieTooth { | |||
115 | 115 | ||
116 | progressTimer(); | 116 | progressTimer(); |
117 | // when finished, it emmite foundDevices() | 117 | // when finished, it emmite foundDevices() |
118 | // checken ob initialisiert , qcop ans applet. | 118 | // checken ob initialisiert , qcop ans applet. |
119 | localDevice->searchDevices(); | 119 | localDevice->searchDevices(); |
120 | 120 | ||
121 | } | 121 | } |
122 | 122 | ||
123 | void ScanDialog::stopSearch() { | 123 | void ScanDialog::stopSearch() { |
124 | 124 | ||
125 | } | 125 | } |
126 | 126 | ||
127 | void ScanDialog::fillList(const QString& device, RemoteDevices::ValueList deviceList) { | 127 | void ScanDialog::fillList(const QString& device, RemoteDevice::ValueList deviceList) { |
128 | 128 | ||
129 | QCheckListItem * deviceItem; | 129 | QCheckListItem * deviceItem; |
130 | 130 | ||
131 | RemoteDevices::ValueList::Iterator it; | 131 | RemoteDevice::ValueList::Iterator it; |
132 | for( it = deviceList.begin(); it != deviceList.end(); ++it ) { | 132 | for( it = deviceList.begin(); it != deviceList.end(); ++it ) { |
133 | 133 | ||
134 | deviceItem = new QCheckListItem( ListView1, (*it).name() ); | 134 | deviceItem = new QCheckListItem( ListView1, (*it).name() ); |
135 | deviceItem->setText(1, (*it).mac() ); | 135 | deviceItem->setText(1, (*it).mac() ); |
136 | } | 136 | } |
137 | } | 137 | } |
138 | 138 | ||
139 | /* | 139 | /* |
140 | * Iterates trough the items, and collects the checked items. | 140 | * Iterates trough the items, and collects the checked items. |
141 | * Then it emits it, so the manager can connect to the signal to fill the listing. | 141 | * Then it emits it, so the manager can connect to the signal to fill the listing. |
142 | */ | 142 | */ |
143 | void ScanDialog::emitToManager() { | 143 | void ScanDialog::emitToManager() { |
144 | 144 | ||
145 | if (!ListView1) { | 145 | if (!ListView1) { |
146 | return; | 146 | return; |
147 | } | 147 | } |
148 | 148 | ||
149 | QList<RemoteDevices> *deviceList = new QList<RemoteDevices>; | 149 | QList<RemoteDevice> *deviceList = new QList<RemoteDevice>; |
150 | 150 | ||
151 | QListViewItemIterator it( ListView1 ); | 151 | QListViewItemIterator it( ListView1 ); |
152 | for ( ; it.current(); ++it ) { | 152 | for ( ; it.current(); ++it ) { |
153 | if ( ((QCheckListItem*)it.current())->isOn() ) { | 153 | if ( ((QCheckListItem*)it.current())->isOn() ) { |
154 | RemoteDevices* device = new RemoteDevices( it.current()->text(1), it.current()->text(0)); | 154 | RemoteDevice * device = new RemoteDevice( it.current()->text(1), it.current()->text(0)); |
155 | deviceList->append( device ); | 155 | deviceList->append( device ); |
156 | } | 156 | } |
157 | } | 157 | } |
158 | emit selectedDevices( *deviceList ); | 158 | emit selectedDevices( *deviceList ); |
159 | } | 159 | } |
160 | 160 | ||
161 | /* | 161 | /* |
162 | * Cleanup | 162 | * Cleanup |
163 | */ | 163 | */ |
164 | ScanDialog::~ScanDialog() { | 164 | ScanDialog::~ScanDialog() { |
165 | emitToManager(); | 165 | emitToManager(); |
166 | delete localDevice; | 166 | delete localDevice; |
167 | } | 167 | } |