KNewStuff
knewstuff3/uploaddialog.cpp
Go to the documentation of this file.
97 q->connect(atticaHelper, SIGNAL(providersLoaded(QStringList)), q, SLOT(_k_providersLoaded(QStringList)));
98 q->connect(atticaHelper, SIGNAL(loginChecked(bool)), q, SLOT(_k_checkCredentialsFinished(bool)));
99 q->connect(atticaHelper, SIGNAL(licensesLoaded(Attica::License::List)), q, SLOT(_k_licensesLoaded(Attica::License::List)));
100 q->connect(atticaHelper, SIGNAL(categoriesLoaded(Attica::Category::List)), q, SLOT(_k_categoriesLoaded(Attica::Category::List)));
101 q->connect(atticaHelper, SIGNAL(contentByCurrentUserLoaded(Attica::Content::List)), q, SLOT(_k_contentByCurrentUserLoaded(Attica::Content::List)));
102 q->connect(atticaHelper, SIGNAL(contentLoaded(Attica::Content)), q, SLOT(_k_updatedContentFetched(Attica::Content)));
105 q->connect(atticaHelper, SIGNAL(previewLoaded(int,QImage)), q, SLOT(_k_previewLoaded(int,QImage)));
112 q->connect(ui.providerComboBox, SIGNAL(currentIndexChanged(QString)), q, SLOT(_k_providerChanged(QString)));
115 q->connect(ui.registerNewAccountLabel, SIGNAL(linkActivated(QString)), q, SLOT(_k_openRegisterAccountWebpage(QString)));
195 if (ui.providerComboBox->count() > 0 && !ui.username->text().isEmpty() && !ui.password->text().isEmpty()) {
260 ui.registerNewAccountLabel->setText("<a href=\"register\">" + i18n("Register a new account") + "</a>");
327 void UploadDialog::Private::_k_contentByCurrentUserLoaded(const Attica::Content::List& contentList)
369 ui.contentWebsiteLink->setText(QLatin1String("<a href=\"") + content.detailpage().toString() + QLatin1String("\">")
370 + i18nc("A link to the website where the get hot new stuff upload can be seen", "Visit website") + QLatin1String("</a>"));
419 setButtons(KDialog::Cancel | KDialog::User1 | KDialog::User2 | KDialog::User3 /*| KDialog::Help*/);
445 d->ui.mTitleWidget->setPixmap(KIcon(KGlobal::activeComponent().aboutData()->programIconName()));
463 KMessageBox::error(this, i18n("File not found: %1", d->uploadFile.url()), i18n("Upload Failed"));
474 d->ui.mCategoryCombo->setCurrentIndex(d->ui.mCategoryCombo->findText(category, Qt::MatchFixedString));
589 KMessageBox::error(q, i18n("The selected category \"%1\" is invalid.", categoryName), i18n("Upload Failed"));
600 // for the license, if one of the licenses coming from the server was used, pass its id, otherwise the string
625 q->connect(job, SIGNAL(finished(Attica::BaseJob*)), q, SLOT(_k_contentAdded(Attica::BaseJob*)));
629 Attica::ItemPostJob<Attica::Content>* job = currentProvider().editContent(category, ui.userContentList->currentItem()->data(Qt::UserRole).toString(), content);
630 q->connect(job, SIGNAL(finished(Attica::BaseJob*)), q, SLOT(_k_contentAdded(Attica::BaseJob*)));
676 Attica::ItemPostJob<Attica::Content> * job = static_cast<Attica::ItemPostJob<Attica::Content> *>(baseJob);
732 q->connect(job, SIGNAL(finished(Attica::BaseJob*)), q, SLOT(_k_fileUploadFinished(Attica::BaseJob*)));
735 q->connect(job, SIGNAL(finished(Attica::BaseJob*)), q, SLOT(_k_preview1UploadFinished(Attica::BaseJob*)));
738 q->connect(job, SIGNAL(finished(Attica::BaseJob*)), q, SLOT(_k_preview2UploadFinished(Attica::BaseJob*)));
741 q->connect(job, SIGNAL(finished(Attica::BaseJob*)), q, SLOT(_k_preview3UploadFinished(Attica::BaseJob*)));
791 ui.contentWebsiteLink->setText(QLatin1String("<a href=\"") + url.toString() + QLatin1String("\">")
792 + i18nc("A link to the website where the get hot new stuff upload can be seen", "Visit website") + QLatin1String("</a>"));
void _k_updateContentsToggled(bool update)
Definition: knewstuff3/uploaddialog.cpp:389
QString i18n(const char *text)
Definition: uploaddialog_p.h:40
KPixmapSequenceWidget * busyWidget
Definition: uploaddialog_p.h:70
void addProviderFile(const QUrl &file)
Definition: atticahelper.cpp:42
KAction * firstPage(const QObject *recvr, const char *slot, QObject *parent)
KGuiItem back(BidiMode useBidi=IgnoreRTL)
void setPreviewImageFile(uint number, const KUrl &file)
Set one of the threee preview images displayed in the upload dialog.
Definition: knewstuff3/uploaddialog.cpp:509
void setDescription(const QString &description)
Set the suggested description displayed in the upload dialog.
Definition: knewstuff3/uploaddialog.cpp:482
QString i18np(const char *sing, const char *plur, const A1 &a1)
void _k_openRegisterAccountWebpage(QString)
Definition: knewstuff3/uploaddialog.cpp:710
static QString locate(const char *type, const QString &filename, const KComponentData &cData=KGlobal::mainComponent())
const T & at(int i) const
void setBusy(const QString &message)
Definition: knewstuff3/uploaddialog.cpp:128
void setPrice(double price)
Set the suggested price displayed in the upload dialog.
Definition: knewstuff3/uploaddialog.cpp:493
virtual void setVisible(bool visible)
void _k_currencyLoaded(const QString ¤cy)
Definition: knewstuff3/uploaddialog.cpp:322
static QDebug kError(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
bool hasGroup(const QString &group) const
KConfigGroup group(const QByteArray &group)
QPixmap fromImage(const QImage &image, QFlags< Qt::ImageConversionFlag > flags)
QString toLocalFile(AdjustPathOption trailing=LeaveTrailingSlash) const
void setUploadFile(const KUrl &payloadFile)
Set the file to be uploaded.
Definition: knewstuff3/uploaddialog.cpp:454
const QPixmap * icon() const
void _k_contentAdded(Attica::BaseJob *)
Definition: knewstuff3/uploaddialog.cpp:660
void setUploadName(const QString &name)
Set the suggested title for the upload.
Definition: knewstuff3/uploaddialog.cpp:467
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
QString toString(QFlags< QUrl::FormattingOption > options) const
void update()
QString i18nc(const char *ctxt, const char *text)
int size() const
void _k_categoriesLoaded(const Attica::Category::List &loadedCategories)
Definition: knewstuff3/uploaddialog.cpp:536
void clear()
void finished(int result)
bool init(const QString &configfile)
Definition: knewstuff3/uploaddialog.cpp:45
const char * name() const
Definition: atticahelper.h:39
QString number(int n, int base)
void _k_startUpload()
Definition: knewstuff3/uploaddialog.cpp:562
void _k_preview1UploadFinished(Attica::BaseJob *)
Definition: knewstuff3/uploaddialog.cpp:754
void _k_priceToggled(bool)
Definition: knewstuff3/uploaddialog.cpp:531
AccessMode accessMode() const
UploadDialog(QWidget *parent=0)
Create a new upload dialog.
Definition: knewstuff3/uploaddialog.cpp:394
bool isEmpty() const
bool isEmpty() const
void _k_updatePage()
Definition: knewstuff3/uploaddialog.cpp:187
void _k_previewLoaded(int index, const QImage &image)
Definition: knewstuff3/uploaddialog.cpp:374
KComponentData activeComponent()
void setPriceEnabled(bool enabled)
Enable the UI to let the user to set a price for the uploaded item.
Definition: knewstuff3/uploaddialog.cpp:487
void _k_providerChanged(const QString &providerName)
Definition: knewstuff3/uploaddialog.cpp:255
QString componentName() const
void setSequence(const KPixmapSequence &seq)
void setVersion(const QString &version)
Set the suggested version displayed in the upload dialog.
Definition: knewstuff3/uploaddialog.cpp:504
void setSizePolicy(QSizePolicy)
virtual void accept()
void _k_changePreview3()
Definition: knewstuff3/uploaddialog.cpp:652
void doUpload(const QString &index, const KUrl &filePath)
Definition: knewstuff3/uploaddialog.cpp:714
KGuiItem forward(BidiMode useBidi=IgnoreRTL)
QByteArray & append(char ch)
void _k_licensesLoaded(const Attica::License::List &licenses)
Definition: knewstuff3/uploaddialog.cpp:314
void _k_checkCredentialsFinished(bool)
Definition: knewstuff3/uploaddialog.cpp:296
void _k_detailsLinkLoaded(const QUrl &url)
Definition: knewstuff3/uploaddialog.cpp:789
virtual void setData(int role, const QVariant &value)
void setPriceReason(const QString &reason)
Set the suggested rationale why this item costs something to download.
Definition: knewstuff3/uploaddialog.cpp:499
void _k_backPage()
Definition: knewstuff3/uploaddialog.cpp:276
void setIdle(const QString &message)
Definition: knewstuff3/uploaddialog.cpp:134
static bool runUrl(const KUrl &url, const QString &mimetype, QWidget *window, bool tempFile=false, bool runExecutables=true, const QString &suggestedFileName=QString(), const QByteArray &asn=QByteArray())
void _k_contentByCurrentUserLoaded(const Attica::Content::List &contentList)
Definition: knewstuff3/uploaddialog.cpp:327
QWidget(QWidget *parent, QFlags< Qt::WindowType > f)
void setCaption(const QString &c)
void _k_providersLoaded(const QStringList &providerNames)
Definition: knewstuff3/uploaddialog.cpp:233
static QDebug kWarning(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
void selectCategory(const QString &category)
Set the suggested category for the upload.
Definition: knewstuff3/uploaddialog.cpp:472
void _k_showPage(int page)
Definition: knewstuff3/uploaddialog.cpp:140
void uploadFileFinished()
Definition: knewstuff3/uploaddialog.cpp:775
QString url(AdjustPathOption trailing=LeaveTrailingSlash) const
void _k_changePreview2()
Definition: knewstuff3/uploaddialog.cpp:644
void _k_updatedContentFetched(const Attica::Content &content)
Definition: knewstuff3/uploaddialog.cpp:345
void _k_preview2UploadFinished(Attica::BaseJob *)
Definition: knewstuff3/uploaddialog.cpp:761
void _k_changePreview1()
Definition: knewstuff3/uploaddialog.cpp:635
void _k_fileUploadFinished(Attica::BaseJob *)
Definition: knewstuff3/uploaddialog.cpp:747
void _k_preview3UploadFinished(Attica::BaseJob *)
Definition: knewstuff3/uploaddialog.cpp:768
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QObject * parent() const
T readEntry(const QString &key, const T &aDefault) const
static void error(QWidget *parent, const QString &text, const QString &caption=QString(), Options options=Notify)
void setChangelog(const QString &changelog)
Set the suggested changelog displayed in the upload dialog.
Definition: knewstuff3/uploaddialog.cpp:477
void _k_nextPage()
Definition: knewstuff3/uploaddialog.cpp:281
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:25:43 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:25:43 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.