GCompris-qt
#include <File.h>
Inherits QObject.
|
| File (QObject *parent=0) |
|
Q_INVOKABLE QString | read (const QString &name=QString()) |
|
Q_INVOKABLE bool | write (const QString &data, const QString &name=QString()) |
|
|
static Q_INVOKABLE bool | exists (const QString &path) |
|
A helper component for accessing local files from QML.
Definition at line 34 of file File.h.
File::File |
( |
QObject * |
parent = 0 | ) |
|
|
explicit |
Constructor.
Definition at line 29 of file File.cpp.
void File::error |
( |
const QString & |
msg | ) |
|
|
signal |
Emitted when an error occurs.
- Parameters
-
bool File::exists |
( |
const QString & |
path | ) |
|
|
static |
Checks whether file path
exists.
- Parameters
-
- Returns
true
if path
exists, false
otherwise.
Definition at line 122 of file File.cpp.
void File::nameChanged |
( |
| ) |
|
|
signal |
Emitted when the name changes.
QString File::read |
( |
const QString & |
name = QString() | ) |
|
Reads contents of a file.
- Parameters
-
name | [optional] Filename to read from. If omitted reads from the file specified by the member name. |
- Returns
- Whole file contents.
- See also
- name
Definition at line 61 of file File.cpp.
bool File::write |
( |
const QString & |
data, |
|
|
const QString & |
name = QString() |
|
) |
| |
Writes data
to a file.
- Parameters
-
data | Text data to write. |
name | [optional] Filename to write to. If omitted writes to the file specified by the member name. |
- Returns
- success of the operation.
- See also
- name
Definition at line 93 of file File.cpp.
Filename.
Accepted are absolute paths and URLs starting with the schemes 'file://' and 'qrc://'.
Definition at line 44 of file File.h.
The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2015 The KDE developers.
Generated on Tue Jun 2 2015 21:47:48 by
doxygen 1.8.9.1 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.