當前位置: 首頁>>代碼示例>>Python>>正文


Python GObject.__init__方法代碼示例

本文整理匯總了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)
開發者ID:mystilleef,項目名稱:scribes,代碼行數:9,代碼來源:Manager.py

示例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)
開發者ID:mystilleef,項目名稱:scribes,代碼行數:9,代碼來源:Manager.py

示例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 = []
開發者ID:btrent,項目名稱:knave,代碼行數:28,代碼來源:TimeModel.py

示例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()
開發者ID:benvm,項目名稱:garmon,代碼行數:28,代碼來源:freeze_frame_data.py

示例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 = []
開發者ID:bwhitelock,項目名稱:garmon-ng,代碼行數:10,代碼來源:scheduler.py

示例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)
開發者ID:mystilleef,項目名稱:scribes,代碼行數:10,代碼來源:Monitor.py

示例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
開發者ID:benvm,項目名稱:garmon,代碼行數:11,代碼來源:command_queue.py

示例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)
開發者ID:mystilleef,項目名稱:scribes,代碼行數:12,代碼來源:Manager.py

示例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)
開發者ID:baverman,項目名稱:scribes-goodies,代碼行數:12,代碼來源:IndexerManager.py

示例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 = []
開發者ID:benvm,項目名稱:garmon,代碼行數:13,代碼來源:preferences.py

示例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)
開發者ID:bwhitelock,項目名稱:garmon-ng,代碼行數:13,代碼來源:dtc_reader.py

示例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)
開發者ID:benvm,項目名稱:garmon,代碼行數:13,代碼來源:dtc_reader.py

示例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)
開發者ID:btrent,項目名稱:knave,代碼行數:14,代碼來源:engineNest.py

示例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 = {}
開發者ID:jskurka,項目名稱:PyChess-Learning-Module,代碼行數:15,代碼來源:FICSConnection.py

示例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
開發者ID:xaosfiftytwo,項目名稱:veinsbot,代碼行數:16,代碼來源:TimeModel.py


注:本文中的gobject.GObject.__init__方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。