DebugClients/Python/DebugClientBase.py

changeset 7
c679fb30c8f3
parent 5
fa319c01b604
child 13
1af94a91f439
equal deleted inserted replaced
6:52e8c820d0dd 7:c679fb30c8f3
1465 h, s, v, a = value.getHsv() 1465 h, s, v, a = value.getHsv()
1466 varlist.append(("hsv", "int", "%d, %d, %d, %d" % (h, s, v, a))) 1466 varlist.append(("hsv", "int", "%d, %d, %d, %d" % (h, s, v, a)))
1467 c, m, y, k, a = value.getCmyk() 1467 c, m, y, k, a = value.getCmyk()
1468 varlist.append(("cmyk", "int", "%d, %d, %d, %d, %d" % (c, m, y, k, a))) 1468 varlist.append(("cmyk", "int", "%d, %d, %d, %d, %d" % (c, m, y, k, a)))
1469 elif qttype == 'QDate': 1469 elif qttype == 'QDate':
1470 varlist.append(("", "QDate", "%s" % unicode(value.toString()))) 1470 varlist.append(("", "QDate", "%s" % value.toString()))
1471 elif qttype == 'QTime': 1471 elif qttype == 'QTime':
1472 varlist.append(("", "QTime", "%s" % unicode(value.toString()))) 1472 varlist.append(("", "QTime", "%s" % value.toString()))
1473 elif qttype == 'QDateTime': 1473 elif qttype == 'QDateTime':
1474 varlist.append(("", "QDateTime", "%s" % unicode(value.toString()))) 1474 varlist.append(("", "QDateTime", "%s" % value.toString()))
1475 elif qttype == 'QDir': 1475 elif qttype == 'QDir':
1476 varlist.append(("path", "str", "%s" % unicode(value.path()))) 1476 varlist.append(("path", "str", "%s" % value.path()))
1477 varlist.append(("absolutePath", "str", "%s" % \ 1477 varlist.append(("absolutePath", "str", "%s" % value.absolutePath()))
1478 unicode(value.absolutePath()))) 1478 varlist.append(("canonicalPath", "str", "%s" % value.canonicalPath()))
1479 varlist.append(("canonicalPath", "str", "%s" % \
1480 unicode(value.canonicalPath())))
1481 elif qttype == 'QFile': 1479 elif qttype == 'QFile':
1482 varlist.append(("fileName", "str", "%s" % unicode(value.fileName()))) 1480 varlist.append(("fileName", "str", "%s" % value.fileName()))
1483 elif qttype == 'QFont': 1481 elif qttype == 'QFont':
1484 varlist.append(("family", "str", "%s" % unicode(value.family()))) 1482 varlist.append(("family", "str", "%s" % value.family()))
1485 varlist.append(("pointSize", "int", "%d" % value.pointSize())) 1483 varlist.append(("pointSize", "int", "%d" % value.pointSize()))
1486 varlist.append(("weight", "int", "%d" % value.weight())) 1484 varlist.append(("weight", "int", "%d" % value.weight()))
1487 varlist.append(("bold", "bool", "%s" % value.bold())) 1485 varlist.append(("bold", "bool", "%s" % value.bold()))
1488 varlist.append(("italic", "bool", "%s" % value.italic())) 1486 varlist.append(("italic", "bool", "%s" % value.italic()))
1489 elif qttype == 'QUrl': 1487 elif qttype == 'QUrl':
1490 varlist.append(("url", "str", "%s" % unicode(value.toString()))) 1488 varlist.append(("url", "str", "%s" % value.toString()))
1491 varlist.append(("scheme", "str", "%s" % unicode(value.scheme()))) 1489 varlist.append(("scheme", "str", "%s" % value.scheme()))
1492 varlist.append(("user", "str", "%s" % unicode(value.userName()))) 1490 varlist.append(("user", "str", "%s" % value.userName()))
1493 varlist.append(("password", "str", "%s" % unicode(value.password()))) 1491 varlist.append(("password", "str", "%s" % value.password()))
1494 varlist.append(("host", "str", "%s" % unicode(value.host()))) 1492 varlist.append(("host", "str", "%s" % value.host()))
1495 varlist.append(("port", "int", "%d" % value.port())) 1493 varlist.append(("port", "int", "%d" % value.port()))
1496 varlist.append(("path", "str", "%s" % unicode(value.path()))) 1494 varlist.append(("path", "str", "%s" % value.path()))
1497 elif qttype == 'QModelIndex': 1495 elif qttype == 'QModelIndex':
1498 varlist.append(("valid", "bool", "%s" % value.isValid())) 1496 varlist.append(("valid", "bool", "%s" % value.isValid()))
1499 if value.isValid(): 1497 if value.isValid():
1500 varlist.append(("row", "int", "%s" % value.row())) 1498 varlist.append(("row", "int", "%s" % value.row()))
1501 varlist.append(("column", "int", "%s" % value.column())) 1499 varlist.append(("column", "int", "%s" % value.column()))
1502 varlist.append(("internalId", "int", "%s" % value.internalId())) 1500 varlist.append(("internalId", "int", "%s" % value.internalId()))
1503 varlist.append(("internalPointer", "void *", "%s" % \ 1501 varlist.append(("internalPointer", "void *", "%s" % \
1504 value.internalPointer())) 1502 value.internalPointer()))
1505 elif qttype == 'QRegExp': 1503 elif qttype == 'QRegExp':
1506 varlist.append(("pattern", "str", "%s" % unicode(value.pattern()))) 1504 varlist.append(("pattern", "str", "%s" % value.pattern()))
1507 1505
1508 # GUI stuff 1506 # GUI stuff
1509 elif qttype == 'QAction': 1507 elif qttype == 'QAction':
1510 varlist.append(("name", "str", "%s" % unicode(value.objectName()))) 1508 varlist.append(("name", "str", "%s" % value.objectName()))
1511 varlist.append(("text", "str", "%s" % unicode(value.text()))) 1509 varlist.append(("text", "str", "%s" % value.text()))
1512 varlist.append(("icon text", "str", "%s" % unicode(value.iconText()))) 1510 varlist.append(("icon text", "str", "%s" % value.iconText()))
1513 varlist.append(("tooltip", "str", "%s" % unicode(value.toolTip()))) 1511 varlist.append(("tooltip", "str", "%s" % value.toolTip()))
1514 varlist.append(("whatsthis", "str", "%s" % unicode(value.whatsThis()))) 1512 varlist.append(("whatsthis", "str", "%s" % value.whatsThis()))
1515 varlist.append(("shortcut", "str", "%s" % \ 1513 varlist.append(("shortcut", "str", "%s" % value.shortcut().toString()))
1516 unicode(value.shortcut().toString())))
1517 elif qttype == 'QKeySequence': 1514 elif qttype == 'QKeySequence':
1518 varlist.append(("value", "", "%s" % unicode(value.toString()))) 1515 varlist.append(("value", "", "%s" % value.toString()))
1519 1516
1520 # XML stuff 1517 # XML stuff
1521 elif qttype == 'QDomAttr': 1518 elif qttype == 'QDomAttr':
1522 varlist.append(("name", "str", "%s" % unicode(value.name()))) 1519 varlist.append(("name", "str", "%s" % value.name()))
1523 varlist.append(("value", "str", "%s" % unicode(value.value()))) 1520 varlist.append(("value", "str", "%s" % value.value()))
1524 elif qttype == 'QDomCharacterData': 1521 elif qttype == 'QDomCharacterData':
1525 varlist.append(("data", "str", "%s" % unicode(value.data()))) 1522 varlist.append(("data", "str", "%s" % value.data()))
1526 elif qttype == 'QDomComment': 1523 elif qttype == 'QDomComment':
1527 varlist.append(("data", "str", "%s" % unicode(value.data()))) 1524 varlist.append(("data", "str", "%s" % value.data()))
1528 elif qttype == "QDomDocument": 1525 elif qttype == "QDomDocument":
1529 varlist.append(("text", "str", "%s" % unicode(value.toString()))) 1526 varlist.append(("text", "str", "%s" % value.toString()))
1530 elif qttype == 'QDomElement': 1527 elif qttype == 'QDomElement':
1531 varlist.append(("tagName", "str", "%s" % unicode(value.tagName()))) 1528 varlist.append(("tagName", "str", "%s" % value.tagName()))
1532 varlist.append(("text", "str", "%s" % unicode(value.text()))) 1529 varlist.append(("text", "str", "%s" % value.text()))
1533 elif qttype == 'QDomText': 1530 elif qttype == 'QDomText':
1534 varlist.append(("data", "str", "%s" % unicode(value.data()))) 1531 varlist.append(("data", "str", "%s" % value.data()))
1535 1532
1536 # Networking stuff 1533 # Networking stuff
1537 elif qttype == 'QHostAddress': 1534 elif qttype == 'QHostAddress':
1538 varlist.append(("address", "QHostAddress", "%s" % unicode(value.toString()))) 1535 varlist.append(("address", "QHostAddress", "%s" % value.toString()))
1539 1536
1540 return varlist 1537 return varlist
1541 1538
1542 def __formatVariablesList(self, keylist, dict, scope, filter = [], 1539 def __formatVariablesList(self, keylist, dict, scope, filter = [],
1543 formatSequences = 0): 1540 formatSequences = 0):

eric ide

mercurial