summaryrefslogtreecommitdiffstats
path: root/kmymoney2/dialogs/mymoneyqifprofileeditor.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-04 22:38:03 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-04 22:38:03 +0000
commitdadc34655c3ab961b0b0b94a10eaaba710f0b5e8 (patch)
tree99e72842fe687baea16376a147619b6048d7e441 /kmymoney2/dialogs/mymoneyqifprofileeditor.h
downloadkmymoney-dadc34655c3ab961b0b0b94a10eaaba710f0b5e8.tar.gz
kmymoney-dadc34655c3ab961b0b0b94a10eaaba710f0b5e8.zip
Added kmymoney
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kmymoney@1239792 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmymoney2/dialogs/mymoneyqifprofileeditor.h')
-rw-r--r--kmymoney2/dialogs/mymoneyqifprofileeditor.h96
1 files changed, 96 insertions, 0 deletions
diff --git a/kmymoney2/dialogs/mymoneyqifprofileeditor.h b/kmymoney2/dialogs/mymoneyqifprofileeditor.h
new file mode 100644
index 0000000..ce95c9a
--- /dev/null
+++ b/kmymoney2/dialogs/mymoneyqifprofileeditor.h
@@ -0,0 +1,96 @@
+/***************************************************************************
+ kqifprofileeditor.h - description
+ -------------------
+ begin : Tue Dec 24 2002
+ copyright : (C) 2002 by Thomas Baumgart
+ email : thb@net-bembel.de
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef MYMONEYQIFPROFILEEDITOR_H
+#define MYMONEYQIFPROFILEEDITOR_H
+
+// ----------------------------------------------------------------------------
+// QT Includes
+
+#include <qwidget.h>
+#include <qvalidator.h>
+class QListViewItem;
+
+// ----------------------------------------------------------------------------
+// KDE Includes
+
+// ----------------------------------------------------------------------------
+// Project Includes
+
+#include "mymoneyqifprofileeditordecl.h"
+#include "../converter/mymoneyqifprofile.h"
+
+/**
+ * @author Thomas Baumgart
+ */
+
+class MyMoneyQifProfileNameValidator : public QValidator
+{
+ Q_OBJECT
+
+public:
+ MyMoneyQifProfileNameValidator(QObject *o, const char *name);
+ virtual ~MyMoneyQifProfileNameValidator();
+
+ QValidator::State validate(QString&, int&) const;
+};
+
+
+class MyMoneyQifProfileEditor : public MyMoneyQifProfileEditorDecl
+{
+ Q_OBJECT
+
+public:
+ MyMoneyQifProfileEditor(const bool edit = false, QWidget *parent=0, const char *name=0);
+ virtual ~MyMoneyQifProfileEditor();
+
+ /**
+ * This method returns the currently selected profile in the list box.
+ */
+ const QString selectedProfile() const;
+
+public slots:
+ void slotOk(void);
+
+protected slots:
+ void slotLoadProfileFromConfig(const QString& name);
+ void slotReset(void);
+ void slotRename(void);
+ void slotDelete(void);
+ void slotNew(void);
+ void slotAmountTypeSelected(QListViewItem*);
+ void slotDecimalChanged(const QString& val);
+ void slotThousandsChanged(const QString& val);
+ void slotHelp(void);
+
+private:
+ void loadProfileListFromConfig(void);
+ void loadWidgets(void);
+ void showProfile(void);
+ void addProfile(const QString& name);
+ void deleteProfile(const QString& name);
+ const QString enterName(bool& ok);
+
+private:
+ bool m_inEdit;
+ MyMoneyQifProfile m_profile;
+ bool m_isDirty;
+ bool m_isAccepted;
+ QListViewItem* m_selectedAmountType;
+};
+
+#endif