Skip to content
Snippets Groups Projects
Commit 30bcb60f authored by André Machado's avatar André Machado
Browse files

SCRUM#273: melhorias na IHC

parent 5e74edce
No related branches found
No related tags found
1 merge request!2Issue/273
Pipeline #
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
<requires lib="gtk+" version="3.12"/> <requires lib="gtk+" version="3.12"/>
<object class="GtkWindow" id="mainwindow"> <object class="GtkWindow" id="mainwindow">
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="title" translatable="yes">Painel de Controle do Linux Educacional</property>
<property name="resizable">False</property>
<signal name="destroy" handler="onDeleteWindow" swapped="no"/> <signal name="destroy" handler="onDeleteWindow" swapped="no"/>
<child> <child>
<object class="GtkBox" id="mainbox"> <object class="GtkBox" id="mainbox">
...@@ -31,17 +33,32 @@ ...@@ -31,17 +33,32 @@
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<property name="homogeneous">True</property> <property name="homogeneous">True</property>
<child>
<object class="GtkLabel" id="label16">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">&lt;small&gt;Controla os conteúdos que podem ser acessados pelos computadores da rede&lt;/small&gt;</property>
<property name="use_markup">True</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child> <child>
<object class="GtkBox" id="box3"> <object class="GtkBox" id="box3">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">habilitar o controle parental para este computador</property>
<property name="margin_top">3</property> <property name="margin_top">3</property>
<property name="margin_bottom">3</property> <property name="margin_bottom">3</property>
<child> <child>
<object class="GtkLabel" id="label6"> <object class="GtkLabel" id="label6">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="label" translatable="yes">Ligar/desligar localmente</property> <property name="label" translatable="yes">Habilitar localmente</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
...@@ -68,20 +85,21 @@ ...@@ -68,20 +85,21 @@
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">0</property> <property name="position">1</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkBox" id="box4"> <object class="GtkBox" id="box4">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">habilitar o controle parental para todos os computadores da rede</property>
<property name="margin_top">3</property> <property name="margin_top">3</property>
<property name="margin_bottom">3</property> <property name="margin_bottom">3</property>
<child> <child>
<object class="GtkLabel" id="label7"> <object class="GtkLabel" id="label7">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="label" translatable="yes">Ligar/desligar na rede</property> <property name="label" translatable="yes">Habilitar na rede</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
...@@ -108,7 +126,7 @@ ...@@ -108,7 +126,7 @@
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">1</property> <property name="position">2</property>
</packing> </packing>
</child> </child>
</object> </object>
...@@ -119,7 +137,10 @@ ...@@ -119,7 +137,10 @@
<object class="GtkLabel" id="label1"> <object class="GtkLabel" id="label1">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="label" translatable="yes">Family Shield</property> <property name="label" translatable="yes">Controle parental</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object> </object>
</child> </child>
</object> </object>
...@@ -158,6 +179,21 @@ ...@@ -158,6 +179,21 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="label17">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">&lt;small&gt;Ferramenta de gerenciamento de laboratório&lt;/small&gt;</property>
<property name="use_markup">True</property>
<property name="ellipsize">end</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child> <child>
<object class="GtkBox" id="box11"> <object class="GtkBox" id="box11">
<property name="visible">True</property> <property name="visible">True</property>
...@@ -193,7 +229,7 @@ ...@@ -193,7 +229,7 @@
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">0</property> <property name="position">1</property>
</packing> </packing>
</child> </child>
<child> <child>
...@@ -210,7 +246,7 @@ ...@@ -210,7 +246,7 @@
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">False</property> <property name="fill">False</property>
<property name="position">1</property> <property name="position">2</property>
</packing> </packing>
</child> </child>
</object> </object>
...@@ -222,6 +258,9 @@ ...@@ -222,6 +258,9 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="label" translatable="yes">Epoptes</property> <property name="label" translatable="yes">Epoptes</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object> </object>
</child> </child>
</object> </object>
...@@ -256,37 +295,66 @@ ...@@ -256,37 +295,66 @@
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="left_padding">12</property> <property name="left_padding">12</property>
<child> <child>
<object class="GtkBox" id="box5"> <object class="GtkBox" id="box1">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="margin_top">3</property> <property name="orientation">vertical</property>
<property name="margin_bottom">3</property>
<child> <child>
<object class="GtkLabel" id="label8"> <object class="GtkLabel" id="label18">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="label" translatable="yes">Ligar/desligar</property> <property name="label" translatable="yes">&lt;small&gt;Atualiza os pacotes do computador diáriamente&lt;/small&gt;</property>
<property name="use_markup">True</property>
<property name="ellipsize">end</property>
<property name="xalign">0</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">False</property>
<property name="position">0</property> <property name="position">0</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkSwitch" id="switch3"> <object class="GtkBox" id="box5">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">False</property>
<property name="halign">end</property> <property name="tooltip_text" translatable="yes">Habilitar atualização automática dos pacotes do sistema.
<property name="valign">start</property> A atualização ocorrerá uma vez por dia</property>
<property name="active">True</property> <property name="margin_top">3</property>
<property name="state">True</property> <property name="margin_bottom">3</property>
<signal name="state-set" handler="onToggleAutoupgrade" swapped="no"/> <child>
<object class="GtkLabel" id="label8">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Habilitar</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkSwitch" id="switch3">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">end</property>
<property name="valign">start</property>
<property name="active">True</property>
<property name="state">True</property>
<signal name="state-set" handler="onToggleAutoupgrade" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">1</property> <property name="position">1</property>
</packing> </packing>
</child> </child>
...@@ -298,7 +366,10 @@ ...@@ -298,7 +366,10 @@
<object class="GtkLabel" id="label3"> <object class="GtkLabel" id="label3">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="label" translatable="yes">le-autoupgrade</property> <property name="label" translatable="yes">Sistema de atualização automática</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object> </object>
</child> </child>
</object> </object>
...@@ -335,14 +406,41 @@ ...@@ -335,14 +406,41 @@
<property name="margin_bottom">3</property> <property name="margin_bottom">3</property>
<property name="left_padding">12</property> <property name="left_padding">12</property>
<child> <child>
<object class="GtkButton" id="button1"> <object class="GtkBox" id="box12">
<property name="label" translatable="yes">Abrir Pasta compartilhada</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">False</property>
<property name="receives_default">True</property> <property name="orientation">vertical</property>
<property name="halign">start</property> <child>
<property name="valign">start</property> <object class="GtkLabel" id="label19">
<signal name="clicked" handler="onSharedFolderButtonPressed" swapped="no"/> <property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">&lt;small&gt;O conteúdo da pasta compartilhada poderá ser acessado pelos alunos&lt;/small&gt;</property>
<property name="use_markup">True</property>
<property name="ellipsize">end</property>
<property name="xalign">0.10000000149011612</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="button1">
<property name="label" translatable="yes">Abrir Pasta compartilhada</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="halign">start</property>
<property name="valign">start</property>
<signal name="clicked" handler="onSharedFolderButtonPressed" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object> </object>
</child> </child>
</object> </object>
...@@ -352,6 +450,9 @@ ...@@ -352,6 +450,9 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="label" translatable="yes">Pasta compartilhada</property> <property name="label" translatable="yes">Pasta compartilhada</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object> </object>
</child> </child>
</object> </object>
...@@ -390,10 +491,26 @@ ...@@ -390,10 +491,26 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="label20">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">&lt;small&gt;Gerenciar conteúdos educacionais extraídos do Portal MEC&lt;/small&gt;</property>
<property name="use_markup">True</property>
<property name="ellipsize">end</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child> <child>
<object class="GtkBox" id="box7"> <object class="GtkBox" id="box7">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Número de arquivos baixados do Portal MEC para este computador</property>
<property name="margin_top">3</property> <property name="margin_top">3</property>
<property name="margin_bottom">3</property> <property name="margin_bottom">3</property>
<child> <child>
...@@ -409,10 +526,9 @@ ...@@ -409,10 +526,9 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel" id="label10"> <object class="GtkLabel" id="labelArquivosEdubar">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="label" translatable="yes">'numero de arquivos aqui'</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
...@@ -425,13 +541,14 @@ ...@@ -425,13 +541,14 @@
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">0</property> <property name="position">1</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkBox" id="box8"> <object class="GtkBox" id="box8">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Espaço de armazenamento utilizado por arquivos baixados do Portal MEC neste computador</property>
<property name="margin_top">3</property> <property name="margin_top">3</property>
<property name="margin_bottom">3</property> <property name="margin_bottom">3</property>
<child> <child>
...@@ -447,10 +564,9 @@ ...@@ -447,10 +564,9 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel" id="label12"> <object class="GtkLabel" id="labelArmazenamentoEdubar">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="label" translatable="yes">'tamanho do espaço aqui'</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
...@@ -463,20 +579,21 @@ ...@@ -463,20 +579,21 @@
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">1</property> <property name="position">2</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkBox" id="box9"> <object class="GtkBox" id="box9">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Habilitar compartilhamento de conteúdo educacional na rede P2P</property>
<property name="margin_top">3</property> <property name="margin_top">3</property>
<property name="margin_bottom">3</property> <property name="margin_bottom">3</property>
<child> <child>
<object class="GtkLabel" id="label13"> <object class="GtkLabel" id="label13">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="label" translatable="yes">Ligar/desligar modo P2P</property> <property name="label" translatable="yes">Habilitar modo P2P</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
...@@ -503,7 +620,7 @@ ...@@ -503,7 +620,7 @@
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">2</property> <property name="position">3</property>
</packing> </packing>
</child> </child>
</object> </object>
...@@ -514,7 +631,10 @@ ...@@ -514,7 +631,10 @@
<object class="GtkLabel" id="label5"> <object class="GtkLabel" id="label5">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="label" translatable="yes">le-edubar</property> <property name="label" translatable="yes">Conteúdos educacionais</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object> </object>
</child> </child>
</object> </object>
......
...@@ -12,40 +12,63 @@ class Handler: ...@@ -12,40 +12,63 @@ class Handler:
def onToggleLocalFamilyShield(self, switch, args): def onToggleLocalFamilyShield(self, switch, args):
if(switch.get_active()): if(switch.get_active()):
# TODO: ativar Family Shield local
print("Family Shield ligado localmente") print("Family Shield ligado localmente")
else: else:
# TODO: desativar Family Shield local
print("Family Shield desligado localmente") print("Family Shield desligado localmente")
def onToggleNetworkFamilyShield(self, switch, args): def onToggleNetworkFamilyShield(self, switch, args):
if(switch.get_active()): if(switch.get_active()):
# TODO: ativar Family Shield na rede
print("Family Shield ligado na rede") print("Family Shield ligado na rede")
else: else:
# TODO: desativar Family Shield na rede
print("Family Shield desligado na rede") print("Family Shield desligado na rede")
def onEpoptesButtonPressed(self, button): def onEpoptesButtonPressed(self, button):
# TODO: abrir Epoptes
print("Botao Epoptes pressionado!") print("Botao Epoptes pressionado!")
def onToggleAutoupgrade(self, switch, args): def onToggleAutoupgrade(self, switch, args):
if(switch.get_active()): if(switch.get_active()):
# TODO: ativar le-autoupgrade
print("le-autoupgrade ligado") print("le-autoupgrade ligado")
else: else:
# TODO: desativar le-autoupgrade
print("le-autoupgrade desligado") print("le-autoupgrade desligado")
def onSharedFolderButtonPressed(self, button): def onSharedFolderButtonPressed(self, button):
# TODO: abrir a pasta compartilhada
print("Botao Pasta compartilhada pressionado!") print("Botao Pasta compartilhada pressionado!")
def onToggleEdubarP2P(self, switch, args): def onToggleEdubarP2P(self, switch, args):
if(switch.get_active()): if(switch.get_active()):
# TODO: ativar P2P
print("P2P ligado") print("P2P ligado")
else: else:
# TODO: desativar P2P
print("P2P desligado") print("P2P desligado")
def getNumArquivosEdubar():
# TODO: retornar uma string contendo o numero de arquivos correto
return "10"
def getArmazenamentoEdubar():
# TODO: retornar uma string contendo o espaco de armazenamento
return "15Mb"
if __name__ == "__main__": if __name__ == "__main__":
builder = Gtk.Builder() builder = Gtk.Builder()
builder.add_from_file("le-control-panel.glade") builder.add_from_file("le-control-panel.glade")
builder.connect_signals(Handler()) builder.connect_signals(Handler())
window = builder.get_object("mainwindow") window = builder.get_object("mainwindow")
labelNumArquivosEdubar = builder.get_object("labelArquivosEdubar")
labelNumArquivosEdubar.set_label(getNumArquivosEdubar())
labelArmazenamentoEdubar = builder.get_object("labelArmazenamentoEdubar")
labelArmazenamentoEdubar.set_label(getArmazenamentoEdubar())
window.show_all() window.show_all()
Gtk.main() Gtk.main()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment