FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
diffpy.pdfgui/src/diffpy/pdfgui/gui/pdfpanel.py at migration · diffpy/diffpy.pdfgui · GitHub
diffpy
diffpy.pdfgui
Repository navigation
Code
Issues
24
(24)
Pull requests
2
(2)
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
diffpy.pdfgui
/
src
/
diffpy
/
pdfgui
/
gui
/
pdfpanel.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
61 lines (51 loc) · 2.01 KB
Breadcrumbs
diffpy.pdfgui
/
src
/
diffpy
/
pdfgui
/
gui
/
pdfpanel.py
Copy path
File metadata and controls
61 lines (51 loc) · 2.01 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
#!/usr/bin/env python
##############################################################################
#
# PDFgui by DANSE Diffraction group
# Simon J. L. Billinge
# (c) 2006 trustees of the Michigan State University.
# All rights reserved.
#
# File coded by: Chris Farrow, Dmitriy Bryndin
#
# See AUTHORS.txt for a list of people who contributed.
# See LICENSE.txt for license information.
#
##############################################################################
import
wx
from
diffpy
.
pdfgui
.
gui
.
errorwrapper
import
catchObjectErrors
class
PDFPanel
(
object
):
"""Mix-in class for all PDF gui panels.
This method is meant to be a secondary parent class for classed
derived from wx.Panel. It defines methods and member variables
necessary to all panels in the PDFgui.
"""
def
__init__
(
self
,
*
args
,
**
kwds
):
self
.
mainFrame
=
None
self
.
treeCtrlMain
=
None
# The configuration parser for reading and writing to the
# configuration file
self
.
cP
=
None
# key is used to determine the node type associated with the given panel.
self
.
key
=
""
# Wrap all events so that the exceptions get handled.
catchObjectErrors
(
self
)
return
def
refresh
(
self
):
"""Refreshes wigets of the panel.
This method must be overloaded in the derived class or else a
NotImplementedError will be raised when this method is called.
"""
raise
NotImplementedError
(
"refresh() must be implemented in subclass"
)
def
setToolTips
(
self
,
toolTips
):
"""Sets tooltips for controls.
@param toolTips: dictionary of the form {'controlname' :
'tooltip'}
"""
for
controlName
,
tooltip
in
toolTips
.
items
():
control
=
getattr
(
self
,
controlName
)
if
control
.
GetToolTip
()
is
None
:
control
.
SetToolTip
(
wx
.
ToolTip
(
""
))
tt
=
control
.
GetToolTip
()
tt
.
SetTip
(
tooltip
)
return
Back
|
FazBrowse Home
|
New Git URL