summaryrefslogtreecommitdiffstats
path: root/kmymoney2/wizards/wizardpages
diff options
context:
space:
mode:
Diffstat (limited to 'kmymoney2/wizards/wizardpages')
-rw-r--r--kmymoney2/wizards/wizardpages/Makefile.am18
-rw-r--r--kmymoney2/wizards/wizardpages/accounts.cpp39
-rw-r--r--kmymoney2/wizards/wizardpages/accounts.h42
-rw-r--r--kmymoney2/wizards/wizardpages/accountsdecl.ui54
-rw-r--r--kmymoney2/wizards/wizardpages/currency.cpp66
-rw-r--r--kmymoney2/wizards/wizardpages/currency.h45
-rw-r--r--kmymoney2/wizards/wizardpages/currencydecl.ui96
-rw-r--r--kmymoney2/wizards/wizardpages/userinfo.cpp52
-rw-r--r--kmymoney2/wizards/wizardpages/userinfo.h44
-rw-r--r--kmymoney2/wizards/wizardpages/userinfodecl.ui225
10 files changed, 681 insertions, 0 deletions
diff --git a/kmymoney2/wizards/wizardpages/Makefile.am b/kmymoney2/wizards/wizardpages/Makefile.am
new file mode 100644
index 0000000..65ea6a7
--- /dev/null
+++ b/kmymoney2/wizards/wizardpages/Makefile.am
@@ -0,0 +1,18 @@
+noinst_LIBRARIES = libwizardpages.a
+KDE_OPTIONS = noautodist
+
+INCLUDES = $(all_includes) -I$(top_srcdir) -I.
+
+libwizardpages_a_METASOURCES = AUTO
+
+libwizardpages_a_SOURCES = userinfodecl.ui userinfo.cpp currencydecl.ui currency.cpp accountsdecl.ui accounts.cpp
+
+EXTRA_DIST = userinfodecl.ui currencydecl.ui accountsdecl.ui
+
+DISTCLEANFILES= userinfodecl.cpp userinfodecl.h currencydecl.cpp currencydecl.h accountsdecl.cpp accountsdecl.h
+
+noinst_HEADERS = userinfo.h currency.h accounts.h
+
+SUBDIRS =
+
+messages: rc.cpp
diff --git a/kmymoney2/wizards/wizardpages/accounts.cpp b/kmymoney2/wizards/wizardpages/accounts.cpp
new file mode 100644
index 0000000..0a6c82b
--- /dev/null
+++ b/kmymoney2/wizards/wizardpages/accounts.cpp
@@ -0,0 +1,39 @@
+/***************************************************************************
+ accounts.cpp
+ -------------------
+ begin : Fri Jun 1 2007
+ copyright : (C) 2007 Thomas Baumgart
+ email : Thomas Baumgart <ipwizard@users.sourceforge.net>
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+
+// ----------------------------------------------------------------------------
+// QT Includes
+
+#include <qheader.h>
+
+// ----------------------------------------------------------------------------
+// KDE Includes
+
+#include <klistview.h>
+#include <kmymoney/kmymoneyaccounttree.h>
+
+// ----------------------------------------------------------------------------
+// Project Includes
+
+#include "accounts.h"
+
+Accounts::Accounts(QWidget* parent, const char* name) :
+ AccountsDecl(parent, name)
+{
+}
+
+#include "accounts.moc"
diff --git a/kmymoney2/wizards/wizardpages/accounts.h b/kmymoney2/wizards/wizardpages/accounts.h
new file mode 100644
index 0000000..d1f3175
--- /dev/null
+++ b/kmymoney2/wizards/wizardpages/accounts.h
@@ -0,0 +1,42 @@
+/***************************************************************************
+ accounts.h
+ -------------------
+ begin : Fri Jun 1 2007
+ copyright : (C) 2007 Thomas Baumgart
+ email : Thomas Baumgart <ipwizard@users.sourceforge.net>
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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 ACCOUNTS_H
+#define ACCOUNTS_H
+
+// ----------------------------------------------------------------------------
+// QT Includes
+
+// ----------------------------------------------------------------------------
+// Project Includes
+
+#include "accountsdecl.h"
+
+/**
+ * @author Thomas Baumgart
+ */
+class Accounts : public AccountsDecl
+{
+ Q_OBJECT
+public:
+ Accounts(QWidget* parent = 0, const char* name = 0);
+
+private:
+};
+
+
+#endif
diff --git a/kmymoney2/wizards/wizardpages/accountsdecl.ui b/kmymoney2/wizards/wizardpages/accountsdecl.ui
new file mode 100644
index 0000000..9e7b7c9
--- /dev/null
+++ b/kmymoney2/wizards/wizardpages/accountsdecl.ui
@@ -0,0 +1,54 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>AccountsDecl</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>AccountsDecl</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>600</width>
+ <height>550</height>
+ </rect>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KActiveLabel">
+ <property name="name">
+ <cstring>kActiveLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>Select groups of accounts that correspond to the ways that you will use KMyMoney. Each group you select will cause several accounts and categories to be created. Select the groups that are relevant to you. You can always create additional accounts manually later.</string>
+ </property>
+ </widget>
+ <widget class="KAccountTemplateSelector">
+ <property name="name">
+ <cstring>m_templateSelector</cstring>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </vbox>
+</widget>
+<customwidgets>
+</customwidgets>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kmymoney2/wizards/wizardpages/currency.cpp b/kmymoney2/wizards/wizardpages/currency.cpp
new file mode 100644
index 0000000..8693089
--- /dev/null
+++ b/kmymoney2/wizards/wizardpages/currency.cpp
@@ -0,0 +1,66 @@
+/***************************************************************************
+ userinfo.cpp
+ -------------------
+ begin : Fri Jun 1 2007
+ copyright : (C) 2007 Thomas Baumgart
+ email : Thomas Baumgart <ipwizard@users.sourceforge.net>
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+
+// ----------------------------------------------------------------------------
+// QT Includes
+
+// ----------------------------------------------------------------------------
+// KDE Includes
+
+#include <klocale.h>
+#include <klistview.h>
+
+// ----------------------------------------------------------------------------
+// Project Includes
+
+#include "currency.h"
+
+Currency::Currency(QWidget* parent, const char* name) :
+ CurrencyDecl(parent, name)
+{
+ m_currencyList->setAllColumnsShowFocus(true);
+ m_currencyList->setMultiSelection(false);
+}
+
+QListViewItem* Currency::insertCurrency(const MyMoneySecurity& sec)
+{
+ return new KListViewItem(m_currencyList, sec.name(), QString(sec.id()), sec.tradingSymbol());
+}
+
+void Currency::selectCurrency(const MyMoneySecurity& sec)
+{
+ QListViewItem* it_v;
+ QListViewItemIterator it(m_currencyList);
+ while((it_v = it.current()) != 0) {
+ if(it_v->text(1) == QString(sec.id())) {
+ m_currencyList->setSelected(it_v, true);
+ m_currencyList->ensureItemVisible(it_v);
+ break;
+ }
+ }
+}
+
+QString Currency::selectedCurrency(void) const
+{
+ QString id;
+ if(m_currencyList->selectedItem()) {
+ id = m_currencyList->selectedItem()->text(1);
+ }
+ return id;
+}
+
+#include "currency.moc"
diff --git a/kmymoney2/wizards/wizardpages/currency.h b/kmymoney2/wizards/wizardpages/currency.h
new file mode 100644
index 0000000..1ce2649
--- /dev/null
+++ b/kmymoney2/wizards/wizardpages/currency.h
@@ -0,0 +1,45 @@
+/***************************************************************************
+ currency.h
+ -------------------
+ begin : Fri Jun 1 2007
+ copyright : (C) 2007 Thomas Baumgart
+ email : Thomas Baumgart <ipwizard@users.sourceforge.net>
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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 CURRENCY_H
+#define CURRENCY_H
+
+// ----------------------------------------------------------------------------
+// QT Includes
+
+class KListViewItem;
+
+// ----------------------------------------------------------------------------
+// Project Includes
+
+#include "currencydecl.h"
+#include <kmymoney/mymoneysecurity.h>
+
+/**
+ * @author Thomas Baumgart
+ */
+class Currency : public CurrencyDecl
+{
+ Q_OBJECT
+public:
+ Currency(QWidget* parent = 0, const char* name = 0);
+ QListViewItem* insertCurrency(const MyMoneySecurity& sec);
+ void selectCurrency(const MyMoneySecurity& sec);
+ QString selectedCurrency(void) const;
+};
+
+#endif
diff --git a/kmymoney2/wizards/wizardpages/currencydecl.ui b/kmymoney2/wizards/wizardpages/currencydecl.ui
new file mode 100644
index 0000000..f2b857a
--- /dev/null
+++ b/kmymoney2/wizards/wizardpages/currencydecl.ui
@@ -0,0 +1,96 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>CurrencyDecl</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>CurrencyDecl</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>600</width>
+ <height>573</height>
+ </rect>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KActiveLabel">
+ <property name="name">
+ <cstring>kActiveLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>&lt;p&gt;KMyMoney supports multiple currencies, nevertheless one of them will be used as your base currency. The base currency is used as default for new accounts and reports. Please select the base currency from the following list.</string>
+ </property>
+ </widget>
+ <widget class="KListView">
+ <column>
+ <property name="text">
+ <string>Name</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>ISO Code</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Symbol</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>m_currencyList</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>1</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="fullWidth">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>31</height>
+ </size>
+ </property>
+ </spacer>
+ </vbox>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kmymoney2/wizards/wizardpages/userinfo.cpp b/kmymoney2/wizards/wizardpages/userinfo.cpp
new file mode 100644
index 0000000..412c5a1
--- /dev/null
+++ b/kmymoney2/wizards/wizardpages/userinfo.cpp
@@ -0,0 +1,52 @@
+/***************************************************************************
+ userinfo.cpp
+ -------------------
+ begin : Fri Jun 1 2007
+ copyright : (C) 2007 Thomas Baumgart
+ email : Thomas Baumgart <ipwizard@users.sourceforge.net>
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+
+// ----------------------------------------------------------------------------
+// QT Includes
+
+// ----------------------------------------------------------------------------
+// KDE Includes
+
+#include <klocale.h>
+#include <klineedit.h>
+
+// ----------------------------------------------------------------------------
+// Project Includes
+
+#include "userinfo.h"
+#include <kmymoney/mymoneypayee.h>
+
+UserInfo::UserInfo(QWidget* parent, const char* name) :
+ UserInfoDecl(parent, name)
+{
+ m_userNameEdit->setFocus();
+}
+
+MyMoneyPayee UserInfo::user(void) const
+{
+ MyMoneyPayee user;
+ user.setName(m_userNameEdit->text());
+ user.setAddress(m_streetEdit->text());
+ user.setCity(m_townEdit->text());
+ user.setState(m_countyEdit->text());
+ user.setPostcode(m_postcodeEdit->text());
+ user.setTelephone(m_telephoneEdit->text());
+ user.setEmail(m_emailEdit->text());
+ return user;
+}
+
+#include "userinfo.moc"
diff --git a/kmymoney2/wizards/wizardpages/userinfo.h b/kmymoney2/wizards/wizardpages/userinfo.h
new file mode 100644
index 0000000..9242868
--- /dev/null
+++ b/kmymoney2/wizards/wizardpages/userinfo.h
@@ -0,0 +1,44 @@
+/***************************************************************************
+ userinfo.h
+ -------------------
+ begin : Fri Jun 1 2007
+ copyright : (C) 2007 Thomas Baumgart
+ email : Thomas Baumgart <ipwizard@users.sourceforge.net>
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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 USERINFO_H
+#define USERINFO_H
+
+// ----------------------------------------------------------------------------
+// QT Includes
+
+// ----------------------------------------------------------------------------
+// Project Includes
+
+#include "userinfodecl.h"
+class MyMoneyPayee;
+
+/**
+ * @author Thomas Baumgart
+ */
+class UserInfo : public UserInfoDecl
+{
+ Q_OBJECT
+public:
+ UserInfo(QWidget* parent = 0, const char* name = 0);
+ MyMoneyPayee user(void) const;
+
+private:
+};
+
+
+#endif
diff --git a/kmymoney2/wizards/wizardpages/userinfodecl.ui b/kmymoney2/wizards/wizardpages/userinfodecl.ui
new file mode 100644
index 0000000..4240d49
--- /dev/null
+++ b/kmymoney2/wizards/wizardpages/userinfodecl.ui
@@ -0,0 +1,225 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>UserInfoDecl</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>UserInfoDecl</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>603</width>
+ <height>374</height>
+ </rect>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KActiveLabel" row="0" column="0" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>kActiveLabel1</cstring>
+ </property>
+ <property name="focusPolicy">
+ <enum>NoFocus</enum>
+ </property>
+ <property name="text">
+ <string>&lt;p&gt;Use the fields below to enter some information about yourself.&lt;/p&gt;
+
+&lt;p&gt;All information is optional and only used to personalize your KMyMoney file.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="1" column="1" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>m_userNameEdit</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="3" column="0">
+ <property name="name">
+ <cstring>TextLabel3</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Town:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="4" column="0">
+ <property name="name">
+ <cstring>TextLabel4</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>County/State:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>TextLabel2</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Street:</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="2" column="1" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>m_streetEdit</cstring>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="6" column="1" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>m_emailEdit</cstring>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="3" column="1" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>m_townEdit</cstring>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="5" column="1" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>m_telephoneEdit</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="6" column="0">
+ <property name="name">
+ <cstring>TextLabel7</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Email:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="5" column="0">
+ <property name="name">
+ <cstring>TextLabel6</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Telephone:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Your name:</string>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="7" column="0" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>layout22</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KPushButton">
+ <property name="name">
+ <cstring>m_loadAddressButton</cstring>
+ </property>
+ <property name="text">
+ <string>Load from Addressbook</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer11</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>305</width>
+ <height>21</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ <spacer row="8" column="2">
+ <property name="name">
+ <cstring>spacer5</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KLineEdit" row="4" column="1">
+ <property name="name">
+ <cstring>m_countyEdit</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="4" column="2">
+ <property name="name">
+ <cstring>TextLabel5</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Postal Code:</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="4" column="3">
+ <property name="name">
+ <cstring>m_postcodeEdit</cstring>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<tabstops>
+ <tabstop>m_userNameEdit</tabstop>
+ <tabstop>m_streetEdit</tabstop>
+ <tabstop>m_townEdit</tabstop>
+ <tabstop>m_countyEdit</tabstop>
+ <tabstop>m_postcodeEdit</tabstop>
+ <tabstop>m_telephoneEdit</tabstop>
+ <tabstop>m_emailEdit</tabstop>
+ <tabstop>m_loadAddressButton</tabstop>
+ <tabstop>kActiveLabel1</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>