Changeset 2009
- Timestamp:
- 04/28/10 20:49:11 (2 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
-
loplug.py (modified) (1 diff)
-
loplug/plugins/lockon/llf.py (modified) (3 diffs)
-
loplug/plugins/lockon/rtb.py (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/loplug.py
r1977 r2009 25 25 sys.path.append( os.path.join( sys.path[0], 'common', 'drawobjects')) 26 26 sys.path.append( os.path.join( sys.path[0], 'common', 'lodb')) 27 sys.path.append( os.path.join( sys.path[0], 'common', 'mesh')) 27 28 sys.path.append( os.path.join( sys.path[0], 'lotatc_server')) 28 29 sys.path.append( os.path.join( sys.path[0], 'lotatc_client')) -
trunk/loplug/plugins/lockon/llf.py
r1944 r2009 23 23 from pgservice import PGService 24 24 from lotatc_positionConverter import * 25 from srtm30 import Srtm3025 from meshselecter import getMeshServer 26 26 27 27 # ======================================================================================================== … … 57 57 self.plugItemRequests = {} #- Dictionnary for all the requests 58 58 self.posConverter = PositionConverter() #- Used to convert (latitude, longitude) to (x,y) 59 self.srtm = Srtm30() #- Used to get target altitude60 59 61 60 self.samplingPeriod = Llf.LUA_SAMPLING_PERIOD #- Default sampling period … … 153 152 self.__computeVerticalVelocityInfo__() 154 153 154 # Get meshServer (Used to get target altitude) according to the FC version used 155 fcVersion = self.parentPlug.getFcVersion() 156 self.mesh = getMeshServer() 157 158 155 159 #---------------------------------------------------------------- 156 160 # To save the settings -
trunk/loplug/plugins/lockon/rtb.py
r1993 r2009 28 28 from lodbselecter import getDbParser 29 29 from lotatc_positionConverter import * 30 from airportdatamanager import * 30 31 31 32 … … 65 66 self.dbParser = None #- FC db parser 66 67 self.fcVersion = None #- Flamming cliff version 68 self.airport_mng = AirportDataManager("") 67 69 68 70 # ======================================================================================================== … … 138 140 range = 100 139 141 if self.dbParser: 142 for airportClsId, airportInfo in self.airport_mng.items(): 143 airportName = airportInfo[CST_AIRPORT_NAME] 144 print airportClsId, airportName 145 self.airportsData[airportName] = {} 146 self.airportsData[airportName]["clsId"] = airportClsId 147 self.airportsData[airportName]["range"] = range 148 range -= 1 149 return 150 140 151 for clsId in cst_airportDict.keys(): 141 152 airportName = self.dbParser.getAirportById(clsId) … … 176 187 self.widgets["ukraineAirports"].setLayout( ukraineAirports_vBox) 177 188 178 # Process RUSSIANairports189 # Process airports 179 190 self.widgets["russiaAirports"] = QGroupBox( self.tr("Russia")) 180 191 russiaAirports_vBox = QVBoxLayout() 181 192 self.widgets["russiaAirports"].setLayout( russiaAirports_vBox) 182 193 183 for clsId in cst_airportDict.keys(): 184 airportName = cst_airportDict[clsId][CST_AIRPORT_NAME] 185 self.widgets[clsId] = QCheckBox( QString( airportName)) 186 if cst_airportDict[clsId][CST_AIRPORT_SIDE] == "Ukraine": 187 ukraineAirports_vBox.addWidget( self.widgets[clsId]) 194 for airportClsId, airportInfo in self.airport_mng.items(): 195 self.widgets[airportClsId] = QCheckBox( QString( airportInfo[CST_AIRPORT_NAME])) 196 if airportInfo[CST_AIRPORT_SIDE] == "Ukraine": 197 ukraineAirports_vBox.addWidget( self.widgets[airportClsId]) 188 198 else: 189 russiaAirports_vBox.addWidget( self.widgets[clsId]) 190 199 russiaAirports_vBox.addWidget( self.widgets[airportClsId]) 200 201 191 202 # Build complete UI 192 203 hBox = QHBoxLayout() … … 209 220 def _deinit_ui( self ): 210 221 self.preselectedAirportClsIds = [] 211 for clsId in cst_airportDict.keys(): 212 if self.widgets[clsId].isChecked(): 213 self.preselectedAirportClsIds.append( clsId) 222 for airportClsId, airportInfo in self.airport_mng.items(): 223 if self.widgets[airportClsId].isChecked(): 224 self.preselectedAirportClsIds.append( airportClsId) 225 226 # for clsId in cst_airportDict.keys(): 227 # if self.widgets[clsId].isChecked(): 228 # self.preselectedAirportClsIds.append( clsId) 214 229 #---------------------------------------------------------------- 215 230 # Method invoked by the PGPluginClient parent on restart()
Note: See TracChangeset
for help on using the changeset viewer.
