[kmymoney] kmymoney: Add exact payee name match option

Thomas Baumgart null at kde.org
Sat Jan 7 08:08:52 UTC 2017


Git commit f642c1913c2272429a08483acaee0162f958ef3b by Thomas Baumgart.
Committed on 07/01/2017 at 08:02.
Pushed by tbaumgart into branch 'master'.

Add exact payee name match option

The current 'Match on payees name' option works on a partial match
of the name. In some scenarios, an exact match is expected. The
new option allows to select that on a per payee basis.

The default for new payees entered through the GUI is not changed.
It remains 'No matching'. The default for new payees created during
statement import is the new 'Match exact name' option.

Also, the radio button based selection has been changed to a combobox.

GUI:
CCBUG: 374352

M  +7    -1    kmymoney/converter/mymoneystatementreader.cpp
M  +6    -1    kmymoney/mymoney/mymoneypayee.cpp
M  +2    -1    kmymoney/mymoney/mymoneypayee.h
M  +13   -0    kmymoney/mymoney/tests/mymoneypayee-test.cpp
M  +1    -0    kmymoney/mymoney/tests/mymoneypayee-test.h
M  +13   -14   kmymoney/views/kpayeesview.cpp
M  +489  -540  kmymoney/views/kpayeesviewdecl.ui

https://commits.kde.org/kmymoney/f642c1913c2272429a08483acaee0162f958ef3b

diff --git a/kmymoney/converter/mymoneystatementreader.cpp b/kmymoney/converter/mymoneystatementreader.cpp
index c21e9bd0..9db04964 100644
--- a/kmymoney/converter/mymoneystatementreader.cpp
+++ b/kmymoney/converter/mymoneystatementreader.cpp
@@ -906,12 +906,18 @@ void MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra
         bool ignoreCase;
         QStringList keys;
         QStringList::const_iterator it_s;
-        switch ((*it_p).matchData(ignoreCase, keys)) {
+        const MyMoneyPayee::payeeMatchType matchType = (*it_p).matchData(ignoreCase, keys);
+        switch (matchType) {
           case MyMoneyPayee::matchDisabled:
             break;
 
           case MyMoneyPayee::matchName:
+          case MyMoneyPayee::matchNameExact:
             keys << QString("%1").arg(QRegExp::escape((*it_p).name()));
+            if(matchType == MyMoneyPayee::matchNameExact) {
+              keys.clear();
+              keys << QString("^%1$").arg(QRegExp::escape((*it_p).name()));
+            }
             // tricky fall through here
 
           case MyMoneyPayee::matchKey:
diff --git a/kmymoney/mymoney/mymoneypayee.cpp b/kmymoney/mymoney/mymoneypayee.cpp
index c59fc849..c17295e6 100644
--- a/kmymoney/mymoney/mymoneypayee.cpp
+++ b/kmymoney/mymoney/mymoneypayee.cpp
@@ -196,8 +196,11 @@ MyMoneyPayee::payeeMatchType MyMoneyPayee::matchData(bool& ignorecase, QStringLi
 
   if (m_matchingEnabled) {
     type = m_usingMatchKey ? matchKey : matchName;
-    if (type == matchKey)
+    if (type == matchKey) {
       keys = m_matchKey.split(';');
+    } else if (m_matchKey.compare(QLatin1String("^$")) == 0) {
+      type = matchNameExact;
+    }
   }
 
   return type;
@@ -223,6 +226,8 @@ void MyMoneyPayee::setMatchData(payeeMatchType type, bool ignorecase, const QStr
       QRegExp validKeyRegExp("[^ ]");
       QStringList filteredKeys = keys.filter(validKeyRegExp);
       m_matchKey = filteredKeys.join(";");
+    } else if(type == matchNameExact) {
+      m_matchKey = QLatin1String("^$");
     }
   }
 }
diff --git a/kmymoney/mymoney/mymoneypayee.h b/kmymoney/mymoney/mymoneypayee.h
index 89db5e3d..614eec67 100644
--- a/kmymoney/mymoney/mymoneypayee.h
+++ b/kmymoney/mymoney/mymoneypayee.h
@@ -83,7 +83,8 @@ public:
   typedef enum {
     matchDisabled = 0,
     matchName,
-    matchKey
+    matchKey,
+    matchNameExact
   } payeeMatchType;
 
   MyMoneyPayee();
diff --git a/kmymoney/mymoney/tests/mymoneypayee-test.cpp b/kmymoney/mymoney/tests/mymoneypayee-test.cpp
index 0fe17e07..47afb269 100644
--- a/kmymoney/mymoney/tests/mymoneypayee-test.cpp
+++ b/kmymoney/mymoney/tests/mymoneypayee-test.cpp
@@ -193,3 +193,16 @@ void MyMoneyPayeeTest::testMatchKeyAllowSpaceAtEnd()
   QVERIFY(ignoreCase == false);
   QVERIFY(keys == QLatin1String("payee "));
 }
+
+void MyMoneyPayeeTest::testMatchNameExact()
+{
+  MyMoneyPayee payee;
+  QString keys;
+  bool ignoreCase;
+
+  payee.setMatchData(MyMoneyPayee::matchNameExact, false, keys);
+  keys = QLatin1String("payee ");
+  QCOMPARE(payee.matchData(ignoreCase, keys), MyMoneyPayee::matchNameExact);
+  QCOMPARE(ignoreCase, false);
+  QVERIFY(keys.isEmpty());
+}
diff --git a/kmymoney/mymoney/tests/mymoneypayee-test.h b/kmymoney/mymoney/tests/mymoneypayee-test.h
index ff740a3f..56ead47a 100644
--- a/kmymoney/mymoney/tests/mymoneypayee-test.h
+++ b/kmymoney/mymoney/tests/mymoneypayee-test.h
@@ -30,6 +30,7 @@ private slots:
   void testMatchKeyDisallowMultipleSpace();
   void testMatchKeyAllowSpaceAtStart();
   void testMatchKeyAllowSpaceAtEnd();
+  void testMatchNameExact();
 };
 
 #endif
diff --git a/kmymoney/views/kpayeesview.cpp b/kmymoney/views/kpayeesview.cpp
index 62485152..9834de39 100644
--- a/kmymoney/views/kpayeesview.cpp
+++ b/kmymoney/views/kpayeesview.cpp
@@ -96,9 +96,10 @@ KPayeesView::KPayeesView(QWidget *parent) :
   m_filterProxyModel->sort(0);
   comboDefaultCategory->setModel(m_filterProxyModel);
 
-  m_matchType->setId(radioNoMatch, 0);
-  m_matchType->setId(radioNameMatch, 1);
-  m_matchType->setId(radioKeyMatch, 2);
+  matchTypeCombo->addItem(i18nc("@item No matching", "No matching"), MyMoneyPayee::matchDisabled);
+  matchTypeCombo->addItem(i18nc("@item Match Payees name partially", "Match Payees name (partial)"), MyMoneyPayee::matchName);
+  matchTypeCombo->addItem(i18nc("@item Match Payees name exactly", "Match Payees name (exact)"), MyMoneyPayee::matchNameExact);
+  matchTypeCombo->addItem(i18nc("@item Search match in list", "Match on a name listed below"), MyMoneyPayee::matchKey);
 
   // create the searchline widget
   // and insert it into the existing layout
@@ -149,7 +150,7 @@ KPayeesView::KPayeesView(QWidget *parent) :
   KGuiItem::assign(m_updateButton, updateButtonItem);
 
   m_updateButton->setEnabled(false);
-  radioNoMatch->setChecked(true);
+  matchTypeCombo->setCurrentIndex(0);
 
   checkMatchIgnoreCase->setEnabled(false);
 
@@ -187,9 +188,7 @@ KPayeesView::KPayeesView(QWidget *parent) :
   connect(notesEdit, SIGNAL(textChanged()), this, SLOT(slotPayeeDataChanged()));
   connect(matchKeyEditList, SIGNAL(changed()), this, SLOT(slotKeyListChanged()));
 
-  connect(radioNoMatch, SIGNAL(toggled(bool)), this, SLOT(slotPayeeDataChanged()));
-  connect(radioNameMatch, SIGNAL(toggled(bool)), this, SLOT(slotPayeeDataChanged()));
-  connect(radioKeyMatch, SIGNAL(toggled(bool)), this, SLOT(slotPayeeDataChanged()));
+  connect(matchTypeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(slotPayeeDataChanged()));
   connect(checkMatchIgnoreCase, SIGNAL(toggled(bool)), this, SLOT(slotPayeeDataChanged()));
 
   connect(checkEnableDefaultCategory, SIGNAL(toggled(bool)), this, SLOT(slotPayeeDataChanged()));
@@ -448,7 +447,7 @@ void KPayeesView::slotSelectPayee()
     bool ignorecase = false;
     MyMoneyPayee::payeeMatchType type = m_payee.matchData(ignorecase, keys);
 
-    m_matchType->button(static_cast<int>(type))->setChecked(true);
+    matchTypeCombo->setCurrentIndex(matchTypeCombo->findData(type));
     matchKeyEditList->clear();
     matchKeyEditList->insertStringList(keys);
     checkMatchIgnoreCase->setChecked(ignorecase);
@@ -573,7 +572,7 @@ void KPayeesView::slotKeyListChanged()
   QStringList keys;
 
   m_payee.matchData(ignorecase, keys);
-  if (m_matchType->checkedId() == MyMoneyPayee::matchKey) {
+  if (matchTypeCombo->currentData().toUInt() == MyMoneyPayee::matchKey) {
     rc |= (keys != matchKeyEditList->items());
   }
   setDirty(rc);
@@ -601,19 +600,19 @@ void KPayeesView::slotPayeeDataChanged()
     QStringList keys;
 
     MyMoneyPayee::payeeMatchType type = m_payee.matchData(ignorecase, keys);
-    rc |= (static_cast<int>(type) != m_matchType->checkedId());
+    rc |= (static_cast<int>(type) != matchTypeCombo->currentData().toUInt());
 
     checkMatchIgnoreCase->setEnabled(false);
     matchKeyEditList->setEnabled(false);
 
-    if (m_matchType->checkedId() != MyMoneyPayee::matchDisabled) {
+    if (matchTypeCombo->currentData().toUInt() != MyMoneyPayee::matchDisabled) {
       checkMatchIgnoreCase->setEnabled(true);
       // if we turn matching on, we default to 'ignore case'
       // TODO maybe make the default a user option
-      if (type == MyMoneyPayee::matchDisabled && m_matchType->checkedId() != MyMoneyPayee::matchDisabled)
+      if (type == MyMoneyPayee::matchDisabled && matchTypeCombo->currentData().toUInt() != MyMoneyPayee::matchDisabled)
         checkMatchIgnoreCase->setChecked(true);
       rc |= (ignorecase != checkMatchIgnoreCase->isChecked());
-      if (m_matchType->checkedId() == MyMoneyPayee::matchKey) {
+      if (matchTypeCombo->currentData().toUInt() == MyMoneyPayee::matchKey) {
         matchKeyEditList->setEnabled(true);
         rc |= (keys != matchKeyEditList->items());
       }
@@ -653,7 +652,7 @@ void KPayeesView::slotUpdatePayee()
       m_payee.setTelephone(telephoneEdit->text());
       m_payee.setEmail(emailEdit->text());
       m_payee.setNotes(notesEdit->toPlainText());
-      m_payee.setMatchData(static_cast<MyMoneyPayee::payeeMatchType>(m_matchType->checkedId()), checkMatchIgnoreCase->isChecked(), matchKeyEditList->items());
+      m_payee.setMatchData(static_cast<MyMoneyPayee::payeeMatchType>(matchTypeCombo->currentData().toUInt()), checkMatchIgnoreCase->isChecked(), matchKeyEditList->items());
       m_payee.setDefaultAccountId();
       m_payee.resetPayeeIdentifiers(payeeIdentifiers->identifiers());
 
diff --git a/kmymoney/views/kpayeesviewdecl.ui b/kmymoney/views/kpayeesviewdecl.ui
index 21991d93..de8416c0 100644
--- a/kmymoney/views/kpayeesviewdecl.ui
+++ b/kmymoney/views/kpayeesviewdecl.ui
@@ -6,358 +6,166 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>643</width>
-    <height>402</height>
+    <width>885</width>
+    <height>567</height>
    </rect>
   </property>
-  <layout class="QVBoxLayout" name="verticalLayout_3">
-   <property name="leftMargin">
-    <number>0</number>
-   </property>
-   <property name="topMargin">
-    <number>0</number>
-   </property>
-   <property name="rightMargin">
-    <number>0</number>
-   </property>
-   <property name="bottomMargin">
-    <number>0</number>
-   </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
    <item>
-    <layout class="QVBoxLayout" name="verticalLayout">
-     <item>
-      <widget class="QSplitter" name="m_splitter">
-       <property name="orientation">
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="childrenCollapsible">
-        <bool>false</bool>
-       </property>
-       <widget class="QGroupBox" name="groupBox1">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-          <horstretch>1</horstretch>
-          <verstretch>1</verstretch>
-         </sizepolicy>
-        </property>
-        <property name="title">
-         <string>Your payees</string>
-        </property>
-        <layout class="QVBoxLayout">
+    <widget class="QSplitter" name="m_splitter">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="childrenCollapsible">
+      <bool>false</bool>
+     </property>
+     <widget class="QGroupBox" name="groupBox1">
+      <property name="sizePolicy">
+       <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+        <horstretch>1</horstretch>
+        <verstretch>1</verstretch>
+       </sizepolicy>
+      </property>
+      <property name="title">
+       <string>Your payees</string>
+      </property>
+      <layout class="QVBoxLayout">
+       <item>
+        <layout class="QHBoxLayout">
          <item>
-          <layout class="QHBoxLayout">
-           <item>
-            <widget class="QPushButton" name="m_newButton">
-             <property name="text">
-              <string comment="New payee">New</string>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="QPushButton" name="m_renameButton">
-             <property name="text">
-              <string>Ren</string>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="QPushButton" name="m_deleteButton">
-             <property name="text">
-              <string>Del</string>
-             </property>
-             <property name="shortcut">
-              <string/>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="QPushButton" name="m_mergeButton">
-             <property name="text">
-              <string>Merge</string>
-             </property>
-            </widget>
-           </item>
-          </layout>
+          <widget class="QPushButton" name="m_newButton">
+           <property name="text">
+            <string comment="New payee">New</string>
+           </property>
+          </widget>
          </item>
          <item>
-          <layout class="QHBoxLayout" name="m_listTopHLayout">
-           <item>
-            <widget class="KComboBox" name="m_filterBox"/>
-           </item>
-          </layout>
+          <widget class="QPushButton" name="m_renameButton">
+           <property name="text">
+            <string>Ren</string>
+           </property>
+          </widget>
          </item>
          <item>
-          <widget class="QListWidget" name="m_payeesList">
-           <property name="sizePolicy">
-            <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-             <horstretch>1</horstretch>
-             <verstretch>1</verstretch>
-            </sizepolicy>
+          <widget class="QPushButton" name="m_deleteButton">
+           <property name="text">
+            <string>Del</string>
            </property>
-           <property name="alternatingRowColors">
-            <bool>true</bool>
+           <property name="shortcut">
+            <string/>
            </property>
-           <property name="selectionMode">
-            <enum>QAbstractItemView::ExtendedSelection</enum>
+          </widget>
+         </item>
+         <item>
+          <widget class="QPushButton" name="m_mergeButton">
+           <property name="text">
+            <string>Merge</string>
            </property>
           </widget>
          </item>
         </layout>
-       </widget>
-       <widget class="QTabWidget" name="m_tabWidget">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-          <horstretch>2</horstretch>
-          <verstretch>1</verstretch>
-         </sizepolicy>
-        </property>
-        <property name="currentIndex">
-         <number>2</number>
-        </property>
-        <widget class="QWidget" name="tab">
-         <attribute name="title">
-          <string>Transactions</string>
-         </attribute>
-         <layout class="QVBoxLayout">
-          <item>
-           <widget class="QGroupBox" name="transactionGroup">
-            <property name="title">
-             <string>Transactions</string>
-            </property>
+       </item>
+       <item>
+        <layout class="QHBoxLayout" name="m_listTopHLayout">
+         <item>
+          <widget class="KComboBox" name="m_filterBox"/>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <widget class="QListWidget" name="m_payeesList">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+           <horstretch>1</horstretch>
+           <verstretch>1</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="alternatingRowColors">
+          <bool>true</bool>
+         </property>
+         <property name="selectionMode">
+          <enum>QAbstractItemView::ExtendedSelection</enum>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QTabWidget" name="m_tabWidget">
+      <property name="sizePolicy">
+       <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+        <horstretch>2</horstretch>
+        <verstretch>1</verstretch>
+       </sizepolicy>
+      </property>
+      <property name="currentIndex">
+       <number>0</number>
+      </property>
+      <widget class="QWidget" name="tab">
+       <attribute name="title">
+        <string>Transactions</string>
+       </attribute>
+       <layout class="QVBoxLayout">
+        <item>
+         <widget class="QGroupBox" name="transactionGroup">
+          <property name="title">
+           <string>Transactions</string>
+          </property>
+          <layout class="QVBoxLayout">
+           <property name="spacing">
+            <number>6</number>
+           </property>
+           <property name="leftMargin">
+            <number>11</number>
+           </property>
+           <property name="topMargin">
+            <number>11</number>
+           </property>
+           <property name="rightMargin">
+            <number>11</number>
+           </property>
+           <property name="bottomMargin">
+            <number>11</number>
+           </property>
+           <item>
             <layout class="QVBoxLayout">
              <property name="spacing">
               <number>6</number>
              </property>
              <property name="leftMargin">
-              <number>11</number>
+              <number>0</number>
              </property>
              <property name="topMargin">
-              <number>11</number>
+              <number>0</number>
              </property>
              <property name="rightMargin">
-              <number>11</number>
+              <number>0</number>
              </property>
              <property name="bottomMargin">
-              <number>11</number>
+              <number>0</number>
              </property>
              <item>
-              <layout class="QVBoxLayout">
-               <property name="spacing">
-                <number>6</number>
-               </property>
-               <property name="leftMargin">
-                <number>0</number>
-               </property>
-               <property name="topMargin">
-                <number>0</number>
-               </property>
-               <property name="rightMargin">
-                <number>0</number>
-               </property>
-               <property name="bottomMargin">
-                <number>0</number>
-               </property>
-               <item>
-                <widget class="KMyMoneyRegister::Register" name="m_register">
-                 <column/>
-                 <column/>
-                 <column/>
-                 <column/>
-                 <column/>
-                 <column/>
-                 <column/>
-                 <column/>
-                 <column/>
-                 <column/>
-                 <column/>
-                 <column/>
-                </widget>
-               </item>
-               <item>
-                <widget class="QLabel" name="m_balanceLabel">
-                 <property name="text">
-                  <string>Balance: </string>
-                 </property>
-                 <property name="alignment">
-                  <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-                 </property>
-                 <property name="wordWrap">
-                  <bool>false</bool>
-                 </property>
-                </widget>
-               </item>
-              </layout>
-             </item>
-            </layout>
-           </widget>
-          </item>
-         </layout>
-        </widget>
-        <widget class="QWidget" name="tab1">
-         <attribute name="title">
-          <string comment="Street address">Address</string>
-         </attribute>
-         <layout class="QVBoxLayout">
-          <item>
-           <widget class="QGroupBox" name="detailsGroup">
-            <property name="title">
-             <string>Payee Information</string>
-            </property>
-            <layout class="QGridLayout">
-             <property name="leftMargin">
-              <number>11</number>
-             </property>
-             <property name="topMargin">
-              <number>11</number>
-             </property>
-             <property name="rightMargin">
-              <number>11</number>
-             </property>
-             <property name="bottomMargin">
-              <number>11</number>
-             </property>
-             <property name="spacing">
-              <number>6</number>
-             </property>
-             <item row="3" column="0">
-              <widget class="QLabel" name="TextLabel7">
-               <property name="sizePolicy">
-                <sizepolicy hsizetype="Fixed" vsizetype="Minimum">
-                 <horstretch>0</horstretch>
-                 <verstretch>0</verstretch>
-                </sizepolicy>
-               </property>
-               <property name="minimumSize">
-                <size>
-                 <width>90</width>
-                 <height>0</height>
-                </size>
-               </property>
-               <property name="text">
-                <string comment="E-mail address">E-Mail:</string>
-               </property>
-               <property name="wordWrap">
-                <bool>false</bool>
-               </property>
-              </widget>
-             </item>
-             <item row="1" column="0">
-              <widget class="QLabel" name="TextLabel5">
-               <property name="sizePolicy">
-                <sizepolicy hsizetype="Fixed" vsizetype="Minimum">
-                 <horstretch>0</horstretch>
-                 <verstretch>0</verstretch>
-                </sizepolicy>
-               </property>
-               <property name="minimumSize">
-                <size>
-                 <width>90</width>
-                 <height>0</height>
-                </size>
-               </property>
-               <property name="text">
-                <string>Postal Code:</string>
-               </property>
-               <property name="wordWrap">
-                <bool>false</bool>
-               </property>
+              <widget class="KMyMoneyRegister::Register" name="m_register">
+               <column/>
+               <column/>
+               <column/>
+               <column/>
+               <column/>
+               <column/>
+               <column/>
+               <column/>
+               <column/>
+               <column/>
+               <column/>
+               <column/>
               </widget>
              </item>
-             <item row="2" column="0">
-              <widget class="QLabel" name="TextLabel6">
-               <property name="sizePolicy">
-                <sizepolicy hsizetype="Fixed" vsizetype="Minimum">
-                 <horstretch>0</horstretch>
-                 <verstretch>0</verstretch>
-                </sizepolicy>
-               </property>
-               <property name="minimumSize">
-                <size>
-                 <width>90</width>
-                 <height>0</height>
-                </size>
-               </property>
-               <property name="text">
-                <string>Telephone/Fax:</string>
-               </property>
-               <property name="wordWrap">
-                <bool>false</bool>
-               </property>
-              </widget>
-             </item>
-             <item row="4" column="0">
-              <widget class="QLabel" name="TextLabel4_2">
-               <property name="sizePolicy">
-                <sizepolicy hsizetype="Fixed" vsizetype="Minimum">
-                 <horstretch>0</horstretch>
-                 <verstretch>0</verstretch>
-                </sizepolicy>
-               </property>
-               <property name="minimumSize">
-                <size>
-                 <width>90</width>
-                 <height>0</height>
-                </size>
-               </property>
-               <property name="text">
-                <string>Notes</string>
-               </property>
-               <property name="alignment">
-                <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
-               </property>
-               <property name="wordWrap">
-                <bool>false</bool>
-               </property>
-              </widget>
-             </item>
-             <item row="1" column="1">
-              <widget class="KLineEdit" name="postcodeEdit"/>
-             </item>
-             <item row="2" column="1">
-              <widget class="KLineEdit" name="telephoneEdit"/>
-             </item>
-             <item row="3" column="1">
-              <widget class="KLineEdit" name="emailEdit"/>
-             </item>
-             <item row="0" column="1">
-              <widget class="KTextEdit" name="addressEdit">
-               <property name="sizePolicy">
-                <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-                 <horstretch>0</horstretch>
-                 <verstretch>1</verstretch>
-                </sizepolicy>
-               </property>
-              </widget>
-             </item>
-             <item row="4" column="1">
-              <widget class="KTextEdit" name="notesEdit">
-               <property name="sizePolicy">
-                <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-                 <horstretch>0</horstretch>
-                 <verstretch>1</verstretch>
-                </sizepolicy>
-               </property>
-              </widget>
-             </item>
-             <item row="0" column="0">
-              <widget class="QLabel" name="TextLabel4">
-               <property name="sizePolicy">
-                <sizepolicy hsizetype="Fixed" vsizetype="Minimum">
-                 <horstretch>0</horstretch>
-                 <verstretch>0</verstretch>
-                </sizepolicy>
-               </property>
-               <property name="minimumSize">
-                <size>
-                 <width>90</width>
-                 <height>0</height>
-                </size>
-               </property>
+             <item>
+              <widget class="QLabel" name="m_balanceLabel">
                <property name="text">
-                <string comment="Street address">Address:</string>
+                <string>Balance: </string>
                </property>
                <property name="alignment">
-                <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+                <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
                </property>
                <property name="wordWrap">
                 <bool>false</bool>
@@ -365,236 +173,377 @@
               </widget>
              </item>
             </layout>
-           </widget>
-          </item>
-          <item>
-           <spacer name="spacer6">
-            <property name="orientation">
-             <enum>Qt::Vertical</enum>
-            </property>
-            <property name="sizeType">
-             <enum>QSizePolicy::Expanding</enum>
-            </property>
-            <property name="sizeHint" stdset="0">
-             <size>
-              <width>21</width>
-              <height>20</height>
-             </size>
-            </property>
-           </spacer>
-          </item>
-         </layout>
-        </widget>
-        <widget class="QWidget" name="TabPage">
-         <attribute name="title">
-          <string>Matching</string>
-         </attribute>
-         <layout class="QVBoxLayout" name="verticalLayout_2">
-          <item>
-           <widget class="QGroupBox" name="m_matchTypeGroupBox">
-            <property name="title">
-             <string>Transaction Matching</string>
-            </property>
-            <layout class="QVBoxLayout" name="horizontalLayout">
+           </item>
+          </layout>
+         </widget>
+        </item>
+       </layout>
+      </widget>
+      <widget class="QWidget" name="tab1">
+       <attribute name="title">
+        <string comment="Street address">Address</string>
+       </attribute>
+       <layout class="QVBoxLayout">
+        <item>
+         <widget class="QGroupBox" name="detailsGroup">
+          <property name="title">
+           <string>Payee Information</string>
+          </property>
+          <layout class="QGridLayout">
+           <property name="leftMargin">
+            <number>11</number>
+           </property>
+           <property name="topMargin">
+            <number>11</number>
+           </property>
+           <property name="rightMargin">
+            <number>11</number>
+           </property>
+           <property name="bottomMargin">
+            <number>11</number>
+           </property>
+           <property name="spacing">
+            <number>6</number>
+           </property>
+           <item row="3" column="0">
+            <widget class="QLabel" name="TextLabel7">
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="Fixed" vsizetype="Minimum">
+               <horstretch>0</horstretch>
+               <verstretch>0</verstretch>
+              </sizepolicy>
+             </property>
+             <property name="minimumSize">
+              <size>
+               <width>90</width>
+               <height>0</height>
+              </size>
+             </property>
+             <property name="text">
+              <string comment="E-mail address">E-Mail:</string>
+             </property>
+             <property name="wordWrap">
+              <bool>false</bool>
+             </property>
+            </widget>
+           </item>
+           <item row="1" column="0">
+            <widget class="QLabel" name="TextLabel5">
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="Fixed" vsizetype="Minimum">
+               <horstretch>0</horstretch>
+               <verstretch>0</verstretch>
+              </sizepolicy>
+             </property>
+             <property name="minimumSize">
+              <size>
+               <width>90</width>
+               <height>0</height>
+              </size>
+             </property>
+             <property name="text">
+              <string>Postal Code:</string>
+             </property>
+             <property name="wordWrap">
+              <bool>false</bool>
+             </property>
+            </widget>
+           </item>
+           <item row="2" column="0">
+            <widget class="QLabel" name="TextLabel6">
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="Fixed" vsizetype="Minimum">
+               <horstretch>0</horstretch>
+               <verstretch>0</verstretch>
+              </sizepolicy>
+             </property>
+             <property name="minimumSize">
+              <size>
+               <width>90</width>
+               <height>0</height>
+              </size>
+             </property>
+             <property name="text">
+              <string>Telephone/Fax:</string>
+             </property>
+             <property name="wordWrap">
+              <bool>false</bool>
+             </property>
+            </widget>
+           </item>
+           <item row="4" column="0">
+            <widget class="QLabel" name="TextLabel4_2">
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="Fixed" vsizetype="Minimum">
+               <horstretch>0</horstretch>
+               <verstretch>0</verstretch>
+              </sizepolicy>
+             </property>
+             <property name="minimumSize">
+              <size>
+               <width>90</width>
+               <height>0</height>
+              </size>
+             </property>
+             <property name="text">
+              <string>Notes</string>
+             </property>
+             <property name="alignment">
+              <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+             </property>
+             <property name="wordWrap">
+              <bool>false</bool>
+             </property>
+            </widget>
+           </item>
+           <item row="1" column="1">
+            <widget class="KLineEdit" name="postcodeEdit"/>
+           </item>
+           <item row="2" column="1">
+            <widget class="KLineEdit" name="telephoneEdit"/>
+           </item>
+           <item row="3" column="1">
+            <widget class="KLineEdit" name="emailEdit"/>
+           </item>
+           <item row="0" column="1">
+            <widget class="KTextEdit" name="addressEdit">
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+               <horstretch>0</horstretch>
+               <verstretch>1</verstretch>
+              </sizepolicy>
+             </property>
+            </widget>
+           </item>
+           <item row="4" column="1">
+            <widget class="KTextEdit" name="notesEdit">
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+               <horstretch>0</horstretch>
+               <verstretch>1</verstretch>
+              </sizepolicy>
+             </property>
+            </widget>
+           </item>
+           <item row="0" column="0">
+            <widget class="QLabel" name="TextLabel4">
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="Fixed" vsizetype="Minimum">
+               <horstretch>0</horstretch>
+               <verstretch>0</verstretch>
+              </sizepolicy>
+             </property>
+             <property name="minimumSize">
+              <size>
+               <width>90</width>
+               <height>0</height>
+              </size>
+             </property>
+             <property name="text">
+              <string comment="Street address">Address:</string>
+             </property>
+             <property name="alignment">
+              <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+             </property>
+             <property name="wordWrap">
+              <bool>false</bool>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </widget>
+        </item>
+        <item>
+         <spacer name="spacer6">
+          <property name="orientation">
+           <enum>Qt::Vertical</enum>
+          </property>
+          <property name="sizeType">
+           <enum>QSizePolicy::Expanding</enum>
+          </property>
+          <property name="sizeHint" stdset="0">
+           <size>
+            <width>21</width>
+            <height>20</height>
+           </size>
+          </property>
+         </spacer>
+        </item>
+       </layout>
+      </widget>
+      <widget class="QWidget" name="TabPage">
+       <attribute name="title">
+        <string>Matching</string>
+       </attribute>
+       <layout class="QVBoxLayout" name="verticalLayout_2">
+        <item>
+         <widget class="QGroupBox" name="m_matchTypeGroupBox">
+          <property name="title">
+           <string>Transaction Matching</string>
+          </property>
+          <layout class="QVBoxLayout" name="verticalLayout_6">
+           <item>
+            <layout class="QHBoxLayout" name="horizontalLayout" stretch="0,1,1">
              <item>
-              <widget class="QRadioButton" name="radioNoMatch">
+              <widget class="QLabel" name="label">
                <property name="text">
-                <string>No matching</string>
-               </property>
-               <property name="checked">
-                <bool>true</bool>
+                <string>Match method</string>
                </property>
-               <attribute name="buttonGroup">
-                <string notr="true">m_matchType</string>
-               </attribute>
               </widget>
              </item>
              <item>
-              <widget class="QRadioButton" name="radioNameMatch">
-               <property name="text">
-                <string>Match on Payee name</string>
-               </property>
-               <attribute name="buttonGroup">
-                <string notr="true">m_matchType</string>
-               </attribute>
-              </widget>
+              <widget class="QComboBox" name="matchTypeCombo"/>
              </item>
              <item>
-              <widget class="QRadioButton" name="radioKeyMatch">
+              <widget class="QCheckBox" name="checkMatchIgnoreCase">
                <property name="text">
-                <string>Match on a name listed below</string>
+                <string>Ignore Case</string>
                </property>
-               <attribute name="buttonGroup">
-                <string notr="true">m_matchType</string>
-               </attribute>
               </widget>
              </item>
             </layout>
-           </widget>
-          </item>
-          <item>
-           <widget class="QGroupBox" name="groupBox">
-            <property name="title">
-             <string>List of matching names</string>
-            </property>
-            <layout class="QVBoxLayout" name="verticalLayout_4">
-             <item>
-              <widget class="KEditListWidget" name="matchKeyEditList">
-               <property name="sizePolicy">
-                <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-                 <horstretch>0</horstretch>
-                 <verstretch>1</verstretch>
-                </sizepolicy>
-               </property>
-               <property name="whatsThis">
-                <string>This list contains the names that will match this payee if a transaction is imported from an external source. Keep in mind, that you can specify regular expressions here.</string>
-               </property>
-               <property name="title" stdset="0">
-                <string>List of matching names</string>
-               </property>
-              </widget>
-             </item>
-            </layout>
-           </widget>
-          </item>
-          <item>
-           <widget class="QCheckBox" name="checkMatchIgnoreCase">
+           </item>
+           <item>
+            <widget class="QGroupBox" name="groupBox">
+             <property name="title">
+              <string>List of matching names</string>
+             </property>
+             <layout class="QVBoxLayout" name="verticalLayout_4">
+              <item>
+               <widget class="KEditListWidget" name="matchKeyEditList">
+                <property name="sizePolicy">
+                 <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+                  <horstretch>0</horstretch>
+                  <verstretch>1</verstretch>
+                 </sizepolicy>
+                </property>
+                <property name="whatsThis">
+                 <string>This list contains the names that will match this payee if a transaction is imported from an external source. Keep in mind, that you can specify regular expressions here.</string>
+                </property>
+                <property name="title" stdset="0">
+                 <string>List of matching names</string>
+                </property>
+               </widget>
+              </item>
+             </layout>
+            </widget>
+           </item>
+          </layout>
+         </widget>
+        </item>
+       </layout>
+      </widget>
+      <widget class="QWidget" name="TabPage2">
+       <attribute name="title">
+        <string>Default Account</string>
+       </attribute>
+       <layout class="QVBoxLayout">
+        <item>
+         <widget class="QCheckBox" name="checkEnableDefaultCategory">
+          <property name="text">
+           <string>Use the default category for
+new transactions with this payee</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <layout class="QGridLayout">
+          <item row="0" column="0">
+           <widget class="QLabel" name="labelDefaultCategory">
             <property name="text">
-             <string>Ignore Case</string>
+             <string>Default category:</string>
+            </property>
+            <property name="wordWrap">
+             <bool>false</bool>
             </property>
            </widget>
           </item>
-          <item>
-           <spacer name="spacer7">
-            <property name="orientation">
-             <enum>Qt::Vertical</enum>
-            </property>
-            <property name="sizeType">
-             <enum>QSizePolicy::Expanding</enum>
-            </property>
-            <property name="sizeHint" stdset="0">
-             <size>
-              <width>20</width>
-              <height>20</height>
-             </size>
-            </property>
-           </spacer>
+          <item row="0" column="1">
+           <widget class="KMyMoneyAccountCombo" name="comboDefaultCategory"/>
           </item>
-         </layout>
-        </widget>
-        <widget class="QWidget" name="TabPage2">
-         <attribute name="title">
-          <string>Default Account</string>
-         </attribute>
-         <layout class="QVBoxLayout">
-          <item>
-           <widget class="QCheckBox" name="checkEnableDefaultCategory">
+          <item row="1" column="1">
+           <widget class="QPushButton" name="buttonSuggestACategory">
             <property name="text">
-             <string>Use the default category for
-new transactions with this payee</string>
+             <string>Suggest a category</string>
             </property>
            </widget>
           </item>
-          <item>
-           <layout class="QGridLayout">
-            <item row="0" column="0">
-             <widget class="QLabel" name="labelDefaultCategory">
-              <property name="text">
-               <string>Default category:</string>
-              </property>
-              <property name="wordWrap">
-               <bool>false</bool>
-              </property>
-             </widget>
-            </item>
-            <item row="0" column="1">
-             <widget class="KMyMoneyAccountCombo" name="comboDefaultCategory"/>
-            </item>
-            <item row="1" column="1">
-             <widget class="QPushButton" name="buttonSuggestACategory">
-              <property name="text">
-               <string>Suggest a category</string>
-              </property>
-             </widget>
-            </item>
-           </layout>
-          </item>
-          <item>
-           <spacer name="spacer5">
-            <property name="orientation">
-             <enum>Qt::Vertical</enum>
-            </property>
-            <property name="sizeType">
-             <enum>QSizePolicy::Expanding</enum>
-            </property>
-            <property name="sizeHint" stdset="0">
-             <size>
-              <width>20</width>
-              <height>31</height>
-             </size>
-            </property>
-           </spacer>
-          </item>
          </layout>
-        </widget>
-        <widget class="QWidget" name="tabPayeeIdentifiers">
-         <attribute name="title">
-          <string>Account Numbers</string>
-         </attribute>
-         <layout class="QVBoxLayout" name="verticalLayout_5">
-          <item>
-           <widget class="KPayeeIdentifierView" name="payeeIdentifiers" native="true"/>
-          </item>
-         </layout>
-        </widget>
-       </widget>
+        </item>
+        <item>
+         <spacer name="spacer5">
+          <property name="orientation">
+           <enum>Qt::Vertical</enum>
+          </property>
+          <property name="sizeType">
+           <enum>QSizePolicy::Expanding</enum>
+          </property>
+          <property name="sizeHint" stdset="0">
+           <size>
+            <width>20</width>
+            <height>31</height>
+           </size>
+          </property>
+         </spacer>
+        </item>
+       </layout>
+      </widget>
+      <widget class="QWidget" name="tabPayeeIdentifiers">
+       <attribute name="title">
+        <string>Account Numbers</string>
+       </attribute>
+       <layout class="QVBoxLayout" name="verticalLayout_5">
+        <item>
+         <widget class="KPayeeIdentifierView" name="payeeIdentifiers" native="true"/>
+        </item>
+       </layout>
+      </widget>
+     </widget>
+    </widget>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" name="horizontalLayout_2">
+     <item>
+      <widget class="QPushButton" name="m_helpButton">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="text">
+        <string>Help</string>
+       </property>
       </widget>
      </item>
      <item>
-      <layout class="QHBoxLayout">
-       <item>
-        <widget class="QPushButton" name="m_helpButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Help</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <spacer name="spacer14">
-         <property name="orientation">
-          <enum>Qt::Horizontal</enum>
-         </property>
-         <property name="sizeType">
-          <enum>QSizePolicy::Expanding</enum>
-         </property>
-         <property name="sizeHint" stdset="0">
-          <size>
-           <width>260</width>
-           <height>21</height>
-          </size>
-         </property>
-        </spacer>
-       </item>
-       <item>
-        <widget class="QPushButton" name="m_updateButton">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string/>
-         </property>
-        </widget>
-       </item>
-      </layout>
+      <spacer name="spacer14">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeType">
+        <enum>QSizePolicy::Expanding</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>260</width>
+         <height>21</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QPushButton" name="m_updateButton">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="text">
+        <string/>
+       </property>
+      </widget>
      </item>
     </layout>
    </item>
@@ -603,19 +552,6 @@ new transactions with this payee</string>
  <layoutdefault spacing="6" margin="11"/>
  <customwidgets>
   <customwidget>
-   <class>KMyMoneyRegister::Register</class>
-   <extends>QTableWidget</extends>
-   <header>register.h</header>
-  </customwidget>
-  <customwidget>
-   <class>KMyMoneyAccountCombo</class>
-   <extends>KComboBox</extends>
-   <header>kmymoneyaccountcombo.h</header>
-   <container>1</container>
-  </customwidget>
-  <customwidget>
-  </customwidget>
-  <customwidget>
    <class>KLineEdit</class>
    <extends>QLineEdit</extends>
    <header>klineedit.h</header>
@@ -626,11 +562,27 @@ new transactions with this payee</string>
    <header>keditlistwidget.h</header>
   </customwidget>
   <customwidget>
+   <class>KTextEdit</class>
+   <extends>QTextEdit</extends>
+   <header>ktextedit.h</header>
+  </customwidget>
+  <customwidget>
    <class>KComboBox</class>
    <extends>QComboBox</extends>
    <header>kcombobox.h</header>
   </customwidget>
   <customwidget>
+   <class>KMyMoneyRegister::Register</class>
+   <extends>QTableWidget</extends>
+   <header>register.h</header>
+  </customwidget>
+  <customwidget>
+   <class>KMyMoneyAccountCombo</class>
+   <extends>KComboBox</extends>
+   <header>kmymoneyaccountcombo.h</header>
+   <container>1</container>
+  </customwidget>
+  <customwidget>
    <class>KPayeeIdentifierView</class>
    <extends>QWidget</extends>
    <header>kpayeeidentifierview.h</header>
@@ -642,7 +594,4 @@ new transactions with this payee</string>
  </includes>
  <resources/>
  <connections/>
- <buttongroups>
-  <buttongroup name="m_matchType"/>
- </buttongroups>
 </ui>


More information about the kde-doc-english mailing list