diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-13 00:46:47 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-13 00:46:47 +0000 |
commit | 67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch) | |
tree | 5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /kmobile/kmobiledevice.h | |
parent | 2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff) | |
download | tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.tar.gz tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.zip |
Initial conversion of kdepim to TQt
This will probably require some tweaking before it will build under Qt4,
however Qt3 builds are OK. Any alterations this commit makes to kdepim
behaviour under Qt3 are unintentional and should be fixed.
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmobile/kmobiledevice.h')
-rw-r--r-- | kmobile/kmobiledevice.h | 85 |
1 files changed, 43 insertions, 42 deletions
diff --git a/kmobile/kmobiledevice.h b/kmobile/kmobiledevice.h index 04bd10d2c..16e12aad5 100644 --- a/kmobile/kmobiledevice.h +++ b/kmobile/kmobiledevice.h @@ -37,24 +37,24 @@ class KConfig; -#define KMOBILE_MIMETYPE_DEVICE "kdedevice/mobiledevice" -#define KMOBILE_MIMETYPE_DEVICE_KONQUEROR(name) TQString("kdedevice/kmobile_%1").arg(name) +#define KMOBILE_MIMETYPE_DEVICE "kdetqdevice/mobiletqdevice" +#define KMOBILE_MIMETYPE_DEVICE_KONTQUEROR(name) TQString("kdetqdevice/kmobile_%1").arg(name) #define KMOBILE_MIMETYPE_INODE "inode/" #define KMOBILE_ICON_UNKNOWN "mobile_unknown" /** - * @short Represents the base class for dynamically loaded mobile device drivers. + * @short Represents the base class for dynamically loaded mobile tqdevice drivers. * - * KMobileDevice is the base class for all hardware device drivers. + * KMobileDevice is the base class for all hardware tqdevice drivers. * Every derived class has to add additional functionality. * * For a KMobileSomeDevice driver you have to write the following code: * <pre> - * K_EXPORT_COMPONENT_FACTORY( libkmobile_somedevice, KMobileSomeDevice() ); - * TQObject *KMobileSomeDevice::createObject( TQObject *parent, const char *name, + * K_EXPORT_COMPONENT_FACTORY( libkmobile_sometqdevice, KMobileSomeDevice() ); + * TQObject *KMobileSomeDevice::createObject( TQObject *tqparent, const char *name, * const char *, const TQStringList &args ) * { - * return new KMobileSomeDevice( parent, name, args ); + * return new KMobileSomeDevice( tqparent, name, args ); * } * </pre> * @@ -65,13 +65,14 @@ class KConfig; class KDE_EXPORT KMobileDevice : public KLibFactory { Q_OBJECT + TQ_OBJECT friend class KMobileView; public: /** * Construct a new KMobileDevice. * - * @param obj The parent object. This is usually 0. + * @param obj The tqparent object. This is usually 0. * @param name The object name. For session management and window management to work. * @param args Additional commandline parameters - the first entry has the config file name. */ @@ -82,46 +83,46 @@ public: /** * Connect to the device. * - * @param parent The parent widget. It will be used as parent for message boxes. + * @param tqparent The tqparent widget. It will be used as tqparent for message boxes. */ - virtual bool connectDevice( TQWidget *parent = 0 ) = 0; + virtual bool connectDevice( TQWidget *tqparent = 0 ) = 0; /** * Disconnect from the device. * - * @param parent The parent widget. It will be used as parent for message boxes. + * @param tqparent The tqparent widget. It will be used as tqparent for message boxes. */ - virtual bool disconnectDevice( TQWidget *parent = 0 ) = 0; + virtual bool disconnectDevice( TQWidget *tqparent = 0 ) = 0; /** - * Returns true, if the device is currently connected and the link is online. + * Returns true, if the tqdevice is currently connected and the link is online. */ virtual bool connected(); /** - * Returns the classname, to which the device belongs. Examples are e.g. + * Returns the classname, to which the tqdevice belongs. Examples are e.g. * "Nokia mobile phone", "MP3 Player", "Handspring Organizer" */ - virtual TQString deviceClassName() const; + virtual TQString tqdeviceClassName() const; /** - * Returns the real devices name, e.g. "Nokia 6310" or "Rio MP3 Player" + * Returns the real tqdevices name, e.g. "Nokia 6310" or "Rio MP3 Player" */ - virtual TQString deviceName() const; + virtual TQString tqdeviceName() const; /** - * Returns the hardware revision of the devices, e.g. "Revision 1.2" + * Returns the hardware revision of the tqdevices, e.g. "Revision 1.2" */ virtual TQString revision() const; /** - * Returns an unique ID for the device, e.g. IMEI number on phones, or serial number. + * Returns an unique ID for the tqdevice, e.g. IMEI number on phones, or serial number. * The returned String is used to have a unique identification for syncronisation. */ - virtual TQString deviceUniqueID() = 0; + virtual TQString tqdeviceUniqueID() = 0; /** - * Returns true, if the device is connected via a slow connection. + * Returns true, if the tqdevice is connected via a slow connection. * Good examples for slow connections are serial or infrared ports. */ virtual bool isSlowDevice() const; @@ -132,11 +133,11 @@ public: virtual bool isReadOnly() const; /** - * Pop-up a device-specific configuration dialog. + * Pop-up a tqdevice-specific configuration dialog. * - * @param parent The parent widget. It will be used as parent for the configuration dialog. + * @param tqparent The tqparent widget. It will be used as tqparent for the configuration dialog. */ - virtual bool configDialog(TQWidget *parent); + virtual bool configDialog(TQWidget *tqparent); // The ClassType may be used e.g. to select an suitable icon enum ClassType { @@ -157,14 +158,14 @@ public: static TQString defaultIconFileName( ClassType ct = Unclassified ); static TQString defaultClassName( ClassType ct = Unclassified ); - // The capabilities of this device (bitmapped value) + // The capabilities of this tqdevice (bitmapped value) enum Capabilities { hasNothing = 0, // not supported hasAddressBook = 1, // mobile phones, organizers, ... hasCalendar = 2, // organizers, mobile phones, ... hasNotes = 4, // organizers, mobile phones, ... hasFileStorage = 8, // organizers, handhelds, mp3-player, ... - hasAnyCapability = 0xffff // used to select devices independent of the capatibilities + hasAnyCapability = 0xffff // used to select tqdevices independent of the capatibilities }; int capabilities() const; const TQString nameForCap(int cap) const; @@ -205,7 +206,7 @@ public: */ /** - * helper functions for the kmobile device drivers + * helper functions for the kmobile tqdevice drivers */ void createDirEntry(KIO::UDSEntry& entry, const TQString& name, const TQString& url, const TQString& mime) const; @@ -316,7 +317,7 @@ public: signals: /** * Call this from stat() to express details about an object, the - * UDSEntry customarily tqcontains the atoms describing file name, size, + * UDSEntry customarily contains the atoms describing file name, size, * mimetype, etc. * @param _entry The UDSEntry containing all of the object attributes. */ @@ -447,9 +448,9 @@ signals: * @return a button code, as defined in KMessageBox, or 0 on communication error. */ int messageBox( MessageBoxType type, const TQString &text, - const TQString &caption = TQString::null, - const TQString &buttonYes = TQString::null, - const TQString &buttonNo = TQString::null ); + const TQString &caption = TQString(), + const TQString &buttonYes = TQString(), + const TQString &buttonNo = TQString() ); /** * Call this in @ref #get and @ref #copy, to give the total size @@ -469,7 +470,7 @@ signals: void connectionChanged( bool conn_established ); protected: - // only available to sub-classed device drivers: + // only available to sub-classed tqdevice drivers: void setClassType( enum ClassType ct ); void setCapabilities( int caps ); KConfig *config() const { return m_config; }; @@ -477,21 +478,21 @@ protected: /** - * Lock/Unlock serial ports and other devices - * @param device Name of a device port (e.g. /dev/ttyS1, ttyS1, /dev/ircomm0) - * Returns true, if device could be locked or unlocked + * Lock/Unlock serial ports and other tqdevices + * @param tqdevice Name of a tqdevice port (e.g. /dev/ttyS1, ttyS1, /dev/ircomm0) + * Returns true, if tqdevice could be locked or unlocked */ - bool lockDevice(const TQString &device, TQString &err_reason); - bool unlockDevice(const TQString &device); + bool lockDevice(const TQString &tqdevice, TQString &err_reason); + bool unlockDevice(const TQString &tqdevice); protected: - TQMutex m_mutex; // mutex to syncronize DCOP accesses to this device + TQMutex m_mutex; // mutex to syncronize DCOP accesses to this tqdevice TQString m_configFileName; - KConfig *m_config; // this is where this device should store it's configuration + KConfig *m_config; // this is where this tqdevice should store it's configuration enum ClassType m_classType; - TQString m_deviceClassName; // e.g. "Nokia mobile phone", "MP3 Player", "Handspring Organizer" - TQString m_deviceName; // e.g. "Nokia 6310", "Opie" - TQString m_deviceRevision; // e.g. "Revision 1.2" or "n/a" + TQString m_tqdeviceClassName; // e.g. "Nokia mobile phone", "MP3 Player", "Handspring Organizer" + TQString m_tqdeviceName; // e.g. "Nokia 6310", "Opie" + TQString m_tqdeviceRevision; // e.g. "Revision 1.2" or "n/a" TQString m_connectionName; // e.g. "IRDA", "USB", "Cable", "gnokii", "gammu", ... int m_caps; // see enum Capabilities bool m_connected; |