aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/FileDialogs/QmmpFileDialog/CMakeLists.txt
blob: 1b606ee3f138944af9fe215fea1a37ad324d63cd (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
53
54
55
56
57
58
59
60
61
project(libqmmpfiledialog)

cmake_minimum_required(VERSION 2.4.7)

if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)


# qt plugin
ADD_DEFINITIONS( -Wall )
ADD_DEFINITIONS(${QT_DEFINITIONS})
ADD_DEFINITIONS(-DQT_PLUGIN)
ADD_DEFINITIONS(-DQT_NO_DEBUG)
ADD_DEFINITIONS(-DQT_SHARED)
ADD_DEFINITIONS(-DQT_THREAD)

include_directories(${CMAKE_CURRENT_BINARY_DIR})

SET(QT_INCLUDES
  ${QT_INCLUDES}
  ${CMAKE_CURRENT_SOURCE_DIR}/../../../
)

# libqmmpui
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../../)
link_directories(${CMAKE_CURRENT_BINARY_DIR}/../../../qmmpui)

SET(libqmmpfiledialog_SRCS
    qmmpfiledialogimpl.cpp
    qmmpfiledialog.cpp
)

SET(libqmmpfiledialog_MOC_HDRS
    qmmpfiledialogimpl.h
    qmmpfiledialog.h
)

SET(libqmmpfiledialog_RCCS
    translations/translations.qrc)

QT4_ADD_RESOURCES(libqmmpfiledialog_RCC_SRCS ${libqmmpfiledialog_RCCS})

QT4_WRAP_CPP(libqmmpfiledialog_MOC_SRCS ${libqmmpfiledialog_MOC_HDRS})

# user interface


SET(libqmmpfiledialog_UIS
    qmmpfiledialog.ui
)

QT4_WRAP_UI(libqmmpfiledialog_UIS_H ${libqmmpfiledialog_UIS})
# Don't forget to include output directory, otherwise
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_BINARY_DIR})

ADD_LIBRARY(qmmpfiledialog SHARED ${libqmmpfiledialog_SRCS} ${libqmmpfiledialog_MOC_SRCS} ${libqmmpfiledialog_UIS_H} ${libqmmpfiledialog_RCC_SRCS})
add_dependencies(qmmpfiledialog qmmpui)
target_link_libraries(qmmpfiledialog ${QT_LIBRARIES} -lqmmpui)
install(TARGETS qmmpfiledialog DESTINATION ${LIB_DIR}/qmmp/FileDialogs)
putfactory.cpp?id=5c707aac4f1c5246443fee32f5629881ecc134c5'>5c707aac4
5c707aac4

e394c172c
136f634c6

ed3828f0d
2111b8272
e25633e95
0006966c0
eb05b493c
0006966c0

0006966c0


136f634c6
6eead1622
136f634c6



5c707aac4


e394c172c

5c707aac4






41c8a60a2
5c707aac4
2111b8272




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
                                                                            
                                                                            
                                                                            













                                                                            
                                                                            
                                                                             
 
                   
                      

                         
                           

                             
 
                                                          
 
                                     
                                                           

                                        


                                  
 
 



                                                                          


                                                    

                                                   






                                                                                       
                                                                         
 




                                             
/***************************************************************************
 *   Copyright (C) 2009-2016 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 <QtPlugin>
#include <QMessageBox>
#include <curl/curlver.h>
#include <qmmp/qmmp.h>
#include "settingsdialog.h"
#include "httpinputsource.h"
#include "httpinputfactory.h"

InputSourceProperties HTTPInputFactory::properties() const
{
    InputSourceProperties properties;
    properties.protocols = QStringList { "http", "https" };
    properties.name = tr("HTTP Plugin");
    properties.shortName = "http";
    properties.hasAbout = true;
    properties.hasSettings = true;
    return properties;
}

InputSource *HTTPInputFactory::create(const QString &url, QObject *parent)
{
    return new HTTPInputSource(url, parent);
}

void HTTPInputFactory::showSettings(QWidget *parent)
{
    SettingsDialog *s = new SettingsDialog(parent);
    s->show();
}

void HTTPInputFactory::showAbout(QWidget *parent)
{
    QMessageBox::about (parent, tr("About HTTP Transport Plugin"),
                        tr("Qmmp HTTP Transport Plugin")+"\n"+
                        tr("Compiled against libcurl-%1").arg(LIBCURL_VERSION) + "\n" +
                        tr("Written by: Ilya Kotov <forkotov02@ya.ru>"));
}

QString HTTPInputFactory::translation() const
{
    return QLatin1String(":/http_plugin_");
}