Exemple #1
0
    def setup_buttons(self):
        self.login_layout = QHBoxLayout()
        self.login_button = QPushButton('Login', self)
        self.login_button.setToolTip(
            "Log in to Voiceflow and display projects to choose from")

        back_button_creator = BackButton()
        self.back_button = back_button_creator.create_back_button()

        self.login_layout.addWidget(self.back_button)
        self.login_layout.addWidget(self.login_button)
Exemple #2
0
    def setup_buttons(self):
        self.create_ivr_button_layout = QHBoxLayout()
        self.create_ivr_button = QPushButton('Create IVR', self)
        self.create_ivr_button.setToolTip(
            "Replace current IVR with new one, generated by the Voiceflow project"
        )

        back_button_creator = BackButton()
        self.back_button = back_button_creator.create_back_button()

        self.create_ivr_button_layout.addWidget(self.back_button)
        self.create_ivr_button_layout.addWidget(self.create_ivr_button)
Exemple #3
0
    def setup_buttons(self):
        self.button_layout = QHBoxLayout()

        if not self.page == "project":
            back_button_creator = BackButton()
            self.back_button = back_button_creator.create_back_button()
            self.button_layout.addWidget(self.back_button)
        else:
            self.button_layout.addWidget(QLabel())

        self.apply_settings_button = QPushButton("Apply")
        self.apply_settings_button.setToolTip("Update telephone numbers that users calling the IVR are redirected to")
        self.button_layout.addWidget(self.apply_settings_button)
Exemple #4
0
    def setup_buttons(self):
        back_button_creator = BackButton()
        self.back_button = back_button_creator.create_back_button()
        self.button_layout.addWidget(self.back_button)

        self.turn_on_button = QPushButton("Turn ON IVR Server")
        self.turn_on_button.setToolTip("This will turn on the IVR server, allowing users to call the IVR")
        self.button_layout.addWidget(self.turn_on_button)

        self.turn_off_button = QPushButton("Turn OFF IVR Server")
        self.turn_off_button.setToolTip(
            "This will turn off the IVR server - users will no longer be able to call the IVR")
        self.button_layout.addWidget(self.turn_off_button)
Exemple #5
0
    def setup_buttons(self):
        button_layout = QHBoxLayout()

        back_button_creator = BackButton()
        self.back_button = back_button_creator.create_back_button()
        button_layout.addWidget(self.back_button)

        self.apply_settings_button = QPushButton("Apply")
        self.apply_settings_button.setToolTip(
            "Replace IVR voice files with updated files")
        button_layout.addWidget(self.apply_settings_button)

        self.layout.addWidget(QLabel())
        self.layout.addLayout(button_layout)
Exemple #6
0
    def setup_buttons(self):
        self.button_layout = QHBoxLayout()
        self.create_ivr_button = QPushButton("Create IVR", self)
        self.browse_button = QPushButton("Browse", self)
        self.browse_button.setToolTip("Browse file manager for .vf file")
        self.create_ivr_button.setToolTip("Generate an IVR from Voiceflow file and replace your current IVR")

        back_button_creator = BackButton()
        self.back_button = back_button_creator.create_back_button()

        self.button_layout.addWidget(self.back_button)
        self.button_layout.addWidget(self.browse_button)
        self.button_layout.addWidget(self.create_ivr_button)
        self.v_box.addLayout(self.button_layout)
Exemple #7
0
    def setup_buttons(self):
        self.button_layout = QHBoxLayout()

        back_button_creator = BackButton()
        self.back_button = back_button_creator.create_back_button()
        self.button_layout.addWidget(self.back_button)

        self.add_ip_address_button = QPushButton("Add IP Address", self)
        self.add_ip_address_button.setToolTip("Add another contact IP address")
        self.button_layout.addWidget(self.add_ip_address_button)

        self.apply_settings_button = QPushButton("Apply")
        self.apply_settings_button.setToolTip(
            "Update Sip Trunk settings for contact between your IVR and telephone provider")
        self.button_layout.addWidget(self.apply_settings_button)
Exemple #8
0
    def init_ui(self):
        self.layout = QVBoxLayout()

        self.setup_heading()

        self.button_group = QGroupBox()
        self.layout.addWidget(self.button_group)
        self.v_box = QVBoxLayout()
        self.button_group.setLayout(self.v_box)

        self.setup_voiceflow_login_button()
        self.setup_downloaded_voiceflow_button()

        back_button_creator = BackButton()
        self.back_button = back_button_creator.create_back_button()
        back_layout = back_button_creator.create_back_layout(self.back_button)

        self.v_box.addWidget(self.voiceflow_to_json_button)
        self.v_box.addWidget(QLabel())
        self.v_box.addWidget(self.json_file_button)
        self.v_box.addWidget(QLabel())
        self.v_box.addLayout(back_layout)

        self.setLayout(self.layout)
Exemple #9
0
    def init_ui(self):
        self.figure = plt.figure()
        self.canvas = FigureCanvas(self.figure)
        self.toolbar = NavigationToolbar(self.canvas, self)

        self.date = datetime.today()
        self.date = self.date.strftime('%Y-%m-%d')

        self.l1 = QLabel('Please choose the period of time for which to diplay the data: ')
        self.buttonDaily = QPushButton('daily')
        self.buttonMonthly = QPushButton('monthly')
        self.buttonPeriod = QPushButton('set period')

        self.buttonDaily.clicked.connect(self.daily)
        self.buttonMonthly.clicked.connect(self.monthly)
        self.buttonPeriod.clicked.connect(self.period)

        sublayoutTime = QHBoxLayout()
        sublayoutTime.addWidget(self.l1)
        sublayoutTime.addWidget(self.buttonDaily)
        sublayoutTime.addWidget(self.buttonMonthly)
        sublayoutTime.addWidget(self.buttonPeriod)
        sublayoutTime.setAlignment(Qt.AlignRight);

        self.l2 = QLabel('Select the date: ')
        self.l3 = QLabel('   Select the end date: ')

        self.dateedit = QDateEdit(calendarPopup=True)
        self.dateedit.setDateTime(QDateTime.currentDateTime())
        self.startDate = QDateEdit(calendarPopup=True)
        self.startDate.setDateTime(QDateTime.currentDateTime())
        self.endDate = QDateEdit(calendarPopup=True)
        self.endDate.setDateTime(QDateTime.currentDateTime())

        self.l3.hide()
        self.startDate.hide()
        self.endDate.hide()

        self.monthList = QDateEdit()
        self.monthList.setDisplayFormat("MMM")
        self.monthList.setDateTime(QDateTime.currentDateTime())
        self.monthList.hide()

        self.yearList = QDateEdit()
        self.yearList.setDisplayFormat("yyyy")
        self.yearList.setDateTime(QDateTime.currentDateTime())
        self.yearList.hide()

        self.l4 = QLabel("'Start date' should be before 'end date'!")
        self.l4.setStyleSheet("QWidget {color : rgba(255,0,0,255);}")
        self.l4.hide()

        sublayoutSelectDate = QHBoxLayout()
        sublayoutSelectDate.addWidget(self.l2)
        sublayoutSelectDate.addWidget(self.dateedit)
        sublayoutSelectDate.addWidget(self.monthList)
        sublayoutSelectDate.addWidget(self.yearList)
        sublayoutSelectDate.addWidget(self.startDate)
        sublayoutSelectDate.addWidget(self.l3)
        sublayoutSelectDate.addWidget(self.endDate)
        sublayoutSelectDate.setAlignment(Qt.AlignRight);

        self.button_show_layout = QHBoxLayout()
        self.buttonShow = QPushButton('Show Analytics')
        self.buttonShow.clicked.connect(self.update)
        self.button_show_layout.addWidget(QLabel())
        self.button_show_layout.addWidget(QLabel())
        self.button_show_layout.addWidget(self.buttonShow)

        sublayoutTimeSelect = QVBoxLayout()
        sublayoutTimeSelect.addLayout(sublayoutTime)
        sublayoutTimeSelect.addLayout(sublayoutSelectDate)
        sublayoutTimeSelect.addWidget(self.l4, alignment=Qt.AlignRight)
        sublayoutTimeSelect.addLayout(self.button_show_layout)

        self.button1 = QPushButton('Hourly Call Summary')
        self.button2 = QPushButton('Initial Calling Outcome')
        self.button3 = QPushButton('Redirected Calls')
        self.button4 = QPushButton('IVR Call Drop Rate')

        self.outcomes, self.time, self.redirect = return_daily_data(self.date)
        self.graph = 1
        self.period = 'daily'
        self.day = datetime.today().strftime('%d %B %Y')
        self.month = datetime.today().strftime('%B')
        self.year = datetime.today().strftime('%Y')
        self.fromDate = datetime.today().strftime('%d %B %Y')
        self.toDate = datetime.today().strftime('%d %B %Y')
        self.plot1()

        self.button1.clicked.connect(self.plot1)
        self.button2.clicked.connect(self.plot2)
        self.button3.clicked.connect(self.plot3)
        self.button4.clicked.connect(self.plot4)

        sublayout1 = QHBoxLayout()
        sublayout1.addWidget(self.button1)
        sublayout1.addWidget(self.button2)

        sublayout2 = QHBoxLayout()
        sublayout2.addWidget(self.button3)
        sublayout2.addWidget(self.button4)

        sublayout = QVBoxLayout()
        sublayout.addLayout(sublayout1)
        sublayout.addLayout(sublayout2)

        back_button_creator = BackButton()
        self.back_button = back_button_creator.create_back_button()
        back_layout = back_button_creator.create_back_layout(self.back_button)

        main_layout = QVBoxLayout()
        main_layout.addWidget(self.toolbar)
        main_layout.addLayout(sublayoutTimeSelect)
        main_layout.addWidget(self.canvas)
        main_layout.addLayout(sublayout)
        main_layout.addLayout(back_layout)

        self.setLayout(main_layout)