• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdenetwork API Reference
  • KDE Home
  • Contact Us
 

kget

Public Types | Public Slots | Signals | Public Member Functions | List of all members
Segment Class Reference

#include <segment.h>

Inheritance diagram for Segment:
Inheritance graph
[legend]

Public Types

enum  Status {
  Running, Stopped, Killed, Timeout,
  Finished
}
 

Public Slots

void slotResult (KJob *job)
 
bool startTransfer ()
 

Signals

void canResume ()
 
void connectionProblem ()
 
void data (KIO::fileoffset_t offset, const QByteArray &data, bool &worked)
 
void error (Segment *segment, const QString &errorText, Transfer::LogLevel logLevel)
 
void finishedDownload (KIO::filesize_t size)
 
void finishedSegment (Segment *segment, int segmentNum, bool connectionFinished=true)
 
void speed (ulong speed)
 
void statusChanged (Segment *)
 
void totalSize (KIO::filesize_t size, QPair< int, int > segmentRange)
 
void urlChanged (const KUrl &newUrl)
 

Public Member Functions

 Segment (const KUrl &src, const QPair< KIO::fileoffset_t, KIO::fileoffset_t > &segmentSize, const QPair< int, int > &segmentRange, QObject *parent)
 
 ~Segment ()
 
QPair< int, int > assignedSegments () const
 
KIO::filesize_t BytesWritten ()
 
int countUnfinishedSegments () const
 
bool createTransfer ()
 
bool findingFileSize () const
 
KIO::TransferJob * job ()
 
bool merge (const QPair< KIO::fileoffset_t, KIO::fileoffset_t > &segmentSize, const QPair< int, int > &segmentRange)
 
KIO::fileoffset_t offset () const
 
QPair< KIO::fileoffset_t,
KIO::fileoffset_t > 
segmentSize () const
 
KIO::filesize_t size () const
 
QPair< int, int > split ()
 
Status status () const
 
bool stopTransfer ()
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
 QObject (QObject *parent, const char *name)
 
virtual  ~QObject ()
 
bool blockSignals (bool block)
 
QObject * child (const char *objName, const char *inheritsClass, bool recursiveSearch) const
 
const QObjectList & children () const
 
const char * className () const
 
bool connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const QObject *receiver, const char *method)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method)
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QByteArray > dynamicPropertyNames () const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
T findChild (const QString &name) const
 
QList< T > findChildren (const QRegExp &regExp) const
 
QList< T > findChildren (const QString &name) const
 
bool inherits (const char *className) const
 
void insertChild (QObject *object)
 
void installEventFilter (QObject *filterObj)
 
bool isA (const char *className) const
 
bool isWidgetType () const
 
void killTimer (int id)
 
virtual const QMetaObject * metaObject () const
 
void moveToThread (QThread *targetThread)
 
const char * name () const
 
const char * name (const char *defaultName) const
 
QString objectName () const
 
QObject * parent () const
 
QVariant property (const char *name) const
 
void removeChild (QObject *object)
 
void removeEventFilter (QObject *obj)
 
void setName (const char *name)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval)
 
QThread * thread () const
 

Additional Inherited Members

- Static Public Member Functions inherited from QObject
bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
bool connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
- Protected Member Functions inherited from QObject
bool checkConnectArgs (const char *signal, const QObject *object, const char *method)
 
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const char *signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const char *signal)
 
int receivers (const char *signal) const
 
QObject * sender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 
- Static Protected Member Functions inherited from QObject
QByteArray normalizeSignalSlot (const char *signalSlot)
 
- Properties inherited from QObject
 objectName
 

Detailed Description

class Segment

Definition at line 26 of file segment.h.

Member Enumeration Documentation

enum Segment::Status

The status property describes the current segment status.

Parameters
RunningThe transfer is being executed
StoppedThe transfer is stopped
KilledThe transfer have been killed due unhandled errors
TimeoutThe transfer is broken because an error ocoured
FinishedThe transfer exited successfully
Enumerator
Running 
Stopped 
Killed 
Timeout 
Finished 

Definition at line 40 of file segment.h.

Constructor & Destructor Documentation

Segment::Segment ( const KUrl &  src,
const QPair< KIO::fileoffset_t, KIO::fileoffset_t > &  segmentSize,
const QPair< int, int > &  segmentRange,
QObject *  parent 
)

Definition at line 22 of file segment.cpp.

Segment::~Segment ( )

Definition at line 53 of file segment.cpp.

Member Function Documentation

QPair< int, int > Segment::assignedSegments ( ) const

Definition at line 309 of file segment.cpp.

KIO::filesize_t Segment::BytesWritten ( )
inline

Returns the written bytes.

Returns
the value of m_bytesWritten

Definition at line 78 of file segment.h.

void Segment::canResume ( )
signal
void Segment::connectionProblem ( )
signal
int Segment::countUnfinishedSegments ( ) const

Definition at line 319 of file segment.cpp.

bool Segment::createTransfer ( )

Create the segment transfer.

Definition at line 67 of file segment.cpp.

void Segment::data ( KIO::fileoffset_t  offset,
const QByteArray &  data,
bool &  worked 
)
signal
void Segment::error ( Segment *  segment,
const QString &  errorText,
Transfer::LogLevel  logLevel 
)
signal

Emitted whenever the transfer is closed with an error.

bool Segment::findingFileSize ( ) const

Definition at line 62 of file segment.cpp.

void Segment::finishedDownload ( KIO::filesize_t  size)
signal
void Segment::finishedSegment ( Segment *  segment,
int  segmentNum,
bool  connectionFinished = true 
)
signal
KIO::TransferJob* Segment::job ( )
inline

Get the job.

Returns
the value of m_getJob

Definition at line 84 of file segment.h.

bool Segment::merge ( const QPair< KIO::fileoffset_t, KIO::fileoffset_t > &  segmentSize,
const QPair< int, int > &  segmentRange 
)

Definition at line 364 of file segment.cpp.

KIO::fileoffset_t Segment::offset ( ) const
inline

Get the value of m_offset set.

Definition at line 66 of file segment.h.

QPair< KIO::fileoffset_t, KIO::fileoffset_t > Segment::segmentSize ( ) const

Definition at line 314 of file segment.cpp.

KIO::filesize_t Segment::size ( ) const
inline

Returns the size the current segment has.

Returns
the size of the segment

Definition at line 72 of file segment.h.

void Segment::slotResult ( KJob *  job)
slot

Called whenever a subjob finishes.

Parameters
jobthe job that emitted this signal

Definition at line 167 of file segment.cpp.

void Segment::speed ( ulong  speed)
signal
QPair< int, int > Segment::split ( )

Definition at line 324 of file segment.cpp.

bool Segment::startTransfer ( )
slot

start the segment transfer

Definition at line 139 of file segment.cpp.

Status Segment::status ( ) const
inline

Get the segment status.

Returns
the value of m_status

Definition at line 90 of file segment.h.

void Segment::statusChanged ( Segment *  )
signal
bool Segment::stopTransfer ( )

stop the segment transfer

Definition at line 153 of file segment.cpp.

void Segment::totalSize ( KIO::filesize_t  size,
QPair< int, int >  segmentRange 
)
signal
void Segment::urlChanged ( const KUrl &  newUrl)
signal

The documentation for this class was generated from the following files:
  • segment.h
  • segment.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:28:44 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kget

Skip menu "kget"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdenetwork API Reference

Skip menu "kdenetwork API Reference"
  • kget
  • kopete
  •   kopete
  •   libkopete
  • krdc
  • krfb

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal