1 #ifndef IMPORTSETTINGS_H
2 #define IMPORTSETTINGS_H
5 #include "DB/ImageInfoList.h"
10 class CategoryMatchSetting
13 CategoryMatchSetting( const QString
& DBCategoryName
, const QString
& XMLFileCategoryName
)
14 : m_XMLCategoryName( XMLFileCategoryName
), m_DBCategoryName(DBCategoryName
) {}
15 void add( const QString
& DBFileNameItem
, const QString
& XMLFileNameItem
);
17 QString
XMLCategoryName() const;
18 QString
DBCategoryName() const;
19 const QMap
<QString
, QString
>& XMLtoDB() const;
22 QString m_XMLCategoryName
;
23 QString m_DBCategoryName
;
24 QMap
<QString
, QString
> m_XMLtoDB
;
28 * The class contains all the data that is transported between the
29 * ImportDialog, and the ImportHandler. The purpose of this class is to
30 * decouple the above two.
35 enum ImportAction
{ Replace
= 1, Keep
= 2, Merge
= 3 };
37 void setSelectedImages( const DB::ImageInfoList
& );
38 DB::ImageInfoList
selectedImages() const;
40 void setDestination( const QString
& );
41 QString
destination() const;
43 void setExternalSource( bool b
);
44 bool externalSource() const;
46 void setKimFile( const KUrl
& kimFile
);
49 void setBaseURL( const KUrl
& url
);
52 void setImportActions( const QMap
<QString
, ImportAction
>& actions
);
53 ImportAction
importAction( const QString
& item
);
55 void addCategoryMatchSetting( const CategoryMatchSetting
& );
56 QList
<CategoryMatchSetting
> categoryMatchSetting() const;
59 DB::ImageInfoList m_selectedImages
;
60 QString m_destination
;
61 bool m_externalSource
;
64 QMap
<QString
, ImportAction
> m_actions
;
65 QList
<CategoryMatchSetting
> m_categoryMatchSettings
;
70 #endif /* IMPORTSETTINGS_H */