File indexing completed on 2025-04-27 03:58:36

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2009-07-07
0007  * Description : country selector combo-box.
0008  *
0009  * SPDX-FileCopyrightText: 2009-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0010  *
0011  * SPDX-License-Identifier: GPL-2.0-or-later
0012  *
0013  * ============================================================ */
0014 
0015 #ifndef DIGIKAM_COUNTRY_SELECTOR_H
0016 #define DIGIKAM_COUNTRY_SELECTOR_H
0017 
0018 // Qt includes
0019 
0020 #include <QString>
0021 #include <QWidget>
0022 #include <QComboBox>
0023 
0024 // Local includes
0025 
0026 #include "digikam_export.h"
0027 
0028 namespace Digikam
0029 {
0030 
0031 class DIGIKAM_EXPORT CountrySelector : public QComboBox
0032 {
0033     Q_OBJECT
0034 
0035 public:
0036 
0037     explicit CountrySelector(QWidget* const parent);
0038     ~CountrySelector() override;
0039 
0040     void setCountry(const QString& countryCode);
0041     bool country(QString& countryCode, QString& countryName) const;
0042 
0043 public:
0044 
0045     static QString countryForCode(const QString& countryCode);
0046 
0047 private:
0048 
0049     class Private;
0050     Private* const d;
0051 };
0052 
0053 } // namespace Digikam
0054 
0055 #endif // DIGIKAM_COUNTRY_SELECTOR_H