diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2017-10-02 12:50:40 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-10-02 08:51:53 -0700 |
commit | 5778dceb5201544df7d89b27995b9ede6db1ae76 (patch) | |
tree | bbda9aa99a8d0d929079d8e0b02282f46a862ea3 /desktop-widgets/plugins | |
parent | ba8e6878a8afcfc007534514f1df632ba00818cd (diff) | |
download | subsurface-5778dceb5201544df7d89b27995b9ede6db1ae76.tar.gz |
[Facebook] Prepare the FacebookInfo struct
This will hold the information for the profile upload.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets/plugins')
-rw-r--r-- | desktop-widgets/plugins/facebook/facebookconnectwidget.cpp | 14 | ||||
-rw-r--r-- | desktop-widgets/plugins/facebook/facebookconnectwidget.h | 12 |
2 files changed, 17 insertions, 9 deletions
diff --git a/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp b/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp index 76ae63689..f8e2d6b62 100644 --- a/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp +++ b/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp @@ -185,9 +185,9 @@ void FacebookManager::sendDive() ProfileWidget2 *profile = MainWindow::instance()->graphics(); - QSize size = dialog.profileSize() == SocialNetworkDialog::SMALL ? QSize(800,600) : - dialog.profileSize() == SocialNetworkDialog::MEDIUM ? QSize(1024,760) : - dialog.profileSize() == SocialNetworkDialog::BIG ? QSize(1280,1024) : QSize(); + QSize size = dialog.profileSize() == FacebookInfo::SMALL ? QSize(800,600) : + dialog.profileSize() == FacebookInfo::MEDIUM ? QSize(1024,760) : + dialog.profileSize() == FacebookInfo::BIG ? QSize(1280,1024) : QSize(); auto currSize = profile->size(); profile->resize(size); @@ -315,12 +315,12 @@ SocialNetworkDialog::SocialNetworkDialog(QWidget *parent) : connect(ui->album, &QLineEdit::editingFinished, this, &SocialNetworkDialog::albumChanged); } -SocialNetworkDialog::Size SocialNetworkDialog::profileSize() const +FacebookInfo::Size SocialNetworkDialog::profileSize() const { QString currText = ui->profileSize->currentText(); - return currText.startsWith(tr("Small")) ? SMALL : - currText.startsWith(tr("Medium")) ? MEDIUM : - /* currText.startsWith(tr("Big")) ? */ BIG; + return currText.startsWith(tr("Small")) ? FacebookInfo::SMALL : + currText.startsWith(tr("Medium")) ? FacebookInfo::MEDIUM : + /* currText.startsWith(tr("Big")) ? */ FacebookInfo::BIG; } diff --git a/desktop-widgets/plugins/facebook/facebookconnectwidget.h b/desktop-widgets/plugins/facebook/facebookconnectwidget.h index 70bc58e33..793cf4bee 100644 --- a/desktop-widgets/plugins/facebook/facebookconnectwidget.h +++ b/desktop-widgets/plugins/facebook/facebookconnectwidget.h @@ -17,6 +17,15 @@ namespace Ui { class SocialnetworksDialog; } +struct FacebookInfo { + enum Size {SMALL, MEDIUM, BIG}; + + QString bodyText; + QString albumId; + Size profileSize; + QPixmap profileData; +}; + class FacebookManager : public QObject { Q_OBJECT @@ -66,12 +75,11 @@ private: class SocialNetworkDialog : public QDialog { Q_OBJECT public: - enum Size {SMALL, MEDIUM, BIG}; SocialNetworkDialog(QWidget *parent = 0); QString text() const; QString album() const; - Size profileSize() const; + FacebookInfo::Size profileSize() const; public slots: void selectionChanged(); |