Add What's this help for tile configuration in Overview charts

This commit is contained in:
Alejandro Martinez
2021-10-26 21:20:56 -03:00
parent 3096fb42a1
commit e1ce93728d
3 changed files with 17 additions and 0 deletions

View File

@@ -541,6 +541,17 @@ OverviewConfigDialog::OverviewConfigDialog(ChartSpaceItem*item) : QDialog(NULL),
setWindowFlags(windowFlags() | Qt::WindowCloseButtonHint);
setModal(true);
// get the factory and set what's this string according to type
ChartSpaceItemRegistry &registry = ChartSpaceItemRegistry::instance();
ChartSpaceItemDetail itemDetail = registry.detailForType(item->type);
itemDetail.quick.replace(" ", "-"); // Blanks are replaced by - in Wiki URLs
HelpWhatsThis *help = new HelpWhatsThis(this);
if (item->parent->scope & OverviewScope::ANALYSIS) {
this->setWhatsThis(help->getWhatsThisText(HelpWhatsThis::ChartRides_Overview_Config).arg(itemDetail.quick, itemDetail.description));
} else {
this->setWhatsThis(help->getWhatsThisText(HelpWhatsThis::Chart_Overview_Config).arg(itemDetail.quick, itemDetail.description));
}
main = new QVBoxLayout(this);
main->addWidget(item->config());
item->config()->show();

View File

@@ -213,6 +213,8 @@ HelpWhatsThis::getText(GCHelp chapter) {
return text.arg("ChartTypes_Diary#navigator").arg(tr("Configurable activity log - with build in search capabilities"));
case ChartRides_Overview:
return text.arg("ChartTypes_Activities#Overview").arg(tr("Dashboard for a single activity - the tiles shown here are configurable"));
case ChartRides_Overview_Config:
return text.arg("ChartTypes_Activities#Overview-%1");
case ChartRides_Summary:
return text.arg("ChartTypes_Activities#activity-summary").arg(tr("Detailed information of a single activity - the metrics shown here are configurable"));
case ChartRides_Details:
@@ -255,6 +257,8 @@ HelpWhatsThis::getText(GCHelp chapter) {
return text.arg("ChartTypes_Trends#summary").arg(tr("Chart specific filter/search and date range settings"));
case Chart_Overview:
return text.arg("ChartTypes_Trends#Overview").arg(tr("Dashboard for the selected data range - the tiles shown are configurable"));
case Chart_Overview_Config:
return text.arg("ChartTypes_Trends#Overview-%1");
case Chart_R:
return text.arg("Special-Topics_Working-with-R").arg(tr("Embedded R Chart"));
case Chart_Python:

View File

@@ -116,6 +116,7 @@ Q_OBJECT
ChartDiary_Navigator,
ChartRides_Overview,
ChartRides_Overview_Config,
ChartRides_Summary,
ChartRides_Details,
ChartRides_Editor,
@@ -137,6 +138,7 @@ Q_OBJECT
Chart_Summary,
Chart_Summary_Config,
Chart_Overview,
Chart_Overview_Config,
Chart_R,
Chart_Python,
Chart_User,