API reference - Class QResource

Notation used in Ruby API documentation

Description: Binding of QResource

Public constructors

new QResourcenew(string file = QString(),
const QLocale locale = QLocale())
Constructor QResource::QResource(const QString &file, const QLocale &locale)

Public methods

[const]stringabsoluteFilePathMethod QString QResource::absoluteFilePath()
voidcreateEnsures the C++ object is created
[const]stringdataMethod const unsigned char *QResource::data()
voiddestroyExplicitly destroy the object
[const]booldestroyed?Returns a value indicating whether the object was already destroyed
[const]stringfileNameMethod QString QResource::fileName()
voidfileName=(string file)Method void QResource::setFileName(const QString &file)
[const]boolisCompressedMethod bool QResource::isCompressed()
[const]boolisCompressed?Method bool QResource::isCompressed()
[const]boolisValidMethod bool QResource::isValid()
[const]boolisValid?Method bool QResource::isValid()
[const]boolis_const_object?Returns a value indicating whether the reference is a const reference
[const]QLocalelocaleMethod QLocale QResource::locale()
voidlocale=(const QLocale locale)Method void QResource::setLocale(const QLocale &locale)
voidsetFileName(string file)Method void QResource::setFileName(const QString &file)
voidsetLocale(const QLocale locale)Method void QResource::setLocale(const QLocale &locale)
[const]long longsizeMethod qint64 QResource::size()

Public static methods and constants

voidaddSearchPath(string path)Static method void QResource::addSearchPath(const QString &path)
boolregisterResource_data(string rccData,
string resourceRoot = QString())
Static method bool QResource::registerResource(const unsigned char *rccData, const QString &resourceRoot)
boolregisterResource_file(string rccFilename,
string resourceRoot = QString())
Static method bool QResource::registerResource(const QString &rccFilename, const QString &resourceRoot)
string[]searchPathsStatic method QStringList QResource::searchPaths()
boolunregisterResource_data(string rccData,
string resourceRoot = QString())
Static method bool QResource::unregisterResource(const unsigned char *rccData, const QString &resourceRoot)
boolunregisterResource_file(string rccFilename,
string resourceRoot = QString())
Static method bool QResource::unregisterResource(const QString &rccFilename, const QString &resourceRoot)

Detailed description

[const] string absoluteFilePath

Description: Method QString QResource::absoluteFilePath()

[static] void addSearchPath(string path)

Description: Static method void QResource::addSearchPath(const QString &path)

This method is static and can be called without an instance.

void create

Description: Ensures the C++ object is created

Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.

[const] string data

Description: Method const unsigned char *QResource::data()

void destroy

Description: Explicitly destroy the object

Explicitly destroy the object on C++ side if it was owned by the Ruby interpreter. Subsequent access to this object will throw an exception. If the object is not owned by Ruby, this method will do nothing.

[const] bool destroyed?

Description: Returns a value indicating whether the object was already destroyed

This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.

[const] string fileName

Description: Method QString QResource::fileName()

void fileName=(string file)

Description: Method void QResource::setFileName(const QString &file)

[const] bool isCompressed

Description: Method bool QResource::isCompressed()

[const] bool isCompressed?

Description: Method bool QResource::isCompressed()

[const] bool isValid

Description: Method bool QResource::isValid()

[const] bool isValid?

Description: Method bool QResource::isValid()

[const] bool is_const_object?

Description: Returns a value indicating whether the reference is a const reference

This method returns true, if self is a const reference. In that case, only const methods may be called on self.

[const] QLocale locale

Description: Method QLocale QResource::locale()

void locale=(const QLocale locale)

Description: Method void QResource::setLocale(const QLocale &locale)

[static] new QResource new(string file = QString(),const QLocale locale = QLocale())

Description: Constructor QResource::QResource(const QString &file, const QLocale &locale)

This method creates an object of class QResource.

[static] bool registerResource_data(string rccData,string resourceRoot = QString())

Description: Static method bool QResource::registerResource(const unsigned char *rccData, const QString &resourceRoot)

This method is static and can be called without an instance.

[static] bool registerResource_file(string rccFilename,string resourceRoot = QString())

Description: Static method bool QResource::registerResource(const QString &rccFilename, const QString &resourceRoot)

This method is static and can be called without an instance.

[static] string[] searchPaths

Description: Static method QStringList QResource::searchPaths()

This method is static and can be called without an instance.

void setFileName(string file)

Description: Method void QResource::setFileName(const QString &file)

void setLocale(const QLocale locale)

Description: Method void QResource::setLocale(const QLocale &locale)

[const] long long size

Description: Method qint64 QResource::size()

[static] bool unregisterResource_data(string rccData,string resourceRoot = QString())

Description: Static method bool QResource::unregisterResource(const unsigned char *rccData, const QString &resourceRoot)

This method is static and can be called without an instance.

[static] bool unregisterResource_file(string rccFilename,string resourceRoot = QString())

Description: Static method bool QResource::unregisterResource(const QString &rccFilename, const QString &resourceRoot)

This method is static and can be called without an instance.