Project/ProjectFormsBrowser.py

changeset 2492
91ab554e3465
parent 2408
dc3a7c9d8f6e
child 2525
8b507a9a2d40
child 2540
f346433ea963
equal deleted inserted replaced
2490:3d011f457ddd 2492:91ab554e3465
75 # templates for Qt4 75 # templates for Qt4
76 # these two lists have to stay in sync 76 # these two lists have to stay in sync
77 self.templates4 = ['dialog4.tmpl', 'widget4.tmpl', 'mainwindow4.tmpl', 77 self.templates4 = ['dialog4.tmpl', 'widget4.tmpl', 'mainwindow4.tmpl',
78 'dialogbuttonboxbottom4.tmpl', 'dialogbuttonboxright4.tmpl', 78 'dialogbuttonboxbottom4.tmpl', 'dialogbuttonboxright4.tmpl',
79 'dialogbuttonsbottom4.tmpl', 'dialogbuttonsbottomcenter4.tmpl', 79 'dialogbuttonsbottom4.tmpl', 'dialogbuttonsbottomcenter4.tmpl',
80 'dialogbuttonsright4.tmpl', 'wizard4.tmpl', 'wizardpage4.tmpl'] 80 'dialogbuttonsright4.tmpl', '', 'wizard4.tmpl', 'wizardpage4.tmpl',
81 'qdockwidget4.tmpl', 'qframe4.tmpl', 'qgroupbox4.tmpl',
82 'qscrollarea4.tmpl', 'qmdiarea4.tmpl', 'qtabwidget4.tmpl',
83 'qtoolbox4.tmpl', 'qstackedwidget4.tmpl']
81 self.templateTypes4 = [ 84 self.templateTypes4 = [
82 self.trUtf8("Dialog"), 85 self.trUtf8("Dialog"),
83 self.trUtf8("Widget"), 86 self.trUtf8("Widget"),
84 self.trUtf8("Main Window"), 87 self.trUtf8("Main Window"),
85 self.trUtf8("Dialog with Buttonbox (Bottom)"), 88 self.trUtf8("Dialog with Buttonbox (Bottom)"),
86 self.trUtf8("Dialog with Buttonbox (Right)"), 89 self.trUtf8("Dialog with Buttonbox (Right)"),
87 self.trUtf8("Dialog with Buttons (Bottom)"), 90 self.trUtf8("Dialog with Buttons (Bottom)"),
88 self.trUtf8("Dialog with Buttons (Bottom-Center)"), 91 self.trUtf8("Dialog with Buttons (Bottom-Center)"),
89 self.trUtf8("Dialog with Buttons (Right)"), 92 self.trUtf8("Dialog with Buttons (Right)"),
90 self.trUtf8("Wizard"), 93 '',
91 self.trUtf8("Wizard Page"), 94 self.trUtf8("QWizard"),
95 self.trUtf8("QWizardPage"),
96 self.trUtf8("QDockWidget"),
97 self.trUtf8("QFrame"),
98 self.trUtf8("QGroupBox"),
99 self.trUtf8("QScrollArea"),
100 self.trUtf8("QMdiArea"),
101 self.trUtf8("QTabWidget"),
102 self.trUtf8("QToolBox"),
103 self.trUtf8("QStackedWidget"),
92 ] 104 ]
93 105
94 self.compileProc = None 106 self.compileProc = None
95 107
96 def _createPopupMenus(self): 108 def _createPopupMenus(self):
485 None, 497 None,
486 self.trUtf8("New Form"), 498 self.trUtf8("New Form"),
487 self.trUtf8("Select a form type:"), 499 self.trUtf8("Select a form type:"),
488 self.templateTypes4, 500 self.templateTypes4,
489 0, False) 501 0, False)
490 if not ok: 502 if not ok or not selectedForm:
491 # user pressed cancel 503 # user pressed cancel
492 return 504 return
493 505
494 templateIndex = self.templateTypes4.index(selectedForm) 506 templateIndex = self.templateTypes4.index(selectedForm)
495 templateFile = os.path.join(getConfig('ericTemplatesDir'), 507 templateFile = os.path.join(getConfig('ericTemplatesDir'),

eric ide

mercurial