/media/hdb5/canorusNightlyBuildSystem/trunk/src/core/fileformats.cpp

Go to the documentation of this file.
00001 
00008 #include <QObject>
00009 #include "core/fileformats.h"
00010 
00018 const QString CAFileFormats::CANORUSML_FILTER = QObject::tr("Canorus document (*.xml)");
00019 const QString CAFileFormats::CAN_FILTER       = QObject::tr("Canorus archive (*.can)");
00020 const QString CAFileFormats::LILYPOND_FILTER  = QObject::tr("LilyPond document (*.ly)");
00021 const QString CAFileFormats::MUSICXML_FILTER  = QObject::tr("MusicXML document (*.xml)");
00022 const QString CAFileFormats::NOTEEDIT_FILTER  = QObject::tr("NoteEdit document (*.not)");
00023 const QString CAFileFormats::ABCMUSIC_FILTER  = QObject::tr("ABC music document (*.abc)");
00024 const QString CAFileFormats::FINALE_FILTER    = QObject::tr("Finale document (*.mus)");
00025 const QString CAFileFormats::SIBELIUS_FILTER  = QObject::tr("Sibelius document (*.sib)");
00026 const QString CAFileFormats::CAPELLA_FILTER   = QObject::tr("Capella document (*.cap)");
00027 const QString CAFileFormats::MIDI_FILTER      = QObject::tr("Midi file (*.mid *.midi)");
00028 
00032 const QString CAFileFormats::getFilter( const CAFileFormats::CAFileFormatType t ) {
00033         switch (t) {
00034                 case CanorusML:
00035                         return CANORUSML_FILTER;
00036                 case Can:
00037                         return CAN_FILTER;
00038                 case LilyPond:
00039                         return LILYPOND_FILTER;
00040                 case MusicXML:
00041                         return MUSICXML_FILTER;
00042                 default:
00043                         return CANORUSML_FILTER;
00044         }
00045 }
00046 
00050 const CAFileFormats::CAFileFormatType CAFileFormats::getType( const QString t ) {
00051         if (t==CANORUSML_FILTER)
00052                 return CanorusML;
00053         else
00054         if (t==CAN_FILTER)
00055                 return Can;
00056         if (t==LILYPOND_FILTER)
00057                 return LilyPond;
00058         else
00059         if (t==MUSICXML_FILTER)
00060                 return MusicXML;
00061         else
00062                 return CanorusML;
00063 }

Generated on Sat Feb 9 13:06:25 2008 for Canorus by  doxygen 1.5.3