Пример #1
0
def install_translator(qapp):
    """Install Qt translator to the QApplication instance"""
    global QT_TRANSLATOR
    if QT_TRANSLATOR is None:
        from guidata.qt.QtCore import QLocale, QTranslator, QLibraryInfo
        locale = QLocale.system().name()
        # Qt-specific translator
        qt_translator = QTranslator()
        paths = QLibraryInfo.location(QLibraryInfo.TranslationsPath)
        if qt_translator.load("qt_"+locale, paths):
            QT_TRANSLATOR = qt_translator # Keep reference alive
    if QT_TRANSLATOR is not None:
        qapp.installTranslator(QT_TRANSLATOR)
Пример #2
0
def install_translator(qapp):
    """Install Qt translator to the QApplication instance"""
    global QT_TRANSLATOR
    if QT_TRANSLATOR is None:
        from guidata.qt.QtCore import QLocale, QTranslator, QLibraryInfo
        locale = QLocale.system().name()
        # Qt-specific translator
        qt_translator = QTranslator()
        paths = QLibraryInfo.location(QLibraryInfo.TranslationsPath)
        if qt_translator.load("qt_" + locale, paths):
            QT_TRANSLATOR = qt_translator  # Keep reference alive
    if QT_TRANSLATOR is not None:
        qapp.installTranslator(QT_TRANSLATOR)
Пример #3
0
from guidata.qthelpers import create_action, add_actions, get_std_icon
from guidata.qtwidgets import DockableWidgetMixin
from guiqwt.plot import CurveWidget
#from guidata.utils import update_dataset
#from guidata.py3compat import to_text_string

from guiqwt.config import _

# local imports
from Helpers.plotSignal import SignalFT, DockablePlotWidget
from Helpers.genericthread import GenericWorker
from Instruments.tiepie import TiePieUi
from Instruments.pistage import PiStageUi, c0, fsDelay

# set default language to c, so decimal point is '.' not ',' on german systems
QLocale.setDefault(QLocale.c())
APP_NAME = _("FTIR")
APP_DESC = _("""Record a spectrum using a michelson<br>
interferometer with a delay stage""")
VERSION = '0.0.1'

fwhm = 2*np.sqrt(2*np.log(2))

def dummyPulse(x):
    A, mu, s, y0 = 1, 0, 40, 0
    return A*np.exp(-0.5*((x-mu)/s)**2)*np.cos(2*np.pi*0.1*x)+y0



class DockableTabWidget(QTabWidget, DockableWidgetMixin):
    LOCATION = Qt.LeftDockWidgetArea