Tools/TRPreviewer.py

changeset 882
34b86be88bf0
parent 880
52ed20236a1c
child 945
8cd4d08fa9f6
child 1510
e75ecf2bd9dd
equal deleted inserted replaced
881:ff23d907f87b 882:34b86be88bf0
11 11
12 from PyQt4.QtCore import * 12 from PyQt4.QtCore import *
13 from PyQt4.QtGui import * 13 from PyQt4.QtGui import *
14 from PyQt4 import uic 14 from PyQt4 import uic
15 15
16 from E5Gui import E5MessageBox 16 from E5Gui import E5MessageBox, E5FileDialog
17 17
18 from .TRSingleApplication import TRSingleApplicationServer 18 from .TRSingleApplication import TRSingleApplicationServer
19 19
20 import UI.PixmapCache 20 import UI.PixmapCache
21 import UI.Config 21 import UI.Config
336 336
337 def __openWidget(self): 337 def __openWidget(self):
338 """ 338 """
339 Private slot to handle the Open Dialog action. 339 Private slot to handle the Open Dialog action.
340 """ 340 """
341 fileNameList = QFileDialog.getOpenFileNames( 341 fileNameList = E5FileDialog.getOpenFileNames(
342 None, 342 None,
343 self.trUtf8("Select UI files"), 343 self.trUtf8("Select UI files"),
344 "", 344 "",
345 self.trUtf8("Qt User-Interface Files (*.ui)"), 345 self.trUtf8("Qt User-Interface Files (*.ui)"))
346 QFileDialog.DontUseNativeDialog)
347 346
348 for fileName in fileNameList: 347 for fileName in fileNameList:
349 self.preview.loadWidget(fileName) 348 self.preview.loadWidget(fileName)
350 349
351 self.__updateActions() 350 self.__updateActions()
352 351
353 def __openTranslation(self): 352 def __openTranslation(self):
354 """ 353 """
355 Private slot to handle the Open Translation action. 354 Private slot to handle the Open Translation action.
356 """ 355 """
357 fileNameList = QFileDialog.getOpenFileNames( 356 fileNameList = E5FileDialog.getOpenFileNames(
358 None, 357 None,
359 self.trUtf8("Select translation files"), 358 self.trUtf8("Select translation files"),
360 "", 359 "",
361 self.trUtf8("Qt Translation Files (*.qm)"), 360 self.trUtf8("Qt Translation Files (*.qm)"))
362 QFileDialog.DontUseNativeDialog)
363 361
364 first = True 362 first = True
365 for fileName in fileNameList: 363 for fileName in fileNameList:
366 self.translations.add(fileName, first) 364 self.translations.add(fileName, first)
367 first = False 365 first = False

eric ide

mercurial