00001 /*************************************************************************** 00002 kaccountselectdlg.h - description 00003 ------------------- 00004 begin : Mon Feb 10 2003 00005 copyright : (C) 2000-2003 by Michael Edwardes 00006 email : mte@users.sourceforge.net 00007 Javier Campos Morales <javi_c@users.sourceforge.net> 00008 Felix Rodriguez <frodriguez@users.sourceforge.net> 00009 John C <thetacoturtle@users.sourceforge.net> 00010 Thomas Baumgart <ipwizard@users.sourceforge.net> 00011 Kevin Tambascio <ktambascio@users.sourceforge.net> 00012 ***************************************************************************/ 00013 00014 /*************************************************************************** 00015 * * 00016 * This program is free software; you can redistribute it and/or modify * 00017 * it under the terms of the GNU General Public License as published by * 00018 * the Free Software Foundation; either version 2 of the License, or * 00019 * (at your option) any later version. * 00020 * * 00021 ***************************************************************************/ 00022 00023 #ifndef KACCOUNTSELECTDLG_H 00024 #define KACCOUNTSELECTDLG_H 00025 00026 // ---------------------------------------------------------------------------- 00027 // QT Includes 00028 00029 #include <qwidget.h> 00030 #include <qstring.h> 00031 00032 // ---------------------------------------------------------------------------- 00033 // KDE Includes 00034 00035 // ---------------------------------------------------------------------------- 00036 // Project Includes 00037 00038 #include <kmymoney/kmymoneycombo.h> 00039 #include <kmymoney/mymoneyaccount.h> 00040 #include <kmymoney/kmymoneyutils.h> 00041 #include "../dialogs/kaccountselectdlgdecl.h" 00042 00047 class KAccountSelectDlg : public KAccountSelectDlgDecl 00048 { 00049 Q_OBJECT 00050 public: 00051 KAccountSelectDlg(const KMyMoneyUtils::categoryTypeE type, const QString& purpose = "General", QWidget *parent=0, const char *name=0); 00052 ~KAccountSelectDlg(); 00053 00061 void setDescription(const QString& msg); 00062 00071 void setHeader(const QString& msg); 00072 00081 void setAccount(const MyMoneyAccount& account, const QCString& id); 00082 00088 const QCString& selectedAccount(void) const; 00089 00098 void setMode(const int mode); 00099 00106 void showAbortButton(const bool visible); 00107 00116 bool aborted(void) const { return m_aborted; }; 00117 00118 public slots: 00122 int exec(); 00123 00124 protected slots: 00130 void slotCreateAccount(void); 00131 00135 void slotCreateInstitution(void); 00136 00140 void abort(void); 00141 00145 void slotReloadWidget(void); 00146 00147 private: 00148 QString m_purpose; 00149 MyMoneyAccount m_account; 00150 int m_mode; // 0 - select or create, 1 - create only 00151 KMyMoneyUtils::categoryTypeE m_accountType; 00152 bool m_aborted; 00153 }; 00154 00155 #endif
1.4.1