Init
This commit is contained in:
@@ -71,15 +71,6 @@ qint32 cImage::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);
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -51,14 +51,14 @@ void cMainWindow::initUI()
|
||||
// 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->addTab(m_lpVideoWidget, QIcon(":/icons/empty.ico"), tr("Movies"));
|
||||
ui->m_lpMainTab->addTab(m_lpTVShowWidget, QIcon(":/icons/empty.ico"), tr("TV Shows"));
|
||||
ui->m_lpMainTab->addTab(m_lpMusicWidget, QIcon(":/icons/empty.ico"), tr("Music"));
|
||||
ui->m_lpMainTab->addTab(m_lpMusicVideoWidget, QIcon(":/icons/empty.ico"), tr("Music Videos"));
|
||||
|
||||
ui->m_lpMainTab->setCurrentIndex(0);
|
||||
|
||||
setWindowTitle("qtKodiAdmin");
|
||||
setWindowTitle(tr("qtKodiAdmin"));
|
||||
}
|
||||
|
||||
void cMainWindow::initDB()
|
||||
|
||||
+180
-10
@@ -1,6 +1,18 @@
|
||||
#include "cmyvideos.h"
|
||||
|
||||
cMyVideos::cMyVideos(qint32 idMovie, qint32 idFile, const QString& szLocalMovieTitle, const QString& szMoviePlot, const QString& szMoviePlotOutline,
|
||||
|
||||
cMyVideosValues::cMyVideosValues() :
|
||||
m_idMovie(-1), m_idFile(-1), m_szLocalMovieTitle("UNSET"), m_szMoviePlot("UNSET"), m_szMoviePlotOutline("UNSET"),
|
||||
m_szMovieTagline("UNSET"), m_iRatingVotes(-1), m_dRating(-1), m_szWriters("UNSET"), m_iYearReleased(-1),
|
||||
m_szThumbnails("UNSET"), m_szIMDBID("UNSET"), m_szTitleFormattedForSorting("UNSET"), m_iRuntime(-1),
|
||||
m_szMPAARating("UNSET"), m_szIMDBTop250Ranking("UNSET"), m_szGenre("UNSET"), m_szDirector("UNSET"), m_szOriginalMovieTitle("UNSET"),
|
||||
m_szStudio("UNSET"), m_szTrailerURL("UNSET"), m_szFanartURLs("UNSET"), m_szCountry("UNSET"), m_szFilePath("UNSET"), m_idPath(-1), m_idSet(-1),
|
||||
m_iUserrating(-1), m_szSet("UNSET"), m_szSetOverview("UNSET"), m_szFileName("UNSET"), m_szPathURL("UNSET"), m_iPlayCount(-1),
|
||||
m_dResumeTimeInSeconds(-1), m_dTotalTimeInSeconds(-1)
|
||||
{
|
||||
}
|
||||
|
||||
cMyVideosValues::cMyVideosValues(qint32 idMovie, qint32 idFile, const QString& szLocalMovieTitle, const QString& szMoviePlot, const QString& szMoviePlotOutline,
|
||||
const QString& szMovieTagline, qint32 iRatingVotes, qreal dRating, const QString& szWriters, qint32 iYearReleased,
|
||||
const QString& szThumbnails, const QString& szIMDBID, const QString& szTitleFormattedForSorting, qint32 iRuntime,
|
||||
const QString& szMPAARating, const QString& szIMDBTop250Ranking, const QString& szGenre, const QString& szDirector,
|
||||
@@ -18,6 +30,152 @@ cMyVideos::cMyVideos(qint32 idMovie, qint32 idFile, const QString& szLocalMovieT
|
||||
{
|
||||
}
|
||||
|
||||
void cMyVideosValues::set(qint32 idMovie, qint32 idFile, const QString& szLocalMovieTitle, const QString& szMoviePlot, const QString& szMoviePlotOutline,
|
||||
const QString& szMovieTagline, qint32 iRatingVotes, qreal dRating, const QString& szWriters, qint32 iYearReleased,
|
||||
const QString& szThumbnails, const QString& szIMDBID, const QString& szTitleFormattedForSorting, qint32 iRuntime,
|
||||
const QString& szMPAARating, const QString& szIMDBTop250Ranking, const QString& szGenre, const QString& szDirector,
|
||||
const QString& szOriginalMovieTitle, const QString& szStudio, const QString& szTrailerURL, const QString& szFanartURLs,
|
||||
const QString& szCountry, const QString& szFilePath, qint32 idPath, qint32 idSet, qint32 iUserrating, const QString& szSet, const QString& szSetOverview,
|
||||
const QString& szFileName, const QString& szPathURL, qint32 iPlayCount, const QDateTime& lastPlayed, const QDateTime& dateAdded,
|
||||
qreal dResumeTimeInSeconds, qreal dTotalTimeInSeconds)
|
||||
{
|
||||
m_idMovie = idMovie;
|
||||
m_idFile = idFile;
|
||||
m_szLocalMovieTitle = szLocalMovieTitle;
|
||||
m_szMoviePlot = szMoviePlot;
|
||||
m_szMoviePlotOutline = szMoviePlotOutline;
|
||||
m_szMovieTagline = szMovieTagline;
|
||||
m_iRatingVotes = iRatingVotes;
|
||||
m_dRating = dRating;
|
||||
m_szWriters = szWriters;
|
||||
m_iYearReleased = iYearReleased;
|
||||
m_szThumbnails = szThumbnails;
|
||||
m_szIMDBID = szIMDBID;
|
||||
m_szTitleFormattedForSorting = szTitleFormattedForSorting;
|
||||
m_iRuntime = iRuntime;
|
||||
m_szMPAARating = szMPAARating;
|
||||
m_szIMDBTop250Ranking = szIMDBTop250Ranking;
|
||||
m_szGenre = szGenre;
|
||||
m_szDirector = szDirector;
|
||||
m_szOriginalMovieTitle = szOriginalMovieTitle;
|
||||
m_szStudio = szStudio;
|
||||
m_szTrailerURL = szTrailerURL;
|
||||
m_szFanartURLs = szFanartURLs;
|
||||
m_szCountry = szCountry;
|
||||
m_szFilePath = szFilePath;
|
||||
m_idPath = idPath;
|
||||
m_idSet = idSet;
|
||||
m_iUserrating = iUserrating;
|
||||
m_szSet = szSet;
|
||||
m_szSetOverview = szSetOverview;
|
||||
m_szFileName = szFileName;
|
||||
m_szPathURL = szPathURL;
|
||||
m_iPlayCount = iPlayCount;
|
||||
m_lastPlayed = lastPlayed;
|
||||
m_dateAdded = dateAdded;
|
||||
m_dResumeTimeInSeconds = dResumeTimeInSeconds;
|
||||
m_dTotalTimeInSeconds = dTotalTimeInSeconds;
|
||||
}
|
||||
|
||||
inline bool cMyVideosValues::operator==(const cMyVideosValues b) const
|
||||
{
|
||||
if(m_idMovie != b.m_idMovie) return(false);
|
||||
if(m_idFile != b.m_idFile) return(false);
|
||||
if(m_szLocalMovieTitle != b.m_szLocalMovieTitle) return(false);
|
||||
if(m_szMoviePlot != b.m_szMoviePlot) return(false);
|
||||
if(m_szMoviePlotOutline != b.m_szMoviePlotOutline) return(false);
|
||||
if(m_szMovieTagline != b.m_szMovieTagline) return(false);
|
||||
if(m_iRatingVotes != b.m_iRatingVotes) return(false);
|
||||
if(m_dRating != b.m_dRating) return(false);
|
||||
if(m_szWriters != b.m_szWriters) return(false);
|
||||
if(m_iYearReleased != b.m_iYearReleased) return(false);
|
||||
if(m_szThumbnails != b.m_szThumbnails) return(false);
|
||||
if(m_szIMDBID != b.m_szIMDBID) return(false);
|
||||
if(m_szTitleFormattedForSorting != b.m_szTitleFormattedForSorting) return(false);
|
||||
if(m_iRuntime != b.m_iRuntime) return(false);
|
||||
if(m_szMPAARating != b.m_szMPAARating) return(false);
|
||||
if(m_szIMDBTop250Ranking != b.m_szIMDBTop250Ranking) return(false);
|
||||
if(m_szGenre != b.m_szGenre) return(false);
|
||||
if(m_szDirector != b.m_szDirector) return(false);
|
||||
if(m_szOriginalMovieTitle != b.m_szOriginalMovieTitle) return(false);
|
||||
if(m_szStudio != b.m_szStudio) return(false);
|
||||
if(m_szTrailerURL != b.m_szTrailerURL) return(false);
|
||||
if(m_szFanartURLs != b.m_szFanartURLs) return(false);
|
||||
if(m_szCountry != b.m_szCountry) return(false);
|
||||
if(m_szFilePath != b.m_szFilePath) return(false);
|
||||
if(m_idPath != b.m_idPath) return(false);
|
||||
if(m_idSet != b.m_idSet) return(false);
|
||||
if(m_iUserrating != b.m_iUserrating) return(false);
|
||||
if(m_szSet != b.m_szSet) return(false);
|
||||
if(m_szSetOverview != b.m_szSetOverview) return(false);
|
||||
if(m_szFileName != b.m_szFileName) return(false);
|
||||
if(m_szPathURL != b.m_szPathURL) return(false);
|
||||
if(m_iPlayCount != b.m_iPlayCount) return(false);
|
||||
if(m_lastPlayed != b.m_lastPlayed) return(false);
|
||||
if(m_dateAdded != b.m_dateAdded) return(false);
|
||||
if(m_dResumeTimeInSeconds != b.m_dResumeTimeInSeconds) return(false);
|
||||
if(m_dTotalTimeInSeconds != b.m_dTotalTimeInSeconds) return(false);
|
||||
return(true);
|
||||
}
|
||||
|
||||
inline bool cMyVideosValues::operator!=(const cMyVideosValues b) const
|
||||
{
|
||||
if(m_idMovie != b.m_idMovie
|
||||
|| m_idFile != b.m_idFile
|
||||
|| m_szLocalMovieTitle != b.m_szLocalMovieTitle
|
||||
|| m_szMoviePlot != b.m_szMoviePlot
|
||||
|| m_szMoviePlotOutline != b.m_szMoviePlotOutline
|
||||
|| m_szMovieTagline != b.m_szMovieTagline
|
||||
|| m_iRatingVotes != b.m_iRatingVotes
|
||||
|| m_dRating != b.m_dRating
|
||||
|| m_szWriters != b.m_szWriters
|
||||
|| m_iYearReleased != b.m_iYearReleased
|
||||
|| m_szThumbnails != b.m_szThumbnails
|
||||
|| m_szIMDBID != b.m_szIMDBID
|
||||
|| m_szTitleFormattedForSorting != b.m_szTitleFormattedForSorting
|
||||
|| m_iRuntime != b.m_iRuntime
|
||||
|| m_szMPAARating != b.m_szMPAARating
|
||||
|| m_szIMDBTop250Ranking != b.m_szIMDBTop250Ranking
|
||||
|| m_szGenre != b.m_szGenre
|
||||
|| m_szDirector != b.m_szDirector
|
||||
|| m_szOriginalMovieTitle != b.m_szOriginalMovieTitle
|
||||
|| m_szStudio != b.m_szStudio
|
||||
|| m_szTrailerURL != b.m_szTrailerURL
|
||||
|| m_szFanartURLs != b.m_szFanartURLs
|
||||
|| m_szCountry != b.m_szCountry
|
||||
|| m_szFilePath != b.m_szFilePath
|
||||
|| m_idPath != b.m_idPath
|
||||
|| m_idSet != b.m_idSet
|
||||
|| m_iUserrating != b.m_iUserrating
|
||||
|| m_szSet != b.m_szSet
|
||||
|| m_szSetOverview != b.m_szSetOverview
|
||||
|| m_szFileName != b.m_szFileName
|
||||
|| m_szPathURL != b.m_szPathURL
|
||||
|| m_iPlayCount != b.m_iPlayCount
|
||||
|| m_lastPlayed != b.m_lastPlayed
|
||||
|| m_dateAdded != b.m_dateAdded
|
||||
|| m_dResumeTimeInSeconds != b.m_dResumeTimeInSeconds
|
||||
|| m_dTotalTimeInSeconds != b.m_dTotalTimeInSeconds)
|
||||
return(true);
|
||||
return(false);
|
||||
}
|
||||
|
||||
cMyVideos::cMyVideos(qint32 idMovie, qint32 idFile, const QString& szLocalMovieTitle, const QString& szMoviePlot, const QString& szMoviePlotOutline,
|
||||
const QString& szMovieTagline, qint32 iRatingVotes, qreal dRating, const QString& szWriters, qint32 iYearReleased,
|
||||
const QString& szThumbnails, const QString& szIMDBID, const QString& szTitleFormattedForSorting, qint32 iRuntime,
|
||||
const QString& szMPAARating, const QString& szIMDBTop250Ranking, const QString& szGenre, const QString& szDirector,
|
||||
const QString& szOriginalMovieTitle, const QString& szStudio, const QString& szTrailerURL, const QString& szFanartURLs,
|
||||
const QString& szCountry, const QString& szFilePath, qint32 idPath, qint32 idSet, qint32 iUserrating, const QString& szSet, const QString& szSetOverview,
|
||||
const QString& szFileName, const QString& szPathURL, qint32 iPlayCount, const QDateTime& lastPlayed, const QDateTime& dateAdded,
|
||||
qreal dResumeTimeInSeconds, qreal dTotalTimeInSeconds) :
|
||||
m_values(idMovie, idFile, szLocalMovieTitle, szMoviePlot, szMoviePlotOutline, szMovieTagline, iRatingVotes, dRating, szWriters, iYearReleased,
|
||||
szThumbnails, szIMDBID, szTitleFormattedForSorting, iRuntime, szMPAARating, szIMDBTop250Ranking, szGenre, szDirector, szOriginalMovieTitle,
|
||||
szStudio, szTrailerURL, szFanartURLs, szCountry, szFilePath, idPath, idSet, iUserrating, szSet, szSetOverview, szFileName, szPathURL, iPlayCount,
|
||||
lastPlayed, dateAdded, dResumeTimeInSeconds, dTotalTimeInSeconds)
|
||||
{
|
||||
m_oValues = m_values;
|
||||
}
|
||||
|
||||
cMyVideosList::cMyVideosList()
|
||||
{
|
||||
}
|
||||
@@ -42,45 +200,57 @@ cMyVideos* cMyVideosList::add(qint32 idMovie, qint32 idFile, const QString& szLo
|
||||
|
||||
qint32 cMyVideos::idMovie()
|
||||
{
|
||||
return(m_idMovie);
|
||||
return(m_values.m_idMovie);
|
||||
}
|
||||
|
||||
qint32 cMyVideos::idFile()
|
||||
{
|
||||
return(m_idFile);
|
||||
return(m_values.m_idFile);
|
||||
}
|
||||
|
||||
QString cMyVideos::localMovieTitle()
|
||||
{
|
||||
return(m_szLocalMovieTitle);
|
||||
return(m_values.m_szLocalMovieTitle);
|
||||
}
|
||||
|
||||
QString cMyVideos::moviePlot()
|
||||
{
|
||||
return(m_szMoviePlot);
|
||||
return(m_values.m_szMoviePlot);
|
||||
}
|
||||
|
||||
QString cMyVideos::moviePlotOutline()
|
||||
{
|
||||
return(m_szMoviePlotOutline);
|
||||
return(m_values.m_szMoviePlotOutline);
|
||||
}
|
||||
|
||||
QString cMyVideos::movieTagline()
|
||||
{
|
||||
return(m_szMovieTagline);
|
||||
return(m_values.m_szMovieTagline);
|
||||
}
|
||||
|
||||
qint32 cMyVideos::yearReleased()
|
||||
{
|
||||
return(m_iYearReleased);
|
||||
return(m_values.m_iYearReleased);
|
||||
}
|
||||
|
||||
qint32 cMyVideos::idSet()
|
||||
{
|
||||
return(m_idSet);
|
||||
return(m_values.m_idSet);
|
||||
}
|
||||
|
||||
QString cMyVideos::set()
|
||||
{
|
||||
return(m_szSet);
|
||||
return(m_values.m_szSet);
|
||||
}
|
||||
|
||||
bool cMyVideos::isNew()
|
||||
{
|
||||
if(m_values.m_idMovie == -1)
|
||||
return(true);
|
||||
return(false);
|
||||
}
|
||||
|
||||
bool cMyVideos::isChanged()
|
||||
{
|
||||
return(m_values != m_oValues);
|
||||
}
|
||||
|
||||
+50
-19
@@ -8,29 +8,31 @@
|
||||
#include <QMetaType>
|
||||
|
||||
|
||||
class cMyVideos
|
||||
class cMyVideosValues
|
||||
{
|
||||
public:
|
||||
cMyVideosValues();
|
||||
cMyVideosValues(qint32 idMovie, qint32 idFile, const QString& szLocalMovieTitle, const QString& szMoviePlot, const QString& szMoviePlotOutline,
|
||||
const QString& szMovieTagline, qint32 iRatingVotes, qreal dRating, const QString& szWriters, qint32 iYearReleased,
|
||||
const QString& szThumbnails, const QString& szIMDBID, const QString& szTitleFormattedForSorting, qint32 iRuntime,
|
||||
const QString& szMPAARating, const QString& szIMDBTop250Ranking, const QString& szGenre, const QString& szDirector,
|
||||
const QString& szOriginalMovieTitle, const QString& szStudio, const QString& szTrailerURL, const QString& szFanartURLs,
|
||||
const QString& szCountry, const QString& szFilePath, qint32 idPath, qint32 idSet, qint32 iUserrating, const QString& szSet, const QString& szSetOverview,
|
||||
const QString& szFileName, const QString& szPathURL, qint32 iPlayCount, const QDateTime& lastPlayed, const QDateTime& dateAdded,
|
||||
qreal dResumeTimeInSeconds, qreal dTotalTimeInSeconds);
|
||||
|
||||
cMyVideos(qint32 idMovie, qint32 idFile, const QString& szLocalMovieTitle, const QString& szMoviePlot, const QString& szMoviePlotOutline,
|
||||
const QString& szMovieTagline, qint32 iRatingVotes, qreal dRating, const QString& szWriters, qint32 iYearReleased,
|
||||
const QString& szThumbnails, const QString& szIMDBID, const QString& szTitleFormattedForSorting, qint32 iRuntime,
|
||||
const QString& szMPAARating, const QString& szIMDBTop250Ranking, const QString& szGenre, const QString& szDirector,
|
||||
const QString& szOriginalMovieTitle, const QString& szStudio, const QString& szTrailerURL, const QString& szFanartURLs,
|
||||
const QString& szCountry, const QString& szFilePath, qint32 idPath, qint32 idSet, qint32 iUserrating, const QString& szSet, const QString& szSetOverview,
|
||||
const QString& szFileName, const QString& szPathURL, qint32 iPlayCount, const QDateTime& lastPlayed, const QDateTime& dateAdded,
|
||||
qreal dResumeTimeInSeconds, qreal dTotalTimeInSeconds);
|
||||
void set(qint32 idMovie, qint32 idFile, const QString& szLocalMovieTitle, const QString& szMoviePlot, const QString& szMoviePlotOutline,
|
||||
const QString& szMovieTagline, qint32 iRatingVotes, qreal dRating, const QString& szWriters, qint32 iYearReleased,
|
||||
const QString& szThumbnails, const QString& szIMDBID, const QString& szTitleFormattedForSorting, qint32 iRuntime,
|
||||
const QString& szMPAARating, const QString& szIMDBTop250Ranking, const QString& szGenre, const QString& szDirector,
|
||||
const QString& szOriginalMovieTitle, const QString& szStudio, const QString& szTrailerURL, const QString& szFanartURLs,
|
||||
const QString& szCountry, const QString& szFilePath, qint32 idPath, qint32 idSet, qint32 iUserrating, const QString& szSet, const QString& szSetOverview,
|
||||
const QString& szFileName, const QString& szPathURL, qint32 iPlayCount, const QDateTime& lastPlayed, const QDateTime& dateAdded,
|
||||
qreal dResumeTimeInSeconds, qreal dTotalTimeInSeconds);
|
||||
|
||||
inline bool operator==(const cMyVideosValues b) const;
|
||||
inline bool operator!=(const cMyVideosValues b) const;
|
||||
|
||||
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;
|
||||
QString m_szLocalMovieTitle; // c00
|
||||
@@ -69,6 +71,35 @@ private:
|
||||
qreal m_dTotalTimeInSeconds; // totalTimeInSeconds
|
||||
};
|
||||
|
||||
class cMyVideos
|
||||
{
|
||||
public:
|
||||
cMyVideos(qint32 idMovie, qint32 idFile, const QString& szLocalMovieTitle, const QString& szMoviePlot, const QString& szMoviePlotOutline,
|
||||
const QString& szMovieTagline, qint32 iRatingVotes, qreal dRating, const QString& szWriters, qint32 iYearReleased,
|
||||
const QString& szThumbnails, const QString& szIMDBID, const QString& szTitleFormattedForSorting, qint32 iRuntime,
|
||||
const QString& szMPAARating, const QString& szIMDBTop250Ranking, const QString& szGenre, const QString& szDirector,
|
||||
const QString& szOriginalMovieTitle, const QString& szStudio, const QString& szTrailerURL, const QString& szFanartURLs,
|
||||
const QString& szCountry, const QString& szFilePath, qint32 idPath, qint32 idSet, qint32 iUserrating, const QString& szSet, const QString& szSetOverview,
|
||||
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();
|
||||
|
||||
bool isNew();
|
||||
bool isChanged();
|
||||
private:
|
||||
cMyVideosValues m_values;
|
||||
cMyVideosValues m_oValues;
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(cMyVideos*)
|
||||
|
||||
class cMyVideosList : public QList<cMyVideos*>
|
||||
|
||||
+41
-4
@@ -68,6 +68,7 @@ void cVideoWidget::selectionChanged(const QItemSelection& /*newSelection*/, cons
|
||||
|
||||
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());
|
||||
@@ -82,12 +83,48 @@ void cVideoWidget::selectionChanged(const QItemSelection& /*newSelection*/, cons
|
||||
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));
|
||||
{
|
||||
ui->m_lpThumb->setPixmap(thumb.scaled(480, 270, Qt::KeepAspectRatio));
|
||||
ui->m_lpThumbBox->setTitle(QString(tr("Thumb (%1 x %2)")).arg(thumb.width()).arg(thumb.height()));
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->m_lpThumb->clear();
|
||||
ui->m_lpThumbBox->setTitle("Thumb");
|
||||
}
|
||||
|
||||
if(fanart.width())
|
||||
ui->m_lpFanart->setPixmap(fanart.scaled(fanart.size()/4));
|
||||
{
|
||||
ui->m_lpFanart->setPixmap(fanart.scaled(480, 270, Qt::KeepAspectRatio));
|
||||
ui->m_lpFanartBox->setTitle(QString(tr("Fanart (%1 x %2)")).arg(fanart.width()).arg(fanart.height()));
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->m_lpFanart->clear();
|
||||
ui->m_lpFanartBox->setTitle(tr("Fanart"));
|
||||
}
|
||||
|
||||
if(poster.width())
|
||||
ui->m_lpPoster->setPixmap(poster.scaled(poster.size()/4));
|
||||
{
|
||||
ui->m_lpPoster->setPixmap(poster.scaled(480, 270, Qt::KeepAspectRatio));
|
||||
ui->m_lpPosterBox->setTitle(QString(tr("Poster (%1 x %2)")).arg(poster.width()).arg(poster.height()));
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->m_lpPoster->clear();
|
||||
ui->m_lpPosterBox->setTitle(tr("Poster"));
|
||||
}
|
||||
|
||||
if(banner.width())
|
||||
ui->m_lpBanner->setPixmap(thumb.scaled(thumb.size()/4));
|
||||
{
|
||||
ui->m_lpBanner->setPixmap(banner.scaled(480, 270, Qt::KeepAspectRatio));
|
||||
ui->m_lpBannerBox->setTitle(QString(tr("Banner (%1 x %2)")).arg(banner.width()).arg(banner.height()));
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->m_lpBanner->clear();
|
||||
ui->m_lpBannerBox->setTitle(tr("Banner"));
|
||||
}
|
||||
}
|
||||
|
||||
+53
-17
@@ -67,33 +67,69 @@
|
||||
<height>485</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="m_lpBanner">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
<layout class="QGridLayout" name="gridLayout_6">
|
||||
<item row="0" column="0">
|
||||
<widget class="QGroupBox" name="m_lpFanartBox">
|
||||
<property name="title">
|
||||
<string>Fanart</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="m_lpFanart">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="m_lpFanart">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
<item row="1" column="0">
|
||||
<widget class="QGroupBox" name="m_lpPosterBox">
|
||||
<property name="title">
|
||||
<string>Poster</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="m_lpPoster">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="m_lpThumb">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
<item row="2" column="0">
|
||||
<widget class="QGroupBox" name="m_lpThumbBox">
|
||||
<property name="title">
|
||||
<string>Thumb</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="m_lpThumb">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="m_lpPoster">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
<item row="3" column="0">
|
||||
<widget class="QGroupBox" name="m_lpBannerBox">
|
||||
<property name="title">
|
||||
<string>Banner</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_5">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="m_lpBanner">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
||||
Reference in New Issue
Block a user