# Path: core/const.py
# class PaneType:
#     NetWorth = 0
#     Profit = 1
#     Transaction = 2
#     Account = 3
#     Schedule = 4
#     GeneralLedger = 7
#     DocProps = 8
#     PluginList = 9
#     Empty = 100
#     Plugin = 1000
#     ReadOnlyTablePlugin = 1001


from PyQt5.QtCore import Qt
from PyQt5.QtGui import QKeySequence, QIcon, QPixmap
from PyQt5.QtWidgets import (
    QShortcut, QGridLayout, QPushButton, QLabel, QVBoxLayout
)
from core.trans import trget
from core.const import PaneType
from ..util import horizontalSpacer, verticalSpacer
from .base_view import BaseView
        self.gridLayout.addWidget(self.label, 0, 0, 1, 3)
        self.gridLayout.addItem(horizontalSpacer(), 1, 0, 1, 1)
        self.verticalLayout = QVBoxLayout()
        BUTTONS = [
            ('networthButton', tr("1. Net Worth"), 'balance_sheet_16'),
            ('profitButton', tr("2. Profit && Loss"), 'income_statement_16'),
            ('transactionButton', tr("3. Transactions"), 'transaction_table_16'),
            ('gledgerButton', tr("4. General Ledger"), 'gledger_16'),
            ('scheduleButton', tr("5. Schedules"), 'schedules_16'),
            ('docpropsButton', tr("6. Document Properties"), 'gledger_16'),
        ]
        for i, (name, label, icon) in enumerate(BUTTONS, start=1):
            button = QPushButton(label)
            if icon:
                button.setIcon(QIcon(QPixmap(':/{}'.format(icon))))
            self.verticalLayout.addWidget(button)
            setattr(self, name, button)
            shortcut = QShortcut(self)
            shortcut.setKey(QKeySequence(str(i)))
            shortcut.setContext(Qt.WidgetShortcut)
            setattr(self, 'shortcut{}'.format(i), shortcut)
        self.gridLayout.addLayout(self.verticalLayout, 1, 1, 1, 1)
        self.gridLayout.addItem(horizontalSpacer(), 1, 2, 1, 1)
        self.gridLayout.addItem(verticalSpacer(), 2, 1, 1, 1)

    # --- Event Handlers
    def networthButtonClicked(self):
        self.model.select_pane_type(PaneType.NetWorth)

    def profitButtonClicked(self):

# Path: core/const.py
# class PaneType:
#     NetWorth = 0
#     Profit = 1
#     Transaction = 2
#     Account = 3
#     Schedule = 4
#     GeneralLedger = 7
#     DocProps = 8
#     PluginList = 9
#     Empty = 100
#     Plugin = 1000
#     ReadOnlyTablePlugin = 1001


# Path: qt/controller/new_view.py
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QKeySequence, QIcon, QPixmap
from PyQt5.QtWidgets import (
    QShortcut, QGridLayout, QPushButton, QLabel, QVBoxLayout
)
from core.trans import trget
from core.const import PaneType
from ..util import horizontalSpacer, verticalSpacer
from .base_view import BaseView

        self.gridLayout.addWidget(self.label, 0, 0, 1, 3)
        self.gridLayout.addItem(horizontalSpacer(), 1, 0, 1, 1)
        self.verticalLayout = QVBoxLayout()
        BUTTONS = [
            ('networthButton', tr("1. Net Worth"), 'balance_sheet_16'),
            ('profitButton', tr("2. Profit && Loss"), 'income_statement_16'),
            ('transactionButton', tr("3. Transactions"), 'transaction_table_16'),
            ('gledgerButton', tr("4. General Ledger"), 'gledger_16'),
            ('scheduleButton', tr("5. Schedules"), 'schedules_16'),
            ('docpropsButton', tr("6. Document Properties"), 'gledger_16'),
        ]
        for i, (name, label, icon) in enumerate(BUTTONS, start=1):
            button = QPushButton(label)
            if icon:
                button.setIcon(QIcon(QPixmap(':/{}'.format(icon))))
            self.verticalLayout.addWidget(button)
            setattr(self, name, button)
            shortcut = QShortcut(self)
            shortcut.setKey(QKeySequence(str(i)))
            shortcut.setContext(Qt.WidgetShortcut)
            setattr(self, 'shortcut{}'.format(i), shortcut)
        self.gridLayout.addLayout(self.verticalLayout, 1, 1, 1, 1)
        self.gridLayout.addItem(horizontalSpacer(), 1, 2, 1, 1)
        self.gridLayout.addItem(verticalSpacer(), 2, 1, 1, 1)

    # --- Event Handlers
    def networthButtonClicked(self):
        self.model.select_pane_type(PaneType.NetWorth)

    def profitButtonClicked(self):

        self.model.select_pane_type(PaneType.Profit)