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