本文整理匯總了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")