diff --git a/src/lib_gui/qt/element/QtHelpButton.cpp b/src/lib_gui/qt/element/QtHelpButton.cpp index dcc3cc8a..62e19f2f 100644 --- a/src/lib_gui/qt/element/QtHelpButton.cpp +++ b/src/lib_gui/qt/element/QtHelpButton.cpp @@ -4,11 +4,12 @@ #include "utility/ResourcePaths.h" -QtHelpButton::QtHelpButton(const QString& helpText, QWidget* parent) +QtHelpButton::QtHelpButton(const QString& helpTitle, const QString& helpText, QWidget* parent) : QtIconButton( (ResourcePaths::getGuiPath().str() + "window/help.png").c_str(), (ResourcePaths::getGuiPath().str() + "window/help_hover.png").c_str(), parent) + , m_helpTitle(helpTitle) , m_helpText(helpText) { setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); @@ -27,7 +28,7 @@ void QtHelpButton::handleHelpPress() QMessageBox msgBox; msgBox.setWindowTitle("Sourcetrail"); msgBox.setIcon(QMessageBox::Information); - msgBox.setText("Sourcetrail Help"); + msgBox.setText("" + m_helpTitle + ""); msgBox.setInformativeText(m_helpText); msgBox.setStandardButtons(QMessageBox::Ok); msgBox.setDefaultButton(QMessageBox::Ok); diff --git a/src/lib_gui/qt/element/QtHelpButton.h b/src/lib_gui/qt/element/QtHelpButton.h index aba5f89c..2620d162 100644 --- a/src/lib_gui/qt/element/QtHelpButton.h +++ b/src/lib_gui/qt/element/QtHelpButton.h @@ -9,12 +9,13 @@ class QtHelpButton Q_OBJECT public: - QtHelpButton(const QString& helpText, QWidget* parent = nullptr); + QtHelpButton(const QString& helpTitle, const QString& helpText, QWidget* parent = nullptr); private slots: void handleHelpPress(); private: + QString m_helpTitle; QString m_helpText; }; diff --git a/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContent.cpp b/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContent.cpp index 8a67cf85..3ad4bba7 100644 --- a/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContent.cpp +++ b/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContent.cpp @@ -93,9 +93,9 @@ QToolButton* QtProjectWizzardContent::createSourceGroupButton(QString name, QStr return button; } -QtHelpButton* QtProjectWizzardContent::addHelpButton(QString helpString, QGridLayout* layout, int row) const +QtHelpButton* QtProjectWizzardContent::addHelpButton(const QString& helpTitle, const QString& helpText, QGridLayout* layout, int row) const { - QtHelpButton* button = new QtHelpButton(helpString); + QtHelpButton* button = new QtHelpButton(helpTitle, helpText); layout->addWidget(button, row, QtProjectWizzardWindow::HELP_COL, Qt::AlignTop); return button; } diff --git a/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContent.h b/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContent.h index b8664916..d5ab1065 100644 --- a/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContent.h +++ b/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContent.h @@ -41,7 +41,7 @@ protected: QLabel* createFormTitle(QString name) const; QToolButton* createSourceGroupButton(QString name, QString iconPath) const; - QtHelpButton* addHelpButton(QString helpString, QGridLayout* layout, int row) const; + QtHelpButton* addHelpButton(const QString& helpTitle, const QString& helpText, QGridLayout* layout, int row) const; QPushButton* addFilesButton(QString name, QGridLayout* layout, int row) const; QFrame* addSeparator(QGridLayout* layout, int row) const; diff --git a/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentCrossCompilationOptions.cpp b/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentCrossCompilationOptions.cpp index 5364a00b..911cdf03 100644 --- a/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentCrossCompilationOptions.cpp +++ b/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentCrossCompilationOptions.cpp @@ -31,6 +31,7 @@ void QtProjectWizzardContentCrossCompilationOptions::populate(QGridLayout* layou layout->addWidget(createFormLabel("Cross-Compilation"), row, QtProjectWizzardWindow::FRONT_COL, Qt::AlignRight); addHelpButton( + "Cross-Compilation", "
Use these options to specify the target architecture for the provided source code. Even though Sourcetrail will " "not generate a target binary, providing these options will affect which headers the indexer will be looking for " "while analyzing your source code.
" diff --git a/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentExtensions.cpp b/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentExtensions.cpp index 14161d9b..68fe6bf7 100644 --- a/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentExtensions.cpp +++ b/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentExtensions.cpp @@ -18,7 +18,7 @@ void QtProjectWizzardContentExtensions::populate(QGridLayout* layout, int& row) QLabel* sourceLabel = createFormLabel("Source File Extensions"); layout->addWidget(sourceLabel, row, QtProjectWizzardWindow::FRONT_COL, Qt::AlignTop); - addHelpButton("Define extensions for source files including the dot e.g. .cpp", layout, row); + addHelpButton("Source File Extensions", "Define extensions for source files including the dot (e.g. .cpp or .java)", layout, row); m_sourceList = new QtDirectoryListBox(this, sourceLabel->text(), true); layout->addWidget(m_sourceList, row, QtProjectWizzardWindow::BACK_COL); diff --git a/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentFlags.cpp b/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentFlags.cpp index e7c2a1e4..4d0ef87b 100644 --- a/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentFlags.cpp +++ b/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentFlags.cpp @@ -14,10 +14,11 @@ QtProjectWizzardContentFlags::QtProjectWizzardContentFlags(std::shared_ptrSet the number of threads used to work on indexing your project in parallel.
" "When setting this value to 0 Sourcetrail tries to use the ideal thread count for your computer.
", layout, row @@ -152,7 +153,7 @@ void QtProjectWizzardContentPreferences::populate(QGridLayout* layout, int& row) row++; // multi process indexing - m_multiProcessIndexing = addCheckBox("Multi processEnable C/C++ indexer threads to run in different process.
" "This prevents the application from crashing due to unforseen exceptions while indexing.
", layout, row); @@ -202,7 +203,8 @@ void QtProjectWizzardContentPreferences::populate(QGridLayout* layout, int& row) } javaVersionString += "Java 8"; - addHelpButton(( + addHelpButton( + "Java Path", ( "Only required for indexing Java projects.
" "Provide the location of the jvm library inside the installation of your " + javaVersionString + " runtime environment (for information on how to set this take a look at " @@ -234,6 +236,7 @@ void QtProjectWizzardContentPreferences::populate(QGridLayout* layout, int& row) layout->addWidget(label, row, QtProjectWizzardWindow::FRONT_COL, Qt::AlignTop); addHelpButton( + "JRE System Library", "
Only required for indexing Java projects.
" "Add the jar files of your JRE System Library. These jars can be found inside your JRE install directory.
", layout, row); @@ -263,6 +266,7 @@ void QtProjectWizzardContentPreferences::populate(QGridLayout* layout, int& row) addLabelAndWidget("Maven Path", m_mavenPath, layout, row); addHelpButton( + "Maven Path", "Only required for indexing projects using Maven.
" "Provide the location of your installed Maven executable. You can also use the auto detection below.
" , layout, row @@ -558,14 +562,14 @@ void QtProjectWizzardContentPreferences::addGap(QGridLayout* layout, int& row) } QCheckBox* QtProjectWizzardContentPreferences::addCheckBox( - QString label, QString text, QString help, QGridLayout* layout, int& row) + QString label, QString text, QString helpText, QGridLayout* layout, int& row) { QCheckBox* checkBox = new QCheckBox(text, this); addLabelAndWidget(label, checkBox, layout, row, Qt::AlignLeft); - if (help.size()) + if (helpText.size()) { - addHelpButton(help, layout, row); + addHelpButton(label, helpText, layout, row); } row++; @@ -574,7 +578,7 @@ QCheckBox* QtProjectWizzardContentPreferences::addCheckBox( } QComboBox* QtProjectWizzardContentPreferences::addComboBox( - QString label, int min, int max, QString help, QGridLayout* layout, int& row) + QString label, int min, int max, QString helpText, QGridLayout* layout, int& row) { QComboBox* comboBox = new QComboBox(this); addLabelAndWidget(label, comboBox, layout, row, Qt::AlignLeft); @@ -587,9 +591,9 @@ QComboBox* QtProjectWizzardContentPreferences::addComboBox( } } - if (help.size()) + if (helpText.size()) { - addHelpButton(help, layout, row); + addHelpButton(label, helpText, layout, row); } row++; @@ -597,7 +601,7 @@ QComboBox* QtProjectWizzardContentPreferences::addComboBox( return comboBox; } -QLineEdit* QtProjectWizzardContentPreferences::addLineEdit(QString label, QString help, QGridLayout* layout, int& row) +QLineEdit* QtProjectWizzardContentPreferences::addLineEdit(QString label, QString helpText, QGridLayout* layout, int& row) { QLineEdit* lineEdit = new QLineEdit(this); lineEdit->setObjectName("name"); @@ -605,9 +609,9 @@ QLineEdit* QtProjectWizzardContentPreferences::addLineEdit(QString label, QStrin addLabelAndWidget(label, lineEdit, layout, row); - if (help.size()) + if (helpText.size()) { - addHelpButton(help, layout, row); + addHelpButton(label, helpText, layout, row); } row++; diff --git a/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentPreferences.h b/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentPreferences.h index 2d07cf90..bc49fd2b 100644 --- a/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentPreferences.h +++ b/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentPreferences.h @@ -46,9 +46,9 @@ private: QString label, QWidget* widget, QGridLayout* layout, int& row, Qt::Alignment widgetAlignment = Qt::Alignment()); void addGap(QGridLayout* layout, int& row); - QCheckBox* addCheckBox(QString label, QString text, QString help, QGridLayout* layout, int& row); - QComboBox* addComboBox(QString label, int min, int max, QString help, QGridLayout* layout, int& row); - QLineEdit* addLineEdit(QString label, QString help, QGridLayout* layout, int& row); + QCheckBox* addCheckBox(QString label, QString text, QString helpText, QGridLayout* layout, int& row); + QComboBox* addComboBox(QString label, int min, int max, QString helpText, QGridLayout* layout, int& row); + QLineEdit* addLineEdit(QString label, QString helpText, QGridLayout* layout, int& row); QtFontPicker* m_fontFace; QComboBox* m_fontSize; diff --git a/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentProjectData.cpp b/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentProjectData.cpp index 6afcc609..14fab7d6 100644 --- a/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentProjectData.cpp +++ b/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentProjectData.cpp @@ -43,7 +43,7 @@ void QtProjectWizzardContentProjectData::populate(QGridLayout* layout, int& row) layout->addWidget(locationLabel, row, QtProjectWizzardWindow::FRONT_COL, Qt::AlignRight); layout->addWidget(m_projectFileLocation, row, QtProjectWizzardWindow::BACK_COL, Qt::AlignTop); - addHelpButton("The directory the Sourcetrail project file (.srctrlprj) will be saved to.", layout, row); + addHelpButton("Sourcetrail Project Location", "The directory the Sourcetrail project file (.srctrlprj) will be saved to.", layout, row); layout->setRowMinimumHeight(row, 30); row++; diff --git a/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentVS.cpp b/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentVS.cpp index 5b78b6bc..c54f1405 100644 --- a/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentVS.cpp +++ b/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentVS.cpp @@ -12,7 +12,8 @@ void QtProjectWizzardContentVS::populate(QGridLayout* layout, int& row) QLabel* nameLabel = createFormLabel("Create Compilation Database"); layout->addWidget(nameLabel, row, QtProjectWizzardWindow::FRONT_COL); - addHelpButton("To create a new Compilation Database from a Visual Studio Solution, this Solution has to be open in Visual Studio.\n\ + addHelpButton( + "Create Compilation Database", "To create a new Compilation Database from a Visual Studio Solution, this Solution has to be open in Visual Studio.\n\ Sourcetrail will call Visual Studio to open the 'Create Compilation Database' dialog.\ Please follow the instructions in Visual Studio to complete the process.\n\ Note: Sourcetrail's Visual Studio plugin has to be installed. Visual Studio has to be running with an eligible Solution, containing C/C++ projects, loaded.", layout, row);