vCard #29

Manually merged
blue merged 20 commits from vCard into master 2019-11-08 07:47:38 +00:00
2 changed files with 137 additions and 85 deletions
Showing only changes of commit c067835b00 - Show all commits

View File

@ -69,6 +69,10 @@ VCard::VCard(const QString& jid, bool edit, QWidget* parent):
m_ui->description->setReadOnly(true); m_ui->description->setReadOnly(true);
m_ui->url->setReadOnly(true); m_ui->url->setReadOnly(true);
m_ui->title->setText(tr("Contact %1 card").arg(jid)); m_ui->title->setText(tr("Contact %1 card").arg(jid));
m_ui->addAddressButton->hide();
m_ui->addPhoneButton->hide();
m_ui->addEmailButton->hide();
} }
connect(m_ui->buttonBox, &QDialogButtonBox::accepted, this, &VCard::onButtonBoxAccepted); connect(m_ui->buttonBox, &QDialogButtonBox::accepted, this, &VCard::onButtonBoxAccepted);

View File

@ -9,8 +9,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>594</width> <width>526</width>
<height>651</height> <height>662</height>
</rect> </rect>
</property> </property>
<layout class="QGridLayout" name="gridLayout_4"> <layout class="QGridLayout" name="gridLayout_4">
@ -560,22 +560,31 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>575</width> <width>514</width>
<height>475</height> <height>488</height>
</rect> </rect>
</property> </property>
<layout class="QGridLayout" name="gridLayout_3" columnstretch="1,4,1"> <layout class="QGridLayout" name="gridLayout_3" columnstretch="1,2,2,1">
<item row="10" column="1"> <item row="2" column="2">
<widget class="Line" name="addressesLine"> <widget class="QPushButton" name="addEmailButton">
<property name="orientation"> <property name="sizePolicy">
<enum>Qt::Horizontal</enum> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset theme="list-add"/>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="1"> <item row="6" column="1" colspan="2">
<layout class="QVBoxLayout" name="emailsLayout"> <layout class="QVBoxLayout" name="phonesLayout">
<item> <item>
<widget class="QLabel" name="emptyEmailsPlaceholder"> <widget class="QLabel" name="emptyPhonesPlaceholder">
<property name="text"> <property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-style:italic;&quot;&gt;User has no contact e-mail addresses&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-style:italic;&quot;&gt;User has no contact e-mail addresses&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
@ -586,17 +595,34 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="2" column="1"> <item row="11" column="1" colspan="2">
<widget class="QLabel" name="emailsHeading"> <spacer name="contactBottomSpacer">
<property name="text"> <property name="orientation">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:16pt; font-weight:600;&quot;&gt;E-Mail addresses&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <enum>Qt::Vertical</enum>
</property> </property>
<property name="alignment"> <property name="sizeHint" stdset="0">
<set>Qt::AlignCenter</set> <size>
<width>20</width>
<height>40</height>
</size>
</property> </property>
</widget> </spacer>
</item> </item>
<item row="0" column="1"> <item row="9" column="1" colspan="2">
<layout class="QVBoxLayout" name="addressesLayout">
<item>
<widget class="QLabel" name="emptyAddressesPlaceholder">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-style:italic;&quot;&gt;User has no contact e-mail addresses&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="1" colspan="2">
<layout class="QFormLayout" name="contactForm"> <layout class="QFormLayout" name="contactForm">
<property name="formAlignment"> <property name="formAlignment">
<set>Qt::AlignHCenter|Qt::AlignTop</set> <set>Qt::AlignHCenter|Qt::AlignTop</set>
@ -655,39 +681,109 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="7" column="1"> <item row="8" column="1">
<widget class="Line" name="phonesLine"> <widget class="QLabel" name="addressesHeading">
<property name="orientation"> <property name="text">
<enum>Qt::Horizontal</enum> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:16pt; font-weight:600;&quot;&gt;Addresses&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item row="1" column="1" colspan="2">
<widget class="Line" name="contactFormLine"> <widget class="Line" name="contactFormLine">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="1"> <item row="8" column="2">
<widget class="QPushButton" name="addAddressButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset theme="list-add"/>
</property>
</widget>
</item>
<item row="10" column="1" colspan="2">
<widget class="Line" name="addressesLine">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="5" column="2">
<widget class="QPushButton" name="addPhoneButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset theme="list-add"/>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="emailsHeading">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:16pt; font-weight:600;&quot;&gt;E-Mail addresses&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLabel" name="phenesHeading">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:16pt; font-weight:600;&quot;&gt;Phone numbers&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="4" column="1" colspan="2">
<widget class="Line" name="emailsLine"> <widget class="Line" name="emailsLine">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item row="11" column="1"> <item row="3" column="1" colspan="2">
<spacer name="contactBottomSpacer"> <layout class="QVBoxLayout" name="emailsLayout">
<item>
<widget class="QLabel" name="emptyEmailsPlaceholder">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-style:italic;&quot;&gt;User has no contact e-mail addresses&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</item>
<item row="7" column="1" colspan="2">
<widget class="Line" name="phonesLine">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeHint" stdset="0"> </widget>
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item> </item>
<item row="0" column="0" rowspan="12"> <item row="0" column="0" rowspan="12">
<spacer name="contactLeftSpacer"> <spacer name="contactLeftSpacer">
@ -702,55 +798,7 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="6" column="1"> <item row="0" column="3" rowspan="12">
<layout class="QVBoxLayout" name="phonesLayout">
<item>
<widget class="QLabel" name="emptyPhonesPlaceholder">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-style:italic;&quot;&gt;User has no contact e-mail addresses&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</item>
<item row="8" column="1">
<widget class="QLabel" name="addressesHeading">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:16pt; font-weight:600;&quot;&gt;Addresses&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="9" column="1">
<layout class="QVBoxLayout" name="addressesLayout">
<item>
<widget class="QLabel" name="emptyAddressesPlaceholder">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-style:italic;&quot;&gt;User has no contact e-mail addresses&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</item>
<item row="5" column="1">
<widget class="QLabel" name="phenesHeading">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:16pt; font-weight:600;&quot;&gt;Phone numbers&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="2" rowspan="12">
<spacer name="contactRightSpacer"> <spacer name="contactRightSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>