Beispiel #1
0
    def __init__(self, *args, **kwargs):
        super(MainWindow, self).__init__(*args, **kwargs)

        uic.loadUi(FsUtils.get_resource("/ui/mainwindow.ui"), self)
        FsUtils.load_settings()

        self._book: BookEntry = None
        self._cost: Cost = None
        self._hasActiveEntry = False

        self.setupSlots()

        self.setUiInactive()
Beispiel #2
0
    def __init__(self, parent, active_book):
        super().__init__(parent)
        uic.loadUi(FsUtils.get_resource("/ui/bookmove.ui"), self)
        self.accepted.connect(self.moveBook)
        self.bookSelected = None
        self.book_id = None
        self.batch_id = None
        self.active_book = active_book

        batches = FsUtils.get_batches()
        if batches is not None:
            batches.append("New Batch")
            self.batchesList.addItems(batches)

        self.batchesList.itemClicked.connect(self.showBooks)
        self.booksList.itemClicked.connect(self.loadBook)
Beispiel #3
0
    def __init__(self, parent):
        super().__init__(parent)
        self.main = parent
        uic.loadUi(FsUtils.get_resource("/ui/bookbrowser.ui"), self)
        self.accepted.connect(self.openBook)
        self.bookSelected = None
        self.book_id = None
        self.batch_id = None
        """
        discover all batches in the main directory
        """
        batches = FsUtils.get_batches()
        if batches is not None:
            self.batchesList.addItems(batches)

        self.batchesList.itemClicked.connect(self.showBooks)
        self.booksList.itemClicked.connect(self.loadBook)
Beispiel #4
0
    def __init__(self, parent):
        super().__init__(parent)
        cost = parent.cost
        book = parent.activeBook
        uic.loadUi(FsUtils.get_resource("ui/costbreakdown.ui"), self)

        if cost.canBookBeEvalutated():
            self.spinDisplayCover.setValue(cost.getBoardCost())
            self.spinDisplayPaper.setValue(cost.getPageCost())
            self.spinDisplaySew.setValue(cost.getThreadRibbonCost())
            self.spinDisplaySuper.setValue(cost.getSuperCost())
            self.spinDisplayCloth.setValue(cost.getClothCost())
            self.spinDisplayHeadband.setValue(cost.getHeadbandCost())
            self.spinDisplayExtra.setValue(cost.getExtraCosts())

            if book.booktype is BookType.STAB:
                self.labelSewType.setText("Ribbon")
            else:
                self.labelSewType.setText("Thread")
 def __init__(self, parent, active_book: BookEntry):
     super().__init__(parent)
     uic.loadUi(FsUtils.get_resource("ui/discription.ui"), self)
     self.book_entry: BookEntry = active_book
     self.generateDiscription()
Beispiel #6
0
 def __init__(self, parent=None):
     super().__init__(parent=parent)
     uic.loadUi(FsUtils.get_resource("/ui/settings.ui"), self)
     self.pushChangeDirectory.clicked.connect(self.changeDictory)
     self.accepted.connect(self.saveSettings)
     self.lineDirectory.setText(FsUtils.get_book_dir())