예제 #1
0
# Copyright © 2009-2010 CEA
# Pierre Raybaut
# Licensed under the terms of the CECILL License
# (see guidata/__init__.py for details)
"""
Handle *guidata* module configuration
(options, images and icons)
"""

import os.path as osp

from guidata.configtools import add_image_module_path, get_translation
from guidata.userconfig import UserConfig

APP_PATH = osp.dirname(__file__)
add_image_module_path("guidata", "images")
_ = get_translation("guidata")

DEFAULTS = {
    'arrayeditor': {
        'font/family/nt': ['Consolas', 'Courier New'],
        'font/family/posix': 'Bitstream Vera Sans Mono',
        'font/family/mac': 'Monaco',
        'font/size': 9,
        'font/bold': False,
    },
    'dicteditor': {
        'font/family/nt': ['Consolas', 'Courier New'],
        'font/family/posix': 'Bitstream Vera Sans Mono',
        'font/family/mac': 'Monaco',
        'font/size': 9,
예제 #2
0
파일: config.py 프로젝트: alimuldal/guiqwt
import os.path as osp

from guidata.configtools import add_image_module_path, get_translation


_ = get_translation( "guiqwt" )


def make_title(basename, count):
    """Make item title with *basename* and *count* number"""
    return "%s %s%d" % (basename, _("#"), count)


APP_PATH = osp.dirname(__file__)
add_image_module_path( "guiqwt", "images" )

DEFAULTS = {
            'plot':
             {
              "selection/distance": 6,
              "antialiasing": False,
              
              "title/font/size": 12,
              "title/font/bold": False,

              "selected_curve_symbol/marker": 'Rect',
              "selected_curve_symbol/edgecolor": "gray",
              "selected_curve_symbol/facecolor": "black",
              "selected_curve_symbol/alpha": .3,
              "selected_curve_symbol/size": 7,
예제 #3
0
파일: config.py 프로젝트: CaptainAL/Spyder
# Pierre Raybaut
# Licensed under the terms of the CECILL License
# (see guidata/__init__.py for details)

"""
Handle *guidata* module configuration
(options, images and icons)
"""

import os.path as osp

from guidata.configtools import add_image_module_path, get_translation
from guidata.userconfig import UserConfig

APP_PATH = osp.dirname(__file__)
add_image_module_path("guidata", "images")
_ = get_translation("guidata")

DEFAULTS = {'arrayeditor':
            {
             'font/family/nt': ['Consolas', 'Courier New'],
             'font/family/posix': 'Bitstream Vera Sans Mono',
             'font/family/mac': 'Monaco',
             'font/size': 9,
             'font/bold': False,
             },
            'dicteditor':
            {
             'font/family/nt': ['Consolas', 'Courier New'],
             'font/family/posix': 'Bitstream Vera Sans Mono',
             'font/family/mac': 'Monaco',
예제 #4
0
파일: config.py 프로젝트: zgpglee/guiqwt
"""

import os.path as osp

from guidata.configtools import add_image_module_path, get_translation

_ = get_translation("guiqwt")


def make_title(basename, count):
    """Make item title with *basename* and *count* number"""
    return "%s %s%d" % (basename, _("#"), count)


APP_PATH = osp.dirname(__file__)
add_image_module_path("guiqwt", "images")

DEFAULTS = {
    'plot': {
        "selection/distance": 6,
        "antialiasing": False,
        "title/font/size": 12,
        "title/font/bold": False,
        "selected_curve_symbol/marker": 'Rect',
        "selected_curve_symbol/edgecolor": "gray",
        "selected_curve_symbol/facecolor": "black",
        "selected_curve_symbol/alpha": .3,
        "selected_curve_symbol/size": 7,

        # Default parameters for plot axes
        "axis/title": "",
예제 #5
0
파일: config.py 프로젝트: mdomox/RRPam-WDS
import os

from guidata.configtools import add_image_module_path
from guiqwt.config import CONF

import rrpam_wds
import rrpam_wds.constants as c
from rrpam_wds.gui import monkey_patch_guiqwt_guidata

# there are some changes to the guiqwt classes to be done. It is not easy to do this by subclassing, as
# we need to use make.* facotry.
monkey_patch_guiqwt_guidata._patch_all()
# show guiqwt where the images are.
add_image_module_path("rrpam_wds.gui", "images")
# this how we change an option

# if there is not .config directory in the home directory, create it.
configfile = os.path.join(c.HOMEDIR, '.config')
if (os.path.isfile(configfile) and (not os.path.isdir(configfile))):
    os.unlink(configfile)
if (not os.path.isdir(configfile)):
    os.mkdir(configfile)

DEFAULTS = {
    'plot': {
        "selection/distance": 10,
    }
}
CONF.update_defaults(DEFAULTS)
CONF.set_application("rrpamwds", version=rrpam_wds.__version__)