aboutsummaryrefslogtreecommitdiff
path: root/qmpplistwindow.cpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2016-01-06 21:28:44 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2016-01-06 21:28:44 +0800
commit7fccb61519fe84b2ced274f1cc4859d5000e86c6 (patch)
treef66696e67d56e9e6015d613af84562364baaa9ed /qmpplistwindow.cpp
parent8099672c3fd0bfc7804b0a92d05c57dcd4307268 (diff)
downloadQMidiPlayer-7fccb61519fe84b2ced274f1cc4859d5000e86c6.tar.xz
Maple Dream. (WTF)
Diffstat (limited to 'qmpplistwindow.cpp')
-rw-r--r--qmpplistwindow.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/qmpplistwindow.cpp b/qmpplistwindow.cpp
index dd6f67d..85c33a3 100644
--- a/qmpplistwindow.cpp
+++ b/qmpplistwindow.cpp
@@ -100,6 +100,15 @@ void qmpPlistWindow::moveEvent(QMoveEvent *event)
}
}
+void qmpPlistWindow::emptyList()
+{
+ ui->lwFiles->clear();
+}
+void qmpPlistWindow::insertItem(QString i)
+{
+ ui->lwFiles->addItem(new QListWidgetItem(i));
+}
+
void qmpPlistWindow::on_pbAdd_clicked()
{
QStringList sl;
@@ -123,7 +132,7 @@ void qmpPlistWindow::on_pbAddFolder_clicked()
while(di.hasNext())
{
QString c=di.next();
- if(c.endsWith(".mid")||c.endsWith(".midi"))
+ if((c.endsWith(".mid")||c.endsWith(".midi"))&&fluid_is_midifile(c.toStdString().c_str()))
ui->lwFiles->addItem(new QListWidgetItem(c));
}
}