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 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327
|
# -*- coding: utf-8 -*-
__author__ = "M.Bonert, K.Hilbert"
__license__ = "GPL"
import sys
import wx
from Gnumed.pycommon import gmTools
try:
_('dummy-no-need-to-translate-but-make-epydoc-happy')
except NameError:
_ = lambda x:x
ID_MENU = wx.NewId()
#====================================================================
class ScrollTxtWin (wx.Window):
"""
Scrolling Text!
"""
# control parameters
__scroll_speed=.3 # pixels/milliseconds (?)
__delay=500 # milliseconds
name_list = [
u'Dr Horst Herb',
u'Karsten Hilbert',
u'Dr Gerardo Arnaez',
u'Dr Hilmar Berger',
u'Michael Bonert',
u'Dr Elizabeth Dodd',
u'Dr David Guest',
u'Ian Haywood',
u'Dr Tony Lembke',
u'Dr Richard Terry',
u'Syan J Tan',
u'Andreas Tille',
u'Dr Carlos Moro',
u'Dr James Busser',
u'Dr Rogerio Luz',
u'Dr Sebastian Hilbert',
u'Dr John Jaarsveld',
u'Uwe Koch Kronberg',
u'Dr Jerzy Luszawski',
u'et alii'
]
# initializations
__scroll_ctr = +230
__name_ctr = 1
__delay_ctr = 1
def __init__ (self, parent):
wx.Window.__init__(self, parent, -1, size=(230,20), style=wx.SUNKEN_BORDER)
self.SetBackgroundColour(wx.Colour(255, 255, 255))
self.__delay_ctr_reset=self.__delay*self.__scroll_speed
self.moving_txt=wx.StaticText(self, -1, "", size=(230,20), style=wx.ALIGN_CENTRE | wx.ST_NO_AUTORESIZE)
self.moving_txt.SetFont(wx.Font(10, wx.SWISS, wx.NORMAL, wx.NORMAL))
self.moving_txt.SetLabel(self.name_list[0])
wx.EVT_TIMER(self, -1, self.OnTimer)
self.timer = wx.Timer(self, -1)
#self.timer.Start(self.__scroll_speed)
self.timer.Start(milliseconds = 1./self.__scroll_speed)
def OnTimer(self, evt):
if(self.__scroll_ctr<-2 and self.__delay_ctr<self.__delay_ctr_reset):
# pause at centre
self.__delay_ctr=self.__delay_ctr+1
else:
self.__scroll_ctr=self.__scroll_ctr-1
self.moving_txt.MoveXY(self.__scroll_ctr, 0)
if(self.__scroll_ctr<-230):
# reset counters
self.__scroll_ctr=+230
self.__delay_ctr=1
# get next name in dict.
self.moving_txt.SetLabel(self.name_list[self.__name_ctr])
self.__name_ctr=self.__name_ctr+1
if(self.__name_ctr>len(self.name_list)-1):
self.__name_ctr=0
class AboutFrame (wx.Frame):
"""
About GNUmed
"""
def __init__(self, parent, ID, title, pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE, version='???', debug=False):
wx.Frame.__init__(self, parent, ID, title, pos, size, style)
self.SetIcon(gmTools.get_icon(wx = wx))
box = wx.BoxSizer(wx.VERTICAL)
if wx.Platform == '__WXMAC__':
box.Add((0,0), 2)
else:
box.Add((0,0), 2)
intro_txt=wx.StaticText(self, -1, _("Monty the Serpent && the FSF Present"))
intro_txt.SetFont(wx.Font(10,wx.SWISS,wx.NORMAL,wx.NORMAL,False,''))
box.Add(intro_txt, 0, wx.ALIGN_CENTRE)
if wx.Platform == '__WXMAC__':
box.Add((0,0), 3)
else:
box.Add((0,0), 3)
gm_txt=wx.StaticText(self, -1, "GNUmed")
gm_txt.SetFont(wx.Font(30, wx.SWISS, wx.NORMAL, wx.NORMAL))
box.Add(gm_txt, 0, wx.ALIGN_CENTRE)
motto_txt=wx.StaticText(self, -1, _("Free eMedicine"))
motto_txt.SetFont(wx.Font(10,wx.SWISS,wx.NORMAL,wx.NORMAL,False,''))
box.Add(motto_txt, 0, wx.ALIGN_CENTRE)
if wx.Platform == '__WXMAC__':
box.Add((0,0), 4)
else:
box.Add((0,0), 4)
ver_txt=wx.StaticText (
self,
-1,
_('Version %s%s brought to you by') % (
version,
gmTools.bool2subst(debug, u' (%s)' % _('debug'), u'')
)
)
ver_txt.SetFont(wx.Font(10, wx.SWISS, wx.NORMAL, wx.NORMAL))
box.Add(ver_txt, 0, wx.ALIGN_CENTRE)
admins_txt=wx.StaticText(self, -1, "")
admins_txt.SetFont(wx.Font(10, wx.SWISS, wx.NORMAL, wx.NORMAL))
box.Add(admins_txt, 0, wx.ALIGN_CENTRE)
self.win=ScrollTxtWin(self)
box.Add(self.win, 0, wx.ALIGN_CENTRE)
if wx.Platform == '__WXMAC__':
box.Add((0,0), 1)
else:
box.Add((0,0), 1)
info_txt=wx.StaticText(self, -1, _("Please visit http://www.gnumed.org"))
info_txt.SetFont(wx.Font(10, wx.SWISS, wx.NORMAL, wx.NORMAL))
box.Add(info_txt, 0, wx.ALIGN_CENTRE)
if wx.Platform == '__WXMAC__':
box.Add((0,0), 1)
else:
box.Add((0,0), 1)
btn = wx.Button(self, ID_MENU , _("Close"))
box.Add(btn,0, wx.ALIGN_CENTRE)
if wx.Platform == '__WXMAC__':
box.Add((0,0), 1)
else:
box.Add((0,0), 1)
wx.EVT_BUTTON(btn, ID_MENU, self.OnClose)
self.SetAutoLayout(True)
self.SetSizer(box)
self.Layout()
def OnClose (self, event):
self.win.timer.Stop ()
self.Destroy ()
#====================================================================
class cContributorsDlg(wx.Dialog):
# people who don't want to be listed here:
# ...
contributors = _(
'The following people kindly contributed to GNUmed.\n'
'Please write to <gnumed-devel@gnu.org> to have your\n'
'contribution duly recognized in this list or to have\n'
'your name removed from it for, say, privacy reasons.\n\n'
'Note that this list is sorted alphabetically by last\n'
'name, first name. If the only identifier is an email\n'
'address it is sorted under the first character of\n'
'the user name.\n'
'%s'
) % u"""
== A ===========================================
Marc ANGERMANN, MD
Germany
- Rechnungsvorlage
- bug reports
== B ===========================================
James BUSSER, MD
British Columbia
- test results handling
- documentation would be nothing without him
- encouragement, testing, bug reporting
- testing on MacOSX
Vaibhav BANAIT, MD, DNB, DM
India
- bug reports
- feature suggestions
- testing
== F ===========================================
Joachim FISCHER
GP Fischer + Lintz
Fachärzte Allgemeinmedizin
Wolfschlugen
- Karteieintragsarten passend für Deutschland
== H ===========================================
Sebastian HILBERT, MD
Germany
- packaging, PR
Anne te HARVIK
Netherlands
- Dutch translation
== J ===========================================
John JAARSVELD, MD
Netherlands
- lots of help with the visual progress notes
- Dutch l10n
== K ===========================================
Uwe Koch KRONBERG
Chile
- Spanish
- Chilean demographics
== L ===========================================
Nico LATZER
Germany
- invoice handling code
Steffi LEIBNER, Leipzig
Germany
- Testen, Fehlerberichte
- Dokumentenvorlage
Jerzy LUSZAWSKI
Poland
- list sorting
- plugins
- printing
Rogerio LUZ, Brasil
- testing, bug reporting
- SOAP handling discussion
- providing LaTeX form templates
== N ===========================================
Clemens NIETFELD, Oldenburg
- Information zur Anbindung von DocConcept
== P ===========================================
Martin PREUSS, Hamburg
- Chipkartenansteuerung
== R ===========================================
Thomas REUS, Düsseldorf
- Testen, Fehlerberichte
- Dokumentenvorlage
== T ===========================================
Andreas TILLE, Wernigerode
- Debian packages
- encouragement, wisdom
"""
#----------------------------------------------
def __init__(self, *args, **kwargs):
wx.Dialog.__init__(self, *args, **kwargs)
contributor_listing = wx.TextCtrl (
self,
-1,
cContributorsDlg.contributors,
style = wx.TE_MULTILINE | wx.TE_READONLY,
size = wx.Size(500, 300)
)
# contributor_listing.SetFont(wx.Font(12, wx.MODERN, wx.NORMAL, wx.NORMAL))
# arrange widgets
szr_outer = wx.BoxSizer(wx.VERTICAL)
szr_outer.Add(contributor_listing, 1, wx.EXPAND, 0)
# and do layout
self.SetAutoLayout(1)
self.SetSizerAndFit(szr_outer)
szr_outer.SetSizeHints(self)
self.Layout()
#====================================================================
# Main
#====================================================================
if __name__ == '__main__':
# set up dummy app
class TestApp (wx.App):
def OnInit (self):
frame = AboutFrame(None, -1, u"About GNUmed", size=wx.Size(300, 250))
frame.Show(1)
return 1
#---------------------
if len(sys.argv) > 1 and sys.argv[1] == 'test':
app = TestApp()
app.MainLoop()
#------------------------------------------------------------
|