summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (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
@@ -32,4 +32,5 @@ _;:,     .>    :=|. This program is free software; you can
#include <opie2/odebug.h>
#include <opie2/oinputsystem.h>
+#include <opie2/olayout.h>
#include <opie2/olistview.h>
#include <qpe/qpeapplication.h>
@@ -38,7 +39,7 @@ using namespace Opie::Ui;
/* QT */
+#include <qlistview.h>
#include <qcombobox.h>
#include <qfile.h>
-#include <qlayout.h>
#include <qpushbutton.h>
#include <qtextstream.h>
@@ -49,5 +50,5 @@ using namespace Opie::Ui;
//=================================================================================================
DevicesView::DevicesView( QWidget* parent, const char* name, WFlags fl )
- :OListView( parent, name, fl )
+ :Opie::Ui::OListView( parent, name, fl )
{
addColumn( tr( "My Computer" ) );
@@ -61,4 +62,6 @@ DevicesView::DevicesView( QWidget* parent, const char* name, WFlags fl )
( new CardsCategory( root ) )->populate();
( new UsbCategory( root ) )->populate();
+
+ connect( this, SIGNAL(selectionChanged(QListViewItem*)), this, SLOT(selectionChanged(QListViewItem*)) );
}
@@ -67,9 +70,16 @@ DevicesView::~DevicesView()
}
+
+void DevicesView::selectionChanged( QListViewItem* item )
+{
+ odebug << "DevicesView::selectionChanged to '" << item->text( 0 ) << "'" << oendl;
+}
+
+
//=================================================================================================
DevicesInfo::DevicesInfo( QWidget* parent, const char* name, WFlags fl )
:QWidget( parent, name, fl )
{
- QVBoxLayout *layout = new QVBoxLayout( this );
+ OAutoBoxLayout *layout = new OAutoBoxLayout( this );
layout->setSpacing( 4 );
layout->setMargin( 4 );
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
@@ -30,10 +30,12 @@ _;:,     .>    :=|. This program is free software; you can
#define DEVICESINFO_H
-#include <qwidget.h>
+/* OPIE */
#include <opie2/olistview.h>
-using namespace Opie::Ui;
+
+/* QT */
+#include <qwidget.h>
//=================================================================================================
-class DevicesView : public OListView
+class DevicesView : public Opie::Ui::OListView
{
Q_OBJECT
@@ -41,4 +43,6 @@ public:
DevicesView( QWidget* parent = 0, const char* name = 0, WFlags f = 0 );
~DevicesView();
+public slots:
+ void selectionChanged( QListViewItem* item );
};
@@ -52,5 +56,5 @@ public:
private:
- OListView* view;
+ Opie::Ui::OListView* view;
private slots:
@@ -58,5 +62,5 @@ private slots:
//=================================================================================================
-class Category : public OListViewItem
+class Category : public Opie::Ui::OListViewItem
{
public:
@@ -68,5 +72,5 @@ public:
//=================================================================================================
-class Device : public OListViewItem
+class Device : public Opie::Ui::OListViewItem
{
public: