aboutsummaryrefslogtreecommitdiff
path: root/qmpinfowindow.cpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2016-01-01 23:54:06 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2016-01-01 23:54:06 +0800
commitd418712c981d9854fa6429d65773368ca63b8dac (patch)
tree48eb1f25753a1734a3d7cf5d8303e7936c4844f3 /qmpinfowindow.cpp
parent3db127ce64eadb54568e218124744a1de713667e (diff)
downloadQMidiPlayer-d418712c981d9854fa6429d65773368ca63b8dac.tar.xz
Strawberry Crisis. (WTF)
Diffstat (limited to 'qmpinfowindow.cpp')
-rw-r--r--qmpinfowindow.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/qmpinfowindow.cpp b/qmpinfowindow.cpp
index 93cbb81..4e214b4 100644
--- a/qmpinfowindow.cpp
+++ b/qmpinfowindow.cpp
@@ -23,11 +23,15 @@ void qmpInfoWindow::updateInfo()
CMidiPlayer* player=qmpMainWindow::getInstance()->getPlayer();
ui->lbFileName->setText(QString("File name: ")+qmpMainWindow::getInstance()->getFileName());
if(player->getTitle())ui->lbTitle->setText(QString("Title: ")+player->getTitle());
+ else ui->lbTitle->setText(QString("Title: "));
if(player->getCopyright())ui->lbCopyright->setText(QString("Copyright: ")+player->getCopyright());
+ else ui->lbCopyright->setText(QString("Copyright: "));
ui->lbTempo->setText(QString("Tempo: ")+QString::number(player->getTempo(),'g',5));
int t,r;player->getCurrentKeySignature(&t);r=(int8_t)((t>>8)&0xFF)+7;
strncpy(str,t&0xFF?minors+2*r:majors+2*r,2);str[2]='\0';
ui->lbKeySig->setText(QString("Key Sig.: ")+str);
player->getCurrentTimeSignature(&t,&r);sprintf(str,"Time Sig.: %d/%d",t,r);
ui->lbTimeSig->setText(str);
+ sprintf(str,"Note count: %u",player->getFileNoteCount());
+ ui->lbNoteCount->setText(str);
}