mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
[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>
This commit is contained in:
parent
ba8e6878a8
commit
5778dceb52
2 changed files with 17 additions and 9 deletions
|
@ -185,9 +185,9 @@ void FacebookManager::sendDive()
|
||||||
|
|
||||||
ProfileWidget2 *profile = MainWindow::instance()->graphics();
|
ProfileWidget2 *profile = MainWindow::instance()->graphics();
|
||||||
|
|
||||||
QSize size = dialog.profileSize() == SocialNetworkDialog::SMALL ? QSize(800,600) :
|
QSize size = dialog.profileSize() == FacebookInfo::SMALL ? QSize(800,600) :
|
||||||
dialog.profileSize() == SocialNetworkDialog::MEDIUM ? QSize(1024,760) :
|
dialog.profileSize() == FacebookInfo::MEDIUM ? QSize(1024,760) :
|
||||||
dialog.profileSize() == SocialNetworkDialog::BIG ? QSize(1280,1024) : QSize();
|
dialog.profileSize() == FacebookInfo::BIG ? QSize(1280,1024) : QSize();
|
||||||
|
|
||||||
auto currSize = profile->size();
|
auto currSize = profile->size();
|
||||||
profile->resize(size);
|
profile->resize(size);
|
||||||
|
@ -315,12 +315,12 @@ SocialNetworkDialog::SocialNetworkDialog(QWidget *parent) :
|
||||||
connect(ui->album, &QLineEdit::editingFinished, this, &SocialNetworkDialog::albumChanged);
|
connect(ui->album, &QLineEdit::editingFinished, this, &SocialNetworkDialog::albumChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
SocialNetworkDialog::Size SocialNetworkDialog::profileSize() const
|
FacebookInfo::Size SocialNetworkDialog::profileSize() const
|
||||||
{
|
{
|
||||||
QString currText = ui->profileSize->currentText();
|
QString currText = ui->profileSize->currentText();
|
||||||
return currText.startsWith(tr("Small")) ? SMALL :
|
return currText.startsWith(tr("Small")) ? FacebookInfo::SMALL :
|
||||||
currText.startsWith(tr("Medium")) ? MEDIUM :
|
currText.startsWith(tr("Medium")) ? FacebookInfo::MEDIUM :
|
||||||
/* currText.startsWith(tr("Big")) ? */ BIG;
|
/* currText.startsWith(tr("Big")) ? */ FacebookInfo::BIG;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,15 @@ namespace Ui {
|
||||||
class SocialnetworksDialog;
|
class SocialnetworksDialog;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct FacebookInfo {
|
||||||
|
enum Size {SMALL, MEDIUM, BIG};
|
||||||
|
|
||||||
|
QString bodyText;
|
||||||
|
QString albumId;
|
||||||
|
Size profileSize;
|
||||||
|
QPixmap profileData;
|
||||||
|
};
|
||||||
|
|
||||||
class FacebookManager : public QObject
|
class FacebookManager : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
@ -66,12 +75,11 @@ private:
|
||||||
class SocialNetworkDialog : public QDialog {
|
class SocialNetworkDialog : public QDialog {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
enum Size {SMALL, MEDIUM, BIG};
|
|
||||||
|
|
||||||
SocialNetworkDialog(QWidget *parent = 0);
|
SocialNetworkDialog(QWidget *parent = 0);
|
||||||
QString text() const;
|
QString text() const;
|
||||||
QString album() const;
|
QString album() const;
|
||||||
Size profileSize() const;
|
FacebookInfo::Size profileSize() const;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void selectionChanged();
|
void selectionChanged();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue