File indexing completed on 2024-05-05 04:22:02
0001 /* SPDX-FileCopyrightText: 2003-2010 Jesper K. Pedersen <blackie@kde.org> 0002 0003 SPDX-License-Identifier: GPL-2.0-or-later 0004 */ 0005 0006 #ifndef IMPORTMATCHER_H 0007 #define IMPORTMATCHER_H 0008 0009 #include <QScrollArea> 0010 0011 class QGridLayout; 0012 class QComboBox; 0013 class QCheckBox; 0014 0015 namespace ImportExport 0016 { 0017 class CategoryMatchSetting; 0018 0019 /** 0020 * This class encaptualte a single row in an ImportMatcher. 0021 */ 0022 class CategoryMatch 0023 { 0024 public: 0025 CategoryMatch(bool allowNew, const QString &categort, QStringList items, QWidget *parent, QGridLayout *grid, int row); 0026 QCheckBox *m_checkbox; 0027 QComboBox *m_combobox; 0028 QString m_text; 0029 }; 0030 0031 /** 0032 * This class is the configuration page for chooseing the matching between 0033 * the .kim file and the DB's items (e.g. .kim says People, DB say 0034 * Persons). 0035 */ 0036 class ImportMatcher : public QScrollArea 0037 { 0038 Q_OBJECT 0039 0040 public: 0041 ImportMatcher(const QString &otherCategory, const QString &myCategory, 0042 const QStringList &otherItems, const QStringList &myItems, 0043 bool allowNew, QWidget *parent); 0044 CategoryMatchSetting settings(); 0045 0046 QString m_otherCategory; 0047 QString m_myCategory; 0048 QList<CategoryMatch *> m_matchers; 0049 }; 0050 0051 typedef QList<ImportMatcher *> ImportMatchers; 0052 } 0053 0054 #endif /* IMPORTMATCHER_H */ 0055 0056 // vi:expandtab:tabstop=4 shiftwidth=4: