Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamu <samurey@gmail.com>2013-02-05 22:59:34 (GMT)
committer Samu <samurey@gmail.com>2013-02-05 22:59:34 (GMT)
commit73731b195a218d83459646b4b0b3bf7ca7b8c3e6 (patch)
tree85fc3a2d3d83aaf87d8b5edc3e62daf5fef55004
parent9d217c696d6db6e514c67a3ea676ce31fdee0f41 (diff)
Commit inicial del proyecto del cliente. GUI base
-rw-r--r--EjercitarClient/.project17
-rw-r--r--EjercitarClient/.pydevproject10
-rw-r--r--EjercitarClient/gui/ContenedorTemas.py33
-rw-r--r--EjercitarClient/gui/ContenedorTemas.pycbin0 -> 1343 bytes
-rw-r--r--EjercitarClient/gui/EjercitarGUI.py47
-rw-r--r--EjercitarClient/gui/EjercitarGUI.pycbin0 -> 1857 bytes
-rw-r--r--EjercitarClient/gui/Ejercitario.py66
-rw-r--r--EjercitarClient/gui/Ejercitario.pycbin0 -> 2611 bytes
-rw-r--r--EjercitarClient/gui/Login.py124
-rw-r--r--EjercitarClient/gui/Login.pycbin0 -> 4124 bytes
-rw-r--r--EjercitarClient/gui/Temas.py46
-rw-r--r--EjercitarClient/gui/Temas.pycbin0 -> 1749 bytes
-rw-r--r--EjercitarClient/gui/__init__.py0
-rw-r--r--EjercitarClient/gui/__init__.pycbin0 -> 148 bytes
-rw-r--r--EjercitarClient/images/casa.pngbin0 -> 19398 bytes
-rw-r--r--EjercitarClient/images/enamorado.pngbin0 -> 7836 bytes
-rw-r--r--EjercitarClient/images/familia1.pngbin0 -> 23315 bytes
-rw-r--r--EjercitarClient/images/feliz.pngbin0 -> 7189 bytes
-rw-r--r--EjercitarClient/images/suenho.pngbin0 -> 9092 bytes
-rw-r--r--EjercitarClient/images/triste.pngbin0 -> 9769 bytes
20 files changed, 343 insertions, 0 deletions
diff --git a/EjercitarClient/.project b/EjercitarClient/.project
new file mode 100644
index 0000000..edf3299
--- /dev/null
+++ b/EjercitarClient/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>EjercitarClient</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.python.pydev.PyDevBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.python.pydev.pythonNature</nature>
+ </natures>
+</projectDescription>
diff --git a/EjercitarClient/.pydevproject b/EjercitarClient/.pydevproject
new file mode 100644
index 0000000..a69582a
--- /dev/null
+++ b/EjercitarClient/.pydevproject
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?eclipse-pydev version="1.0"?>
+
+<pydev_project>
+<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
+<path>/EjercitarClient</path>
+</pydev_pathproperty>
+<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
+<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
+</pydev_project>
diff --git a/EjercitarClient/gui/ContenedorTemas.py b/EjercitarClient/gui/ContenedorTemas.py
new file mode 100644
index 0000000..279a31b
--- /dev/null
+++ b/EjercitarClient/gui/ContenedorTemas.py
@@ -0,0 +1,33 @@
+'''
+Created on Feb 4, 2013
+
+@author: Samu
+'''
+import gtk
+from gui.Ejercitario import Ejercitario
+
+class ContenedorTemas(gtk.HBox):
+
+ # This is a callback function. The data arguments are ignored
+ # in this example. More on callbacks below.
+
+
+ def __init__(self, id_tema, descripcion, ventana_padre, vista_temas):
+ # create a new window
+ super(ContenedorTemas, self).__init__()
+ self.ventana_padre = ventana_padre
+ self.vista_temas = vista_temas
+
+ label_descripcion = gtk.Label(descripcion)
+
+ boton = gtk.Button("Comenzar")
+ boton.connect("clicked", self.__comenzar_cb)
+
+ self.add(label_descripcion)
+ self.add(boton)
+
+ def __comenzar_cb(self, boton):
+ self.ventana_padre.remove(self.vista_temas)
+ ejercitario = Ejercitario()
+ self.ventana_padre.add (ejercitario)
+ \ No newline at end of file
diff --git a/EjercitarClient/gui/ContenedorTemas.pyc b/EjercitarClient/gui/ContenedorTemas.pyc
new file mode 100644
index 0000000..3d549fb
--- /dev/null
+++ b/EjercitarClient/gui/ContenedorTemas.pyc
Binary files differ
diff --git a/EjercitarClient/gui/EjercitarGUI.py b/EjercitarClient/gui/EjercitarGUI.py
new file mode 100644
index 0000000..cfc3fd7
--- /dev/null
+++ b/EjercitarClient/gui/EjercitarGUI.py
@@ -0,0 +1,47 @@
+'''
+Created on Feb 2, 2013
+
+@author: Samu
+'''
+import gtk
+import gobject
+from gui.Login import Login
+from gui.Temas import Temas
+
+class EjercitarGUI:
+
+ # This is a callback function. The data arguments are ignored
+ # in this example. More on callbacks below.
+ def hello(self, widget, data=None):
+ print "Hello World"
+
+ def delete_event(self, widget, event, data=None):
+ # If you return FALSE in the "delete_event" signal handler,
+ # GTK will emit the "destroy" signal. Returning TRUE means
+ # you don't want the window to be destroyed.
+ # This is useful for popping up 'are you sure you want to quit?'
+ # type dialogs.
+ print "delete event occurred"
+
+ # Change FALSE to TRUE and the main window will not be destroyed
+ # with a "delete_event".
+ return False
+
+ def destroy(self, widget, data=None):
+ print "destroy signal occurred"
+ gtk.main_quit()
+
+ def __init__(self):
+ # create a new window
+ self.ventana = gtk.Window(gtk.WINDOW_TOPLEVEL)
+ login = Login(self.ventana)
+ self.ventana.add(login)
+ self.ventana.show()
+
+ def main(self):
+ gtk.main()
+
+
+if __name__ == "__main__":
+ hello = EjercitarGUI()
+ hello.main() \ No newline at end of file
diff --git a/EjercitarClient/gui/EjercitarGUI.pyc b/EjercitarClient/gui/EjercitarGUI.pyc
new file mode 100644
index 0000000..9bfccaf
--- /dev/null
+++ b/EjercitarClient/gui/EjercitarGUI.pyc
Binary files differ
diff --git a/EjercitarClient/gui/Ejercitario.py b/EjercitarClient/gui/Ejercitario.py
new file mode 100644
index 0000000..5488c30
--- /dev/null
+++ b/EjercitarClient/gui/Ejercitario.py
@@ -0,0 +1,66 @@
+'''
+Created on Feb 4, 2013
+
+@author: Samu
+'''
+
+import gtk
+
+class Ejercitario(gtk.VBox):
+
+ # This is a callback function. The data arguments are ignored
+ # in this example. More on callbacks below.
+
+
+ def __init__(self):
+ # create a new window
+ super(Ejercitario, self).__init__()
+ self.__inicializar_componentes()
+ self.__calcular_siguiente_ejercicio()
+ self.__organizar_gui()
+ #self.__sincronizar_temas()
+ self.show_all()
+
+ def __inicializar_componentes(self):
+ self.label_planteamiento = gtk.Label()
+ self.solucion1 = gtk.RadioButton()
+ self.solucion2 = gtk.RadioButton()
+ self.solucion3 = gtk.RadioButton()
+ self.solucion4 = gtk.RadioButton()
+
+ self.solucion2.set_group(self.solucion1)
+ self.solucion3.set_group(self.solucion1)
+ self.solucion4.set_group(self.solucion1)
+
+ self.boton_responder = gtk.Button("Responder")
+ self.boton_responder.connect("clicked", self.__responder_cb)
+
+ def __organizar_gui(self):
+
+ #prueba
+ self.solucion1.set_label("prueba1")
+ self.solucion2.set_label("prueba2")
+ self.solucion3.set_label("prueba3")
+ self.solucion4.set_label("prueba4")
+ self.label_planteamiento.set_label("Descripcion de prueba")
+ #prueba
+
+ contenedor_soluciones = gtk.HBox()
+ contenedor_soluciones.add(self.solucion1)
+ contenedor_soluciones.add(self.solucion2)
+ contenedor_soluciones.add(self.solucion3)
+ contenedor_soluciones.add(self.solucion4)
+
+ self.add(self.label_planteamiento)
+ self.add(contenedor_soluciones)
+ self.add(self.boton_responder)
+ self.show_all()
+
+ def __sincronizar_temas(self):
+ pass
+
+ def __calcular_siguiente_ejercicio(self):
+ pass
+
+ def __responder_cb(self, boton):
+ pass
diff --git a/EjercitarClient/gui/Ejercitario.pyc b/EjercitarClient/gui/Ejercitario.pyc
new file mode 100644
index 0000000..4a49404
--- /dev/null
+++ b/EjercitarClient/gui/Ejercitario.pyc
Binary files differ
diff --git a/EjercitarClient/gui/Login.py b/EjercitarClient/gui/Login.py
new file mode 100644
index 0000000..3e0c3d1
--- /dev/null
+++ b/EjercitarClient/gui/Login.py
@@ -0,0 +1,124 @@
+'''
+Created on Feb 2, 2013
+
+@author: Samu
+'''
+import gtk
+from gui.Temas import Temas
+
+class Login(gtk.VBox):
+
+ # This is a callback function. The data arguments are ignored
+ # in this example. More on callbacks below.
+
+
+ def __init__(self, ventana_padre):
+ # create a new window
+ super(Login, self).__init__()
+ self.ventana_padre = ventana_padre
+ self.__inicializar_componentes()
+ self.__organizar_gui()
+ self.show_all()
+
+ def __inicializar_componentes(self):
+ self.nombreEscuela_label = gtk.Label('escuela')
+ self.nombreEscuela_entry = gtk.Entry()
+ self.nombreEscuela_entry.set_text("Escuela graduada falsa") #prueba
+ self.id_estudiante_label = gtk.Label("idEstudiante")
+ self.id_estudiante_entry = gtk.Entry()
+ self.nombre_label = gtk.Label("nombre")
+ self.nombre_entry = gtk.Entry()
+ self.apellido_label = gtk.Label("apellido")
+ self.apellido_entry = gtk.Entry()
+
+ self.feliz = gtk.RadioButton(None, "feliz")
+ self.triste = gtk.RadioButton(None, "triste")
+ self.enamorado = gtk.RadioButton(None, "enamorado")
+ self.suenho = gtk.RadioButton(None, "suenho")
+ self.ninguno = gtk.RadioButton(None, "ninguno")
+ self.feliz.set_group(self.ninguno)
+ self.triste.set_group(self.ninguno)
+ self.enamorado.set_group(self.ninguno)
+ self.suenho.set_group(self.ninguno)
+
+ self.imagen_feliz = gtk.Image()
+ self.imagen_feliz.set_from_file("feliz.png")
+ self.feliz.set_image(self.imagen_feliz)
+ #self.feliz.add(self.imagen_feliz)
+
+ self.ayuda_padres_ninguno = gtk.RadioButton(None, "nada")
+ self.ayuda_padres_si = gtk.RadioButton(None, "ayuda si")
+ self.ayuda_padres_no = gtk.RadioButton(None, "ayuda no")
+ self.ayuda_padres_si.set_group(self.ayuda_padres_ninguno)
+ self.ayuda_padres_no.set_group(self.ayuda_padres_ninguno)
+
+ self.desde_hogar_ninguno = gtk.RadioButton(None, "nada2")
+ self.desde_hogar_si = gtk.RadioButton(None, "hogar si")
+ self.desde_hogar_no = gtk.RadioButton(None, "hogar no")
+ self.desde_hogar_si.set_group(self.desde_hogar_ninguno)
+ self.desde_hogar_no.set_group(self.desde_hogar_ninguno)
+
+ def __organizar_gui(self):
+
+ contenedor_escuela = gtk.VBox()
+ contenedor_datos = gtk.VBox()
+ contenedor_estado_animo = gtk.HBox()
+ contenedor_ayuda = gtk.HBox()
+ contenedor_casa = gtk.HBox()
+
+ frame_escuela = gtk.Frame("Escuela")
+ frame_datos = gtk.Frame("Datos")
+ frame_estado_animo = gtk.Frame("Estado de animo")
+ frame_ayuda = gtk.Frame("Ayuda de padres?")
+ frame_casa = gtk.Frame("Hizo en casa?")
+
+ self.boton_siguiente = gtk.Button("Continuar")
+ self.boton_siguiente.connect("clicked", self.__ingresar_cb)
+
+ frame_escuela.add(contenedor_escuela)
+ frame_datos.add(contenedor_datos)
+ frame_estado_animo.add(contenedor_estado_animo)
+ frame_ayuda.add(contenedor_ayuda)
+ frame_casa.add(contenedor_casa)
+
+ formulario_id_estudiante = gtk.HBox()
+ formulario_nombre = gtk.HBox()
+ formulario_apellido = gtk.HBox()
+ formulario_id_estudiante.add(self.id_estudiante_label)
+ formulario_id_estudiante.add(self.id_estudiante_entry)
+ formulario_nombre.add(self.nombre_label)
+ formulario_nombre.add(self.nombre_entry)
+ formulario_apellido.add(self.apellido_label)
+ formulario_apellido.add(self.apellido_entry)
+
+ self.add(frame_escuela)
+ self.add(frame_datos)
+ self.add(frame_estado_animo)
+ self.add(frame_ayuda)
+ self.add(frame_casa)
+ self.add(self.boton_siguiente)
+
+ contenedor_escuela.add(self.nombreEscuela_entry)
+
+ contenedor_datos.add(formulario_id_estudiante)
+ contenedor_datos.add(formulario_nombre)
+ contenedor_datos.add(formulario_apellido)
+
+ contenedor_estado_animo.add(self.feliz)
+ contenedor_estado_animo.add(self.triste)
+ contenedor_estado_animo.add(self.enamorado)
+ contenedor_estado_animo.add(self.suenho)
+ contenedor_estado_animo.add(self.ninguno)
+
+ contenedor_ayuda.add(self.ayuda_padres_ninguno)
+ contenedor_ayuda.add(self.ayuda_padres_si)
+ contenedor_ayuda.add(self.ayuda_padres_no)
+
+ contenedor_casa.add(self.desde_hogar_ninguno)
+ contenedor_casa.add(self.desde_hogar_si)
+ contenedor_casa.add(self.desde_hogar_no)
+
+ def __ingresar_cb(self, boton):
+ self.ventana_padre.remove(self)
+ temas = Temas(self.ventana_padre)
+ self.ventana_padre.add(temas)
diff --git a/EjercitarClient/gui/Login.pyc b/EjercitarClient/gui/Login.pyc
new file mode 100644
index 0000000..18a58e5
--- /dev/null
+++ b/EjercitarClient/gui/Login.pyc
Binary files differ
diff --git a/EjercitarClient/gui/Temas.py b/EjercitarClient/gui/Temas.py
new file mode 100644
index 0000000..679324f
--- /dev/null
+++ b/EjercitarClient/gui/Temas.py
@@ -0,0 +1,46 @@
+'''
+Created on Feb 4, 2013
+
+@author: Samu
+'''
+'''
+Created on Feb 2, 2013
+
+@author: Samu
+'''
+import gtk
+from gui.ContenedorTemas import ContenedorTemas
+
+class Temas(gtk.VBox):
+
+ # This is a callback function. The data arguments are ignored
+ # in this example. More on callbacks below.
+
+
+ def __init__(self, ventana_padre):
+ # create a new window
+ super(Temas, self).__init__()
+ self.ventana_padre = ventana_padre
+
+ self.__inicializar_componentes()
+ self.__organizar_gui()
+ self.__sincronizar_temas()
+ self.show_all()
+
+ def __inicializar_componentes(self):
+ self.prueba1 = ContenedorTemas(1, "prueba 1", self.ventana_padre, self)
+ self.prueba2 = ContenedorTemas(1, "prueba 2", self.ventana_padre, self)
+ self.prueba3 = ContenedorTemas(1, "prueba 3", self.ventana_padre, self)
+
+ def __organizar_gui(self):
+
+ contenedor_lista = gtk.VBox()
+ contenedor_lista.add(self.prueba1)
+ contenedor_lista.add(self.prueba2)
+ contenedor_lista.add(self.prueba3)
+
+ self.add(contenedor_lista)
+ self.show_all()
+
+ def __sincronizar_temas(self):
+ pass
diff --git a/EjercitarClient/gui/Temas.pyc b/EjercitarClient/gui/Temas.pyc
new file mode 100644
index 0000000..a35fa82
--- /dev/null
+++ b/EjercitarClient/gui/Temas.pyc
Binary files differ
diff --git a/EjercitarClient/gui/__init__.py b/EjercitarClient/gui/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/EjercitarClient/gui/__init__.py
diff --git a/EjercitarClient/gui/__init__.pyc b/EjercitarClient/gui/__init__.pyc
new file mode 100644
index 0000000..0ff6890
--- /dev/null
+++ b/EjercitarClient/gui/__init__.pyc
Binary files differ
diff --git a/EjercitarClient/images/casa.png b/EjercitarClient/images/casa.png
new file mode 100644
index 0000000..8740739
--- /dev/null
+++ b/EjercitarClient/images/casa.png
Binary files differ
diff --git a/EjercitarClient/images/enamorado.png b/EjercitarClient/images/enamorado.png
new file mode 100644
index 0000000..ed15ab3
--- /dev/null
+++ b/EjercitarClient/images/enamorado.png
Binary files differ
diff --git a/EjercitarClient/images/familia1.png b/EjercitarClient/images/familia1.png
new file mode 100644
index 0000000..ea148d2
--- /dev/null
+++ b/EjercitarClient/images/familia1.png
Binary files differ
diff --git a/EjercitarClient/images/feliz.png b/EjercitarClient/images/feliz.png
new file mode 100644
index 0000000..b596e56
--- /dev/null
+++ b/EjercitarClient/images/feliz.png
Binary files differ
diff --git a/EjercitarClient/images/suenho.png b/EjercitarClient/images/suenho.png
new file mode 100644
index 0000000..0e38a7d
--- /dev/null
+++ b/EjercitarClient/images/suenho.png
Binary files differ
diff --git a/EjercitarClient/images/triste.png b/EjercitarClient/images/triste.png
new file mode 100644
index 0000000..31db931
--- /dev/null
+++ b/EjercitarClient/images/triste.png
Binary files differ