PublishDialog::PublishDialog(QWidget *parent) : MoodBoxDialog(parent), publishRequestId(0), publishRecipientId(-1), loginsLoaded(false) { TimeMeasure t("PublishDialog"); setupUi(this); t.showTimePassedAfterSetupUi(); UiTools::moveWindowToScreenCenter(this); typeCombo->addItem(tr(PUBLISHING_TYPE_LIVEJOURNAL_TEXT)); #ifdef RUSSIAN_VERSION typeCombo->addItem(tr(PUBLISHING_TYPE_LIVEINTERNET_TEXT)); typeCombo->addItem(tr(PUBLISHING_TYPE_DAIRY_TEXT)); #endif restorePublishParameters(); // Control signals connect(closeToolButton, SIGNAL(clicked()), this, SLOT(reject())); connect(cancelButton, SIGNAL(clicked()), this, SLOT(reject())); connect(cancelPublishingButton, SIGNAL(clicked()), this, SLOT(reject())); connect(closeButton, SIGNAL(clicked()), this, SLOT(accept())); connect(moodstripNameEdit, SIGNAL(textChanged(const QString &)), this, SLOT(publishEnabled())); connect(typeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(loadPublishingParameters(int))); // Publishing signals connect(MESSAGEMANAGER, SIGNAL(publishing(qint32, qint32)), this, SLOT(onPublishProgress(qint32, qint32))); connect(MESSAGEMANAGER, SIGNAL(publishCompleted(qint32, qint32, const QList<PublishingWay> &)), this, SLOT(onPublishCompleted(qint32, qint32, const QList<PublishingWay> &))); connect(MESSAGEMANAGER, SIGNAL(publishError(qint32)), this, SLOT(onPublishError(qint32))); // Update values on_blogCheckBox_stateChanged(blogCheckBox->checkState()); openOptionsPage(); }
void AppSetupLink::publish(const AppSetupItem * asi) { emit publishing(asi); }