summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/manager/scandialog.cpp
Unidiff
Diffstat (limited to 'noncore/net/opietooth/manager/scandialog.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/scandialog.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/noncore/net/opietooth/manager/scandialog.cpp b/noncore/net/opietooth/manager/scandialog.cpp
index bccc6c2..160e8dd 100644
--- a/noncore/net/opietooth/manager/scandialog.cpp
+++ b/noncore/net/opietooth/manager/scandialog.cpp
@@ -53,19 +53,19 @@ namespace OpieTooth {
53 progress = new QProgressBar( this, "progbar"); 53 progress = new QProgressBar( this, "progbar");
54 progress->setTotalSteps(20); 54 progress->setTotalSteps(20);
55 55
56 StartStopButton = new QPushButton( this, "StartButton" ); 56 StartStopButton = new QPushButton( this, "StartButton" );
57 StartStopButton->setText( tr( "Start scan" ) ); 57 StartStopButton->setText( tr( "Start scan" ) );
58 58
59 ListView1 = new QListView( this, "ListView1" ); 59 serviceView = new QListView( this, "serviceView" );
60 60
61 //ListView1->addColumn( tr( "Add" ) ); 61 //serviceView->addColumn( tr( "Add" ) );
62 ListView1->addColumn( tr( "Add Device" ) ); 62 serviceView->addColumn( tr( "Add Device" ) );
63 //ListView1->addColumn( tr( "Type" ) ); 63 //serviceView->addColumn( tr( "Type" ) );
64 64
65 Layout11->addWidget( ListView1 ); 65 Layout11->addWidget( serviceView );
66 Layout11->addWidget( progress ); 66 Layout11->addWidget( progress );
67 Layout11->addWidget( StartStopButton ); 67 Layout11->addWidget( StartStopButton );
68 68
69 localDevice = new Manager( "hci0" ); 69 localDevice = new Manager( "hci0" );
70 70
71 connect( StartStopButton, SIGNAL( clicked() ), this, SLOT( startSearch() ) ); 71 connect( StartStopButton, SIGNAL( clicked() ), this, SLOT( startSearch() ) );
@@ -99,13 +99,13 @@ namespace OpieTooth {
99 } 99 }
100 m_search = true; 100 m_search = true;
101 progress->setProgress(0); 101 progress->setProgress(0);
102 progressStat = 0; 102 progressStat = 0;
103 103
104 // empty list before a new scan 104 // empty list before a new scan
105 ListView1->clear(); 105 serviceView->clear();
106 106
107 progressTimer(); 107 progressTimer();
108 // when finished, it emmite foundDevices() 108 // when finished, it emmite foundDevices()
109 // checken ob initialisiert , qcop ans applet. 109 // checken ob initialisiert , qcop ans applet.
110 StartStopButton->setText( tr( "Stop scan" ) ); 110 StartStopButton->setText( tr( "Stop scan" ) );
111 111
@@ -122,32 +122,32 @@ namespace OpieTooth {
122 progressStat = 0; 122 progressStat = 0;
123 QCheckListItem * deviceItem; 123 QCheckListItem * deviceItem;
124 124
125 RemoteDevice::ValueList::Iterator it; 125 RemoteDevice::ValueList::Iterator it;
126 for( it = deviceList.begin(); it != deviceList.end(); ++it ) { 126 for( it = deviceList.begin(); it != deviceList.end(); ++it ) {
127 127
128 deviceItem = new QCheckListItem( ListView1, (*it).name(), QCheckListItem::CheckBox ); 128 deviceItem = new QCheckListItem( serviceView, (*it).name(), QCheckListItem::CheckBox );
129 deviceItem->setText( 1, (*it).mac() ); 129 deviceItem->setText( 1, (*it).mac() );
130 } 130 }
131 m_search = false; 131 m_search = false;
132 StartStopButton->setText( tr( "Start scan" ) ); 132 StartStopButton->setText( tr( "Start scan" ) );
133 } 133 }
134 134
135/** 135/**
136 * Iterates trough the items, and collects the checked items. 136 * Iterates trough the items, and collects the checked items.
137 * Then it emits it, so the manager can connect to the signal to fill the listing. 137 * Then it emits it, so the manager can connect to the signal to fill the listing.
138 */ 138 */
139 void ScanDialog::emitToManager() { 139 void ScanDialog::emitToManager() {
140 140
141 if (!ListView1) { 141 if (!serviceView) {
142 return; 142 return;
143 } 143 }
144 144
145 QValueList<RemoteDevice> deviceList; 145 QValueList<RemoteDevice> deviceList;
146 146
147 QListViewItemIterator it( ListView1 ); 147 QListViewItemIterator it( serviceView );
148 for ( ; it.current(); ++it ) { 148 for ( ; it.current(); ++it ) {
149 if ( ( (QCheckListItem*)it.current() )->isOn() ) { 149 if ( ( (QCheckListItem*)it.current() )->isOn() ) {
150 RemoteDevice device( it.current()->text(1), it.current()->text(0) ); 150 RemoteDevice device( it.current()->text(1), it.current()->text(0) );
151 deviceList.append( device ); 151 deviceList.append( device );
152 } 152 }
153 } 153 }