def create_image(name):
    service = ServiceManager.getService(name)
    path = ''
    link = ''
    if service:
        path = service.image
        link = service.cardURL()
    pixmap = QtGui.QImage(_fromUtf8(path))
    IMAGES_CACHE[name] = (pixmap, link)
    return (pixmap, link)
def create_image(name):
    service = ServiceManager.getService(name)
    path = ''
    link = ''
    if service:
        path = service.image
        link = service.cardURL()
    pixmap = QtGui.QImage(_fromUtf8(path))
    IMAGES_CACHE[name] = (pixmap, link)
    return (pixmap, link)
Exemple #3
0
import os, sys
from AniChou import gui
from AniChou.config import BaseConfig
from AniChou.services import ServiceManager
from AniChou.tracker import tracker

# Check for AniChou home path existence
# Create it if not existient
if not os.path.isdir(settings.USER_PATH):
    os.mkdir(settings.USER_PATH)


# Run command line option parser and configuration parser
cfg = BaseConfig()
tracker.set_config(cfg)
ServiceManager.setConfig(cfg)

## RUN THE APPLICATION
if cfg.startup.get('gui'):
    ## ONLY RUN GUI IF CLI OPTION NOT SET ##
    with ServiceManager as service:
        gui.Qt(service, cfg)
else:
    logging.warn('no-gui option set')

logging.info('Shutting down, bye bye..')

try:
    tracker.stop()
except RuntimeError:
    pass
Exemple #4
0
 def newSearch(self):
     text = self.ui.searchBox.text()
     ServiceManager.search(text)
Exemple #5
0
 def newSearch(self):
     text = self.ui.searchBox.text()
     ServiceManager.search(text)