Overte C++ Documentation
GeometryResource Class Reference

A geometry loaded from the network. More...

#include <ModelCache.h>

Inheritance diagram for GeometryResource:
Collaboration diagram for GeometryResource:

Public Member Functions

virtual void downloadFinished (const QByteArray &data) override
 
- Public Member Functions inherited from Resource
int getLRUKey () const
 Returns the key last used to identify this resource in the unused map.
 
void ensureLoading ()
 Makes sure that the resource has started loading.
 
virtual void setLoadPriority (const QPointer< QObject > &owner, float priority)
 Sets the load priority for one owner.
 
virtual void setLoadPriorities (const QHash< QPointer< QObject >, float > &priorities)
 Sets a set of priorities at once.
 
virtual void clearLoadPriority (const QPointer< QObject > &owner)
 Clears the load priority for one owner.
 
float getLoadPriority ()
 Returns the highest load priority across all owners.
 
virtual bool isLoaded () const
 Checks whether the resource has loaded.
 
virtual bool isFailed () const
 Checks whether the resource has failed to download.
 
qint64 getBytesReceived () const
 For loading resources, returns the number of bytes received.
 
qint64 getBytesTotal () const
 For loading resources, returns the number of total bytes (<= zero if unknown).
 
qint64 getBytes () const
 For loaded resources, returns the number of actual bytes (defaults to total bytes if not explicitly set).
 
float getProgress () const
 For loading resources, returns the load progress.
 
virtual void refresh ()
 Refreshes the resource.
 

Protected Member Functions

virtual bool isCacheable () const override
 Checks whether the resource is cacheable.
 
- Protected Member Functions inherited from Resource
virtual void makeRequest ()
 
void setSize (const qint64 &bytes)
 Called when the download is finished and processed, sets the number of actual bytes.
 
Q_INVOKABLE void finishedLoading (bool success)
 
virtual bool handleFailedRequest (ResourceRequest::Result result)
 Return true if the resource will be retried.
 

Friends

class ModelCache
 

Additional Inherited Members

- Signals inherited from Resource
void loading ()
 Fired when the resource begins downloading.
 
void loaded (const QByteArray request)
 
void finished (bool success)
 Fired when the resource has finished loading.
 
void failed (QNetworkReply::NetworkError error)
 Fired when the resource failed to load.
 
void onRefresh ()
 Fired when the resource is refreshed.
 
void onProgress (uint64_t bytesReceived, uint64_t bytesTotal)
 Fired on progress updates.
 
void updateSize (qint64 deltaSize)
 Fired when the size changes (through setSize).
 

Detailed Description

A geometry loaded from the network.

Member Function Documentation

◆ downloadFinished()

void GeometryResource::downloadFinished ( const QByteArray &  data)
overridevirtual

Called when the download has finished. This should be overridden by subclasses that need to process the data once it is downloaded.

Reimplemented from Resource.


The documentation for this class was generated from the following files: