UI texts/minor fixes

This commit is contained in:
Klaus Basan
2019-04-26 01:19:27 +02:00
parent 99c6a03b6f
commit cb70234184
3 changed files with 25 additions and 19 deletions

View File

@@ -648,22 +648,6 @@ namespace BlackGui
ui->comp_ModelWorkbench->view()->setTabWidgetViewText(ui->tw_ModelsToBeMapped, ui->tw_ModelsToBeMapped->indexOf(ui->tab_Workbench)); ui->comp_ModelWorkbench->view()->setTabWidgetViewText(ui->tw_ModelsToBeMapped, ui->tw_ModelsToBeMapped->indexOf(ui->tab_Workbench));
} }
void CDbMappingComponent::onOwnModelsChangedDigest(int count, bool withFilter)
{
Q_UNUSED(count);
Q_UNUSED(withFilter);
// non standard with sim
const int i = ui->tw_ModelsToBeMapped->indexOf(ui->tab_OwnModels);
static const QString ot(ui->tw_ModelsToBeMapped->tabText(i));
QString o(ot);
const QString sim(ui->comp_OwnAircraftModels->getOwnModelsSimulator().toQString(true));
if (!sim.isEmpty()) { o = o.append(" ").append(sim); }
const QString f = ui->comp_OwnAircraftModels->view()->hasFilter() ? "F" : "";
o = CGuiUtility::replaceTabCountValue(o, ui->comp_OwnAircraftModels->view()->rowCount()) + f;
ui->tw_ModelsToBeMapped->setTabText(i, o);
}
void CDbMappingComponent::ps_addToOwnModelSet() void CDbMappingComponent::ps_addToOwnModelSet()
{ {
if (!this->canAddToModelSetTab()) { return; } if (!this->canAddToModelSetTab()) { return; }
@@ -731,12 +715,28 @@ namespace BlackGui
// none standard with simulator // none standard with simulator
int i = ui->tw_ModelsToBeMapped->indexOf(ui->tab_OwnModelSet); int i = ui->tw_ModelsToBeMapped->indexOf(ui->tab_OwnModelSet);
QString o = "Model set " + ui->comp_OwnModelSet->getModelSetSimulator().toQString(true); QString o = "Active model set " + ui->comp_OwnModelSet->getModelSetSimulator().toQString(true);
const QString f = ui->comp_OwnModelSet->view()->hasFilter() ? "F" : ""; const QString f = ui->comp_OwnModelSet->view()->hasFilter() ? "F" : "";
o = CGuiUtility::replaceTabCountValue(o, ui->comp_OwnModelSet->view()->rowCount()) + f; o = CGuiUtility::replaceTabCountValue(o, ui->comp_OwnModelSet->view()->rowCount()) + f;
ui->tw_ModelsToBeMapped->setTabText(i, o); ui->tw_ModelsToBeMapped->setTabText(i, o);
} }
void CDbMappingComponent::onOwnModelsChangedDigest(int count, bool withFilter)
{
Q_UNUSED(count);
Q_UNUSED(withFilter);
// non standard with sim
const int i = ui->tw_ModelsToBeMapped->indexOf(ui->tab_OwnModels);
static const QString ot("Stored own models");
QString o(ot);
const QString sim(ui->comp_OwnAircraftModels->getOwnModelsSimulator().toQString(true));
if (!sim.isEmpty()) { o = o.append(" ").append(sim); }
const QString f = ui->comp_OwnAircraftModels->view()->hasFilter() ? "F" : "";
o = CGuiUtility::replaceTabCountValue(o, ui->comp_OwnAircraftModels->view()->rowCount()) + f;
ui->tw_ModelsToBeMapped->setTabText(i, o);
}
void CDbMappingComponent::onUserChanged() void CDbMappingComponent::onUserChanged()
{ {
this->initVPilotLoading(); this->initVPilotLoading();

View File

@@ -71,10 +71,16 @@
</property> </property>
<item> <item>
<widget class="QTabWidget" name="tw_ModelsToBeMapped"> <widget class="QTabWidget" name="tw_ModelsToBeMapped">
<property name="toolTip">
<string>Models installed and found for your simulator</string>
</property>
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>0</number>
</property> </property>
<widget class="QWidget" name="tab_OwnModelSet"> <widget class="QWidget" name="tab_OwnModelSet">
<property name="toolTip">
<string>This is the model set swift will use for model matching</string>
</property>
<attribute name="title"> <attribute name="title">
<string>My model set</string> <string>My model set</string>
</attribute> </attribute>

View File

@@ -318,7 +318,7 @@
<string>Load flight plan from network</string> <string>Load flight plan from network</string>
</property> </property>
<property name="text"> <property name="text">
<string>Load</string> <string>Download</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../../blackmisc/blackmisc.qrc"> <iconset resource="../../blackmisc/blackmisc.qrc">
@@ -773,7 +773,7 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>-93</y> <y>0</y>
<width>383</width> <width>383</width>
<height>436</height> <height>436</height>
</rect> </rect>