Skip to content

Commit

Permalink
Merge branch 'release/v1.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
lariodiniz committed Jul 3, 2019
2 parents e8c58e9 + b090241 commit bde2a81
Show file tree
Hide file tree
Showing 45 changed files with 463 additions and 237 deletions.
4 changes: 4 additions & 0 deletions img/atribuicao_newspaper.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<div>Icons made by <a href="https://www.flaticon.com/authors/dinosoftlabs" title="DinosoftLabs">DinosoftLabs</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a> is licensed by <a href="http://creativecommons.org/licenses/by/3.0/"


title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a></div>
Binary file added img/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/calendar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed img/logo.png
Binary file not shown.
Binary file added img/report.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/resume.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/warning.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Empty file added infra/controller/__init__.py
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion infra/regras/meses.py → infra/controller/meses.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class Mes():

@staticmethod
def nomes():
return ("Auran", "Borean", "Coronian", "Driadan", "Electran",
return ("Auroran", "Borean", "Coronian", "Driadan", "Electran",
"Faian", "Gaian", "Hermetian", "Irisian", "Kaosian",
"Lunan", "Maian", "Nixian")

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<AnoCalendario>:
color: C("#FFFFFF")
background_color: C("#00BFFF")
background_color: C("#4A93E7")
background_normal: ""
on_press: root.on_press()



2 changes: 1 addition & 1 deletion infra/view/ano_calendario.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from kivy.utils import get_color_from_hex
from kivy.uix.boxlayout import BoxLayout

from infra.regras.data import Data
from infra.controller.data import Data


class AnoCalendario(Button):
Expand Down
2 changes: 1 addition & 1 deletion infra/view/kv/areaanos.kv → infra/view/area_anos.kv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<AreaAnos>:
orientation: "lr-tb"
padding: 3




Expand Down
4 changes: 2 additions & 2 deletions infra/view/area_anos.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from kivy.utils import get_color_from_hex

from infra.view.ano_calendario import AnoCalendario
from infra.regras.data import Data
from infra.controller.data import Data


class AreaAnos(StackLayout):
Expand All @@ -24,7 +24,7 @@ def monta_anos(self):
for numeroAno in range(anoSelecionado-4, anoSelecionado+8):
ano = AnoCalendario(str(numeroAno))
if numeroAno == anoAtual:
ano.background_color = get_color_from_hex("#ADD8E6")
ano.background_color = get_color_from_hex("#DDDDDD")
self.add_widget(ano)

__author__ = "Lário dos Santos Diniz"
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<AreaCalendario>:
orientation: "lr-tb"
padding: 3




Expand Down
4 changes: 2 additions & 2 deletions infra/view/area_calendario.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
from kivy.uix.label import Label

from infra.view.dia_calendario import DiaCalendario
from infra.regras.dia import Dia
from infra.regras.data import Data
from infra.controller.dia import Dia
from infra.controller.data import Data


class AreaCalendario(StackLayout):
Expand Down
11 changes: 6 additions & 5 deletions infra/view/kv/areadata.kv → infra/view/area_data.kv
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<AreaData>:
orientation: "vertical"
padding: 5
padding: 7
canvas:

Color:
rgb: C("#80b3ff")
rgb: C("#1374E4")
Rectangle:
size: root.size
pos: root.pos
Expand All @@ -16,7 +17,7 @@
text: root.dia
bold: True
color: C("#FFFFFF")
background_color: C("#A9A9A9")
background_color: C("#044590")
background_normal: ""
on_press: root.on_press_dia()

Expand All @@ -27,7 +28,7 @@
text: root.mes
bold: True
color: C("#FFFFFF")
background_color: C("#A9A9A9")
background_color: C("#044590")
background_normal: ""
on_press: root.on_press_mes()
Button:
Expand All @@ -37,7 +38,7 @@
text: root.ano
bold: True
color: C("#FFFFFF")
background_color: C("#A9A9A9")
background_color: C("#044590")
background_normal: ""
on_press: root.on_press_ano()

Expand Down
2 changes: 1 addition & 1 deletion infra/view/area_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from kivy.app import App
from kivy.uix.boxlayout import BoxLayout

from infra.regras.data import Data
from infra.controller.data import Data
from kivy.uix.button import Button

from infra.view.area_meses import AreaMeses
Expand Down
18 changes: 18 additions & 0 deletions infra/view/area_menu.kv
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#:import C kivy.utils.get_color_from_hex
<AreaMenu>:
pos_hint: {'top':1} #na parte superior da tela
background_normal:''
background_down: ''
background_color: 0,3, 10, 1
ActionView:

ActionPrevious:
title: root.dataAtual
on_release: root.on_press_menu()
app_icon: root.img_logo
app_icon_width: root.width * 0.18

#ActionButton:
# text: 'Sair'
# on_release: root.confirmacao()

48 changes: 37 additions & 11 deletions infra/view/area_menu.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,51 @@
# coding: utf-8
from datetime import date
__author__ = "Lário dos Santos Diniz"

from kivy.app import App
from kivy.animation import Animation
from kivy.uix.actionbar import ActionBar
from kivy.uix.popup import Popup
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.button import Button
from kivy.uix.image import Image
from kivy.utils import get_color_from_hex


class AreaMenu(BoxLayout):
class AreaMenu(ActionBar):
"""Classe que define a area que mostra o menu."""

def __init__(self, **kwargs):
super(AreaMenu, self).__init__(**kwargs)
self.aplicacao = App.get_running_app()
dataSelecionada = self.aplicacao.dataSelecionada
self.dataAtual = dataSelecionada.dia_numero_mes+' '+dataSelecionada.mes_nome+ ' '+dataSelecionada.ano
self.img_logo = self.aplicacao.pasta_imagens+'icon.png'

super(AreaMenu, self).__init__(**kwargs)

def on_press_dekatrian(self):
self.aplicacao.mudarTela(self.aplicacao.tela_dekatrian)
def on_press_menu(self):
self.aplicacao.mudarTela(self.aplicacao.tela_menu)

def on_press_calendario(self):
self.aplicacao.mudarTela(self.aplicacao.tela_inicial)
def sair(self, *args):
self.aplicacao.stop()

def on_press_desenvolvimento(self):
self.aplicacao.mudarTela(self.aplicacao.tela_desenvolvimento)
def confirmacao(self, *args):
box = BoxLayout(orientation='vertical', padding=10, spacing=10)
botoes = BoxLayout(padding=10, spacing=10)

pop = Popup(title='Deseja mesmo sair?', content=box,
size_hint=(None, None),
size=(150, 150),
background= self.aplicacao.pasta_imagens+'background.png',
)

__author__ = "Lário dos Santos Diniz"
sim = Button(text='Sim', on_release=self.sair)
nao = Button(text='Não', on_release=pop.dismiss)
botoes.add_widget(sim)

botoes.add_widget(nao)
atencao = Image(source=self.aplicacao.pasta_imagens+'warning.png')
box.add_widget(atencao)
box.add_widget(botoes)

anim = Animation(size=(300, 180), duration=0.2, t='out_back')
anim.start(pop)
pop.open()
File renamed without changes.
9 changes: 4 additions & 5 deletions infra/view/area_meses.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@

from kivy.app import App
from kivy.uix.stacklayout import StackLayout
from kivy.uix.button import Button
from kivy.utils import get_color_from_hex

from infra.view.mes_calendario import MesCalendario
from infra.regras.meses import Mes
from infra.regras.data import Data
from infra.controller.meses import Mes
from infra.controller.data import Data


class AreaMeses(StackLayout):
Expand All @@ -25,7 +24,7 @@ def monta_meses(self):
for nomeDoMes in Mes.nomes():
mes = MesCalendario(nomeDoMes)
if (nomeDoMes == mesAtual):
mes.background_color = get_color_from_hex("#ADD8E6")
mes.background_color = get_color_from_hex("#DDDDDD")

self.add_widget(mes)

Expand All @@ -36,7 +35,7 @@ def monta_meses(self):
proximoAno = self.aplicacao.dataSelecionada.to_date.year+1
if self._ehBissexto(proximoAno):
mes = MesCalendario('Sinchronian')
mes.background_color = get_color_from_hex("#DCDCDC")
mes.background_color = get_color_from_hex("#BBBBBB")
self.add_widget(mes)

def _ehBissexto(self, ano):
Expand Down
4 changes: 2 additions & 2 deletions infra/view/kv/areatitulo.kv → infra/view/area_titulo.kv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<AreaTitulo>:
canvas:
Color:
rgb: C("#80b3ff")
rgb: C("#4A93E7")
Rectangle:
size: root.size
pos: root.pos
Expand All @@ -12,7 +12,7 @@
pos_hint: {"right":1, "top":1}
text:root.titulo
color: C("#FFFFFF")
font_height: 20
font_height: 100
ellipsis_options: {'color':(1,0.5,0.5,1),'underline':True}


Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<DiaCalendario>:
color: C("#001f4d")
color: C("#FFFFFF")
background_normal: ""
size_hint: .1428, .2
on_press: root.on_press()
Expand Down
4 changes: 2 additions & 2 deletions infra/view/dia_calendario.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
from kivy.app import App
from kivy.uix.button import Button
from kivy.utils import get_color_from_hex
from kivy.uix.label import Label

from infra.regras.data import Data

from infra.controller.data import Data


class DiaCalendario(Button):
Expand Down
28 changes: 0 additions & 28 deletions infra/view/kv/areamenu.kv

This file was deleted.

32 changes: 0 additions & 32 deletions infra/view/kv/teladekatrian.kv

This file was deleted.

41 changes: 0 additions & 41 deletions infra/view/kv/teladesenvolvimento.kv

This file was deleted.

Loading

0 comments on commit bde2a81

Please sign in to comment.