Ejemplo n.º 1
0
 def __init__(self, parent=None, title=None, url=None, num=None, feed=None):
     super(Keywords, self).__init__(parent)
     self.setupUi(self)
     self.setWindowModality(Qt.ApplicationModal)
     self.label_index.setText(title)
     self.news_num = 0
     self.aritcle = crawling.get_news(url, self.news_num)
     self.titleBrowser.setText(self.aritcle.title)
     self.nouns_most = word.importance(self.aritcle)
     self.pushButton_0.clicked.connect(lambda: speak.speakcancel(self))
     self.pushButton_0.clicked.connect(lambda: self.onemore())
     self.pushButton_4.clicked.connect(lambda: speak.speakcancel(self))
     self.pushButton_4.clicked.connect(lambda: self.prev(url))
     self.pushButton_5.clicked.connect(lambda: speak.speakcancel(self))
     self.pushButton_5.clicked.connect(lambda: self.now(title))
     self.pushButton_6.clicked.connect(lambda: speak.speakcancel(self))
     self.pushButton_6.clicked.connect(lambda: self.next(url))
     self.pushButton_prev.clicked.connect(lambda: speak.speakcancel(self))
     self.pushButton_prev.clicked.connect(lambda: self.close())
     if num == 1:
         self.pushButton_prev.clicked.connect(
             lambda: speak.formclass2read_num1(parent, feed))
     elif num == 2:
         self.pushButton_prev.clicked.connect(
             lambda: speak.formclass2read_num2(parent, feed))
     else:
         self.pushButton_prev.clicked.connect(
             lambda: speak.formclass2read_num3(parent, feed))
     cloud.keywordcloud(self.nouns_most)
     cloud.showcloud(self)
     speak.formclass3read(self, self.aritcle.title, self.nouns_most)
Ejemplo n.º 2
0
 def onemore(self, num, feed):
     speak.speakcancel(self)
     if num == 1:
         speak.formclass2read_num1(self, feed)
     elif num == 2:
         speak.formclass2read_num2(self, feed)
     else:
         speak.formclass2read_num3(self, feed)
Ejemplo n.º 3
0
 def __init__(self, parent=None, title=None, article=None):
     super(Newspaper, self).__init__(parent)
     self.setupUi(self)
     self.setWindowModality(Qt.ApplicationModal)
     self.label_index.setText(title)
     self.titleBrowser.setText(article.title)
     self.textBrowser.setText(article.text)
     self.pushButton_0.clicked.connect(lambda: speak.speakcancel(self))
     self.pushButton_0.clicked.connect(lambda: self.onemore())
     self.pushButton_prev.clicked.connect(lambda: speak.speakcancel(self))
     self.pushButton_prev.clicked.connect(lambda: self.close())
     speak.formclass4read(self, article.text)
Ejemplo n.º 4
0
 def __init__(self, parent=None, feed=None, num=None):
     super(Index, self).__init__(parent)
     self.setupUi(self)
     self.setWindowModality(Qt.ApplicationModal)  # qtcore로 window 모달
     self.label_1.setText(str(feed[0][0]))
     self.label_2.setText(str(feed[1][0]))
     self.label_3.setText(str(feed[2][0]))
     self.label_4.setText(str(feed[3][0]))
     self.label_5.setText(str(feed[4][0]))
     self.label_6.setText(str(feed[5][0]))
     self.label_7.setText(str(feed[6][0]))
     self.label_8.setText(str(feed[7][0]))
     self.label_9.setText(str(feed[8][0]))
     self.pushButton_0.clicked.connect(lambda: self.onemore(num, feed))
     self.pushButton_1.clicked.connect(lambda: speak.speakcancel(self))
     self.pushButton_1.clicked.connect(
         lambda: self.Qcrawling(feed, self.pushButton_1, num))
     self.pushButton_2.clicked.connect(lambda: speak.speakcancel(self))
     self.pushButton_2.clicked.connect(
         lambda: self.Qcrawling(feed, self.pushButton_2, num))
     self.pushButton_3.clicked.connect(lambda: speak.speakcancel(self))
     self.pushButton_3.clicked.connect(
         lambda: self.Qcrawling(feed, self.pushButton_3, num))
     self.pushButton_4.clicked.connect(lambda: speak.speakcancel(self))
     self.pushButton_4.clicked.connect(
         lambda: self.Qcrawling(feed, self.pushButton_4, num))
     self.pushButton_5.clicked.connect(lambda: speak.speakcancel(self))
     self.pushButton_5.clicked.connect(
         lambda: self.Qcrawling(feed, self.pushButton_5, num))
     self.pushButton_6.clicked.connect(lambda: speak.speakcancel(self))
     self.pushButton_6.clicked.connect(
         lambda: self.Qcrawling(feed, self.pushButton_6, num))
     self.pushButton_7.clicked.connect(lambda: speak.speakcancel(self))
     self.pushButton_7.clicked.connect(
         lambda: self.Qcrawling(feed, self.pushButton_7, num))
     self.pushButton_8.clicked.connect(lambda: speak.speakcancel(self))
     self.pushButton_8.clicked.connect(
         lambda: self.Qcrawling(feed, self.pushButton_8, num))
     self.pushButton_9.clicked.connect(lambda: speak.speakcancel(self))
     self.pushButton_9.clicked.connect(
         lambda: self.Qcrawling(feed, self.pushButton_9, num))
     self.pushButton_prev.clicked.connect(lambda: speak.speakcancel(self))
     self.pushButton_prev.clicked.connect(lambda: self.close())
     self.pushButton_prev.clicked.connect(
         lambda: speak.formclass2toformclass1(parent))
     if num == 1:
         speak.formclass2read_num1(self, feed)
     elif num == 2:
         speak.formclass2read_num2(self, feed)
     else:
         speak.formclass2read_num3(self, feed)
Ejemplo n.º 5
0
 def __init__(self):
     super().__init__()
     self.setupUi(self)
     self.pushButton_1.clicked.connect(lambda: speak.speakcancel(self))
     self.pushButton_1.clicked.connect(
         lambda: self.Qpress_num(self.pushButton_1))
     self.pushButton_2.clicked.connect(lambda: speak.speakcancel(self))
     self.pushButton_2.clicked.connect(
         lambda: self.Qpress_num(self.pushButton_2))
     self.pushButton_3.clicked.connect(lambda: speak.speakcancel(self))
     self.pushButton_3.clicked.connect(
         lambda: self.Qpress_num(self.pushButton_3))
     self.pushButton_prev.clicked.connect(lambda: speak.speakcancel(self))
     self.pushButton_prev.clicked.connect(lambda: self.close())
     speak.formclass1read(self)