summaryrefslogtreecommitdiffstats
path: root/kmobile/kmobiledevice.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /kmobile/kmobiledevice.h
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmobile/kmobiledevice.h')
-rw-r--r--kmobile/kmobiledevice.h122
1 files changed, 61 insertions, 61 deletions
diff --git a/kmobile/kmobiledevice.h b/kmobile/kmobiledevice.h
index 5fbcad6d2..8d1e69a0d 100644
--- a/kmobile/kmobiledevice.h
+++ b/kmobile/kmobiledevice.h
@@ -20,9 +20,9 @@
#ifndef LIB_KMOBILEDEVICE_H
#define LIB_KMOBILEDEVICE_H
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qmutex.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqmutex.h>
#include <kdepimmacros.h>
#include <klibloader.h>
@@ -38,7 +38,7 @@
class KConfig;
#define KMOBILE_MIMETYPE_DEVICE "kdedevice/mobiledevice"
-#define KMOBILE_MIMETYPE_DEVICE_KONQUEROR(name) QString("kdedevice/kmobile_%1").arg(name)
+#define KMOBILE_MIMETYPE_DEVICE_KONQUEROR(name) TQString("kdedevice/kmobile_%1").arg(name)
#define KMOBILE_MIMETYPE_INODE "inode/"
#define KMOBILE_ICON_UNKNOWN "mobile_unknown"
@@ -51,8 +51,8 @@ class KConfig;
* For a KMobileSomeDevice driver you have to write the following code:
* <pre>
* K_EXPORT_COMPONENT_FACTORY( libkmobile_somedevice, KMobileSomeDevice() );
- * QObject *KMobileSomeDevice::createObject( QObject *parent, const char *name,
- * const char *, const QStringList &args )
+ * TQObject *KMobileSomeDevice::createObject( TQObject *parent, const char *name,
+ * const char *, const TQStringList &args )
* {
* return new KMobileSomeDevice( parent, name, args );
* }
@@ -75,7 +75,7 @@ public:
* @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.
*/
- KMobileDevice(QObject *obj, const char *name, const QStringList &args );
+ KMobileDevice(TQObject *obj, const char *name, const TQStringList &args );
virtual ~KMobileDevice();
@@ -84,14 +84,14 @@ public:
*
* @param parent The parent widget. It will be used as parent for message boxes.
*/
- virtual bool connectDevice( QWidget *parent = 0 ) = 0;
+ virtual bool connectDevice( TQWidget *parent = 0 ) = 0;
/**
* Disconnect from the device.
*
* @param parent The parent widget. It will be used as parent for message boxes.
*/
- virtual bool disconnectDevice( QWidget *parent = 0 ) = 0;
+ virtual bool disconnectDevice( TQWidget *parent = 0 ) = 0;
/**
* Returns true, if the device is currently connected and the link is online.
@@ -102,23 +102,23 @@ public:
* Returns the classname, to which the device belongs. Examples are e.g.
* "Nokia mobile phone", "MP3 Player", "Handspring Organizer"
*/
- virtual QString deviceClassName() const;
+ virtual TQString deviceClassName() const;
/**
* Returns the real devices name, e.g. "Nokia 6310" or "Rio MP3 Player"
*/
- virtual QString deviceName() const;
+ virtual TQString deviceName() const;
/**
* Returns the hardware revision of the devices, e.g. "Revision 1.2"
*/
- virtual QString revision() const;
+ virtual TQString revision() const;
/**
* Returns an unique ID for the device, e.g. IMEI number on phones, or serial number.
* The returned String is used to have a unique identification for syncronisation.
*/
- virtual QString deviceUniqueID() = 0;
+ virtual TQString deviceUniqueID() = 0;
/**
* Returns true, if the device is connected via a slow connection.
@@ -136,7 +136,7 @@ public:
*
* @param parent The parent widget. It will be used as parent for the configuration dialog.
*/
- virtual bool configDialog(QWidget *parent);
+ virtual bool configDialog(TQWidget *parent);
// The ClassType may be used e.g. to select an suitable icon
enum ClassType {
@@ -151,11 +151,11 @@ public:
// you may provide your own icon() implementation to display
// an appropriate Pixmap (e.g. a Palm Pilot or a Zaurus image).
- virtual QString iconFileName() const;
+ virtual TQString iconFileName() const;
// the default Icon set
- static QString defaultIconFileName( ClassType ct = Unclassified );
- static QString defaultClassName( ClassType ct = Unclassified );
+ static TQString defaultIconFileName( ClassType ct = Unclassified );
+ static TQString defaultClassName( ClassType ct = Unclassified );
// The capabilities of this device (bitmapped value)
enum Capabilities {
@@ -167,11 +167,11 @@ public:
hasAnyCapability = 0xffff // used to select devices independent of the capatibilities
};
int capabilities() const;
- const QString nameForCap(int cap) const;
+ const TQString nameForCap(int cap) const;
// returns an error string for the given error code
// See KIO::buildErrorString()
- QString buildErrorString(KIO::Error err, const QString &errorText) const;
+ TQString buildErrorString(KIO::Error err, const TQString &errorText) const;
public:
/*
@@ -192,8 +192,8 @@ public:
* Notes support
*/
virtual int numNotes();
- virtual int readNote( int index, QString &note );
- virtual int storeNote( int index, const QString &note );
+ virtual int readNote( int index, TQString &note );
+ virtual int storeNote( int index, const TQString &note );
@@ -207,10 +207,10 @@ public:
/**
* helper functions for the kmobile device drivers
*/
- void createDirEntry(KIO::UDSEntry& entry, const QString& name,
- const QString& url, const QString& mime) const;
- void createFileEntry(KIO::UDSEntry& entry, const QString& name,
- const QString& url, const QString& mime,
+ void createDirEntry(KIO::UDSEntry& entry, const TQString& name,
+ const TQString& url, const TQString& mime) const;
+ void createFileEntry(KIO::UDSEntry& entry, const TQString& name,
+ const TQString& url, const TQString& mime,
const unsigned long size = 0) const;
/**
* Lists the contents of @p path.
@@ -219,7 +219,7 @@ public:
* It should also emit @ref #totalFiles as soon as it knows how many
* files it will list.
*/
- virtual void listDir( const QString &url );
+ virtual void listDir( const TQString &url );
/**
* Create a directory
@@ -228,7 +228,7 @@ public:
* (-1 if no permissions to be set)
* The slave emits ERR_COULD_NOT_MKDIR if failure.
*/
- virtual void mkdir( const QString &url, int permissions );
+ virtual void mkdir( const TQString &url, int permissions );
/**
* Rename @p oldname into @p newname.
@@ -238,7 +238,7 @@ public:
* @param dest where to move the file to
* @param overwrite if true, any existing file will be overwritten
*/
- virtual void rename( const QString &src, const QString &dest, bool overwrite );
+ virtual void rename( const TQString &src, const TQString &dest, bool overwrite );
/**
* Creates a symbolic link named @p dest, pointing to @p target, which
@@ -247,7 +247,7 @@ public:
* @param dest The symlink to create.
* @param overwrite whether to automatically overwrite if the dest exists
*/
- virtual void symlink( const QString &target, const QString &dest, bool overwrite );
+ virtual void symlink( const TQString &target, const TQString &dest, bool overwrite );
/**
* Delete a file or directory.
@@ -255,20 +255,20 @@ public:
* @param isfile if true, a file should be deleted.
* if false, a directory should be deleted.
*/
- virtual void del( const QString &url, bool isfile);
+ virtual void del( const TQString &url, bool isfile);
/**
* Finds all details for one file or directory.
* The information returned is the same as what @ref #listDir returns,
* but only for one file or directory.
*/
- virtual void stat( const QString &url );
+ virtual void stat( const TQString &url );
/**
* Change permissions on @p path
* The slave emits ERR_DOES_NOT_EXIST or ERR_CANNOT_CHMOD
*/
- virtual void chmod( const QString &url, int permissions );
+ virtual void chmod( const TQString &url, int permissions );
/**
* get, aka read.
@@ -276,7 +276,7 @@ public:
* can be assumed to be the same as in the last setHost() call.
* The slave emits the data through @ref #data
*/
- virtual void get( const QString &url );
+ virtual void get( const TQString &url );
/**
* put, aka write.
@@ -287,7 +287,7 @@ public:
* permissions change to it.
* @param resume
*/
- virtual void put( const QString &url, int permissions, bool overwrite, bool resume );
+ virtual void put( const TQString &url, int permissions, bool overwrite, bool resume );
/**
* Finds mimetype for one file or directory.
@@ -301,7 +301,7 @@ public:
* determining the mimetype on it - this is obviously not a
* good thing in most cases.
*/
- virtual void mimetype( const QString &url );
+ virtual void mimetype( const TQString &url );
/**
* Used for any command that is specific to this slave (protocol)
@@ -311,7 +311,7 @@ public:
* slave, but usually starts with an int for the command number.
* Document your slave's commands, at least in its header file.
*/
- virtual void special( const QByteArray & );
+ virtual void special( const TQByteArray & );
signals:
/**
@@ -351,10 +351,10 @@ signals:
* KIO::AuthInfo authInfo;
* if ( openPassDlg( authInfo ) )
* {
- * kdDebug() << QString::fromLatin1("User: ")
+ * kdDebug() << TQString::fromLatin1("User: ")
* << authInfo.username << endl;
- * kdDebug() << QString::fromLatin1("Password: ")
- * << QString::fromLatin1("Not displayed here!") << endl;
+ * kdDebug() << TQString::fromLatin1("Password: ")
+ * << TQString::fromLatin1("Not displayed here!") << endl;
* }
* </pre>
*
@@ -365,13 +365,13 @@ signals:
* KIO::AuthInfo authInfo;
* authInfo.caption= "Acme Password Dialog";
* authInfo.username= "Wile E. Coyote";
- * QString errorMsg = "You entered an incorrect password.";
+ * TQString errorMsg = "You entered an incorrect password.";
* if ( openPassDlg( authInfo, errorMsg ) )
* {
- * kdDebug() << QString::fromLatin1("User: ")
+ * kdDebug() << TQString::fromLatin1("User: ")
* << authInfo.username << endl;
- * kdDebug() << QString::fromLatin1("Password: ")
- * << QString::fromLatin1("Not displayed here!") << endl;
+ * kdDebug() << TQString::fromLatin1("Password: ")
+ * << TQString::fromLatin1("Not displayed here!") << endl;
* }
* </pre>
*
@@ -383,13 +383,13 @@ signals:
* @return @p TRUE if user clicks on "OK", @p FALSE otherwsie.
* @since 3.1
*/
- bool openPassDlg( KIO::AuthInfo& info, const QString &errorMsg );
+ bool openPassDlg( KIO::AuthInfo& info, const TQString &errorMsg );
/**
* Call this in @ref #mimetype, when you know the mimetype.
* See @ref #mimetype about other ways to implement it.
*/
- void mimeType( const QString &_type );
+ void mimeType( const TQString &_type );
/**
* Call to signal an error.
@@ -408,18 +408,18 @@ signals:
* @param _errid the error code from KIO::Error
* @param _text the rich text error message
*/
- void error( int _errid, const QString &_text );
+ void error( int _errid, const TQString &_text );
/**
* Call to signal a warning, to be displayed in a dialog box.
*/
- void warning( const QString &msg );
+ void warning( const TQString &msg );
/**
* Call to signal a message, to be displayed if the application wants to,
* for instance in a status bar. Usual examples are "connecting to host xyz", etc.
*/
- void infoMessage( const QString &msg );
+ void infoMessage( const TQString &msg );
/**
* Call to signal successful completion of any command
@@ -446,10 +446,10 @@ signals:
* and for Information, none is used.
* @return a button code, as defined in KMessageBox, or 0 on communication error.
*/
- int messageBox( MessageBoxType type, const QString &text,
- const QString &caption = QString::null,
- const QString &buttonYes = QString::null,
- const QString &buttonNo = QString::null );
+ int messageBox( MessageBoxType type, const TQString &text,
+ const TQString &caption = TQString::null,
+ const TQString &buttonYes = TQString::null,
+ const TQString &buttonNo = TQString::null );
/**
* Call this in @ref #get and @ref #copy, to give the total size
@@ -473,7 +473,7 @@ protected:
void setClassType( enum ClassType ct );
void setCapabilities( int caps );
KConfig *config() const { return m_config; };
- QString configFileName() const { return m_configFileName; };
+ TQString configFileName() const { return m_configFileName; };
/**
@@ -481,18 +481,18 @@ protected:
* @param device Name of a device port (e.g. /dev/ttyS1, ttyS1, /dev/ircomm0)
* Returns true, if device could be locked or unlocked
*/
- bool lockDevice(const QString &device, QString &err_reason);
- bool unlockDevice(const QString &device);
+ bool lockDevice(const TQString &device, TQString &err_reason);
+ bool unlockDevice(const TQString &device);
protected:
- QMutex m_mutex; // mutex to syncronize DCOP accesses to this device
- QString m_configFileName;
+ TQMutex m_mutex; // mutex to syncronize DCOP accesses to this device
+ TQString m_configFileName;
KConfig *m_config; // this is where this device should store it's configuration
enum ClassType m_classType;
- QString m_deviceClassName; // e.g. "Nokia mobile phone", "MP3 Player", "Handspring Organizer"
- QString m_deviceName; // e.g. "Nokia 6310", "Opie"
- QString m_deviceRevision; // e.g. "Revision 1.2" or "n/a"
- QString m_connectionName; // e.g. "IRDA", "USB", "Cable", "gnokii", "gammu", ...
+ 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_connectionName; // e.g. "IRDA", "USB", "Cable", "gnokii", "gammu", ...
int m_caps; // see enum Capabilities
bool m_connected;