diff options
Diffstat (limited to 'kipi-plugins/kameraklient/gpstatus.cpp')
-rw-r--r-- | kipi-plugins/kameraklient/gpstatus.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/kipi-plugins/kameraklient/gpstatus.cpp b/kipi-plugins/kameraklient/gpstatus.cpp index b5ea875..a54ca82 100644 --- a/kipi-plugins/kameraklient/gpstatus.cpp +++ b/kipi-plugins/kameraklient/gpstatus.cpp @@ -26,10 +26,10 @@ namespace KIPIKameraKlientPlugin { -float GPStatus::target = 0.0; -bool GPStatus::cancel = false; +float GPtqStatus::target = 0.0; +bool GPtqStatus::cancel = false; -GPStatus::GPStatus() : QObject() { +GPtqStatus::GPtqStatus() : TQObject() { context = gp_context_new(); cancel = false; gp_context_set_cancel_func(context, cancel_func, 0); @@ -38,63 +38,63 @@ GPStatus::GPStatus() : QObject() { gp_context_set_progress_funcs(context, progress_start_func, progress_update_func, progress_stop_func, 0); } -GPStatus::~GPStatus() { +GPtqStatus::~GPtqStatus() { if(context) { gp_context_unref(context); } } -void GPStatus::cancelOperation() { +void GPtqStatus::cancelOperation() { cancel = true; } -GPContextFeedback GPStatus::cancel_func(GPContext *, void *) { +GPContextFeedback GPtqStatus::cancel_func(GPContext *, void *) { return (cancel ? GP_CONTEXT_FEEDBACK_CANCEL : GP_CONTEXT_FEEDBACK_OK); } -void GPStatus::error_func(GPContext *, const char *format, va_list args, void *) { +void GPtqStatus::error_func(GPContext *, const char *format, va_list args, void *) { char buf[4096] = ""; int nSize = vsnprintf( buf, 4096, format, args ); if(nSize > 4094) { nSize = 4094; } buf[nSize] = '\0'; - QString error; + TQString error; error = error.fromLocal8Bit(buf); GPMessages::gpMessagesWrapper()->emit errorMessage(error); } -void GPStatus::status_func (GPContext *, const char *format, va_list args, void *) { +void GPtqStatus::status_func (GPContext *, const char *format, va_list args, void *) { char buf[4096] = ""; int nSize = vsnprintf( buf, 4096, format, args ); if(nSize > 4094) { nSize = 4094; } buf[nSize] = '\0'; - QString status; + TQString status; status = status.fromLocal8Bit(buf); GPMessages::gpMessagesWrapper()->emit statusChanged(status); } -unsigned int GPStatus::progress_start_func(GPContext *, float _target, const char *format, va_list args, void *) { +unsigned int GPtqStatus::progress_start_func(GPContext *, float _target, const char *format, va_list args, void *) { char buf[4096] = ""; int nSize = vsnprintf( buf, 4096, format, args ); if(nSize > 4094) { nSize = 4094; } buf[nSize] = '\0'; - QString prog; + TQString prog; prog = prog.fromLocal8Bit(buf); target = _target; return GP_OK; } -void GPStatus::progress_update_func(GPContext *, unsigned int, float current, void *) { +void GPtqStatus::progress_update_func(GPContext *, unsigned int, float current, void *) { int percentage = int(100.0 * current/target); GPMessages::gpMessagesWrapper()->emit progressChanged(percentage); } -void GPStatus::progress_stop_func(GPContext *, unsigned int, void *) { +void GPtqStatus::progress_stop_func(GPContext *, unsigned int, void *) { GPMessages::gpMessagesWrapper()->emit progressChanged(0); } |