Diffstat (limited to 'noncore/settings/sysinfo/devicesinfo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/sysinfo/devicesinfo.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/noncore/settings/sysinfo/devicesinfo.cpp b/noncore/settings/sysinfo/devicesinfo.cpp index a1c9e0b..4bce65f 100644 --- a/noncore/settings/sysinfo/devicesinfo.cpp +++ b/noncore/settings/sysinfo/devicesinfo.cpp | |||
@@ -26,56 +26,66 @@ _;:, .> :=|. This program is free software; you can | |||
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 | 30 | ||
31 | /* OPIE */ | 31 | /* OPIE */ |
32 | #include <opie2/odebug.h> | 32 | #include <opie2/odebug.h> |
33 | #include <opie2/oinputsystem.h> | 33 | #include <opie2/oinputsystem.h> |
34 | #include <opie2/olayout.h> | ||
34 | #include <opie2/olistview.h> | 35 | #include <opie2/olistview.h> |
35 | #include <qpe/qpeapplication.h> | 36 | #include <qpe/qpeapplication.h> |
36 | using namespace Opie::Core; | 37 | using namespace Opie::Core; |
37 | using namespace Opie::Ui; | 38 | using namespace Opie::Ui; |
38 | 39 | ||
39 | /* QT */ | 40 | /* QT */ |
41 | #include <qlistview.h> | ||
40 | #include <qcombobox.h> | 42 | #include <qcombobox.h> |
41 | #include <qfile.h> | 43 | #include <qfile.h> |
42 | #include <qlayout.h> | ||
43 | #include <qpushbutton.h> | 44 | #include <qpushbutton.h> |
44 | #include <qtextstream.h> | 45 | #include <qtextstream.h> |
45 | #include <qtextview.h> | 46 | #include <qtextview.h> |
46 | #include <qtimer.h> | 47 | #include <qtimer.h> |
47 | #include <qwhatsthis.h> | 48 | #include <qwhatsthis.h> |
48 | 49 | ||
49 | //================================================================================================= | 50 | //================================================================================================= |
50 | DevicesView::DevicesView( QWidget* parent, const char* name, WFlags fl ) | 51 | DevicesView::DevicesView( QWidget* parent, const char* name, WFlags fl ) |
51 | :OListView( parent, name, fl ) | 52 | :Opie::Ui::OListView( parent, name, fl ) |
52 | { | 53 | { |
53 | addColumn( tr( "My Computer" ) ); | 54 | addColumn( tr( "My Computer" ) ); |
54 | setAllColumnsShowFocus( true ); | 55 | setAllColumnsShowFocus( true ); |
55 | setRootIsDecorated( true ); | 56 | setRootIsDecorated( true ); |
56 | QWhatsThis::add( this, tr( "This is a list of all the devices currently recognized on this device." ) ); | 57 | QWhatsThis::add( this, tr( "This is a list of all the devices currently recognized on this device." ) ); |
57 | 58 | ||
58 | DevicesView* root = this; | 59 | DevicesView* root = this; |
59 | ( new CpuCategory( root ) )->populate(); | 60 | ( new CpuCategory( root ) )->populate(); |
60 | ( new InputCategory( root ) )->populate(); | 61 | ( new InputCategory( root ) )->populate(); |
61 | ( new CardsCategory( root ) )->populate(); | 62 | ( new CardsCategory( root ) )->populate(); |
62 | ( new UsbCategory( root ) )->populate(); | 63 | ( new UsbCategory( root ) )->populate(); |
64 | |||
65 | connect( this, SIGNAL(selectionChanged(QListViewItem*)), this, SLOT(selectionChanged(QListViewItem*)) ); | ||
63 | } | 66 | } |
64 | 67 | ||
65 | DevicesView::~DevicesView() | 68 | DevicesView::~DevicesView() |
66 | { | 69 | { |
67 | } | 70 | } |
68 | 71 | ||
72 | |||
73 | void DevicesView::selectionChanged( QListViewItem* item ) | ||
74 | { | ||
75 | odebug << "DevicesView::selectionChanged to '" << item->text( 0 ) << "'" << oendl; | ||
76 | } | ||
77 | |||
78 | |||
69 | //================================================================================================= | 79 | //================================================================================================= |
70 | DevicesInfo::DevicesInfo( QWidget* parent, const char* name, WFlags fl ) | 80 | DevicesInfo::DevicesInfo( QWidget* parent, const char* name, WFlags fl ) |
71 | :QWidget( parent, name, fl ) | 81 | :QWidget( parent, name, fl ) |
72 | { | 82 | { |
73 | QVBoxLayout *layout = new QVBoxLayout( this ); | 83 | OAutoBoxLayout *layout = new OAutoBoxLayout( this ); |
74 | layout->setSpacing( 4 ); | 84 | layout->setSpacing( 4 ); |
75 | layout->setMargin( 4 ); | 85 | layout->setMargin( 4 ); |
76 | view = new DevicesView( this ); | 86 | view = new DevicesView( this ); |
77 | layout->addWidget( view ); | 87 | layout->addWidget( view ); |
78 | } | 88 | } |
79 | 89 | ||
80 | DevicesInfo::~DevicesInfo() | 90 | DevicesInfo::~DevicesInfo() |
81 | { | 91 | { |