File indexing completed on 2023-09-24 08:19:52
0001 /* ============================================================ 0002 * 0003 * This file is a part of KDE project 0004 * 0005 * 0006 * Date : 2005-07-07 0007 * Description : a kipi plugin to export images to Flickr web service 0008 * 0009 * Copyright (C) 2005-2008 by Vardhman Jain <vardhman at gmail dot com> 0010 * Copyright (C) 2008-2018 by Gilles Caulier <caulier dot gilles at gmail dot com> 0011 * 0012 * This program is free software; you can redistribute it 0013 * and/or modify it under the terms of the GNU General 0014 * Public License as published by the Free Software Foundation; 0015 * either version 2, or (at your option) any later version. 0016 * 0017 * This program is distributed in the hope that it will be useful, 0018 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0020 * GNU General Public License for more details. 0021 * 0022 * ============================================================ */ 0023 0024 #ifndef FLICKRWIDGET_H 0025 #define FLICKRWIDGET_H 0026 0027 // Qt includes 0028 0029 #include <QWidget> 0030 #include <QTabWidget> 0031 #include <QLineEdit> 0032 #include <QComboBox> 0033 0034 // Local includes 0035 0036 #include "comboboxintermediate.h" 0037 #include "flickrlist.h" 0038 #include "kpsettingswidget.h" 0039 0040 class QGroupBox; 0041 class QPushButton; 0042 class QSpinBox; 0043 class QCheckBox; 0044 class QLabel; 0045 class QTreeWidgetItem; 0046 0047 namespace KIPIPlugins 0048 { 0049 class KPProgressWidget; 0050 } 0051 0052 using namespace KIPIPlugins; 0053 0054 namespace KIPIFlickrPlugin 0055 { 0056 0057 class FlickrList; 0058 0059 class FlickrWidget : public KPSettingsWidget 0060 { 0061 Q_OBJECT 0062 0063 public: 0064 0065 FlickrWidget(QWidget* const parent, KIPI::Interface* const iface, const QString& serviceName); 0066 ~FlickrWidget(); 0067 0068 void updateLabels(const QString& name = QString(), const QString& url = QString()) override; 0069 0070 private Q_SLOTS: 0071 0072 void slotPermissionChanged(FlickrList::FieldType, Qt::CheckState); 0073 void slotSafetyLevelChanged(FlickrList::SafetyLevel); 0074 void slotContentTypeChanged(FlickrList::ContentType); 0075 void slotMainPublicToggled(int); 0076 void slotMainFamilyToggled(int); 0077 void slotMainFriendsToggled(int); 0078 void slotMainSafetyLevelChanged(int); 0079 void slotMainContentTypeChanged(int); 0080 void slotExtendedPublicationToggled(bool); 0081 void slotExtendedTagsToggled(bool); 0082 void slotAddExtraTagsToggled(bool); 0083 0084 private: // Functions 0085 0086 void mainPermissionToggled(FlickrList::FieldType, Qt::CheckState); 0087 0088 private: // Data 0089 0090 QString m_serviceName; 0091 QPushButton* m_removeAccount; 0092 QPushButton* m_extendedTagsButton; 0093 QPushButton* m_extendedPublicationButton; 0094 0095 QCheckBox* m_exportHostTagsCheckBox; 0096 QCheckBox* m_stripSpaceTagsCheckBox; 0097 QCheckBox* m_addExtraTagsCheckBox; 0098 QCheckBox* m_familyCheckBox; 0099 QCheckBox* m_friendsCheckBox; 0100 QCheckBox* m_publicCheckBox; 0101 0102 QGroupBox* m_extendedTagsBox; 0103 QGroupBox* m_extendedPublicationBox; 0104 0105 QLineEdit* m_tagsLineEdit; 0106 0107 ComboBoxIntermediate* m_contentTypeComboBox; 0108 ComboBoxIntermediate* m_safetyLevelComboBox; 0109 0110 KIPIFlickrPlugin::FlickrList* m_imglst; 0111 0112 friend class FlickrWindow; 0113 }; 0114 0115 } // namespace KIPIFlickrPlugin 0116 0117 #endif // FLICKRWIDGET_H