CAResource Class Reference

Different resources included in the file. More...

#include <resource.h>

List of all members.

Public Types

enum  CAResourceType {
  Image, Sound, Movie, Document,
  Other
}

Public Member Functions

 CAResource (QString fileName, QString name, bool linked=false, CAResourceType t=Other)
virtual ~CAResource ()
void setName (const QString n)
const QString name ()
void setFileName (const QString file)
const QString fileName ()
void setResourceType (const CAResourceType t)
const CAResourceType resourceType ()
void setLinked (bool l)
bool isLinked ()

Private Attributes

QString _name
QString _fileName
CAResourceType _resType
bool _linked


Detailed Description

Different resources included in the file.

Copyright (c) 2007, 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.

Copyright (c) 2006-2007, 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 included or linked from the document itself. Additional files are usually transcripts of the score in a pdf format, audio and video files, score in other formats, images in the score etc.

CAResource contains a valid path (_fileName) to the actual file. If the resource is external (not included in file), _linked is True and a _fileName is the absolute path of the linked file. If the resource is internal (included in the file), _linked is False and a _fileName is an absolute path to the extracted file in the system temporary directory.

See also:
CAResourceContainer

Definition at line 13 of file resource.h.


Member Enumeration Documentation

enum CAResource::CAResourceType

Enumerator:
Image 
Sound 
Movie 
Document 
Other 

Definition at line 15 of file resource.h.


Constructor & Destructor Documentation

CAResource::CAResource ( QString  fileName,
QString  name,
bool  linked = false,
CAResourceType  t = Other 
)

Default constructor.

Definition at line 31 of file resource.cpp.

References setFileName(), setLinked(), setName(), and setResourceType().

Here is the call graph for this function:

CAResource::~CAResource (  )  [virtual]

Definition at line 38 of file resource.cpp.

References fileName(), and isLinked().

Here is the call graph for this function:


Member Function Documentation

void CAResource::setName ( const QString  n  )  [inline]

Definition at line 26 of file resource.h.

References _name.

Referenced by CAResource().

Here is the caller graph for this function:

const QString CAResource::name (  )  [inline]

Definition at line 27 of file resource.h.

References _name.

void CAResource::setFileName ( const QString  file  )  [inline]

Definition at line 29 of file resource.h.

References _fileName.

Referenced by CAResource().

Here is the caller graph for this function:

const QString CAResource::fileName (  )  [inline]

Definition at line 30 of file resource.h.

References _fileName.

Referenced by ~CAResource().

Here is the caller graph for this function:

void CAResource::setResourceType ( const CAResourceType  t  )  [inline]

Definition at line 32 of file resource.h.

References _resType.

Referenced by CAResource().

Here is the caller graph for this function:

const CAResourceType CAResource::resourceType (  )  [inline]

Definition at line 33 of file resource.h.

References _resType.

void CAResource::setLinked ( bool  l  )  [inline]

Definition at line 35 of file resource.h.

References _linked.

Referenced by CAResource().

Here is the caller graph for this function:

bool CAResource::isLinked (  )  [inline]

Definition at line 36 of file resource.h.

References _linked.

Referenced by CACanExport::exportDocumentImpl(), and ~CAResource().

Here is the caller graph for this function:


Member Data Documentation

QString CAResource::_name [private]

Definition at line 39 of file resource.h.

Referenced by name(), and setName().

QString CAResource::_fileName [private]

Definition at line 40 of file resource.h.

Referenced by fileName(), and setFileName().

CAResourceType CAResource::_resType [private]

Definition at line 41 of file resource.h.

Referenced by resourceType(), and setResourceType().

bool CAResource::_linked [private]

Definition at line 42 of file resource.h.

Referenced by isLinked(), and setLinked().


The documentation for this class was generated from the following files:
Generated on Sat Feb 9 13:20:24 2008 for Canorus by  doxygen 1.5.3