Esempio n. 1
0
    def __init__(self, level=1, title=u'', body=None):
        u"""
		:level:		Level of the dom object
		:title:		Title of the dom object
		:body:		Body of the dom object
		"""
        object.__init__(self)

        self._document = None
        self._parent = None
        self._previous_sibling = None
        self._next_sibling = None
        self._children = MultiPurposeList()
        self._orig_start = None
        self._orig_len = 0

        self._level = level
        # title
        self._title = u''
        if title:
            self.title = title

        # body
        self._dirty_body = False
        self._body = MultiPurposeList(on_change=self.set_dirty_body)
        if body:
            self.body = body
Esempio n. 2
0
	def __init__(self, level=1, title=u'', tags=None, todo=None, body=None,
			active_date=None):
		u"""
		:level:		Level of the heading
		:title:		Title of the heading
		:tags:		Tags of the heading
		:todo:		Todo state of the heading
		:body:		Body of the heading
		:active_date: active date that is used in the agenda
		"""
		object.__init__(self)

		self._document = None
		self._parent = None
		self._previous_sibling = None
		self._next_sibling = None
		self._children = HeadingList(obj=self)
		self._orig_start = None
		self._orig_len = 0

		self._dirty_heading = False
		self._level = level

		# todo
		self._todo = None
		if todo:
			self.todo = todo

		# tags
		self._tags = MultiPurposeList(on_change=self.set_dirty_heading)
		if tags:
			self.tags = tags

		# title
		self._title = u''
		if title:
			self.title = title

		# body
		self._dirty_body = False
		self._body = MultiPurposeList(on_change=self.set_dirty_body)
		if body:
			self.body = body

		# active date
		self._active_date = active_date
		if active_date:
			self.active_date = active_date
Esempio n. 3
0
    def __init__(self):
        u"""
		Don't call this constructor directly but use one of the concrete
		implementations.

		TODO: what are the concrete implementatiions?
		"""
        object.__init__(self)

        # is a list - only the Document methods should work on this list!
        self._content = None
        self._dirty_meta_information = False
        self._dirty_document = False
        self._meta_information = MultiPurposeList(
            on_change=self.set_dirty_meta_information)
        self._orig_meta_information_len = None
        self._headings = HeadingList(obj=self)
        self._deleted_headings = []

        # settings needed to align tags properly
        self._tabstop = 8
        self._tag_column = 77

        # TODO this doesn't differentiate between ACTIVE and FINISHED todo's
        self.todo_states = [u'TODO', u'DONE']
Esempio n. 4
0
	def __init__(self, level=1, title=u'', tags=None, todo=None, body=None, active_date=None):
		u"""
		:level:		Level of the heading
		:title:		Title of the heading
		:tags:		Tags of the heading
		:todo:		Todo state of the heading
		:body:		Body of the heading
		:active_date: active date that is used in the agenda
		"""
		DomObj.__init__(self, level=level, title=title, body=body)

		self._children = HeadingList(obj=self)
		self._dirty_heading = False

		# todo
		self._todo = None
		if todo:
			self.todo = todo

		# tags
		self._tags = MultiPurposeList(on_change=self.set_dirty_heading)
		if tags:
			self.tags = tags

		# active date
		self._active_date = active_date
		if active_date:
			self.active_date = active_date

		# checkboxes
		self._checkboxes = CheckboxList(obj=self)
		self._cached_checkbox = None

		self._logbook = Logbook(obj=self)