当前位置: 首页>>代码示例>>Python>>正文


Python QtUiTools.QUiLoader类代码示例

本文整理汇总了Python中PythonQt.QtUiTools.QUiLoader的典型用法代码示例。如果您正苦于以下问题:Python QUiLoader类的具体用法?Python QUiLoader怎么用?Python QUiLoader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了QUiLoader类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

    def __init__(self, uistring, queue, endApplication, controller):
        self.controller = controller
        loader = QUiLoader()
        uifile = QFile(uistring)
        ui = loader.load(uifile)
        self.gui = ui
        width = ui.size.width()
        height = ui.size.height()

        uism = naali.ui

        # uiprops = r.createUiWidgetProperty(1) #1 is ModuleWidget, shown at toolbar
        # uiprops.SetMenuGroup(2) #2 is server tools group
        # uiprops.widget_name_ = "Local Scene"

        #uiprops.my_size_ = QSize(width, height) #not needed anymore, uimodule reads it
        #self.proxywidget = r.createUiProxyWidget(ui, uiprops)

        self.proxywidget = r.createUiProxyWidget(ui)

        #if not uism.AddProxyWidget(self.proxywidget):
        if not uism.AddWidgetToScene(self.proxywidget):
            r.logInfo("Adding the ProxyWidget to the bar failed.")

        # TODO: Due to core UI API refactor AddWidgetToMenu doesn't exist anymore.
        #uism.AddWidgetToMenu(self.proxywidget, "Local Scene", "Server Tools", "./data/ui/images/menus/edbutton_LSCENE_normal.png")

        self.inputQueue = queue
        self.endApplication = endApplication

        self.tableitems = []

        pass
开发者ID:A-K,项目名称:naali,代码行数:33,代码来源:window.py

示例2: __init__

	def __init__(self):
		uil = QUiLoader()
		self.settingsDialog = uil.load(QFile(workingDir + "/settings.ui"))
		self.settingsDialog.group_account.button_authenticate.connect("clicked()", self.startAuthenticationProcess)
		self.settingsDialog.group_account.widget_loggedIn.button_logout.connect("clicked()", self.logOut)
		self.settingsDialog.group_name.input_name.connect("textChanged(QString)", self.nameFormatEdited)
		self.loadSettings()
开发者ID:Nothing4You,项目名称:screencloud-plugins,代码行数:7,代码来源:main.py

示例3: ShellUploader

class ShellUploader():
	def __init__(self):
		self.uil = QUiLoader()
		
	def showSettingsUI(self, parentWidget):
		self.parentWidget = parentWidget
		self.settingsDialog = self.uil.load(QFile(workingDir + "/settings.ui"), parentWidget)
		self.settingsDialog.connect("accepted()", self.saveSettings)
		self.loadSettings()
		self.settingsDialog.group_shell.input_command.text = self.commandFormat
		self.settingsDialog.open()

	def loadSettings(self):
		settings = QSettings()
		settings.beginGroup("uploaders")
		settings.beginGroup("shell")
		self.commandFormat = settings.value("command", "")
		settings.endGroup()
		settings.endGroup()

	def saveSettings(self):
		settings = QSettings()
		settings.beginGroup("uploaders")
		settings.beginGroup("shell")
		settings.setValue("command", self.settingsDialog.group_shell.input_command.text)
		settings.endGroup()
		settings.endGroup()
	
	def isConfigured(self):
		self.loadSettings()
		if not self.commandFormat:
			return False
		return True

	def getFilename(self):
		timestamp = time.time()
		return ScreenCloud.formatFilename(str(timestamp))
	      
	def upload(self, screenshot, name):
		self.loadSettings()
		tmpFilename = QDesktopServices.storageLocation(QDesktopServices.TempLocation) + "/" + name
		screenshot.save(QFile(tmpFilename), ScreenCloud.getScreenshotFormat())
		command = string.Formatter().vformat(self.commandFormat, (), defaultdict(str, s = tmpFilename))
		try:
			command = command.encode(sys.getfilesystemencoding())
		except UnicodeEncodeError:
			ScreenCloud.setError("Invalid characters in command '" + command + "'")
			return False
		try:
			p = subprocess.Popen(command.split())
			p.wait()
			if p.returncode > 0:
				ScreenCloud.setError("Command " + command + " did not return 0")
				return False

		except OSError:
			ScreenCloud.setError("Failed to run command " + command)
			return False
			
		return True
开发者ID:SilverCory,项目名称:screencloud-plugins,代码行数:60,代码来源:main.py

示例4: __init__

    def __init__(self):
        self.sels = []  
        Component.__init__(self)
        self.window = window.ObjectEditWindow(self)
        self.resetValues()
        self.worldstream = r.getServerConnection()
        
        self.mouse_events = {
            #r.LeftMouseClickPressed: self.LeftMousePressed,
            r.InWorldClick: self.LeftMousePressed,
            r.LeftMouseClickReleased: self.LeftMouseReleased,  
            r.RightMouseClickPressed: self.RightMousePressed,
            r.RightMouseClickReleased: self.RightMouseReleased
        }

        self.shortcuts = {
            #r.PyObjectEditDeselect: self.deselect,
            r.PyObjectEditToggleMove: self.window.manipulator_move,#"ALT+M", #move
            r.PyObjectEditToggleScale: self.window.manipulator_scale,#"ALT+S" #, #scale
            r.Delete: self.deleteObject,
            r.Undo: self.undo, 
            r.PyDuplicateDrag: self.duplicateStart, 
            r.ObjectLink: self.linkObjects,
            r.ObjectUnlink: self.unlinkObjects,
        }
        
        self.resetManipulators()
        
        loader = QUiLoader()
        selectionfile = QFile(self.SELECTIONRECT)
        self.selection_rect = loader.load(selectionfile)
        rectprops = r.createUiWidgetProperty(2)
        #~ print type(rectprops), dir(rectprops)
        #print rectprops.WidgetType
        #uiprops.widget_name_ = "Selection Rect"
        
        #uiprops.my_size_ = QSize(width, height) #not needed anymore, uimodule reads it
        proxy = r.createUiProxyWidget(self.selection_rect, rectprops)
        uism = r.getUiSceneManager()
        uism.AddProxyWidget(proxy)
        proxy.setWindowFlags(0) #changing it to Qt::Widget
        
        self.selection_rect.setGeometry(0,0,0,0)
        self.selection_rect_startpos = None
        
        r.c = self #this is for using objectedit from command.py
开发者ID:caocao,项目名称:naali,代码行数:46,代码来源:objectedit.py

示例5: __init__

    def __init__(self):
        Component.__init__(self)

        loader = QUiLoader()
        uism = r.getUiSceneManager()

        uifile = QFile(UIFILELOC)
        self.widget = loader.load(uifile)
        uism.SetDemoLoginWidget(self.widget)

        def make_worldlogin(w):
            def worldlogin():
                self.login(w)
            return worldlogin

        for w in self.WORLDS:
            but = getattr(self.widget, w.butname)
            but.connect('clicked()', make_worldlogin(w))       
开发者ID:A-K,项目名称:naali,代码行数:18,代码来源:anonlogin.py

示例6: ZapierUploader

class ZapierUploader():
	def __init__(self):
		self.uil = QUiLoader()
		self.loadSettings()

	def loadSettings(self):
		settings = QSettings()
		settings.beginGroup("uploaders")
		settings.beginGroup("zapier")
		self.zapier_url = settings.value("url", "")
		settings.endGroup()
		settings.endGroup()

	def saveSettings(self):
		self.zapier_url = self.settingsDialog.group_url.widget_url.input_url.text
		settings = QSettings()
		settings.beginGroup("uploaders")
		settings.beginGroup("zapier")
		settings.setValue("url", self.zapier_url)
		settings.endGroup()
		settings.endGroup()

	def isConfigured(self):
		return bool(self.zapier_url.strip())

	def getFilename(self):
		return ScreenCloud.formatFilename("screenshot")

	def showSettingsUI(self, parentWidget):
		self.settingsDialog = self.uil.load(QFile(workingDir + "/settings.ui"), parentWidget)
		self.settingsDialog.connect("accepted()", self.saveSettings)
		self.settingsDialog.setWindowTitle("Zapier settings");
		self.settingsDialog.group_url.widget_url.input_url.setText(self.zapier_url)
		self.settingsDialog.adjustSize()
		self.settingsDialog.open()

	def upload(self, screenshot, name):
		ba = QByteArray()
		buf = QBuffer(ba)
		buf.open(QIODevice.WriteOnly)
		screenshot.save( buf, ScreenCloud.getScreenshotFormat() ) #writes image into ba
		buf.close()

		json_data = json.dumps({'image': ba.toBase64().data()})
		request = urllib2.Request(self.zapier_url, json_data, {"Content-Type": "application/json"})
		try:
			reply = urllib2.urlopen(request)
		except Exception as e:
			ScreenCloud.setError("Could not upload to: "+ self.zapier_url + "\n" + e.message)
			return False
		try:
			replyText = reply.read()
			ScreenCloud.setUrl(json.loads(replyText).link)
		except Exception as e:
			ScreenCloud.setError("Could not upload to: "+ self.zapier_url + "\n" + e.message)
			return False
		return True
开发者ID:olav-st,项目名称:zapier-screencloud,代码行数:57,代码来源:main.py

示例7: __init__

	def __init__(self):
		try:
			tempLocation = QDesktopServices.storageLocation(QDesktopServices.TempLocation)
		except AttributeError:
			from PythonQt.QtCore import QStandardPaths #fix for Qt5
			tempLocation = QStandardPaths.writableLocation(QStandardPaths.TempLocation)

		paramiko.util.log_to_file(tempLocation + "/screencloud-sftp.log")
		self.uil = QUiLoader()
		self.loadSettings()
开发者ID:SpiderX,项目名称:screencloud-plugins,代码行数:10,代码来源:main.py

示例8: createWidget

    def createWidget(self, clsname, parent=None, name=''):
        if parent is None:
            return self.main
        else:
            if self.extraWidgets:
                for w in self.extraWidgets:
                    if w.__name__ == clsname:
                        obj = w(parent)
                        obj.setObjectName(name)
                        return obj

            return QUiLoader.createWidget(self, clsname, parent, name)
开发者ID:pathmann,项目名称:pyTSon,代码行数:12,代码来源:__init__.py

示例9: dir

    #print dir(box.treeWidget)

if 0:
    box = r.c.widget
    #print box, dir(box.treeWidget)
    text = box.treeWidget.currentItem().text(0)
    print text
    print type(text), r.c.widgetList
    print r.c.widgetList[720010]

if 0: #QtUI::UICanvas::External ?! not here...
    from PythonQt.QtUiTools import QUiLoader
    from PythonQt.QtCore import QFile, QIODevice
    #print dir(quil)  
    #print dir(PythonQt.QtCore.QIODevice)
    loader = QUiLoader()
    canvas = r.createCanvas(0)
    
    file = QFile("pymodules/usr/editobject.ui")
    iodev = QIODevice(file)

    widget = loader.load(file)
    canvas.AddWidget(widget)
    canvas.Show()
    
if 0: #collada load testing
    import collada
    print collada.Collada
    try:
        pycollada_test
    except:
开发者ID:Chiru,项目名称:naali,代码行数:31,代码来源:command.py

示例10: ZapierUploader

class ZapierUploader():

    def __init__(self):
        self.uil = QUiLoader()
        self.loadSettings()

    def isConfigured(self):
        self.loadSettings()
        return bool(self.zapier_url.strip())

    def getFilename(self):
        return ScreenCloud.formatFilename("screenshot")

    def showSettingsUI(self, parentWidget):
        self.parent_widget = parentWidget
        self.settings_widget = self.uil.load(QFile(workingDir + "/settings.ui"), parentWidget)
        self.settings_widget.connect("accepted()", self.saveSettings)
        self.settings_widget.setWindowTitle("Zapier settings")
        self.settings_widget.group_url.widget_url.input_url.setText(self.zapier_url)
        self.settings_widget.adjustSize()
        self.settings_widget.open()

    def upload(self, screenshot, name):
        q_byte_array = QByteArray()
        q_buffer = QBuffer(q_byte_array)
        q_buffer.open(QIODevice.WriteOnly)
        screenshot.save(q_buffer, ScreenCloud.getScreenshotFormat()) # writes image to byte array
        q_buffer.close()

        json_data = json.dumps({'image': str(q_byte_array.toBase64())})
        #f = open('/tmp/zapier', 'w')
        #f.write("{}\n{}\n\n".format(self.zapier_url, json_data))
        #f.close()
        response = requests.post(url=self.zapier_url,
                                 data=json_data,
                                 headers={'Content-Type': 'application/json'})

        try:
            response.raise_for_status()
        except Exception as e:
            ScreenCloud.setError("Could not upload to: " + self.zapier_url + "\n" + e.message)
            return False

        try:
            ScreenCloud.setUrl(response.json()['link'])
        except Exception as e:
            ScreenCloud.setError("Upload to {} worked, but response was invalid: {}\n{}".format(self.zapier_url, response.content, e.message))
            return False

        return True

    def loadSettings(self):
        settings = QSettings()
        settings.beginGroup("uploaders")
        settings.beginGroup("zapier")
        self.zapier_url = settings.value("url", "")
        settings.endGroup()
        settings.endGroup()

    def saveSettings(self):
        self.zapier_url = self.settings_widget.group_url.widget_url.input_url.text
        settings = QSettings()

        settings.beginGroup("uploaders")
        settings.beginGroup("zapier")
        settings.setValue("url", self.zapier_url)
        settings.endGroup()
        settings.endGroup()
开发者ID:bcooksey,项目名称:zapier-screencloud,代码行数:68,代码来源:main.py

示例11: __init__

    def __init__(self):
        self.sels = []  
        Component.__init__(self)
        self.window = window.ObjectEditWindow(self)
        self.resetValues()
        self.worldstream = r.getServerConnection()
        self.usingManipulator = False
        self.useLocalTransform = False
        self.cpp_python_handler = None
        self.left_button_down = False
        self.keypressed = False

        self.shortcuts = {
            (Qt.Key_Z, Qt.ControlModifier) : self.undo,
            (Qt.Key_Delete, Qt.NoModifier) : self.deleteObject,
            (Qt.Key_L, Qt.AltModifier) : self.linkObjects,
            (Qt.Key_L, Qt.ControlModifier|Qt.ShiftModifier) : self.unlinkObjects,
        }

        # Connect to key pressed signal from input context
        self.edit_inputcontext = naali.createInputContext("object-edit", 100)
        self.edit_inputcontext.SetTakeMouseEventsOverQt(True)
        self.edit_inputcontext.connect('KeyPressed(KeyEvent*)', self.on_keypressed)

        # Connect to mouse events
        self.edit_inputcontext.connect('MouseScroll(MouseEvent*)', self.on_mousescroll)
        self.edit_inputcontext.connect('MouseLeftPressed(MouseEvent*)', self.on_mouseleftpressed)
        self.edit_inputcontext.connect('MouseLeftReleased(MouseEvent*)', self.on_mouseleftreleased)
        self.edit_inputcontext.connect('MouseMove(MouseEvent*)', self.on_mousemove)
        
        self.resetManipulators()
        
        loader = QUiLoader()
        selectionfile = QFile(self.SELECTIONRECT)
        self.selection_rect = loader.load(selectionfile)
        #rectprops = r.createUiWidgetProperty(2)
        #~ print type(rectprops), dir(rectprops)
        #print rectprops.WidgetType
        #uiprops.widget_name_ = "Selection Rect"
        
        #uiprops.my_size_ = QSize(width, height) #not needed anymore, uimodule reads it
        proxy = r.createUiProxyWidget(self.selection_rect)
        uism = r.getUiSceneManager()
        uism.AddWidgetToScene(proxy)
        proxy.setWindowFlags(0) #changing it to Qt::Widget
        
        self.selection_rect.setGeometry(0,0,0,0)
        self.selection_rect_startpos = None
        
        r.c = self #this is for using objectedit from command.py
        
        # Get world building modules python handler
        self.cpp_python_handler = r.getQWorldBuildingHandler()
        if self.cpp_python_handler == None:
            r.logDebug("Could not aqquire world building service to object edit")
        else:
            # Connect signals
            self.cpp_python_handler.connect('ActivateEditing(bool)', self.on_activate_editing)
            self.cpp_python_handler.connect('ManipulationMode(int)', self.on_manupulation_mode_change)
            self.cpp_python_handler.connect('RemoveHightlight()', self.deselect_all)
            self.cpp_python_handler.connect('RotateValuesToNetwork(int, int, int)', self.changerot_cpp)
            self.cpp_python_handler.connect('ScaleValuesToNetwork(double, double, double)', self.changescale_cpp)
            self.cpp_python_handler.connect('PosValuesToNetwork(double, double, double)', self.changepos_cpp)
            self.cpp_python_handler.connect('CreateObject()', self.createObject)
            self.cpp_python_handler.connect('DuplicateObject()', self.duplicate)
            self.cpp_python_handler.connect('DeleteObject()', self.deleteObject)
            # Pass widgets
            self.cpp_python_handler.PassWidget("Mesh", self.window.mesh_widget)
            self.cpp_python_handler.PassWidget("Animation", self.window.animation_widget)
            self.cpp_python_handler.PassWidget("Sound", self.window.sound_widget)
            self.cpp_python_handler.PassWidget("Materials", self.window.materialTabFormWidget)
            # Check if build mode is active, required on python restarts
            self.on_activate_editing(self.cpp_python_handler.IsBuildingActive())
开发者ID:Chiru,项目名称:naali,代码行数:73,代码来源:objectedit.py

示例12: __init__

	def __init__(self):
		self.uil = QUiLoader()
开发者ID:olav-st,项目名称:screencloud-plugins,代码行数:2,代码来源:main.py

示例13: ImgurUploader

class ImgurUploader():
	def __init__(self):
		self.uil = QUiLoader()
		self.loadSettings()
		
	def showSettingsUI(self, parentWidget):
		self.parentWidget = parentWidget
		self.settingsDialog = self.uil.load(QFile(workingDir + "/settings.ui"), parentWidget)
		self.settingsDialog.group_account.button_authenticate.connect("clicked()", self.startAuthenticationProcess)
		self.settingsDialog.group_account.widget_loggedIn.button_logout.connect("clicked()", self.logOut)
		self.settingsDialog.group_name.input_name.connect("textChanged(QString)", self.nameFormatEdited)
		self.settingsDialog.connect("accepted()", self.saveSettings)
		
		self.loadSettings()
		self.settingsDialog.group_clipboard.radio_dontcopy.setChecked(not self.copyLink)
		self.settingsDialog.group_clipboard.radio_directlink.setChecked(self.copyDirectLink)
		self.updateUi()
		self.settingsDialog.open()

	def updateUi(self):
		#self.loadSettings()
		if self.access_token and self.refresh_token:
			self.settingsDialog.group_account.widget_loggedIn.show()
			self.settingsDialog.group_account.button_authenticate.hide()
			self.settingsDialog.group_account.radio_account.setChecked(True)
			self.settingsDialog.group_account.widget_loggedIn.label_user.setText(self.username)
		else:
			self.settingsDialog.group_account.widget_loggedIn.hide()
			self.settingsDialog.group_account.button_authenticate.show()
		if self.uploadAnon and self.settingsDialog.group_clipboard.radio_dontcopy.checked:
			self.settingsDialog.group_clipboard.radio_imgur.setChecked(True)
		self.settingsDialog.group_account.radio_anon.setChecked(self.uploadAnon)
		self.settingsDialog.group_name.input_name.setText(self.nameFormat)
		self.settingsDialog.adjustSize()

	def loadSettings(self):
		settings = QSettings()
		settings.beginGroup("uploaders")
		settings.beginGroup("imgur")
		self.uploadAnon = settings.value("anonymous", "true") in ['true', True]
		self.copyLink = settings.value("copy-link", "true") in ['true', True]
		self.copyDirectLink = settings.value("copy-direct-link", "false") in ['true', True]
		self.access_token = settings.value("access-token", "")
		self.refresh_token = settings.value("refresh-token", "")
		self.nameFormat = settings.value("name-format", "Screenshot at %H:%M:%S")
		self.username = settings.value("username", "")
		settings.endGroup()
		settings.endGroup()
		if self.uploadAnon:
			self.imgur = pyimgur.Imgur("7163c05b94dcf99")
		else:
			self.imgur = pyimgur.Imgur("7163c05b94dcf99", "5132015d173997bbb52e1d9e093d882abed8d9f1", self.access_token, self.refresh_token)

	def saveSettings(self):
		settings = QSettings()
		settings.beginGroup("uploaders")
		settings.beginGroup("imgur")
		settings.setValue("anonymous", self.settingsDialog.group_account.radio_anon.checked)
		settings.setValue("copy-link", not self.settingsDialog.group_clipboard.radio_dontcopy.checked)
		settings.setValue("copy-direct-link", self.settingsDialog.group_clipboard.radio_directlink.checked)
		settings.setValue("access-token", self.access_token)
		settings.setValue("refresh-token", self.refresh_token)
		settings.setValue("name-format", self.settingsDialog.group_name.input_name.text)
		settings.setValue("username", self.username)
		settings.endGroup()
		settings.endGroup()
	
	def isConfigured(self):
		self.loadSettings()
		if self.uploadAnon:
			return True
		else:
			return self.access_token and self.refresh_token

	def getFilename(self):
		self.loadSettings()
		return ScreenCloud.formatFilename(self.nameFormat)
	      
	def upload(self, screenshot, name):
		self.loadSettings()
		#Make sure we have a up to date token
		if not self.uploadAnon:
			self.imgur.refresh_access_token()
		#Save to a temporary file
		timestamp = time.time()
		tmpFilename = QDesktopServices.storageLocation(QDesktopServices.TempLocation) + "/" + ScreenCloud.formatFilename(str(timestamp))
		screenshot.save(QFile(tmpFilename), ScreenCloud.getScreenshotFormat())
		#Upload!
		try:
			uploaded_image = self.imgur.upload_image(tmpFilename, title=ScreenCloud.formatFilename(name, False))
		except Exception as e:
			ScreenCloud.setError("Failed to upload to imgur. " + e.message)
			return False
		if self.copyLink:
			if self.copyDirectLink:
				ScreenCloud.setUrl(uploaded_image.link)
			else:
				ScreenCloud.setUrl("https://imgur.com/" + uploaded_image.id)
		return True

#.........这里部分代码省略.........
开发者ID:Rocik,项目名称:screencloud-plugins,代码行数:101,代码来源:main.py

示例14: __init__

	def __init__(self):
		self.uil = QUiLoader()
		self.loadSettings()
		if self.access_token:
			self.client = dropbox.client.DropboxClient(self.access_token)
开发者ID:teryanik,项目名称:screencloud-plugins,代码行数:5,代码来源:main.py

示例15: __init__

    def __init__(self, controller, queue):
        loader = QUiLoader()
        loader.setLanguageChangeEnabled(True)
        # uifile = QFile("pymodules/estatemanagement/estatemanagement.ui")
        uifile = QFile(EstateManagementWindow.UIFILE)
        self.gui = loader.load(uifile)
        self.controller = controller
        IncomingMessagesHandler.__init__(self, queue, self.endMethod)

        uism = naali.ui
        #        uiprops = r.createUiWidgetProperty(1) # 1 = Qt::Dialog
        #        uiprops.SetMenuGroup("Server Tools")
        #        uiprops.name_ = "Estate Management"

        self.proxywidget = r.createUiProxyWidget(self.gui)
        self.proxywidget.setWindowTitle("Estate Management")

        if not uism.AddWidgetToScene(self.proxywidget):
            r.logInfo("Adding ProxyWidget failed.")

        # TODO: Due to core UI API refactor RemoveWidgetFromMenu doesn't exist anymore.
        # uism.AddWidgetToMenu(self.proxywidget, "Estate Management", "Server Tools", "./data/ui/images/menus/edbutton_ESMNG_normal.png")

        self.btnLoadEstate = self.gui.findChild("QPushButton", "btnLoadEstate")
        self.listWEI = self.gui.findChild("QListWidget", "listWidgetEstateInfo")
        self.listWRU = self.gui.findChild("QListWidget", "listWidgetRegionUsers")
        self.listWEB = self.gui.findChild("QListWidget", "listWidgetBanList")
        self.listWAL = self.gui.findChild("QListWidget", "listWidgetAccessList")
        self.listWEM = self.gui.findChild("QListWidget", "listWidgetEstateManagers")
        self.listWSU = self.gui.findChild("QListWidget", "listWidgetSavedUsers")

        self.labelEstateInfo = self.gui.findChild("QLabel", "labelEstateInfo")
        self.tableEstates = self.gui.findChild("QListWidget", "tableWidgetEstates")
        self.chkEstateAccess = self.gui.findChild("QCheckBox", "checkBoxEstateAccess")

        self.lineCurrentEstate = self.gui.findChild("QLineEdit", "lineEditCurrentEstate")
        self.listWidgetEstates = self.gui.findChild("QListWidget", "listWidgetEstates")
        self.btnSetEstate = self.gui.findChild("QPushButton", "pushButtonSetEstate")

        self.chkSunFixed = self.gui.findChild("QCheckBox", "checkBoxSunFixed")
        # PublicAllowed
        # ExternallyVisible);
        self.chkAllowVoice = self.gui.findChild("QCheckBox", "checkBoxAllowVoice")
        self.chkAllowDirectTeleport = self.gui.findChild("QCheckBox", "checkBoxAllowDirectTeleport")
        self.chkDenyAnonymous = self.gui.findChild("QCheckBox", "checkBoxDenyAnonymous")
        self.chkDenyIdentified = self.gui.findChild("QCheckBox", "checkBoxDenyIdentified")
        self.chkDenyTransacted = self.gui.findChild("QCheckBox", "checkBoxDenyTransacted")
        self.chkAbuseEmailToEstateOwner = self.gui.findChild("QCheckBox", "checkBoxAbuseEmailToEstateOwner")
        self.chkBlockDwell = self.gui.findChild("QCheckBox", "checkBoxBlockDwell")
        self.chkEstateSkipScripts = self.gui.findChild("QCheckBox", "checkBoxEstateSkipScripts")
        self.chkResetHomeOnTeleport = self.gui.findChild("QCheckBox", "checkBoxResetHomeOnTeleport")
        self.chkTaxFree = self.gui.findChild("QCheckBox", "checkBoxTaxFree")
        self.chkDenyAgeUnverified = self.gui.findChild("QCheckBox", "checkBoxDenyAgeUnverified")

        self.btnLoadEstate.connect("clicked(bool)", self.btnLoadEstateClicked)

        self.btnToBan = self.gui.findChild("QPushButton", "pushButtonToBan")
        self.btnToAccess = self.gui.findChild("QPushButton", "pushButtonToAccess")
        self.btnToManagers = self.gui.findChild("QPushButton", "pushButtonToManagers")
        self.btnSaveUserInfo = self.gui.findChild("QPushButton", "pushButtonSaveUserInfo")

        self.btnRemoveBan = self.gui.findChild("QPushButton", "pushButtonRemoveBan")
        self.btnRemoveAccess = self.gui.findChild("QPushButton", "pushButtonRemoveAccess")
        self.btnRemoveManagers = self.gui.findChild("QPushButton", "pushButtonRemoveManager")
        self.btnRemoveSaved = self.gui.findChild("QPushButton", "pushButtonRemoveSaved")

        self.btnSavedToAccess = self.gui.findChild("QPushButton", "pushButtonSavedToAccess")
        self.btnSavedToBan = self.gui.findChild("QPushButton", "pushButtonSavedToBan")
        self.btnSavedToManagers = self.gui.findChild("QPushButton", "pushButtonSavedToManagers")

        self.btnKick = self.gui.findChild("QPushButton", "pushButtonKick")
        self.btnRequestGodLikePowers = self.gui.findChild("QPushButton", "pushButtonRequestGodLikePowers")
        self.lineKickMessage = self.gui.findChild("QLineEdit", "lineEditKickMessage")

        self.btnToBan.connect("clicked(bool)", self.btnToBanClicked)
        self.btnToAccess.connect("clicked(bool)", self.btnToAccessClicked)
        self.btnToManagers.connect("clicked(bool)", self.btnToManagersClicked)
        self.btnSaveUserInfo.connect("clicked(bool)", self.btnSaveUserInfoClicked)

        self.btnRemoveBan.connect("clicked(bool)", self.btnRemoveBanClicked)
        self.btnRemoveAccess.connect("clicked(bool)", self.btnRemoveAccessClicked)
        self.btnRemoveManagers.connect("clicked(bool)", self.btnRemoveManagersClicked)

        self.btnRemoveSaved.connect("clicked(bool)", self.btnRemoveSavedClicked)

        self.btnSavedToAccess.connect("clicked(bool)", self.btnSavedToAccessClicked)
        self.btnSavedToBan.connect("clicked(bool)", self.btnSavedToBanClicked)
        self.btnSavedToManagers.connect("clicked(bool)", self.btnSavedToManagersClicked)

        self.btnRequestGodLikePowers.connect("clicked(bool)", self.btnRequestGodLikePowersClicked)
        self.btnKick.connect("clicked(bool)", self.btnKickClicked)
        self.btnSetEstate.connect("clicked(bool)", self.btnSetEstateClicked)

        self.chkEstateAccess.connect("toggled(bool)", self.chkEstateAccessToggled)

        # add incoming event handlers
        self.addHandler("EstateUpdate", self.setEstateInfo)
        self.addHandler("setEstateManagers", self.setEstateManagers)
        self.addHandler("setEstateBans", self.setEstateBans)
        self.addHandler("setEsteteAccessList", self.setEsteteAccessList)
#.........这里部分代码省略.........
开发者ID:AlphaStaxLLC,项目名称:TundraAddons,代码行数:101,代码来源:window.py


注:本文中的PythonQt.QtUiTools.QUiLoader类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。