[4770] | 1 | /* ============================================================ |
---|
| 2 | * |
---|
| 3 | * This file is a part of kipi-plugins project |
---|
| 4 | * http://www.kipi-plugins.org |
---|
| 5 | * |
---|
| 6 | * Date : 2010-01-07 |
---|
| 7 | * Description : a plugin to export to a remote Piwigo server. |
---|
| 8 | * |
---|
| 9 | * Copyright (C) 2003-2005 by Renchi Raju <renchi dot raju at gmail dot com> |
---|
| 10 | * Copyright (C) 2006 by Colin Guthrie <kde@colin.guthr.ie> |
---|
| 11 | * Copyright (C) 2006-2009 by Gilles Caulier <caulier dot gilles at gmail dot com> |
---|
| 12 | * Copyright (C) 2008 by Andrea Diamantini <adjam7 at gmail dot com> |
---|
| 13 | * Copyright (C) 2010 by Frederic Coiffier <frederic dot coiffier at free dot com> |
---|
| 14 | * |
---|
| 15 | * This program is free software; you can redistribute it |
---|
| 16 | * and/or modify it under the terms of the GNU General |
---|
| 17 | * Public License as published by the Free Software Foundation; |
---|
| 18 | * either version 2, or (at your option) any later version. |
---|
| 19 | * |
---|
| 20 | * This program is distributed in the hope that it will be useful, |
---|
| 21 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 22 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 23 | * GNU General Public License for more details. |
---|
| 24 | * |
---|
| 25 | * ============================================================ */ |
---|
| 26 | |
---|
| 27 | #ifndef PIWIGOWINDOW_H |
---|
| 28 | #define PIWIGOWINDOW_H |
---|
| 29 | |
---|
| 30 | // KDE includes |
---|
| 31 | |
---|
| 32 | #include <KDialog> |
---|
| 33 | |
---|
| 34 | // Qt includes |
---|
| 35 | |
---|
| 36 | #include <QList> |
---|
| 37 | #include <QProgressDialog> |
---|
| 38 | |
---|
| 39 | // Debug |
---|
| 40 | #include <QTextStream> |
---|
| 41 | #include <QFile> |
---|
| 42 | |
---|
| 43 | namespace KIPI |
---|
| 44 | { |
---|
| 45 | class Interface; |
---|
| 46 | } |
---|
| 47 | |
---|
| 48 | namespace KIPIPlugins |
---|
| 49 | { |
---|
| 50 | class KPAboutData; |
---|
| 51 | } |
---|
| 52 | |
---|
| 53 | namespace KIPIPiwigoExportPlugin |
---|
| 54 | { |
---|
| 55 | class Piwigo; |
---|
| 56 | class PiwigoTalker; |
---|
| 57 | class GAlbum; |
---|
| 58 | class GPhoto; |
---|
| 59 | |
---|
| 60 | class PiwigoWindow : public KDialog |
---|
| 61 | { |
---|
| 62 | Q_OBJECT |
---|
| 63 | |
---|
| 64 | public: |
---|
| 65 | |
---|
| 66 | PiwigoWindow(KIPI::Interface *interface, QWidget *parent, Piwigo* pPiwigo); |
---|
| 67 | ~PiwigoWindow(); |
---|
| 68 | |
---|
| 69 | private: |
---|
| 70 | |
---|
| 71 | void connectSignals(); |
---|
| 72 | void readSettings(); |
---|
| 73 | QString cleanName(const QString&); |
---|
| 74 | |
---|
| 75 | private Q_SLOTS: |
---|
| 76 | |
---|
| 77 | void slotDoLogin(); |
---|
| 78 | void slotLoginFailed(const QString& msg); |
---|
| 79 | void slotBusy(bool val); |
---|
| 80 | void slotError(const QString& msg); |
---|
| 81 | void slotAlbums(const QList<GAlbum>& albumList); |
---|
| 82 | void slotAlbumSelected(); |
---|
| 83 | void slotAddPhoto(); |
---|
| 84 | void slotAddPhotoNext(); |
---|
| 85 | void slotAddPhotoSucceeded(); |
---|
| 86 | void slotAddPhotoFailed(const QString& msg); |
---|
| 87 | void slotAddPhotoCancel(); |
---|
| 88 | void slotHelp(); |
---|
| 89 | void slotEnableSpinBox(int n); |
---|
| 90 | void slotSettings(); |
---|
| 91 | void slotProcessUrl(const QString&); |
---|
| 92 | |
---|
| 93 | private: |
---|
| 94 | |
---|
| 95 | KIPI::Interface* m_interface; |
---|
| 96 | KIPIPlugins::KPAboutData* m_about; |
---|
| 97 | PiwigoTalker* m_talker; |
---|
| 98 | Piwigo* mpPiwigo; |
---|
| 99 | |
---|
| 100 | QProgressDialog* m_progressDlg; |
---|
| 101 | unsigned int m_uploadCount; |
---|
| 102 | unsigned int m_uploadTotal; |
---|
| 103 | QStringList* mpUploadList; |
---|
| 104 | QString firstAlbumName; |
---|
| 105 | |
---|
| 106 | class Private; |
---|
| 107 | Private* const d; |
---|
| 108 | }; |
---|
| 109 | |
---|
| 110 | } // namespace KIPIPiwigoExportPlugin |
---|
| 111 | |
---|
| 112 | #endif /* PIWIGOWINDOW_H */ |
---|