'Update the GUI elements based on the current state.'

def update(self):

    if (self.status == self.STATUS_STOPPED):
        self.status_image_label.setPixmap(QtGui.QPixmap.fromImage(self.status_image_stopped))
    elif (self.status == self.STATUS_WORKING):
        self.status_image_label.setPixmap(QtGui.QPixmap.fromImage(self.status_image_working))
    elif (self.status == self.STATUS_STARTED):
        self.status_image_label.setPixmap(QtGui.QPixmap.fromImage(self.status_image_started))
    if (self.status == self.STATUS_STARTED):
        self.url_label.setText('http://{0:s}/{1:s}'.format(self.app.onion_host, self.web.slug))
        self.url_label.show()
        self.copy_url_button.show()
        if self.app.stealth:
            self.copy_hidservauth_button.show()
        else:
            self.copy_hidservauth_button.hide()
        p = self.parentWidget()
        p.resize(p.sizeHint())
    else:
        self.url_label.hide()
        self.copy_url_button.hide()
        self.copy_hidservauth_button.hide()
    if (self.file_selection.get_num_files() == 0):
        self.server_button.setEnabled(False)
        self.server_button.setText(strings._('gui_start_server', True))
    elif (self.status == self.STATUS_STOPPED):
        self.server_button.setEnabled(True)
        self.server_button.setText(strings._('gui_start_server', True))
    elif (self.status == self.STATUS_STARTED):
        self.server_button.setEnabled(True)
        self.server_button.setText(strings._('gui_stop_server', True))
    else:
        self.server_button.setEnabled(False)
        self.server_button.setText(strings._('gui_please_wait'))
