original_docstring: 
      Create all the widgets for the main window which are then put in place in the layout function call.
      
docstring: Create all the widgets for the main window which are then put in place in the layout function call.
docstring_tokens: Create all the widgets for the main window which are then put in place in the layout function call .
code: def buildMainWindow(self):
      """
      Create all the widgets for the main window which are then put in place in the layout function call.
      """
      self.line_buffers = [['' for _ in Cols] for _ in Rows]
  
      self.command_line = QLineEdit(self)
      self.command_line.setStyleSheet(Colors.LineLight)
  
      self.saveButton = QPushButton(' Save ', self)
      self.saveButton.clicked.connect(lambda: Events.save_to_memory(self))
      self.saveButton.setStyleSheet(Colors.ButtonLight)
      self.saveButton.setFont(QFont('Helvetica', 16))
  
      self.hashButton = QPushButton(' Workbench ', self)
      self.hashButton.clicked.connect(lambda: Events.open_cryptography_workbench(self))
      self.hashButton.setStyleSheet(Colors.ButtonLight)
      self.hashButton.setFont(QFont('Helvetica', 16))
  
      def f(self, i, j, text):
          self.line_buffers[i][j] = text
      self.lines = [[QLineEdit(self) for i in Cols] for j in Rows]
      self.lines[0][0].textChanged[str].connect(lambda text: f(self, 0, 0, text))
      self.lines[1][0].textChanged[str].connect(lambda text: f(self, 1, 0, text))
      self.lines[2][0].textChanged[str].connect(lambda text: f(self, 2, 0, text))
      self.lines[3][0].textChanged[str].connect(lambda text: f(self, 3, 0, text))
      self.lines[0][1].textChanged[str].connect(lambda text: f(self, 0, 1, text))
      self.lines[1][1].textChanged[str].connect(lambda text: f(self, 1, 1, text))
      self.lines[2][1].textChanged[str].connect(lambda text: f(self, 2, 1, text))
      self.lines[3][1].textChanged[str].connect(lambda text: f(self, 3, 1, text))
  
      def g(self, i, j):
          self.command_line.setText(self.line_buffers[i][j])
      self.line_buttons = [[QPushButton('', self) for i in Cols] for j in Rows]
      self.line_buttons[0][0].clicked.connect(lambda: g(self, 0, 0))
      self.line_buttons[1][0].clicked.connect(lambda: g(self, 1, 0))
      self.line_buttons[2][0].clicked.connect(lambda: g(self, 2, 0))
      self.line_buttons[3][0].clicked.connect(lambda: g(self, 3, 0))
      self.line_buttons[0][1].clicked.connect(lambda: g(self, 0, 1))
      self.line_buttons[1][1].clicked.connect(lambda: g(self, 1, 1))
      self.line_buttons[2][1].clicked.connect(lambda: g(self, 2, 1))
      self.line_buttons[3][1].clicked.connect(lambda: g(self, 3, 1))
  
      with open(Memory, 'r') as json_file:
          memory_lines = json.load(json_file)['lines']
          for i in Rows:
              for j in Cols:
                  line = memory_lines[i][j]
                  self.lines[i][j].setText(line)
                  self.lines[i][j].setStyleSheet(Colors.LineDark)
                  self.line_buttons[i][j].setStyleSheet(Colors.ButtonDark)
                  
      self.command_line.setText('')
code_tokens: def buildMainWindow ( self ) : self . line_buffers = [ [ '' for _ in Cols ] for _ in Rows ] self . command_line = QLineEdit ( self ) self . command_line . setStyleSheet ( Colors . LineLight ) self . saveButton = QPushButton ( ' Save ' , self ) self . saveButton . clicked . connect ( lambda : Events . save_to_memory ( self ) ) self . saveButton . setStyleSheet ( Colors . ButtonLight ) self . saveButton . setFont ( QFont ( 'Helvetica' , 16 ) ) self . hashButton = QPushButton ( ' Workbench ' , self ) self . hashButton . clicked . connect ( lambda : Events . open_cryptography_workbench ( self ) ) self . hashButton . setStyleSheet ( Colors . ButtonLight ) self . hashButton . setFont ( QFont ( 'Helvetica' , 16 ) ) def f ( self , i , j , text ) : self . line_buffers [ i ] [ j ] = text self . lines = [ [ QLineEdit ( self ) for i in Cols ] for j in Rows ] self . lines [ 0 ] [ 0 ] . textChanged [ str ] . connect ( lambda text : f ( self , 0 , 0 , text ) ) self . lines [ 1 ] [ 0 ] . textChanged [ str ] . connect ( lambda text : f ( self , 1 , 0 , text ) ) self . lines [ 2 ] [ 0 ] . textChanged [ str ] . connect ( lambda text : f ( self , 2 , 0 , text ) ) self . lines [ 3 ] [ 0 ] . textChanged [ str ] . connect ( lambda text : f ( self , 3 , 0 , text ) ) self . lines [ 0 ] [ 1 ] . textChanged [ str ] . connect ( lambda text : f ( self , 0 , 1 , text ) ) self . lines [ 1 ] [ 1 ] . textChanged [ str ] . connect ( lambda text : f ( self , 1 , 1 , text ) ) self . lines [ 2 ] [ 1 ] . textChanged [ str ] . connect ( lambda text : f ( self , 2 , 1 , text ) ) self . lines [ 3 ] [ 1 ] . textChanged [ str ] . connect ( lambda text : f ( self , 3 , 1 , text ) ) def g ( self , i , j ) : self . command_line . setText ( self . line_buffers [ i ] [ j ] ) self . line_buttons = [ [ QPushButton ( '' , self ) for i in Cols ] for j in Rows ] self . line_buttons [ 0 ] [ 0 ] . clicked . connect ( lambda : g ( self , 0 , 0 ) ) self . line_buttons [ 1 ] [ 0 ] . clicked . connect ( lambda : g ( self , 1 , 0 ) ) self . line_buttons [ 2 ] [ 0 ] . clicked . connect ( lambda : g ( self , 2 , 0 ) ) self . line_buttons [ 3 ] [ 0 ] . clicked . connect ( lambda : g ( self , 3 , 0 ) ) self . line_buttons [ 0 ] [ 1 ] . clicked . connect ( lambda : g ( self , 0 , 1 ) ) self . line_buttons [ 1 ] [ 1 ] . clicked . connect ( lambda : g ( self , 1 , 1 ) ) self . line_buttons [ 2 ] [ 1 ] . clicked . connect ( lambda : g ( self , 2 , 1 ) ) self . line_buttons [ 3 ] [ 1 ] . clicked . connect ( lambda : g ( self , 3 , 1 ) ) with open ( Memory , 'r' ) as json_file : memory_lines = json . load ( json_file ) [ 'lines' ] for i in Rows : for j in Cols : line = memory_lines [ i ] [ j ] self . lines [ i ] [ j ] . setText ( line ) self . lines [ i ] [ j ] . setStyleSheet ( Colors . LineDark ) self . line_buttons [ i ] [ j ] . setStyleSheet ( Colors . ButtonDark ) self . command_line . setText ( '' )
short_docstring: Create all the widgets for the main window which are then put in place in the layout function call.
short_docstring_tokens: Create all the widgets for the main window which are then put in place in the layout function call .
comment: """
      Create all the widgets for the main window which are then put in place in the layout function call.
      """