Exemple #1
0
 def __init__(self):
     LOGGING_LEVEL = logging.DEBUG if proxy.prefValue_(
         'DebugMode') else logging.WARNING
     logging.basicConfig(level=LOGGING_LEVEL,
                         format='%(levelname)s %(message)s',
                         handlers=[CocoaHandler()])
     install_exception_hook('https://github.com/hsoft/moneyguru/issues')
     logging.debug('started in debug mode')
     cache_path = op.join(proxy.getCachePath(), 'moneyGuru')
     appdata_path = op.join(proxy.getAppdataPath(), 'moneyGuru')
     currency_code = nonone(proxy.systemCurrency(), 'USD')
     logging.info('Currency code: {0}'.format(currency_code))
     try:
         system_currency = Currency(currency_code)
     except ValueError:  # currency does not exist
         logging.warning(
             'System currency {0} is not supported. Falling back to USD.'.
             format(currency_code))
         system_currency = USD
     date_format = proxy.systemShortDateFormat()
     logging.info('System date format: %s' % date_format)
     date_format = clean_format(date_format)
     logging.info('Cleaned date format: %s' % date_format)
     decimal_sep = proxy.systemNumberDecimalSeparator()
     grouping_sep = proxy.systemNumberGroupingSeparator()
     logging.info('System numeric separators: %s and %s' %
                  (grouping_sep, decimal_sep))
     model = Application(self,
                         date_format=date_format,
                         decimal_sep=decimal_sep,
                         grouping_sep=grouping_sep,
                         default_currency=system_currency,
                         cache_path=cache_path,
                         appdata_path=appdata_path)
     PyBaseApp.__init__(self, model)
Exemple #2
0
 def reset(self):
     locale = QLocale.system()
     self.recentDocuments = []
     dateFormat = str(locale.dateFormat(QLocale.ShortFormat))
     dateFormat = clean_format(dateFormat)
     self.dateFormat = dateFormat
     self.tableFontSize = QApplication.font().pointSize()
Exemple #3
0
 def __init__(self):
     LOGGING_LEVEL = logging.DEBUG if proxy.prefValue_('DebugMode') else logging.WARNING
     logging.basicConfig(level=LOGGING_LEVEL, format='%(levelname)s %(message)s')
     install_exception_hook()
     install_cocoa_logger()
     logging.debug('started in debug mode')
     cache_path = op.join(proxy.getCachePath(), 'moneyGuru')
     appdata_path = op.join(proxy.getAppdataPath(), 'moneyGuru')
     plugin_model_path = op.join(proxy.getResourcePath(), 'plugin_examples')
     currency_code = nonone(proxy.systemCurrency(), 'USD')
     logging.info('Currency code: {0}'.format(currency_code))
     try:
         system_currency = Currency(currency_code)
     except ValueError: # currency does not exist
         logging.warning('System currency {0} is not supported. Falling back to USD.'.format(currency_code))
         system_currency = USD
     date_format = proxy.systemShortDateFormat()
     logging.info('System date format: %s' % date_format)
     date_format = clean_format(date_format)
     logging.info('Cleaned date format: %s' % date_format)
     decimal_sep = proxy.systemNumberDecimalSeparator()
     grouping_sep = proxy.systemNumberGroupingSeparator()
     logging.info('System numeric separators: %s and %s' % (grouping_sep, decimal_sep))
     model = Application(self, date_format=date_format, decimal_sep=decimal_sep, 
         grouping_sep=grouping_sep, default_currency=system_currency, cache_path=cache_path,
         appdata_path=appdata_path, plugin_model_path=plugin_model_path)
     PyBaseApp.__init__(self, model)
 def __init__(self):
     LOGGING_LEVEL = logging.DEBUG if proxy.prefValue_("DebugMode") else logging.WARNING
     logging.basicConfig(level=LOGGING_LEVEL, format="%(levelname)s %(message)s")
     install_exception_hook("https://github.com/hsoft/moneyguru/issues")
     install_cocoa_logger()
     logging.debug("started in debug mode")
     cache_path = op.join(proxy.getCachePath(), "moneyGuru")
     appdata_path = op.join(proxy.getAppdataPath(), "moneyGuru")
     currency_code = nonone(proxy.systemCurrency(), "USD")
     logging.info("Currency code: {0}".format(currency_code))
     try:
         system_currency = Currency(currency_code)
     except ValueError:  # currency does not exist
         logging.warning("System currency {0} is not supported. Falling back to USD.".format(currency_code))
         system_currency = USD
     date_format = proxy.systemShortDateFormat()
     logging.info("System date format: %s" % date_format)
     date_format = clean_format(date_format)
     logging.info("Cleaned date format: %s" % date_format)
     decimal_sep = proxy.systemNumberDecimalSeparator()
     grouping_sep = proxy.systemNumberGroupingSeparator()
     logging.info("System numeric separators: %s and %s" % (grouping_sep, decimal_sep))
     model = Application(
         self,
         date_format=date_format,
         decimal_sep=decimal_sep,
         grouping_sep=grouping_sep,
         default_currency=system_currency,
         cache_path=cache_path,
         appdata_path=appdata_path,
     )
     PyBaseApp.__init__(self, model)
Exemple #5
0
 def reset(self):
     locale = QLocale.system()
     self.recentDocuments = []
     dateFormat = str(locale.dateFormat(QLocale.ShortFormat))
     dateFormat = clean_format(dateFormat)
     self.dateFormat = dateFormat
     self.tableFontSize = QApplication.font().pointSize()
 def dateFormatEdited(self):
     self.dateFormatEdit.setText(clean_format(self.dateFormatEdit.text()))
Exemple #7
0
 def __init__(self):
     self.date_format = clean_format(proxy.systemShortDateFormat())
     self.w = DateWidget(self.date_format)
Exemple #8
0
 def __init__(self):
     self.date_format = clean_format(proxy.systemShortDateFormat())
     self.w = DateWidget(self.date_format)
Exemple #9
0
 def dateFormatEdited(self):
     self.dateFormatEdit.setText(clean_format(self.dateFormatEdit.text()))