From 7e6d900049f2eaf1d0c5f948218992c9741b9050 Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Fri, 6 May 2022 15:48:17 +0800 Subject: [PATCH] - enhancement: add new tool button for "compiler options" --- NEWS.md | 1 + RedPandaIDE/iconsmanager.cpp | 1 + RedPandaIDE/iconsmanager.h | 1 + RedPandaIDE/mainwindow.cpp | 10 ++++++++++ RedPandaIDE/mainwindow.h | 2 ++ RedPandaIDE/mainwindow.ui | 11 +++++++++++ 6 files changed, 26 insertions(+) diff --git a/NEWS.md b/NEWS.md index 3a824b22..ee1d507d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -6,6 +6,7 @@ Red Panda C++ Version 1.0.7 - fix: When generating project's makefile for clang, don't add -fexec-charset / -finput-charset command line options - fix: index of the longest line not correctly updated when inputting with auto completion open - enhancement: support UTF-8 BOM files + - enhancement: add new tool button for "compiler options" Red Panda C++ Version 1.0.6 - fix: gcc compiler set name is not correct in Linux diff --git a/RedPandaIDE/iconsmanager.cpp b/RedPandaIDE/iconsmanager.cpp index c6d2f152..181ca9c5 100644 --- a/RedPandaIDE/iconsmanager.cpp +++ b/RedPandaIDE/iconsmanager.cpp @@ -154,6 +154,7 @@ void IconsManager::updateActionIcons(const QString& iconSet, int size) mIconPixmaps.insert(ACTION_RUN_STEP_OVER_INSTRUCTION, createSVGIcon(iconFolder+"05Run-14StepOverInstruction.svg",size,size)); mIconPixmaps.insert(ACTION_RUN_STEP_INTO_INSTRUCTION, createSVGIcon(iconFolder+"05Run-15StepIntoInstruction.svg",size,size)); mIconPixmaps.insert(ACTION_RUN_INTERRUPT, createSVGIcon(iconFolder+"05Run-16Interrupt.svg",size,size)); + mIconPixmaps.insert(ACTION_RUN_COMPILE_OPTIONS, createSVGIcon(iconFolder+"05Run-17CompilerOptions.svg",size,size)); mIconPixmaps.insert(ACTION_VIEW_MAXIMUM, createSVGIcon(iconFolder+"06View-01Maximum.svg",size,size)); mIconPixmaps.insert(ACTION_VIEW_CLASSBROWSER, createSVGIcon(iconFolder+"06View-02ClassBrowser.svg",size,size)); diff --git a/RedPandaIDE/iconsmanager.h b/RedPandaIDE/iconsmanager.h index fad575b3..2d9c634d 100644 --- a/RedPandaIDE/iconsmanager.h +++ b/RedPandaIDE/iconsmanager.h @@ -171,6 +171,7 @@ public: ACTION_RUN_STEP_OVER_INSTRUCTION, ACTION_RUN_STEP_INTO_INSTRUCTION, ACTION_RUN_INTERRUPT, + ACTION_RUN_COMPILE_OPTIONS, ACTION_VIEW_MAXIMUM, ACTION_VIEW_CLASSBROWSER, diff --git a/RedPandaIDE/mainwindow.cpp b/RedPandaIDE/mainwindow.cpp index 4d8a5f7a..bf46273c 100644 --- a/RedPandaIDE/mainwindow.cpp +++ b/RedPandaIDE/mainwindow.cpp @@ -1338,6 +1338,7 @@ void MainWindow::updateActionIcons() ui->actionAdd_Watch->setIcon(pIconsManager->getIcon(IconsManager::ACTION_RUN_ADD_WATCH)); ui->actionRemove_Watch->setIcon(pIconsManager->getIcon(IconsManager::ACTION_RUN_REMOVE_WATCH)); ui->actionRemove_All_Watches->setIcon(pIconsManager->getIcon(IconsManager::ACTION_MISC_CLEAN)); + ui->actionCompiler_Options->setIcon(pIconsManager->getIcon(IconsManager::ACTION_RUN_COMPILE_OPTIONS)); ui->actionOptions->setIcon(pIconsManager->getIcon(IconsManager::ACTION_MISC_GEAR)); @@ -7692,3 +7693,12 @@ void MainWindow::on_actionEncode_in_UTF_8_BOM_triggered() } } + +void MainWindow::on_actionCompiler_Options_triggered() +{ + changeOptions( + SettingsDialog::tr("Compiler Set"), + SettingsDialog::tr("Compiler") + ); +} + diff --git a/RedPandaIDE/mainwindow.h b/RedPandaIDE/mainwindow.h index 1e975b35..9526f586 100644 --- a/RedPandaIDE/mainwindow.h +++ b/RedPandaIDE/mainwindow.h @@ -672,6 +672,8 @@ private slots: void on_actionEncode_in_UTF_8_BOM_triggered(); + void on_actionCompiler_Options_triggered(); + private: Ui::MainWindow *ui; EditorList *mEditorList; diff --git a/RedPandaIDE/mainwindow.ui b/RedPandaIDE/mainwindow.ui index 8805ad1e..38766b39 100644 --- a/RedPandaIDE/mainwindow.ui +++ b/RedPandaIDE/mainwindow.ui @@ -1602,6 +1602,7 @@ + @@ -1834,6 +1835,7 @@ + @@ -3052,6 +3054,15 @@ Encode in UTF-8 BOM + + + + :/icons/images/newlook24/084-tools.png:/icons/images/newlook24/084-tools.png + + + Compiler Options... + +