LMMS
Loading...
Searching...
No Matches
ExportFilter.h
Go to the documentation of this file.
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
26#ifndef LMMS_EXPORT_FILTER_H
27#define LMMS_EXPORT_FILTER_H
28
29#include <QFile>
30
31#include "TrackContainer.h"
32#include "Plugin.h"
33
34
35namespace lmms
36{
37
38
39class LMMS_EXPORT ExportFilter : public Plugin
40{
41public:
42 ExportFilter( const Descriptor * _descriptor ) : Plugin( _descriptor, nullptr ) {}
43 ~ExportFilter() override = default;
44
45
46 virtual bool tryExport(const TrackContainer::TrackList &tracks,
47 const TrackContainer::TrackList &patternTracks,
48 int tempo, int masterPitch, const QString &filename ) = 0;
49protected:
50
51 void saveSettings( QDomDocument &, QDomElement & ) override
52 {
53 }
54
55 void loadSettings( const QDomElement & ) override
56 {
57 }
58
59 QString nodeName() const override
60 {
61 return "import_filter";
62 }
63
64
65private:
66
67} ;
68
69
70} // namespace lmms
71
72#endif // LMMS_EXPORT_FILTER_H
#define nullptr
Definition DistrhoDefines.h:75
ExportFilter(const Descriptor *_descriptor)
Definition ExportFilter.h:42
virtual bool tryExport(const TrackContainer::TrackList &tracks, const TrackContainer::TrackList &patternTracks, int tempo, int masterPitch, const QString &filename)=0
QString nodeName() const override
Definition ExportFilter.h:59
void loadSettings(const QDomElement &) override
Definition ExportFilter.h:55
void saveSettings(QDomDocument &, QDomElement &) override
Definition ExportFilter.h:51
~ExportFilter() override=default
Plugin(const Descriptor *descriptor, Model *parent, const Descriptor::SubPluginFeatures::Key *key=nullptr)
Definition Plugin.cpp:60
std::vector< Track * > TrackList
Definition TrackContainer.h:52
Definition AudioAlsa.cpp:35
QString filename
Definition HydrogenImport.cpp:42
Definition Plugin.h:92