blob: 51599005580afb7692f6e6ff3bfe60f0726db0d0 (
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
# Copyright 2004-2007 Nanorex, Inc. See LICENSE file for details.
"""
$Id$
"""
from PyQt4 import QtGui
from utilities.icon_utilities import geticon
from utilities.debug_prefs import debug_pref, Choice_boolean_False
def setupUi(win):
"""
Populates the "Simulation" menu (incuding its "Measurement" submenu)
which appears in the main window menu bar.
@param win: NE1's main window object.
@type win: Ui_MainWindow
"""
# Populate the "Measurements" submenu.
win.measurementsMenu.addAction(win.jigsThermoAction)
win.measurementsMenu.addAction(win.jigsDistanceAction)
win.measurementsMenu.addAction(win.jigsAngleAction)
win.measurementsMenu.addAction(win.jigsDihedralAction)
# Populate the "Simulation" menu.
win.simulationMenu.addAction(win.simSetupAction) # "Run Dynamics"
win.simulationMenu.addAction(win.simMoviePlayerAction) # "Play Movie"
# from utilities.GlobalPreferences import ENABLE_PROTEINS
# piotr 081908: removed Rosetta from Simulation menu
#if ENABLE_PROTEINS:
# win.simulationMenu.addSeparator()
# win.simulationMenu.addAction(win.rosettaSetupAction)
win.simulationMenu.addSeparator()
win.simulationMenu.addAction(win.jigsMotorAction)
win.simulationMenu.addAction(win.jigsLinearMotorAction)
win.simulationMenu.addAction(win.jigsAnchorAction)
win.simulationMenu.addAction(win.jigsStatAction)
win.simulationMenu.addAction(win.jigsThermoAction)
win.simulationMenu.addAction(win.simNanoHiveAction)
#NOTE: The GAMESS and ESPImage options are intentionally disabled
#Disabling these items from the UI was a rattlesnake backlog item.
#see this page for details:
#U{<http://www.nanoengineer-1.net/mediawiki/index.php?title=Rattlesnake_Sprint_Backlog>}
#See also: UserPrefs.py _hideOrShowTheseWidgetsInUserPreferenceDialog method
#where the widgets in the UserPrefernces dialog corresponding to these actions
#are hidden.
if debug_pref("Show GAMESS and ESP Image UI options",
Choice_boolean_False,
prefs_key = True):
win.simulationMenu.addAction(win.jigsGamessAction) # GAMESS
win.simulationMenu.addAction(win.jigsESPImageAction) # ESP Image
def retranslateUi(win):
"""
Sets text related attributes for the "Simulations" menu.
@param win: NE1's mainwindow object.
@type win: U{B{QMainWindow}<http://doc.trolltech.com/4/qmainwindow.html>}
"""
win.simulationMenu.setTitle(
QtGui.QApplication.translate(
"MainWindow", "Simulation",
None, QtGui.QApplication.UnicodeUTF8))
win.measurementsMenu.setTitle(
QtGui.QApplication.translate(
"MainWindow", "Measurements",
None, QtGui.QApplication.UnicodeUTF8))
|