Ejemplo n.º 1
0
    def place(self):
        self.drawer_id = self.drawer_combobox.currentText()
        recipient_text = self.recipient_combobox.currentText()
        for user in User.get_users():
            if user.name == recipient_text:
                self.recipient_id = user.id

        location_text = self.location_combobox.currentText()
        for location in Location.get_locations():
            if location.name == location_text:
                self.location_id = location.id

        self.content.components['open_drawer'].drawer_id = self.drawer_combobox.currentText()
        self.content.activate(self.content.components['open_drawer'])
Ejemplo n.º 2
0
    def place(self):
        self.drawer_id = self.drawer_combobox.currentText()
        recipient_text = self.recipient_combobox.currentText()
        for user in User.get_users():
            if user.name == recipient_text:
                self.recipient_id = user.id

        location_text = self.location_combobox.currentText()
        for location in Location.get_locations():
            if location.name == location_text:
                self.location_id = location.id

        self.content.components[
            'open_drawer'].drawer_id = self.drawer_combobox.currentText()
        self.content.activate(self.content.components['open_drawer'])
Ejemplo n.º 3
0
    def __init__(self, content):
        super(AddDelivery, self).__init__()

        self.content = content
        loadUi(os.path.join(UI_DIRECTORY, 'add_delivery.ui'), self)
        self.cancel_button.clicked.connect(self.cancel)
        self.save_button.clicked.connect(self.place)
        self.deliveries = {}
        self.sender = None
        self.drawer_id = '1'

        for location in Location.get_locations():
            self.location_combobox.addItem(location.name)

        #from PySide.QtGui import QComboBox
        #test = QComboBox()
        #self.recipient_combobox.addItems(User.get_users())
        #self.location_combobox.addItems(Location.get_locations())

        AuthenticationClient.add_listener(self)
Ejemplo n.º 4
0
    def __init__(self, content):
        super(AddDelivery, self).__init__()

        self.content = content
        loadUi(os.path.join(UI_DIRECTORY, 'add_delivery.ui'), self)
        self.cancel_button.clicked.connect(self.cancel)
        self.save_button.clicked.connect(self.place)
        self.deliveries = {}
        self.sender = None
        self.drawer_id = '1'

        for location in Location.get_locations():
            self.location_combobox.addItem(location.name)

        #from PySide.QtGui import QComboBox
        #test = QComboBox()
        #self.recipient_combobox.addItems(User.get_users())
        #self.location_combobox.addItems(Location.get_locations())

        AuthenticationClient.add_listener(self)