summaryrefslogtreecommitdiffstats
path: root/kmobile/devices/gnokii/gnokii_mobile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmobile/devices/gnokii/gnokii_mobile.cpp')
-rw-r--r--kmobile/devices/gnokii/gnokii_mobile.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/kmobile/devices/gnokii/gnokii_mobile.cpp b/kmobile/devices/gnokii/gnokii_mobile.cpp
index 0b2889a6..dabccb89 100644
--- a/kmobile/devices/gnokii/gnokii_mobile.cpp
+++ b/kmobile/devices/gnokii/gnokii_mobile.cpp
@@ -56,10 +56,10 @@
K_EXPORT_COMPONENT_FACTORY( libkmobile_gnokii, KMobileGnokii() )
/* createObject needs to be reimplemented by every KMobileDevice driver */
-TQObject *KMobileGnokii::createObject( TQObject *parent, const char *name,
+TQObject *KMobileGnokii::createObject( TQObject *tqparent, const char *name,
const char *, const TQStringList &args )
{
- return new KMobileGnokii( parent, name, args );
+ return new KMobileGnokii( tqparent, name, args );
}
@@ -74,16 +74,16 @@ static gn_calnote_list calnote_list;
/**
- * The KDE gnokii mobile device driver.
+ * The KDE gnokii mobile tqdevice driver.
*/
KMobileGnokii::KMobileGnokii(TQObject *obj, const char *name, const TQStringList &args )
: KMobileDevice(obj, name, args)
{
- // set initial device info
+ // set initial tqdevice info
setClassType( Phone );
- m_deviceName = i18n("Mobile Phone accessed via GNOKII");
- m_deviceRevision = "";
+ m_tqdeviceName = i18n("Mobile Phone accessed via GNOKII");
+ m_tqdeviceRevision = "";
m_connectionName = "/dev/ircomm0";
setCapabilities( hasAddressBook | hasNotes );
@@ -148,7 +148,7 @@ bool KMobileGnokii::setGnokiiStateMachine()
{
// set the state machine to our configuration
qstrncpy( state.config.model, m_modelnr.utf8(), sizeof(state.config.model)-1 );
- qstrncpy( state.config.port_device, m_port.utf8(), sizeof(state.config.port_device)-1 );
+ qstrncpy( state.config.port_tqdevice, m_port.utf8(), sizeof(state.config.port_tqdevice)-1 );
state.config.connection_type = connectionToValue(m_connection);
state.config.serial_baudrate = m_baud.toUInt();
return true;
@@ -206,7 +206,7 @@ bool KMobileGnokii::loadDeviceConfiguration()
static void busterminate(void)
{
gn_sm_functions(GN_OP_Terminate, NULL, &state);
- if (lockfile) gn_device_unlock(lockfile);
+ if (lockfile) gn_tqdevice_unlock(lockfile);
}
static TQString businit(void)
@@ -222,7 +222,7 @@ static TQString businit(void)
aux = gn_cfg_get(gn_cfg_info, "global", "use_locking");
// Defaults to 'no'
if (aux && !strcmp(aux, "yes")) {
- lockfile = gn_device_lock(state.config.port_device);
+ lockfile = gn_tqdevice_lock(state.config.port_tqdevice);
if (lockfile == NULL) {
return i18n("Lock file error.\n "
"Please exit all other running instances of gnokii and try again.");
@@ -269,7 +269,7 @@ static TQString businit(void)
PhoneProductId = TQString("%1-%2-%3-%4").arg(APP).arg(model).arg(revision).arg(imei);
- return TQString::null;
+ return TQString();
}
@@ -282,7 +282,7 @@ static gn_error read_phone_memstat( gn_memory_type memtype, gn_memory_status *me
memset(memstat, 0, sizeof(*memstat));
memstat->memory_type = memtype;
data.memory_status = memstat;
- error = gn_sm_functions(GN_OP_GetMemoryStatus, &data, &state);
+ error = gn_sm_functions(GN_OP_GetMemorytqStatus, &data, &state);
GNOKII_CHECK_ERROR(error);
if (error != GN_ERR_NONE) {
switch (memtype) {
@@ -378,7 +378,7 @@ static gn_error read_phone_entry_highlevel( int index, const gn_memory_type memt
// try to split Name into FamilyName and GivenName
s = TQString(entry.name).simplifyWhiteSpace();
a->setFormattedName(s);
- if (s.find(',')!=-1) {
+ if (s.tqfind(',')!=-1) {
addrlist = TQStringList::split(',', s);
if (addrlist.count()==2) {
a->setFamilyName(addrlist[0].simplifyWhiteSpace());
@@ -493,8 +493,8 @@ static gn_error read_phone_entry_highlevel( int index, const gn_memory_type memt
-// connect the device and ask user to turn device on (if necessary)
-bool KMobileGnokii::connectDevice(TQWidget * /*parent*/)
+// connect the tqdevice and ask user to turn tqdevice on (if necessary)
+bool KMobileGnokii::connectDevice(TQWidget * /*tqparent*/)
{
if (connected())
return true;
@@ -505,8 +505,8 @@ bool KMobileGnokii::connectDevice(TQWidget * /*parent*/)
return m_connected;
}
-// disconnect the device and return true, if sucessful
-bool KMobileGnokii::disconnectDevice(TQWidget * /*parent*/)
+// disconnect the tqdevice and return true, if sucessful
+bool KMobileGnokii::disconnectDevice(TQWidget * /*tqparent*/)
{
if (!connected())
return true;
@@ -517,11 +517,11 @@ bool KMobileGnokii::disconnectDevice(TQWidget * /*parent*/)
}
// provice the own configuration dialog
-bool KMobileGnokii::configDialog(TQWidget *parent)
+bool KMobileGnokii::configDialog(TQWidget *tqparent)
{
TQString model, connection, port, baud;
int ok = 0;
- GnokiiConfig *dialog = new GnokiiConfig(parent);
+ GnokiiConfig *dialog = new GnokiiConfig(tqparent);
if (dialog) {
dialog->setValues(m_modelnr, m_connection, m_port, m_baud);
ok = dialog->exec();
@@ -545,7 +545,7 @@ TQString KMobileGnokii::iconFileName() const
// return a unique ID, e.g. the IMEI number of phones, or a serial number
// this String is used to have a unique identification for syncronisation.
-TQString KMobileGnokii::deviceUniqueID()
+TQString KMobileGnokii::tqdeviceUniqueID()
{
return TQString("GNOKII-IMEI-%1").arg(TQString::fromLocal8Bit(imei));
}
@@ -609,7 +609,7 @@ int KMobileGnokii::readAddress( int index, KABC::Addressee &addr )
int KMobileGnokii::storeAddress( int, const KABC::Addressee &, bool )
{
- /* XXX: this is a read-only device */
+ /* XXX: this is a read-only tqdevice */
return KIO::ERR_WRITE_ACCESS_DENIED;
}
@@ -619,7 +619,7 @@ int KMobileGnokii::storeAddress( int, const KABC::Addressee &, bool )
* Calendar support *
**********************************************************************************/
-static void QDateTime_2_timestamp( const TQDateTime &qdt, gn_timestamp &ts )
+static void TQDateTime_2_timestamp( const TQDateTime &qdt, gn_timestamp &ts )
{
ts.year = qdt.date().year();
ts.month = qdt.date().month();
@@ -630,7 +630,7 @@ static void QDateTime_2_timestamp( const TQDateTime &qdt, gn_timestamp &ts )
ts.timezone = 0;
}
-static TQDateTime timestamp_2_QDateTime( const gn_timestamp &ts )
+static TQDateTime timestamp_2_TQDateTime( const gn_timestamp &ts )
{
return TQDateTime( TQDate(ts.year, ts.month, ts.day),
TQTime(ts.hour, ts.minute, ts.second) );
@@ -700,7 +700,7 @@ int KMobileGnokii::readCalendarEntry( int index, KCal::Event &event )
print_calnote( entry );
- TQDateTime dt_start = timestamp_2_QDateTime(entry.time);
+ TQDateTime dt_start = timestamp_2_TQDateTime(entry.time);
TQDateTime dt_end = dt_start.addSecs( 60*60 ); // XXX: assume one hour
event.setDtStart( dt_start );
event.setDtEnd( dt_end );
@@ -727,7 +727,7 @@ int KMobileGnokii::readCalendarEntry( int index, KCal::Event &event )
// alarm:
if (entry.alarm.enabled) {
- TQDateTime at = timestamp_2_QDateTime(entry.alarm.timestamp);
+ TQDateTime at = timestamp_2_TQDateTime(entry.alarm.timestamp);
if (at.isValid() && dt_start.isValid()) {
int seconds = abs(at.secsTo(dt_start));
seconds %= 60*60*24; /* max. 1 day in advance... */
@@ -779,7 +779,7 @@ int KMobileGnokii::storeCalendarEntry( int index, const KCal::Event &event )
error = gn_sm_functions(GN_OP_GetCalendarNote, &data, &state);
// GNOKII_CHECK_ERROR(error);
- QDateTime_2_timestamp( event.dtStart(), entry.time );
+ TQDateTime_2_timestamp( event.dtStart(), entry.time );
strncpy(entry.text, event.summary().utf8(), sizeof(entry.text)-1);
// type:
@@ -802,12 +802,12 @@ int KMobileGnokii::storeCalendarEntry( int index, const KCal::Event &event )
if (eventalarm) {
if (eventalarm->hasTime()) {
- QDateTime_2_timestamp( eventalarm->time(), entry.alarm.timestamp );
+ TQDateTime_2_timestamp( eventalarm->time(), entry.alarm.timestamp );
} else
if (eventalarm->hasStartOffset()) {
TQDateTime dt = event.dtStart();
dt = dt.addSecs(-eventalarm->startOffset().asSeconds());
- QDateTime_2_timestamp( dt, entry.alarm.timestamp );
+ TQDateTime_2_timestamp( dt, entry.alarm.timestamp );
}
}
}
@@ -871,7 +871,7 @@ int KMobileGnokii::readNote( int index, TQString &note )
"Device Driver : %4\n"
"Device Revision: %5\n")
.arg(index).arg(index)
- .arg(deviceClassName()).arg(deviceName()).arg(revision());
+ .arg(tqdeviceClassName()).arg(tqdeviceName()).arg(revision());
return 0;
}