Esempio n. 1
0
    def __init__(self, model, parent):
        QFrame.__init__(self, parent)
        RightFrame.__init__(self, parent)
        self.setupUi(self)
        self.testsCountSpinBox.setRange(self.MIN_TESTS, self.MAX_TESTS)
        self.connect(self.checkAllPosPushButton, CLICKED_SIGNAL, self.check_all)
        self.connect(self.uncheckAllPosPushButton, CLICKED_SIGNAL, self.uncheck_all)
        self.connect(self.startPushButton, CLICKED_SIGNAL, self.start_test)

        self.model = model
        self.type_radios = [
            self.plPtTypeRadioButton,
            self.ptPlTypeRadioButton,
        ]
        self.date_constraint_radios = {
            self.noDateConstraintRadioButton,
            self.yesDateConstraintRadioButton,
        }
        self.pos_checkboxes = {
            self.nounCheckBox: NOUN,
            self.verbCheckBox: VERB,
            self.adjectiveCheckBox: ADJECTIVE,
            self.adverbCheckBox: ADVERB,
            self.pronounCheckBox: PRONOUN,
            self.numeralCheckBox: NUMERAL,
            self.conjunctionCheckBox: CONJUNCTION,
        }
Esempio n. 2
0
 def __init__(self, model, parent):
     QFrame.__init__(self, parent)
     RightFrame.__init__(self, parent)
     self.setupUi(self)
     self.connect(self.plPtDictionaryButton, CLICKED_SIGNAL, self.pl_pt_dictionary)
     self.connect(self.ptPlDictionaryButton, CLICKED_SIGNAL, self.pt_pl_dictionary)
     self.model = model
Esempio n. 3
0
 def __init__(self, model, parent):
     QFrame.__init__(self, parent)
     RightFrame.__init__(self, parent)
     self.setupUi(self)
     self.connect(self.addNounButton, CLICKED_SIGNAL, self.add_noun)
     self.connect(self.addVerbButton, CLICKED_SIGNAL, self.add_verb)
     self.connect(self.addAdjectiveButton, CLICKED_SIGNAL, self.add_adjective)
     self.connect(self.addAdverbButton, CLICKED_SIGNAL, self.add_adverb)
     self.connect(self.addPronounButton, CLICKED_SIGNAL, self.add_pronoun)
     self.connect(self.addNumeralButton, CLICKED_SIGNAL, self.add_numeral)
     self.connect(self.addConjunctionButton, CLICKED_SIGNAL, self.add_conjunction)
     self.model = model
Esempio n. 4
0
    def __init__(self, model, parent):
        QFrame.__init__(self, parent)
        RightFrame.__init__(self, parent)
        self.setupUi(self)

        self.model = model

        tablemodel = PtPlDictionaryModel(self.model.get_current_user(), self)
        self.dictionaryTableView.setModel(tablemodel)

        for i in range(tablemodel.columnCount(None)):
            self.dictionaryTableView.setColumnWidth(i, self.COLUMN_WIDTH)
Esempio n. 5
0
    def __init__(self, question_answers, parent):
        QFrame.__init__(self, parent)
        RightFrame.__init__(self, parent)
        self.setupUi(self)
        self.question_answers = question_answers
        tablemodel = TestResultsModel(self.question_answers, parent)
        incorrect_count = len(tablemodel.get_incorrect_questions_answers())
        self.correct_answers_count = len(self.question_answers) - incorrect_count
        self.wrongAnswersTableView.setModel(tablemodel)
        self.set_correct_answers_label()

        for i in range(tablemodel.columnCount(None)):
            self.wrongAnswersTableView.setColumnWidth(i, self.COLUMN_WIDTH)
Esempio n. 6
0
    def __init__(self, model, current_count, total_count, quest_answers, test_type, parent):
        QFrame.__init__(self, parent)
        RightFrame.__init__(self, parent)
        self.setupUi(self)
        self.model = model
        self.current_count = current_count
        self.total_count = total_count
        self.quest_answers = quest_answers
        self.test_type = test_type
        self.word = self.model.get_next_test_word()

        self.wordLabel.setText(self.word)
        self.progressBar.setValue(self.current_count)
        self.progressBar.setMaximum(self.total_count)
        if self.test_type == PL_PT_TEST:
            make_portuguese_line_edit(self.translationLineEdit)
        self.connect(self.nextPushButton, CLICKED_SIGNAL, self.next_word)
        self.connect(self.endPushButton, CLICKED_SIGNAL, self.end_test)
Esempio n. 7
0
 def __init__(self, parent):
     QFrame.__init__(self, parent)
     RightFrame.__init__(self, parent)
     self.setupUi(self)
     self.connect(self.changeUserButton, CLICKED_SIGNAL, self.change_user)
     self.connect(self.removeUserButton, CLICKED_SIGNAL, self.remove_user)