# Path: hashmal_lib/gui_utils.py
# def HBox(*widgets):
# def floated_buttons(btns, left=False):
# def add_shortcuts(items):
#     def __init__(self, parent=None):
#     def sizeHint(self):
#     def __init__(self, satoshis=0):
#     def known_formats():
#     def get_str(self):
#     def __init__(self, parent=None):
#     def satoshis(self):
#     def satoshis(self, value):
#     def get_satoshis(self):
#     def set_satoshis(self, amount):
#     def check_text(self):
#     def update_format(self):
#     def on_option_changed(self, key):
#     def __init__(self, max_value=0xffffffff, parent=None):
#     def amount(self):
#     def amount(self, value):
#     def get_amount(self):
#     def set_amount(self, amount):
#     def check_text(self):
#     def __init__( self, *args ):
#     def isReadOnly( self ):
#     def mousePressEvent( self, event ):
#     def mouseMoveEvent( self, event ):
#     def mouseReleaseEvent( self, event ):
#     def keyPressEvent( self, event ):
#     def setReadOnly( self, state ):
# class Separator(QFrame):
# class Amount(object):
# class OutputAmountEdit(QLineEdit):
# class AmountEdit(QLineEdit):
# class ReadOnlyCheckBox(QtGui.QCheckBox):


from bitcoin.core import x, b2x
from bitcoin.base58 import CBase58Data
from PyQt4.QtGui import *
from base import BaseDock, Plugin, Category, augmenter
from hashmal_lib.gui_utils import monospace_font, Separator
from item_types import Item, ItemAction
        self.widget().setSizePolicy(QSizePolicy.Minimum, QSizePolicy.Preferred)

    def init_data(self):
        pass

    @augmenter
    def item_types(self, arg):
        return [AddressItem, Hash160Item]

    @augmenter
    def item_actions(self, *args):
        return [
            ItemAction(self.tool_name, 'Address', 'Decode', self.decode_item),
            ItemAction(self.tool_name, 'Hash160', 'Encode', self.encode_item)
        ]

    def create_layout(self):
        form = QFormLayout()
        form.setRowWrapPolicy(QFormLayout.WrapAllRows)

        self.address_line = QLineEdit()
        self.address_line.setWhatsThis('Enter a cryptocurrency address in this field to decode it into its raw format.')
        self.address_line.setFont(monospace_font)
        self.address_line.setPlaceholderText('Enter an address')
        self.setFocusProxy(self.address_line)
        self.decode_button = QPushButton('Decode')
        self.decode_button.clicked.connect(self.decode_address)

        self.hash_line = QLineEdit()
        self.hash_line.setWhatsThis('Enter a raw RIPEMD-160 hash in this field to encode it into an address.')

# Path: hashmal_lib/gui_utils.py
# def HBox(*widgets):
# def floated_buttons(btns, left=False):
# def add_shortcuts(items):
#     def __init__(self, parent=None):
#     def sizeHint(self):
#     def __init__(self, satoshis=0):
#     def known_formats():
#     def get_str(self):
#     def __init__(self, parent=None):
#     def satoshis(self):
#     def satoshis(self, value):
#     def get_satoshis(self):
#     def set_satoshis(self, amount):
#     def check_text(self):
#     def update_format(self):
#     def on_option_changed(self, key):
#     def __init__(self, max_value=0xffffffff, parent=None):
#     def amount(self):
#     def amount(self, value):
#     def get_amount(self):
#     def set_amount(self, amount):
#     def check_text(self):
#     def __init__( self, *args ):
#     def isReadOnly( self ):
#     def mousePressEvent( self, event ):
#     def mouseMoveEvent( self, event ):
#     def mouseReleaseEvent( self, event ):
#     def keyPressEvent( self, event ):
#     def setReadOnly( self, state ):
# class Separator(QFrame):
# class Amount(object):
# class OutputAmountEdit(QLineEdit):
# class AmountEdit(QLineEdit):
# class ReadOnlyCheckBox(QtGui.QCheckBox):


# Path: hashmal_lib/plugins/addr_encoder.py
from bitcoin.core import x, b2x
from bitcoin.base58 import CBase58Data
from PyQt4.QtGui import *
from base import BaseDock, Plugin, Category, augmenter
from hashmal_lib.gui_utils import monospace_font, Separator
from item_types import Item, ItemAction

        self.widget().setSizePolicy(QSizePolicy.Minimum, QSizePolicy.Preferred)

    def init_data(self):
        pass

    @augmenter
    def item_types(self, arg):
        return [AddressItem, Hash160Item]

    @augmenter
    def item_actions(self, *args):
        return [
            ItemAction(self.tool_name, 'Address', 'Decode', self.decode_item),
            ItemAction(self.tool_name, 'Hash160', 'Encode', self.encode_item)
        ]

    def create_layout(self):
        form = QFormLayout()
        form.setRowWrapPolicy(QFormLayout.WrapAllRows)

        self.address_line = QLineEdit()
        self.address_line.setWhatsThis('Enter a cryptocurrency address in this field to decode it into its raw format.')
        self.address_line.setFont(monospace_font)
        self.address_line.setPlaceholderText('Enter an address')
        self.setFocusProxy(self.address_line)
        self.decode_button = QPushButton('Decode')
        self.decode_button.clicked.connect(self.decode_address)

        self.hash_line = QLineEdit()
        self.hash_line.setWhatsThis('Enter a raw RIPEMD-160 hash in this field to encode it into an address.')

        self.hash_line.setFont(monospace_font)