[TD]make Arrow enums translatable

This commit is contained in:
wandererfan
2020-03-10 14:09:01 -04:00
committed by WandererFan
parent b493b3841d
commit c485904ab8
4 changed files with 14 additions and 11 deletions

View File

@@ -88,7 +88,7 @@ void DrawGuiUtil::loadArrowBox(QComboBox* qcb)
qcb->clear();
int i = 0;
for (; i < ArrowPropEnum::ArrowCount; i++) {
qcb->addItem(QString::fromUtf8(ArrowPropEnum::ArrowTypeEnums[i]));
qcb->addItem(tr(ArrowPropEnum::ArrowTypeEnums[i]));
QIcon itemIcon(QString::fromUtf8(ArrowPropEnum::ArrowTypeIcons[i].c_str()));
qcb->setItemIcon(i, itemIcon);
}

View File

@@ -24,6 +24,7 @@
#define _DrawGuiUtil_h_
#include <string>
#include <QCoreApplication>
#include <QRectF>
#include <QPointF>
#include <QComboBox>
@@ -47,6 +48,7 @@ namespace TechDrawGui
/// Convenient utility functions for TechDraw Gui Module
class TechDrawGuiExport DrawGuiUtil {
Q_DECLARE_TR_FUNCTIONS(TechDrawGui::DrawGuiUtil)
public:
static TechDraw::DrawPage* findPage(Gui::Command* cmd);
static bool needPage(Gui::Command* cmd);