Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

devicesinfo.h

Go to the documentation of this file.
00001 /*
00002                             This file is part of the Opie Project
00003              =.             Copyright (C) 2005 Michael 'Mickey' Lauer <mickey@Vanille.de>
00004            .=l.             Copyright (C) The Opie Team <opie-devel@handhelds.org>
00005           .>+-=
00006 _;:,     .>    :=|.         This program is free software; you can
00007 .> <`_,   >  .   <=         redistribute it and/or  modify it under
00008 :`=1 )Y*s>-.--   :          the terms of the GNU General Public
00009 .="- .-=="i,     .._        License as published by the Free Software
00010 - .   .-<_>     .<>         Foundation; version 2 of the License.
00011     ._= =}       :
00012    .%`+i>       _;_.
00013    .i_,=:_.      -<s.       This program is distributed in the hope that
00014     +  .  -:.       =       it will be useful,  but WITHOUT ANY WARRANTY;
00015    : ..    .:,     . . .    without even the implied warranty of
00016    =_        +     =;=|`    MERCHANTABILITY or FITNESS FOR A
00017  _.=:.       :    :=>`:     PARTICULAR PURPOSE. See the GNU
00018 ..}^=.=       =       ;     General Public License for more
00019 ++=   -.     .`     .:      details.
00020 :     =  ...= . :.=-
00021 -.   .:....=;==+<;          You should have received a copy of the GNU
00022  -_. . .   )=.  =           General Public License along with
00023    --        :-=`           this application; see the file LICENSE.GPL.
00024                             If not, write to the Free Software Foundation,
00025                             Inc., 59 Temple Place - Suite 330,
00026                             Boston, MA 02111-1307, USA.
00027 */
00028 
00029 #ifndef DEVICESINFO_H
00030 #define DEVICESINFO_H
00031 
00032 /* OPIE */
00033 #include <opie2/olistview.h>
00034 #include <opie2/olayout.h>
00035 
00036 /* QT */
00037 #include <qwidget.h>
00038 #include <qwidgetstack.h>
00039 
00040 namespace Opie { namespace Core { class OPcmciaSocket; class OInputDevice; }; };
00041 
00042 //=================================================================================================
00043 class DevicesView : public Opie::Ui::OListView
00044 {
00045     Q_OBJECT
00046 public:
00047     DevicesView( QWidget* parent = 0, const char* name = 0, WFlags f = 0 );
00048     ~DevicesView();
00049 public slots:
00050     void selectionChanged( QListViewItem* item );
00051 };
00052 
00053 //=================================================================================================
00054 class DevicesInfo : public QWidget
00055 {
00056     Q_OBJECT
00057 public:
00058     DevicesInfo( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
00059     ~DevicesInfo();
00060 
00061     void setDetailsWidget( QWidget* w = 0 );
00062 
00063 private:
00064     Opie::Ui::OAutoBoxLayout* layout;
00065     Opie::Ui::OListView* view;
00066     QWidget* details;
00067     QWidgetStack* stack;
00068 private slots:
00069 };
00070 
00071 //=================================================================================================
00072 class Category : public Opie::Ui::OListViewItem
00073 {
00074 public:
00075     Category( DevicesView* parent, const QString& name );
00076     virtual ~Category();
00077 
00078     virtual void populate() = 0;
00079 };
00080 
00081 //=================================================================================================
00082 class CpuCategory : public Category
00083 {
00084 public:
00085     CpuCategory( DevicesView* parent );
00086     virtual ~CpuCategory();
00087 
00088     virtual void populate();
00089 };
00090 
00091 //=================================================================================================
00092 class InputCategory : public Category
00093 {
00094 public:
00095     InputCategory( DevicesView* parent );
00096     virtual ~InputCategory();
00097 
00098     virtual void populate();
00099 };
00100 
00101 //=================================================================================================
00102 class CardsCategory : public Category
00103 {
00104 public:
00105     CardsCategory( DevicesView* parent );
00106     virtual ~CardsCategory();
00107     virtual void populate();
00108 };
00109 
00110 //=================================================================================================
00111 class UsbCategory : public Category
00112 {
00113 public:
00114     UsbCategory( DevicesView* parent );
00115     virtual ~UsbCategory();
00116 
00117     virtual void populate();
00118 };
00119 
00120 //=================================================================================================
00121 class Device : public Opie::Ui::OListViewItem
00122 {
00123 public:
00124     Device( Category* parent, const QString& name );
00125     Device( Device* parent, const QString& name );
00126     ~Device();
00127 
00128     QWidget* devinfo;
00129     QWidget* details;
00130 
00131     virtual QWidget* detailsWidget();
00132 };
00133 
00134 //=================================================================================================
00135 class CpuDevice : public Device
00136 {
00137 public:
00138     CpuDevice( Category* parent, const QString& name );
00139     ~CpuDevice();
00140 
00141     void addInfo( const QString& line );
00142 
00143 //     virtual QWidget* detailsWidget();
00144 };
00145 
00146 //=================================================================================================
00147 class InputDevice : public Device
00148 {
00149 public:
00150     InputDevice( Category* parent, const QString& name );
00151     ~InputDevice();
00152 
00153     void setInfo( const Opie::Core::OInputDevice* dev );
00154 
00155 //     virtual QWidget* detailsWidget();
00156 };
00157 
00158 //=================================================================================================
00159 class CardDevice : public Device
00160 {
00161 public:
00162     CardDevice( Category* parent, const QString& name );
00163     ~CardDevice();
00164     void setInfo( const Opie::Core::OPcmciaSocket* card );
00165 
00166 //     virtual QWidget* detailsWidget();
00167 };
00168 
00169 //=================================================================================================
00170 class UsbDevice : public Device
00171 {
00172 public:
00173     UsbDevice( Category* parent, const QString& name );
00174     UsbDevice( UsbDevice* parent, const QString& name );
00175     ~UsbDevice();
00176 
00177 //     virtual QWidget* detailsWidget();
00178 };
00179 
00180 #endif

Generated on Sat Nov 5 16:17:58 2005 for OPIE by  doxygen 1.4.2