From 76ea34709d10fb51f51a71b2118ccc8d6c867c2b Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Sun, 13 Feb 2022 21:50:20 +0800 Subject: [PATCH] add icons for vcs --- .../newlook/filesystem/cfile-vcs-changed.svg | 119 ++++++++++++ .../newlook/filesystem/cfile-vcs-nochange.svg | 123 +++++++++++++ .../filesystem/cppfile-vcs-changed.svg | 150 ++++++++++++++++ .../filesystem/cppfile-vcs-nochange.svg | 151 ++++++++++++++++ .../newlook/filesystem/file-vcs-changed.svg | 115 ++++++++++++ .../newlook/filesystem/file-vcs-nochange.svg | 119 ++++++++++++ .../newlook/filesystem/folder-vcs-changed.svg | 92 ++++++++++ .../filesystem/folder-vcs-nochange.svg | 93 ++++++++++ .../newlook/filesystem/hfile-vcs-changed.svg | 119 ++++++++++++ .../newlook/filesystem/hfile-vcs-nochange.svg | 123 +++++++++++++ .../filesystem/projectfile-vcs-changed.svg | 165 +++++++++++++++++ .../filesystem/projectfile-vcs-nochange.svg | 169 ++++++++++++++++++ .../newlook/filesystem/{git.svg => vcs.svg} | 0 RedPandaIDE/widgets/customfilesystemmodel.cpp | 21 +++ RedPandaIDE/widgets/customfilesystemmodel.h | 25 +++ 15 files changed, 1584 insertions(+) create mode 100644 RedPandaIDE/resources/iconsets/newlook/filesystem/cfile-vcs-changed.svg create mode 100644 RedPandaIDE/resources/iconsets/newlook/filesystem/cfile-vcs-nochange.svg create mode 100644 RedPandaIDE/resources/iconsets/newlook/filesystem/cppfile-vcs-changed.svg create mode 100644 RedPandaIDE/resources/iconsets/newlook/filesystem/cppfile-vcs-nochange.svg create mode 100644 RedPandaIDE/resources/iconsets/newlook/filesystem/file-vcs-changed.svg create mode 100644 RedPandaIDE/resources/iconsets/newlook/filesystem/file-vcs-nochange.svg create mode 100644 RedPandaIDE/resources/iconsets/newlook/filesystem/folder-vcs-changed.svg create mode 100644 RedPandaIDE/resources/iconsets/newlook/filesystem/folder-vcs-nochange.svg create mode 100644 RedPandaIDE/resources/iconsets/newlook/filesystem/hfile-vcs-changed.svg create mode 100644 RedPandaIDE/resources/iconsets/newlook/filesystem/hfile-vcs-nochange.svg create mode 100644 RedPandaIDE/resources/iconsets/newlook/filesystem/projectfile-vcs-changed.svg create mode 100644 RedPandaIDE/resources/iconsets/newlook/filesystem/projectfile-vcs-nochange.svg rename RedPandaIDE/resources/iconsets/newlook/filesystem/{git.svg => vcs.svg} (100%) create mode 100644 RedPandaIDE/widgets/customfilesystemmodel.cpp create mode 100644 RedPandaIDE/widgets/customfilesystemmodel.h 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