File indexing completed on 2025-01-19 03:51:20

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2006-10-18
0007  * Description : a checkbox with a boolean valid parameter.
0008  *               The boolean statement is used to check if
0009  *               a metadata value from a picture have a know
0010  *               value registered by EXIF/IPTC spec.
0011  *
0012  * SPDX-FileCopyrightText: 2006-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0013  *
0014  * SPDX-License-Identifier: GPL-2.0-or-later
0015  *
0016  * ============================================================ */
0017 
0018 #include "metadatacheckbox.h"
0019 
0020 namespace DigikamGenericMetadataEditPlugin
0021 {
0022 
0023 MetadataCheckBox::MetadataCheckBox(const QString& text, QWidget* const parent)
0024     : QCheckBox(text, parent),
0025       m_valid  (true)
0026 {
0027     connect(this, SIGNAL(toggled(bool)),
0028             this, SLOT(slotValid()));
0029 }
0030 
0031 MetadataCheckBox::~MetadataCheckBox()
0032 {
0033 }
0034 
0035 void MetadataCheckBox::setValid(bool v)
0036 {
0037     m_valid = v;
0038 }
0039 
0040 bool MetadataCheckBox::isValid() const
0041 {
0042     return m_valid;
0043 }
0044 
0045 void MetadataCheckBox::slotValid()
0046 {
0047     setValid(true);
0048 }
0049 
0050 } // namespace DigikamGenericMetadataEditPlugin
0051 
0052 #include "moc_metadatacheckbox.cpp"