From 2888a8349d11a3e959c300256ce36e824337e636 Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Wed, 13 Apr 2016 23:13:15 +0800 Subject: Ghost Lead. --- qmidiplayer-desktop/qmidiplayer-desktop.pro | 1 + qmidiplayer-desktop/qmidiplayer.desktop | 4 +++- qmidiplayer-desktop/qmidiplayer.rc | 1 + qmidiplayer-desktop/qmpchannelswindow.cpp | 5 +++++ qmidiplayer-desktop/qmpchannelswindow.hpp | 1 + qmidiplayer-desktop/qmphelpwindow.hpp | 2 +- qmidiplayer-desktop/qmpmainwindow.cpp | 6 +++--- qmidiplayer-desktop/qmppresetselect.cpp | 1 + 8 files changed, 16 insertions(+), 5 deletions(-) mode change 100644 => 100755 qmidiplayer-desktop/qmidiplayer.desktop create mode 100644 qmidiplayer-desktop/qmidiplayer.rc (limited to 'qmidiplayer-desktop') diff --git a/qmidiplayer-desktop/qmidiplayer-desktop.pro b/qmidiplayer-desktop/qmidiplayer-desktop.pro index f4f29d4..c7d2e99 100644 --- a/qmidiplayer-desktop/qmidiplayer-desktop.pro +++ b/qmidiplayer-desktop/qmidiplayer-desktop.pro @@ -86,5 +86,6 @@ win32{ LIBS += e:/libs/rtmidi/rtmidi.lib INCLUDEPATH += e:/libs/fluidsynth/include INCLUDEPATH += e:/libs/rtmidi + RC_FILE = qmidiplayer.rc } RESOURCES = resources.qrc diff --git a/qmidiplayer-desktop/qmidiplayer.desktop b/qmidiplayer-desktop/qmidiplayer.desktop old mode 100644 new mode 100755 index 38fae66..b49113f --- a/qmidiplayer-desktop/qmidiplayer.desktop +++ b/qmidiplayer-desktop/qmidiplayer.desktop @@ -1,10 +1,12 @@ +#!/usr/bin/env xdg-open [Desktop Entry] +Type=Application Name=QMidiPlayer Version=0.7.2 GenericName=MIDI Player Comment=QMidiPlayer is a midi file player based on Fluidsynth and Qt. Exec=/usr/bin/qmidiplayer Icon=qmidiplyr +Keywords=audio;sound; Categories=Audio;AudioVideo;Midi;X-Alsa;X-Jack;Qt; Terminal=false -Type=Application diff --git a/qmidiplayer-desktop/qmidiplayer.rc b/qmidiplayer-desktop/qmidiplayer.rc new file mode 100644 index 0000000..ddf1bc1 --- /dev/null +++ b/qmidiplayer-desktop/qmidiplayer.rc @@ -0,0 +1 @@ +IDI_ICON1 ICON DISCARDABLE "../img/qmidiplayer.ico" diff --git a/qmidiplayer-desktop/qmpchannelswindow.cpp b/qmidiplayer-desktop/qmpchannelswindow.cpp index 0c33043..282a4cc 100644 --- a/qmidiplayer-desktop/qmpchannelswindow.cpp +++ b/qmidiplayer-desktop/qmpchannelswindow.cpp @@ -101,6 +101,11 @@ void qmpChannelsWindow::moveEvent(QMoveEvent *event) } } +void qmpChannelsWindow::resetAcitivity() +{ + for(int i=0;i<16;++i)ui->twChannels->item(i,0)->setIcon(*chi); +} + void qmpChannelsWindow::updateChannelActivity() { ++callbacksc; diff --git a/qmidiplayer-desktop/qmpchannelswindow.hpp b/qmidiplayer-desktop/qmpchannelswindow.hpp index 25c897a..fef6ab7 100644 --- a/qmidiplayer-desktop/qmpchannelswindow.hpp +++ b/qmidiplayer-desktop/qmpchannelswindow.hpp @@ -78,6 +78,7 @@ class qmpChannelsWindow:public QDialog void showEvent(QShowEvent *event); void closeEvent(QCloseEvent *event); void moveEvent(QMoveEvent *event); + void resetAcitivity(); signals: void dialogClosing(); public slots: diff --git a/qmidiplayer-desktop/qmphelpwindow.hpp b/qmidiplayer-desktop/qmphelpwindow.hpp index af1b746..8264fcd 100644 --- a/qmidiplayer-desktop/qmphelpwindow.hpp +++ b/qmidiplayer-desktop/qmphelpwindow.hpp @@ -2,7 +2,7 @@ #define QMPHELPWINDOW_H #include -#define APP_VERSION "0.7.1" +#define APP_VERSION "0.7.2" namespace Ui { class qmpHelpWindow; diff --git a/qmidiplayer-desktop/qmpmainwindow.cpp b/qmidiplayer-desktop/qmpmainwindow.cpp index 380b0c1..45ab634 100644 --- a/qmidiplayer-desktop/qmpmainwindow.cpp +++ b/qmidiplayer-desktop/qmpmainwindow.cpp @@ -180,7 +180,7 @@ void qmpMainWindow::updateWidgets() if(!plistw->getRepeat()) { timer->stop();stopped=true;playing=false; - fnA2->setEnabled(stopped); + fnA2->setEnabled(stopped);chnlw->resetAcitivity(); player->playerDeinit();playerTh->join(); delete playerTh;playerTh=NULL; if(singleFS)player->playerPanic(true); @@ -320,7 +320,7 @@ void qmpMainWindow::on_pbPlayPause_clicked() { if(!playing) { - player->playerPanic(); + player->playerPanic();chnlw->resetAcitivity(); offset=ui->hsTimer->value()/100.*player->getFtime(); } else @@ -371,7 +371,7 @@ void qmpMainWindow::on_pbStop_clicked() { timer->stop();stopped=true;playing=false; player->playerDeinit();fnA2->setEnabled(stopped); - if(singleFS)player->playerPanic(true); + if(singleFS)player->playerPanic(true);chnlw->resetAcitivity(); if(playerTh){playerTh->join();delete playerTh;playerTh=NULL;} chnlw->on_pbUnmute_clicked();chnlw->on_pbUnsolo_clicked(); ui->pbPlayPause->setIcon(QIcon(":/img/play.png")); diff --git a/qmidiplayer-desktop/qmppresetselect.cpp b/qmidiplayer-desktop/qmppresetselect.cpp index be589c5..ef67d70 100644 --- a/qmidiplayer-desktop/qmppresetselect.cpp +++ b/qmidiplayer-desktop/qmppresetselect.cpp @@ -73,6 +73,7 @@ void qmpPresetSelector::on_pbCancel_clicked() void qmpPresetSelector::on_pbOk_clicked() { CMidiPlayer *plyr=qmpMainWindow::getInstance()->getPlayer(); + if(!ui->lwBankSelect->currentItem()||!ui->lwPresetSelect->currentItem())return (void)close(); int b,p;sscanf(ui->lwBankSelect->currentItem()->text().toStdString().c_str(),"%d",&b); sscanf(ui->lwPresetSelect->currentItem()->text().toStdString().c_str(),"%d",&p); plyr->setChannelPreset(ch,b,p); -- cgit v1.2.3