示例#1
0
 def mdcn_reset(self):
     #取り消しボタンを押した処理,前の薬に戻ります
     if (self.disp_mdcn_nowpage > 0):
         self.disp_mdcn_nowpage -= 1
         dispimg = QImage(
             self.mdcnlist_now[self.disp_mdcn_nowpage]['img_path'])
         Qdisp = QPixmap.fromImage(dispimg)
         QdispResized = Qdisp.scaled(180, 130)
         self.ui.label_disp_mdcn_img_4.setPixmap(QdispResized)
         self.ui.label_disp_mdcn_name_4.setText(
             self.mdcnlist_now[self.disp_mdcn_nowpage]['name'])
         playTapSound(self.tapvol)
示例#2
0
 def slct_yes(self):
     #「薬を飲んだ」ボタンを押した処理
     #self.ui.stackedWidget.setCurrentIndex(7)
     self.snooze = 0
     stopAlarm()
     self.disp_mdcn_nowpage = 0
     dispimg = QImage(self.mdcnlist_now[self.disp_mdcn_nowpage]['img_path'])
     Qdisp = QPixmap.fromImage(dispimg)
     QdispResized = Qdisp.scaled(180, 130)
     self.ui.label_disp_mdcn_img_4.setPixmap(QdispResized)
     self.ui.label_disp_mdcn_name_4.setText(
         self.mdcnlist_all[self.disp_mdcn_nowpage]['name'])
     self.ui.stackedWidget.setCurrentIndex(7)
     playTapSound(self.tapvol)
示例#3
0
    def mdcn_taken(self):
        #「薬を飲んだ」ボタンを押した処理
        self.record.setTakeEach(self.disp_mdcn_nowpage)
        playTapSound(self.tapvol)
        if (self.disp_mdcn_nowpage < len(self.mdcnlist_now) - 1):
            self.disp_mdcn_nowpage += 1
            dispimg = QImage(
                self.mdcnlist_now[self.disp_mdcn_nowpage]['img_path'])
            Qdisp = QPixmap.fromImage(dispimg)
            QdispResized = Qdisp.scaled(180, 130)
            self.ui.label_disp_mdcn_img_4.setPixmap(QdispResized)
            self.ui.label_disp_mdcn_name_4.setText(
                self.mdcnlist_now[self.disp_mdcn_nowpage]['name'])

        else:
            self.record.sendEmail()
            self.ui.stackedWidget.setCurrentIndex(0)
示例#4
0
    def mdcn_no_late(self):
        #薬を飲まないー起床が遅い」ボタン
        playTapSound(self.tapvol)
        self.record.setNotTakeReasonEach(self.disp_mdcn_nowpage, "wkup_late")
        if (self.disp_mdcn_nowpage < len(self.mdcnlist_now) - 1):
            self.disp_mdcn_nowpage += 1
            dispimg = QImage(
                self.mdcnlist_now[self.disp_mdcn_nowpage]['img_path'])
            Qdisp = QPixmap.fromImage(dispimg)
            QdispResized = Qdisp.scaled(180, 130)
            self.ui.label_disp_mdcn_img_4.setPixmap(QdispResized)
            self.ui.label_disp_mdcn_name_4.setText(
                self.mdcnlist_now[self.disp_mdcn_nowpage]['name'])

        else:
            self.record.sendEmail()
            self.ui.stackedWidget.setCurrentIndex(0)
示例#5
0
    def gopage_mdcn_info(self):
        self.ui.stackedWidget.setCurrentIndex(11)
        playTapSound(self.tapvol)

        self.ui.label_disp_mdcn_num_3.setText(
            str(self.mdcnlist_all[self.disp_mdcn_all_nowpage]['num']) + '錠')
        dispimg = QImage(
            self.mdcnlist_all[self.disp_mdcn_all_nowpage]['img_path'])
        self.ui.label_disp_mdcn_name_3.setText(
            self.mdcnlist_all[self.disp_mdcn_all_nowpage]['name'])
        self.ui.label_disp_mdcn_time_3.setText(
            self.mdcnlist_all[self.disp_mdcn_all_nowpage]['time'] + ' 食後')
        self.ui.label_page_3.setText(
            str(self.disp_mdcn_all_nowpage + 1) + '/' +
            str(len(self.mdcnlist_all)))
        Qdisp = QPixmap.fromImage(dispimg)
        QdispResized = Qdisp.scaled(240, 150)
        self.ui.label_disp_mdcn_img_3.setPixmap(QdispResized)
示例#6
0
 def slct_yet(self):
     #「食事がまだ」ボタンを押した処理
     self.ui.stackedWidget.setCurrentIndex(9)
     self.snooze = self.snooze + 30 * 60
     stopAlarm()
     playTapSound(self.tapvol)
示例#7
0
 def gopage_set_volume(self):
     self.ui.stackedWidget.setCurrentIndex(4)
     playTapSound(self.tapvol)
示例#8
0
 def gopage_set_mealtime(self):
     self.ui.stackedWidget.setCurrentIndex(13)
     playTapSound(self.tapvol)
示例#9
0
 def gopage_set_adress(self):
     self.ui.stackedWidget.setCurrentIndex(2)
     playTapSound(self.tapvol)
示例#10
0
 def gopage_mdcn_record(self):
     self.ui.stackedWidget.setCurrentIndex(12)
     playTapSound(self.tapvol)
示例#11
0
 def gopage_setting(self):
     self.ui.stackedWidget.setCurrentIndex(1)
     playTapSound(self.tapvol)
示例#12
0
 def slct_no(self):
     #「飲んでいない」ボタンを押した処理
     self.ui.stackedWidget.setCurrentIndex(10)
     self.snooze = 0
     stopAlarm()
     playTapSound(self.tapvol)
示例#13
0
 def set_snooze(self):
     #60分後に再通知なので,default 30 +30 min
     self.snooze = self.snooze + 30 * 60
     playTapSound(self.tapvol)
示例#14
0
 def reason_other(self):
     #「その他」ボタンを押した処理
     self.record.setNotTakeReasonAll("other")
     self.record.sendEmail()
     self.ui.stackedWidget.setCurrentIndex(0)
     playTapSound(self.tapvol)
示例#15
0
 def reason_have_no_mdcn(self):
     #「薬がない,忘れた」ボタンを押した処理
     self.record.setNotTakeReasonAll("have_no_mdcn")
     self.record.sendEmail()
     self.ui.stackedWidget.setCurrentIndex(0)
     playTapSound(self.tapvol)
示例#16
0
 def reason_bad_condition(self):
     #「体調不良」ボタンを押した処理
     self.record.setNotTakeReasonAll("bad_condition")
     self.record.sendEmail()
     self.ui.stackedWidget.setCurrentIndex(0)
     playTapSound(self.tapvol)
示例#17
0
 def reason_wkup_late(self):
     #「起床時間が遅い」ボタンを押した処理
     self.record.setNotTakeReasonAll("wkup_late")  #全部飲まない&理由選択
     self.record.sendEmail()  #Email発送
     self.ui.stackedWidget.setCurrentIndex(0)  #top画面に戻る
     playTapSound(self.tapvol)