diff --git a/RedPandaIDE/resources/iconsets/newlook/filesystem/cfile-vcs-changed.svg b/RedPandaIDE/resources/iconsets/newlook/filesystem/cfile-vcs-changed.svg new file mode 100644 index 00000000..9774f39a --- /dev/null +++ b/RedPandaIDE/resources/iconsets/newlook/filesystem/cfile-vcs-changed.svg @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/RedPandaIDE/resources/iconsets/newlook/filesystem/cfile-vcs-nochange.svg b/RedPandaIDE/resources/iconsets/newlook/filesystem/cfile-vcs-nochange.svg new file mode 100644 index 00000000..324065c7 --- /dev/null +++ b/RedPandaIDE/resources/iconsets/newlook/filesystem/cfile-vcs-nochange.svg @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/RedPandaIDE/resources/iconsets/newlook/filesystem/cppfile-vcs-changed.svg b/RedPandaIDE/resources/iconsets/newlook/filesystem/cppfile-vcs-changed.svg new file mode 100644 index 00000000..7c09e1a1 --- /dev/null +++ b/RedPandaIDE/resources/iconsets/newlook/filesystem/cppfile-vcs-changed.svg @@ -0,0 +1,150 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/RedPandaIDE/resources/iconsets/newlook/filesystem/cppfile-vcs-nochange.svg b/RedPandaIDE/resources/iconsets/newlook/filesystem/cppfile-vcs-nochange.svg new file mode 100644 index 00000000..31718dba --- /dev/null +++ b/RedPandaIDE/resources/iconsets/newlook/filesystem/cppfile-vcs-nochange.svg @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/RedPandaIDE/resources/iconsets/newlook/filesystem/file-vcs-changed.svg b/RedPandaIDE/resources/iconsets/newlook/filesystem/file-vcs-changed.svg new file mode 100644 index 00000000..bc727ca3 --- /dev/null +++ b/RedPandaIDE/resources/iconsets/newlook/filesystem/file-vcs-changed.svg @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/RedPandaIDE/resources/iconsets/newlook/filesystem/file-vcs-nochange.svg b/RedPandaIDE/resources/iconsets/newlook/filesystem/file-vcs-nochange.svg new file mode 100644 index 00000000..8420fab5 --- /dev/null +++ b/RedPandaIDE/resources/iconsets/newlook/filesystem/file-vcs-nochange.svg @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/RedPandaIDE/resources/iconsets/newlook/filesystem/folder-vcs-changed.svg b/RedPandaIDE/resources/iconsets/newlook/filesystem/folder-vcs-changed.svg new file mode 100644 index 00000000..5a9abb6b --- /dev/null +++ b/RedPandaIDE/resources/iconsets/newlook/filesystem/folder-vcs-changed.svg @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/RedPandaIDE/resources/iconsets/newlook/filesystem/folder-vcs-nochange.svg b/RedPandaIDE/resources/iconsets/newlook/filesystem/folder-vcs-nochange.svg new file mode 100644 index 00000000..4df3204f --- /dev/null +++ b/RedPandaIDE/resources/iconsets/newlook/filesystem/folder-vcs-nochange.svg @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/RedPandaIDE/resources/iconsets/newlook/filesystem/hfile-vcs-changed.svg b/RedPandaIDE/resources/iconsets/newlook/filesystem/hfile-vcs-changed.svg new file mode 100644 index 00000000..af8fe84d --- /dev/null +++ b/RedPandaIDE/resources/iconsets/newlook/filesystem/hfile-vcs-changed.svg @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/RedPandaIDE/resources/iconsets/newlook/filesystem/hfile-vcs-nochange.svg b/RedPandaIDE/resources/iconsets/newlook/filesystem/hfile-vcs-nochange.svg new file mode 100644 index 00000000..75e83585 --- /dev/null +++ b/RedPandaIDE/resources/iconsets/newlook/filesystem/hfile-vcs-nochange.svg @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/RedPandaIDE/resources/iconsets/newlook/filesystem/projectfile-vcs-changed.svg b/RedPandaIDE/resources/iconsets/newlook/filesystem/projectfile-vcs-changed.svg new file mode 100644 index 00000000..ba7a50cd --- /dev/null +++ b/RedPandaIDE/resources/iconsets/newlook/filesystem/projectfile-vcs-changed.svg @@ -0,0 +1,165 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/RedPandaIDE/resources/iconsets/newlook/filesystem/projectfile-vcs-nochange.svg b/RedPandaIDE/resources/iconsets/newlook/filesystem/projectfile-vcs-nochange.svg new file mode 100644 index 00000000..88541b45 --- /dev/null +++ b/RedPandaIDE/resources/iconsets/newlook/filesystem/projectfile-vcs-nochange.svg @@ -0,0 +1,169 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/RedPandaIDE/resources/iconsets/newlook/filesystem/git.svg b/RedPandaIDE/resources/iconsets/newlook/filesystem/vcs.svg similarity index 100% rename from RedPandaIDE/resources/iconsets/newlook/filesystem/git.svg rename to RedPandaIDE/resources/iconsets/newlook/filesystem/vcs.svg diff --git a/RedPandaIDE/widgets/customfilesystemmodel.cpp b/RedPandaIDE/widgets/customfilesystemmodel.cpp new file mode 100644 index 00000000..34c6fc62 --- /dev/null +++ b/RedPandaIDE/widgets/customfilesystemmodel.cpp @@ -0,0 +1,21 @@ +#include "customfilesystemmodel.h" +#include "../vcs/gitmanager.h" +#include "../vcs/gitrepository.h" + +CustomFileSystemModel::CustomFileSystemModel(QObject *parent) : QFileSystemModel(parent) +{ + mGitManager = new GitManager(this); + mGitRepository = new GitRepository("",mGitManager,mGitManager); + connect(this,&QFileSystemModel::rootPathChanged, + this, &CustomFileSystemModel::onRootPathChanged); +} + +QVariant CustomFileSystemModel::data(const QModelIndex &index, int role) const +{ + return QFileSystemModel::data(index,role); +} + +void CustomFileSystemModel::onRootPathChanged(const QString &folder) +{ + mGitRepository->setFolder(folder); +} diff --git a/RedPandaIDE/widgets/customfilesystemmodel.h b/RedPandaIDE/widgets/customfilesystemmodel.h new file mode 100644 index 00000000..04762279 --- /dev/null +++ b/RedPandaIDE/widgets/customfilesystemmodel.h @@ -0,0 +1,25 @@ +#ifndef CUSTOMFILESYSTEMMODEL_H +#define CUSTOMFILESYSTEMMODEL_H + +#include + + +class GitRepository; +class GitManager; +class CustomFileSystemModel : public QFileSystemModel +{ + Q_OBJECT +public: + explicit CustomFileSystemModel(QObject *parent = nullptr); + + // QAbstractItemModel interface +public: + QVariant data(const QModelIndex &index, int role) const override; +private slots: + void onRootPathChanged(const QString& folder); +private: + GitRepository *mGitRepository; + GitManager *mGitManager; +}; + +#endif // CUSTOMFILESYSTEMMODEL_H