summaryrefslogtreecommitdiff
path: root/noncore/settings/sysinfo/devicesinfo.cpp
Unidiff
Diffstat (limited to 'noncore/settings/sysinfo/devicesinfo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sysinfo/devicesinfo.cpp79
1 files changed, 72 insertions, 7 deletions
diff --git a/noncore/settings/sysinfo/devicesinfo.cpp b/noncore/settings/sysinfo/devicesinfo.cpp
index 4940286..76c9b79 100644
--- a/noncore/settings/sysinfo/devicesinfo.cpp
+++ b/noncore/settings/sysinfo/devicesinfo.cpp
@@ -1,259 +1,262 @@
1/* 1/*
2                This file is part of the Opie Project 2                This file is part of the Opie Project
3 =. Copyright (C) 2005 Michael 'Mickey' Lauer <mickey@Vanille.de> 3 =. Copyright (C) 2005 Michael 'Mickey' Lauer <mickey@Vanille.de>
4 .=l. Copyright (C) The Opie Team <opie-devel@handhelds.org> 4 .=l. Copyright (C) The Opie Team <opie-devel@handhelds.org>
5          .>+-= 5          .>+-=
6_;:,     .>    :=|. This program is free software; you can 6_;:,     .>    :=|. This program is free software; you can
7.> <`_,   >  .   <= redistribute it and/or modify it under 7.> <`_,   >  .   <= redistribute it and/or modify it under
8:`=1 )Y*s>-.--   : the terms of the GNU General Public 8:`=1 )Y*s>-.--   : the terms of the GNU General Public
9.="- .-=="i,     .._ License as published by the Free Software 9.="- .-=="i,     .._ License as published by the Free Software
10- .   .-<_>     .<> Foundation; version 2 of the License. 10- .   .-<_>     .<> Foundation; version 2 of the License.
11    ._= =}       : 11    ._= =}       :
12   .%`+i>       _;_. 12   .%`+i>       _;_.
13   .i_,=:_.      -<s. This program is distributed in the hope that 13   .i_,=:_.      -<s. This program is distributed in the hope that
14    +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 14    +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
15   : ..    .:,     . . . without even the implied warranty of 15   : ..    .:,     . . . without even the implied warranty of
16   =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 16   =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
17 _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU 17 _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
18..}^=.=       =       ; General Public License for more 18..}^=.=       =       ; General Public License for more
19++=   -.     .`     .: details. 19++=   -.     .`     .: details.
20:     =  ...= . :.=- 20:     =  ...= . :.=-
21-.   .:....=;==+<; You should have received a copy of the GNU 21-.   .:....=;==+<; You should have received a copy of the GNU
22 -_. . .   )=.  = General Public License along with 22 -_. . .   )=.  = General Public License along with
23   --        :-=` this application; see the file LICENSE.GPL. 23   --        :-=` this application; see the file LICENSE.GPL.
24 If not, write to the Free Software Foundation, 24 If not, write to the Free Software Foundation,
25 Inc., 59 Temple Place - Suite 330, 25 Inc., 59 Temple Place - Suite 330,
26 Boston, MA 02111-1307, USA. 26 Boston, MA 02111-1307, USA.
27*/ 27*/
28 28
29#include "devicesinfo.h" 29#include "devicesinfo.h"
30/* OPIE */ 30/* OPIE */
31#include <opie2/odebug.h> 31#include <opie2/odebug.h>
32#include <opie2/oinputsystem.h> 32#include <opie2/oinputsystem.h>
33#include <opie2/opcmciasystem.h> 33#include <opie2/opcmciasystem.h>
34#include <opie2/olayout.h> 34#include <opie2/olayout.h>
35#include <opie2/olistview.h> 35#include <opie2/olistview.h>
36#include <qpe/qpeapplication.h> 36#include <qpe/qpeapplication.h>
37using namespace Opie::Core; 37using namespace Opie::Core;
38using namespace Opie::Ui; 38using namespace Opie::Ui;
39 39
40/* QT */ 40/* QT */
41#include <qobjectlist.h> 41#include <qobjectlist.h>
42#include <qlistview.h> 42#include <qlistview.h>
43#include <qcombobox.h> 43#include <qcombobox.h>
44#include <qfile.h> 44#include <qfile.h>
45#include <qpushbutton.h> 45#include <qpushbutton.h>
46#include <qstringlist.h>
46#include <qtextstream.h> 47#include <qtextstream.h>
47#include <qtextview.h> 48#include <qtextview.h>
48#include <qtimer.h> 49#include <qtimer.h>
49#include <qwhatsthis.h> 50#include <qwhatsthis.h>
50 51
51//================================================================================================= 52//=================================================================================================
52DevicesView::DevicesView( QWidget* parent, const char* name, WFlags fl ) 53DevicesView::DevicesView( QWidget* parent, const char* name, WFlags fl )
53 :Opie::Ui::OListView( parent, name, fl ) 54 :Opie::Ui::OListView( parent, name, fl )
54{ 55{
55 addColumn( tr( "My Computer" ) ); 56 addColumn( tr( "My Computer" ) );
56 setAllColumnsShowFocus( true ); 57 setAllColumnsShowFocus( true );
57 setRootIsDecorated( true ); 58 setRootIsDecorated( true );
58 QWhatsThis::add( this, tr( "This is a list of all the devices currently recognized on this device." ) ); 59 QWhatsThis::add( this, tr( "This is a list of all the devices currently recognized on this device." ) );
59 60
60 DevicesView* root = this; 61 DevicesView* root = this;
61 ( new CpuCategory( root ) )->populate(); 62 ( new CpuCategory( root ) )->populate();
62 ( new InputCategory( root ) )->populate(); 63 ( new InputCategory( root ) )->populate();
63 ( new CardsCategory( root ) )->populate(); 64 ( new CardsCategory( root ) )->populate();
64 ( new UsbCategory( root ) )->populate(); 65 ( new UsbCategory( root ) )->populate();
65 66
66 connect( this, SIGNAL(selectionChanged(QListViewItem*)), this, SLOT(selectionChanged(QListViewItem*)) ); 67 connect( this, SIGNAL(selectionChanged(QListViewItem*)), this, SLOT(selectionChanged(QListViewItem*)) );
67} 68}
68 69
69DevicesView::~DevicesView() 70DevicesView::~DevicesView()
70{ 71{
71} 72}
72 73
73 74
74void DevicesView::selectionChanged( QListViewItem* item ) 75void DevicesView::selectionChanged( QListViewItem* item )
75{ 76{
76 odebug << "DevicesView::selectionChanged to '" << item->text( 0 ) << "'" << oendl; 77 odebug << "DevicesView::selectionChanged to '" << item->text( 0 ) << "'" << oendl;
77 if ( item->parent() ) 78 if ( item->parent() )
78 { 79 {
79 QWidget* details = ( static_cast<Device*>( item ) )->detailsWidget(); 80 QWidget* details = ( static_cast<Device*>( item ) )->detailsWidget();
80 ( static_cast<DevicesInfo*>( parent() ) )->setDetailsWidget( details ); 81 ( static_cast<DevicesInfo*>( parent() ) )->setDetailsWidget( details );
81 } 82 }
82 else 83 else
83 { 84 {
84 odebug << "DevicesView::not a device node." << oendl; 85 odebug << "DevicesView::not a device node." << oendl;
85 } 86 }
86} 87}
87 88
88 89
89//================================================================================================= 90//=================================================================================================
90DevicesInfo::DevicesInfo( QWidget* parent, const char* name, WFlags fl ) 91DevicesInfo::DevicesInfo( QWidget* parent, const char* name, WFlags fl )
91 :QWidget( parent, name, fl ), details( 0 ) 92 :QWidget( parent, name, fl ), details( 0 )
92{ 93{
93 layout = new OAutoBoxLayout( this ); 94 layout = new OAutoBoxLayout( this );
94 layout->setSpacing( 2 ); 95 layout->setSpacing( 2 );
95 layout->setMargin( 2 ); 96 layout->setMargin( 2 );
96 view = new DevicesView( this ); 97 view = new DevicesView( this );
97 layout->addWidget( view, 100 ); 98 layout->addWidget( view, 100 );
98 stack = new QWidgetStack( this ); 99 stack = new QWidgetStack( this );
99 layout->addWidget( stack, 70 ); 100 layout->addWidget( stack, 80 );
100} 101}
101 102
102 103
103DevicesInfo::~DevicesInfo() 104DevicesInfo::~DevicesInfo()
104{ 105{
105} 106}
106 107
107 108
108void DevicesInfo::setDetailsWidget( QWidget* w ) 109void DevicesInfo::setDetailsWidget( QWidget* w )
109{ 110{
110 if ( details ) 111 if ( details )
111 { 112 {
112 qDebug( "hiding widget '%s' ('%s')", details->name(), details->className() ); 113 qDebug( "hiding widget '%s' ('%s')", details->name(), details->className() );
113 stack->removeWidget( w ); 114 stack->removeWidget( w );
114 } 115 }
115 116
116 stack->addWidget( details = w, 40 ); 117 stack->addWidget( details = w, 40 );
117 stack->raiseWidget( details ); 118 stack->raiseWidget( details );
118} 119}
119 120
120 121
121//================================================================================================= 122//=================================================================================================
122Category::Category( DevicesView* parent, const QString& name ) 123Category::Category( DevicesView* parent, const QString& name )
123 :OListViewItem( parent, name ) 124 :OListViewItem( parent, name )
124{ 125{
125 odebug << "Category '" << name << "' inserted. Scanning for devices..." << oendl; 126 odebug << "Category '" << name << "' inserted. Scanning for devices..." << oendl;
126} 127}
127 128
128Category::~Category() 129Category::~Category()
129{ 130{
130} 131}
131 132
132//================================================================================================= 133//=================================================================================================
133CpuCategory::CpuCategory( DevicesView* parent ) 134CpuCategory::CpuCategory( DevicesView* parent )
134 :Category( parent, "1. Central Processing Unit" ) 135 :Category( parent, "1. Central Processing Unit" )
135{ 136{
136} 137}
137 138
138CpuCategory::~CpuCategory() 139CpuCategory::~CpuCategory()
139{ 140{
140} 141}
141 142
142void CpuCategory::populate() 143void CpuCategory::populate()
143{ 144{
144 odebug << "CpuCategory::populate()" << oendl; 145 odebug << "CpuCategory::populate()" << oendl;
145 QFile cpuinfofile( "/proc/cpuinfo" ); 146 QFile cpuinfofile( "/proc/cpuinfo" );
146 if ( !cpuinfofile.exists() || !cpuinfofile.open( IO_ReadOnly ) ) 147 if ( !cpuinfofile.exists() || !cpuinfofile.open( IO_ReadOnly ) )
147 { 148 {
148 new CpuDevice( this, "ERROR: /proc/cpuinfo not found or unaccessible" ); 149 new CpuDevice( this, "ERROR: /proc/cpuinfo not found or unaccessible" );
149 return; 150 return;
150 } 151 }
151 QTextStream cpuinfo( &cpuinfofile ); 152 QTextStream cpuinfo( &cpuinfofile );
152 153
153 int cpucount = 0; 154 int cpucount = 0;
154 CpuDevice* dev = 0; 155 CpuDevice* dev = 0;
155 156
156 while ( !cpuinfo.atEnd() ) 157 while ( !cpuinfo.atEnd() )
157 { 158 {
158 QString line = cpuinfo.readLine(); 159 QString line = cpuinfo.readLine();
159 odebug << "got line '" << line << "'" << oendl; 160 odebug << "got line '" << line << "'" << oendl;
160 if ( line.lower().startsWith( "processor" ) ) 161 if ( line.lower().startsWith( "processor" ) )
161 { 162 {
162 dev = new CpuDevice( this, QString( "CPU #%1" ).arg( cpucount++ ) ); 163 dev = new CpuDevice( this, QString( "CPU #%1" ).arg( cpucount++ ) );
163 dev->addInfo( line ); 164 dev->addInfo( line );
164 } 165 }
165 else 166 else
166 { 167 {
167 if ( dev ) dev->addInfo( line ); 168 if ( dev ) dev->addInfo( line );
168 } 169 }
169 } 170 }
170} 171}
171 172
172//================================================================================================= 173//=================================================================================================
173InputCategory::InputCategory( DevicesView* parent ) 174InputCategory::InputCategory( DevicesView* parent )
174 :Category( parent, "2. Input Subsystem" ) 175 :Category( parent, "2. Input Subsystem" )
175{ 176{
176} 177}
177 178
178InputCategory::~InputCategory() 179InputCategory::~InputCategory()
179{ 180{
180} 181}
181 182
182void InputCategory::populate() 183void InputCategory::populate()
183{ 184{
184 odebug << "InputCategory::populate()" << oendl; 185 odebug << "InputCategory::populate()" << oendl;
185 OInputSystem* sys = OInputSystem::instance(); 186 OInputSystem* sys = OInputSystem::instance();
186 OInputSystem::DeviceIterator it = sys->iterator(); 187 OInputSystem::DeviceIterator it = sys->iterator();
187 while ( it.current() ) 188 while ( it.current() )
188 { 189 {
189 new InputDevice( this, it.current()->identity() ); 190 InputDevice* dev = new InputDevice( this, it.current()->identity() );
191 dev->setInfo( it.current() );
190 ++it; 192 ++it;
191 } 193 }
192} 194}
193 195
194//================================================================================================= 196//=================================================================================================
195CardsCategory::CardsCategory( DevicesView* parent ) 197CardsCategory::CardsCategory( DevicesView* parent )
196 :Category( parent, "3. Removable Cards" ) 198 :Category( parent, "3. Removable Cards" )
197{ 199{
198} 200}
199 201
200CardsCategory::~CardsCategory() 202CardsCategory::~CardsCategory()
201{ 203{
202} 204}
203 205
204void CardsCategory::populate() 206void CardsCategory::populate()
205{ 207{
206 odebug << "CardsCategory::populate()" << oendl; 208 odebug << "CardsCategory::populate()" << oendl;
207 OPcmciaSystem* sys = OPcmciaSystem::instance(); 209 OPcmciaSystem* sys = OPcmciaSystem::instance();
208 OPcmciaSystem::CardIterator it = sys->iterator(); 210 OPcmciaSystem::CardIterator it = sys->iterator();
209 while ( it.current() ) 211 while ( it.current() )
210 { 212 {
211 new CardDevice( this, it.current()->identity() ); 213 CardDevice *dev = new CardDevice( this, it.current()->identity() );
214 dev->setInfo( it.current() );
212 ++it; 215 ++it;
213 } 216 }
214} 217}
215 218
216//================================================================================================= 219//=================================================================================================
217UsbCategory::UsbCategory( DevicesView* parent ) 220UsbCategory::UsbCategory( DevicesView* parent )
218 :Category( parent, "4. Universal Serial Bus" ) 221 :Category( parent, "4. Universal Serial Bus" )
219{ 222{
220} 223}
221 224
222UsbCategory::~UsbCategory() 225UsbCategory::~UsbCategory()
223{ 226{
224} 227}
225 228
226void UsbCategory::populate() 229void UsbCategory::populate()
227{ 230{
228 odebug << "UsbCategory::populate()" << oendl; 231 odebug << "UsbCategory::populate()" << oendl;
229 QFile usbinfofile( "/proc/bus/usb/devices" ); 232 QFile usbinfofile( "/proc/bus/usb/devices" );
230 if ( !usbinfofile.exists() || !usbinfofile.open( IO_ReadOnly ) ) 233 if ( !usbinfofile.exists() || !usbinfofile.open( IO_ReadOnly ) )
231 { 234 {
232 new UsbDevice( this, "ERROR: /proc/bus/usb/devices not found or unaccessible" ); 235 new UsbDevice( this, "ERROR: /proc/bus/usb/devices not found or unaccessible" );
233 return; 236 return;
234 } 237 }
235 QTextStream usbinfo( &usbinfofile ); 238 QTextStream usbinfo( &usbinfofile );
236 239
237 int _bus, _level, _parent, _port, _count, _device, _channels, _power; 240 int _bus, _level, _parent, _port, _count, _device, _channels, _power;
238 float _speed; 241 float _speed;
239 QString _manufacturer, _product, _serial; 242 QString _manufacturer, _product, _serial;
240 243
241 int usbcount = 0; 244 int usbcount = 0;
242 UsbDevice* lastDev = 0; 245 UsbDevice* lastDev = 0;
243 UsbDevice* dev = 0; 246 UsbDevice* dev = 0;
244 while ( !usbinfo.atEnd() ) 247 while ( !usbinfo.atEnd() )
245 { 248 {
246 QString line = usbinfo.readLine(); 249 QString line = usbinfo.readLine();
247 odebug << "got line '" << line << "'" << oendl; 250 odebug << "got line '" << line << "'" << oendl;
248 if ( line.startsWith( "T:" ) ) 251 if ( line.startsWith( "T:" ) )
249 { 252 {
250 sscanf(line.local8Bit().data(), "T: Bus=%2d Lev=%2d Prnt=%2d Port=%d Cnt=%2d Dev#=%3d Spd=%3f MxCh=%2d", &_bus, &_level, &_parent, &_port, &_count, &_device, &_speed, &_channels); 253 sscanf(line.local8Bit().data(), "T: Bus=%2d Lev=%2d Prnt=%2d Port=%d Cnt=%2d Dev#=%3d Spd=%3f MxCh=%2d", &_bus, &_level, &_parent, &_port, &_count, &_device, &_speed, &_channels);
251 254
252 if ( !_level ) 255 if ( !_level )
253 { 256 {
254 odebug << "adding new bus" << oendl; 257 odebug << "adding new bus" << oendl;
255 dev = new UsbDevice( this, QString( "Generic USB Hub Device" ) ); 258 dev = new UsbDevice( this, QString( "Generic USB Hub Device" ) );
256 lastDev = dev; 259 lastDev = dev;
257 } 260 }
258 else 261 else
259 { 262 {
@@ -281,87 +284,149 @@ Device::Device( Category* parent, const QString& name )
281{ 284{
282 devinfo = static_cast<QWidget*>( listView()->parent() ); 285 devinfo = static_cast<QWidget*>( listView()->parent() );
283} 286}
284 287
285Device::Device( Device* parent, const QString& name ) 288Device::Device( Device* parent, const QString& name )
286 :OListViewItem( parent, name ) 289 :OListViewItem( parent, name )
287{ 290{
288 devinfo = static_cast<QWidget*>( listView()->parent() ); 291 devinfo = static_cast<QWidget*>( listView()->parent() );
289} 292}
290 293
291Device::~Device() 294Device::~Device()
292{ 295{
293} 296}
294 297
295 298
296QWidget* Device::detailsWidget() 299QWidget* Device::detailsWidget()
297{ 300{
298 return details; 301 return details;
299} 302}
300 303
301//================================================================================================= 304//=================================================================================================
302CpuDevice::CpuDevice( Category* parent, const QString& name ) 305CpuDevice::CpuDevice( Category* parent, const QString& name )
303 :Device( parent, name ) 306 :Device( parent, name )
304{ 307{
305 OListView* w = new OListView( devinfo ); 308 OListView* w = new OListView( devinfo );
306 details = w; 309 details = w;
307 w->addColumn( "Info" ); 310 w->addColumn( "Info" );
308 w->addColumn( "Value" ); 311 w->addColumn( "Value" );
309 w->hide(); 312 w->hide();
310} 313}
311 314
312CpuDevice::~CpuDevice() 315CpuDevice::~CpuDevice()
313{ 316{
314} 317}
315 318
316void CpuDevice::addInfo( const QString& info ) 319void CpuDevice::addInfo( const QString& info )
317{ 320{
318 int dp = info.find( ':' ); 321 int dp = info.find( ':' );
319 if ( dp != -1 ) 322 if ( dp != -1 )
320 { 323 {
321 new OListViewItem( (OListView*) details, info.left( dp ), info.right( info.length()-dp ) ); 324 new OListViewItem( (OListView*) details, info.left( dp ), info.right( info.length()-dp ) );
322 } 325 }
323} 326}
324 327
325//================================================================================================= 328//=================================================================================================
326CardDevice::CardDevice( Category* parent, const QString& name ) 329CardDevice::CardDevice( Category* parent, const QString& name )
327 :Device( parent, name ) 330 :Device( parent, name )
328{ 331{
329 details = new QPushButton( name, devinfo ); 332 OListView* w = new OListView( devinfo );
330 details->hide(); 333 details = w;
334 w->addColumn( "Info" );
335 w->addColumn( "Value" );
336 w->hide();
337}
338
339void CardDevice::setInfo( const OPcmciaSocket* card )
340{
341 QStringList vendorlst = card->productIdentityVector();
342 for( QStringList::Iterator it = vendorlst.begin(); it != vendorlst.end(); ++it )
343 {
344 new OListViewItem( (OListView*) details, "VendorID", *it );
345 }
346 new OListViewItem( (OListView*) details, "Manufacturer", card->manufacturerIdentity() );
347 new OListViewItem( (OListView*) details, "Function", card->function() );
348
349 QStringList text;
350 OPcmciaSocket::OPcmciaSocketCardStatus status = card->status();
351 if ( status )
352 {
353 if ( status & OPcmciaSocket::Occupied ) text += "Occupied";
354 if ( status & OPcmciaSocket::OccupiedCardBus ) text += "CardBus";
355 if ( status & OPcmciaSocket::WriteProtected ) text += "WriteProtected";
356 if ( status & OPcmciaSocket::BatteryLow ) text += "BatteryLow";
357 if ( status & OPcmciaSocket::BatteryDead ) text += "BatteryDead";
358 if ( status & OPcmciaSocket::Ready ) text += "Ready";
359 if ( status & OPcmciaSocket::Suspended ) text += "Suspended";
360 if ( status & OPcmciaSocket::Attention ) text += "Attention";
361 if ( status & OPcmciaSocket::InsertionInProgress ) text += "InsertionInProgress";
362 if ( status & OPcmciaSocket::RemovalInProgress ) text += "RemovalInProgress";
363 if ( status & OPcmciaSocket::ThreeVolts ) text += "3V";
364 if ( status & OPcmciaSocket::SupportsVoltage ) text += "SupportsVoltage";
365 }
366 else
367 {
368 text += "<unknown>";
369 }
370 new OListViewItem( (OListView*) details, "Status", text.join( ", " ) );
331} 371}
332 372
333CardDevice::~CardDevice() 373CardDevice::~CardDevice()
334{ 374{
335} 375}
336 376
337//================================================================================================= 377//=================================================================================================
338InputDevice::InputDevice( Category* parent, const QString& name ) 378InputDevice::InputDevice( Category* parent, const QString& name )
339 :Device( parent, name ) 379 :Device( parent, name )
340{ 380{
341 details = new QPushButton( name, devinfo ); 381 OListView* w = new OListView( devinfo );
342 details->hide(); 382 details = w;
383 w->addColumn( "Info" );
384 w->addColumn( "Value" );
385 w->hide();
386}
387
388void InputDevice::setInfo( const OInputDevice* dev )
389{
390 new OListViewItem( (OListView*) details, "Identity", dev->identity() );
391 new OListViewItem( (OListView*) details, "Path", dev->path() );
392 new OListViewItem( (OListView*) details, "Unique", dev->uniq() );
393
394 QStringList text;
395 if ( dev->hasFeature( OInputDevice::Synchronous ) ) text += "Synchronous";
396 if ( dev->hasFeature( OInputDevice::Keys ) ) text += "Keys";
397 if ( dev->hasFeature( OInputDevice::Relative ) ) text += "Relative";
398 if ( dev->hasFeature( OInputDevice::Absolute ) ) text += "Absolute";
399 if ( dev->hasFeature( OInputDevice::Miscellaneous ) ) text += "Miscellaneous";
400 if ( dev->hasFeature( OInputDevice::Leds ) ) text += "Leds";
401 if ( dev->hasFeature( OInputDevice::Sound ) ) text += "Sound";
402 if ( dev->hasFeature( OInputDevice::AutoRepeat ) ) text += "AutoRepeat";
403 if ( dev->hasFeature( OInputDevice::ForceFeedback ) ) text += "ForceFeedback";
404 if ( dev->hasFeature( OInputDevice::PowerManagement ) ) text += "PowerManagement";
405 if ( dev->hasFeature( OInputDevice::ForceFeedbackStatus ) ) text += "ForceFeedbackStatus";
406 new OListViewItem( (OListView*) details, "Features", text.join( ", " ) );
407
343} 408}
344 409
345InputDevice::~InputDevice() 410InputDevice::~InputDevice()
346{ 411{
347} 412}
348 413
349//================================================================================================= 414//=================================================================================================
350UsbDevice::UsbDevice( Category* parent, const QString& name ) 415UsbDevice::UsbDevice( Category* parent, const QString& name )
351 :Device( parent, name ) 416 :Device( parent, name )
352{ 417{
353 details = new QPushButton( name, devinfo ); 418 details = new QPushButton( name, devinfo );
354 details->hide(); 419 details->hide();
355} 420}
356 421
357//================================================================================================= 422//=================================================================================================
358UsbDevice::UsbDevice( UsbDevice* parent, const QString& name ) 423UsbDevice::UsbDevice( UsbDevice* parent, const QString& name )
359 :Device( parent, name ) 424 :Device( parent, name )
360{ 425{
361 details = new QPushButton( name, devinfo ); 426 details = new QPushButton( name, devinfo );
362 details->hide(); 427 details->hide();
363} 428}
364 429
365UsbDevice::~UsbDevice() 430UsbDevice::~UsbDevice()
366{ 431{
367} 432}