knode
knarticlefactory.cpp
Go to the documentation of this file.
110 void KNArticleFactory::createReply( KNRemoteArticle::Ptr a, const QString &selectedText, bool post, bool mail )
149 i18n("The author has requested a reply by email instead\nof a followup to the newsgroup. (Followup-To: poster)\nDo you want to reply in public anyway?"), QString(), KGuiItem(i18n("Reply Public")), KGuiItem(i18n("Reply by Email"))) ))
197 KMessageBox::information( knGlobals.topWidget, i18n("The author requested a mail copy of your reply. (Mail-Copies-To header)"),
219 attribution.replace( QRegExp("%DATE"), KGlobal::locale()->formatDateTime(a->date()->dateTime().toLocalZone().dateTime(), KLocale::LongDate) );
256 quoted += KNHelper::rewrapStringList( text, knGlobals.settings()->maxLineLength(), '>', !incSig, false );
270 KNComposer *c=new KNComposer(art, quoted, notRewraped, true, authorDislikesMailCopies, authorWantsMailCopies);
287 i18n("This article contains attachments. Do you want them to be forwarded as well?"), QString(), KGuiItem(i18n("Forward")), KGuiItem(i18n("Do Not Forward")))
359 i18n("Do you really want to cancel this article?"), QString(), KGuiItem(i18n("Cancel Article")), KStandardGuiItem::cancel() ) )
363 switch (KMessageBox::warningYesNoCancel(knGlobals.topWidget, i18n("Do you want to send the cancel\nmessage now or later?"), i18n("Question"),KGuiItem(i18n("&Now")),KGuiItem(i18n("&Later")))) {
440 i18n("Do you really want to supersede this article?"), QString(), KGuiItem(i18n("Supersede")), KStandardGuiItem::cancel() ) )
477 art->subject()->fromUnicodeString(a->subject()->asUnicodeString(), a->subject()->rfc2047Charset());
514 KNLocalArticle::Ptr art = newArticle( knGlobals.groupManager()->currentGroup(), Locale::defaultCharset() );
530 void KNArticleFactory::sendMailExternal(const QString &address, const QString &subject, const QString &body)
606 s_endErrDlg->append( (*it)->subject()->asUnicodeString(), i18n("Article has already been sent.") );
727 KMessageBox::information(knGlobals.topWidget, i18n("You canceled the article posting. The unsent articles are stored in the \"Outbox\" folder."));
771 KNLocalArticle::Ptr KNArticleFactory::newArticle( KNCollection::Ptr col, const QByteArray &defChset, bool withXHeaders, KNArticle::Ptr origPost )
773 if ( knGlobals.settings()->generateMessageID() && knGlobals.settings()->hostname().isEmpty() ) {
774 KMessageBox::sorry(knGlobals.topWidget, i18n("Please set a hostname for the generation\nof the message-id or disable it."));
825 if ( KPIMUtils::isValidAddress( id.property( "Mail-Copies-To" ).toString() ) == KPIMUtils::AddressOk ) {
826 art->mailCopiesTo()->fromUnicodeString( id.property( "Mail-Copies-To" ).toString(), Locale::defaultCharset() );
855 art->contentTransferEncoding()->setEncoding( knGlobals.settings()->allow8BitBody() ? KMime::Headers::CE8Bit : KMime::Headers::CEquPr );
868 value.replace( QRegExp("%EMAIL"), QString::fromLatin1(origPost->from()->addresses().first() ) );
898 KMessageBox::sorry(knGlobals.topWidget, i18n("Cancel messages cannot be canceled or superseded."));
903 KMessageBox::sorry(knGlobals.topWidget, i18n("Only sent articles can be canceled or superseded."));
908 KMessageBox::sorry(knGlobals.topWidget, i18n("This article has already been canceled or superseded."));
936 KMessageBox::sorry(knGlobals.topWidget, i18n("This article does not appear to be from you.\nYou can only cancel or supersede your own articles."));
941 KMessageBox::sorry(knGlobals.topWidget, i18n("You have to download the article body\nbefore you can cancel or supersede the article."));
1029 //======================================================================================================
1041 new QLabel(QString("<b>%1</b><br>%2").arg(i18n("Errors occurred while sending these articles:"))
int indexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
void sendMailExternal(const QString &address=QString(), const QString &subject=QString(), const QString &body=QString())
Send a mail via an external program.
Definition: knarticlefactory.cpp:530
KNComposer * findComposer(KNLocalArticle::Ptr a)
Definition: knarticlefactory.cpp:698
QString & append(QChar ch)
QString toUpper() const
boost::shared_ptr< KNLocalArticle > Ptr
Shared pointer to a KNLocalArticle. To be used instead of raw KNLocalArticle*.
Definition: knarticle.h:216
Definition: knarticle.h:47
void append(const QString &subject, const QString &error)
Definition: knarticlefactory.cpp:1059
static void saveWindowSize(const QString &name, const QSize &s)
Definition: utilities.cpp:205
bool cancelAllowed(KNArticle::Ptr a)
Definition: knarticlefactory.cpp:883
QByteArray toLower() const
KNLocalArticle::Ptr newArticle(KNCollection::Ptr col, const QByteArray &defChset, bool withXHeaders=true, KNArticle::Ptr origPost=KNArticle::Ptr())
Generate a new article to edit before posting.
Definition: knarticlefactory.cpp:771
void emitJob(KNJobData *j)
Send the job to the scheduler and append it to the job queue.
Definition: knjobdata.cpp:42
void createReply(KNRemoteArticle::Ptr a, const QString &selectedText=QString(), bool post=true, bool mail=false)
Definition: knarticlefactory.cpp:110
virtual QByteArray text(quint32 serialNumber) const =0
QStringList split(const QString &sep, SplitBehavior behavior, Qt::CaseSensitivity cs) const
QString & prepend(QChar ch)
Definition: kncomposer.h:48
static void restoreWindowSize(const QString &name, QWidget *d, const QSize &defaultSize)
Definition: utilities.cpp:212
Definition: knjobdata.h:113
Definition: kncomposer.h:47
void createPosting(KNNntpAccount::Ptr a)
Definition: knarticlefactory.cpp:67
QString from() const
void slotComposerDone(KNComposer *com)
Definition: knarticlefactory.cpp:962
boost::shared_ptr< KNNntpAccount > Ptr
Shared pointer to a KNNntpAccount.
Definition: knnntpaccount.h:62
void addItem(const QString &label)
void createForward(KNArticle::Ptr a)
Definition: knarticlefactory.cpp:277
const char * name() const
int count(const T &value) const
void append(const T &value)
This class encapsulates an article, that is stored locally in an MBOX-file.
Definition: knarticle.h:212
QVariant property(const char *name) const
KPIMIdentities::IdentityManager * identityManager()
Returns the identity manager.
Definition: knglobals.cpp:167
Definition: knarticle.h:48
bool isEmpty() const
bool isEmpty() const
int removeAll(const T &value)
QByteArray number(int n, int base)
virtual const KPIMIdentities::Identity & identity() const
Returns the global identity (or the default one when none is set yet).
Definition: settings.cpp:91
QString subject() const
typedef Iterator
void setText(const QString &)
void setCurrentItem(QListWidgetItem *item)
KNode::Settings * settings()
Returns the KConfigXT generated settings object.
Definition: knglobals.cpp:182
QListWidgetItem * item(int row) const
bool canceled() const
Returns true if the job has been canceled by the user.
Definition: knjobdata.h:132
Definition: kncomposer.h:47
void deleteComposerForArticle(KNLocalArticle::Ptr a)
Definition: knarticlefactory.cpp:688
void createMail(KMime::Types::Mailbox *address)
Definition: knarticlefactory.cpp:506
iterator end()
void slotSendErrorDialogDone()
Definition: knarticlefactory.cpp:1022
void setIcon(const QIcon &icon)
void sendArticles(KNLocalArticle::List &l, bool now=true)
Definition: knarticlefactory.cpp:590
void createSupersede(KNArticle::Ptr a)
Definition: knarticlefactory.cpp:431
Definition: kncollection.h:35
static QString rewrapStringList(const QStringList &text, int wrapAt, QChar quoteChar, bool stopAtSig, bool alwaysSpace)
used for rewarping a text when replying to a message or inserting a file into a box ...
Definition: utilities.cpp:286
QString & replace(int position, int n, QChar after)
boost::shared_ptr< KNRemoteArticle > Ptr
Shared pointer to a KNRemoteArticle. To be used instead of raw KNRemoteArticle*.
Definition: knarticle.h:109
boost::shared_ptr< KNCollection > Ptr
Shared pointer to a KNCollection.
Definition: kncollection.h:42
void createCancel(KNArticle::Ptr a)
Definition: knarticlefactory.cpp:353
boost::shared_ptr< KNArticle > Ptr
Shared pointer to a KNArticle. To be used instead of raw KNArticle*.
Definition: knarticle.h:41
Definition: kncomposer.h:48
bool applyChanges()
Applies changes from the editor into the article being edited.
Definition: kncomposer.cpp:722
Definition: kncomposer.h:47
KNArticleFactory(QObject *parent=0)
Definition: knarticlefactory.cpp:53
QString left(int n) const
QString fromLatin1(const char *str, int size)
boost::shared_ptr< KNArticleCollection > Ptr
Shared pointer to a KNArticle.
Definition: knarticlecollection.h:82
KNRemoteArticle represents an article, whos body has to be retrieved from a remote host or from the l...
Definition: knarticle.h:105
boost::shared_ptr< KNServerInfo > Ptr
Shared pointer to a KNServerInfo.
Definition: knserverinfo.h:39
Definition: knjobdata.h:114
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
Definition: kncollection.h:35
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
iterator begin()
void setWordWrap(bool on)
void slotHighlighted(int idx)
Definition: knarticlefactory.cpp:1068
Definition: kncomposer.h:48
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:34:18 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:34:18 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.