• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeio/tdeio
 

tdeio/tdeio

Public Slots | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
Observer Class Reference

#include <observer.h>

Inherits TQObject, and DCOPObject.

Public Slots

void slotTotalSize (TDEIO::Job *, TDEIO::filesize_t size)
 
void slotTotalFiles (TDEIO::Job *, unsigned long files)
 
void slotTotalDirs (TDEIO::Job *, unsigned long dirs)
 
void slotProcessedSize (TDEIO::Job *, TDEIO::filesize_t size)
 
void slotProcessedFiles (TDEIO::Job *, unsigned long files)
 
void slotProcessedDirs (TDEIO::Job *, unsigned long dirs)
 
void slotSpeed (TDEIO::Job *, unsigned long speed)
 
void slotPercent (TDEIO::Job *, unsigned long percent)
 
void slotInfoMessage (TDEIO::Job *, const TQString &msg)
 
void slotCopying (TDEIO::Job *, const KURL &from, const KURL &to)
 
void slotMoving (TDEIO::Job *, const KURL &from, const KURL &to)
 
void slotDeleting (TDEIO::Job *, const KURL &url)
 
void slotTransferring (TDEIO::Job *, const KURL &url)
 
void slotCreatingDir (TDEIO::Job *, const KURL &dir)
 
void slotCanResume (TDEIO::Job *, TDEIO::filesize_t offset)
 

Public Member Functions

int newJob (TDEIO::Job *job, bool showProgress)
 
void jobFinished (int progressId)
 
bool openPassDlg (const TQString &prompt, TQString &user, TQString &pass, bool readOnly)
 
bool openPassDlg (TDEIO::AuthInfo &info)
 
TDEIO::RenameDlg_Result open_RenameDlg (TDEIO::Job *job, const TQString &caption, const TQString &src, const TQString &dest, TDEIO::RenameDlg_Mode mode, TQString &newDest, TDEIO::filesize_t sizeSrc=(TDEIO::filesize_t) -1, TDEIO::filesize_t sizeDest=(TDEIO::filesize_t) -1, time_t ctimeSrc=(time_t) -1, time_t ctimeDest=(time_t) -1, time_t mtimeSrc=(time_t) -1, time_t mtimeDest=(time_t) -1)
 
TDEIO::SkipDlg_Result open_SkipDlg (TDEIO::Job *job, bool multi, const TQString &error_text)
 
void stating (TDEIO::Job *, const KURL &url)
 
void mounting (TDEIO::Job *, const TQString &dev, const TQString &point)
 
void unmounting (TDEIO::Job *, const TQString &point)
 

Static Public Member Functions

static Observer * self ()
 
static int messageBox (int progressId, int type, const TQString &text, const TQString &caption, const TQString &buttonYes, const TQString &buttonNo)
 
static int messageBox (int progressId, int type, const TQString &text, const TQString &caption, const TQString &buttonYes, const TQString &buttonNo, const TQString &dontAskAgainName)
 

Protected Member Functions

virtual void virtual_hook (int id, void *data)
 

Protected Attributes

UIServer_stub * m_uiserver
 
TQIntDict< TDEIO::Job > m_dctJobs
 

Static Protected Attributes

static Observer * s_pObserver = 0L
 

Detailed Description

Observer for TDEIO::Job progress information.

This class, of which there is always only one instance, "observes" what jobs do and forwards this information to the progress-info server.

It is a DCOP object so that the UI server can call the kill method when the user presses Cancel.

Usually jobs are automatically registered by the TDEIO::Scheduler, so you do not have to care about that.

Observer for TDEIO::Job progress information

Author
David Faure faure.nosp@m.@kde.nosp@m..org

Definition at line 55 of file observer.h.

Constructor & Destructor Documentation

◆ Observer()

Observer::Observer ( )
protected

Definition at line 52 of file observer.cpp.

◆ ~Observer()

Observer::~Observer ( )
inlineprotected

Definition at line 173 of file observer.h.

Member Function Documentation

◆ jobFinished()

void Observer::jobFinished ( int  progressId)

Called by the job destructor, to tell the UI Server that the job ended.

Parameters
progressIdthe progress ID of the job, as returned by newJob()

Definition at line 93 of file observer.cpp.

◆ killJob

void Observer::killJob ( int  progressId)

Called by the UI Server (using DCOP) if the user presses cancel.

Parameters
progressIdthe progress ID of the job, as returned by newJob()

Definition at line 99 of file observer.cpp.

◆ messageBox() [1/2]

int Observer::messageBox ( int  progressId,
int  type,
const TQString &  text,
const TQString &  caption,
const TQString &  buttonYes,
const TQString &  buttonNo 
)
static

Popup a message box.

See TDEIO::SlaveBase. This doesn't use DCOP anymore, it shows the dialog in the application's process. Otherwise, other apps would block when trying to communicate with UIServer.

Parameters
progressIdthe progress ID of the job, as returned by newJob()
typethe type of the message box
textthe text to show
captionthe window caption
buttonYesthe text of the "Yes" button
buttonNothe text of the "No button

Definition at line 254 of file observer.cpp.

◆ messageBox() [2/2]

int Observer::messageBox ( int  progressId,
int  type,
const TQString &  text,
const TQString &  caption,
const TQString &  buttonYes,
const TQString &  buttonNo,
const TQString &  dontAskAgainName 
)
static

Popup a message box.

See TDEIO::SlaveBase. This doesn't use DCOP anymore, it shows the dialog in the application's process. Otherwise, other apps would block when trying to communicate with UIServer.

Parameters
progressIdthe progress ID of the job, as returned by newJob()
typethe type of the message box
textthe text to show
captionthe window caption
buttonYesthe text of the "Yes" button
buttonNothe text of the "No button
dontAskAgainNameA checkbox is added with which further confirmation can be turned off. The string is used to lookup and store the setting in tdeioslaverc.
Since
3.3

Definition at line 261 of file observer.cpp.

◆ metadata

MetaData Observer::metadata ( int  progressId)

Called by the UI Server (using DCOP) to get all the metadata of the job.

Parameters
progressIdthe progress IDof the job, as returned by newJob()

Definition at line 110 of file observer.cpp.

◆ mounting()

void Observer::mounting ( TDEIO::Job *  job,
const TQString &  dev,
const TQString &  point 
)

Definition at line 211 of file observer.cpp.

◆ newJob()

int Observer::newJob ( TDEIO::Job *  job,
bool  showProgress 
)

Called by the job constructor, to signal its presence to the UI Server.

Parameters
jobthe new job
showProgresstrue to show progress, false otherwise
Returns
the progress ID assigned by the UI Server to the Job.

Definition at line 81 of file observer.cpp.

◆ open_RenameDlg()

RenameDlg_Result Observer::open_RenameDlg ( TDEIO::Job *  job,
const TQString &  caption,
const TQString &  src,
const TQString &  dest,
TDEIO::RenameDlg_Mode  mode,
TQString &  newDest,
TDEIO::filesize_t  sizeSrc = (TDEIO::filesize_t) -1,
TDEIO::filesize_t  sizeDest = (TDEIO::filesize_t) -1,
time_t  ctimeSrc = (time_t) -1,
time_t  ctimeDest = (time_t) -1,
time_t  mtimeSrc = (time_t) -1,
time_t  mtimeDest = (time_t) -1 
)

Definition at line 370 of file observer.cpp.

◆ open_SkipDlg()

SkipDlg_Result Observer::open_SkipDlg ( TDEIO::Job *  job,
bool  multi,
const TQString &  error_text 
)

Definition at line 399 of file observer.cpp.

◆ openPassDlg() [1/2]

bool Observer::openPassDlg ( const TQString &  prompt,
TQString &  user,
TQString &  pass,
bool  readOnly 
)
Deprecated:
use TDEIO::AutoInfo

Definition at line 221 of file observer.cpp.

◆ openPassDlg() [2/2]

bool Observer::openPassDlg ( TDEIO::AuthInfo &  info)

Opens a password dialog.

Parameters
infothe authentication information
Returns
true if successful ("ok" clicked), false otherwise

Definition at line 238 of file observer.cpp.

◆ self()

static Observer * Observer::self ( )
inlinestatic

Returns the unique observer object.

Returns
the observer object

Definition at line 66 of file observer.h.

◆ slotCanResume

void Observer::slotCanResume ( TDEIO::Job *  job,
TDEIO::filesize_t  offset 
)
slot

Definition at line 200 of file observer.cpp.

◆ slotCopying

void Observer::slotCopying ( TDEIO::Job *  job,
const KURL &  from,
const KURL &  to 
)
slot

Definition at line 170 of file observer.cpp.

◆ slotCreatingDir

void Observer::slotCreatingDir ( TDEIO::Job *  job,
const KURL &  dir 
)
slot

Definition at line 194 of file observer.cpp.

◆ slotDeleting

void Observer::slotDeleting ( TDEIO::Job *  job,
const KURL &  url 
)
slot

Definition at line 182 of file observer.cpp.

◆ slotInfoMessage

void Observer::slotInfoMessage ( TDEIO::Job *  job,
const TQString &  msg 
)
slot

Definition at line 165 of file observer.cpp.

◆ slotMoving

void Observer::slotMoving ( TDEIO::Job *  job,
const KURL &  from,
const KURL &  to 
)
slot

Definition at line 176 of file observer.cpp.

◆ slotPercent

void Observer::slotPercent ( TDEIO::Job *  job,
unsigned long  percent 
)
slot

Definition at line 159 of file observer.cpp.

◆ slotProcessedDirs

void Observer::slotProcessedDirs ( TDEIO::Job *  job,
unsigned long  dirs 
)
slot

Definition at line 147 of file observer.cpp.

◆ slotProcessedFiles

void Observer::slotProcessedFiles ( TDEIO::Job *  job,
unsigned long  files 
)
slot

Definition at line 141 of file observer.cpp.

◆ slotProcessedSize

void Observer::slotProcessedSize ( TDEIO::Job *  job,
TDEIO::filesize_t  size 
)
slot

Definition at line 135 of file observer.cpp.

◆ slotSpeed

void Observer::slotSpeed ( TDEIO::Job *  job,
unsigned long  speed 
)
slot

Definition at line 153 of file observer.cpp.

◆ slotTotalDirs

void Observer::slotTotalDirs ( TDEIO::Job *  job,
unsigned long  dirs 
)
slot

Definition at line 129 of file observer.cpp.

◆ slotTotalFiles

void Observer::slotTotalFiles ( TDEIO::Job *  job,
unsigned long  files 
)
slot

Definition at line 123 of file observer.cpp.

◆ slotTotalSize

void Observer::slotTotalSize ( TDEIO::Job *  job,
TDEIO::filesize_t  size 
)
slot

Definition at line 117 of file observer.cpp.

◆ slotTransferring

void Observer::slotTransferring ( TDEIO::Job *  job,
const KURL &  url 
)
slot
Since
3.1

Definition at line 188 of file observer.cpp.

◆ stating()

void Observer::stating ( TDEIO::Job *  job,
const KURL &  url 
)

Definition at line 206 of file observer.cpp.

◆ unmounting()

void Observer::unmounting ( TDEIO::Job *  job,
const TQString &  point 
)

Definition at line 216 of file observer.cpp.

◆ virtual_hook()

void Observer::virtual_hook ( int  id,
void *  data 
)
protectedvirtual

Definition at line 414 of file observer.cpp.

Member Data Documentation

◆ m_dctJobs

TQIntDict< TDEIO::Job > Observer::m_dctJobs
protected

Definition at line 177 of file observer.h.

◆ m_uiserver

UIServer_stub* Observer::m_uiserver
protected

Definition at line 175 of file observer.h.

◆ s_pObserver

Observer * Observer::s_pObserver = 0L
staticprotected

Definition at line 171 of file observer.h.


The documentation for this class was generated from the following files:
  • observer.h
  • observer.cpp

tdeio/tdeio

Skip menu "tdeio/tdeio"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdeio/tdeio

Skip menu "tdeio/tdeio"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeio/tdeio by doxygen 1.9.4
This website is maintained by Timothy Pearson.