MCPcopy Create free account
hub / github.com/dtmilano/AndroidViewClient / __init__

Method __init__

src/com/dtmilano/android/culebron.py:254–331  ·  view source on GitHub ↗

Culebron constructor. @param vc: The ViewClient used by this Culebron instance. Can be C{None} if no back-end is used. @type vc: ViewClient @param device: The device @type device: L{AdbClient} @param serialno: The device's serial number @type

(self, vc: ViewClient, device: AdbClient, serialno: str, printOperation: Any, scale: float = 1,
                 concertina: bool = False, concertinaConfigFile: Optional[str] = None,
                 autoScreenshots: bool = False)

Source from the content-addressed store, hash-verified

252''')
253
254 def __init__(self, vc: ViewClient, device: AdbClient, serialno: str, printOperation: Any, scale: float = 1,
255 concertina: bool = False, concertinaConfigFile: Optional[str] = None,
256 autoScreenshots: bool = False):
257 """
258 Culebron constructor.
259
260 @param vc: The ViewClient used by this Culebron instance. Can be C{None} if no back-end is used.
261 @type vc: ViewClient
262 @param device: The device
263 @type device: L{AdbClient}
264 @param serialno: The device's serial number
265 @type serialno: str
266 @param printOperation: the method invoked to print operations to the script
267 @type printOperation: method
268 @param scale: the scale of the device screen used to show it on the window
269 @type scale: float
270 @param concertina: enable concertina mode (see documentation)
271 @type concertina: bool
272 @param concertinaConfigFile: configuration file for concertina
273 @type concertinaConfigFile: str
274 :param autoScreenshots: take screenshots automatically
275 """
276
277 self.vc = vc
278 self.dump = None
279 if 'CONCERTINA' in self.vc.debug:
280 global DEBUG_CONCERTINA
281 DEBUG_CONCERTINA = self.vc.debug['CONCERTINA'] is not None
282 self.printOperation = printOperation
283 self.device = device
284 self.sdkVersion = device.getSdkVersion()
285 self.serialno = serialno
286 self.scale = scale
287 self.concertina = concertina
288 self.concertinaConfig = dict()
289 self.concertinaConfigFile = concertinaConfigFile
290 self.window = tkinter.Tk()
291 try:
292 f = resource_filename(Requirement.parse("androidviewclient"),
293 "share/pixmaps/culebra.png")
294 icon = ImageTk.PhotoImage(file=f)
295 except:
296 icon = None
297 if icon:
298 self.window.tk.call('wm', 'iconphoto', self.window._w, icon)
299 self.mainMenu = MainMenu(self)
300 self.window.config(menu=self.mainMenu)
301 self.mainFrame = tkinter.Frame(self.window)
302 self.placeholder = tkinter.Frame(self.mainFrame, width=400, height=400, background=Color.LIGHT_GRAY)
303 self.placeholder.grid(row=1, column=1, rowspan=4)
304 self.sideFrame = tkinter.Frame(self.window)
305 self.viewTree = ViewTree(self.sideFrame)
306 self.viewDetails = ViewDetails(self.sideFrame)
307 self.mainFrame.grid(row=1, column=1, columnspan=1, rowspan=4, sticky=tkinter.N + tkinter.S)
308 self.isSideFrameShown = False
309 self.isViewTreeShown = False
310 self.isViewDetailsShown = False
311 self.statusBar = StatusBar(self.window)

Callers 9

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls 9

printGridInfoMethod · 0.95
MainMenuClass · 0.85
ViewTreeClass · 0.85
ViewDetailsClass · 0.85
StatusBarClass · 0.85
parseMethod · 0.80
gridMethod · 0.80
getSdkVersionMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected