lmms
Cross-platform music production software
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 <filesystem>
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
52 virtual bool tryExport(const TrackContainer::TrackList& tracks,
53 const TrackContainer::TrackList& patternTracks,
54 int tempo, int masterPitch, const std::filesystem::path& filePath) = 0;
55
56protected:
57
58 void saveSettings( QDomDocument &, QDomElement & ) override
59 {
60 }
61
62 void loadSettings( const QDomElement & ) override
63 {
64 }
65
66 QString nodeName() const override
67 {
68 return "import_filter";
69 }
70
71
72private:
73
74} ;
75
76
77} // namespace lmms
78
79#endif // LMMS_EXPORT_FILTER_H
virtual bool tryExport(const TrackContainer::TrackList &tracks, const TrackContainer::TrackList &patternTracks, int tempo, int masterPitch, const std::filesystem::path &filePath)=0
Exports the project to a file.
ExportFilter(const Descriptor *_descriptor)
Definition ExportFilter.h:42
QString nodeName() const override
Definition ExportFilter.h:66
void loadSettings(const QDomElement &) override
Definition ExportFilter.h:62
void saveSettings(QDomDocument &, QDomElement &) override
Definition ExportFilter.h:58
~ExportFilter() override=default
Plugin(const Descriptor *descriptor, Model *parent, const Descriptor::SubPluginFeatures::Key *key=nullptr)
Constructor of a plugin.
Definition Plugin.cpp:60
std::vector< Track * > TrackList
Definition TrackContainer.h:52
Definition RemotePluginBase.cpp:34
Definition Plugin.h:92