knewaccountdlg.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           knewaccountdlg.h
00003                              -------------------
00004     copyright            : (C) 2000 by Michael Edwardes
00005     email                : mte@users.sourceforge.net
00006  ***************************************************************************/
00007 
00008 /***************************************************************************
00009  *                                                                         *
00010  *   This program is free software; you can redistribute it and/or modify  *
00011  *   it under the terms of the GNU General Public License as published by  *
00012  *   the Free Software Foundation; either version 2 of the License, or     *
00013  *   (at your option) any later version.                                   *
00014  *                                                                         *
00015  ***************************************************************************/
00016 
00017 #ifndef KNEWACCOUNTDLG_H
00018 #define KNEWACCOUNTDLG_H
00019 
00020 // ----------------------------------------------------------------------------
00021 // QT Includes
00022 
00023 // ----------------------------------------------------------------------------
00024 // KDE Headers
00025 
00026 #ifdef HAVE_KDCHART
00027 #include <KDChartWidget.h>
00028 #include <KDChartTable.h>
00029 #include <KDChartParams.h>
00030 #endif
00031 
00032 // ----------------------------------------------------------------------------
00033 // Project Includes
00034 
00035 #include <kmymoney/mymoneyaccount.h>
00036 #include <kmymoney/mymoneymoney.h>
00037 #include <kmymoney/kmymoneyedit.h>
00038 
00039 #include "../dialogs/knewaccountdlgdecl.h"
00040 class KMyMoneyAccountTreeBaseItem;
00041 namespace reports {
00042   class KReportChartView;
00043 };
00044 
00048 class KNewAccountDlg : public KNewAccountDlgDecl
00049 {
00050   Q_OBJECT
00051 
00052 private:
00053   MyMoneyAccount m_account;
00054   MyMoneyAccount m_parentAccount;
00055   bool m_bSelectedParentAccount;
00056 
00057   KMyMoneyAccountTreeBaseItem *m_parentItem;
00058   KMyMoneyAccountTreeBaseItem *m_accountItem;
00059   bool m_categoryEditor;
00060   bool m_isEditing;
00061 
00062   int m_idPropFutureValue;
00063   int m_idPropLastValue;
00064   int m_idPropMaxCredit;
00065   int m_idPropMinBalance;
00066 
00067   void initParentWidget(QString parentId, const QString& accountId);
00068   void showSubAccounts(QStringList accounts, KMyMoneyAccountTreeBaseItem *parentItem, const QString& parentId, const QString& accountId);
00069   void loadVatAccounts(void);
00070   void storeKVP(const QString& key, kMyMoneyEdit* widget);
00071   void storeKVP(const QString& key, KLineEdit* widget);
00072   void storeKVP(const QString& key, const QString& text, const QString& value);
00073   void loadKVP(const QString& key, kMyMoneyEdit* widget);
00074   void loadKVP(const QString& key, KLineEdit* widget);
00075 
00076 public:
00093   KNewAccountDlg(const MyMoneyAccount& account, bool isEditing, bool categoryEditor, QWidget *parent=0, const char *name=0, const QString& title=QString::null);
00094 
00098   const MyMoneyAccount& account(void);
00099 
00103   const MyMoneyAccount& parentAccount(void);
00104 
00105   void setOpeningBalance(const MyMoneyMoney& balance);
00106 
00107   const MyMoneyMoney openingBalance(void) const { return m_openingBalanceEdit->value(); };
00108 
00109   void setOpeningBalanceShown(bool shown);
00110 
00116   void addTab(QWidget* w, const QString& name);
00117 
00118 protected:
00119   void resizeEvent(QResizeEvent* e);
00120   void displayOnlineBankingStatus(void);
00121   void adjustEditWidgets(kMyMoneyEdit* dst, kMyMoneyEdit* src, char mode, int corr);
00122 
00123 protected slots:
00124   void okClicked();
00125   void slotSelectionChanged(QListViewItem *item);
00126   void slotAccountTypeChanged(const QString& type);
00127   void slotVatChanged(bool);
00128   void slotVatAssignmentChanged(bool);
00129   void slotNewClicked(void);
00130   void slotCheckFinished(void);
00131   void slotLoadInstitutions(const QString&);
00132   void slotAdjustMinBalanceAbsoluteEdit(const QString&);
00133   void slotAdjustMinBalanceEarlyEdit(const QString&);
00134   void slotAdjustMaxCreditAbsoluteEdit(const QString&);
00135   void slotAdjustMaxCreditEarlyEdit(const QString&);
00136 
00137 private slots:
00138   void timerDone(void);
00139 
00140 };
00141 
00142 #endif
00143 

Generated on Wed Jan 26 13:03:17 2011 for KMyMoney by  doxygen 1.5.6