MCPcopy Create free account
hub / github.com/RetroShare/RetroShare / AddFeedDialog

Method AddFeedDialog

plugins/FeedReader/gui/AddFeedDialog.cpp:39–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37#define TOKEN_TYPE_POSTED_GROUPS 2
38
39AddFeedDialog::AddFeedDialog(RsFeedReader *feedReader, FeedReaderNotify *notify, QWidget *parent)
40 : QDialog(parent, Qt::Window), mFeedReader(feedReader), mNotify(notify), ui(new Ui::AddFeedDialog)
41{
42 ui->setupUi(this);
43
44 /* Setup UI helper */
45 mStateHelper = new UIStateHelper(this);
46
47 mFeedId = 0;
48 mParentId = 0;
49
50 mStateHelper->addWidget(TOKEN_TYPE_FORUM_GROUPS, ui->forumComboBox, UISTATE_LOADING_DISABLED);
51 mStateHelper->addWidget(TOKEN_TYPE_FORUM_GROUPS, ui->buttonBox->button(QDialogButtonBox::Ok), UISTATE_LOADING_DISABLED);
52 mStateHelper->addWidget(TOKEN_TYPE_POSTED_GROUPS, ui->postedComboBox, UISTATE_LOADING_DISABLED);
53 mStateHelper->addWidget(TOKEN_TYPE_POSTED_GROUPS, ui->buttonBox->button(QDialogButtonBox::Ok), UISTATE_LOADING_DISABLED);
54
55 /* Setup TokenQueue */
56 mForumTokenQueue = new TokenQueue(rsGxsForums->getTokenService(), this);
57 mPostedTokenQueue = new TokenQueue(rsPosted->getTokenService(), this);
58
59 /* Connect signals */
60 connect(ui->buttonBox->button(QDialogButtonBox::Ok), SIGNAL(clicked()), this, SLOT(createFeed()));
61 connect(ui->buttonBox->button(QDialogButtonBox::Cancel), SIGNAL(clicked()), this, SLOT(reject()));
62
63 connect(ui->useAuthenticationCheckBox, SIGNAL(toggled(bool)), this, SLOT(authenticationToggled()));
64 connect(ui->useStandardStorageTimeCheckBox, SIGNAL(toggled(bool)), this, SLOT(useStandardStorageTimeToggled()));
65 connect(ui->useStandardUpdateInterval, SIGNAL(toggled(bool)), this, SLOT(useStandardUpdateIntervalToggled()));
66 connect(ui->useStandardProxyCheckBox, SIGNAL(toggled(bool)), this, SLOT(useStandardProxyToggled()));
67 connect(ui->typeForumCheckBox, SIGNAL(toggled(bool)), this, SLOT(typeForumToggled()));
68 connect(ui->typePostedCheckBox, SIGNAL(toggled(bool)), this, SLOT(typePostedToggled()));
69 connect(ui->typeLocalCheckBox, SIGNAL(toggled(bool)), this, SLOT(typeLocalToggled()));
70 connect(ui->postedFirstImageCheckBox, SIGNAL(toggled(bool)), this, SLOT(postedFirstImageToggled()));
71 connect(ui->previewButton, SIGNAL(clicked()), this, SLOT(preview()));
72
73 /* currently only for local feeds */
74 connect(ui->saveCompletePageCheckBox, SIGNAL(toggled(bool)), this, SLOT(denyForumAndPostedToggled()));
75
76 connect(ui->urlLineEdit, SIGNAL(textChanged(QString)), this, SLOT(validate()));
77 connect(ui->nameLineEdit, SIGNAL(textChanged(QString)), this, SLOT(validate()));
78 connect(ui->useInfoFromFeedCheckBox, SIGNAL(toggled(bool)), this, SLOT(validate()));
79 connect(ui->typeLocalCheckBox, SIGNAL(toggled(bool)), this, SLOT(validate()));
80 connect(ui->typeForumCheckBox, SIGNAL(toggled(bool)), this, SLOT(validate()));
81 connect(ui->forumComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(validate()));
82 connect(ui->typePostedCheckBox, SIGNAL(toggled(bool)), this, SLOT(validate()));
83 connect(ui->postedComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(validate()));
84
85 connect(ui->clearCachePushButton, SIGNAL(clicked()), this, SLOT(clearMessageCache()));
86
87 ui->headerFrame->setHeaderText(tr("Feed Details"));
88 ui->headerFrame->setHeaderImage(QPixmap(":/images/FeedReader.png"));
89
90 ui->activatedCheckBox->setChecked(true);
91 mStateHelper->setWidgetEnabled(ui->forumComboBox, false);
92 mStateHelper->setWidgetEnabled(ui->postedComboBox, false);
93 ui->useInfoFromFeedCheckBox->setChecked(true);
94 ui->updateForumInfoCheckBox->setEnabled(false);
95 ui->updateForumInfoCheckBox->setChecked(true);
96 ui->updatePostedInfoCheckBox->setEnabled(false);

Callers

nothing calls this directly

Calls 8

getTokenServiceMethod · 0.80
setHeaderImageMethod · 0.80
setWidgetEnabledMethod · 0.80
QPixmapClass · 0.50
addWidgetMethod · 0.45
setHeaderTextMethod · 0.45
setTextMethod · 0.45
showMethod · 0.45

Tested by

no test coverage detected