Warning, file /graphics/kipi-plugins/facebook/fbalbum.cpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* ============================================================ 0002 * 0003 * This file is a part of KDE project 0004 * 0005 * 0006 * Date : 2008-12-26 0007 * Description : a kipi plugin to export images to Facebook web service 0008 * 0009 * Copyright (C) 2008-2009 by Luka Renko <lure at kubuntu dot org> 0010 * 0011 * This program is free software; you can redistribute it 0012 * and/or modify it under the terms of the GNU General 0013 * Public License as published by the Free Software Foundation; 0014 * either version 2, or (at your option) any later version. 0015 * 0016 * This program is distributed in the hope that it will be useful, 0017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0019 * GNU General Public License for more details. 0020 * 0021 * ============================================================ */ 0022 0023 #include "fbalbum.h" 0024 0025 // Qt includes 0026 0027 #include <QFormLayout> 0028 #include <QComboBox> 0029 #include <QApplication> 0030 #include <QStyle> 0031 #include <QDialogButtonBox> 0032 #include <QPushButton> 0033 0034 // KDE includes 0035 0036 #include <klocalizedstring.h> 0037 0038 // local includes 0039 0040 #include "fbitem.h" 0041 0042 namespace KIPIFacebookPlugin 0043 { 0044 0045 FbNewAlbum::FbNewAlbum(QWidget* const parent, const QString& pluginName) 0046 : KPNewAlbumDialog(parent, pluginName) 0047 { 0048 hideDateTime(); 0049 0050 m_privacyCoB = new QComboBox; 0051 m_privacyCoB->setEditable(false); 0052 m_privacyCoB->setWhatsThis(i18n("Privacy setting of the album that will be created (required).")); 0053 m_privacyCoB->addItem(QIcon::fromTheme(QString::fromLatin1("secure-card")), 0054 i18n("Only Me"), FB_ME); 0055 m_privacyCoB->addItem(QIcon::fromTheme(QString::fromLatin1("user-identity")), 0056 i18n("Only Friends"), FB_FRIENDS); 0057 m_privacyCoB->addItem(QIcon::fromTheme(QString::fromLatin1("system-users")), 0058 i18n("Friends of Friends"), FB_FRIENDS_OF_FRIENDS); 0059 m_privacyCoB->addItem(QIcon::fromTheme(QString::fromLatin1("network-workgroup")), 0060 i18n("My Networks and Friends"), FB_NETWORKS); 0061 m_privacyCoB->addItem(QIcon::fromTheme(QString::fromLatin1("folder-html")), 0062 i18n("Everyone"), FB_EVERYONE); 0063 m_privacyCoB->setCurrentIndex(1); 0064 0065 addToMainLayout(m_privacyCoB); 0066 } 0067 0068 FbNewAlbum::~FbNewAlbum() 0069 { 0070 } 0071 0072 void FbNewAlbum::getAlbumProperties(FbAlbum& album) 0073 { 0074 album.title = getTitleEdit()->text(); 0075 album.location = getLocEdit()->text(); 0076 album.description = getDescEdit()->toPlainText(); 0077 album.privacy = static_cast<KIPIFacebookPlugin::FbPrivacy>(m_privacyCoB->itemData(m_privacyCoB->currentIndex()).toInt()); 0078 } 0079 0080 } // namespace KIPIFacebookPlugin 0081 0082 #include "moc_fbalbum.cpp"