def __init__(self, model, key_size=None, padding=5, allow_uppercase=True, allow_special_chars=True, allow_space=True):
        """Default constructor. Initializes layout rows.
        
        :param model: Layout model to use.
        :param key_size Size of the key, if not specified will be computed dynamically.
        :param padding: Padding between key (work horizontally as vertically).
        :param allowUpperCase: Boolean flag that indicates usage of upper case switching key.
        :param allowSpecialChars: Boolean flag that indicates usage of special char switching key.
        :param allowSpace: Boolean flag that indicates usage of space bar.
        """
        self.rows = []
        self.key_size = key_size
        self.padding = padding
        self.allow_space = allow_space
        self.allow_uppercase = allow_uppercase
        self.allow_special_chars = allow_special_chars
        for model_row in model:
            row = VKeyRow()
            for value in model_row:
                row.add_key(VKey(value))
            self.rows.append(row)
        self.max_length = len(max(self.rows, key=len))
        if self.max_length == 0:
            raise ValueError('Empty layout model provided')
def __init__ ( self , model , key_size = None , padding = 5 , allow_uppercase = True , allow_special_chars = True , allow_space = True ) : self . rows = [ ] self . key_size = key_size self . padding = padding self . allow_space = allow_space self . allow_uppercase = allow_uppercase self . allow_special_chars = allow_special_chars for model_row in model : row = VKeyRow ( ) for value in model_row : row . add_key ( VKey ( value ) ) self . rows . append ( row ) self . max_length = len ( max ( self . rows , key = len ) ) if self . max_length == 0 : raise ValueError ( 'Empty layout model provided' )
Default constructor. Initializes layout rows.
        
        :param model: Layout model to use.
        :param key_size Size of the key, if not specified will be computed dynamically.
        :param padding: Padding between key (work horizontally as vertically).
        :param allowUpperCase: Boolean flag that indicates usage of upper case switching key.
        :param allowSpecialChars: Boolean flag that indicates usage of special char switching key.
        :param allowSpace: Boolean flag that indicates usage of space bar.