00001 /* 00002 This file is part of the Opie Project 00003 =. (C) 2005 Michael 'Mickey' Lauer <mickey@Vanille.de> 00004 .=l. 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 Library General Public 00009 .="- .-=="i, .._ License as published by the Free Software 00010 - . .-<_> .<> Foundation; either version 2 of the License, 00011 ._= =} : or (at your option) any later version. 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 ..}^=.= = ; Library General Public License for more 00019 ++= -. .` .: details. 00020 : = ...= . :.=- 00021 -. .:....=;==+<; You should have received a copy of the GNU 00022 -_. . . )=. = Library General Public License along with 00023 -- :-=` this library; see the file COPYING.LIB. 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 00030 #ifndef PCMCIA_H 00031 #define PCMCIA_H 00032 00033 #include <qwidget.h> 00034 #include <qpixmap.h> 00035 #include <qpopupmenu.h> 00036 00037 namespace Opie { namespace Core { class OPcmciaSocket; } }; 00038 00039 class PcmciaManager : public QWidget 00040 { 00041 Q_OBJECT 00042 public: 00043 PcmciaManager( QWidget *parent = 0 ); 00044 ~PcmciaManager(); 00045 static int position(); 00046 00047 private slots: 00048 void handleSystemChannel( const QCString&, const QByteArray& ); 00049 void cardMessage( const QCString&, const QByteArray& ); 00050 void userCardAction( int action ); 00051 void popupTimeout(); 00052 00053 protected: 00054 void paintEvent( QPaintEvent* ); 00055 void mousePressEvent( QMouseEvent * ); 00056 00057 private: 00058 void configure( Opie::Core::OPcmciaSocket* ); 00059 void execCommand( const QStringList &command ); 00060 void executeAction( Opie::Core::OPcmciaSocket*, const QString& ); 00061 void popUp( QString message, QString icon = QString::null ); 00062 00063 private: 00064 bool configuring; 00065 int commandOrig; 00066 QPixmap pm; 00067 QPopupMenu *popupMenu; 00068 00069 }; 00070 00071 #endif 00072
1.4.2