Commit 85065f9f authored by magho's avatar magho

added generic graphical error dialog function

parent 1c5e7df2
......@@ -8,6 +8,7 @@ from frames.Cart import Cart
from frames.Search import Search
from frames.Receipt import Receipt
from frames.Balance import Balance
from frames.FrameBase import TimerMessageBox
import api_communication as API
......@@ -92,6 +93,11 @@ class NeoKomp(QtWidgets.QMainWindow):
def cart_has_items(self):
return self.frames['Cart'].has_items()
def show_error(self, error_message):
warning = TimerMessageBox(message=error_message, parent=self)
warning.setIcon(QtWidgets.QMessageBox.Warning)
warning.show()
@QtCore.pyqtSlot("PyQt_PyObject")
def ble_button_pressed(self, location):
self.frames['Cart'].add_item_from_location(location)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment