Switch to unified view

a/GUI/player/GUI_PlayerConnections.cpp b/GUI/player/GUI_PlayerConnections.cpp
...
...
18
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
 */
19
 */
20
20
21
#include "GUI/player/GUI_Player.h"
21
#include "GUI/player/GUI_Player.h"
22
22
23
void GUI_Player::setupConnections(){
23
void GUI_Player::setupConnections()
24
{
24
25
25
  connect(ui->btn_play, SIGNAL(clicked(bool)), this,
26
    connect(ui->btn_play, SIGNAL(clicked(bool)), this,
26
          SLOT(playClicked(bool)));
27
            SLOT(playClicked(bool)));
27
  connect(ui->btn_fw, SIGNAL(clicked(bool)), this,
28
    connect(ui->btn_fw, SIGNAL(clicked(bool)), this,
28
          SLOT(forwardClicked(bool)));
29
            SLOT(forwardClicked(bool)));
29
  connect(ui->btn_bw, SIGNAL(clicked(bool)), this,
30
    connect(ui->btn_bw, SIGNAL(clicked(bool)), this,
30
          SLOT(backwardClicked(bool)));
31
            SLOT(backwardClicked(bool)));
31
    connect(ui->btn_stop, SIGNAL(clicked()), this,
32
    connect(ui->btn_stop, SIGNAL(clicked()), this,
32
            SLOT(stopClicked()));
33
            SLOT(stopClicked()));
33
  connect(ui->btn_mute, SIGNAL(released()), this,
34
    connect(ui->btn_mute, SIGNAL(released()), this,
34
          SLOT(muteButtonPressed()));
35
            SLOT(muteButtonPressed()));
35
  connect(ui->btn_rec, SIGNAL(toggled(bool)), this,
36
    connect(ui->btn_rec, SIGNAL(toggled(bool)), this,
36
              SLOT(sl_rec_button_toggled(bool)));
37
            SLOT(sl_rec_button_toggled(bool)));
37
  connect(ui->btn_correct, SIGNAL(clicked(bool)), this,
38
    connect(ui->btn_correct, SIGNAL(clicked(bool)), this,
38
          SLOT(correct_btn_clicked(bool)));
39
            SLOT(correct_btn_clicked(bool)));
39
  connect(ui->albumCover, SIGNAL(clicked()), this, SLOT(coverClicked()));
40
    connect(ui->albumCover, SIGNAL(clicked()), this, SLOT(coverClicked()));
40
41
41
  // file
42
    // file
42
        connect(ui->actionChange_Media_Renderer, SIGNAL(triggered(bool)), 
43
    connect(ui->actionChange_Media_Renderer, SIGNAL(triggered(bool)),
43
                this, SLOT(onChangeMediaRenderer()));
44
            this, SLOT(onChangeMediaRenderer()));
44
45
45
  connect(ui->action_Close, SIGNAL(triggered(bool)), this,
46
    connect(ui->action_Close, SIGNAL(triggered(bool)), this,
46
              SLOT(really_close(bool)));
47
            SLOT(really_close(bool)));
47
48
48
49
49
  // view
50
    // view
50
  connect(ui->action_viewLibrary, SIGNAL(toggled(bool)), this,
51
    connect(ui->action_viewLibrary, SIGNAL(toggled(bool)), this,
51
          SLOT(showLibrary(bool)));
52
            SLOT(showLibrary(bool)));
52
  connect(ui->action_Dark, SIGNAL(toggled(bool)), this,
53
    connect(ui->action_Dark, SIGNAL(toggled(bool)), this,
53
          SLOT(changeSkin(bool)));
54
            SLOT(changeSkin(bool)));
54
55
55
  connect(ui->action_smallPlaylistItems, SIGNAL(toggled(bool)), this,
56
    connect(ui->action_smallPlaylistItems, SIGNAL(toggled(bool)), this,
56
          SLOT(small_playlist_items_toggled(bool)));
57
            SLOT(small_playlist_items_toggled(bool)));
57
  connect(ui->action_showOnlyTracks, SIGNAL(toggled(bool)), this,
58
    connect(ui->action_showOnlyTracks, SIGNAL(toggled(bool)), this,
58
          SLOT(sl_show_only_tracks(bool)));
59
            SLOT(sl_show_only_tracks(bool)));
59
  connect(ui->action_Fullscreen, SIGNAL(toggled(bool)), this,
60
    connect(ui->action_Fullscreen, SIGNAL(toggled(bool)), this,
60
          SLOT(show_fullscreen_toggled(bool)));
61
            SLOT(show_fullscreen_toggled(bool)));
61
62
62
63
63
  // preferencesF
64
    // preferencesF
64
    connect(ui->action_Language, SIGNAL(triggered(bool)), this,
65
    connect(ui->action_Language, SIGNAL(triggered(bool)), this,
65
            SLOT(sl_action_language_toggled(bool)));
66
            SLOT(sl_action_language_toggled(bool)));
66
  connect(ui->action_lastFM, SIGNAL(triggered(bool)), this,
67
    connect(ui->action_lastFM, SIGNAL(triggered(bool)), this,
67
          SLOT(lastFMClicked(bool)));
68
            SLOT(lastFMClicked(bool)));
68
  connect(ui->action_setLibPath, SIGNAL(triggered(bool)), this,
69
    connect(ui->action_setLibPath, SIGNAL(triggered(bool)), this,
69
          SLOT(setLibraryPathClicked(bool)));
70
            SLOT(setLibraryPathClicked(bool)));
70
//    connect(ui->action_startup, SIGNAL(triggered(bool)), ui_startup_dialog,
71
//    connect(ui->action_startup, SIGNAL(triggered(bool)), ui_startup_dialog,
71
//            SLOT(show()));
72
//            SLOT(show()));
72
  connect(ui->action_min2tray, SIGNAL(toggled(bool)), this,
73
    connect(ui->action_min2tray, SIGNAL(toggled(bool)), this,
73
          SLOT(min2tray_toggled(bool)));
74
            SLOT(min2tray_toggled(bool)));
74
  connect(ui->action_only_one_instance, SIGNAL(toggled(bool)), this,
75
    connect(ui->action_only_one_instance, SIGNAL(toggled(bool)), this,
75
              SLOT(only_one_instance_toggled(bool)));
76
            SLOT(only_one_instance_toggled(bool)));
76
77
77
  connect(ui->action_streamrecorder, SIGNAL(triggered(bool)), this,
78
    connect(ui->action_streamrecorder, SIGNAL(triggered(bool)), this,
78
          SLOT(sl_action_streamripper_toggled(bool)));
79
            SLOT(sl_action_streamripper_toggled(bool)));
79
#if 0
80
#if 0
80
    connect(ui->action_notifications, SIGNAL(triggered(bool)), ui_notifications,
81
    connect(ui->action_notifications, SIGNAL(triggered(bool)), ui_notifications,
81
            SLOT(show()));
82
            SLOT(show()));
82
  connect(ui->action_SocketConnection, SIGNAL(triggered(bool)), this,
83
    connect(ui->action_SocketConnection, SIGNAL(triggered(bool)), this,
83
          SLOT(sl_action_socket_connection_triggered(bool)));
84
            SLOT(sl_action_socket_connection_triggered(bool)));
84
85
85
    connect(ui->action_livesearch, SIGNAL(triggered(bool)), this,
86
    connect(ui->action_livesearch, SIGNAL(triggered(bool)), this,
86
            SLOT(sl_live_search(bool)));
87
            SLOT(sl_live_search(bool)));
87
    connect(ui->action_notifyNewVersion, SIGNAL(triggered(bool)), this,
88
    connect(ui->action_notifyNewVersion, SIGNAL(triggered(bool)), this,
88
            SLOT(sl_notify_new_version(bool)));
89
            SLOT(sl_notify_new_version(bool)));
89
#endif
90
#endif
90
91
91
  // about
92
    // about
92
  connect(ui->action_about, SIGNAL(triggered(bool)), this, SLOT(about(bool)));
93
    connect(ui->action_about, SIGNAL(triggered(bool)), this, SLOT(about(bool)));
93
94
94
  connect(ui->action_help, SIGNAL(triggered(bool)), this, SLOT(help(bool)));
95
    connect(ui->action_help, SIGNAL(triggered(bool)), this, SLOT(help(bool)));
95
    connect(m_trayIcon, SIGNAL(onVolumeChangedByWheel(int)), this, SLOT(volumeChangedByTick(int)));
96
    connect(m_trayIcon, SIGNAL(onVolumeChangedByWheel(int)), this, SLOT(volumeChangedByTick(int)));
96
97
97
98
98
    connect(ui->volumeSlider, SIGNAL(searchSliderMoved(int)), this,
99
    connect(ui->volumeSlider, SIGNAL(searchSliderMoved(int)), this,
99
          SLOT(volumeChanged(int)));
100
            SLOT(volumeChanged(int)));
100
    connect(ui->volumeSlider, SIGNAL(searchSliderReleased(int)), this,
101
    connect(ui->volumeSlider, SIGNAL(searchSliderReleased(int)), this,
101
          SLOT(volumeChanged(int)));
102
            SLOT(volumeChanged(int)));
102
    connect(ui->volumeSlider, SIGNAL(searchSliderPressed(int)), this,
103
    connect(ui->volumeSlider, SIGNAL(searchSliderPressed(int)), this,
103
          SLOT(volumeChanged(int)));
104
            SLOT(volumeChanged(int)));
104
105
105
    connect(ui->songProgress, SIGNAL(searchSliderReleased(int)), this,
106
    connect(ui->songProgress, SIGNAL(searchSliderReleased(int)), this,
106
          SLOT(setProgressJump(int)));
107
            SLOT(setProgressJump(int)));
107
//    connect(ui->songProgress, SIGNAL(searchSliderPressed(int)), this,
108
//    connect(ui->songProgress, SIGNAL(searchSliderPressed(int)), this,
108
//            SLOT(setProgressJump(int)));
109
//            SLOT(setProgressJump(int)));
109
    connect(ui->songProgress, SIGNAL(searchSliderMoved(int)), this,
110
    connect(ui->songProgress, SIGNAL(searchSliderMoved(int)), this,
110
            SLOT(setProgressJump(int)));
111
            SLOT(setProgressJump(int)));
111
112
112
113
113
114
114
  // cover lookup
115
    // cover lookup
115
#if 0
116
#if 0
116
    connect(m_cov_lookup, SIGNAL(sig_covers_found(const QStringList&, QString)),
117
    connect(m_cov_lookup, SIGNAL(sig_covers_found(const QStringList&, QString)),
117
            this, SLOT(covers_found(const QStringList&, QString)));
118
            this, SLOT(covers_found(const QStringList&, QString)));
118
119
119
    connect(m_alternate_covers, SIGNAL(sig_covers_changed(QString, QString)),
120
    connect(m_alternate_covers, SIGNAL(sig_covers_changed(QString, QString)),
120
            this,             SLOT(sl_alternate_cover_available(QString, QString)));
121
            this,               SLOT(sl_alternate_cover_available(QString, QString)));
121
122
122
    connect(m_alternate_covers, SIGNAL(sig_no_cover()),
123
    connect(m_alternate_covers, SIGNAL(sig_no_cover()),
123
            this,             SLOT(sl_no_cover_available()));
124
            this,               SLOT(sl_no_cover_available()));
124
125
125
126
126
    // notifications
127
    // notifications
127
    connect(ui_notifications, SIGNAL(sig_settings_changed(bool,int)),
128
    connect(ui_notifications, SIGNAL(sig_settings_changed(bool, int)),
128
            this, SLOT(notification_changed(bool,int)));
129
            this, SLOT(notification_changed(bool, int)));
129
130
130
    // language chooser
131
    // language chooser
131
    connect(ui_language_chooser, SIGNAL(sig_language_changed(QString)),
132
    connect(ui_language_chooser, SIGNAL(sig_language_changed(QString)),
132
            this, SLOT(language_changed(QString)));
133
            this, SLOT(language_changed(QString)));
133
134
134
135
135
    connect(m_async_wa, SIGNAL(finished()), this, SLOT(async_wa_finished()));
136
    connect(m_async_wa, SIGNAL(finished()), this, SLOT(async_wa_finished()));
136
    
137
137
    if(ui_libpath)
138
    if (ui_libpath) {
138
        connect(ui_libpath, SIGNAL(sig_library_path_set()), this, SLOT(setLibraryPathClicked()));
139
        connect(ui_libpath, SIGNAL(sig_library_path_set()), this, SLOT(setLibraryPathClicked()));
140
    }
139
#endif
141
#endif
140
142
141
143
142
    QList<QKeySequence> lst;
144
    QList<QKeySequence> lst;
143
    lst << QKeySequence(Qt::Key_MediaTogglePlayPause) << QKeySequence(Qt::Key_MediaPlay) << QKeySequence(Qt::Key_MediaPause) << QKeySequence(Qt::Key_Space);
145
    lst << QKeySequence(Qt::Key_MediaTogglePlayPause) << QKeySequence(Qt::Key_MediaPlay) << QKeySequence(Qt::Key_MediaPause) << QKeySequence(Qt::Key_Space);