Remove class UnoPage
This commit is contained in:
parent
e8e3bc80a2
commit
f5f53e8ec0
|
@ -813,57 +813,6 @@ class EventsMenu(EventsListenerBase, XMenuListener):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
class UnoTab(UnoBaseObject):
|
|
||||||
|
|
||||||
def _special_properties(self, tipo, properties):
|
|
||||||
columns = properties.pop('Columns', ())
|
|
||||||
if tipo == 'grid':
|
|
||||||
properties['ColumnModel'] = _set_column_model(columns)
|
|
||||||
if not 'Width' in properties:
|
|
||||||
properties['Width'] = self.width
|
|
||||||
if not 'Height' in properties:
|
|
||||||
properties['Height'] = self.height
|
|
||||||
elif tipo == 'button' and 'ImageURL' in properties:
|
|
||||||
properties['ImageURL'] = self._set_image_url(properties['ImageURL'])
|
|
||||||
elif tipo == 'roadmap':
|
|
||||||
if not 'Height' in properties:
|
|
||||||
properties['Height'] = self.height
|
|
||||||
if 'Title' in properties:
|
|
||||||
properties['Text'] = properties.pop('Title')
|
|
||||||
elif tipo == 'pages':
|
|
||||||
if not 'Width' in properties:
|
|
||||||
properties['Width'] = self.width
|
|
||||||
if not 'Height' in properties:
|
|
||||||
properties['Height'] = self.height
|
|
||||||
|
|
||||||
return properties
|
|
||||||
|
|
||||||
def add_control(self, id, properties):
|
|
||||||
tipo = properties.pop('Type').lower()
|
|
||||||
root = properties.pop('Root', '')
|
|
||||||
sheets = properties.pop('Sheets', ())
|
|
||||||
properties = self._special_properties(tipo, properties)
|
|
||||||
|
|
||||||
sheet = self.get_sheet(id)
|
|
||||||
sheet_model = sheet.getModel()
|
|
||||||
model = sheet_model.createInstance(get_control_model(tipo))
|
|
||||||
set_properties(model, properties)
|
|
||||||
name = properties['Name']
|
|
||||||
sheet_model.insertByName(name, model)
|
|
||||||
|
|
||||||
control = sheet.getControl(name)
|
|
||||||
add_listeners(self.events, control, name)
|
|
||||||
control = get_custom_class(tipo, control)
|
|
||||||
|
|
||||||
if tipo == 'tree' and root:
|
|
||||||
control.root = root
|
|
||||||
elif tipo == 'pages' and sheets:
|
|
||||||
control.sheets = sheets
|
|
||||||
|
|
||||||
setattr(self, name, control)
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
class WriterTable(ObjectBase):
|
class WriterTable(ObjectBase):
|
||||||
|
|
||||||
def __init__(self, obj):
|
def __init__(self, obj):
|
||||||
|
|
|
@ -4159,12 +4159,12 @@ class UnoPage(UnoBaseObject):
|
||||||
# ~ def color(self, value):
|
# ~ def color(self, value):
|
||||||
# ~ self.m.BackgroundColor = value
|
# ~ self.m.BackgroundColor = value
|
||||||
|
|
||||||
@property
|
# ~ @property
|
||||||
def enabled(self):
|
# ~ def enabled(self):
|
||||||
return self.m.Enabled
|
# ~ return self.m.Enabled
|
||||||
@enabled.setter
|
# ~ @enabled.setter
|
||||||
def enabled(self, value):
|
# ~ def enabled(self, value):
|
||||||
self.obj.Enable = value
|
# ~ self.obj.Enable = value
|
||||||
|
|
||||||
# ~ @property
|
# ~ @property
|
||||||
# ~ def title(self):
|
# ~ def title(self):
|
||||||
|
|
Loading…
Reference in New Issue