コード例 #1
0
 def __init__(self, app):
     super().__init__(app)
     self.login_lineedit = widgets.LineEdit(
         '',
         self,
         400,
         100,
         400,
         100,
     )
     self.login_lineedit.setPlaceholderText('Login')
     self.password_lineedit = widgets.LineEdit(
         '',
         self,
         400,
         100,
         400,
         250,
     )
     self.password_lineedit.setEchoMode(self.password_lineedit.Password)
     self.password_lineedit.setPlaceholderText('Password')
     self.sign_in_btn = widgets.PushButton('Sign In', self, 400, 100, 400,
                                           400, self.sign_in)
     self.go_back_btn = widgets.PushButton('Go Back', self, 400, 100, 400,
                                           550, app.go_back)
コード例 #2
0
ファイル: content_main.py プロジェクト: SanyaShilov/labs
 def __init__(self, app):
     super().__init__(app)
     self.play_btn = widgets.PushButton(
         'Play', self, 400, 100, 400, 100,
         app.go(app.send_want_to_play, app.send_dont_want_to_play))
     self.sign_out_btn = widgets.PushButton('Sign Out', self, 400, 100, 400,
                                            250, app.send_sign_out)
     self.champions_btn = widgets.PushButton('Champions', self, 400, 100,
                                             400, 400, self.show_champions)
コード例 #3
0
 def __init__(self, app):
     super().__init__(app)
     self.sign_in_btn = widgets.PushButton(
         'Sign In', self, 400, 100, 400, 100,
         app.go(app.show_content_sign_in, app.show_content_main_not_signed))
     self.register_btn = widgets.PushButton(
         'Register', self, 400, 100, 400, 250,
         app.go(app.show_content_register,
                app.show_content_main_not_signed))
     self.champions_btn = widgets.PushButton('Champions', self, 400, 100,
                                             400, 400, self.show_champions)
コード例 #4
0
ファイル: content_waiting.py プロジェクト: SanyaShilov/labs
 def __init__(self, app):
     super().__init__(app)
     self.waiting_lbl = widgets.Label('Please, wait...',
                                      self,
                                      400,
                                      100,
                                      400,
                                      100,
                                      alignment='center')
     self.go_back_btn = widgets.PushButton('Go Back', self, 400, 100, 400,
                                           250, app.go_back)
コード例 #5
0
ファイル: content_champions.py プロジェクト: SanyaShilov/labs
 def __init__(self, app):
     super().__init__(app)
     self.table = widgets.Table(self, 822, 400, 200, 100)
     self.table.setColumnCount(4)
     self.table.setHorizontalHeaderLabels(
         ('login', 'wins', 'looses', 'games'))
     for i in range(4):
         self.table.setColumnWidth(i, 200)
     for i, champion in enumerate(self.app.champions):
         self.table.insertRow(i)
         for j, field in enumerate(['login', 'wins', 'looses', 'games']):
             self.table.setItem(i, j, widgets.Item(str(champion[field])))
     self.go_back_btn = widgets.PushButton('Go Back', self, 400, 100, 400,
                                           550, app.go_back)
コード例 #6
0
ファイル: content_game.py プロジェクト: SanyaShilov/labs
    def __init__(self, app):
        super().__init__(app)
        self.app.content_game = self
        self.content = _ContentGame(app, self)
        self.content.move(0, 0)
        self.setFixedSize(self.content.width() + 400, self.content.height())
        self.color_lbl = widgets.Label('({})'.format(app.color),
                                       self,
                                       200,
                                       50,
                                       900,
                                       100,
                                       alignment='center')
        self.vs_lbl = widgets.Label('playing vs.',
                                    self,
                                    200,
                                    50,
                                    900,
                                    150,
                                    alignment='center')
        self.opponent_lbl = widgets.Label(app.opponent,
                                          self,
                                          200,
                                          50,
                                          900,
                                          200,
                                          alignment='center')
        self.opponent_color_lbl = widgets.Label('({})'.format(
            app.opponent_color),
                                                self,
                                                200,
                                                50,
                                                900,
                                                250,
                                                alignment='center')
        self.turn_lbl = widgets.Label('',
                                      self,
                                      200,
                                      50,
                                      900,
                                      400,
                                      alignment='center')

        self.give_up_btn = widgets.PushButton('Give up', self, 200, 100, 900,
                                              600, app.send_give_up)

        self.repaint()