#include <kmymoneyview.h>
typedef enum KMyMoneyView::storageTypeE KMyMoneyView::_storageType [private] |
typedef enum KMyMoneyView::_fileTypeE KMyMoneyView::fileTypeE [private] |
enum KMyMoneyView::viewID |
enum KMyMoneyView::menuID [private] |
enum KMyMoneyView::storageTypeE [private] |
enum KMyMoneyView::_fileTypeE [private] |
KMyMoneyView::KMyMoneyView | ( | QWidget * | parent = 0 , |
|
const char * | name = 0 | |||
) |
The constructor for KMyMoneyView. Just creates all the tabs for the different aspects of the MyMoneyFile.
KMyMoneyView::~KMyMoneyView | ( | ) |
Destructor
void KMyMoneyView::addTitleBar | ( | QWidget * | parent, | |
const QString & | title | |||
) | [private] |
void KMyMoneyView::ungetString | ( | QIODevice * | qfile, | |
char * | buf, | |||
int | len | |||
) | [private] |
void KMyMoneyView::loadDefaultCurrency | ( | const MyMoneySecurity & | curr, | |
const bool | create | |||
) | [private] |
This method creates the currency curr
if it does not exist and create
is true
. If the currency already exists, it checks if the name is equal. If it is not, the name of the object in the engine is updated to the name passed with curr
.
curr | MyMoneySecurity to be checked | |
create | If true and currency does not exist it will be created If false currency will not be created even if it does not exist |
void KMyMoneyView::loadAncientCurrency | ( | const QString & | id, | |
const QString & | name, | |||
const QString & | sym, | |||
const QDate & | date, | |||
const MyMoneyMoney & | rate, | |||
const QString & | newId, | |||
const int | partsPerUnit = 100 , |
|||
const int | smallestCashFraction = 100 , |
|||
const int | smallestAccountFraction = 0 | |||
) | [private] |
void KMyMoneyView::selectBaseCurrency | ( | void | ) | [private] |
if no base currency is defined, start the dialog and force it to be set
void KMyMoneyView::newStorage | ( | storageTypeE | = Memory |
) | [private] |
This method attaches an empty storage object to the MyMoneyFile object. It calls removeStorage() to remove a possibly attached storage object.
void KMyMoneyView::removeStorage | ( | void | ) | [private] |
This method removes an attached storage from the MyMoneyFile object.
void KMyMoneyView::viewAccountList | ( | const QString & | selectAccount | ) | [private] |
static void KMyMoneyView::progressCallback | ( | int | current, | |
int | total, | |||
const QString & | ||||
) | [static, private] |
void KMyMoneyView::fixFile_0 | ( | void | ) | [private] |
void KMyMoneyView::fixFile_1 | ( | void | ) | [private] |
void KMyMoneyView::fixFile_2 | ( | void | ) | [private] |
void KMyMoneyView::fixLoanAccount_0 | ( | MyMoneyAccount | acc | ) | [private] |
void KMyMoneyView::fixTransactions_0 | ( | void | ) | [private] |
void KMyMoneyView::fixSchedule_0 | ( | MyMoneySchedule | sched | ) | [private] |
void KMyMoneyView::fixDuplicateAccounts_0 | ( | MyMoneyTransaction & | t | ) | [private] |
void KMyMoneyView::createSchedule | ( | MyMoneySchedule | s, | |
MyMoneyAccount & | a | |||
) | [private] |
void KMyMoneyView::checkAccountName | ( | const MyMoneyAccount & | acc, | |
const QString & | name | |||
) | const [private] |
bool KMyMoneyView::fileOpen | ( | void | ) |
Makes sure that a MyMoneyFile is open and has been created succesfully.
void KMyMoneyView::closeFile | ( | void | ) |
Closes the open MyMoneyFile and frees all the allocated memory, I hope !
bool KMyMoneyView::readFile | ( | const KURL & | url | ) |
Calls MyMoneyFile::readAllData which reads a MyMoneyFile into appropriate data structures in memory. The return result is examined to make sure no errors occured whilst parsing.
url | The URL to read from. If no protocol is specified, file:// is assumed. |
bool KMyMoneyView::saveFile | ( | const KURL & | url, | |
const QString & | keyList = QString() | |||
) |
Saves the data into permanent storage using the XML format.
url | The URL to save into. If no protocol is specified, file:// is assumed. | |
keyList | QString containing a comma separated list of keys to be used for encryption. If keyList is empty, the file will be saved unencrypted (the default) |
false | save operation failed | |
true | save operation was successful |
bool KMyMoneyView::saveAsDatabase | ( | const KURL & | url | ) |
Saves the data into permanent storage on a new or empty SQL database.
url | The pseudo of tyhe database |
false | save operation failed | |
true | save operation was successful Saves the data into permanent storage on a new or empty SQL database. |
url | The pseudo URL of the database |
false | save operation failed | |
true | save operation was successful |
bool KMyMoneyView::isNativeFile | ( | ) | [inline] |
Call this to find out if the currently open file is native KMM
true | file is native | |
false | file is foreign |
bool KMyMoneyView::isDatabase | ( | ) | [inline] |
Call this to find out if the currently open file is a sql database
true | file is database | |
false | file is serial |
bool KMyMoneyView::dirty | ( | void | ) |
Call this to see if the MyMoneyFile contains any unsaved data.
true | if any data has been modified but not saved | |
false | otherwise |
void KMyMoneyView::newFile | ( | void | ) |
void KMyMoneyView::viewUp | ( | void | ) |
Moves the view up from transaction to Bank/Account view.
void KMyMoneyView::enableViews | ( | int | state = -1 |
) |
This method allows to set the enable state of all views (except home view) The argument state
controls the availability.
state | Controls whether views are disabled (0), enabled (1) or enabled/disabled according to an open file (-1). The latter is the default. |
KMyMoneyViewBase* KMyMoneyView::addPage | ( | const QString & | title, | |
const QString & | icon = QString() | |||
) |
void KMyMoneyView::addWidget | ( | QWidget * | w | ) |
virtual bool KMyMoneyView::showPage | ( | int | index | ) | [virtual] |
bool KMyMoneyView::canCreateTransactions | ( | const KMyMoneyRegister::SelectedTransactions & | list, | |
QString & | tooltip | |||
) | const |
check if the current view allows to create a transaction
list | list of selected transactions | |
tooltip | reference to string receiving the tooltip text which explains why the modify function is not available (in case of returning false ) |
true | Yes, view allows to create a transaction (tooltip is not changed) | |
false | No, view cannot to create a transaction (tooltip is updated with message) |
bool KMyMoneyView::canModifyTransactions | ( | const KMyMoneyRegister::SelectedTransactions & | list, | |
QString & | tooltip | |||
) | const |
check if the current view allows to modify (edit/delete) the selected transactions
list | list of selected transactions | |
tooltip | reference to string receiving the tooltip text which explains why the modify function is not available (in case of returning false ) |
true | Yes, view allows to edit/delete transactions (tooltip is not changed) | |
false | No, view cannot edit/delete transactions (tooltip is updated with message) |
bool KMyMoneyView::canDuplicateTransactions | ( | const KMyMoneyRegister::SelectedTransactions & | list, | |
QString & | tooltip | |||
) | const |
bool KMyMoneyView::canEditTransactions | ( | const KMyMoneyRegister::SelectedTransactions & | list, | |
QString & | tooltip | |||
) | const |
check if the current view allows to edit the selected transactions
list | list of selected transactions | |
tooltip | reference to string receiving the tooltip text which explains why the edit function is not available (in case of returning false ) |
true | Yes, view allows to enter/edit transactions | |
false | No, view cannot enter/edit transactions |
bool KMyMoneyView::canPrint | ( | void | ) |
check if the current view allows to print something
true | Yes, view allows to print | |
false | No, view cannot print |
TransactionEditor* KMyMoneyView::startEdit | ( | const KMyMoneyRegister::SelectedTransactions & | ) |
bool KMyMoneyView::createNewTransaction | ( | void | ) |
bool KMyMoneyView::startReconciliation | ( | const MyMoneyAccount & | account, | |
const QDate & | reconciliationDate, | |||
const MyMoneyMoney & | endingBalance | |||
) |
Used to start reconciliation of account account. It switches the ledger view into reconciliation mode and updates the view.
account | account which should be reconciled | |
reconciliationDate | the statement date | |
endingBalance | the ending balance entered for this account |
true | Reconciliation started | |
false | Account cannot be reconciled |
void KMyMoneyView::finishReconciliation | ( | const MyMoneyAccount & | account | ) |
Used to finish reconciliation of account account. It switches the ledger view to normal mode and updates the view.
account | account which should be reconciled |
void KMyMoneyView::loadDefaultCurrencies | ( | void | ) |
This method preloads all known currencies into the engine.
void KMyMoneyView::loadAncientCurrencies | ( | void | ) |
void KMyMoneyView::showTitleBar | ( | bool | show | ) |
void KMyMoneyView::slotRememberPage | ( | QWidget * | widget | ) | [slot] |
This slot writes information about the page passed as argument widget
in the kmymoney2.rc file so that in can be selected automatically when the application is started again.
widget | pointer to page widget |
void KMyMoneyView::slotRefreshViews | ( | ) | [slot] |
Brings up a dialog to change the list(s) settings and saves them into the class KMyMoneySettings (a singleton).
void KMyMoneyView::slotLedgerSelected | ( | const QString & | acc, | |
const QString & | transaction = QString() | |||
) | [slot] |
Called, whenever the ledger view should pop up and a specific transaction in an account should be shown. If transaction
is empty, the last transaction should be selected
acc | The ID of the account to be shown | |
transaction | The ID of the transaction to be selected |
void KMyMoneyView::slotPayeeSelected | ( | const QString & | payeeId, | |
const QString & | accountId, | |||
const QString & | transactionId | |||
) | [slot] |
Called, whenever the payees view should pop up and a specific transaction in an account should be shown.
payeeId | The ID of the payee to be shown | |
accountId | The ID of the account to be shown | |
transactionId | The ID of the transaction to be selected |
void KMyMoneyView::slotScheduleSelected | ( | const QString & | schedule | ) | [slot] |
Called, whenever the schedule view should pop up and a specific schedule should be shown.
schedule | The ID of the schedule to be shown |
void KMyMoneyView::slotShowReport | ( | const QString & | reportid | ) | [slot] |
Called, whenever the report view should pop up and a specific report should be shown.
reportid | The ID of the report to be shown |
void KMyMoneyView::slotShowReport | ( | const MyMoneyReport & | report | ) | [slot] |
Same as the above, but the caller passes in an actual report definition to be shown.
report | The report to be shown |
void KMyMoneyView::slotPrintView | ( | void | ) | [slot] |
This slot prints the current view.
void KMyMoneyView::slotShowHomePage | ( | void | ) | [inline, slot] |
This slot switches the view to present the home page
void KMyMoneyView::slotShowTransactionDetail | ( | bool | detailed | ) | [protected, slot] |
Called when the user changes the detail setting of the transaction register
detailed | if true, the register is shown with all details |
void KMyMoneyView::slotSetBaseCurrency | ( | const MyMoneySecurity & | baseCurrency | ) | [protected, slot] |
eventually replace this with KMyMoney2App::slotCurrencySetBase(void). it contains the same code
bool KMyMoneyView::openDatabase | ( | const KURL & | dbaseURL | ) | [private] |
This method is called from readFile to open a database file which is to be processed in 'proper' database mode, i.e. in-place updates
dbaseURL | pseudo-KURL representation of database |
true | Database opened successfully | |
false | Could not open or read database |
bool KMyMoneyView::initializeStorage | ( | ) | [private] |
This method is used after a file or database has been read into storage, and performs various initialization tasks
true | all went okay | |
false | an exception occurred during this process |
void KMyMoneyView::saveToLocalFile | ( | QFile * | qf, | |
IMyMoneyStorageFormat * | writer, | |||
bool | plaintext = false , |
|||
const QString & | keyList = QString() | |||
) | [private] |
This method is used by saveFile() to store the data either directly in the destination file if it is on the local file system or in a temporary file when the final destination is reached over a network protocol (e.g. FTP)
qf | pointer to QFile representing the opened file | |
writer | pointer to the formatter | |
plaintext | whether to override any compression & encryption settings | |
keyList | QString containing a comma separated list of keys to be used for encryption If keyList is empty, the file will be saved unencrypted |
void KMyMoneyView::accountNew | ( | const bool | createCategory | ) | [private] |
Internal method used by slotAccountNew() and slotAccountCategory().
void KMyMoneyView::viewActivated | ( | int | view | ) | [signal] |
This signal is emitted whenever a view is selected. The parameter view
is identified as one of KMyMoneyView::viewID.
void KMyMoneyView::accountSelectedForContextMenu | ( | const MyMoneyAccount & | acc | ) | [signal] |
void KMyMoneyView::viewStateChanged | ( | bool | enabled | ) | [signal] |
void KMyMoneyView::kmmFilePlugin | ( | unsigned int | action | ) | [signal] |
This signal is emitted to inform the kmmFile plugin when various file actions occur. The Action parameter distinguishes between them.
void KMyMoneyView::reconciliationStarts | ( | const MyMoneyAccount & | account, | |
const QDate & | reconciliationDate, | |||
const MyMoneyMoney & | endingBalance | |||
) | [signal] |
Signal is emitted when reconciliation starts or ends. In case of end, account is MyMoneyAccount()
account | account for which reconciliation starts or MyMoneyAccount() if reconciliation ends. | |
reconciliationDate | the statement date | |
endingBalance | collected ending balance when reconciliation starts 0 otherwise |
KHomeView* KMyMoneyView::m_homeView [private] |
KAccountsView* KMyMoneyView::m_accountsView [private] |
KCategoriesView* KMyMoneyView::m_categoriesView [private] |
KPayeesView* KMyMoneyView::m_payeesView [private] |
KBudgetView* KMyMoneyView::m_budgetView [private] |
KScheduledView* KMyMoneyView::m_scheduledView [private] |
KGlobalLedgerView* KMyMoneyView::m_ledgerView [private] |
KInvestmentView* KMyMoneyView::m_investmentView [private] |
KReportsView* KMyMoneyView::m_reportsView [private] |
KForecastView* KMyMoneyView::m_forecastView [private] |
QVBox* KMyMoneyView::m_homeViewFrame [private] |
QVBox* KMyMoneyView::m_accountsViewFrame [private] |
QVBox* KMyMoneyView::m_institutionsViewFrame [private] |
QVBox* KMyMoneyView::m_categoriesViewFrame [private] |
QVBox* KMyMoneyView::m_payeesViewFrame [private] |
QVBox* KMyMoneyView::m_budgetViewFrame [private] |
QVBox* KMyMoneyView::m_scheduleViewFrame [private] |
QVBox* KMyMoneyView::m_ledgerViewFrame [private] |
QVBox* KMyMoneyView::m_investmentViewFrame [private] |
QVBox* KMyMoneyView::m_reportsViewFrame [private] |
QVBox* KMyMoneyView::m_forecastViewFrame [private] |
bool KMyMoneyView::m_inConstructor [private] |
bool KMyMoneyView::m_fileOpen [private] |
int KMyMoneyView::m_fmode [private] |
fileTypeE KMyMoneyView::m_fileType [private] |