def main(): '''start the program''' import sys process_command_line() app = QtGui.QApplication(sys.argv) mw = AGUP_MainWindow() mw.show() _r = app.exec_() sys.exit(_r)
def main(): '''simple starter program to develop this code''' import sys import os import agup_data agup = agup_data.AGUP_Data() agup.openPrpFile('project/agup_project.xml') app = QtGui.QApplication(sys.argv) mw = AGUP_Reviewers_View(None, agup) mw.show() _r = app.exec_() sys.exit(_r)
def project_main(): import sys import os import agup_data app = QtGui.QApplication(sys.argv) testfile = os.path.abspath('project/agup_project.xml') test_gup_id = str(941*9*5) agup = agup_data.AGUP_Data() agup.openPrpFile(testfile) proposal = agup.proposals.proposals[test_gup_id] mw = AGUP_ProposalDetails(agup=agup) mw.addTopics(agup.topics.getTopicList()) mw.addReviewers(agup.reviewers) mw.setupProposal(proposal) mw.show() sys.exit(app.exec_())
def developer_main(): ''' create QGroupBox + QGridLayout and run the panel === === === === ==== ========================= R1 #1 R2 #2 % Reviewer Name === === === === ==== ========================= [x] 1 [ ] 0 100% Joe User [ ] 0 [x] 1 80% Second Reviewer [ ] 0 [ ] 0 22% Some Panel Member [ ] 0 [ ] 0 1% Another Panel Member === === === === ==== ========================= ''' import sys import os import agup_data global layout, agup testfile = os.path.abspath('project/agup_project.xml') agup = agup_data.AGUP_Data() agup.openPrpFile(testfile) app = QtGui.QApplication(sys.argv) grid = QtGui.QGroupBox('prop_revu_grid demo') layout = ReviewerAssignmentGridLayout(grid, agup) layout.addReviewers(agup.reviewers) layout.setReviewersValues(agup.reviewers) timer = QtCore.QTimer() timer.singleShot(2000, _onDelay1) timer.singleShot(5000, _onDelay2) timer.singleShot(7500, _onDelay3) grid.show() sys.exit(app.exec_())
def main(): import sys app = QtGui.QApplication(sys.argv) mw = AGUP_ReviewerDetails() mw.setFullName('Joe Reviewer') mw.setSortName('Reviewer') mw.setPhone('555-555-5555') mw.setEmail('*****@*****.**') mw.setJoined('2010-2') mw.setUrl('http://user.com') mw.setNotes('''That URL is fake.\nDo not trust it!''') # setup some examples for testing topic_object = topics.Topics() for k, v in dict(SAXS=0.5, XPCS=0.1, GISAXS=0.9).items(): topic_object.add(k, v) w = {} row = 0 for key in topic_object: value = topic_object.get(key) w[key] = topic_slider.AGUP_TopicSlider(mw.topic_layout, row, key, value) row += 1 mw.topic_layout.setColumnStretch(1, 3) print 'getFullName', mw.getFullName() print 'getSortName', mw.getSortName() print 'getPhone', mw.getPhone() print 'getEmail', mw.getEmail() print 'getJoined', mw.getJoined() print 'getUrl', mw.getUrl() print 'getNotes', mw.getNotes() mw.show() sys.exit(app.exec_())