#include <nqueue.h>
Public Member Functions | |
NQueueItem (QListViewItem *parent, int id, int hid, QUrl src, QString srcName, QUrl dst, QString dstName, uint size, bool dir=false) | |
Creates a new item entry under parent. | |
virtual | ~NQueueItem () |
Destroys the item entry, but does not properly update NQueue's data structures. | |
void | dieNow () |
Destroys the item entry, and properly cleans up NQueue's data structures. | |
virtual int | compare (QListViewItem *i, int col, bool ascending) const |
Compares the values of i to this object's entries for column col. | |
virtual QString | text (int c) const |
Return a serialized value for the content of column c. | |
virtual const QPixmap * | pixmap (int c) const |
Returns 0. | |
virtual int | rtti () const |
Returns 2302, the arbitrary rtti chosen for this QListViewItem type. | |
const int | id () const |
Returns the ID we were assigned. | |
const int | hostid () const |
Return the ID of the host we require. | |
const QUrl | source () const |
Return the URL of our source file, minus the filename. | |
const QUrl | dest () const |
Return the URL of our destination file, minus the filename. | |
const QString | sourceFileName () const |
Return the source filename. | |
const QString | destFileName () const |
Return the destination filename. | |
const uint | size () const |
Return the size of our queued file in bytes. | |
const uint | progress () const |
Return the number of bytes recieved so far. | |
const bool | isDir () const |
Boolean affirmation that the entry represents a directory. | |
const bool | isDone () const |
Boolean affirmation that the item is done. | |
const bool | inUse () const |
Boolean affirmation that the item is currently in use. | |
const bool | failed () const |
Boolean affirmation that the item has failed. | |
const int | whichRemote () const |
Returns an integer which represents which URL is for the remote system. | |
void | totals (int *mytot, int *myrem) |
Retrieve the total number of entries this entry represents, and the number of those waiting to be transferred. | |
void | childReset () |
Forces a statistics regeneration. | |
void | killChildren (int prune=0) |
Summarily destroy any children that fit the desired kill parameters. | |
void | setProgress (uint progress) |
Update the current number of bytes transferred. | |
void | setInUse (bool s=true) |
Marks the entry as in use. | |
void | setDone (bool s=true) |
Marks the entry as done or failed depending on s. | |
void | setFailed (bool s=true) |
Marks the entry as failed or not depending on s. | |
void | childDone (bool removed=false) |
A child entry was marked done, decrease the remaining children count. | |
void | addChild () |
Add statistics for new child. | |
void | reset (int *mytot=0, int *myrem=0) |
Resets this entry and any children to a waiting state. | |
void | setXferStats (uint size, int time, double rate) |
Sets the entries transfer statistics. |
Every Queue Item entry will be stored using this class. This can represent directories as well as files, and this is determined by isDir().
|
Creates a new item entry under parent.
|
|
Destroys the item entry, but does not properly update NQueue's data structures. Use dieNow() rather than delete where possible. |
|
Add statistics for new child. Automatically sets the done flag to false. This function notifies the object's parent via addChild(). |
|
A child entry was marked done, decrease the remaining children count. If removed is true, update the childTotal as well. If the remaining children count is reduced to zero, perform setDone(). This function notifies the object's parent via childDone(). |
|
Forces a statistics regeneration.
Called when a child at any depth was reset. |
|
Compares the values of i to this object's entries for column col.
|
|
Return the URL of our destination file, minus the filename.
|
|
Return the destination filename.
|
|
Destroys the item entry, and properly cleans up NQueue's data structures. Use this rather than delete where possible. |
|
Boolean affirmation that the item has failed. Failed implies that an error occured in this item's transfer, or in one of its children. |
|
Return the ID of the host we require.
|
|
Returns the ID we were assigned.
|
|
Boolean affirmation that the item is currently in use. In Use implies that the item is in the process of transferring. |
|
Boolean affirmation that the entry represents a directory.
|
|
Boolean affirmation that the item is done. Done in this case implies that any children are completed, and that this entry was already processed fully. |
|
Summarily destroy any children that fit the desired kill parameters.
If prune is 1, the child must be Done and Not Failed. |
|
Returns 0.
|
|
Return the number of bytes recieved so far.
|
|
Resets this entry and any children to a waiting state. This function notifies the object's parent via childReset(). |
|
Returns 2302, the arbitrary rtti chosen for this QListViewItem type.
|
|
Marks the entry as done or failed depending on s. This function notifies the object's parent with childDone(). |
|
Marks the entry as failed or not depending on s. This function notifies the object's parent with setFailed(). |
|
Marks the entry as in use.
|
|
Update the current number of bytes transferred.
|
|
Sets the entries transfer statistics.
|
|
Return the size of our queued file in bytes.
|
|
Return the URL of our source file, minus the filename.
|
|
Return the source filename.
|
|
Return a serialized value for the content of column c.
|
|
Retrieve the total number of entries this entry represents, and the number of those waiting to be transferred. Includes itself. |
|
Returns an integer which represents which URL is for the remote system.
|