diff --git a/atkodidb.qrc b/atkodidb.qrc new file mode 100644 index 0000000..f1da762 --- /dev/null +++ b/atkodidb.qrc @@ -0,0 +1,8 @@ + + + icons/Images.ico + icons/Musics.ico + icons/TV Shows.ico + icons/Videos.ico + + diff --git a/ckodilibrary.cpp b/ckodilibrary.cpp index b16bbe9..31c1c9a 100644 --- a/ckodilibrary.cpp +++ b/ckodilibrary.cpp @@ -48,15 +48,18 @@ QString cKodiLibrary::findFile(const QString& szPath, const QString& szFile) bool cKodiLibrary::init(const QString& szPath) { - m_szAddons = findFile(szPath, "Addons"); - m_szADSP = findFile(szPath, "ADSP"); - m_szEpg = findFile(szPath, "Epg"); - m_szMyMusic = findFile(szPath, "MyMusic"); - m_szMyVideos = findFile(szPath, "MyVideos"); - m_szTextures = findFile(szPath, "Textures"); - m_szTV = findFile(szPath, "TV"); - m_szViewModes = findFile(szPath, "ViewModes"); + m_szPath = szPath; + m_szAddons = findFile(m_szPath, "Addons"); + m_szADSP = findFile(m_szPath, "ADSP"); + m_szEpg = findFile(m_szPath, "Epg"); + m_szMyMusic = findFile(m_szPath, "MyMusic"); + m_szMyVideos = findFile(m_szPath, "MyVideos"); + m_szTextures = findFile(m_szPath, "Textures"); + m_szTV = findFile(m_szPath, "TV"); + m_szViewModes = findFile(m_szPath, "ViewModes"); - m_kodiVideoLibrary.init(m_szMyVideos); - return(true); + if(m_kodiVideoLibrary.init(m_szMyVideos) != -1) + return(true); + + return(false); } diff --git a/cmainwindow.cpp b/cmainwindow.cpp index 9c150c6..4f8610f 100644 --- a/cmainwindow.cpp +++ b/cmainwindow.cpp @@ -1,6 +1,8 @@ #include "cmainwindow.h" #include "ui_cmainwindow.h" +#include + cMainWindow::cMainWindow(QWidget *parent) : QMainWindow(parent), @@ -10,7 +12,9 @@ cMainWindow::cMainWindow(QWidget *parent) : ui->m_lpMainTab->setCurrentIndex(0); setWindowTitle("qtKodiAdmin"); - m_kodiLibrary.init("C:\\Users\\birkeh\\.kodi"); + +// m_kodiLibrary.init("C:\\Users\\birkeh\\.kodi"); + m_kodiLibrary.init(QDir::homePath() + QDir::separator() + QString(".kodi")); } cMainWindow::~cMainWindow() diff --git a/cmainwindow.ui b/cmainwindow.ui index 69a54ba..2e3b37b 100644 --- a/cmainwindow.ui +++ b/cmainwindow.ui @@ -17,20 +17,47 @@ + + QTabWidget::West + + + QTabWidget::Triangular + - 3 + 0 + + + + 32 + 32 + + + + :/icons/icons/Videos.ico + + Movies + + + :/icons/icons/TV Shows.ico + + TV Shows + + + :/icons/icons/Musics.ico + + Music diff --git a/icons/Images.ico b/icons/Images.ico new file mode 100644 index 0000000..c2136e1 Binary files /dev/null and b/icons/Images.ico differ diff --git a/icons/Images.png b/icons/Images.png new file mode 100644 index 0000000..3fc647e Binary files /dev/null and b/icons/Images.png differ diff --git a/icons/Musics.ico b/icons/Musics.ico new file mode 100644 index 0000000..c4adb01 Binary files /dev/null and b/icons/Musics.ico differ diff --git a/icons/Musics.png b/icons/Musics.png new file mode 100644 index 0000000..e356489 Binary files /dev/null and b/icons/Musics.png differ diff --git a/icons/TV Shows.ico b/icons/TV Shows.ico new file mode 100644 index 0000000..2efc95d Binary files /dev/null and b/icons/TV Shows.ico differ diff --git a/icons/TV Shows.png b/icons/TV Shows.png new file mode 100644 index 0000000..72c412a Binary files /dev/null and b/icons/TV Shows.png differ diff --git a/icons/Videos.ico b/icons/Videos.ico new file mode 100644 index 0000000..d43c352 Binary files /dev/null and b/icons/Videos.ico differ diff --git a/icons/Videos.png b/icons/Videos.png new file mode 100644 index 0000000..1bd5661 Binary files /dev/null and b/icons/Videos.png differ diff --git a/qtKodiDB.pro b/qtKodiDB.pro index d4d8a35..c23854e 100644 --- a/qtKodiDB.pro +++ b/qtKodiDB.pro @@ -22,3 +22,16 @@ HEADERS += cmainwindow.h \ ckodilibrary.h FORMS += cmainwindow.ui + +RESOURCES += \ + atkodidb.qrc + +DISTFILES += \ + icons/Images.png \ + icons/Musics.png \ + icons/TV Shows.png \ + icons/Videos.png \ + icons/Images.ico \ + icons/Musics.ico \ + icons/TV Shows.ico \ + icons/Videos.ico diff --git a/qtKodiDB.pro.user b/qtKodiDB.pro.user index e0150a1..d8ae917 100644 --- a/qtKodiDB.pro.user +++ b/qtKodiDB.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {90551da6-f083-4f65-96d6-4435a4c6527f} + {c7aa4b7f-2ffc-4531-868b-ccb2d98c3d0a} ProjectExplorer.Project.ActiveTarget @@ -59,14 +59,14 @@ ProjectExplorer.Project.Target.0 - Desktop Qt 5.7.0 MinGW 32bit3 - Desktop Qt 5.7.0 MinGW 32bit3 + Desktop Qt 5.7.0 MinGW 32bit + Desktop Qt 5.7.0 MinGW 32bit qt.57.win32_mingw53_kit 0 0 0 - C:/Users/birkeh/Documents/Projects/build-qtKodiDB-Desktop_Qt_5_7_0_MinGW_32bit3-Debug + C:/Users/herwi/Documents/GitHub/build-qtKodiDB-Desktop_Qt_5_7_0_MinGW_32bit-Debug true @@ -120,7 +120,7 @@ true - C:/Users/birkeh/Documents/Projects/build-qtKodiDB-Desktop_Qt_5_7_0_MinGW_32bit3-Release + C:/Users/herwi/Documents/GitHub/build-qtKodiDB-Desktop_Qt_5_7_0_MinGW_32bit-Release true @@ -174,7 +174,7 @@ true - C:/Users/birkeh/Documents/Projects/build-qtKodiDB-Desktop_Qt_5_7_0_MinGW_32bit3-Profile + C:/Users/herwi/Documents/GitHub/build-qtKodiDB-Desktop_Qt_5_7_0_MinGW_32bit-Profile true @@ -285,14 +285,508 @@ 2 qtKodiDB - qtKodiDB2 - Qt4ProjectManager.Qt4RunConfiguration:C:/Users/birkeh/Documents/GitHub/qtKodiDB/qtKodiDB.pro + + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/herwi/Documents/GitHub/qtKodiDB/qtKodiDB.pro true qtKodiDB.pro false - C:/Users/birkeh/Documents/Projects/build-qtKodiDB-Desktop_Qt_5_7_0_MinGW_32bit3-Debug + C:/Users/herwi/Documents/GitHub/build-qtKodiDB-Desktop_Qt_5_7_0_MinGW_32bit-Debug + 3768 + false + true + false + false + true + + 1 + + + + ProjectExplorer.Project.Target.1 + + Desktop Qt 5.7.0 MSVC2015 32bit + Desktop Qt 5.7.0 MSVC2015 32bit + qt.57.win32_msvc2015_kit + 0 + 0 + 0 + + C:/Users/herwi/Documents/GitHub/build-qtKodiDB-Desktop_Qt_5_7_0_MSVC2015_32bit-Debug + + + true + qmake + + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Make + + Qt4ProjectManager.MakeStep + + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + + Qt4ProjectManager.Qt4BuildConfiguration + 2 + true + + + C:/Users/herwi/Documents/GitHub/build-qtKodiDB-Desktop_Qt_5_7_0_MSVC2015_32bit-Release + + + true + qmake + + QtProjectManager.QMakeBuildStep + false + + false + false + false + + + true + Make + + Qt4ProjectManager.MakeStep + + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + + C:/Users/herwi/Documents/GitHub/build-qtKodiDB-Desktop_Qt_5_7_0_MSVC2015_32bit-Profile + + + true + qmake + + QtProjectManager.QMakeBuildStep + true + + false + true + false + + + true + Make + + Qt4ProjectManager.MakeStep + + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + 3 + + + 0 + Deploy + + ProjectExplorer.BuildSteps.Deploy + + 1 + Deploy locally + + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + qtKodiDB + + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/herwi/Documents/GitHub/qtKodiDB/qtKodiDB.pro + true + + qtKodiDB.pro + false + + + 3768 + false + true + false + false + true + + 1 + + + + ProjectExplorer.Project.Target.2 + + Desktop Qt 5.7.0 MSVC2015_64bit + Desktop Qt 5.7.0 MSVC2015_64bit + qt.57.win64_msvc2015_64_kit + 0 + 0 + 0 + + C:/Users/herwi/Documents/GitHub/build-qtKodiDB-Desktop_Qt_5_7_0_MSVC2015_64bit-Debug + + + true + qmake + + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Make + + Qt4ProjectManager.MakeStep + + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + + Qt4ProjectManager.Qt4BuildConfiguration + 2 + true + + + C:/Users/herwi/Documents/GitHub/build-qtKodiDB-Desktop_Qt_5_7_0_MSVC2015_64bit-Release + + + true + qmake + + QtProjectManager.QMakeBuildStep + false + + false + false + false + + + true + Make + + Qt4ProjectManager.MakeStep + + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + + C:/Users/herwi/Documents/GitHub/build-qtKodiDB-Desktop_Qt_5_7_0_MSVC2015_64bit-Profile + + + true + qmake + + QtProjectManager.QMakeBuildStep + true + + false + true + false + + + true + Make + + Qt4ProjectManager.MakeStep + + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + 3 + + + 0 + Deploy + + ProjectExplorer.BuildSteps.Deploy + + 1 + Deploy locally + + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + qtKodiDB + + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/herwi/Documents/GitHub/qtKodiDB/qtKodiDB.pro + true + + qtKodiDB.pro + false + + C:/Users/herwi/Documents/GitHub/build-qtKodiDB-Desktop_Qt_5_7_0_MSVC2015_64bit-Debug 3768 false true @@ -305,7 +799,7 @@ ProjectExplorer.Project.TargetCount - 1 + 3 ProjectExplorer.Project.Updater.FileVersion