diff --git a/src/Mod/Tux/NavigationIndicatorGui.py b/src/Mod/Tux/NavigationIndicatorGui.py index 7210971400..adcf5a7e6e 100644 --- a/src/Mod/Tux/NavigationIndicatorGui.py +++ b/src/Mod/Tux/NavigationIndicatorGui.py @@ -1,5 +1,5 @@ # Navigation indicator for FreeCAD -# Copyright (C) 2016, 2017 triplus @ FreeCAD +# Copyright (C) 2016, 2017, 2018 triplus @ FreeCAD # # # This library is free software; you can redistribute it and/or @@ -30,6 +30,7 @@ statusBar = mw.statusBar() p = App.ParamGet("User parameter:Tux/NavigationIndicator") pView = App.ParamGet("User parameter:BaseApp/Preferences/View") + try: _encoding = QtGui.QApplication.UnicodeUTF8 @@ -41,233 +42,263 @@ except AttributeError: "convenience function for Qt 5 translator" return QtGui.QApplication.translate(context, text, None) -text01 = translate("NavigationIndicator", "Select") -text02 = translate("NavigationIndicator", "Zoom") -text03 = translate("NavigationIndicator", "Rotate") -text04 = translate("NavigationIndicator", "Pan") -text05 = translate("NavigationIndicator", "Tilt") -text06 = translate("NavigationIndicator", "Navigation style") -text07 = translate("NavigationIndicator", "Page Up or Page Down key.") -text08 = translate("NavigationIndicator", "Rotation focus") -text09 = translate("NavigationIndicator", "Middle mouse button or key H.") -text10 = translate("NavigationIndicator", "Middle mouse button.") -t0 = translate("NavigationIndicator", "Navigation style not recognized.") +class IndicatorButton(QtGui.QPushButton): + """Detect language change events.""" + def __init__(self, parent=None): + super(IndicatorButton, self).__init__() -t1 = "
OpenInventor " + text06 + """
-| """ + text01 + """ | -""" + text02 + """ | -""" + text02 + """ | -""" + text03 + """ | -""" + text04 + """ | -
|---|---|---|---|---|
CAD " + text06 + """
-| """ + text01 + """ | -""" + text02 + """ | -""" + text03 + """ | -""" + text03 + """ | -""" + text04 + """ | -
|---|---|---|---|---|
Blender " + text06 + """
-| """ + text01 + """ | -""" + text02 + """ | -""" + text03 + """ | -""" + text04 + """ | -""" + text04 + """ | -
|---|---|---|---|---|
MayaGesture " + text06 + """
-| """ + text01 + """ | -""" + text02 + """ | -""" + text02 + """ | -""" + text03 + """ | -""" + text04 + """ | -""" + text05 + """ | -
|---|---|---|---|---|---|
| """ + text01 + """ | -""" + text02 + """ | -""" + text03 + """ | -""" + text04 + """ | -""" + text04 + """ | -""" + text05 + """ | -
""" + text02 + ": " + text07 + """
-""" + text08 + ": " + text09 + "
Touchpad " + text06 + """
-| """ + text01 + """ | -""" + text02 + """ | -""" + text02 + """ | -""" + text03 + """ | -""" + text03 + """ | -""" + text04 + """ | -
|---|---|---|---|---|---|
| """ + text01 + """ | -""" + text02 + """ | -""" + text03 + """ | -""" + text03 + """ | -""" + text04 + """ | -|
""" + text02 + ": " + text07 + "
" + global t0 + t0 = translate("NavigationIndicator", "Navigation style not recognized.") -t6 = "Gesture " + text06 + """
-| """ + text01 + """ | -""" + text02 + """ | -""" + text03 + """ | -""" + text03 + """ | -""" + text04 + """ | -""" + text05 + """ | -
|---|---|---|---|---|---|
| """ + text01 + """ | -""" + text02 + """ | -""" + text03 + """ | -""" + text04 + """ | -""" + text04 + """ | -""" + text05 + """ | -
""" + text02 + ": " + text07 + """
-""" + text08 + ": " + text09 + "
OpenInventor " + text06 + """
+| """ + text01 + """ | +""" + text02 + """ | +""" + text02 + """ | +""" + text03 + """ | +""" + text04 + """ | +
|---|---|---|---|---|
OpenCascade " + text06 + """
-| """ + text01 + """ | -""" + text02 + """ | -""" + text02 + """ | -""" + text03 + """ | -""" + text04 + """ | -""" + text04 + """ | -
|---|---|---|---|---|---|
CAD " + text06 + """
+| """ + text01 + """ | +""" + text02 + """ | +""" + text03 + """ | +""" + text03 + """ | +""" + text04 + """ | +
|---|---|---|---|---|
Blender " + text06 + """
+| """ + text01 + """ | +""" + text02 + """ | +""" + text03 + """ | +""" + text04 + """ | +""" + text04 + """ | +
|---|---|---|---|---|
MayaGesture " + text06 + """
+| """ + text01 + """ | +""" + text02 + """ | +""" + text02 + """ | +""" + text03 + """ | +""" + text04 + """ | +""" + text05 + """ | +
|---|---|---|---|---|---|
| """ + text01 + """ | +""" + text02 + """ | +""" + text03 + """ | +""" + text04 + """ | +""" + text04 + """ | +""" + text05 + """ | +
""" + text02 + ": " + text07 + """
+ """ + text08 + ": " + text09 + "
Touchpad " + text06 + """
+| """ + text01 + """ | +""" + text02 + """ | +""" + text02 + """ | +""" + text03 + """ | +""" + text03 + """ | +""" + text04 + """ | +
|---|---|---|---|---|---|
| """ + text01 + """ | +""" + text02 + """ | +""" + text03 + """ | +""" + text03 + """ | +""" + text04 + """ | +|
""" + text02 + ": " + text07 + "
" + + global t6 + t6 = "Gesture " + text06 + """
+| """ + text01 + """ | +""" + text02 + """ | +""" + text03 + """ | +""" + text03 + """ | +""" + text04 + """ | +""" + text05 + """ | +
|---|---|---|---|---|---|
| """ + text01 + """ | +""" + text02 + """ | +""" + text03 + """ | +""" + text04 + """ | +""" + text04 + """ | +""" + text05 + """ | +
""" + text02 + ": " + text07 + """
+ """ + text08 + ": " + text09 + "
OpenCascade " + text06 + """
+| """ + text01 + """ | +""" + text02 + """ | +""" + text02 + """ | +""" + text03 + """ | +""" + text04 + """ | +""" + text04 + """ | +
|---|---|---|---|---|---|