Exemple #1
0
    def _change_subtype(self):
        """ Changes the subtype of the card.
        """

        kks.update_card(self._card, self._subtype_line.text(), "subtype")
        self._disable_edit()
        self._update_card_layout()
Exemple #2
0
    def _change_toughness(self):
        """ Changes the toughness of the card.
        """

        kks.update_card(self._card, self._toughness_spinbox.value(),
                        "toughness")
        self._update_card_layout()
Exemple #3
0
    def _change_tribal(self):
        """ Changes the tribal status of the card.
        """

        is_checked = self._tribal_btn.isChecked()
        kks.update_card(self._card, is_checked, "tribal")
        self._update_card_layout()
Exemple #4
0
    def _change_legendary(self):
        """ Changes the legendary status of the card.
        """

        is_checked = self._legendary_btn.isChecked()
        kks.update_card(self._card, is_checked, "legendary")
        self._update_card_layout()
Exemple #5
0
    def _change_flavourtext(self):
        """ Changes the flavourtext of the card.
        """

        remaining_text = self._cut_boxtext(
            self._flavourtext_textbox.toPlainText())
        kks.update_card(self._card, remaining_text, "flavourtext")
        self._update_card_layout()
Exemple #6
0
    def _change_ruletext(self):
        """ Changes the ruletext of the card.
        """

        remaining_text = self._cut_boxtext(
            self._ruletext_textbox.toPlainText(), True)
        kks.update_card(self._card, remaining_text, "ruletext")
        self._update_card_layout()
Exemple #7
0
    def _change_colour(self, colour_box):
        """ Changes the colour of the card.
        """

        add = colour_box.isChecked()
        text = colour_box.text()
        kks.update_card(self._card, text, "colour", add)
        self._update_card_layout()
Exemple #8
0
    def _change_feature(self, feature_box):
        """ Changes the feature of the card.
        Args:
            feature_box: [QCheckBox] A QCheckBox element.
        """

        add = feature_box.isChecked()
        text = feature_box.text()
        kks.update_card(self._card, text, "feature", add)
        self._update_card_layout()
Exemple #9
0
    def _change_seticon(self):
        """ Changes the seticon of the card to one that the user selects.
        """

        fname_orig = QFileDialog.getOpenFileName(
            self, 'Open file', USER_IMAGES_FILE_PATH,
            "Image files (*.jpg *.png *.jpeg)")
        fname = kks.find_image_from_computer(fname_orig)
        if fname != "":
            kks.update_card(self._card, fname, "seticon")
            self._update_card_layout()
Exemple #10
0
    def _remove_seticon(self):
        """ Removes selected seticon image.
        """

        kks.update_card(self._card, "", "seticon")
        self._update_card_layout()
Exemple #11
0
    def _remove_image(self):
        """ Removes selected cover image.
        """

        kks.update_card(self._card, "", "image")
        self._update_card_layout()
Exemple #12
0
    def _change_creator(self):
        """ Changes the creator of the card.
        """

        kks.update_card(self._card, self._creator_line.text(), "creator")
        self._update_card_layout()
Exemple #13
0
    def _change_rarity(self):
        """ Changes the rarity of the card.
        """

        kks.update_card(self._card, self._rarity_line.text(), "rarity")
        self._update_card_layout()
Exemple #14
0
    def _change_manacost(self):
        """ Changes the manacost of the card.
        """

        kks.update_card(self._card, self._manacost_line.text(), "manacost")
        self._update_card_layout()
Exemple #15
0
    def _change_power(self):
        """ Changes the power of the card.
        """

        kks.update_card(self._card, self._power_spinbox.value(), "power")
        self._update_card_layout()
Exemple #16
0
    def _change_name(self):
        """ Changes the namestatus of the card.
        """

        kks.update_card(self._card, self._name_line.text(), "name")
        self._update_card_layout()