Example #1
0
    def showOptions(self,obj,evnt):
        # print(obj)
        panel = GridLayout(cols=1)
        panel.add_widget(Button(text="Catalogar usando ComicVine",size_hint_y=None,size=(0,30),on_press=self.catalogComic))
        panel.add_widget(Button(text="ver info comic",size_hint_y=None,size=(0,30)))
        panel.add_widget(Button(text="Leer Comic",size_hint_y=None,size=(0,30), on_press=self.viewComic))

        self.popup = Popup(title='Opciones',
                           content=panel,
                           size_hint=(.6, None),size=(0,150))
        self.popup.open()
Example #2
0
 def viewComic(self,evnt):
     self.popup.dismiss()
     self.popup = KivyVisor(self.comicBook)
     self.popup.open()
Example #3
0
    def catalogComic(self,evnt):
        self.popup.dismiss()

        self.popup = KivyVineCataloger(self.comicBook)
        self.popup.open()
Example #4
0
class KivySmallComicGui(GridLayout):
    def __init__(self,comicBook, **kwargs):
        super(KivySmallComicGui,self).__init__(**kwargs)
        self.size_hint = (None,None)
        self.size = (160,320)
        self.comicBook = comicBook
        self.panelCover=GridLayout(cols=2)
        if os.path.exists("thumnails\\" + str(comicBook.idFila)+".jpg"):
            self.cover = Image(source = "thumnails\\" + str(comicBook.idFila)+".jpg")
        else:
            self.cover = comicBook.getImagePage()
        # self.cover = Image(source="test.jpg")
        self.cover.size_hint = (None,None )
        self.cover.size = (160,220)
        # self.panelCover.add_widget(self.cover)
        # self.panelBotonera = GridLayout(cols=1,size_hint = (0.1, 1))
        # self.panelCover.add_widget(self.panelBotonera)
        # self.panelBotonera.add_widget(Button(text="add",size_hint=(None,None),size=(32,32)))
        self.add_widget(self.cover)
        self.cols=1
        self.panelLabel = GridLayout(cols=2,size_hint_y=.4)

        self.label = Label(text='[ref=world]{}[/ref]'.format(comicBook.getNombreArchivo()), markup=True,
                           text_size=(140, None))
        self.label.bind(on_ref_press=self.showOptions)
        self.add_widget(self.label)

    def showOptions(self,obj,evnt):
        # print(obj)
        panel = GridLayout(cols=1)
        panel.add_widget(Button(text="Catalogar usando ComicVine",size_hint_y=None,size=(0,30),on_press=self.catalogComic))
        panel.add_widget(Button(text="ver info comic",size_hint_y=None,size=(0,30)))
        panel.add_widget(Button(text="Leer Comic",size_hint_y=None,size=(0,30), on_press=self.viewComic))

        self.popup = Popup(title='Opciones',
                           content=panel,
                           size_hint=(.6, None),size=(0,150))
        self.popup.open()
    def catalogComic(self,evnt):
        self.popup.dismiss()

        self.popup = KivyVineCataloger(self.comicBook)
        self.popup.open()
    def viewComic(self,evnt):
        self.popup.dismiss()
        self.popup = KivyVisor(self.comicBook)
        self.popup.open()
    def salir(self):
        self.popup.dismiss()
Example #5
0
class KivySmallSerieGui(GridLayout):
    def __init__(self, serie, **kwargs):
        super(KivySmallSerieGui, self).__init__(**kwargs)
        self.serie = serie
        self.size_hint = (None, None)
        self.size = (160, 320)
        if serie.hasLocalCover():
            self.cover = Image(source=serie.getCoverLocalPath(),
                               size_hint=(None, None),
                               size=(140, 140))
            self.add_widget(self.cover)
        elif serie.image_url:
            jpg = Stuff.convertAndDownload(
                serie.image_url,
                BabelComicBookManagerConfig().getSerieTempCoverPath())
            self.cover = Image(source=jpg,
                               size_hint=(None, None),
                               size=(140, 140))
            self.add_widget(self.cover)

        self.cols = 1
        self.panelLabel = GridLayout(cols=2, size_hint=(1, 0.7))
        self.check = CheckBox(size_hint=(None, 1), size=(30, 30))
        self.check.bind(active=self.activeEvnt)
        self.panelLabel.add_widget(self.check)
        self.label = Label(text=serie.nombre, text_size=(100, None))
        self.label.size_hint_y = 1
        if Publishers().get(serie.publisherId):
            self.labelEditorial = Label(text=Publishers().get(
                serie.publisherId).name,
                                        text_size=(100, None))
        else:
            self.labelEditorial = Label(text=serie.publisherId,
                                        text_size=(100, None))
        self.labelNumeros = Label(text=serie.cantidadNumeros)
        self.panelLabel.add_widget(self.label)
        self.add_widget(self.panelLabel)
        self.add_widget(self.labelEditorial)
        self.add_widget(self.labelNumeros)

    def activeEvnt(self, obj, evnt):
        if self.check.active:
            if not Series.Series().get(self.serie.id):
                Series.Series().add(self.serie)
        else:
            Series.Series().rm(self.serie.id)

    def showOptions(self, obj, evnt):
        # print(obj)
        panel = GridLayout(cols=1)
        panel.add_widget(
            Button(text="Catalogar usando ComicVine",
                   size_hint_y=None,
                   size=(0, 30)))
        panel.add_widget(
            Button(text="ver info comic", size_hint_y=None, size=(0, 30)))
        panel.add_widget(
            Button(text="Leer Comic",
                   size_hint_y=None,
                   size=(0, 30),
                   on_press=self.viewComic))

        self.popup = Popup(title='Opciones',
                           content=panel,
                           size_hint=(.6, None),
                           size=(0, 150))
        self.popup.open()

    def viewComic(self, evnt):
        self.popup.dismiss()
        self.popup = KivyVisor(self.comicBook)
        self.popup.open()

    def salir(self):
        self.popup.dismiss()