mirror of
https://github.com/projectM-visualizer/projectm.git
synced 2026-03-01 21:16:01 +00:00
handle presetSwitchFailedEvent in projectM-qt (then android later)
This commit is contained in:
@ -36,7 +36,7 @@ class QProjectM : public QObject, public projectM {
|
||||
}
|
||||
|
||||
void presetSwitchFailedEvent(bool hardCut, unsigned int index, const std::string & message) const {
|
||||
presetSwitchFailedSignal(hardCut, index, message);
|
||||
presetSwitchFailedSignal(hardCut, index, QString(message.c_str()));
|
||||
}
|
||||
|
||||
void presetRatingChanged(unsigned int index, int rating,
|
||||
@ -46,7 +46,7 @@ class QProjectM : public QObject, public projectM {
|
||||
|
||||
signals:
|
||||
void presetSwitchedSignal(bool hardCut, unsigned int index) const;
|
||||
void presetSwitchFailedSignal(bool hardCut, unsigned int index, const std::string & message) const;
|
||||
void presetSwitchFailedSignal(bool hardCut, unsigned int index, const QString & message) const;
|
||||
void presetRatingChangedSignal(unsigned int index, int rating,
|
||||
PresetRatingType ratingType) const;
|
||||
|
||||
|
||||
@ -310,6 +310,9 @@ void QProjectM_MainWindow::postProjectM_Initialize()
|
||||
|
||||
connect ( m_QProjectMWidget->qprojectM(), SIGNAL ( presetSwitchedSignal ( bool,unsigned int ) ),
|
||||
this, SLOT ( updatePlaylistSelection ( bool,unsigned int ) ) );
|
||||
connect ( m_QProjectMWidget->qprojectM(), SIGNAL ( presetSwitchFailedSignal ( bool,unsigned int, const QString & ) ),
|
||||
this, SLOT ( handleFailedPresetSwitch( bool,unsigned int, const QString &) ) );
|
||||
|
||||
|
||||
connect ( m_QProjectMWidget->qprojectM(), SIGNAL ( presetRatingChangedSignal ( unsigned int,int, PresetRatingType) ),
|
||||
this, SLOT ( presetRatingChanged( unsigned int,int, PresetRatingType) ));
|
||||
@ -1299,3 +1302,13 @@ void QProjectM_MainWindow::presetRatingChanged( unsigned int index, int rating,
|
||||
playlistModel->notifyDataChanged(index);
|
||||
}
|
||||
|
||||
void QProjectM_MainWindow::handleFailedPresetSwitch(const bool isHardCut, const unsigned int index,
|
||||
const QString & message) {
|
||||
|
||||
const QString status = QString("Error switch to preset index %1: %2")
|
||||
.arg(index).arg(message);
|
||||
|
||||
statusBar()->showMessage ( tr (status.toStdString().c_str() ) );
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -116,6 +116,9 @@ protected:
|
||||
private slots:
|
||||
void dockLocationChanged(Qt::DockWidgetArea area);
|
||||
void presetRatingChanged(unsigned int, int, PresetRatingType);
|
||||
void handleFailedPresetSwitch(const bool isHardCut, const unsigned int index,
|
||||
const QString & message);
|
||||
|
||||
void presetHardCut();
|
||||
void presetSoftCut();
|
||||
void insertPresetsDialog() ;
|
||||
|
||||
Reference in New Issue
Block a user