File indexing completed on 2025-01-05 03:53:25
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2008-12-26 0007 * Description : a tool to export items to Facebook web service 0008 * 0009 * SPDX-FileCopyrightText: 2008-2009 by Luka Renko <lure at kubuntu dot org> 0010 * SPDX-FileCopyrightText: 2008-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0011 * SPDX-FileCopyrightText: 2018 by Thanh Trung Dinh <dinhthanhtrung1996 at gmail dot com> 0012 * 0013 * SPDX-License-Identifier: GPL-2.0-or-later 0014 * 0015 * ============================================================ */ 0016 0017 #include "fbnewalbumdlg.h" 0018 0019 // Qt includes 0020 0021 #include <QFormLayout> 0022 #include <QComboBox> 0023 #include <QApplication> 0024 #include <QStyle> 0025 #include <QDialogButtonBox> 0026 #include <QPushButton> 0027 0028 // KDE includes 0029 0030 #include <klocalizedstring.h> 0031 0032 // Local includes 0033 0034 #include "fbitem.h" 0035 0036 namespace DigikamGenericFaceBookPlugin 0037 { 0038 0039 FbNewAlbumDlg::FbNewAlbumDlg(QWidget* const parent, const QString& toolName) 0040 : WSNewAlbumDialog(parent, toolName) 0041 { 0042 hideDateTime(); 0043 0044 m_privacyCoB = new QComboBox; 0045 m_privacyCoB->setEditable(false); 0046 m_privacyCoB->setWhatsThis(i18n("Privacy setting of the album that will be created (required).")); 0047 m_privacyCoB->addItem(QIcon::fromTheme(QLatin1String("secure-card")), 0048 i18n("Only Me"), FB_ME); 0049 m_privacyCoB->addItem(QIcon::fromTheme(QLatin1String("user-identity")), 0050 i18n("Only Friends"), FB_FRIENDS); 0051 m_privacyCoB->addItem(QIcon::fromTheme(QLatin1String("system-users")), 0052 i18n("Friends of Friends"), FB_FRIENDS_OF_FRIENDS); 0053 /* 0054 m_privacyCoB->addItem(QIcon::fromTheme(QLatin1String("network-workgroup")), 0055 i18n("My Networks and Friends"), FB_NETWORKS); 0056 */ 0057 m_privacyCoB->addItem(QIcon::fromTheme(QLatin1String("folder-html")), 0058 i18n("Everyone"), FB_EVERYONE); 0059 m_privacyCoB->setCurrentIndex(1); 0060 0061 addToMainLayout(m_privacyCoB); 0062 } 0063 0064 FbNewAlbumDlg::~FbNewAlbumDlg() 0065 { 0066 } 0067 0068 void FbNewAlbumDlg::getAlbumProperties(FbAlbum& album) 0069 { 0070 WSAlbum baseAlbum; 0071 getBaseAlbumProperties(baseAlbum); 0072 0073 album.setBaseAlbum(baseAlbum); 0074 album.privacy = static_cast<DigikamGenericFaceBookPlugin::FbPrivacy>(m_privacyCoB->itemData(m_privacyCoB->currentIndex()).toInt()); 0075 } 0076 0077 } // namespace DigikamGenericFaceBookPlugin 0078 0079 #include "moc_fbnewalbumdlg.cpp"