from common import FieldLabel, TitleLabel

ownerclass = 'MGTransactionInspector'
ownerimport = 'MGTransactionInspector.h'

result = Window(485, 352, "")
titleLabel = TitleLabel(result, "Transaction Info")
tabView = TabView(result)
infoTab = tabView.addTab("Info")
notesTab = tabView.addTab("Notes")

dateLabel = FieldLabel(infoTab.view, "Date")
dateField = TextField(infoTab.view, "")
descriptionLabel = FieldLabel(infoTab.view, "Description")
descriptionField = TextField(infoTab.view, "")
payeeLabel = FieldLabel(infoTab.view, "Payee")
payeeField = TextField(infoTab.view, "")
checknoLabel = FieldLabel(infoTab.view, "Check #")
checknoField = TextField(infoTab.view, "")
transfersLabel = FieldLabel(infoTab.view, "Transfers")
transfersTable = TableView(infoTab.view)
transfersTable.OBJC_CLASS = 'MGTableView'
mctButton = Button(infoTab.view,
                   "Multi-Currency Balance",
                   action=Action(owner, 'mctBalance'))
assignImbalanceButton = Button(infoTab.view,
                               "Assign imbalance",
                               action=Action(owner, 'assignImbalance'))
addTransferButton = Button(infoTab.view, "", action=Action(owner, 'addSplit'))
removeTransferButton = Button(infoTab.view,
                              "",
Beispiel #2
0
from common import FieldLabel, TitleLabel

ownerclass = 'MGBudgetPanel'
ownerimport = 'MGBudgetPanel.h'

result = Window(342, 290, "")
titleLabel = TitleLabel(result, "Budget Info")
startDateLabel = FieldLabel(result, "Start Date")
startDateField = TextField(result, "")
repeatLabel = FieldLabel(result, "Repeat")
repeatPopup = Popup(result)
everyLabel = FieldLabel(result, "Every")
everyField = TextField(result, "")
everyDescLabel = Label(result, "")
stopDateLabel = FieldLabel(result, "Stop Date")
stopDateField = TextField(result, "")
accountLabel = FieldLabel(result, "Account")
accountPopup = Popup(result)
targetLabel = FieldLabel(result, "Target")
targetPopup = Popup(result)
amountLabel = FieldLabel(result, "Amount")
amountField = TextField(result, "")
notesLabel = FieldLabel(result, "Notes")
notesField = TextField(result, "")
cancelButton = Button(result, "Cancel", action=Action(owner, 'cancel:'))
saveButton = Button(result, "Save", action=Action(owner, 'save:'))

owner.accountSelector = accountPopup
owner.amountField = amountField
owner.notesField = notesField
owner.repeatEveryDescLabel = everyDescLabel
Beispiel #3
0
from common import FieldLabel, TitleLabel

ownerclass = 'MGAccountProperties'
ownerimport = 'MGAccountProperties.h'

result = Window(300, 255, "")
titleLabel = TitleLabel(result, "Account Info")
nameLabel = FieldLabel(result, "Name")
nameField = TextField(result)
typeLabel = FieldLabel(result, "Type")
typePopup = Popup(result)
currencyLabel = FieldLabel(result, "Currency")
currencyCombo = Combobox(result)
accountnoLabel = FieldLabel(result, "Account #")
accountnoField = TextField(result)
inactiveLabel = FieldLabel(result, "Inactive")
inactiveField = Checkbox(result, "")
notesLabel = FieldLabel(result, "Notes")
notesField = TextField(result)
cancelButton = Button(result, "Cancel", action=Action(owner, 'cancel:'))
saveButton = Button(result, "Save", action=Action(owner, 'save:'))

owner.accountNumberTextField = accountnoField
owner.currencySelector = currencyCombo
owner.nameTextField = nameField
owner.inactiveCheckBox = inactiveField
owner.notesTextField = notesField
owner.typeSelector = typePopup
result.delegate = owner

result.minSize = Size(result.width, result.height)
Beispiel #4
0
dateLabel = FieldLabel(infoTab.view, "Date")
dateField = TextField(infoTab.view, "")
descriptionLabel = FieldLabel(infoTab.view, "Description")
descriptionField = TextField(infoTab.view, "")
payeeLabel = FieldLabel(infoTab.view, "Payee")
payeeField = TextField(infoTab.view, "")
checknoLabel = FieldLabel(infoTab.view, "Check #")
checknoField = TextField(infoTab.view, "")
transfersLabel = FieldLabel(infoTab.view, "Transfers")
transfersTable = TableView(infoTab.view)
transfersTable.OBJC_CLASS = 'MGTableView'
mctButton = Button(infoTab.view, "Multi-Currency Balance", action=Action(owner, 'mctBalance'))
assignImbalanceButton = Button(infoTab.view, "Assign imbalance", action=Action(owner, 'assignImbalance'))
addTransferButton = Button(infoTab.view, "", action=Action(owner, 'addSplit'))
removeTransferButton = Button(infoTab.view, "", action=Action(owner, 'deleteSplit'))
navigateNoticeLabel = FieldLabel(infoTab.view, "You can navigate tabs with ⌘⌥→ and ⌘⌥←")

notesField = TextField(notesTab.view, "")
notesNoticeLabel = FieldLabel(notesTab.view, "Use ⌥+Return to insert a new line.")

cancelButton = Button(result, "Cancel", action=Action(owner, 'cancel:'))
saveButton = Button(result, "Save", action=Action(owner, 'save:'))

prevTabButton = Button(result, "", action=Action(tabView, 'selectPreviousTabViewItem:'))
nextTabButton = Button(result, "", action=Action(tabView, 'selectNextTabViewItem:'))

owner.checknoField = checknoField
owner.descriptionField = descriptionField
owner.payeeField = payeeField
owner.notesField = notesField
owner.splitTableView = transfersTable
from common import FieldLabel

ownerclass = 'MGCustomDateRangePanel'
ownerimport = 'MGCustomDateRangePanel.h'

result = Window(362, 202, "Custom date range")
promptLabel = Label(result,
                    "Select start and end dates for your custom range:")
startLabel = FieldLabel(result, "Start")
startField = TextField(result, "")
endLabel = FieldLabel(result, "End")
endField = TextField(result, "")
slotLabel = Label(result, "Save this custom range in slot:")
slotPopup = Popup(result, ["None", NLSTR("#1"), NLSTR("#2"), NLSTR("#3")])
slotNameLabel = Label(result, "Under the name:")
slotNameField = TextField(result, "")
okButton = Button(result, "OK")
cancelButton = Button(result, "Cancel")

owner.endDateField = endField
owner.slotIndexSelector = slotPopup
owner.slotNameField = slotNameField
owner.startDateField = startField
result.delegate = owner
startField.delegate = owner
endField.delegate = owner

result.canResize = result.canMinimize = False
for field in [startField, endField]:
    field.controlSize = ControlSize.Small
slotNameField.controlSize = ControlSize.Small
FIELDDATA = [
    ('date', 'Date'),
    ('description', 'Description'),
    ('payee', 'Payee'),
    ('checkno', 'Check #'),
    ('from', 'From'),
    ('to', 'To'),
    ('amount', 'Amount'),
]
# Currency is special because it's a combobox

result = Window(377, 289, "")
titleLabel = TitleLabel(result, "Mass Editing")
fields = []
for name, label in FIELDDATA:
    label = FieldLabel(result, label)
    checkbox = Checkbox(result, "")
    textfield = TextField(result, "")
    textfield.controlSize = ControlSize.Small
    setattr(owner, '{}CheckBox'.format(name), checkbox)
    setattr(owner, '{}FieldView'.format(name), textfield)
    fields.append(Field(label, checkbox, textfield))
fields.append(Field(FieldLabel(result, "Currency"), Checkbox(result, ""), Combobox(result)))
owner.currencyCheckBox = fields[-1].checkbox
owner.currencyComboBoxView = fields[-1].textfield
cancelButton = Button(result, "Cancel", action=Action(owner, 'cancel:'))
saveButton = Button(result, "Save", action=Action(owner, 'save:'))

result.delegate = owner

result.canResize = False