diff options
Diffstat (limited to 'Swift/QtUI/QtVCardWidget/QtVCardTelephoneField.cpp')
| -rw-r--r-- | Swift/QtUI/QtVCardWidget/QtVCardTelephoneField.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Swift/QtUI/QtVCardWidget/QtVCardTelephoneField.cpp b/Swift/QtUI/QtVCardWidget/QtVCardTelephoneField.cpp index 063319e..401d0a0 100644 --- a/Swift/QtUI/QtVCardWidget/QtVCardTelephoneField.cpp +++ b/Swift/QtUI/QtVCardWidget/QtVCardTelephoneField.cpp @@ -1,51 +1,51 @@ /* - * Copyright (c) 2012 Tobias Markmann + * Copyright (c) 2012-2014 Tobias Markmann * Licensed under the simplified BSD license. * See Documentation/Licenses/BSD-simplified.txt for more information. */ #include "QtVCardTelephoneField.h" #include <QGridLayout> #include <Swift/QtUI/QtSwiftUtil.h> namespace Swift { QtVCardTelephoneField::QtVCardTelephoneField(QWidget* parent, QGridLayout *layout, bool editable) : - QtVCardGeneralField(parent, layout, editable, layout->rowCount(), tr("Telephone")) { + QtVCardGeneralField(parent, layout, editable, layout->rowCount(), tr("Telephone")), telephoneLineEdit(NULL) { connect(this, SIGNAL(editableChanged(bool)), SLOT(handleEditibleChanged(bool))); } QtVCardTelephoneField::~QtVCardTelephoneField() { disconnect(this, SLOT(handleEditibleChanged(bool))); } void QtVCardTelephoneField::setupContentWidgets() { telephoneLineEdit = new QtResizableLineEdit(this); #if QT_VERSION >= 0x040700 telephoneLineEdit->setPlaceholderText(tr("0118 999 881 999 119 7253")); #endif getGridLayout()->addWidget(telephoneLineEdit, getGridLayout()->rowCount()-1, 2, 1, 2, Qt::AlignVCenter); setTabOrder(telephoneLineEdit, getTagComboBox()); QtVCardHomeWork::setTagComboBox(getTagComboBox()); getTagComboBox()->addTag("voice", QObject::tr("Voice")); getTagComboBox()->addTag("fax", QObject::tr("Fax")); getTagComboBox()->addTag("pager", QObject::tr("Pager")); getTagComboBox()->addTag("msg", QObject::tr("Voice Messaging")); getTagComboBox()->addTag("cell", QObject::tr("Cell")); getTagComboBox()->addTag("video", QObject::tr("Video")); getTagComboBox()->addTag("bbs", QObject::tr("Bulletin Board System")); getTagComboBox()->addTag("modem", QObject::tr("Modem")); getTagComboBox()->addTag("isdn", QObject::tr("ISDN")); getTagComboBox()->addTag("pcs", QObject::tr("Personal Communication Services")); childWidgets << telephoneLineEdit; } bool QtVCardTelephoneField::isEmpty() const { return telephoneLineEdit->text().isEmpty(); } void QtVCardTelephoneField::setTelephone(const VCard::Telephone& telephone) { |
Swift