/*************************************************************************** susehwitem.h - description ------------------- copyright : (C) 2002 SUSE AG email : Oliver.Ries@suse.de ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef SUSEHWITEM_H #define SUSEHWITEM_H #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "susehwpopup.h" typedef struct { bool enableHdd; bool enableCam; bool enableFloppy; bool enableCdrom; bool enableZip; bool enableHotplug; }feat; class HWItem : public QObject { Q_OBJECT public: HWItem(LibHalContext *c, const QString &udi, QObject *par); QString udi() const { return m_udi; } bool newHardwarePopup(); bool evaluateFeatures(); bool added(); void showPopup(); private: void readConfig(); QString getTypeString() { return type_string; } void evaluatePopupCombo(); void popupDialog(); bool configurable(); QString giveRealName(const QString &device); SUSEHWPopup1 *pop1; bool positivedestruction; LibHalContext *m_halContext; QString type_string; QString type; QString model; QString postcommand; QString m_udi; QString checkForMountPoints(const QString &device); bool checkIfValidMountPoint(const QString &mp, const QString &opt); QString command_to_run; /* misc */ QString conf_exec; // what to run for configuration QString exec; // what app to run (e.g yawtv for webcam) QString pixmap; // string which holds iconname signals: void queueDialogforPopup(HWItem *p); void queuedDialogDone(HWItem *p); void deleteItem(HWItem *p); void killMe(QString); void redoItem(QString); void dequeueAll(); public slots: void slotLaunchConfig(); void slotLaunch(); void slotConfigToolDone(); void slotPopupYes(); void slotPopupNo(); void slotPopupDestroyed(); void runCommand(); }; #endif