Kraxy/EBN: missing Q_OBJECT
[kphotoalbum.git] / ImportExport / ImportDialog.h
blobc3187db2379ebdaab6ab871b03ca0cc623114bd0
1 /* Copyright (C) 2003-2006 Jesper K. Pedersen <blackie@kde.org>
3 This program is free software; you can redistribute it and/or
4 modify it under the terms of the GNU General Public
5 License as published by the Free Software Foundation; either
6 version 2 of the License, or (at your option) any later version.
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 General Public License for more details.
13 You should have received a copy of the GNU General Public License
14 along with this program; see the file COPYING. If not, write to
15 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 Boston, MA 02110-1301, USA.
19 #ifndef IMPORT_H
20 #define IMPORT_H
22 #include "ImportSettings.h"
23 #include <kurl.h>
24 #include <KAssistantDialog>
25 #include "ImportMatcher.h"
27 class KTemporaryFile;
28 class KLineEdit;
30 namespace DB
32 class ImageInfo;
35 namespace ImportExport
37 class ImportMatcher;
38 class ImageRow;
39 class KimFileReader;
40 class MD5CheckPage;
42 /**
43 * This is the wizard that configures the import process
45 class ImportDialog :public KAssistantDialog {
46 Q_OBJECT
48 public:
49 ImportDialog( QWidget* parent );
50 bool exec( KimFileReader* kimFileReader, const QString& fileName, const KUrl& kimFilePath );
51 ImportSettings settings();
53 protected:
54 friend class ImageRow;
56 void setupPages();
57 bool readFile( const QByteArray& data, const QString& fileName );
58 void createIntroduction();
59 void createImagesPage();
60 void createDestination();
61 void createCategoryPages();
62 ImportMatcher* createCategoryPage( const QString& myCategory, const QString& otherCategory );
63 void selectImage( bool on );
64 DB::ImageInfoList selectedImages() const;
65 void possiblyAddMD5CheckPage();
67 protected slots:
68 void slotEditDestination();
69 void updateNextButtonState();
70 virtual void next();
71 void slotSelectAll();
72 void slotSelectNone();
73 void slotHelp();
75 signals:
76 void failedToCopy( QStringList files );
78 private:
79 DB::ImageInfoList _images;
80 KLineEdit* _destinationEdit;
81 KPageWidgetItem* _destinationPage;
82 KPageWidgetItem* _categoryMatcherPage;
83 KPageWidgetItem* _dummy;
84 ImportMatcher* _categoryMatcher;
85 ImportMatchers _matchers;
86 QList< ImageRow* > _imagesSelect;
87 KTemporaryFile* _tmp;
88 bool _externalSource;
89 KUrl _kimFile;
90 bool _hasFilled;
91 QString _baseUrl;
92 KimFileReader* _kimFileReader;
93 MD5CheckPage* _md5CheckPage;
99 #endif /* IMPORT_H */