本文整理汇总了Python中control.Control.setCommentContent方法的典型用法代码示例。如果您正苦于以下问题:Python Control.setCommentContent方法的具体用法?Python Control.setCommentContent怎么用?Python Control.setCommentContent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类control.Control
的用法示例。
在下文中一共展示了Control.setCommentContent方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Main
# 需要导入模块: from control import Control [as 别名]
# 或者: from control.Control import setCommentContent [as 别名]
#.........这里部分代码省略.........
if not QtGui.QMessageBox.question(None,QtCore.QString(u"发现新版本"),\
QtCore.QString(u"是否更新?"),QtCore.QString("Yes!"),QtCore.QString("No!")):
#self.webFrame.load(QtCore.QUrl("http://0yuchen.com"))
os.system("start %s"%data["url"])
def readyOk(self):
self.qq = self.pythonjs.qq
self.uin = self.qq
self.__config["lastQQ"] = self.qq
self.__config.write()
self.webView.hide()
#self.startPushButton.show()
#self.logPlainTextEdit.show()
self.frame.show()
#self.resize(946, 461)
self.control = Control(self.nam, self.uin, self.gtk, self.__config)
#self.control.moveToThread(self.thread)
#self.control.uin = self.uin
#self.control.gtk = self.gtk
# self.control.doSignal.connect(self.control.getFeeds)
self.control.logSignal.connect(self.addLog)
#self.thread.started.connect(lambda:self.control.work( self.cookieJar, self.uin, self.gtk))
#self.thread.start()
self.timeSpinBox.valueChanged.connect(self.control.setDoTime)
self.doLikeCheckBox.stateChanged.connect(self.control.setDoLike)
#print self.qq
config = self.__config.get(self.qq)
if not config.get("doLike", 1):
self.doLikeCheckBox.setChecked(False)
self.doCommentCheckBox.stateChanged.connect(self.control.setDoComment)
if not config.get("doComment", 1):
self.doCommentCheckBox.setChecked(False)
self.commentContentPlainTextEdit.textChanged.connect(self.setCommentContent)
commentTextList = config.get("commentContentList", self.control.defaultCommentList)
commentText = "#".join(commentTextList)
self.commentContentPlainTextEdit.setPlainText(QtCore.QString(commentText))
self.setCommentContent()
self.control.start()
if self.isAutoLogin:
self.startClicked()
self.setSoftNameTitile()
def setCommentContent(self):
text = self.commentContentPlainTextEdit.toPlainText()
text = unicode(text.toUtf8(), "utf8")
self.control.setCommentContent(text)
def get_gtk(self,skey):
hash = 5381
for i in range(len(skey)):
hash += (hash << 5) + ord(skey[i])
result = hash & 2147483647
return str(result)
#self.logPlainTextEdit.setPlainText(data)
def startClicked(self):
self.control.start_()
self.addLog(u"动态刷新开始...一旦有新动态将会进行操作,您可以最小化软件忙别的了~\n")
# self.control.start()
def stopClicked(self):
self.control.stop()
self.addLog(u"软件已停止!\n")