本文整理匯總了Python中gobject.GObject.__init__方法的典型用法代碼示例。如果您正苦於以下問題:Python GObject.__init__方法的具體用法?Python GObject.__init__怎麽用?Python GObject.__init__使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類gobject.GObject
的用法示例。
在下文中一共展示了GObject.__init__方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __init__
# 需要導入模塊: from gobject import GObject [as 別名]
# 或者: from gobject.GObject import __init__ [as 別名]
def __init__(self, editor):
GObject.__init__(self)
self.__init_attributes(editor)
from SmartSpace import SmartSpace
SmartSpace(editor, self)
from ConfigurationManager import Manager
Manager(editor, self)
示例2: __init__
# 需要導入模塊: from gobject import GObject [as 別名]
# 或者: from gobject.GObject import __init__ [as 別名]
def __init__(self, editor):
GObject.__init__(self)
self.__init_attributes(editor)
from GUI.Manager import Manager
Manager(self, editor)
from Loader import Loader
Loader(self, editor)
示例3: __init__
# 需要導入模塊: from gobject import GObject [as 別名]
# 或者: from gobject.GObject import __init__ [as 別名]
def __init__ (self, secs, gain, bsecs=-1, minutes=-1):
GObject.__init__(self)
if bsecs < 0: bsecs = secs
if minutes < 0:
minutes = secs / 60
self.minutes = minutes # The number of minutes for the original starting
# time control (not necessarily where the game was resumed,
# i.e. self.intervals[0][0])
self.intervals = [[secs],[bsecs]]
self.gain = gain
self.paused = False
# The left number of secconds at the time pause was turned on
self.pauseInterval = 0
self.counter = None
self.started = False
self.ended = False
self.movingColor = WHITE
self.connect('time_changed', self.__zerolistener, 'time_changed')
self.connect('player_changed', self.__zerolistener, 'player_changed')
self.connect('pause_changed', self.__zerolistener, 'pause_changed')
self.heap = []
示例4: __init__
# 需要導入模塊: from gobject import GObject [as 別名]
# 或者: from gobject.GObject import __init__ [as 別名]
def __init__(self, plugin, frame):
GObject.__init__(self)
PropertyObject.__init__(self)
log.debug('Initializing FreezeFrame ' + frame)
self.plugin = plugin
self._frame = frame
self._pref_cbs = []
self._app_cbs = []
self._notebook_cbs = []
self._queue_cbs = []
self._obd_cbs = []
if plugin.app.prefs.get('imperial', False):
self._unit_standard = 'Imperial'
else:
self._unit_standard = 'Metric'
cb_id = plugin.app.prefs.add_watch('imperial',
self._notify_units_cb)
self._pref_cbs.append(('imperial', cb_id))
self._setup_gui()
self._setup_sensors()
self._get_supported_pids()
示例5: __init__
# 需要導入模塊: from gobject import GObject [as 別名]
# 或者: from gobject.GObject import __init__ [as 別名]
def __init__(self, obd_device):
""" @param obd_device: the OBDDevice to send commands
@param timeout: the time between two commands
"""
GObject.__init__(self)
PropertyObject.__init__(self, obd_device=obd_device)
self._queue = []
self._os_queue = []
示例6: __init__
# 需要導入模塊: from gobject import GObject [as 別名]
# 或者: from gobject.GObject import __init__ [as 別名]
def __init__(self, manager, editor):
GObject.__init__(self)
self.__init_attributes(manager, editor)
self.__signal_id_1 = self.__manager.connect("abbreviations-updated", self.__manager_abbreviations_updated_cb)
self.__signal_id_2 = self.__manager.connect("destroy", self.__monitor_destroy_cb)
self.__signal_id_3 = self.__editor.textview.connect("key-press-event", self.__monitor_key_press_event_cb)
if self.__can_monitor is False:
self.__editor.textview.handle_block(self.__signal_id_3)
示例7: __init__
# 需要導入模塊: from gobject import GObject [as 別名]
# 或者: from gobject.GObject import __init__ [as 別名]
def __init__(self, device):
""" @param device: the OBDDevice to send commands
@param timeout: the time between two commands
"""
GObject.__init__(self)
PropertyObject.__init__(self, device=device)
self._queue = []
self._working = False
示例8: __init__
# 需要導入模塊: from gobject import GObject [as 別名]
# 或者: from gobject.GObject import __init__ [as 別名]
def __init__(self, manager, editor):
GObject.__init__(self)
self.__init_attributes(manager, editor)
self.__sigid1 = manager.connect("destroy", self.__destroy_cb)
from DatabaseUpdater import Updater
Updater(self, editor)
from CheckButton import Button
Button(self, editor)
from DatabaseListener import Listener
Listener(self, editor)
示例9: __init__
# 需要導入模塊: from gobject import GObject [as 別名]
# 或者: from gobject.GObject import __init__ [as 別名]
def __init__(self):
GObject.__init__(self)
from IndexerProcessMonitor import Monitor
Monitor(self)
from DBusService import DBusService
DBusService(self)
from DictionaryGenerator import Generator
Generator(self)
from JobSpooler import Spooler
Spooler(self)
示例10: __init__
# 需要導入模塊: from gobject import GObject [as 別名]
# 或者: from gobject.GObject import __init__ [as 別名]
def __init__(self, app):
GObject.__init__(self)
self.app = app
self._config = ConfigParser()
self._filename = os.path.join(save_config_path("garmon"), "config")
self._config.read(self._filename)
self._dialog = _PrefsDialog()
self._watches = []
示例11: __init__
# 需要導入模塊: from gobject import GObject [as 別名]
# 或者: from gobject.GObject import __init__ [as 別名]
def __init__(self, glade):
GObject.__init__(self)
PropertyObject.__init__(self)
self._code_label = glade.get_widget('code_label')
self._class_label = glade.get_widget('class_label')
self._description_label = glade.get_widget('description_label')
self._additional_textview = glade.get_widget('additional_textview')
self._additional_buffer = gtk.TextBuffer()
self._additional_textview.set_buffer(self._additional_buffer)
示例12: __init__
# 需要導入模塊: from gobject import GObject [as 別名]
# 或者: from gobject.GObject import __init__ [as 別名]
def __init__(self, builder):
GObject.__init__(self)
PropertyObject.__init__(self)
self._code_label = builder.get_object('code_label')
self._class_label = builder.get_object('class_label')
self._description_label = builder.get_object('description_label')
self._additional_textview = builder.get_object('additional_textview')
self._additional_buffer = gtk.TextBuffer()
self._additional_textview.set_buffer(self._additional_buffer)
示例13: __init__
# 需要導入模塊: from gobject import GObject [as 別名]
# 或者: from gobject.GObject import __init__ [as 別名]
def __init__ (self):
GObject.__init__(self)
self.engines = []
self.jsonpath = addUserConfigPrefix("engines.json")
try:
self._engines = json.load(open(self.jsonpath))
except ValueError, e:
log.warn("engineNest: Couldn\'t read engines.json, renamed it to .bak\n%s\n" % (self.jsonpath,e))
os.rename(self.jsonpath, self.jsonpath+".bak")
self._engines = deepcopy(backup)
示例14: __init__
# 需要導入模塊: from gobject import GObject [as 別名]
# 或者: from gobject.GObject import __init__ [as 別名]
def __init__ (self, host, ports, username, password):
GObject.__init__(self)
self.host = host
self.ports = ports
self.username = username
self.password = password
self.connected = False
self.connecting = False
self.predictions = set()
self.predictionsDict = {}
示例15: __init__
# 需要導入模塊: from gobject import GObject [as 別名]
# 或者: from gobject.GObject import __init__ [as 別名]
def __init__ (self, secs, gain):
GObject.__init__(self)
self.intervals = [[secs],[secs]]
self.gain = gain
self.paused = False
# The left number of secconds at the time pause was turned on
self.pauseInterval = 0
self.counter = None
self.started = False
self.movingColor = WHITE