예제 #1
0
 def __init__(self):
     super(Error, self).__init__()
     loadUi(os.path.join(UI_DIRECTORY, 'error.ui'), self)
     self.icon = QtGui.QImage()
     self.icon.load(os.path.join(IMAGE_DIRECTORY, 'error.png'))
     self.error_label.setPixmap(QtGui.QPixmap(self.icon))
     AuthenticationClient.add_listener(self)
예제 #2
0
파일: error.py 프로젝트: rjagerman/aidu
 def __init__(self):
     super(Error, self).__init__()
     loadUi(os.path.join(UI_DIRECTORY, 'error.ui'), self)
     self.icon = QtGui.QImage()
     self.icon.load(os.path.join(IMAGE_DIRECTORY, 'error.png'))
     self.error_label.setPixmap(QtGui.QPixmap(self.icon))
     AuthenticationClient.add_listener(self)
예제 #3
0
 def __init__(self, content):
     super(Welcome, self).__init__()
     self.content = content
     loadUi(os.path.join(UI_DIRECTORY, 'welcome.ui'), self)
     AuthenticationClient.add_listener(self)
     self.user_id = ''
     self.add_delivery_button.clicked.connect(self.add_delivery)
     self.receive_delivery_button.clicked.connect(self.retrieve_delivery)
예제 #4
0
 def __init__(self):
     super(Header, self).__init__()
     loadUi(os.path.join(UI_DIRECTORY, 'header.ui'), self)
     self.logo = QtGui.QImage()
     self.logo.load(os.path.join(IMAGE_DIRECTORY, 'aidu.png'))
     self.logo_label.setPixmap(QtGui.QPixmap(self.logo.scaledToHeight(100)))
     self.logout_button.clicked.connect(self.logout)
     AuthenticationClient.add_listener(self)
예제 #5
0
파일: header.py 프로젝트: rjagerman/aidu
 def __init__(self):
     super(Header, self).__init__()
     loadUi(os.path.join(UI_DIRECTORY, "header.ui"), self)
     self.logo = QtGui.QImage()
     self.logo.load(os.path.join(IMAGE_DIRECTORY, "aidu.png"))
     self.logo_label.setPixmap(QtGui.QPixmap(self.logo.scaledToHeight(100)))
     self.logout_button.clicked.connect(self.logout)
     AuthenticationClient.add_listener(self)
예제 #6
0
파일: welcome.py 프로젝트: rjagerman/aidu
 def __init__(self, content):
     super(Welcome, self).__init__()
     self.content = content
     loadUi(os.path.join(UI_DIRECTORY, 'welcome.ui'), self)
     AuthenticationClient.add_listener(self)
     self.user_id = ''
     self.add_delivery_button.clicked.connect(self.add_delivery)
     self.receive_delivery_button.clicked.connect(self.retrieve_delivery)
예제 #7
0
 def __init__(self, content):
     super(RetrieveDelivery, self).__init__()
     self.content = content
     loadUi(os.path.join(UI_DIRECTORY, 'receive_delivery.ui'), self)
     self.drawer1_button.clicked.connect(self.drawer1_open)
     self.drawer2_button.clicked.connect(self.drawer2_open)
     self.drawer3_button.clicked.connect(self.drawer3_open)
     self.cancel_button.clicked.connect(self.cancel)
     self.recipient_id = None
     self.drawer_id = '1'
     AuthenticationClient.add_listener(self)
예제 #8
0
 def __init__(self, content):
     super(RetrieveDelivery, self).__init__()
     self.content = content
     loadUi(os.path.join(UI_DIRECTORY, 'receive_delivery.ui'), self)
     self.drawer1_button.clicked.connect(self.drawer1_open)
     self.drawer2_button.clicked.connect(self.drawer2_open)
     self.drawer3_button.clicked.connect(self.drawer3_open)
     self.cancel_button.clicked.connect(self.cancel)
     self.recipient_id = None
     self.drawer_id = '1'
     AuthenticationClient.add_listener(self)
예제 #9
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)
예제 #10
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)
예제 #11
0
파일: window.py 프로젝트: rjagerman/aidu
    def __init__(self):
        super(Content, self).__init__()
        self.setFrameStyle(QtGui.QFrame.StyledPanel | QtGui.QFrame.Plain)
        self.timer = None

        # Initialize all possible content components
        self.components = {'scan_card': ScanCard(),
                           'add_delivery': AddDelivery(self),
                           'retrieve_delivery': RetrieveDelivery(self),
                           'welcome': Welcome(self),
                           'open_drawer': OpenDrawer(self),
                           'error': Error()}

        # Creates the layout and adds all the components
        layout = QtGui.QHBoxLayout()
        for component in self.components.values():
            layout.addWidget(component)
            component.hide()
        self.setLayout(layout)

        # Listen to the authentication client
        AuthenticationClient.add_listener(self)
예제 #12
0
    def __init__(self):
        super(Content, self).__init__()
        self.setFrameStyle(QtGui.QFrame.StyledPanel | QtGui.QFrame.Plain)
        self.timer = None

        # Initialize all possible content components
        self.components = {
            'scan_card': ScanCard(),
            'add_delivery': AddDelivery(self),
            'retrieve_delivery': RetrieveDelivery(self),
            'welcome': Welcome(self),
            'open_drawer': OpenDrawer(self),
            'error': Error()
        }

        # Creates the layout and adds all the components
        layout = QtGui.QHBoxLayout()
        for component in self.components.values():
            layout.addWidget(component)
            component.hide()
        self.setLayout(layout)

        # Listen to the authentication client
        AuthenticationClient.add_listener(self)
예제 #13
0
 def logout(self):
     AuthenticationClient.logout()
예제 #14
0
파일: header.py 프로젝트: rjagerman/aidu
 def logout(self):
     AuthenticationClient.logout()