#include <investtransactioneditor.h>
InvestTransactionEditor::InvestTransactionEditor | ( | ) |
InvestTransactionEditor::InvestTransactionEditor | ( | TransactionEditorContainer * | regForm, | |
KMyMoneyRegister::InvestTransaction * | item, | |||
const KMyMoneyRegister::SelectedTransactions & | list, | |||
const QDate & | lastPostDate | |||
) |
virtual InvestTransactionEditor::~InvestTransactionEditor | ( | ) | [virtual] |
virtual bool InvestTransactionEditor::isComplete | ( | QString & | reason | ) | const [virtual] |
This method returns information about the completeness of the data entered. This can be used to control the availability of the 'Enter transaction' action.
true | if entering the transaction into the engine | |
false | if not enough information is present to enter the transaction into the engine |
reason | will be filled with a string about the reason why the completeness is not reached. Empty if the return value is true . |
Implements TransactionEditor.
virtual QWidget* InvestTransactionEditor::firstWidget | ( | void | ) | const [virtual] |
Returns a pointer to the widget that should receive the focus after the editor has been started.
Implements TransactionEditor.
virtual bool InvestTransactionEditor::fixTransactionCommodity | ( | const MyMoneyAccount & | ) | [inline, virtual] |
Reimplemented from TransactionEditor.
void InvestTransactionEditor::totalAmount | ( | MyMoneyMoney & | amount | ) | const |
static void InvestTransactionEditor::dissectTransaction | ( | const MyMoneyTransaction & | transaction, | |
const MyMoneySplit & | split, | |||
MyMoneySplit & | assetAccountSplit, | |||
QValueList< MyMoneySplit > & | feeSplits, | |||
QValueList< MyMoneySplit > & | interestSplits, | |||
MyMoneySecurity & | security, | |||
MyMoneySecurity & | currency, | |||
MyMoneySplit::investTransactionTypeE & | transactionType | |||
) | [static] |
bool InvestTransactionEditor::setupPrice | ( | const MyMoneyTransaction & | t, | |
MyMoneySplit & | split | |||
) |
bool InvestTransactionEditor::createTransaction | ( | MyMoneyTransaction & | t, | |
const MyMoneyTransaction & | torig, | |||
const MyMoneySplit & | sorig, | |||
bool | skipPriceDialog = false | |||
) | [virtual] |
This method creates a transaction based on the contents of the current widgets, the splits in m_split in single selection mode or an existing transaction/split and the contents of the widgets in multi selection mode.
The split referencing the current account is returned as the first split in the transaction's split list.
t | reference to created transaction | |
torig | the original transaction | |
sorig | the original split | |
skipPriceDialog | if true the user will not be requested for price information (defaults to false ) |
false
if aborted by user, true
otherwiseImplements TransactionEditor.
priceModeE InvestTransactionEditor::priceMode | ( | void | ) | const |
const MyMoneySecurity& InvestTransactionEditor::security | ( | void | ) | const [inline] |
void InvestTransactionEditor::slotCreateSecurity | ( | const QString & | name, | |
QString & | id | |||
) | [protected, slot] |
void InvestTransactionEditor::slotCreateFeeCategory | ( | const QString & | name, | |
QString & | id | |||
) | [protected, slot] |
void InvestTransactionEditor::slotCreateInterestCategory | ( | const QString & | name, | |
QString & | id | |||
) | [protected, slot] |
int InvestTransactionEditor::slotEditInterestSplits | ( | void | ) | [protected, slot] |
int InvestTransactionEditor::slotEditFeeSplits | ( | void | ) | [protected, slot] |
void InvestTransactionEditor::slotReloadEditWidgets | ( | void | ) | [protected, slot] |
Reimplemented from TransactionEditor.
void InvestTransactionEditor::slotUpdateActivity | ( | MyMoneySplit::investTransactionTypeE | ) | [protected, slot] |
void InvestTransactionEditor::slotUpdateSecurity | ( | const QString & | stockId | ) | [protected, slot] |
void InvestTransactionEditor::slotUpdateInterestCategory | ( | const QString & | id | ) | [protected, slot] |
void InvestTransactionEditor::slotUpdateInterestVisibility | ( | const QString & | ) | [protected, slot] |
void InvestTransactionEditor::slotUpdateFeeCategory | ( | const QString & | id | ) | [protected, slot] |
void InvestTransactionEditor::slotUpdateFeeVisibility | ( | const QString & | ) | [protected, slot] |
void InvestTransactionEditor::slotUpdateTotalAmount | ( | void | ) | [protected, slot] |
void InvestTransactionEditor::createEditWidgets | ( | void | ) | [protected, virtual] |
This method creates all necessary widgets for this transaction editor. All signals will be connected to the relevant slots.
Implements TransactionEditor.
void InvestTransactionEditor::loadEditWidgets | ( | KMyMoneyRegister::Action | action = KMyMoneyRegister::ActionNone |
) | [protected, virtual] |
This method (re-)loads the widgets with the transaction information contained in m_transaction and m_split.
action | preset the edit wigdets for action if no transaction is present |
Implements TransactionEditor.
void InvestTransactionEditor::activityFactory | ( | MyMoneySplit::investTransactionTypeE | type | ) | [protected] |
MyMoneyMoney InvestTransactionEditor::subtotal | ( | const QValueList< MyMoneySplit > & | splits | ) | const [protected] |
bool InvestTransactionEditor::createPseudoTransaction | ( | MyMoneyTransaction & | t, | |
const QValueList< MyMoneySplit > & | splits | |||
) | [protected] |
This method creates a transaction to be used for the split fee/interest editor. It has a reference to a phony account and the splits contained in splits .
int InvestTransactionEditor::editSplits | ( | const QString & | categoryWidgetName, | |
const QString & | amountWidgetName, | |||
QValueList< MyMoneySplit > & | splits, | |||
bool | isIncome, | |||
const char * | slotEditSplits | |||
) | [protected] |
Convenience method used by slotEditInterestSplits() and slotEditFeeSplits().
categoryWidgetName | name of the category widget | |
amountWidgetName | name of the amount widget | |
splits | the splits that make up the transaction to be edited | |
isIncome | false for fees, true for interest | |
slotEditSplits | name of the slot to be connected to the focusIn signal of the category widget named categoryWidgetName in case of multiple splits in splits . |
void InvestTransactionEditor::updatePriceMode | ( | const MyMoneySplit & | split = MyMoneySplit() |
) | [protected] |
void InvestTransactionEditor::setupFinalWidgets | ( | void | ) | [protected, virtual] |
Implements TransactionEditor.
friend class InvestTransactionEditorPrivate [friend] |
Private* const InvestTransactionEditor::d [private] |