| Trees | Indices | Help |
|---|
|
|
1 # -*- coding: utf-8 -*- 2 # 3 # 4 # filename: bearbeiteprotokolleintrag.py 5 # 6 # version: see wxvf.py 7 # 8 # 9 # ---------------------------------------------------------------------------------------- 10 # 11 # 12 # Copyright (C) 2010, 2011 Michael Bellair 13 # 14 # This file is part of wxvf. 15 # 16 # wxvf is free software: you can redistribute it and/or modify 17 # it under the terms of the GNU General Public License as published by 18 # the Free Software Foundation, either version 3 of the License, or 19 # (at your option) any later version. 20 # 21 # wxvf is distributed in the hope that it will be useful, 22 # but WITHOUT ANY WARRANTY; without even the implied warranty of 23 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 24 # GNU General Public License for more details. 25 # 26 # You should have received a copy of the GNU General Public License 27 # along with wxvf. If not, see <http://www.gnu.org/licenses/>. 28 # 29 # Michael Bellair 30 # Sportplatzstrasse 11 31 # 01259 Dresden 32 # 33 # E-Mail: bellair@freenet.de 34 # homepage: http://vf.michaelbellair.de/index.html 35 # 36 # 37 # ---------------------------------------------------------------------------------------- 38 # 39 import wx 40 41 from bearbeiteuebersetzung import BearbeiteUebersetzung # Eingabeformular für Übersetzungen 42 43 from universal import zk # Zeichenketten bearbeiten 44 45 from wxuniversal import ComboBoxErg # wx.ComboBox mit Ergänzungen 46 from wxuniversal import FlexGridSizerWxObjTitel # wxObjekt mit Titel 47 48 49 # 50 # 51 # 52 # ---------------------------------------------------------------------------------------- 53 # ---------------------------------------------------------------------------------------- 54 # -- -------------------------------------------------- 55 # -- Offene Punkte / Aufgaben -------------------------------------------------- 56 # -- -------------------------------------------------- 57 # ---------------------------------------------------------------------------------------- 58 # ---------------------------------------------------------------------------------------- 59 # 60 # 61 # -- siehe TODO 'bearbeiteprotokolleintrag.py' -- 62 # 63 # 64 # ---------------------------------------------------------------------------------------- 65 # 66 67 68 # 69 # ---------------------------------------------------------------------------------------- 70 # ---------------------------------------------------------------------------------------- 71 # -- ---------------------------------- 72 # -- Eingabeformular 'Protokolleintrag bearbeiten' ---------------------------------- 73 # -- ---------------------------------- 74 # ---------------------------------------------------------------------------------------- 75 # ---------------------------------------------------------------------------------------- 76 #78 """ 79 Klasse zur Abbildung des Eingabeformulars 'Protokolleintrag bearbeiten. 80 """ 81 82 # 83 # ------------------------------------------------------------------------------------ 84 # -- Initialisierungen -------------------------------------------------- 85 # ------------------------------------------------------------------------------------ 86 #23888 wx.Dialog.__init__( self, parent = parent, title = 'Bearbeite Protokolleintrag', style = style ) 89 90 # 91 # -- Namen setzen (somit Klasse / Objekt erkennen) -------------------------- 92 # 93 self.SetName( name = "BearbeiteProtokolleintrag" ) 94 95 96 # 97 # -- Randbedingungen übernehmen ------------------------------------------ 98 # 99 self.__Notizen__ = Notizen 100 self.__dbVerbindung__ = dbVerbindung 101 102 103 104 # 105 # -- Typ des Protokolleintrages ------------------------------------------ 106 # 107 self.ComboBox__TypPE = FlexGridSizerWxObjTitel( parent = self 108 , wxObj = ComboBoxErg( self 109 , choices = [] 110 , style = wx.CB_DROPDOWN|wx.CB_READONLY 111 , Notizen = self.__Notizen__ ) 112 , titel = u"Typ des Protokolleintrages" 113 , orient = wx.VERTICAL ) 114 115 self.ComboBox__TypPE.wxObjekt.nimmWerteStatusleiste( 116 DBSpNameErlaeuterung = u"Der Typ des Gefahrenprotokolleintrages." 117 , DBSpName = "prt.typ / prt.protokoll / prj.pp_prtprotokoll /prj.pl_prtpsgefszenario" ) 118 119 self.__dbVerbindung__.selektiere__prtTyp__Sprache( TreeCtrlErg_ComboBoxErg = self.ComboBox__TypPE.wxObjekt 120 , prtTypAspekt = "PE" ) 121 122 123 124 # 125 # -- Button 'OK' / 'Abbruch' -------------------------------------------------- 126 # 127 self.Button_Abbruch = wx.Button( self, wx.ID_CANCEL ) 128 self.Button_Abbruch.Bind( wx.EVT_BUTTON 129 , self.__ereignisSchliessen__ ) 130 131 132 self.Button_OK = wx.Button( self, wx.ID_OK ) 133 self.Button_OK.SetDefault() 134 135 self.Button_OK.Bind( wx.EVT_BUTTON 136 , self.__ereignisSchliessen__ ) 137 138 139 140 141 142 # 143 # -------------------------------------------------------------------------------- 144 # -- Layout setzen ---------------------------------------------------------- 145 # -------------------------------------------------------------------------------- 146 # 147 GridBagSizer = wx.GridBagSizer( vgap = 10, hgap = 10 ) 148 149 GridBagSizer.AddGrowableCol( idx = 0, proportion = 1 ) 150 GridBagSizer.AddGrowableCol( idx = 1, proportion = 1 ) 151 152 GridBagSizer.AddGrowableRow( idx = 1, proportion = 1 ) 153 154 155 # 156 # -- 0.) ------------------------------------------------------------------ 157 # 158 GridBagSizer.Add( self.ComboBox__TypPE 159 , pos = wx.GBPosition( row = 0, col = 0 ) 160 , span = wx.GBSpan( rowspan = 1, colspan = 2 ) 161 , flag = wx.LEFT|wx.TOP|wx.RIGHT|wx.EXPAND 162 , border = 10 ) 163 164 # 165 # -- 1.) ------------------------------------------------------------------ 166 # 167 GridBagSizer.Add( self.Button_Abbruch 168 , pos = wx.GBPosition( row = 1, col = 0 ) 169 , flag = wx.LEFT|wx.BOTTOM|wx.EXPAND 170 , border = 10 ) 171 172 GridBagSizer.Add( self.Button_OK 173 , pos = wx.GBPosition( row = 1, col = 1 ) 174 , flag = wx.RIGHT|wx.BOTTOM|wx.EXPAND 175 , border = 10 ) 176 177 178 # 179 # -- in das Fenster einpassen ------------------------------------------ 180 # 181 self.SetSizerAndFit( GridBagSizer )182 183 184 185 # 186 # ------------------------------------------------------------------------------------ 187 # -- Eingabeformular schließen; Änderungen verwerfen ---------------------------------- 188 # ------------------------------------------------------------------------------------ 189 #191 """ 192 Methode die aufgerufen wird, wenn 'OK' oder 'Abbruch' betätigt wurde. 193 194 @param ereignis: Es ist das C{wx - Ereignisobjekt} zur Ereignisbehandlung zu übergeben. 195 @type ereignis: C{wx - Ereignisobjekt} 196 """ 197 198 # 199 # -- Rückgabewert setzen -------------------------------------------------- 200 # 201 self.prt_typ_id = None 202 if( ereignis.GetId() == self.Button_OK.GetId() ) : 203 204 self.prt_typ_id = self.ComboBox__TypPE.wxObjekt.gibDbId() 205 206 207 # 208 # -- Meldungsfenster schließen ------------------------------------------ 209 # 210 self.Destroy() 211 212 213 # 214 # -- Das Ereignis weiterreichen, damit es weiter -------------------------- 215 # -- ausgewertet werden kann -------------------------- 216 # 217 ereignis.Skip( skip = True )218 219 220 221 # 222 # ------------------------------------------------------------------------------------ 223 # -- Eingabeformular schließen; Änderungen verwerfen ---------------------------------- 224 # ------------------------------------------------------------------------------------ 225 #227 """ 228 Methode die die selektierte C{prt.typ.id} zurückgibt. 229 230 @return: Es wird C{prt.typ.id} zurückgegeben, wenn C{OK} betätigt wurde. Andernfalls wird C{None} zurückgegeben. 231 @rtype: Ganzzahl 232 """ 233 234 # 235 # -- Rückgabewert ---------------------------------------------------------- 236 # 237 return self.prt_typ_id
| Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 on Wed May 18 07:37:28 2011 | http://epydoc.sourceforge.net |