diff --git a/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentSelect.cpp b/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentSelect.cpp
index 8901e916..8d943f77 100644
--- a/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentSelect.cpp
+++ b/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentSelect.cpp
@@ -23,26 +23,30 @@ void QtProjectWizzardContentSelect::populate(QGridLayout* layout, int& row)
{
struct SourceGroupInfo
{
- SourceGroupInfo(SourceGroupType type) :type(type) {}
+ SourceGroupInfo(SourceGroupType type, bool recommended = false)
+ : type(type)
+ , recommended(recommended)
+ {}
const SourceGroupType type;
+ const bool recommended;
};
// define which kind of source groups are available for each language
std::map
(-DCMAKE_EXPORT_COMPILE_COMMANDS=1) and Make projects. Have a look at the "
+ "Create a Source Group from an existing Compilation Database file (compile_commands.json). "
+ "It can be exported from CMake
(-DCMAKE_EXPORT_COMPILE_COMMANDS=1) and Make projects. Have a look at the "
""
"documentation.";
m_sourceGroupTypeDescriptions[SOURCE_GROUP_CXX_VS] =
@@ -75,7 +79,7 @@ void QtProjectWizzardContentSelect::populate(QGridLayout* layout, int& row)
"project file.
Currently manual C/C++ Sonargraph modules are supported as well as Sonargraph modules that are based on CMake JSON Command files.
"; m_sourceGroupTypeDescriptions[SOURCE_GROUP_CXX_CODEBLOCKS] = "Create a new Source Group from an existing Code::Blocks project file.
" - "Note: A \".cbp\" file will also be generated by the Qt Creator if a CMakeLists file is imported.
"; + "Note: A \".cbp\" file will also get generated by the Qt Creator if a CMakeLists file is imported.
"; m_sourceGroupTypeDescriptions[SOURCE_GROUP_JAVA_EMPTY] = "Create a new Sourcetrail Source Group by defining which Java files will be indexed."; m_sourceGroupTypeDescriptions[SOURCE_GROUP_JAVA_MAVEN] = "Create a new Source Group from an existing Maven project."; m_sourceGroupTypeDescriptions[SOURCE_GROUP_JAVA_GRADLE] = "Create a new Source Group from an existing Gradle project."; @@ -114,6 +118,7 @@ void QtProjectWizzardContentSelect::populate(QGridLayout* layout, int& row) selectedLanguage = LanguageType(languageTypeInt); } + bool hasRecommeded = false; for (auto& it: m_buttons) { it.second->setExclusive(false); @@ -121,13 +126,19 @@ void QtProjectWizzardContentSelect::populate(QGridLayout* layout, int& row) { button->setChecked(false); button->setVisible(it.first == selectedLanguage); + + if (it.first == selectedLanguage) + { + hasRecommeded = hasRecommeded | button->property("recommended").toBool(); + } } it.second->setExclusive(true); } m_window->setNextEnabled(false); m_title->setText("Source Group Types - " + m_languages->checkedButton()->text()); - m_description->setText(""); + + m_description->setText(hasRecommeded ? "* recommended" : ""); } ); @@ -139,11 +150,24 @@ void QtProjectWizzardContentSelect::populate(QGridLayout* layout, int& row) for (auto& sourceGroupIt: languageIt.second) { + std::string name = sourceGroupTypeToProjectSetupString(sourceGroupIt.type); + if (sourceGroupIt.recommended) + { + name += "*"; + } + QToolButton* b = createSourceGroupButton( - utility::insertLineBreaksAtBlankSpaces(sourceGroupTypeToProjectSetupString(sourceGroupIt.type), 15).c_str(), + utility::insertLineBreaksAtBlankSpaces(name, 15).c_str(), QString::fromStdWString(ResourcePaths::getGuiPath().concatenate(L"icon/" + m_sourceGroupTypeIconName[sourceGroupIt.type] + L".png").wstr()) ); + + if (sourceGroupIt.recommended) + { + b->setStyleSheet("font-weight: bold"); + } + b->setProperty("source_group_type", int(sourceGroupIt.type)); + b->setProperty("recommended", sourceGroupIt.recommended); sourceGroupButtons->addButton(b); flayout->addWidget(b); }