fix default preview image
This commit is contained in:
parent
a4006ea015
commit
20094b0cf2
4 changed files with 6 additions and 7 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <models/MusicModel.h>
|
#include <models/MusicModel.h>
|
||||||
|
#include <VLCQtCore/Audio.h>
|
||||||
|
|
||||||
MusicController::MusicController(QObject *parent) : QObject(parent)
|
MusicController::MusicController(QObject *parent) : QObject(parent)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ int main(int argc, char *argv[])
|
||||||
/// @todo add reaction to system signal reload config.
|
/// @todo add reaction to system signal reload config.
|
||||||
NavigationController navController;
|
NavigationController navController;
|
||||||
navController.setContext(engine.rootContext());
|
navController.setContext(engine.rootContext());
|
||||||
navController.init("/home/ar/source/testLenaPi/");
|
navController.init("/home/ar/source/lenaMusic/");
|
||||||
|
|
||||||
engine.load(QUrl("qrc:/main.qml"));
|
engine.load(QUrl("qrc:/main.qml"));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ void MusicModel::init(NavigationItemModel *item)
|
||||||
|
|
||||||
if(mMedia)
|
if(mMedia)
|
||||||
delete mMedia;
|
delete mMedia;
|
||||||
mMedia = new VlcMedia(mCurrentItem->getPath(), true, mVlc);
|
mMedia = new VlcMedia(mCurrentItem->getPath()+"/Pink Panther.mp3", true, mVlc);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MusicModel::navigateBack()
|
void MusicModel::navigateBack()
|
||||||
|
|
|
||||||
|
|
@ -34,12 +34,10 @@ bool NavigationItemModel::setPath(const QString &path)
|
||||||
|
|
||||||
/// @todo move default image to qrc
|
/// @todo move default image to qrc
|
||||||
auto source = dir.filePath("image.jpg");
|
auto source = dir.filePath("image.jpg");
|
||||||
if(QFile(source).exists())
|
if(QFile(source).exists()){
|
||||||
mImageSource = "file:///" + source;
|
mImageSource = "file:///" + source;
|
||||||
else
|
emit imageSourceChanged();
|
||||||
mImageSource = "file:///home/ar/source/LenaPi/pics/benjamin.jpeg";
|
}
|
||||||
|
|
||||||
emit imageSourceChanged();
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue