本文整理汇总了Python中PM.PM_ComboBox.PM_ComboBox.setWhatsThis方法的典型用法代码示例。如果您正苦于以下问题:Python PM_ComboBox.setWhatsThis方法的具体用法?Python PM_ComboBox.setWhatsThis怎么用?Python PM_ComboBox.setWhatsThis使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PM.PM_ComboBox.PM_ComboBox
的用法示例。
在下文中一共展示了PM_ComboBox.setWhatsThis方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: DnaDisplayStyle_PropertyManager
# 需要导入模块: from PM.PM_ComboBox import PM_ComboBox [as 别名]
# 或者: from PM.PM_ComboBox.PM_ComboBox import setWhatsThis [as 别名]
#.........这里部分代码省略.........
self._pmGroupBox2 = PM_GroupBox( self,
title = "Current Display Settings")
self._loadGroupBox2( self._pmGroupBox2 )
def _loadGroupBox1(self, pmGroupBox):
"""
Load widgets in group box.
"""
# Other info
# Not only loads the factory default settings but also all the favorite
# files stored in the ~/Nanorex/Favorites/DnaDisplayStyle directory
favoriteChoices = ['Factory default settings']
#look for all the favorite files in the favorite folder and add them to
# the list
from platform_dependent.PlatformDependent import find_or_make_Nanorex_subdir
_dir = find_or_make_Nanorex_subdir('Favorites/DnaDisplayStyle')
for file in os.listdir(_dir):
fullname = os.path.join( _dir, file)
if os.path.isfile(fullname):
if fnmatch.fnmatch( file, "*.txt"):
# leave the extension out
favoriteChoices.append(file[0:len(file)-4])
self.favoritesComboBox = \
PM_ComboBox( pmGroupBox,
choices = favoriteChoices,
spanWidth = True)
self.favoritesComboBox.setWhatsThis(
"""<b> List of Favorites </b>
<p>
Creates a list of favorite DNA display styles. Once favorite
styles have been added to the list using the Add Favorite button,
the list will display the chosen favorites.
To change the current favorite, select a current favorite from
the list, and push the Apply Favorite button.""")
# PM_ToolButtonRow ===============
# Button list to create a toolbutton row.
# Format:
# - QToolButton, buttonId, buttonText,
# - iconPath,
# - tooltip, shortcut, column
BUTTON_LIST = [
( "QToolButton", 1, "APPLY_FAVORITE",
"ui/actions/Properties Manager/ApplyFavorite.png",
"Apply Favorite", "", 0),
( "QToolButton", 2, "ADD_FAVORITE",
"ui/actions/Properties Manager/AddFavorite.png",
"Add Favorite", "", 1),
( "QToolButton", 3, "DELETE_FAVORITE",
"ui/actions/Properties Manager/DeleteFavorite.png",
"Delete Favorite", "", 2),
( "QToolButton", 4, "SAVE_FAVORITE",
"ui/actions/Properties Manager/SaveFavorite.png",
"Save Favorite", "", 3),
( "QToolButton", 5, "LOAD_FAVORITE",
"ui/actions/Properties Manager/LoadFavorite.png",
示例2: DnaGeneratorPropertyManager
# 需要导入模块: from PM.PM_ComboBox import PM_ComboBox [as 别名]
# 或者: from PM.PM_ComboBox.PM_ComboBox import setWhatsThis [as 别名]
#.........这里部分代码省略.........
decimals = 3,
suffix = ' Angstroms')
self.y2SpinBox = \
PM_DoubleSpinBox( self._endPoint2GroupBox,
label = \
"ui/actions/Properties Manager/Y_Coordinate.png",
value = 0,
setAsDefault = True,
minimum = -100.0,
maximum = 100.0,
decimals = 3,
suffix = ' Angstroms')
self.z2SpinBox = \
PM_DoubleSpinBox( self._endPoint2GroupBox,
label = \
"ui/actions/Properties Manager/Z_Coordinate.png",
value = 0,
setAsDefault = True,
minimum = -100.0,
maximum = 100.0,
decimals = 3,
suffix = ' Angstroms')
def _addWhatsThisText( self ):
"""
What's This text for some of the widgets in the
DNA Property Manager.
@note: Many PM widgets are still missing their "What's This" text.
"""
self.conformationComboBox.setWhatsThis("""<b>Conformation</b>
<p>There are three DNA geometries, A-DNA, B-DNA,
and Z-DNA. Only B-DNA and Z-DNA are currently supported.</p>""")
self.sequenceTextEdit.setWhatsThis("""<b>Strand Sequence</b>
<p>Type in the strand sequence you want to generate here (5' => 3')<br>
<br>
Recognized base letters:<br>
<br>
A = Adenosine<br>
C = Cytosine<br>
G = Guanosine<br>
T = Thymidine<br>
N = aNy base<br>
X = Unassigned<br>
<br>
Other base letters currently recognized:<br>
<br>
B = C,G, or T<br>
D = A,G, or T<br>
H = A,C, or T<br>
V = A,C, or G<br>
R = A or G (puRine)<br>
Y = C or T (pYrimidine)<br>
K = G or T (Keto)<br>
M = A or C (aMino)<br>
S = G or C (Strong -3H bonds)<br>
W = A or T (Weak - 2H bonds)<br>
</p>""")
self.actionsComboBox.setWhatsThis("""<b>Action</b>
<p>Select an action to perform on the sequence.</p>""")
示例3: ProteinDisplayStyle_PropertyManager
# 需要导入模块: from PM.PM_ComboBox import PM_ComboBox [as 别名]
# 或者: from PM.PM_ComboBox.PM_ComboBox import setWhatsThis [as 别名]
#.........这里部分代码省略.........
self._pmGroupBox2 = PM_GroupBox(self, title="Display")
self._loadGroupBox2(self._pmGroupBox2)
self._pmGroupBox3 = PM_GroupBox(self, title="Color")
self._loadGroupBox3(self._pmGroupBox3)
def _loadGroupBox1(self, pmGroupBox):
"""
Load widgets in group box.
"""
# Other info
# Not only loads the factory default settings but also all the favorite
# files stored in the ~/Nanorex/Favorites/ProteinDisplayStyle directory
favoriteChoices = ["Factory default settings"]
# look for all the favorite files in the favorite folder and add them to
# the list
from platform_dependent.PlatformDependent import find_or_make_Nanorex_subdir
_dir = find_or_make_Nanorex_subdir("Favorites/ProteinDisplayStyle")
for file in os.listdir(_dir):
fullname = os.path.join(_dir, file)
if os.path.isfile(fullname):
if fnmatch.fnmatch(file, "*.txt"):
# leave the extension out
favoriteChoices.append(file[0 : len(file) - 4])
self.favoritesComboBox = PM_ComboBox(pmGroupBox, choices=favoriteChoices, spanWidth=True)
self.favoritesComboBox.setWhatsThis(
"""<b> List of Favorites </b>
<p>
Creates a list of favorite Protein display styles. Once favorite
styles have been added to the list using the Add Favorite button,
the list will display the chosen favorites.
To change the current favorite, select a current favorite from
the list, and push the Apply Favorite button."""
)
# PM_ToolButtonRow ===============
# Button list to create a toolbutton row.
# Format:
# - QToolButton, buttonId, buttonText,
# - iconPath,
# - tooltip, shortcut, column
BUTTON_LIST = [
(
"QToolButton",
1,
"APPLY_FAVORITE",
"ui/actions/Properties Manager/ApplyPeptideDisplayStyleFavorite.png",
"Apply Favorite",
"",
0,
),
("QToolButton", 2, "ADD_FAVORITE", "ui/actions/Properties Manager/AddFavorite.png", "Add Favorite", "", 1),
(
"QToolButton",
3,