blob: 3d77bde2e1ed7b653b3eefbd65599e0b1c1982d9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
# Copyright 2004-2007 Nanorex, Inc. See LICENSE file for details.
"""
$Id$
"""
from PyQt4 import QtGui
from utilities.debug_prefs import debug_pref, Choice_boolean_False
def setupUi(win):
"""
Populates the "Insert" menu (incuding its "Reference Geometry" submenu)
which appears in the main window menu bar.
@param win: NE1's main window object.
@type win: Ui_MainWindow
"""
# Populate the "Insert" menu.
win.insertMenu.addAction(win.partLibAction)
win.insertMenu.addAction(win.fileInsertMmpAction)
win.insertMenu.addAction(win.fileInsertPdbAction)
win.insertMenu.addSeparator()
win.insertMenu.addAction(win.referencePlaneAction)
#win.insertMenu.addAction(win.jigsGridPlaneAction) # Grid Plane deprecated at v1.1.1 --Mark 2008-07-09
if debug_pref("Show Insert > Line option",
Choice_boolean_False,
prefs_key=True):
win.insertMenu.addAction(win.referenceLineAction)
win.insertMenu.addSeparator()
win.insertMenu.addAction(win.insertCommentAction)
#Commenting out the following to 'fix' bug 2455
#(we decided to remove this from the UI for alpha9.1 Only commenting it out
#so that it can be reimplemented in future if we decide to do so. (and
#thus it won't be 'forgotton' completely) -- ninad 20070619
##win.insertMenu.addSeparator()
##win.insertMenu.addAction(win.insertPovraySceneAction)
def retranslateUi(win):
"""
Sets text related attributes for the "Insert" and "Reference Geometry"
menus.
@param win: NE1's mainwindow object.
@type win: Ui_MainWindow
"""
win.insertMenu.setTitle(QtGui.QApplication.translate(
"MainWindow", "&Insert",
None, QtGui.QApplication.UnicodeUTF8))
# Removed by Mark 2008-04-05.
#win.referenceGeometryMenu.setTitle(QtGui.QApplication.translate(
# "MainWindow", "Reference Geometry",
# None, QtGui.QApplication.UnicodeUTF8))
|