ExportFilter.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*
  2. * ExportFilter.h - declaration of class ExportFilter, the base-class for all
  3. * file export filters
  4. *
  5. * Copyright (c) 2006-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
  6. *
  7. * This file is part of LMMS - https://lmms.io
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public
  11. * License as published by the Free Software Foundation; either
  12. * version 2 of the License, or (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. * General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public
  20. * License along with this program (see COPYING); if not, write to the
  21. * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  22. * Boston, MA 02110-1301 USA.
  23. *
  24. */
  25. #ifndef EXPORT_FILTER_H
  26. #define EXPORT_FILTER_H
  27. #include <QtCore/QFile>
  28. #include "TrackContainer.h"
  29. #include "Plugin.h"
  30. class EXPORT ExportFilter : public Plugin
  31. {
  32. public:
  33. ExportFilter( const Descriptor * _descriptor ) : Plugin( _descriptor, NULL ) {}
  34. virtual ~ExportFilter() {}
  35. virtual bool tryExport(const TrackContainer::TrackList &tracks,
  36. const TrackContainer::TrackList &tracksBB,
  37. int tempo, int masterPitch, const QString &filename ) = 0;
  38. protected:
  39. virtual void saveSettings( QDomDocument &, QDomElement & )
  40. {
  41. }
  42. virtual void loadSettings( const QDomElement & )
  43. {
  44. }
  45. virtual QString nodeName() const
  46. {
  47. return "import_filter";
  48. }
  49. private:
  50. } ;
  51. #endif