]> git.zarvox.org Git - wp3.git/commitdiff
Add a "completed" page with a stub to be used to commit adding the person to the...
authorDrew Fisher <drew.m.fisher@gmail.com>
Fri, 3 Jul 2009 23:04:36 +0000 (18:04 -0500)
committerDrew Fisher <drew.m.fisher@gmail.com>
Fri, 3 Jul 2009 23:04:36 +0000 (18:04 -0500)
General wizard page cleanup.

newpersonwizard.py
pagecommit.py [new file with mode: 0644]
pagenetid.py
pagenewuserdata.py

index dbbb3d978818ca7c3e5d47e384095ea50fc044f4..bff756382bc9746bfd4e49fa1f2fbcc5461ac7d8 100644 (file)
@@ -3,12 +3,14 @@ from PyQt4.QtGui import *
 
 from pagenewuserdata import PageNewUserData
 from pagenetid import PageNetID
+from pagecommit import PageCommit
 
 class NewPersonWizard(QWizard):
        def __init__(self, parent=None):
                QWizard.__init__(self, parent)
                self.addPage(PageNetID())
                self.addPage(PageNewUserData())
+               self.addPage(PageCommit())
                self.resize(400,300)
                self.show()
 
diff --git a/pagecommit.py b/pagecommit.py
new file mode 100644 (file)
index 0000000..547b2e3
--- /dev/null
@@ -0,0 +1,25 @@
+from PyQt4.QtCore import *
+from PyQt4.QtGui import *
+
+class PageCommit(QWizardPage):
+       def __init__(self, parent=None):
+               QWizardPage.__init__(self,parent)
+               self.instructions = QLabel("You're done with the computer.  Go have your picture taken.\n\nThe SAs/PAs will add the photo to your data.")
+               self.instructions.setWordWrap(True)
+               self.grid = QGridLayout()
+               self.grid.addWidget(self.instructions,0,0)
+               self.setLayout(self.grid)
+               self.setTitle("Move-in Wizard")
+               self.setSubTitle("Photo")
+       def initializePage(self):
+               pass # handle committing the data from the previous pages to the DB
+
+if __name__ == "__main__":
+       a = QApplication([""])
+       wiz = QWizard()
+       p = PageCommit()
+       wiz.addPage(p)
+       wiz.resize(400,300)
+       wiz.show()
+       a.exec_()
+
index 3f7abefba95a2d12e0236823598db35193933743..a44f08f9ade175275f6af19fb88a6b1dc28bed64 100644 (file)
@@ -4,7 +4,6 @@ from PyQt4.QtGui import *
 class PageNetID(QWizardPage):
        def __init__(self, parent=None):
                QWizardPage.__init__(self,parent)
-               self.completed = False # Is the page done being filled out?
                self.instructions = QLabel("&Enter your NetID:")
                self.netid = QLineEdit()
                self.instructions.setBuddy(self.netid)
index 57d8489b74adbc8530c6410a96105945d9fbfc8e..bb11bbe6995f8c8ff4cfa21915bc6939687d2223 100644 (file)
@@ -47,16 +47,16 @@ class PageNewUserData(QWizardPage):
                self.room.setMaxLength(3)
 
                # Register fields with QWizard
-               self.registerField("surname*", self.surname, "text", SIGNAL("textChanged(QString)"))
-               self.registerField("firstname*", self.firstname, "text", SIGNAL("textChanged(QString)"))
-               self.registerField("phone", self.phone, "text", SIGNAL("textChanged(QString)"))
-               self.registerField("email*", self.email, "text", SIGNAL("textChanged(QString)"))
-               self.registerField("major", self.major, "text", SIGNAL("textChanged(QString)"))
-               self.registerField("dorm", self.dorm, "currentIndex", SIGNAL("currentIndexChanged(int)"))
-               self.registerField("room*", self.room, "text", SIGNAL("textChanged(QString)"))
-               self.registerField("year", self.year, "currentIndex", SIGNAL("currentIndexChanged(int)"))
-               self.registerField("month", self.month, "currentIndex", SIGNAL("currentIndexChanged(int)"))
-               self.registerField("day", self.day, "currentIndex", SIGNAL("currentIndexChanged(int)"))
+               self.registerField("surname*", self.surname)
+               self.registerField("firstname*", self.firstname)
+               self.registerField("phone", self.phone)
+               self.registerField("email*", self.email)
+               self.registerField("major", self.major)
+               self.registerField("dorm", self.dorm)
+               self.registerField("room*", self.room)
+               self.registerField("year", self.year)
+               self.registerField("month", self.month)
+               self.registerField("day", self.day)
                
 
                # Set up layout