00001 00008 #ifndef CONTEXT_H_ 00009 #define CONTEXT_H_ 00010 00011 #include <QString> 00012 00013 #include "core/resourcecontainer.h" 00014 00015 class CASheet; 00016 class CAMusElement; 00017 00018 class CAContext 00019 : public CAResourceContainer { 00020 public: 00021 CAContext( const QString name, CASheet *s ); 00022 virtual ~CAContext(); 00023 virtual CAContext* clone( CASheet* ) = 0; 00024 00025 enum CAContextType { 00026 Staff, 00027 FunctionMarkingContext, 00028 LyricsContext 00029 }; 00030 00031 const QString name() { return _name; } 00032 void setName(const QString name) { _name = name; } 00033 00034 CAContextType contextType() { return _contextType; } 00035 00036 CASheet *sheet() { return _sheet; } 00037 void setSheet(CASheet *sheet) { _sheet = sheet; } 00038 00039 virtual void clear() = 0; 00040 virtual CAMusElement *next(CAMusElement *elt) = 0; 00041 virtual CAMusElement *previous(CAMusElement *elt) = 0; 00042 virtual bool remove( CAMusElement *elt ) = 0; 00043 00044 protected: 00045 void setContextType( CAContextType t ) { _contextType = t; } 00046 00047 CASheet *_sheet; 00048 QString _name; 00049 CAContextType _contextType; 00050 }; 00051 #endif /* CONTEXT_H_ */
1.5.3