Commit b052293e authored by Laurent Montel's avatar Laurent Montel 😁

Convert to QLineEdit

parent ff6c22c2
......@@ -63,7 +63,7 @@ class ContactsWithEmailFilterModel : public QSortFilterProxyModel
};
ContactLineEdit::ContactLineEdit( bool isReference, QWidget *parent )
: KLineEdit( parent ), mIsReference( isReference )
: QLineEdit( parent ), mIsReference( isReference )
{
setFrame( false );
......@@ -154,7 +154,7 @@ QWidget* ContactGroupEditorDelegate::createEditor( QWidget *parent, const QStyle
comboBox->setAutoFillBackground( true );
return comboBox;
} else {
KLineEdit *lineEdit = new KLineEdit( parent );
QLineEdit *lineEdit = new QLineEdit( parent );
lineEdit->setFrame( false );
return lineEdit;
}
......@@ -165,7 +165,7 @@ void ContactGroupEditorDelegate::setEditorData( QWidget *editor, const QModelInd
{
if ( index.data( ContactGroupModel::IsReferenceRole ).toBool() ) {
if ( index.column() == 0 ) {
KLineEdit *lineEdit = qobject_cast<KLineEdit*>( editor );
QLineEdit *lineEdit = qobject_cast<QLineEdit*>( editor );
if ( !lineEdit ) {
return;
}
......@@ -183,7 +183,7 @@ void ContactGroupEditorDelegate::setEditorData( QWidget *editor, const QModelInd
comboBox->setCurrentIndex( comboBox->findText( index.data( Qt::EditRole ).toString() ) );
}
} else {
KLineEdit *lineEdit = qobject_cast<KLineEdit*>( editor );
QLineEdit *lineEdit = qobject_cast<QLineEdit*>( editor );
if ( !lineEdit ) {
return;
}
......@@ -234,7 +234,7 @@ void ContactGroupEditorDelegate::setModelData( QWidget *editor, QAbstractItemMod
}
if ( index.column() == 1 ) {
KLineEdit *lineEdit = qobject_cast<KLineEdit*>( editor );
QLineEdit *lineEdit = qobject_cast<QLineEdit*>( editor );
if ( !lineEdit ) {
return;
}
......
......@@ -22,7 +22,7 @@
#ifndef AKONADI_CONTACTGROUPEDITORDELEGATE_P_H
#define AKONADI_CONTACTGROUPEDITORDELEGATE_P_H
#include <KLineEdit>
#include <QLineEdit>
#include <QStyledItemDelegate>
......@@ -31,7 +31,7 @@
namespace Akonadi
{
class ContactLineEdit : public KLineEdit
class ContactLineEdit : public QLineEdit
{
Q_OBJECT
......
......@@ -34,11 +34,11 @@
#include <QMenu>
ContactGroupLineEdit::ContactGroupLineEdit( QWidget *parent )
: KLineEdit( parent ),
: QLineEdit( parent ),
mCompleter( 0 ),
mContainsReference( false )
{
setClearButtonShown( true );
setClearButtonEnabled( true );
}
void ContactGroupLineEdit::setCompletionModel( QAbstractItemModel *model )
......
......@@ -33,7 +33,7 @@ class QModelIndex;
class KJob;
class ContactGroupLineEdit : public KLineEdit
class ContactGroupLineEdit : public QLineEdit
{
Q_OBJECT
......
......@@ -435,25 +435,25 @@ AddressEditDialog::AddressEditDialog(QWidget *parent)
label = new QLabel(i18nc("<postOfficeBoxLabel>:", "%1:", KABC::Address::postOfficeBoxLabel()), page);
topLayout->addWidget(label, 2 , 0);
mPOBoxEdit = new KLineEdit(page);
mPOBoxEdit = new QLineEdit(page);
label->setBuddy(mPOBoxEdit);
topLayout->addWidget(mPOBoxEdit, 2, 1);
label = new QLabel(i18nc("<localityLabel>:", "%1:", KABC::Address::localityLabel()), page);
topLayout->addWidget(label, 3, 0);
mLocalityEdit = new KLineEdit(page);
mLocalityEdit = new QLineEdit(page);
label->setBuddy(mLocalityEdit);
topLayout->addWidget(mLocalityEdit, 3, 1);
label = new QLabel(i18nc("<regionLabel>:", "%1:", KABC::Address::regionLabel()), page);
topLayout->addWidget(label, 4, 0);
mRegionEdit = new KLineEdit(page);
mRegionEdit = new QLineEdit(page);
label->setBuddy(mRegionEdit);
topLayout->addWidget(mRegionEdit, 4, 1);
label = new QLabel(i18nc("<postalCodeLabel>:", "%1:", KABC::Address::postalCodeLabel()), page);
topLayout->addWidget(label, 5, 0);
mPostalCodeEdit = new KLineEdit(page);
mPostalCodeEdit = new QLineEdit(page);
label->setBuddy(mPostalCodeEdit);
topLayout->addWidget(mPostalCodeEdit, 5, 1);
......
......@@ -32,7 +32,7 @@
class QCheckBox;
class QLabel;
class KLineEdit;
class QLineEdit;
class KTextEdit;
/**
......@@ -197,10 +197,10 @@ private:
AddressTypeCombo *mTypeCombo;
KTextEdit *mStreetTextEdit;
KComboBox *mCountryCombo;
KLineEdit *mRegionEdit;
KLineEdit *mLocalityEdit;
KLineEdit *mPostalCodeEdit;
KLineEdit *mPOBoxEdit;
QLineEdit *mRegionEdit;
QLineEdit *mLocalityEdit;
QLineEdit *mPostalCodeEdit;
QLineEdit *mPOBoxEdit;
QCheckBox *mPreferredCheckBox;
KABC::Address mAddress;
......
......@@ -81,13 +81,13 @@ class ContactEditorWidget::Private
NameEditWidget *mNameWidget;
ImageWidget *mPhotoWidget;
DisplayNameEditWidget *mDisplayNameWidget;
KLineEdit *mNickNameWidget;
QLineEdit *mNickNameWidget;
SoundEditWidget *mPronunciationWidget;
// widgets from Internet group
EmailEditWidget *mEmailWidget;
KLineEdit *mHomepageWidget;
KLineEdit *mBlogWidget;
QLineEdit *mHomepageWidget;
QLineEdit *mBlogWidget;
IMEditWidget *mIMWidget;
// widgets from phones group
......@@ -106,13 +106,13 @@ class ContactEditorWidget::Private
// widgets from general group
ImageWidget *mLogoWidget;
KLineEdit *mOrganizationWidget;
KLineEdit *mProfessionWidget;
KLineEdit *mTitleWidget;
KLineEdit *mDepartmentWidget;
KLineEdit *mOfficeWidget;
KLineEdit *mManagerWidget;
KLineEdit *mAssistantWidget;
QLineEdit *mOrganizationWidget;
QLineEdit *mProfessionWidget;
QLineEdit *mTitleWidget;
QLineEdit *mDepartmentWidget;
QLineEdit *mOfficeWidget;
QLineEdit *mManagerWidget;
QLineEdit *mAssistantWidget;
// widgets from groupware group
FreeBusyEditWidget *mFreeBusyWidget;
......@@ -125,7 +125,7 @@ class ContactEditorWidget::Private
DateEditWidget *mAnniversaryWidget;
// widgets from family group
KLineEdit *mPartnerWidget;
QLineEdit *mPartnerWidget;
// widgets from custom fields group
CustomFieldsEditWidget *mCustomFieldsWidget;
......@@ -199,7 +199,7 @@ void ContactEditorWidget::Private::initGuiContactTab()
label->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
nameLayout->addWidget( label, 2, 0 );
mNickNameWidget = new KLineEdit;
mNickNameWidget = new QLineEdit;
label->setBuddy( mNickNameWidget );
nameLayout->addWidget( mNickNameWidget, 2, 1 );
......@@ -226,7 +226,7 @@ void ContactEditorWidget::Private::initGuiContactTab()
label->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
internetLayout->addWidget( label, 1, 0 );
mHomepageWidget = new KLineEdit;
mHomepageWidget = new QLineEdit;
label->setBuddy( mHomepageWidget );
internetLayout->addWidget( mHomepageWidget, 1, 1 );
......@@ -234,7 +234,7 @@ void ContactEditorWidget::Private::initGuiContactTab()
label->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
internetLayout->addWidget( label, 2, 0 );
mBlogWidget = new KLineEdit;
mBlogWidget = new QLineEdit;
label->setBuddy( mBlogWidget );
internetLayout->addWidget( mBlogWidget, 2, 1 );
......@@ -346,7 +346,7 @@ void ContactEditorWidget::Private::initGuiBusinessTab()
label->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
generalLayout->addWidget( label, 0, 0 );
mOrganizationWidget = new KLineEdit;
mOrganizationWidget = new QLineEdit;
label->setBuddy( mOrganizationWidget );
generalLayout->addWidget( mOrganizationWidget, 0, 1 );
......@@ -354,7 +354,7 @@ void ContactEditorWidget::Private::initGuiBusinessTab()
label->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
generalLayout->addWidget( label, 1, 0 );
mProfessionWidget = new KLineEdit;
mProfessionWidget = new QLineEdit;
label->setBuddy( mProfessionWidget );
generalLayout->addWidget( mProfessionWidget, 1, 1 );
......@@ -362,7 +362,7 @@ void ContactEditorWidget::Private::initGuiBusinessTab()
label->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
generalLayout->addWidget( label, 2, 0 );
mTitleWidget = new KLineEdit;
mTitleWidget = new QLineEdit;
label->setBuddy( mTitleWidget );
generalLayout->addWidget( mTitleWidget , 2, 1 );
......@@ -370,7 +370,7 @@ void ContactEditorWidget::Private::initGuiBusinessTab()
label->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
generalLayout->addWidget( label, 3, 0 );
mDepartmentWidget = new KLineEdit;
mDepartmentWidget = new QLineEdit;
label->setBuddy( mDepartmentWidget );
generalLayout->addWidget( mDepartmentWidget, 3, 1 );
......@@ -378,7 +378,7 @@ void ContactEditorWidget::Private::initGuiBusinessTab()
label->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
generalLayout->addWidget( label, 4, 0 );
mOfficeWidget = new KLineEdit;
mOfficeWidget = new QLineEdit;
label->setBuddy( mOfficeWidget );
generalLayout->addWidget( mOfficeWidget, 4, 1 );
......@@ -386,7 +386,7 @@ void ContactEditorWidget::Private::initGuiBusinessTab()
label->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
generalLayout->addWidget( label, 5, 0 );
mManagerWidget = new KLineEdit;
mManagerWidget = new QLineEdit;
label->setBuddy( mManagerWidget );
generalLayout->addWidget( mManagerWidget, 5, 1 );
......@@ -394,7 +394,7 @@ void ContactEditorWidget::Private::initGuiBusinessTab()
label->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
generalLayout->addWidget( label, 6, 0 );
mAssistantWidget = new KLineEdit;
mAssistantWidget = new QLineEdit;
label->setBuddy( mAssistantWidget );
generalLayout->addWidget( mAssistantWidget, 6, 1 );
......@@ -452,7 +452,7 @@ void ContactEditorWidget::Private::initGuiPersonalTab()
label->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
familyLayout->addWidget( label, 0, 0 );
mPartnerWidget = new KLineEdit;
mPartnerWidget = new QLineEdit;
label->setBuddy( mPartnerWidget );
familyLayout->addWidget( mPartnerWidget, 0, 1 );
......
......@@ -40,8 +40,8 @@ CustomFieldEditorDialog::CustomFieldEditorDialog(QWidget *parent)
QFormLayout *layout = new QFormLayout(widget);
mKey = new KLineEdit;
mTitle = new KLineEdit;
mKey = new QLineEdit;
mTitle = new QLineEdit;
mType = new KComboBox;
mScope = new QCheckBox(i18n("Use field for all contacts"));
......
......@@ -27,7 +27,7 @@
#include "customfieldsmodel.h"
class KComboBox;
class KLineEdit;
class QLineEdit;
class QCheckBox;
class CustomFieldEditorDialog : public KDialog
......@@ -41,10 +41,10 @@ public:
CustomField customField() const;
private:
KLineEdit *mTitle;
QLineEdit *mTitle;
KComboBox *mType;
QCheckBox *mScope;
KLineEdit *mKey;
QLineEdit *mKey;
CustomField mCustomField;
};
......
......@@ -41,7 +41,7 @@
class EmailAddressExtracter : public QObject
{
public:
EmailAddressExtracter(KLineEdit *lineEdit)
EmailAddressExtracter(QLineEdit *lineEdit)
: QObject(lineEdit)
, mLineEdit(lineEdit)
{
......@@ -60,7 +60,7 @@ public:
}
private:
KLineEdit *mLineEdit;
QLineEdit *mLineEdit;
};
class EmailItem : public QListWidgetItem
......@@ -102,7 +102,7 @@ EmailEditWidget::EmailEditWidget(QWidget *parent)
layout->setMargin(0);
layout->setSpacing(KDialog::spacingHint());
mEmailEdit = new KLineEdit;
mEmailEdit = new QLineEdit;
new EmailAddressExtracter(mEmailEdit);
connect(mEmailEdit, SIGNAL(textChanged(QString)),
SLOT(textChanged(QString)));
......
......@@ -29,7 +29,7 @@ namespace KABC
class Addressee;
}
class KLineEdit;
class QLineEdit;
class KListWidget;
class QToolButton;
......@@ -57,7 +57,7 @@ private Q_SLOTS:
void textChanged(const QString &text);
private:
KLineEdit *mEmailEdit;
QLineEdit *mEmailEdit;
QToolButton *mEditButton;
QStringList mEmailList;
};
......
......@@ -55,7 +55,7 @@ IMItemDialog::IMItemDialog(QWidget *parent)
protocol);
}
mNameEdit = new KLineEdit;
mNameEdit = new QLineEdit;
layout->addRow(i18nc("@label:textbox IM address", "Address:"), mNameEdit);
connect(mProtocolCombo, SIGNAL(currentIndexChanged(int)), SLOT(slotUpdateButtons()));
......
......@@ -28,7 +28,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
#include "immodel.h"
class KComboBox;
class KLineEdit;
class QLineEdit;
class IMItemDialog : public KDialog
{
......@@ -46,7 +46,7 @@ private Q_SLOTS:
private:
KComboBox *mProtocolCombo;
KLineEdit *mNameEdit;
QLineEdit *mNameEdit;
};
#endif
......@@ -39,7 +39,7 @@ IMEditWidget::IMEditWidget(QWidget *parent)
QHBoxLayout *layout = new QHBoxLayout(this);
layout->setMargin(0);
mIMEdit = new KLineEdit;
mIMEdit = new QLineEdit;
layout->addWidget(mIMEdit);
mEditButton = new QToolButton;
......
......@@ -28,7 +28,7 @@
#include "im/immodel.h"
class KLineEdit;
class QLineEdit;
class QToolButton;
/**
......@@ -52,7 +52,7 @@ class IMEditWidget : public QWidget
void edit();
private:
KLineEdit *mIMEdit;
QLineEdit *mIMEdit;
QToolButton *mEditButton;
IMAddress::List mIMAddresses;
};
......
......@@ -43,11 +43,11 @@ NameEditDialog::NameEditDialog(QWidget *parent)
mPrefixCombo->setDuplicatesEnabled(false);
mPrefixCombo->setEditable(true);
mGivenNameEdit = new KLineEdit(page);
mGivenNameEdit = new QLineEdit(page);
mAdditionalNameEdit = new KLineEdit(page);
mAdditionalNameEdit = new QLineEdit(page);
mFamilyNameEdit = new KLineEdit(page);
mFamilyNameEdit = new QLineEdit(page);
mSuffixCombo = new KComboBox(page);
mSuffixCombo->setDuplicatesEnabled(false);
......
......@@ -24,7 +24,7 @@
#include <kdialog.h>
class KLineEdit;
class QLineEdit;
class KComboBox;
class NameEditDialog : public KDialog
......@@ -50,9 +50,9 @@ public:
private:
KComboBox *mSuffixCombo;
KComboBox *mPrefixCombo;
KLineEdit *mFamilyNameEdit;
KLineEdit *mGivenNameEdit;
KLineEdit *mAdditionalNameEdit;
QLineEdit *mFamilyNameEdit;
QLineEdit *mGivenNameEdit;
QLineEdit *mAdditionalNameEdit;
};
#endif
......@@ -39,7 +39,7 @@ NameEditWidget::NameEditWidget(QWidget *parent)
layout->setMargin(0);
layout->setSpacing(KDialog::spacingHint());
mNameEdit = new KLineEdit;
mNameEdit = new QLineEdit;
layout->addWidget(mNameEdit);
setFocusProxy(mNameEdit);
setFocusPolicy(Qt::StrongFocus);
......
......@@ -26,7 +26,7 @@
#include <kabc/addressee.h>
class KLineEdit;
class QLineEdit;
class QToolButton;
/**
* @short A widget for editing the name of a contact.
......@@ -69,7 +69,7 @@ private Q_SLOTS:
void openNameEditDialog();
private:
KLineEdit *mNameEdit;
QLineEdit *mNameEdit;
KABC::Addressee mContact;
QToolButton *mButtonEdit;
};
......
......@@ -125,7 +125,7 @@ PhoneNumberWidget::PhoneNumberWidget(QWidget *parent)
layout->setMargin(0);
mTypeCombo = new PhoneTypeCombo(this);
mNumberEdit = new KLineEdit(this);
mNumberEdit = new QLineEdit(this);
QFontMetrics fm(font());
mNumberEdit->setMinimumWidth(fm.width(QStringLiteral("MMMMMMMMMM")));
......
......@@ -28,7 +28,7 @@
#include <kcombobox.h>
#include <kdialog.h>
class KLineEdit;
class QLineEdit;
class QButtonGroup;
class QCheckBox;
......@@ -114,7 +114,7 @@ Q_SIGNALS:
private:
PhoneTypeCombo *mTypeCombo;
KLineEdit *mNumberEdit;
QLineEdit *mNumberEdit;
KABC::PhoneNumber mNumber;
};
......
......@@ -52,13 +52,13 @@ using namespace Akonadi;
/**
* @internal
*/
class SearchLineEdit : public KLineEdit
class SearchLineEdit : public QLineEdit
{
public:
SearchLineEdit( QWidget *receiver, QWidget *parent = 0 )
: KLineEdit( parent ), mReceiver( receiver )
: QLineEdit( parent ), mReceiver( receiver )
{
setClearButtonShown( true );
setClearButtonEnabled( true );
}
protected:
......@@ -68,7 +68,7 @@ class SearchLineEdit : public KLineEdit
QMetaObject::invokeMethod( mReceiver, "setFocus" );
}
KLineEdit::keyPressEvent( event );
QLineEdit::keyPressEvent( event );
}
private:
......@@ -208,7 +208,7 @@ EmailAddressSelection::List EmailAddressSelectionWidget::selectedAddresses() con
return selections;
}
KLineEdit* EmailAddressSelectionWidget::searchLineEdit() const
QLineEdit* EmailAddressSelectionWidget::searchLineEdit() const
{
return d->mSearchLine;
}
......
......@@ -32,7 +32,7 @@
#include <QAbstractItemView>
#include <QWidget>
class KLineEdit;
class QLineEdit;
class QAbstractItemModel;
class QTreeView;
......@@ -96,7 +96,7 @@ class AKONADI_CONTACT_EXPORT EmailAddressSelectionWidget : public QWidget
/**
* Returns the line edit that is used for the search line.
*/
KLineEdit *searchLineEdit() const;
QLineEdit *searchLineEdit() const;
/**
* Returns the tree view that is used to list the items.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment