Init
This commit is contained in:
+144
@@ -0,0 +1,144 @@
|
||||
#include "cimage.h"
|
||||
|
||||
#include <QDir>
|
||||
|
||||
|
||||
QString strMEDIATYPE[] =
|
||||
{
|
||||
"unknown",
|
||||
"actor",
|
||||
"movie",
|
||||
"set",
|
||||
"tvshow",
|
||||
"season",
|
||||
"episode",
|
||||
"musicvideo"
|
||||
};
|
||||
|
||||
QString strTYPE[] =
|
||||
{
|
||||
"unknown",
|
||||
"thumb",
|
||||
"fanart",
|
||||
"poster",
|
||||
"banner"
|
||||
};
|
||||
|
||||
|
||||
cImage::cImage(cKodiVideoLibrary* lpKodiVideoLibrary, cKodiTexturesLibrary* lpKodiTexturesLibrary, cImage::MEDIATYPE mediaType, cImage::TYPE type, qint32 idMovie, const QString &szPath) :
|
||||
m_lpKodiVideoLibrary(lpKodiVideoLibrary),
|
||||
m_lpKodiTexturesLibrary(lpKodiTexturesLibrary),
|
||||
m_artID(-1),
|
||||
m_mediaType(mediaType),
|
||||
m_type(type),
|
||||
m_idMovie(idMovie),
|
||||
m_szURL(""),
|
||||
m_szCachedURL(""),
|
||||
m_szFileName(""),
|
||||
m_textureID(-1),
|
||||
m_szPath(szPath)
|
||||
{
|
||||
if(m_lpKodiVideoLibrary->art(strMEDIATYPE[mediaType], strTYPE[type], idMovie, m_artID, m_szURL))
|
||||
{
|
||||
if(m_lpKodiTexturesLibrary->texture(m_szURL, m_textureID, m_szCachedURL))
|
||||
{
|
||||
QString str = m_szPath + QDir::separator() + "Userdata" + QDir::separator() + "Thumbnails" + QDir::separator() + m_szCachedURL;
|
||||
|
||||
if(m_szCachedURL.length())
|
||||
m_image.load(str);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// downloadFile(m_szURL);
|
||||
}
|
||||
}
|
||||
|
||||
cImage::MEDIATYPE cImage::mediaType()
|
||||
{
|
||||
return(m_mediaType);
|
||||
}
|
||||
|
||||
cImage::TYPE cImage::type()
|
||||
{
|
||||
return(m_type);
|
||||
}
|
||||
|
||||
qint32 cImage::idMovie()
|
||||
{
|
||||
return(m_idMovie);
|
||||
}
|
||||
|
||||
QPixmap cImage::image()
|
||||
{
|
||||
/*
|
||||
QPixmap pixmap;
|
||||
QString str = m_szPath + QDir::separator() + "Userdata" + QDir::separator() + "Thumbnails" + QDir::separator() + m_szCachedURL;
|
||||
|
||||
if(m_szCachedURL.length())
|
||||
pixmap.load(str);
|
||||
|
||||
return(pixmap);
|
||||
*/
|
||||
return(m_image);
|
||||
}
|
||||
|
||||
cImageList::cImageList(cKodiVideoLibrary *lpKodiVideoLibrary, cKodiTexturesLibrary* lpKodiTexturesLibrary, const QString& szPath) :
|
||||
m_lpKodiVideoLibrary(lpKodiVideoLibrary),
|
||||
m_lpKodiTexturesLibrary(lpKodiTexturesLibrary),
|
||||
m_szPath(szPath)
|
||||
{
|
||||
}
|
||||
|
||||
QPixmap cImageList::get(cImage::MEDIATYPE mediaType, cImage::TYPE type, qint32 idMovie)
|
||||
{
|
||||
cImage* lpImage = 0;
|
||||
for(int z = 0;z < count();z++)
|
||||
{
|
||||
if(mediaType == at(z)->mediaType() && type == at(z)->type() && idMovie == at(z)->idMovie())
|
||||
{
|
||||
lpImage = at(z);
|
||||
return(lpImage->image());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(!lpImage)
|
||||
{
|
||||
lpImage = new cImage(m_lpKodiVideoLibrary, m_lpKodiTexturesLibrary, mediaType, type, idMovie, m_szPath);
|
||||
append(lpImage);
|
||||
return(lpImage->image());
|
||||
}
|
||||
return(QPixmap());
|
||||
}
|
||||
|
||||
QPixmap cImage::downloadFile(const QString& szFileName)
|
||||
{
|
||||
QPixmap pixmap;
|
||||
|
||||
// QString szPath = QDir::homePath() + QDir::separator() + "qtseries" + QDir::separator() + szFileName;
|
||||
// QString szURL = "http://thetvdb.com/banners/" + szFileName;
|
||||
|
||||
// QNetworkAccessManager networkManager;
|
||||
// QUrl url(szURL);
|
||||
// QNetworkRequest request(url);
|
||||
// request.setHeader(QNetworkRequest::ContentTypeHeader, "application/xml");
|
||||
|
||||
// QNetworkReply* reply = networkManager.get(request);
|
||||
// QEventLoop loop;
|
||||
|
||||
// QObject::connect(reply, SIGNAL(finished()), &loop, SLOT(quit()));
|
||||
// loop.exec();
|
||||
|
||||
// QByteArray szData = reply->readAll();
|
||||
// delete reply;
|
||||
|
||||
// pixmap.loadFromData(szData);
|
||||
|
||||
// QDir dir(szPath);
|
||||
// QFileInfo fileInfo(szPath);
|
||||
// dir.mkpath(dir.filePath(fileInfo.absolutePath()));
|
||||
// pixmap.save(szPath);
|
||||
|
||||
return(pixmap);
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
#ifndef CIMAGE_H
|
||||
#define CIMAGE_H
|
||||
|
||||
|
||||
#include <QString>
|
||||
#include <QList>
|
||||
#include <QMetaType>
|
||||
#include <QPixmap>
|
||||
|
||||
#include "ckodivideolibrary.h"
|
||||
#include "ckoditextureslibrary.h"
|
||||
|
||||
|
||||
class cImage
|
||||
{
|
||||
public:
|
||||
enum MEDIATYPE
|
||||
{
|
||||
MEDIATYPE_unknown = 0,
|
||||
MEDIATYPE_actor = 1,
|
||||
MEDIATYPE_movie = 2,
|
||||
MEDIATYPE_set = 3,
|
||||
MEDIATYPE_tvshow = 4,
|
||||
MEDIATYPE_season = 5,
|
||||
MEDIATYPE_episode = 6,
|
||||
MEDIATYPE_musicvideo = 7,
|
||||
};
|
||||
|
||||
enum TYPE
|
||||
{
|
||||
TYPE_unknown = 0,
|
||||
TYPE_thumb = 1,
|
||||
TYPE_fanart = 2,
|
||||
TYPE_poster = 3,
|
||||
TYPE_banner = 4,
|
||||
};
|
||||
|
||||
cImage(cKodiVideoLibrary* lpKodiVideoLibrary, cKodiTexturesLibrary* lpKodiTexturesLibrary, cImage::MEDIATYPE mediaType, cImage::TYPE type, qint32 idMovie, const QString& szPath);
|
||||
|
||||
cImage::MEDIATYPE mediaType();
|
||||
cImage::TYPE type();
|
||||
qint32 idMovie();
|
||||
|
||||
QPixmap image();
|
||||
private:
|
||||
cKodiVideoLibrary* m_lpKodiVideoLibrary;
|
||||
cKodiTexturesLibrary* m_lpKodiTexturesLibrary;
|
||||
|
||||
qint32 m_artID;
|
||||
cImage::MEDIATYPE m_mediaType;
|
||||
cImage::TYPE m_type;
|
||||
qint32 m_idMovie;
|
||||
QString m_szURL;
|
||||
QString m_szCachedURL;
|
||||
QString m_szFileName;
|
||||
qint32 m_textureID;
|
||||
QString m_szPath;
|
||||
|
||||
QPixmap m_image;
|
||||
|
||||
QPixmap downloadFile(const QString& szFileName);
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE (cImage*)
|
||||
|
||||
class cImageList : public QList<cImage*>
|
||||
{
|
||||
public:
|
||||
cImageList(cKodiVideoLibrary* lpKodiVideoLibrary, cKodiTexturesLibrary* lpKodiTexturesLibrary, const QString& szPath);
|
||||
QPixmap get(cImage::MEDIATYPE mediaType, cImage::TYPE type, qint32 idMovie);
|
||||
|
||||
private:
|
||||
cKodiVideoLibrary* m_lpKodiVideoLibrary;
|
||||
cKodiTexturesLibrary* m_lpKodiTexturesLibrary;
|
||||
QString m_szPath;
|
||||
};
|
||||
|
||||
#endif // CIMAGE_H
|
||||
+27
-4
@@ -1,5 +1,5 @@
|
||||
#include "ckodilibrary.h"
|
||||
|
||||
#include "cimage.h"
|
||||
|
||||
#include <QTime>
|
||||
#include <QDir>
|
||||
@@ -9,12 +9,23 @@
|
||||
|
||||
cKodiLibrary::cKodiLibrary(QStatusBar* lpMainWindowStatusBar, const QString& szPath) :
|
||||
m_lpMainWindowStatusBar(lpMainWindowStatusBar),
|
||||
m_lpKodiVideoLibrary(0),
|
||||
m_lpKodiTexturesLibrary(0),
|
||||
m_lpImageList(0),
|
||||
m_szPath(szPath)
|
||||
{
|
||||
}
|
||||
|
||||
cKodiLibrary::~cKodiLibrary()
|
||||
{
|
||||
if(m_lpKodiVideoLibrary)
|
||||
delete m_lpKodiVideoLibrary;
|
||||
|
||||
if(m_lpKodiTexturesLibrary)
|
||||
delete m_lpKodiTexturesLibrary;
|
||||
|
||||
if(m_lpImageList)
|
||||
delete m_lpImageList;
|
||||
}
|
||||
|
||||
QString cKodiLibrary::findFile(const QString& szPath, const QString& szFile)
|
||||
@@ -61,6 +72,14 @@ bool cKodiLibrary::init()
|
||||
if(m_lpKodiVideoLibrary->init() != -1)
|
||||
iVideoCount = m_lpKodiVideoLibrary->load();
|
||||
|
||||
m_lpMainWindowStatusBar->showMessage("Initializing Textures ...");
|
||||
|
||||
m_lpKodiTexturesLibrary = new cKodiTexturesLibrary(m_szTextures);
|
||||
if(m_lpKodiTexturesLibrary->init() != -1)
|
||||
;
|
||||
|
||||
m_lpImageList = new cImageList(m_lpKodiVideoLibrary, m_lpKodiTexturesLibrary, m_szPath);
|
||||
|
||||
m_lpMainWindowStatusBar->showMessage("Done.", 3000);
|
||||
|
||||
return(iVideoCount != 0);
|
||||
@@ -71,8 +90,12 @@ cKodiVideoLibrary* cKodiLibrary::videoLibrary()
|
||||
return(m_lpKodiVideoLibrary);
|
||||
}
|
||||
|
||||
void cKodiLibrary::fillVideoList(QStandardItemModel* lpModel)
|
||||
cKodiTexturesLibrary* cKodiLibrary::texturesLibrary()
|
||||
{
|
||||
if(m_lpKodiVideoLibrary)
|
||||
m_lpKodiVideoLibrary->fillVideoList(lpModel);
|
||||
return(m_lpKodiTexturesLibrary);
|
||||
}
|
||||
|
||||
cImageList* cKodiLibrary::imageList()
|
||||
{
|
||||
return(m_lpImageList);
|
||||
}
|
||||
|
||||
+24
-15
@@ -3,36 +3,45 @@
|
||||
|
||||
|
||||
#include "ckodivideolibrary.h"
|
||||
#include "ckoditextureslibrary.h"
|
||||
|
||||
//#include "cimage.h"
|
||||
|
||||
#include <QStatusBar>
|
||||
#include <QStandardItemModel>
|
||||
|
||||
|
||||
class cImage;
|
||||
class cImageList;
|
||||
|
||||
class cKodiLibrary
|
||||
{
|
||||
public:
|
||||
cKodiLibrary(QStatusBar* lpMainWindowStatusBar, const QString& szPath);
|
||||
~cKodiLibrary();
|
||||
|
||||
bool init();
|
||||
bool init();
|
||||
|
||||
cKodiVideoLibrary* videoLibrary();
|
||||
void fillVideoList(QStandardItemModel* lpModel);
|
||||
cKodiVideoLibrary* videoLibrary();
|
||||
cKodiTexturesLibrary* texturesLibrary();
|
||||
cImageList* imageList();
|
||||
private:
|
||||
QStatusBar* m_lpMainWindowStatusBar;
|
||||
cKodiVideoLibrary* m_lpKodiVideoLibrary;
|
||||
QString m_szPath;
|
||||
QStatusBar* m_lpMainWindowStatusBar;
|
||||
cKodiVideoLibrary* m_lpKodiVideoLibrary;
|
||||
cKodiTexturesLibrary* m_lpKodiTexturesLibrary;
|
||||
cImageList* m_lpImageList;
|
||||
QString m_szPath;
|
||||
|
||||
QString m_szAddons;
|
||||
QString m_szADSP;
|
||||
QString m_szEpg;
|
||||
QString m_szMyMusic;
|
||||
QString m_szMyVideos;
|
||||
QString m_szTextures;
|
||||
QString m_szTV;
|
||||
QString m_szViewModes;
|
||||
QString m_szAddons;
|
||||
QString m_szADSP;
|
||||
QString m_szEpg;
|
||||
QString m_szMyMusic;
|
||||
QString m_szMyVideos;
|
||||
QString m_szTextures;
|
||||
QString m_szTV;
|
||||
QString m_szViewModes;
|
||||
|
||||
QString findFile(const QString& szPath, const QString& szFile);
|
||||
QString findFile(const QString& szPath, const QString& szFile);
|
||||
};
|
||||
|
||||
#endif // CKODILIBRARY_H
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
#include "ckoditextureslibrary.h"
|
||||
|
||||
#include <QFile>
|
||||
#include <QVariant>
|
||||
#include <QStringList>
|
||||
|
||||
#include <QSqlQuery>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QTime>
|
||||
|
||||
|
||||
cKodiTexturesLibrary::cKodiTexturesLibrary(const QString &szFileName) :
|
||||
m_szFileName(szFileName),
|
||||
m_bConnected(false),
|
||||
m_iVersion(-1)
|
||||
{
|
||||
}
|
||||
|
||||
cKodiTexturesLibrary::~cKodiTexturesLibrary()
|
||||
{
|
||||
if(m_bConnected && m_db.isOpen())
|
||||
m_db.close();
|
||||
}
|
||||
|
||||
qint16 cKodiTexturesLibrary::init()
|
||||
{
|
||||
if(m_bConnected)
|
||||
return(m_iVersion);
|
||||
|
||||
m_db = QSqlDatabase::addDatabase("QSQLITE", "TexturesLibrary");
|
||||
m_db.setDatabaseName(m_szFileName);
|
||||
if(!m_db.open())
|
||||
return(-1);
|
||||
|
||||
QSqlQuery query(m_db);
|
||||
if(!query.exec("SELECT idVersion FROM version;"))
|
||||
{
|
||||
m_db.close();
|
||||
return(-1);
|
||||
}
|
||||
|
||||
if(!query.first())
|
||||
{
|
||||
m_db.close();
|
||||
return(-1);
|
||||
}
|
||||
|
||||
m_iVersion = query.value("idVersion").toInt();
|
||||
m_bConnected = true;
|
||||
|
||||
return(m_iVersion);
|
||||
}
|
||||
|
||||
qint16 cKodiTexturesLibrary::version()
|
||||
{
|
||||
if(!m_bConnected)
|
||||
return(-1);
|
||||
return(m_iVersion);
|
||||
}
|
||||
|
||||
bool cKodiTexturesLibrary::texture(const QString& szURL, qint32& id, QString& szCachedURL)
|
||||
{
|
||||
QSqlQuery query(m_db);
|
||||
query.exec(QString("SELECT id, url, cachedurl FROM texture WHERE url='%1';").arg(szURL));
|
||||
if(query.next())
|
||||
{
|
||||
id = query.value("id").toInt();
|
||||
szCachedURL = query.value("cachedurl").toString();
|
||||
return(true);
|
||||
}
|
||||
return(false);
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
#ifndef CKODITEXTURESLIBRARY_H
|
||||
#define CKODITEXTURESLIBRARY_H
|
||||
|
||||
|
||||
#include <QSqlDatabase>
|
||||
#include <QSqlQuery>
|
||||
#include <QStatusBar>
|
||||
|
||||
|
||||
class cKodiTexturesLibrary
|
||||
{
|
||||
public:
|
||||
cKodiTexturesLibrary(const QString& szFileName);
|
||||
~cKodiTexturesLibrary();
|
||||
|
||||
qint16 init();
|
||||
qint16 version();
|
||||
|
||||
bool texture(const QString& szURL, qint32& id, QString& szCachedURL);
|
||||
private:
|
||||
QSqlDatabase m_db;
|
||||
QString m_szFileName;
|
||||
bool m_bConnected;
|
||||
qint16 m_iVersion;
|
||||
};
|
||||
|
||||
#endif // CKODITEXTURESLIBRARY_H
|
||||
+122
-44
@@ -1,4 +1,5 @@
|
||||
#include "ckodivideolibrary.h"
|
||||
#include "cimage.h"
|
||||
|
||||
#include <QFile>
|
||||
#include <QVariant>
|
||||
@@ -63,62 +64,139 @@ qint32 cKodiVideoLibrary::load()
|
||||
{
|
||||
QSqlQuery query(m_db);
|
||||
|
||||
query.exec("SELECT idMovie, idFile, c00, c01, c02, c03, c04, c05, c06, c07, c08, c09, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, idSet, userrating, strSet, strSetOverview, strFileName, strPath, playCount, lastPlayed, dateAdded, resumeTimeInSeconds, totalTimeInSeconds FROM movie_view ORDER BY c00;");
|
||||
//query.exec("SELECT idMovie, idFile, c00, c01, c02, c03, c04, c05, c06, c07, c08, c09, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, idSet, userrating, strSet, strSetOverview, strFileName, strPath, playCount, lastPlayed, dateAdded, resumeTimeInSeconds, totalTimeInSeconds FROM movie_view ORDER BY c00;");
|
||||
query.exec("SELECT idMovie,"
|
||||
" idFile,"
|
||||
" c00,"
|
||||
" c01,"
|
||||
" c02,"
|
||||
" c03,"
|
||||
" c04,"
|
||||
" c05,"
|
||||
" c06,"
|
||||
" c07,"
|
||||
" c08,"
|
||||
" c09,"
|
||||
" c10,"
|
||||
" c11,"
|
||||
" c12,"
|
||||
" c13,"
|
||||
" c14,"
|
||||
" c15,"
|
||||
" c16,"
|
||||
" c17,"
|
||||
" c18,"
|
||||
" c19,"
|
||||
" c20,"
|
||||
" c21,"
|
||||
" c22,"
|
||||
" c23,"
|
||||
" idSet,"
|
||||
" userrating,"
|
||||
" strSet,"
|
||||
" strSetOverview,"
|
||||
" strFileName,"
|
||||
" strPath,"
|
||||
" playCount,"
|
||||
" lastPlayed,"
|
||||
" dateAdded,"
|
||||
" resumeTimeInSeconds,"
|
||||
" totalTimeInSeconds,"
|
||||
" sortText"
|
||||
" FROM"
|
||||
" ("
|
||||
" SELECT *,"
|
||||
" ifnull(strSet, c00) as sortText"
|
||||
" FROM movie_view"
|
||||
" )"
|
||||
" ORDER BY sortText,"
|
||||
" c07;");
|
||||
while(query.next())
|
||||
{
|
||||
cMyVideos* lpNew = m_videosList.add(
|
||||
query.value("idMovie").toInt(),
|
||||
query.value("idFile").toInt(),
|
||||
query.value("c00").toString(),
|
||||
query.value("c01").toString(),
|
||||
query.value("c02").toString(),
|
||||
query.value("c03").toString(),
|
||||
query.value("c04").toInt(),
|
||||
query.value("c05").toDouble(),
|
||||
query.value("c06").toString(),
|
||||
query.value("c07").toInt(),
|
||||
query.value("c08").toString(),
|
||||
query.value("c09").toString(),
|
||||
query.value("c10").toString(),
|
||||
query.value("c11").toInt(),
|
||||
query.value("c12").toString(),
|
||||
query.value("c13").toString(),
|
||||
query.value("c14").toString(),
|
||||
query.value("c15").toString(),
|
||||
query.value("c16").toString(),
|
||||
query.value("c18").toString(),
|
||||
query.value("c19").toString(),
|
||||
query.value("c20").toString(),
|
||||
query.value("c21").toString(),
|
||||
query.value("c22").toString(),
|
||||
query.value("c23").toInt(),
|
||||
query.value("idSet").toInt(),
|
||||
query.value("userrating").toInt(),
|
||||
query.value("strSet").toString(),
|
||||
query.value("strSetOverview").toString(),
|
||||
query.value("strFileName").toString(),
|
||||
query.value("strPath").toString(),
|
||||
query.value("playCount").toInt(),
|
||||
QDateTime::fromString(query.value("lastPlayed").toString(), "yyyy-MM-dd HH:mm:ss"),
|
||||
QDateTime::fromString(query.value("dateAdded").toString(), "yyyy-MM-dd HH:mm:ss"),
|
||||
query.value("resumeTimeInSeconds").toDouble(),
|
||||
query.value("totalTimeInSeconds").toDouble());
|
||||
m_videosList.add(
|
||||
query.value("idMovie").toInt(),
|
||||
query.value("idFile").toInt(),
|
||||
query.value("c00").toString(),
|
||||
query.value("c01").toString(),
|
||||
query.value("c02").toString(),
|
||||
query.value("c03").toString(),
|
||||
query.value("c04").toInt(),
|
||||
query.value("c05").toDouble(),
|
||||
query.value("c06").toString(),
|
||||
query.value("c07").toInt(),
|
||||
query.value("c08").toString(),
|
||||
query.value("c09").toString(),
|
||||
query.value("c10").toString(),
|
||||
query.value("c11").toInt(),
|
||||
query.value("c12").toString(),
|
||||
query.value("c13").toString(),
|
||||
query.value("c14").toString(),
|
||||
query.value("c15").toString(),
|
||||
query.value("c16").toString(),
|
||||
query.value("c18").toString(),
|
||||
query.value("c19").toString(),
|
||||
query.value("c20").toString(),
|
||||
query.value("c21").toString(),
|
||||
query.value("c22").toString(),
|
||||
query.value("c23").toInt(),
|
||||
query.value("idSet").toInt(),
|
||||
query.value("userrating").toInt(),
|
||||
query.value("strSet").toString(),
|
||||
query.value("strSetOverview").toString(),
|
||||
query.value("strFileName").toString(),
|
||||
query.value("strPath").toString(),
|
||||
query.value("playCount").toInt(),
|
||||
QDateTime::fromString(query.value("lastPlayed").toString(), "yyyy-MM-dd HH:mm:ss"),
|
||||
QDateTime::fromString(query.value("dateAdded").toString(), "yyyy-MM-dd HH:mm:ss"),
|
||||
query.value("resumeTimeInSeconds").toDouble(),
|
||||
query.value("totalTimeInSeconds").toDouble());
|
||||
|
||||
lpNew = 0;
|
||||
}
|
||||
return(m_videosList.count());
|
||||
}
|
||||
|
||||
bool cKodiVideoLibrary::art(const QString& szMediaType, const QString& szType, qint32 idMovie, qint32& artID, QString& szURL)
|
||||
{
|
||||
QSqlQuery query(m_db);
|
||||
query.exec(QString("SELECT art_id, media_id, media_type, type, url FROM art WHERE media_type='%1' AND type='%2' AND media_id=%3;").arg(szMediaType).arg(szType).arg(idMovie));
|
||||
if(query.next())
|
||||
{
|
||||
artID = query.value("art_id").toInt();
|
||||
szURL = query.value("url").toString();
|
||||
return(true);
|
||||
}
|
||||
return(false);
|
||||
}
|
||||
|
||||
void cKodiVideoLibrary::fillVideoList(QStandardItemModel* lpModel)
|
||||
{
|
||||
QStandardItem* lpRoot = 0;
|
||||
QString szOldSet("");
|
||||
|
||||
for(int z = 0;z < m_videosList.count();z++)
|
||||
{
|
||||
cMyVideos* lpVideos = m_videosList.at(z);
|
||||
|
||||
QStandardItem* lpItem = new QStandardItem(lpVideos->localMovieTitle());
|
||||
// QVariant v = qVariantFromValue(lpMovie);
|
||||
// lpItem->setData(v, Qt::UserRole);
|
||||
lpModel->appendRow(lpItem);
|
||||
if(lpVideos->set().length())
|
||||
{
|
||||
if(szOldSet != lpVideos->set())
|
||||
{
|
||||
szOldSet = lpVideos->set();
|
||||
lpRoot = new QStandardItem(QString("<b><i>%1</i></b>").arg(lpVideos->set()));
|
||||
QVariant v = qVariantFromValue(lpVideos);
|
||||
lpRoot->setData(v, Qt::UserRole);
|
||||
lpModel->appendRow(lpRoot);
|
||||
}
|
||||
}
|
||||
else
|
||||
lpRoot = 0;
|
||||
|
||||
QStandardItem* lpItem = new QStandardItem(QString("<b>%1</b><br><font color='blue'>%2</font> <i>%3</i>").arg(lpVideos->localMovieTitle()).arg(lpVideos->yearReleased()).arg(lpVideos->movieTagline()));
|
||||
QVariant v = qVariantFromValue(lpVideos);
|
||||
lpItem->setData(v, Qt::UserRole);
|
||||
if(lpRoot)
|
||||
lpRoot->appendRow(lpItem);
|
||||
else
|
||||
lpModel->appendRow(lpItem);
|
||||
}
|
||||
// ui->m_lpMovies->sortByColumn(0, Qt::AscendingOrder);
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ public:
|
||||
qint16 version();
|
||||
|
||||
qint32 load();
|
||||
bool art(const QString& szMediaType, const QString& szType, qint32 idMovie, qint32& artID, QString& szURL);
|
||||
|
||||
void fillVideoList(QStandardItemModel* lpModel);
|
||||
private:
|
||||
|
||||
+13
-9
@@ -8,7 +8,7 @@
|
||||
cMainWindow::cMainWindow(QWidget *parent) :
|
||||
QMainWindow(parent),
|
||||
ui(new Ui::cMainWindow),
|
||||
m_lpMovieWidget(0),
|
||||
m_lpVideoWidget(0),
|
||||
m_lpTVShowWidget(0),
|
||||
m_lpMusicWidget(0),
|
||||
m_lpMusicVideoWidget(0),
|
||||
@@ -20,8 +20,8 @@ cMainWindow::cMainWindow(QWidget *parent) :
|
||||
|
||||
cMainWindow::~cMainWindow()
|
||||
{
|
||||
if(m_lpMovieWidget)
|
||||
delete m_lpMovieWidget;
|
||||
if(m_lpVideoWidget)
|
||||
delete m_lpVideoWidget;
|
||||
|
||||
if(m_lpTVShowWidget)
|
||||
delete m_lpTVShowWidget;
|
||||
@@ -42,15 +42,19 @@ void cMainWindow::initUI()
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
m_lpMovieWidget = new cMovieWidget(this);
|
||||
m_lpVideoWidget = new cVideoWidget(this);
|
||||
m_lpTVShowWidget = new cTVShowWidget(this);
|
||||
m_lpMusicWidget = new cMusicWidget(this);
|
||||
m_lpMusicVideoWidget = new cMusicVideosWidget(this);
|
||||
|
||||
ui->m_lpMainTab->addTab(m_lpMovieWidget, QIcon(":/icons/Videos.ico"), "Movies");
|
||||
ui->m_lpMainTab->addTab(m_lpTVShowWidget, QIcon(":/icons/TV Shows.ico"), "TV Shows");
|
||||
ui->m_lpMainTab->addTab(m_lpMusicWidget, QIcon(":/icons/Musics.ico"), "Music");
|
||||
ui->m_lpMainTab->addTab(m_lpMusicVideoWidget, QIcon(":/icons/Videos.ico"), "Music Videos");
|
||||
// ui->m_lpMainTab->addTab(m_lpVideoWidget, QIcon(":/icons/Videos.ico"), "Movies");
|
||||
// ui->m_lpMainTab->addTab(m_lpTVShowWidget, QIcon(":/icons/TV Shows.ico"), "TV Shows");
|
||||
// ui->m_lpMainTab->addTab(m_lpMusicWidget, QIcon(":/icons/Musics.ico"), "Music");
|
||||
// ui->m_lpMainTab->addTab(m_lpMusicVideoWidget, QIcon(":/icons/Videos.ico"), "Music Videos");
|
||||
ui->m_lpMainTab->addTab(m_lpVideoWidget, QIcon(":/icons/empty.ico"), "Movies");
|
||||
ui->m_lpMainTab->addTab(m_lpTVShowWidget, QIcon(":/icons/empty.ico"), "TV Shows");
|
||||
ui->m_lpMainTab->addTab(m_lpMusicWidget, QIcon(":/icons/empty.ico"), "Music");
|
||||
ui->m_lpMainTab->addTab(m_lpMusicVideoWidget, QIcon(":/icons/empty.ico"), "Music Videos");
|
||||
|
||||
ui->m_lpMainTab->setCurrentIndex(0);
|
||||
|
||||
@@ -61,5 +65,5 @@ void cMainWindow::initDB()
|
||||
{
|
||||
m_lpKodiLibrary = new cKodiLibrary(ui->m_lpStatusBar, QDir::homePath() + QDir::separator() + QString(".kodi"));
|
||||
m_lpKodiLibrary->init();
|
||||
m_lpMovieWidget->setLibrary(m_lpKodiLibrary->videoLibrary());
|
||||
m_lpVideoWidget->setLibrary(m_lpKodiLibrary->videoLibrary(), m_lpKodiLibrary->imageList());
|
||||
}
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@
|
||||
#define CMAINWINDOW_H
|
||||
|
||||
|
||||
#include "cmoviewidget.h"
|
||||
#include "cvideowidget.h"
|
||||
#include "ctvshowwidget.h"
|
||||
#include "cmusicwidget.h"
|
||||
#include "cmusicvideoswidget.h"
|
||||
@@ -30,7 +30,7 @@ private slots:
|
||||
|
||||
private:
|
||||
Ui::cMainWindow* ui;
|
||||
cMovieWidget* m_lpMovieWidget;
|
||||
cVideoWidget* m_lpVideoWidget;
|
||||
cTVShowWidget* m_lpTVShowWidget;
|
||||
cMusicWidget* m_lpMusicWidget;
|
||||
cMusicVideosWidget* m_lpMusicVideoWidget;
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
#include "cmoviewidget.h"
|
||||
#include "ui_cmoviewidget.h"
|
||||
|
||||
|
||||
cMovieWidget::cMovieWidget(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::cMovieWidget),
|
||||
m_lpMovieModel(0)
|
||||
{
|
||||
initUI();
|
||||
}
|
||||
|
||||
cMovieWidget::~cMovieWidget()
|
||||
{
|
||||
if(m_lpMovieModel)
|
||||
delete m_lpMovieModel;
|
||||
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void cMovieWidget::initUI()
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
m_lpMovieModel = new QStandardItemModel(0, 2);
|
||||
QStringList headerLabels = QStringList() << tr("Movie") << tr("Year");
|
||||
m_lpMovieModel->setHorizontalHeaderLabels(headerLabels);
|
||||
ui->m_lpMovieView->setModel(m_lpMovieModel);
|
||||
}
|
||||
|
||||
void cMovieWidget::setLibrary(cKodiVideoLibrary* lpLibrary)
|
||||
{
|
||||
m_lpLibrary = lpLibrary;
|
||||
showList();
|
||||
}
|
||||
|
||||
void cMovieWidget::showList()
|
||||
{
|
||||
m_lpMovieModel->clear();
|
||||
|
||||
m_lpLibrary->fillVideoList(m_lpMovieModel);
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
#ifndef CMOVIEWIDGET_H
|
||||
#define CMOVIEWIDGET_H
|
||||
|
||||
|
||||
#include "ckodivideolibrary.h"
|
||||
|
||||
#include <QWidget>
|
||||
#include <QStandardItemModel>
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class cMovieWidget;
|
||||
}
|
||||
|
||||
|
||||
class cMovieWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit cMovieWidget(QWidget *parent = 0);
|
||||
~cMovieWidget();
|
||||
|
||||
void setLibrary(cKodiVideoLibrary* lpLibrary);
|
||||
private:
|
||||
Ui::cMovieWidget* ui;
|
||||
QStandardItemModel* m_lpMovieModel;
|
||||
cKodiVideoLibrary* m_lpLibrary;
|
||||
|
||||
void initUI();
|
||||
void showList();
|
||||
};
|
||||
|
||||
#endif // CMOVIEWIDGET_H
|
||||
@@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>cMovieWidget</class>
|
||||
<widget class="QWidget" name="cMovieWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>635</width>
|
||||
<height>505</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QTreeView" name="m_lpMovieView"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -40,12 +40,47 @@ cMyVideos* cMyVideosList::add(qint32 idMovie, qint32 idFile, const QString& szLo
|
||||
return(lpNew);
|
||||
}
|
||||
|
||||
qint32 cMyVideos::idMovie()
|
||||
{
|
||||
return(m_idMovie);
|
||||
}
|
||||
|
||||
qint32 cMyVideos::idFile()
|
||||
{
|
||||
return(m_idFile);
|
||||
}
|
||||
|
||||
QString cMyVideos::localMovieTitle()
|
||||
{
|
||||
return(m_szLocalMovieTitle);
|
||||
}
|
||||
|
||||
QString cMyVideos::moviePlot()
|
||||
{
|
||||
return(m_szMoviePlot);
|
||||
}
|
||||
|
||||
QString cMyVideos::moviePlotOutline()
|
||||
{
|
||||
return(m_szMoviePlotOutline);
|
||||
}
|
||||
|
||||
QString cMyVideos::movieTagline()
|
||||
{
|
||||
return(m_szMovieTagline);
|
||||
}
|
||||
|
||||
qint32 cMyVideos::yearReleased()
|
||||
{
|
||||
return(m_iYearReleased);
|
||||
}
|
||||
|
||||
qint32 cMyVideos::idSet()
|
||||
{
|
||||
return(m_idSet);
|
||||
}
|
||||
|
||||
QString cMyVideos::set()
|
||||
{
|
||||
return(m_szSet);
|
||||
}
|
||||
|
||||
+9
-2
@@ -21,8 +21,15 @@ public:
|
||||
const QString& szFileName, const QString& szPathURL, qint32 iPlayCount, const QDateTime& lastPlayed, const QDateTime& dateAdded,
|
||||
qreal dResumeTimeInSeconds, qreal dTotalTimeInSeconds);
|
||||
|
||||
qint32 idMovie();
|
||||
qint32 idFile();
|
||||
QString localMovieTitle();
|
||||
QString moviePlot();
|
||||
QString moviePlotOutline();
|
||||
QString movieTagline();
|
||||
qint32 yearReleased();
|
||||
qint32 idSet();
|
||||
QString set();
|
||||
private:
|
||||
qint32 m_idMovie;
|
||||
qint32 m_idFile;
|
||||
@@ -34,7 +41,7 @@ private:
|
||||
qreal m_dRating; // c05
|
||||
QString m_szWriters; // c06
|
||||
qint32 m_iYearReleased; // c07
|
||||
QString m_szThumbnails; // c08
|
||||
QString m_szThumbnails; // c08 (Selection List)
|
||||
QString m_szIMDBID; // c09
|
||||
QString m_szTitleFormattedForSorting; // c10
|
||||
qint32 m_iRuntime; // c11
|
||||
@@ -45,7 +52,7 @@ private:
|
||||
QString m_szOriginalMovieTitle; // c16
|
||||
QString m_szStudio; // c18
|
||||
QString m_szTrailerURL; // c19
|
||||
QString m_szFanartURLs; // c20
|
||||
QString m_szFanartURLs; // c20 (Selection List)
|
||||
QString m_szCountry; // c21
|
||||
QString m_szFilePath; // c22
|
||||
qint32 m_idPath; // c23
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
#include "cvideoviewitemdelegate.h"
|
||||
|
||||
#include <QPainter>
|
||||
#include <QTextDocument>
|
||||
#include <QAbstractTextDocumentLayout>
|
||||
|
||||
|
||||
void cVideoViewItemDelegate::paint(QPainter* painter, const QStyleOptionViewItem & option, const QModelIndex &index) const
|
||||
{
|
||||
QStyleOptionViewItem options = option;
|
||||
initStyleOption(&options, index);
|
||||
|
||||
painter->save();
|
||||
|
||||
QTextDocument doc;
|
||||
doc.setHtml(options.text);
|
||||
|
||||
options.text = "";
|
||||
options.widget->style()->drawControl(QStyle::CE_ItemViewItem, &options, painter);
|
||||
|
||||
// shift text right to make icon visible
|
||||
QSize iconSize = options.icon.actualSize(options.rect.size());
|
||||
painter->translate(options.rect.left()+iconSize.width(), options.rect.top());
|
||||
QRect clip(0, 0, options.rect.width()+iconSize.width(), options.rect.height());
|
||||
|
||||
//doc.drawContents(painter, clip);
|
||||
|
||||
painter->setClipRect(clip);
|
||||
QAbstractTextDocumentLayout::PaintContext ctx;
|
||||
// set text color to red for selected item
|
||||
if (option.state & QStyle::State_Selected)
|
||||
ctx.palette.setColor(QPalette::Text, QColor("red"));
|
||||
ctx.clip = clip;
|
||||
doc.documentLayout()->draw(painter, ctx);
|
||||
|
||||
painter->restore();
|
||||
}
|
||||
|
||||
QSize cVideoViewItemDelegate::sizeHint ( const QStyleOptionViewItem & option, const QModelIndex & index ) const
|
||||
{
|
||||
QStyleOptionViewItem options = option;
|
||||
initStyleOption(&options, index);
|
||||
|
||||
QTextDocument doc;
|
||||
doc.setHtml(options.text);
|
||||
doc.setTextWidth(options.rect.width());
|
||||
return QSize(doc.idealWidth(), doc.size().height());
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#ifndef CVIDEOVIEWITEMDELEGATE_H
|
||||
#define CVIDEOVIEWITEMDELEGATE_H
|
||||
|
||||
|
||||
#include <QStyledItemDelegate>
|
||||
|
||||
|
||||
class cVideoViewItemDelegate : public QStyledItemDelegate
|
||||
{
|
||||
public:
|
||||
protected:
|
||||
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
||||
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
||||
};
|
||||
|
||||
#endif // CVIDEOVIEWITEMDELEGATE_H
|
||||
@@ -0,0 +1,93 @@
|
||||
#include "cvideowidget.h"
|
||||
#include "ui_cvideowidget.h"
|
||||
#include "cimage.h"
|
||||
|
||||
#include "cvideoviewitemdelegate.h"
|
||||
|
||||
|
||||
cVideoWidget::cVideoWidget(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::cVideoWidget),
|
||||
m_lpVideoModel(0),
|
||||
m_lpImageList(0)
|
||||
{
|
||||
initUI();
|
||||
}
|
||||
|
||||
cVideoWidget::~cVideoWidget()
|
||||
{
|
||||
if(m_lpVideoModel)
|
||||
delete m_lpVideoModel;
|
||||
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void cVideoWidget::initUI()
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
m_lpVideoModel = new QStandardItemModel(0, 1);
|
||||
QStringList headerLabels = QStringList() << tr("Video");
|
||||
m_lpVideoModel->setHorizontalHeaderLabels(headerLabels);
|
||||
ui->m_lpVideoView->setModel(m_lpVideoModel);
|
||||
ui->m_lpVideoView->setItemDelegate(new cVideoViewItemDelegate());
|
||||
|
||||
QList<int> sizes;
|
||||
sizes << 500 << 1000;
|
||||
ui->m_lpSplitter->setSizes(sizes);
|
||||
QItemSelectionModel* selectionModel = ui->m_lpVideoView->selectionModel();
|
||||
connect(selectionModel, SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this, SLOT(selectionChanged(QItemSelection,QItemSelection)));
|
||||
}
|
||||
|
||||
void cVideoWidget::setLibrary(cKodiVideoLibrary* lpVideoLibrary, cImageList* lpImageList)
|
||||
{
|
||||
m_lpVideoLibrary = lpVideoLibrary;
|
||||
m_lpImageList = lpImageList;
|
||||
showList();
|
||||
}
|
||||
|
||||
void cVideoWidget::showList()
|
||||
{
|
||||
m_lpVideoModel->clear();
|
||||
|
||||
m_lpVideoLibrary->fillVideoList(m_lpVideoModel);
|
||||
ui->m_lpVideoView->resizeColumnToContents(0);
|
||||
}
|
||||
|
||||
void cVideoWidget::selectionChanged(const QItemSelection& /*newSelection*/, const QItemSelection& /*oldSelection*/)
|
||||
{
|
||||
QPixmap thumb;
|
||||
QPixmap fanart;
|
||||
QPixmap poster;
|
||||
QPixmap banner;
|
||||
|
||||
ui->m_lpThumb->clear();
|
||||
ui->m_lpFanart->clear();
|
||||
ui->m_lpPoster->clear();
|
||||
ui->m_lpBanner->clear();
|
||||
|
||||
const QModelIndex index = ui->m_lpVideoView->selectionModel()->currentIndex();
|
||||
cMyVideos* lpVideos = index.data(Qt::UserRole).value<cMyVideos*>();
|
||||
if(m_lpVideoModel->itemFromIndex(index)->hasChildren())
|
||||
{
|
||||
thumb = m_lpImageList->get(cImage::MEDIATYPE_set, cImage::TYPE_thumb, lpVideos->idSet());
|
||||
fanart = m_lpImageList->get(cImage::MEDIATYPE_set, cImage::TYPE_fanart, lpVideos->idSet());
|
||||
poster = m_lpImageList->get(cImage::MEDIATYPE_set, cImage::TYPE_poster, lpVideos->idSet());
|
||||
banner = m_lpImageList->get(cImage::MEDIATYPE_set, cImage::TYPE_banner, lpVideos->idSet());
|
||||
}
|
||||
else
|
||||
{
|
||||
thumb = m_lpImageList->get(cImage::MEDIATYPE_movie, cImage::TYPE_thumb, lpVideos->idMovie());
|
||||
fanart = m_lpImageList->get(cImage::MEDIATYPE_movie, cImage::TYPE_fanart, lpVideos->idMovie());
|
||||
poster = m_lpImageList->get(cImage::MEDIATYPE_movie, cImage::TYPE_poster, lpVideos->idMovie());
|
||||
banner = m_lpImageList->get(cImage::MEDIATYPE_movie, cImage::TYPE_banner, lpVideos->idMovie());
|
||||
}
|
||||
if(thumb.width())
|
||||
ui->m_lpThumb->setPixmap(thumb.scaled(thumb.size()/4));
|
||||
if(fanart.width())
|
||||
ui->m_lpFanart->setPixmap(fanart.scaled(fanart.size()/4));
|
||||
if(poster.width())
|
||||
ui->m_lpPoster->setPixmap(poster.scaled(poster.size()/4));
|
||||
if(banner.width())
|
||||
ui->m_lpBanner->setPixmap(thumb.scaled(thumb.size()/4));
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
#ifndef CMOVIEWIDGET_H
|
||||
#define CMOVIEWIDGET_H
|
||||
|
||||
|
||||
#include "ckodivideolibrary.h"
|
||||
|
||||
#include <QWidget>
|
||||
#include <QStandardItemModel>
|
||||
#include <QItemSelection>
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class cVideoWidget;
|
||||
}
|
||||
|
||||
|
||||
class cImage;
|
||||
class cImageList;
|
||||
|
||||
class cVideoWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit cVideoWidget(QWidget *parent = 0);
|
||||
~cVideoWidget();
|
||||
|
||||
void setLibrary(cKodiVideoLibrary* lpVideoLibrary, cImageList* lpImageList);
|
||||
private:
|
||||
Ui::cVideoWidget* ui;
|
||||
QStandardItemModel* m_lpVideoModel;
|
||||
cKodiVideoLibrary* m_lpVideoLibrary;
|
||||
cImageList* m_lpImageList;
|
||||
|
||||
void initUI();
|
||||
void showList();
|
||||
private slots:
|
||||
void selectionChanged(const QItemSelection& newSelection, const QItemSelection& oldSelection);
|
||||
};
|
||||
|
||||
#endif // CMOVIEWIDGET_H
|
||||
+108
@@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>cVideoWidget</class>
|
||||
<widget class="QWidget" name="cVideoWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>635</width>
|
||||
<height>505</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QSplitter" name="m_lpSplitter">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<widget class="QTreeView" name="m_lpVideoView">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="baseSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
<property name="alternatingRowColors">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="headerHidden">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QScrollArea" name="scrollArea">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="scrollAreaWidgetContents">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>354</width>
|
||||
<height>485</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="m_lpBanner">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="m_lpFanart">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="m_lpThumb">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="m_lpPoster">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
+12
-6
@@ -16,30 +16,36 @@ SOURCES += main.cpp\
|
||||
cmainwindow.cpp \
|
||||
ckodivideolibrary.cpp \
|
||||
ckodilibrary.cpp \
|
||||
cmoviewidget.cpp \
|
||||
ctvshowwidget.cpp \
|
||||
cmaintabbar.cpp \
|
||||
cmaintabwidget.cpp \
|
||||
cmusicwidget.cpp \
|
||||
cmusicvideoswidget.cpp \
|
||||
cmyvideos.cpp
|
||||
cmyvideos.cpp \
|
||||
cvideowidget.cpp \
|
||||
cvideoviewitemdelegate.cpp \
|
||||
ckoditextureslibrary.cpp \
|
||||
cimage.cpp
|
||||
|
||||
HEADERS += cmainwindow.h \
|
||||
ckodivideolibrary.h \
|
||||
ckodilibrary.h \
|
||||
cmoviewidget.h \
|
||||
ctvshowwidget.h \
|
||||
cmaintabbar.h \
|
||||
cmaintabwidget.h \
|
||||
cmusicwidget.h \
|
||||
cmusicvideoswidget.h \
|
||||
cmyvideos.h
|
||||
cmyvideos.h \
|
||||
cvideowidget.h \
|
||||
cvideoviewitemdelegate.h \
|
||||
ckoditextureslibrary.h \
|
||||
cimage.h
|
||||
|
||||
FORMS += cmainwindow.ui \
|
||||
cmoviewidget.ui \
|
||||
ctvshowwidget.ui \
|
||||
cmusicwidget.ui \
|
||||
cmusicvideoswidget.ui
|
||||
cmusicvideoswidget.ui \
|
||||
cvideowidget.ui
|
||||
|
||||
RESOURCES += \
|
||||
qtkodidb.qrc
|
||||
|
||||
+9
-9
@@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 4.1.0, 2016-10-23T21:21:45. -->
|
||||
<!-- Written by QtCreator 4.1.0, 2016-10-25T09:29:54. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
<value type="QByteArray">{90551da6-f083-4f65-96d6-4435a4c6527f}</value>
|
||||
<value type="QByteArray">{c7aa4b7f-2ffc-4531-868b-ccb2d98c3d0a}</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||
@@ -59,14 +59,14 @@
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.7.0 MinGW 32bit3</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.7.0 MinGW 32bit3</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.7.0 MinGW 32bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.7.0 MinGW 32bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.57.win32_mingw53_kit</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/Users/birkeh/Documents/GitHub/build-qtKodiDB-Desktop_Qt_5_7_0_MinGW_32bit3-Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/Users/herwi/Documents/GitHub/build-qtKodiDB-Desktop_Qt_5_7_0_MinGW_32bit-Debug</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
@@ -120,7 +120,7 @@
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/Users/birkeh/Documents/GitHub/build-qtKodiDB-Desktop_Qt_5_7_0_MinGW_32bit3-Release</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/Users/herwi/Documents/GitHub/build-qtKodiDB-Desktop_Qt_5_7_0_MinGW_32bit-Release</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
@@ -174,7 +174,7 @@
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/Users/birkeh/Documents/GitHub/build-qtKodiDB-Desktop_Qt_5_7_0_MinGW_32bit3-Profile</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/Users/herwi/Documents/GitHub/build-qtKodiDB-Desktop_Qt_5_7_0_MinGW_32bit-Profile</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
@@ -286,13 +286,13 @@
|
||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qtKodiDB</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:C:/Users/birkeh/Documents/GitHub/qtKodiDB/qtKodiDB.pro</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:C:/Users/herwi/Documents/GitHub/qtKodiDB/qtKodiDB.pro</value>
|
||||
<value type="bool" key="QmakeProjectManager.QmakeRunConfiguration.UseLibrarySearchPath">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">qtKodiDB.pro</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory.default">C:/Users/birkeh/Documents/GitHub/build-qtKodiDB-Desktop_Qt_5_7_0_MinGW_32bit3-Debug</value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory.default">C:/Users/herwi/Documents/GitHub/build-qtKodiDB-Desktop_Qt_5_7_0_MinGW_32bit-Debug</value>
|
||||
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
|
||||
Reference in New Issue
Block a user