Exemple #1
0
 def about(self):
     # Get the about text from a file inside the plugin zip file
     # The get_resources function is a builtin function defined for all your
     # plugin code. It loads files from the plugin zip file. It returns
     # the bytes from the specified file.
     #
     # Note that if you are loading more than one file, for performance, you
     # should pass a list of names to get_resources. In this case,
     # get_resources will return a dictionary mapping names to bytes. Names that
     # are not found in the zip file will not be in the returned dictionary.
     text = get_resources('about.txt')
     QMessageBox.about(self, 'About the Tag Stats Plugin Prototype',
             text.decode('utf-8'))
 def about(self):
     # Get the about text from a file inside the plugin zip file
     # The get_resources function is a builtin function defined for all your
     # plugin code. It loads files from the plugin zip file. It returns
     # the bytes from the specified file.
     #
     # Note that if you are loading more than one file, for performance, you
     # should pass a list of names to get_resources. In this case,
     # get_resources will return a dictionary mapping names to bytes. Names that
     # are not found in the zip file will not be in the returned dictionary.
     text = get_resources('about.txt')
     QMessageBox.about(self, 'About the Interface Plugin Demo',
                       text.decode('utf-8'))
 def onAboutDialogAction(self):
     utils.trace("ActionManager","onAboutDialogAction","")
     from PyQt4.Qt import QMessageBox , qVersion
     from AppController import AppController
     from models.mbu_config import meta
     QMessageBox.about(AppController.getInstance().getMainView(), 
                          i18n.LABEL_ABOUT_MSGBOX_TITLE,
                          i18n.LABEL_ABOUT_SUMMARY + "\n" + 
                          i18n.LABEL_ABOUT_VERSION + ": " + meta['APPLICATION_VERSION'] + "\n" + 
                          i18n.LABEL_ABOUT_API_VERSION + ": " + meta['API'] + "\n" +
                          i18n.LABEL_ABOUT_QT_VERSION + ": " + meta['QT_VERSION'] + "\n" +
                          i18n.LABEL_ABOUT_OS_NAME + ": " + meta['OS'] + "\n\n" +
                          i18n.LABEL_ABOUT_CREDITS + "\n\n" + 
                          i18n.LABEL_ABOUT_OPENSOURCE + "\n" + 
                          i18n.LABEL_ABOUT_COPYRIGHT);
     return        
Exemple #4
0
 def about(self):
     QMessageBox.about(self, 'About moldy', 'moldy beta 15. 9. 2015')
 def about(self):
     QMessageBox.about(self, 'About', 'Some text here')
Exemple #6
0
 def changeValue1(self, value):
     QMessageBox.about(QWidget(), '2', '2')
Exemple #7
0
 def changeValue0(self, value):
     QMessageBox.about(QWidget(), '1', '1')
Exemple #8
0
 def aboutProgram(self):
     QMessageBox.about(self, self.configParam.get('about', 'title'), 
                       self.configParam.get('about', 'about_program'))
Exemple #9
0
 def about(self):
     QMessageBox.about(self, 'About', 'Some text here')
Exemple #10
0
 def buttonClicked(self):
     sender = self.sender()
     if sender.text() == "Get title data":
         if self.titles_list.currentItem() != None:
             titleToGet = str(self.titles_list.currentItem().text())
             titleData = findTitleData(titleToGet)
             splitLine = []
             splitLine = titleData.split(",", 7)
                             
             self.authorData.setText('Author: '+splitLine[0].replace('"', "").lstrip())
             self.titleData.setText('Title: '+splitLine[1].replace('"', "").lstrip())
             self.genreData.setText('Genre: '+splitLine[2].replace('"', "").lstrip())
             self.genre2Data.setText('Genre2: '+splitLine[3].replace('"', "").lstrip())
             self.dateData.setText('Date Read: '+splitLine[4].replace('"', "").lstrip())
             self.gradeData.setText('Grade: '+splitLine[5].replace('"', "").lstrip())
             self.commentsData.setText('Comments: '+splitLine[6].replace('"', "").lstrip())
             
     elif sender.text() == "Submit Data":
         comments = str(self.comments_text.text())
     
         while True:
             author = str(self.author_text.text())
             if containsDigit(author) == True:
                 QMessageBox.about(self, "Wrong input", "Error: Author cant contain digits")
                 break
             
             if len(author) == 0:
                 QMessageBox.about(self, "Wrong input", "Author is a required field")
                 break
             
             title = str(self.title_text.text())
             try:
                 title = str(self.title_text.text())
             except:
                 QMessageBox.about(self, "Wrong input", "Error in comments, only A-z, 1-9 allowed")
                 break
             
             if len(title) == 0:
                 QMessageBox.about(self, "Wrong input", "Title is a required field")
                 break
             
             
             if self.genre_list.currentItem() != None:
                 genre = str(self.genre_list.currentItem().text())
             else:
                 QMessageBox.about(self, "Wrong input", "Error: Need to pick genre")
                 break
                                 
             if self.genre2_list.currentItem() != None:
                 genre2 = str(self.genre2_list.currentItem().text())
             else:
                 QMessageBox.about(self, "Wrong input", "Error: Need to pick genre2")
                 break
             
             d = str(self.date_text.text())  
             
             if len(d) == 0:
                 QMessageBox.about(self, "Wrong input", "Date is a required field")
                 break
             try:
                 dateRead = datetime.datetime.strptime(d, '%y-%m-%d').date() 
             except:
                 QMessageBox.about(self, "Wrong input", "Error: Date needs to be in format: yy-mm-dd")         
                 break
             
             
             try:
                 grade = int(str(self.grade_text.text()))
             except:
                 QMessageBox.about(self, "Wrong input", "Error: Grade needs to be a number between 1-5")
                 break
             
             if grade > 5 or grade < 1:
                 QMessageBox.about(self, "Wrong input", "Error: Grade needs to be a number between 1-5")
                 break
             
             try:
                 comments = str(self.comments_text.text())
             except:
                 QMessageBox.about(self, "Wrong input", "Error: in comments, only A-z, 1-9 allowed")
                 break
             
             if len(comments) == 0:
                 comments = "No comments"
             
             writeDataToFile(author, title, genre, genre2, str(dateRead), str(grade), comments)
             self.titles_list.clear()
             self.titles_list.addItems(getTitlesFromFile())
             QMessageBox.about(self, "Information", "Data added successfully")
             break