Switch to unified view

a/application.h b/application.h
1
/* application.h */
1
/* 
2
2
 * Copyright (C) 2017  J.F. Dockes
3
/* Copyright (C) 2013  Lucio Carreras
3
 * Copyright (C) 2013  Lucio Carreras
4
 *
5
 * This file is part of sayonara player
6
 *
4
 *
7
 * This program is free software: you can redistribute it and/or modify
5
 * This program is free software: you can redistribute it and/or modify
8
 * it under the terms of the GNU General Public License as published by
6
 * it under the terms of the GNU General Public License as published by
9
 * the Free Software Foundation, either version 3 of the License, or
7
 * the Free Software Foundation, either version 3 of the License, or
10
 * (at your option) any later version.
8
 * (at your option) any later version.
...
...
25
#include <memory>
23
#include <memory>
26
24
27
#include <QObject>
25
#include <QObject>
28
#include <QApplication>
26
#include <QApplication>
29
27
30
#include "libupnpp/control/mediarenderer.hxx"
31
#include "upqo/ohproduct_qo.h"
32
33
class AVTPlayer;
34
class CSettingsStorage;
35
class DirBrowser;
36
class GUI_Player;
37
class GUI_Playlist;
38
class MetaData;
28
class MetaData;
39
class OHProductQO;
40
class OHRadioQO;
41
class OHTimeQO;
42
class OHVolumeQO;
43
class Playlist;
44
class RenderingControlQO;
45
class SongcastTool;
46
class UpplayNotifications;
47
29
48
class Application : public QObject
30
class Application : public QObject
49
{
31
{
50
    Q_OBJECT;
32
    Q_OBJECT;
51
33
52
public:
34
public:
53
    Application(QApplication* qapp, QObject *parent = 0);
35
    Application(QApplication* qapp, QObject *parent = 0);
54
    virtual ~Application();
36
    virtual ~Application();
55
37
56
    bool is_initialized();
38
    bool is_initialized();
57
                        
58
    void getIdleMeta(MetaData* mdp);
39
    void getIdleMeta(MetaData* mdp);
40
    static int horizontalDPI;
59
                        
41
                            
60
public slots:
42
public slots:
61
    void chooseRenderer();
43
    void chooseRenderer();
62
    void chooseSource();
44
    void chooseSource();
63
    void openSongcast();
45
    void openSongcast();
64
    void reconnectOrChoose();
46
    void reconnectOrChoose();
65
    void onSourceTypeChanged(OHProductQO::SourceType);
47
    void onSourceTypeChanged(int);
66
    void onDirSortOrder();
48
    void onDirSortOrder();
67
    void onPrefsChanged();
49
    void onPrefsChanged();
68
    
50
    
69
private:
51
private:
70
52
    class Internal;
71
    GUI_Player   *m_player;
53
    Internal *m;
72
    std::shared_ptr<Playlist> m_playlist;
73
    DirBrowser   *m_cdb;
74
75
    UPnPClient::MRDH    m_rdr;
76
    RenderingControlQO *m_rdco;
77
    AVTPlayer    *m_avto;
78
    OHTimeQO     *m_ohtmo;
79
    OHVolumeQO   *m_ohvlo;
80
    OHProductQO  *m_ohpro;
81
    
82
    GUI_Playlist *m_ui_playlist;
83
    SongcastTool *m_sctool;
84
    UpplayNotifications *m_notifs;
85
    
86
    CSettingsStorage *m_settings;
87
    QApplication     *m_app;
88
89
    bool             m_initialized;
90
    // Can we send titles into the playlist (e.g. not OHradio).
91
    bool             m_playlistIsPlaylist;
92
    OHProductQO::SourceType m_ohsourcetype;
93
    QString          m_renderer_friendly_name;
94
54
95
    void clear_renderer();
55
    void clear_renderer();
96
    void init_connections();
56
    void init_connections();
97
    void renderer_connections();
57
    void renderer_connections();
98
    void playlist_connections();
58
    void playlist_connections();