2006-12-13 22:36:05 +01:00
|
|
|
class ClipboardObject:
|
2007-03-14 05:50:06 +01:00
|
|
|
def __init__(self, object_path, name):
|
|
|
|
self._id = object_path
|
2006-12-13 22:36:05 +01:00
|
|
|
self._name = name
|
|
|
|
self._percent = 0
|
|
|
|
self._formats = {}
|
2007-03-14 05:50:06 +01:00
|
|
|
|
2006-12-13 22:36:05 +01:00
|
|
|
def get_id(self):
|
|
|
|
return self._id
|
2007-01-05 21:13:46 +01:00
|
|
|
|
2006-12-13 22:36:05 +01:00
|
|
|
def get_name(self):
|
2007-04-11 16:14:58 +02:00
|
|
|
return self._name
|
2007-01-05 21:13:46 +01:00
|
|
|
|
2006-12-13 22:36:05 +01:00
|
|
|
def get_percent(self):
|
|
|
|
return self._percent
|
|
|
|
|
|
|
|
def set_percent(self, percent):
|
|
|
|
self._percent = percent
|
|
|
|
|
|
|
|
def add_format(self, format):
|
|
|
|
self._formats[format.get_type()] = format
|
|
|
|
|
|
|
|
def get_formats(self):
|
|
|
|
return self._formats
|
2007-01-05 21:13:46 +01:00
|
|
|
|
2006-12-13 22:36:05 +01:00
|
|
|
class Format:
|
|
|
|
def __init__(self, type, data, on_disk):
|
|
|
|
self._type = type
|
|
|
|
self._data = data
|
|
|
|
self._on_disk = on_disk
|
|
|
|
|
|
|
|
def get_type(self):
|
|
|
|
return self._type
|
|
|
|
|
|
|
|
def get_data(self):
|
|
|
|
return self._data
|
2007-03-14 18:04:10 +01:00
|
|
|
|
|
|
|
def _set_data(self, data):
|
|
|
|
self._data = data
|
|
|
|
|
|
|
|
def get_on_disk(self):
|
|
|
|
return self._on_disk
|