File indexing completed on 2024-11-24 04:43:05
0001 /* 0002 SPDX-FileCopyrightText: 2015-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #include "mergecontacterrorlabel.h" 0008 #include <KLocalizedString> 0009 0010 using namespace KABMergeContacts; 0011 MergeContactErrorLabel::MergeContactErrorLabel(ErrorType type, QWidget *parent) 0012 : QLabel(parent) 0013 { 0014 QFont font; 0015 font.setBold(true); 0016 switch (type) { 0017 case NotEnoughContactsSelected: 0018 setText(i18n("You must select at least two elements.")); 0019 break; 0020 case NoContactDuplicatesFound: 0021 setText(i18n("No duplicated contact found.")); 0022 break; 0023 case NoContactSelected: 0024 setText(i18n("No contacts selected.")); 0025 break; 0026 } 0027 0028 setAlignment(Qt::AlignHCenter | Qt::AlignVCenter); 0029 setFont(font); 0030 } 0031 0032 MergeContactErrorLabel::~MergeContactErrorLabel() = default; 0033 0034 #include "moc_mergecontacterrorlabel.cpp"