Skip to content

Commit d9678f3

Browse files
committed
Gear Editor: Add "What's this?" tooltips to single gear view functions
1 parent 0a48880 commit d9678f3

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

apps/armoury/src/singlegearview.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ SingleGearView::SingleGearView(GameData *data, FileCache &cache, QWidget *parent
2222
, gearView(new GearView(data, cache))
2323
, data(data)
2424
{
25+
gearView->setWhatsThis(i18n("A 3D preview of the gear model."));
26+
2527
// We don't want to see the face in this view
2628
gearView->setHair(-1);
2729
gearView->setEar(-1);
@@ -31,6 +33,7 @@ SingleGearView::SingleGearView(GameData *data, FileCache &cache, QWidget *parent
3133
setLayout(layout);
3234

3335
auto mdlPathEdit = new QLineEdit();
36+
mdlPathEdit->setWhatsThis(i18n("The path to this gear's model file."));
3437
mdlPathEdit->setReadOnly(true);
3538

3639
connect(this, &SingleGearView::gotMDLPath, this, [this, mdlPathEdit] {
@@ -47,30 +50,35 @@ SingleGearView::SingleGearView(GameData *data, FileCache &cache, QWidget *parent
4750
layout->addLayout(topControlLayout);
4851

4952
raceCombo = new QComboBox();
53+
raceCombo->setWhatsThis(i18n("The race used in the gear model preview. Note that this only shows races that have unique models for this gear."));
5054
connect(raceCombo, qOverload<int>(&QComboBox::currentIndexChanged), [this](int index) {
5155
setRace(static_cast<Race>(raceCombo->itemData(index).toInt()));
5256
});
5357
controlLayout->addWidget(raceCombo);
5458

5559
subraceCombo = new QComboBox();
60+
subraceCombo->setWhatsThis(i18n("The subrace used in the gear model preview. Note that this only shows subraces that have unique models for this gear."));
5661
connect(subraceCombo, qOverload<int>(&QComboBox::currentIndexChanged), [this](int index) {
5762
setSubrace(static_cast<Subrace>(subraceCombo->itemData(index).toInt()));
5863
});
5964
controlLayout->addWidget(subraceCombo);
6065

6166
genderCombo = new QComboBox();
67+
genderCombo->setWhatsThis(i18n("The gender used in the gear model preview. Note that this only shows gender that have unique models for this gear."));
6268
connect(genderCombo, qOverload<int>(&QComboBox::currentIndexChanged), [this](int index) {
6369
setGender(static_cast<Gender>(genderCombo->itemData(index).toInt()));
6470
});
6571
controlLayout->addWidget(genderCombo);
6672

6773
lodCombo = new QComboBox();
74+
lodCombo->setWhatsThis(i18n("The level of detail to preview. The higher the number, the lower the detail."));
6875
connect(lodCombo, qOverload<int>(&QComboBox::currentIndexChanged), [this](int index) {
6976
setLevelOfDetail(index);
7077
});
7178
controlLayout->addWidget(lodCombo);
7279

7380
addToFMVButton = new QPushButton(i18nc("@action:button FMV is an abbreviation for Full Model Viewer", "Add to FMV"));
81+
addToFMVButton->setWhatsThis(i18n("Add this gear to the Full Model Viewer window, to preview on a full character."));
7482
addToFMVButton->setIcon(QIcon::fromTheme(QStringLiteral("list-add-user")));
7583
connect(addToFMVButton, &QPushButton::clicked, this, [this](bool) {
7684
if (currentGear.has_value()) {
@@ -79,6 +87,7 @@ SingleGearView::SingleGearView(GameData *data, FileCache &cache, QWidget *parent
7987
});
8088

8189
editButton = new QPushButton(i18nc("@action:button", "Edit"));
90+
editButton->setWhatsThis(i18n("Edit this model directly in Blender."));
8291
editButton->setIcon(QIcon::fromTheme(QStringLiteral("document-edit")));
8392
connect(editButton, &QPushButton::clicked, this, [this](bool) {
8493
// Export in default location
@@ -122,6 +131,7 @@ SingleGearView::SingleGearView(GameData *data, FileCache &cache, QWidget *parent
122131
topControlLayout->addWidget(editButton);
123132

124133
importButton = new QPushButton(i18nc("@action:button", "Import…"));
134+
importButton->setWhatsThis(i18n("Import a different model for this gear."));
125135
importButton->setIcon(QIcon::fromTheme(QStringLiteral("document-import")));
126136
connect(importButton, &QPushButton::clicked, this, [this](bool) {
127137
if (currentGear.has_value()) {
@@ -200,6 +210,7 @@ SingleGearView::SingleGearView(GameData *data, FileCache &cache, QWidget *parent
200210

201211
exportButton = new QPushButton(i18nc("@action:button", "Export"));
202212
exportButton->setMenu(testMenu);
213+
exportButton->setWhatsThis(i18n("Export this gear's model."));
203214
exportButton->setIcon(QIcon::fromTheme(QStringLiteral("document-export")));
204215

205216
topControlLayout->addWidget(exportButton);

0 commit comments

Comments
 (0)