// // Copyright 2008 Jim Bublitz // Earlier copyrights 1998 - 2007 Jim Bublitz also apply // Generated by twine // This file is part of PyKDE4. // PyKDE4 is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as // published by the Free Software Foundation; either version 2.1 of // the License, or (at your option) any later version. // PyKDE4 is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program. If not, see . %ModuleHeaderCode //ctscc #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include %End namespace Solid { class DeviceInterface : QObject { %TypeHeaderCode #include %End public: enum Type { Unknown, GenericInterface, Processor, Block, StorageAccess, StorageDrive, OpticalDrive, StorageVolume, OpticalDisc, Camera, PortableMediaPlayer, NetworkInterface, AcAdapter, Battery, Button, AudioInterface, DvbInterface, Video, SerialInterface, SmartCardReader, InternetGateway, NetworkShare, Last }; bool isValid () const; static QString typeToString (Solid::DeviceInterface::Type type); static Solid::DeviceInterface::Type stringToType (const QString& type); protected: //ig DeviceInterface (DeviceInterfacePrivate& dd, QObject* backendObject); private: //force DeviceInterface (); // Subclasses of QObject //end %ConvertToSubClassCode // CTSCC for subclasses of 'QObject' sipType = NULL; if (dynamic_cast(sipCpp)) { sipType = sipType_Solid_DeviceInterface; if (dynamic_cast(sipCpp)) sipType = sipType_Solid_AcAdapter; else if (dynamic_cast(sipCpp)) sipType = sipType_Solid_AudioInterface; else if (dynamic_cast(sipCpp)) sipType = sipType_Solid_Battery; else if (dynamic_cast(sipCpp)) sipType = sipType_Solid_Block; else if (dynamic_cast(sipCpp)) sipType = sipType_Solid_Button; else if (dynamic_cast(sipCpp)) sipType = sipType_Solid_Camera; else if (dynamic_cast(sipCpp)) sipType = sipType_Solid_DvbInterface; else if (dynamic_cast(sipCpp)) sipType = sipType_Solid_GenericInterface; else if (dynamic_cast(sipCpp)) sipType = sipType_Solid_InternetGateway; else if (dynamic_cast(sipCpp)) sipType = sipType_Solid_NetworkInterface; else if (dynamic_cast(sipCpp)) sipType = sipType_Solid_NetworkShare; else if (dynamic_cast(sipCpp)) sipType = sipType_Solid_PortableMediaPlayer; else if (dynamic_cast(sipCpp)) sipType = sipType_Solid_Processor; else if (dynamic_cast(sipCpp)) sipType = sipType_Solid_SerialInterface; else if (dynamic_cast(sipCpp)) sipType = sipType_Solid_SmartCardReader; else if (dynamic_cast(sipCpp)) sipType = sipType_Solid_StorageAccess; else if (dynamic_cast(sipCpp)) { sipType = sipType_Solid_StorageDrive; if (dynamic_cast(sipCpp)) sipType = sipType_Solid_OpticalDrive; } else if (dynamic_cast(sipCpp)) { sipType = sipType_Solid_StorageVolume; if (dynamic_cast(sipCpp)) sipType = sipType_Solid_OpticalDisc; } else if (dynamic_cast(sipCpp)) sipType = sipType_Solid_Video; } else if (dynamic_cast(sipCpp)) sipType = sipType_Solid_DeviceNotifier; else if (dynamic_cast(sipCpp)) sipType = sipType_Solid_Networking_Notifier; %End public: ~DeviceInterface (); static QString typeDescription (Solid::DeviceInterface::Type type); }; // DeviceInterface }; // Solid