From 31240800c48a48e3b9284a80fe113857dd05e1d2 Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Tue, 21 Dec 2021 20:17:58 +0800 Subject: [PATCH] work save --- RedPandaIDE/icons.qrc | 7 + RedPandaIDE/iconsmanager.cpp | 8 +- RedPandaIDE/iconsmanager.h | 8 + RedPandaIDE/images/newlook/03Edit_01Undo.svg | 73 ++++++++ RedPandaIDE/images/newlook/03Edit_02Redo.svg | 73 ++++++++ RedPandaIDE/images/newlook/03Edit_03Cut.svg | 101 +++++++++++ RedPandaIDE/images/newlook/03Edit_04Copy.svg | 166 ++++++++++++++++++ RedPandaIDE/images/newlook/03Edit_05Paste.svg | 89 ++++++++++ .../images/newlook/03Edit_06Indent.svg | 109 ++++++++++++ .../images/newlook/03Edit_07Unindent.svg | 109 ++++++++++++ RedPandaIDE/mainwindow.cpp | 8 + 11 files changed, 750 insertions(+), 1 deletion(-) create mode 100644 RedPandaIDE/images/newlook/03Edit_01Undo.svg create mode 100644 RedPandaIDE/images/newlook/03Edit_02Redo.svg create mode 100644 RedPandaIDE/images/newlook/03Edit_03Cut.svg create mode 100644 RedPandaIDE/images/newlook/03Edit_04Copy.svg create mode 100644 RedPandaIDE/images/newlook/03Edit_05Paste.svg create mode 100644 RedPandaIDE/images/newlook/03Edit_06Indent.svg create mode 100644 RedPandaIDE/images/newlook/03Edit_07Unindent.svg diff --git a/RedPandaIDE/icons.qrc b/RedPandaIDE/icons.qrc index 8cb84ae4..08a433d2 100644 --- a/RedPandaIDE/icons.qrc +++ b/RedPandaIDE/icons.qrc @@ -502,5 +502,12 @@ images/newlook/02Project_02Save.svg images/newlook/02Project_03Close.svg images/newlook/01File-09Open_Folder.svg + images/newlook/03Edit_01Undo.svg + images/newlook/03Edit_02Redo.svg + images/newlook/03Edit_03Cut.svg + images/newlook/03Edit_04Copy.svg + images/newlook/03Edit_05Paste.svg + images/newlook/03Edit_06Indent.svg + images/newlook/03Edit_07Unindent.svg diff --git a/RedPandaIDE/iconsmanager.cpp b/RedPandaIDE/iconsmanager.cpp index 32ee44e4..7b6880d6 100644 --- a/RedPandaIDE/iconsmanager.cpp +++ b/RedPandaIDE/iconsmanager.cpp @@ -62,7 +62,13 @@ void IconsManager::updateActionIcons(const QString iconSet, int size) mIcons.insert(ACTION_PROJECT_NEW, createSVGIcon(iconFolder+"02Project_01New.svg",size,size)); mIcons.insert(ACTION_PROJECT_SAVE, createSVGIcon(iconFolder+"02Project_02Save.svg",size,size)); mIcons.insert(ACTION_PROJECT_CLOSE, createSVGIcon(iconFolder+"02Project_03Close.svg",size,size)); - + mIcons.insert(ACTION_EDIT_UNDO, createSVGIcon(iconFolder+"03Edit_01Undo.svg",size,size)); + mIcons.insert(ACTION_EDIT_REDO, createSVGIcon(iconFolder+"03Edit_02Redo.svg",size,size)); + mIcons.insert(ACTION_EDIT_CUT, createSVGIcon(iconFolder+"03Edit_03Cut.svg",size,size)); + mIcons.insert(ACTION_EDIT_COPY, createSVGIcon(iconFolder+"03Edit_04Copy.svg",size,size)); + mIcons.insert(ACTION_EDIT_PASTE, createSVGIcon(iconFolder+"03Edit_05Paste.svg",size,size)); + mIcons.insert(ACTION_EDIT_INDENT, createSVGIcon(iconFolder+"03Edit_06Indent.svg",size,size)); + mIcons.insert(ACTION_EDIT_UNINDENT, createSVGIcon(iconFolder+"03Edit_07Unindent.svg",size,size)); } IconsManager::PIcon IconsManager::getIcon(IconName iconName) const diff --git a/RedPandaIDE/iconsmanager.h b/RedPandaIDE/iconsmanager.h index 1748b532..2564764b 100644 --- a/RedPandaIDE/iconsmanager.h +++ b/RedPandaIDE/iconsmanager.h @@ -49,6 +49,14 @@ public: ACTION_PROJECT_SAVE, ACTION_PROJECT_CLOSE, + ACTION_EDIT_UNDO, + ACTION_EDIT_REDO, + ACTION_EDIT_CUT, + ACTION_EDIT_COPY, + ACTION_EDIT_PASTE, + ACTION_EDIT_INDENT, + ACTION_EDIT_UNINDENT + }; explicit IconsManager(QObject *parent = nullptr); diff --git a/RedPandaIDE/images/newlook/03Edit_01Undo.svg b/RedPandaIDE/images/newlook/03Edit_01Undo.svg new file mode 100644 index 00000000..30a3a365 --- /dev/null +++ b/RedPandaIDE/images/newlook/03Edit_01Undo.svg @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + diff --git a/RedPandaIDE/images/newlook/03Edit_02Redo.svg b/RedPandaIDE/images/newlook/03Edit_02Redo.svg new file mode 100644 index 00000000..c53e9ce4 --- /dev/null +++ b/RedPandaIDE/images/newlook/03Edit_02Redo.svg @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + diff --git a/RedPandaIDE/images/newlook/03Edit_03Cut.svg b/RedPandaIDE/images/newlook/03Edit_03Cut.svg new file mode 100644 index 00000000..c0a2eeee --- /dev/null +++ b/RedPandaIDE/images/newlook/03Edit_03Cut.svg @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/RedPandaIDE/images/newlook/03Edit_04Copy.svg b/RedPandaIDE/images/newlook/03Edit_04Copy.svg new file mode 100644 index 00000000..30f8d0ce --- /dev/null +++ b/RedPandaIDE/images/newlook/03Edit_04Copy.svg @@ -0,0 +1,166 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/RedPandaIDE/images/newlook/03Edit_05Paste.svg b/RedPandaIDE/images/newlook/03Edit_05Paste.svg new file mode 100644 index 00000000..c08a3064 --- /dev/null +++ b/RedPandaIDE/images/newlook/03Edit_05Paste.svg @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/RedPandaIDE/images/newlook/03Edit_06Indent.svg b/RedPandaIDE/images/newlook/03Edit_06Indent.svg new file mode 100644 index 00000000..2ebba33c --- /dev/null +++ b/RedPandaIDE/images/newlook/03Edit_06Indent.svg @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/RedPandaIDE/images/newlook/03Edit_07Unindent.svg b/RedPandaIDE/images/newlook/03Edit_07Unindent.svg new file mode 100644 index 00000000..bd1b95d0 --- /dev/null +++ b/RedPandaIDE/images/newlook/03Edit_07Unindent.svg @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/RedPandaIDE/mainwindow.cpp b/RedPandaIDE/mainwindow.cpp index 10f1fbc5..6ff12913 100644 --- a/RedPandaIDE/mainwindow.cpp +++ b/RedPandaIDE/mainwindow.cpp @@ -1117,6 +1117,14 @@ void MainWindow::updateActionIcons() ui->actionClose_All->setIcon(QIcon(*(pIconsManager->getIcon(IconsManager::ACTION_FILE_CLOSE_ALL)))); ui->actionPrint->setIcon(QIcon(*(pIconsManager->getIcon(IconsManager::ACTION_FILE_PRINT)))); + ui->actionUndo->setIcon(QIcon(*(pIconsManager->getIcon(IconsManager::ACTION_EDIT_UNDO)))); + ui->actionRedo->setIcon(QIcon(*(pIconsManager->getIcon(IconsManager::ACTION_EDIT_REDO)))); + ui->actionCut->setIcon(QIcon(*(pIconsManager->getIcon(IconsManager::ACTION_EDIT_CUT)))); + ui->actionCopy->setIcon(QIcon(*(pIconsManager->getIcon(IconsManager::ACTION_EDIT_COPY)))); + ui->actionPaste->setIcon(QIcon(*(pIconsManager->getIcon(IconsManager::ACTION_EDIT_PASTE)))); + ui->actionIndent->setIcon(QIcon(*(pIconsManager->getIcon(IconsManager::ACTION_EDIT_INDENT)))); + ui->actionUnIndent->setIcon(QIcon(*(pIconsManager->getIcon(IconsManager::ACTION_EDIT_UNINDENT)))); + } void MainWindow::checkSyntaxInBack(Editor *e)