cola.views.drawer – Drawer widget

class cola.views.drawer.Drawer(parent=None, location=0, drawersize=10)

Drawers contain other widgets and show/hide them as a group

Drawers is best used with a DrawerWindow but can be used as a standalone widget. It has four areas it knows about which dictate how the child widgets are laid out an how the drawer is drawn.

You can specify a particular drawer in a stylesheet by using the name syntax as follows

Drawer#left > DrawerHandle Drawer#right > DrawerHandle Drawer#top > DrawerHandle Drawer#bottom > DrawerHandle

add_widget(widget, openmode=False)
add a new widget to the drawer’s layout
close(state)
toggles the open/closed state of the drawer
class cola.views.drawer.DrawerHandle(parent=None)

DrawerHandle is the ‘button’/’handle’ of a Drawer and is ment to be used exclusively by a Drawer. It has several properties that are accessible through a stylesheet. They are as follows

qproperty-open_pixmap : url(path) qproperty-closed_pixmap : url(path) qproperty-hover_open_pixmap : url(path) qproperty-hover_closed_pixmap : url(path)

It also includes all properties you can set on a normal QWidget.

close(close)
closed()
closed_pixmap
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None
designable=True, scriptable=True, stored=True, user=False) -> property attribute

type is the name of a C++ type that be passed to QVariant.nameToType(). freset is a function for resetting an attribute to its default value. designable sets the DESIGNABLE flag (the default is True for writable properties and False otherwise). scriptable sets the SCRIPTABLE flag. stored sets the STORED flag. user sets the USER flag. The other parameters are the same as those required by the standard Python property type. Properties defined using pyqtProperty behave as both Python and Qt properties.

event(event)
hover_closed_pixmap
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None
designable=True, scriptable=True, stored=True, user=False) -> property attribute

type is the name of a C++ type that be passed to QVariant.nameToType(). freset is a function for resetting an attribute to its default value. designable sets the DESIGNABLE flag (the default is True for writable properties and False otherwise). scriptable sets the SCRIPTABLE flag. stored sets the STORED flag. user sets the USER flag. The other parameters are the same as those required by the standard Python property type. Properties defined using pyqtProperty behave as both Python and Qt properties.

hover_open_pixmap
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None
designable=True, scriptable=True, stored=True, user=False) -> property attribute

type is the name of a C++ type that be passed to QVariant.nameToType(). freset is a function for resetting an attribute to its default value. designable sets the DESIGNABLE flag (the default is True for writable properties and False otherwise). scriptable sets the SCRIPTABLE flag. stored sets the STORED flag. user sets the USER flag. The other parameters are the same as those required by the standard Python property type. Properties defined using pyqtProperty behave as both Python and Qt properties.

open_pixmap
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None
designable=True, scriptable=True, stored=True, user=False) -> property attribute

type is the name of a C++ type that be passed to QVariant.nameToType(). freset is a function for resetting an attribute to its default value. designable sets the DESIGNABLE flag (the default is True for writable properties and False otherwise). scriptable sets the SCRIPTABLE flag. stored sets the STORED flag. user sets the USER flag. The other parameters are the same as those required by the standard Python property type. Properties defined using pyqtProperty behave as both Python and Qt properties.

paintEvent(event)
pixmap(state)
set_pixmap(state, pixmap)
setclosed_pixmap(pixmap)
sethover_closed_pixmap(pixmap)
sethover_open_pixmap(pixmap)
setopen_pixmap(pixmap)