Змея / Говнокод #27981 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30
  31. 31
  32. 32
  33. 33
  34. 34
  35. 35
  36. 36
  37. 37
  38. 38
  39. 39
  40. 40
  41. 41
  42. 42
  43. 43
  44. 44
  45. 45
  46. 46
  47. 47
  48. 48
  49. 49
  50. 50
  51. 51
  52. 52
  53. 53
  54. 54
  55. 55
  56. 56
  57. 57
  58. 58
  59. 59
  60. 60
  61. 61
  62. 62
  63. 63
  64. 64
  65. 65
  66. 66
  67. 67
  68. 68
  69. 69
  70. 70
def drawPoints(self, qp):
        pen = QPen()
        if self.flag1:
            color1 = QColor('red')
            pen.setColor(color1)
        if self.flag2:
            color2 = QColor('green')
            pen.setColor(color2)
        if self.flag3:
            color3 = QColor('yellow')
            pen.setColor(color3)
        if self.flag4:
            color4 = QColor('blue')
            pen.setColor(color4)
        if self.flag5:
            color5 = QColor('purple')
            pen.setColor(color5)
        if self.flag6:
            color6 = QColor('brown')
            pen.setColor(color6)
        if self.n_flag:
            pen.setWidth(5)
        if self.n_flag2:
            pen.setWidth(10)
        if self.n_flag3:
            pen.setWidth(15)
        if self.n_flag4:
            pen.setWidth(20)
        qp.setPen(pen)
        qp.drawPoint(QtCore.QPoint(self.point))

    def onClicked(self):
        self.flag1 = True
        self.update()

    def onClicked2(self):
        self.flag2 = True
        self.update()

    def onClicked3(self):
        self.flag3 = True
        self.update()

    def onClicked4(self):
        self.flag4 = True
        self.update()

    def onClicked5(self):
        self.flag5 = True
        self.update()

    def onClicked6(self):
        self.flag6 = True
        self.update()

    def onClicked7(self):
        self.n_flag = True
        self.update()

    def onClicked8(self):
        self.n_flag2 = True
        self.update()

    def onClicked9(self):
        self.n_flag3 = True
        self.update()

    def onClicked10(self):
        self.n_flag4 = True
        self.update()

Больше onClicked БОЛЬШЕ

Запостил: ponos334 ponos334, (Updated )

Комментарии (8) RSS

Добавить комментарий

Где здесь C++, guest?!

    А не использовать ли нам bbcode?


    8