summaryrefslogtreecommitdiff
path: root/noncore/settings
authormickeyl <mickeyl>2005-05-03 22:32:11 (UTC)
committer mickeyl <mickeyl>2005-05-03 22:32:11 (UTC)
commit1f412e211a7d5759d2ca51aa4e14c6292984f124 (patch) (unidiff)
tree6a6634d76f633cd5e8f3c6fcdf82f0604cdbad64 /noncore/settings
parent1daea169fcc0007727f0752251ca4546817999b7 (diff)
downloadopie-1f412e211a7d5759d2ca51aa4e14c6292984f124.zip
opie-1f412e211a7d5759d2ca51aa4e14c6292984f124.tar.gz
opie-1f412e211a7d5759d2ca51aa4e14c6292984f124.tar.bz2
use OAutoBoxLayout for devices info
Diffstat (limited to 'noncore/settings') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sysinfo/devicesinfo.cpp16
-rw-r--r--noncore/settings/sysinfo/devicesinfo.h16
2 files changed, 23 insertions, 9 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
@@ -31,15 +31,16 @@ _;:,     .>    :=|. This program is free software; you can
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>
36using namespace Opie::Core; 37using namespace Opie::Core;
37using namespace Opie::Ui; 38using 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>
@@ -48,7 +49,7 @@ using namespace Opie::Ui;
48 49
49//================================================================================================= 50//=================================================================================================
50DevicesView::DevicesView( QWidget* parent, const char* name, WFlags fl ) 51DevicesView::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 );
@@ -60,17 +61,26 @@ DevicesView::DevicesView( QWidget* parent, const char* name, WFlags fl )
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
65DevicesView::~DevicesView() 68DevicesView::~DevicesView()
66{ 69{
67} 70}
68 71
72
73void DevicesView::selectionChanged( QListViewItem* item )
74{
75 odebug << "DevicesView::selectionChanged to '" << item->text( 0 ) << "'" << oendl;
76}
77
78
69//================================================================================================= 79//=================================================================================================
70DevicesInfo::DevicesInfo( QWidget* parent, const char* name, WFlags fl ) 80DevicesInfo::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 );
diff --git a/noncore/settings/sysinfo/devicesinfo.h b/noncore/settings/sysinfo/devicesinfo.h
index 60ec999..262af31 100644
--- a/noncore/settings/sysinfo/devicesinfo.h
+++ b/noncore/settings/sysinfo/devicesinfo.h
@@ -29,17 +29,21 @@ _;:,     .>    :=|. This program is free software; you can
29#ifndef DEVICESINFO_H 29#ifndef DEVICESINFO_H
30#define DEVICESINFO_H 30#define DEVICESINFO_H
31 31
32#include <qwidget.h> 32/* OPIE */
33#include <opie2/olistview.h> 33#include <opie2/olistview.h>
34using namespace Opie::Ui; 34
35/* QT */
36#include <qwidget.h>
35 37
36//================================================================================================= 38//=================================================================================================
37class DevicesView : public OListView 39class DevicesView : public Opie::Ui::OListView
38{ 40{
39 Q_OBJECT 41 Q_OBJECT
40public: 42public:
41 DevicesView( QWidget* parent = 0, const char* name = 0, WFlags f = 0 ); 43 DevicesView( QWidget* parent = 0, const char* name = 0, WFlags f = 0 );
42 ~DevicesView(); 44 ~DevicesView();
45public slots:
46 void selectionChanged( QListViewItem* item );
43}; 47};
44 48
45//================================================================================================= 49//=================================================================================================
@@ -51,13 +55,13 @@ public:
51 ~DevicesInfo(); 55 ~DevicesInfo();
52 56
53private: 57private:
54 OListView* view; 58 Opie::Ui::OListView* view;
55 59
56private slots: 60private slots:
57}; 61};
58 62
59//================================================================================================= 63//=================================================================================================
60class Category : public OListViewItem 64class Category : public Opie::Ui::OListViewItem
61{ 65{
62public: 66public:
63 Category( DevicesView* parent, const QString& name ); 67 Category( DevicesView* parent, const QString& name );
@@ -67,7 +71,7 @@ public:
67}; 71};
68 72
69//================================================================================================= 73//=================================================================================================
70class Device : public OListViewItem 74class Device : public Opie::Ui::OListViewItem
71{ 75{
72public: 76public:
73 Device( Category* parent, const QString& name ); 77 Device( Category* parent, const QString& name );