kpilot/kpilot

kpilotProbeDialog.h

00001 #ifndef _KPILOT_PROBEDIALOG_H
00002 #define _KPILOT_PROBEDIALOG_H
00003 /* kpilotConfigWizard.h                 KPilot
00004 **
00005 ** Copyright (C) 2004 Reinhold Kainhofer <reinhold@kainhofer.com>
00006 **
00007 ** This file defines kpilot's configuration wizard
00008 */
00009 
00010 /*
00011 ** This program is free software; you can redistribute it and/or modify
00012 ** it under the terms of the GNU General Public License as published by
00013 ** the Free Software Foundation; either version 2 of the License, or
00014 ** (at your option) any later version.
00015 **
00016 ** This program is distributed in the hope that it will be useful,
00017 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00018 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00019 ** GNU General Public License for more details.
00020 **
00021 ** You should have received a copy of the GNU General Public License
00022 ** along with this program in a file called COPYING; if not, write to
00023 ** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
00024 ** MA 02110-1301, USA.
00025 */
00026 
00027 /*
00028 ** Bug reports and questions can be sent to kde-pim@kde.org
00029 */
00030 
00031 #include "kdialogbase.h"
00032 
00033 class KPilotDeviceLink;
00034 class QLabel;
00035 class QGroupBox;
00036 class KProgress;
00037 class QTimer;
00038 class QGridLayout;
00039 template <class T> class QValueList;
00040 template<class Key, class T> class QMap;
00041 
00042 typedef QValueList<KPilotDeviceLink*> PilotLinkList;
00043 
00044 typedef QMap<QString, KPilotDeviceLink*> PilotLinkMap;
00045 
00046 class ProbeDialog : public KDialogBase
00047 {
00048 Q_OBJECT
00049 public:
00050     ProbeDialog(QWidget *p=0L,const char *n=0L);
00051     ~ProbeDialog();
00052     
00053     bool detected() const { return mDetected; }
00054     QString userName() const { return mUserName; }
00055     QString device() const { return mDevice; }
00056     int userID() const { return mUID; }
00057     QStringList dbs()  const { return mDBs; }
00058     
00059 
00060 protected slots:
00061     void startDetection();
00062     void timeout();
00063     void connection(KPilotDeviceLink*lnk);
00064     void retrieveDBList();
00065     void disconnectDevices();
00066     void processEvents();
00067     void progress();
00068     void detect();
00069     void detect(int i);
00070 public slots:
00071     int exec();
00072     void slotUser1 () { startDetection(); }
00073 protected:
00074     QLabel* fInfoText;
00075     QGroupBox* fResultsGroup;
00076     QLabel* fUserLabel;
00077     QLabel* fDeviceLabel;
00078     QLabel* fUser;
00079     QLabel* fDevice;
00080     QGroupBox* fStatusGroup;
00081     QLabel* fStatus;
00082     KProgress* fProgress;
00083 
00084     QTimer* fProcessEventsTimer;
00085     QTimer* fTimeoutTimer;
00086     QTimer* fProgressTimer;
00087     QTimer* fRotateLinksTimer;
00088 protected:
00089     QGridLayout* fResultsGroupLayout;
00090     QGridLayout* fStatusGroupLayout;
00091     
00092     QStringList mDevicesToProbe[3];
00093     PilotLinkList mDeviceLinks[3];
00094     int mProbeDevicesIndex;
00095 //  PilotLinkMap mDeviceLinkMap;
00096     KPilotDeviceLink *mActiveLink;
00097     
00098     bool mDetected;
00099     QString mUserName;
00100     QString mDevice;
00101     int mUID;
00102     QStringList mDBs;
00103 } ;
00104 
00105 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys