# Path: hashmal_lib/config.py
# def set_config(c):
# def get_config():
#     def __init__(self, parent=None):
#     def get_option(self, key, default=None):
#     def set_option(self, key, value, do_save=True):
# class Config(QtCore.QObject):


from functools import wraps
from collections import namedtuple
from PyQt4.QtGui import QDockWidget, QWidget, QVBoxLayout
from PyQt4 import QtCore
from hashmal_lib import config

    A module's make_plugin() function should return
    an instance of this class.
    """
    def __init__(self, ui_class):
        self.ui_class = ui_class
        self.ui = None
        # name is set when the entry point is loaded.
        self.name = ''
        # If False, plugin has no dedicated GUI.
        self.has_gui = True

    def instantiate_ui(self, plugin_handler):
        instance = self.ui_class(plugin_handler)
        self.ui = instance

    def augmenters(self):
        return self.ui.augmenters if self.ui else None

    def get_augmenter(self, hook_name):
        return getattr(self.ui, hook_name) if self.ui else None

class BasePluginUI(object):
    """Base class for plugin user interfaces."""
    tool_name = ''
    description = ''
    category = Category.General

    def __init__(self, handler):
        self.handler = handler

# Path: hashmal_lib/config.py
# def set_config(c):
# def get_config():
#     def __init__(self, parent=None):
#     def get_option(self, key, default=None):
#     def set_option(self, key, value, do_save=True):
# class Config(QtCore.QObject):


# Path: hashmal_lib/plugins/base.py
from functools import wraps
from collections import namedtuple
from PyQt4.QtGui import QDockWidget, QWidget, QVBoxLayout
from PyQt4 import QtCore
from hashmal_lib import config


    A module's make_plugin() function should return
    an instance of this class.
    """
    def __init__(self, ui_class):
        self.ui_class = ui_class
        self.ui = None
        # name is set when the entry point is loaded.
        self.name = ''
        # If False, plugin has no dedicated GUI.
        self.has_gui = True

    def instantiate_ui(self, plugin_handler):
        instance = self.ui_class(plugin_handler)
        self.ui = instance

    def augmenters(self):
        return self.ui.augmenters if self.ui else None

    def get_augmenter(self, hook_name):
        return getattr(self.ui, hook_name) if self.ui else None

class BasePluginUI(object):
    """Base class for plugin user interfaces."""
    tool_name = ''
    description = ''
    category = Category.General

    def __init__(self, handler):
        self.handler = handler

        self.config = config.get_config()