Beispiel #1
0
        pass

    def printSurvey(self):
        pass

    def quit(self):
        sys.exit(0)


if __name__ == "__main__":
    import getopt

    opts, args = [], []
    try:
        opts, args = getopt.getopt(sys.argv[1:], "s:", ["survey="])
    except getopt.GetoptError, err:
        print "Error reading options:", err

    survey_file = "survey.ini"
    lang = "en"
    for o, a in opts:
        if o in ("-s", "--survey"):
            survey_file = a

    loadTranslation(lang)

    app = QtGui.QApplication(sys.argv)
    edit_survey = QEditSurvey()
    edit_survey.setGeometry(200, 100, 800, 600)
    sys.exit(app.exec_())
Beispiel #2
0
        sg = QSurveyGrid(survey)
        self.setCentralWidget(sg)
        self.setWindowTitle("Survey Grid")
        self.show()


if __name__ == "__main__":
    import sys
    from translation import loadTranslation
    from survey import Survey
    from question import Question
    from answer import Answer
    s = Survey("Survey Grid Test")
    q = s.add(Question(1,"Question1"))
    q.add(Answer(1,"answer1"))
    q.add(Answer(2,"answer2"))
    
    q = s.add(Question(2,"Question2"))
    q.add(Answer(3,"answer3"))
    q.add(Answer(4,"answer4"))
    q.add(Answer(5,"answer5"))

    loadTranslation("en")
    
    app = QtGui.QApplication(sys.argv)
    survey_grid = QSurveyGridShow(s)
    survey_grid.setGeometry(200, 100, 800, 600)
    sys.exit(app.exec_())
    

Beispiel #3
0
    def __init__(self, survey):
        super(QSurveyTreeShow, self).__init__()
        sg = QSurveyTree(survey)
        self.setCentralWidget(sg)
        self.setWindowTitle("Survey Tree")
        self.show()


if __name__ == "__main__":
    import sys
    from translation import loadTranslation
    from survey import Survey
    from question import Question
    from answer import Answer
    s = Survey("Survey Grid Test")
    q = s.add(Question(1, "Question1"))
    q.add(Answer(1, "answer1"))
    q.add(Answer(2, "answer2"))

    q = s.add(Question(2, "Question2"))
    q.add(Answer(3, "answer3"))
    q.add(Answer(4, "answer4"))
    q.add(Answer(5, "answer5"))

    loadTranslation("en")

    app = QtGui.QApplication(sys.argv)
    survey_tree = QSurveyTreeShow(s)
    survey_tree.setGeometry(200, 100, 800, 600)
    sys.exit(app.exec_())
Beispiel #4
0
        pass

    def printSurvey(self):
        pass

    def quit(self):
        sys.exit(0)

if __name__ == "__main__":
    import getopt
    
    
    opts, args = [], []
    try:
        opts, args = getopt.getopt(sys.argv[1:], "s:", ["survey="])
    except getopt.GetoptError, err:
        print "Error reading options:",err

    survey_file="survey.ini"
    lang = "en"
    for o, a in opts:
        if o in ("-s", "--survey"):
            survey_file = a
    
    loadTranslation(lang)
    
    app = QtGui.QApplication(sys.argv)
    edit_survey = QEditSurvey()
    edit_survey.setGeometry(200, 100, 800, 600)
    sys.exit(app.exec_())