|
Canorus
0.0
|
Different resources included in the file. More...
#include <resource.h>
Public Types | |
| enum | CAResourceType { Undefined =-1, Image, Sound, Movie, Document, Other } |
Public Member Functions | |
| CAResource (QUrl fileName, QString name, bool linked=false, CAResourceType t=Other, CADocument *c=0) | |
| virtual | ~CAResource () |
| void | setName (const QString n) |
| const QString | name () |
| void | setDescription (const QString n) |
| const QString | description () |
| void | setUrl (const QUrl url) |
| const QUrl | url () |
| void | setResourceType (const CAResourceType t) |
| const CAResourceType | resourceType () |
| void | setLinked (bool l) |
| bool | isLinked () |
| void | setDocument (CADocument *d) |
| CADocument * | document () |
| bool | copy (QString fileName) |
Static Public Member Functions | |
| static QString | resourceTypeToString (CAResourceType type) |
| static CAResourceType | resourceTypeFromString (QString type) |
Private Attributes | |
| QString | _name |
| QString | _description |
| QUrl | _url |
| CAResourceType | _resType |
| bool | _linked |
| CADocument * | _document |
Different resources included in the file.
Copyright (c) 2008-2009, Matevž Jekovec, Canorus development team All Rights Reserved. See AUTHORS for a complete list of authors.
Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE.GPL for details.
CAResource is a wrapper for any file attached to the document. Resource files are usually the recorded midi files, transcripts of the score or a scanned music, audio and video files, score in other formats, images in the score etc.
CAResource contains a valid absolute path (_fileName) to the actual file:
When the resources are saved, internal resources are saved as
| CAResource::CAResource | ( | QUrl | url, |
| QString | name, | ||
| bool | linked = false, |
||
| CAResourceType | t = Other, |
||
| CADocument * | parent = 0 |
||
| ) |
Default constructor.
References name(), setDocument(), setLinked(), setName(), setResourceType(), setUrl(), and url().

|
virtual |
References document(), isLinked(), CADocument::removeResource(), and url().

| bool CAResource::copy | ( | QString | fileName | ) |
Copies the resource to the specified fileName. Overwrites the specified fileName, if the file already exists.
References url().
Referenced by CAResourceView::contextMenuEvent(), and CACanorusMLExport::exportResources().


|
inline |
References _description.
Referenced by CACanorusMLExport::exportResources().

|
inline |
References _document.
Referenced by CAResourceCtl::createEmptyResource(), CAResourceCtl::deleteResource(), and ~CAResource().

|
inline |
References _linked.
Referenced by CAResourceView::contextMenuEvent(), CACanExport::exportDocumentImpl(), CACanorusMLExport::exportResources(), CACanImport::importDocumentImpl(), and ~CAResource().

|
inline |
References _name.
Referenced by CAResource(), CAResourceView::contextMenuEvent(), CACanorusMLExport::exportResources(), and CACanImport::importDocumentImpl().

|
inline |
References _resType.
Referenced by CACanorusMLExport::exportResources().

|
static |
|
static |
|
inline |
References _description.
Referenced by CACanorusMLImport::importResource().

|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Referenced by CAResource(), and CACanImport::importDocumentImpl().


|
inline |
References _url.
Referenced by CAResource(), copy(), CACanExport::exportDocumentImpl(), CACanorusMLExport::exportResources(), CACanImport::importDocumentImpl(), setUrl(), CAMidiRecorder::startRecording(), and ~CAResource().

|
private |
Referenced by description(), and setDescription().
|
private |
Referenced by document(), and setDocument().
|
private |
Referenced by isLinked(), and setLinked().
|
private |
Referenced by resourceType(), and setResourceType().