aboutsummaryrefslogtreecommitdiff
path: root/src/qmmpui/qtfiledialog_p.h
blob: dccc89c465fe842f96e7ec9e6f676b12d6e73cf8 (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/***************************************************************************
 *   Copyright (C) 2008-2012 by Ilya Kotov                                 *
 *   forkotov02@hotmail.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 QTFILEDIALOG_H
#define QTFILEDIALOG_H

#include <QObject>

#include "filedialog.h"

class QTranslator;

/*! @internal
 * @author Vladimir Kuznetsov <vovanec@gmail.com>
 */

class QtFileDialogFactory : public QObject, public FileDialogFactory
{
    Q_OBJECT
    Q_INTERFACES(FileDialogFactory)
public:
    QtFileDialogFactory(){}
    FileDialog* create();
    const FileDialogProperties properties() const;
    void showAbout(QWidget*);
    QTranslator *createTranslator(QObject*);
    virtual ~QtFileDialogFactory()
    {
        ;
    }
};

class QtFileDialog : public FileDialog
{
public:
    virtual ~QtFileDialog();
    QString existingDirectory(QWidget *parent ,
                              const QString & ,
                              const QString &dir);

    QString openFileName(QWidget *parent,
                         const QString &caption,
                         const QString &dir,
                         const QString &filter,
                         QString *selectedFilter);

    QStringList openFileNames(QWidget *parent,
                              const QString &caption,
                              const QString &dir,
                              const QString &filter, QString *selectedFilter);

    QString saveFileName (QWidget *parent,
                          const QString &caption,
                          const QString & dir,
                          const QString &filter,
                          QString *selectedFilter);
};

#endif
9f11ea733
f75b31356
6a0e9d9d8










2111b8272





6a0e9d9d8
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) 2007-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 <QMessageBox>
#include <qmmp/qmmp.h>
#include "outputpulseaudio.h"
#include "outputpulseaudiofactory.h"


OutputProperties OutputPulseAudioFactory::properties() const
{
    OutputProperties properties;
    properties.name = tr("PulseAudio Plugin");
    properties.hasAbout = true;
    properties.hasSettings = false;
    properties.shortName = "pulse";
    return properties;
}

Output* OutputPulseAudioFactory::create()
{
    return new OutputPulseAudio();
}

Volume *OutputPulseAudioFactory::createVolume()
{
    return new VolumePulseAudio;
}

void OutputPulseAudioFactory::showSettings(QWidget* parent)
{
   Q_UNUSED(parent);
}

void OutputPulseAudioFactory::showAbout(QWidget *parent)
{
   QMessageBox::about (parent, tr("About PulseAudio Output Plugin"),
                        tr("Qmmp PulseAudio Output Plugin")+"\n"+
                       tr("Written by: Ilya Kotov <forkotov02@ya.ru>"));
}

QString OutputPulseAudioFactory::translation() const
{
    return QLatin1String(":/pulseaudio_plugin_");
}