aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Visual/projectm/projectmwrapper.h
blob: 20580c3dd86e95e771b502b1c6e23c6ff1ba73cc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/***************************************************************************
 *   Copyright (C) 2013-2021 by Ilya Kotov                                 *
 *   forkotov02@ya.ru                                                      *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
 ***************************************************************************/

#ifndef PROJECTMWRAPPER_H
#define PROJECTMWRAPPER_H

#include <QObject>
#include <libprojectM/projectM.hpp>

class ProjectMWrapper : public QObject, public projectM
{
    Q_OBJECT
public:
    explicit ProjectMWrapper(const std::string &config_file, int flags, QObject *parent = nullptr);
    explicit ProjectMWrapper(const Settings &settings, int flags, QObject *parent = nullptr);

    virtual ~ProjectMWrapper();

signals:
    void currentPresetChanged(int index) const;

public slots:
    void selectPreset(int index);

private:
#ifdef PROJECTM_31
    void presetSwitchedEvent(bool isHardCut, size_t index) const override;
#else
    void presetSwitchedEvent(bool isHardCut, unsigned int index) const override;
#endif


};

#endif // PROJECTMWRAPPER_H
32-0410-971d-27865f9a5e38> 2008-06-04 09:51:40 +0000 moved playlist formats support to plugins' href='/qmmp/commit/src/plugins/PlaylistFormats/xspf/xspfplaylistformat.cpp?h=main&id=a4da0eb5e46e178d34a848b5fdb76dd8453510cd'>a4da0eb5e
b2576ddc1
7ff6e6a4f
845322411
a4da0eb5e
7ff6e6a4f








60b4d7b8d
7ff6e6a4f
b2576ddc1
baf97dd40
7ff6e6a4f



b2576ddc1

7ff6e6a4f


b2576ddc1

7ff6e6a4f
b2576ddc1

7ff6e6a4f

aa167f22d
7ff6e6a4f
aa167f22d
b2576ddc1


aa167f22d
b2576ddc1


aa167f22d
b2576ddc1


aa167f22d
b2576ddc1


aa167f22d
b2576ddc1


aa167f22d
7ff6e6a4f



baf97dd40
60b4d7b8d
7ff6e6a4f




a4da0eb5e




b2576ddc1
a4da0eb5e
b2576ddc1

7ff6e6a4f








a4da0eb5e

b2576ddc1
a4da0eb5e
7ff6e6a4f
a4da0eb5e
7ff6e6a4f
aa167f22d
b2576ddc1
aa167f22d
b2576ddc1
aa167f22d
b2576ddc1
aa167f22d
b2576ddc1






aa167f22d
b2576ddc1
7ff6e6a4f













a4da0eb5e

7ff6e6a4f



a4da0eb5e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
                                                                            
                                                                            
                                                                            













                                                                            
                                                                            

                                                                             

                           


                    
                      



                                                                         




                                                                                         
                                             


             
                                                                            
 
                              
                       
                                                        
 








                                                 
 
                                        
                                          
     



                                               

                                           


                                                           

                             
 

                                        

                                                                                 
                                                                                                                
                    
                                                                                              


                                          
                                                                         


                                            
                                                                          


                                               
                                                                           


                                          
                                                                         


                                                                                    
                                                                        



                                         
     
 




                                                                                    




                                                                         
                                                                                              
 

                                                      








                                                                  

                    
                                    
     
                                       
 
                    
                                      
         
                                                           
         
                                                              
         
                                  






                                                   
                                                                                      
         













                                                                    

                   



                                      
 
/***************************************************************************
 *   Copyright (C) 2008-2019 by Ilya Kotov                                 *
 *   forkotov02@ya.ru                                                      *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
 ***************************************************************************/

#include <QXmlStreamReader>
#include <QXmlStreamWriter>
#include <QFileInfo>
#include <QUrl>
#include <QtPlugin>
#include <qmmp/qmmp.h>
#include "xspfplaylistformat.h"

// Needs more work - it's better use libSpiff there and put it as plugin.

const PlayListFormatProperties XSPFPlaylistFormat::XSPFPlaylistFormat::properties() const
{
    PlayListFormatProperties p;
    p.filters << "*.xspf";
    p.shortName = "xspf";
    p.contentTypes << "application/xspf+xml";
    return p;
}

QList<PlayListTrack*> XSPFPlaylistFormat::decode(const QByteArray &contents)
{
    QList<PlayListTrack*> out;
    QString currentTag;
    QString contents_copy = QString::fromUtf8(contents);

    //remove control symbols to avoid xml errors