• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

knode

  • sources
  • kde-4.14
  • kdepim
  • knode
knarticlemanager.cpp
Go to the documentation of this file.
1 /*
2  KNode, the KDE newsreader
3  Copyright (c) 1999-2006 the KNode authors.
4  See file AUTHORS for details
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10  You should have received a copy of the GNU General Public License
11  along with this program; if not, write to the Free Software Foundation,
12  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
13 */
14 
15 #include "knarticlemanager.h"
16 
17 #include "utils/scoped_cursor_override.h"
18 
19 #include <QByteArray>
20 #include <QList>
21 #include <krun.h>
22 #include <kmessagebox.h>
23 #include <kmimetypetrader.h>
24 #include <klocale.h>
25 #include <kdebug.h>
26 #include <kwindowsystem.h>
27 #include <ktemporaryfile.h>
28 
29 #include "articlewidget.h"
30 #include "knmainwidget.h"
31 #include "knglobals.h"
32 #include "utilities.h"
33 #include "knarticlemanager.h"
34 #include "kngroupmanager.h"
35 #include "knsearchdialog.h"
36 #include "knfiltermanager.h"
37 #include "knfolder.h"
38 #include "knarticlefilter.h"
39 #include "knhdrviewitem.h"
40 #include "scheduler.h"
41 #include "knnntpaccount.h"
42 #include "knscoring.h"
43 #include "knmemorymanager.h"
44 #include "knarticlefactory.h"
45 #include "knarticlewindow.h"
46 #include "knfoldermanager.h"
47 #include "headerview.h"
48 #include "nntpjobs.h"
49 #include "settings.h"
50 
51 using namespace KNode;
52 using namespace KNode::Utilities;
53 
54 
55 KNArticleManager::KNArticleManager() : QObject(0)
56 {
57  f_ilterMgr = knGlobals.filterManager();
58  f_ilter = f_ilterMgr->currentFilter();
59  s_earchDlg=0;
60  d_isableExpander=false;
61 
62  connect(f_ilterMgr, SIGNAL(filterChanged(KNArticleFilter*)), this,
63  SLOT(slotFilterChanged(KNArticleFilter*)));
64 }
65 
66 
67 KNArticleManager::~KNArticleManager()
68 {
69  delete s_earchDlg;
70 }
71 
72 
73 void KNArticleManager::deleteTempFiles()
74 {
75  for ( QList<KTemporaryFile*>::Iterator it = mTempFiles.begin(); it != mTempFiles.end(); ++it ) {
76  delete (*it);
77  }
78  mTempFiles.clear();
79 }
80 
81 
82 void KNArticleManager::saveContentToFile(KMime::Content *c, QWidget *parent)
83 {
84  KNSaveHelper helper(c->contentType()->name(),parent);
85 
86  QFile *file = helper.getFile(i18n("Save Attachment"));
87 
88  if (file) {
89  QByteArray data=c->decodedContent();
90  if (file->write(data.data(), data.size()) == -1 )
91  KNHelper::displayExternalFileError( parent );
92  }
93 }
94 
95 
96 void KNArticleManager::saveArticleToFile( KNArticle::Ptr a, QWidget *parent )
97 {
98  QString fName = a->subject()->asUnicodeString();
99  QString s = "";
100 
101  for ( int i = 0; i < fName.length(); ++i )
102  if (fName[i].isLetterOrNumber())
103  s.append(fName[i]);
104  else
105  s.append(' ');
106  fName = s.simplified();
107  fName.replace(QRegExp("[\\s]"),"_");
108 
109  KNSaveHelper helper(fName,parent);
110  QFile *file = helper.getFile(i18n("Save Article"));
111 
112  if (file) {
113  QByteArray tmp=a->encodedContent(false);
114  if ( file->write(tmp.data(), tmp.size()) == -1 )
115  KNHelper::displayExternalFileError( parent );
116  }
117 }
118 
119 
120 QString KNArticleManager::saveContentToTemp(KMime::Content *c)
121 {
122  QString path;
123  KTemporaryFile* tmpFile;
124  KMime::Headers::Base *pathHdr=c->headerByType("X-KNode-Tempfile"); // check for existing temp file
125 
126  if(pathHdr) {
127  path = pathHdr->asUnicodeString();
128  bool found=false;
129 
130  // lets see if the tempfile-path is still valid...
131  for ( QList<KTemporaryFile*>::Iterator it = mTempFiles.begin(); it != mTempFiles.end(); ++it ) {
132  if ( (*it)->fileName() == path ) {
133  found = true;
134  break;
135  }
136  }
137 
138  if (found)
139  return path;
140  else
141  c->removeHeader("X-KNode-Tempfile");
142  }
143 
144  tmpFile=new KTemporaryFile();
145  if (!tmpFile->open()) {
146  KNHelper::displayTempFileError();
147  delete tmpFile;
148  return QString();
149  }
150 
151  mTempFiles.append(tmpFile);
152  QByteArray data=c->decodedContent();
153  tmpFile->write(data.data(), data.size());
154  tmpFile->flush();
155  path=tmpFile->fileName();
156  pathHdr=new KMime::Headers::Generic("X-KNode-Tempfile", c, path, "UTF-8");
157  c->setHeader(pathHdr);
158 
159  return path;
160 }
161 
162 
163 void KNArticleManager::openContent(KMime::Content *c)
164 {
165  QString path=saveContentToTemp(c);
166  if(path.isNull()) return;
167 
168  KService::Ptr offer = KMimeTypeTrader::self()->preferredService(c->contentType()->mimeType(), "Application");
169  KUrl::List lst;
170  KUrl url;
171  url.setPath(path);
172  lst.append(url);
173 
174  if (offer)
175  KRun::run(*offer, lst, knGlobals.top);
176  else
177  KRun::displayOpenWithDialog(lst, knGlobals.top);
178 }
179 
180 
181 void KNArticleManager::showHdrs(bool clear)
182 {
183  if(!g_roup && !f_older) return;
184 
185  bool setFirstChild=true;
186  bool showThreads=knGlobals.settings()->showThreads();
187  bool expandThreads=knGlobals.settings()->defaultToExpandedThreads();
188 
189  if(clear)
190  v_iew->clear();
191 
192  ScopedCursorOverride cursor( Qt::WaitCursor );
193  knGlobals.setStatusMsg(i18n(" Creating list..."));
194  knGlobals.top->secureProcessEvents();
195 
196  if(g_roup) {
197  KNRemoteArticle::Ptr art, ref, current;
198 
199  current = boost::static_pointer_cast<KNRemoteArticle>( knGlobals.top->articleViewer()->article() );
200 
201  if(current && (current->collection() != g_roup)) {
202  current.reset();
203  knGlobals.top->articleViewer()->setArticle( KNRemoteArticle::Ptr() );
204  }
205 
206  if(g_roup->isLocked())
207  knGlobals.scheduler()->nntpMutex().lock();
208 
209  if(f_ilter)
210  f_ilter->doFilter(g_roup);
211  else
212  for(int i=0; i<g_roup->length(); ++i) {
213  art=g_roup->at(i);
214  art->setFilterResult(true);
215  art->setFiltered(true);
216  ref = ( art->idRef() ? g_roup->byId( art->idRef() ) : KNRemoteArticle::Ptr() );
217  art->setDisplayedReference(ref);
218  if(ref)
219  ref->setVisibleFollowUps(true);
220  }
221 
222  d_isableExpander=true;
223 
224  for(int i=0; i<g_roup->length(); ++i) {
225 
226  art=g_roup->at(i);
227  art->setThreadMode(showThreads);
228 
229  if(showThreads) {
230  art->propagateThreadChangedDate();
231 
232  if( !art->listItem() && art->filterResult() ) {
233 
234  // ### disable delayed header view item creation for now, it breaks
235  // the quick search
236  // since it doesn't seem to improve performance at all, it probably
237  // could be removed entirely (see also slotItemExpanded(), etc.)
238  /*if (!expandThreads) {
239 
240  if( (ref=art->displayedReference()) ) {
241 
242  if( ref->listItem() && ( ref->listItem()->isOpen() || ref->listItem()->childCount()>0 ) ) {
243  art->setListItem(new KNHdrViewItem(ref->listItem()));
244  art->initListItem();
245  }
246 
247  }
248  else {
249  art->setListItem(new KNHdrViewItem(v_iew));
250  art->initListItem();
251  }
252 
253  } else { // expandThreads == true */
254  createThread(art);
255  if ( expandThreads )
256  art->listItem()->setOpen(true);
257 // }
258 
259  }
260  else if(art->listItem()) {
261  art->updateListItem();
262  if (expandThreads)
263  art->listItem()->setOpen(true);
264  }
265 
266  }
267  else {
268 
269  if(!art->listItem() && art->filterResult()) {
270  art->setListItem( new KNHdrViewItem( v_iew ), art );
271  art->initListItem();
272  } else if(art->listItem())
273  art->updateListItem();
274 
275  }
276 
277  }
278 
279  if (current && !current->filterResult()) { // try to find a parent that is visible
280  int idRef;
281  while (current && !current->filterResult()) {
282  idRef=current->idRef();
283  if (idRef == -1)
284  break;
285  current = g_roup->byId(idRef);
286  }
287  }
288 
289  if(current && current->filterResult()) {
290  if(!current->listItem())
291  createCompleteThread(current);
292  v_iew->setActive( current->listItem() );
293  setFirstChild=false;
294  }
295 
296  d_isableExpander=false;
297 
298  if (g_roup->isLocked())
299  knGlobals.scheduler()->nntpMutex().unlock();
300  }
301 
302  else if (f_older) {
303 
304  KNLocalArticle::Ptr art;
305  if(f_ilter) {
306  f_ilter->doFilter(f_older);
307  } else {
308  for(int i=0; i<f_older->length(); ++i) {
309  art=f_older->at(i);
310  art->setFilterResult(true);
311  }
312  }
313 
314  for(int idx=0; idx<f_older->length(); idx++) {
315  art=f_older->at(idx);
316 
317  if(!art->listItem() && art->filterResult()) {
318  art->setListItem( new KNHdrViewItem( v_iew ), art );
319  art->updateListItem();
320  } else if(art->listItem())
321  art->updateListItem();
322  }
323 
324  }
325 
326  if(setFirstChild && v_iew->firstChild()) {
327  v_iew->setCurrentItem(v_iew->firstChild());
328  knGlobals.top->articleViewer()->setArticle( KNArticle::Ptr() );
329  }
330 
331  knGlobals.setStatusMsg( QString() );
332  updateStatusString();
333 }
334 
335 
336 void KNArticleManager::updateViewForCollection( KNArticleCollection::Ptr c )
337 {
338  if(g_roup==c || f_older==c)
339  showHdrs(false);
340 }
341 
342 
343 void KNArticleManager::updateListViewItems()
344 {
345  if(!g_roup && !f_older) return;
346 
347  if(g_roup) {
348  KNRemoteArticle::Ptr art;
349 
350  for(int i=0; i<g_roup->length(); ++i) {
351  art=g_roup->at(i);
352  if(art->listItem())
353  art->updateListItem();
354  }
355  } else { //folder
356  KNLocalArticle::Ptr art;
357 
358  for(int idx=0; idx<f_older->length(); idx++) {
359  art=f_older->at(idx);
360  if(art->listItem())
361  art->updateListItem();
362  }
363  }
364 }
365 
366 
367 void KNArticleManager::setAllThreadsOpen(bool b)
368 {
369  KNRemoteArticle::Ptr art;
370  if(g_roup) {
371  ScopedCursorOverride cursor( Qt::WaitCursor );
372  d_isableExpander = true;
373  for(int idx=0; idx<g_roup->length(); idx++) {
374  art = g_roup->at(idx);
375  if (art->listItem())
376  art->listItem()->setOpen(b);
377  else
378  if (b && art->filterResult()) {
379  createThread(art);
380  art->listItem()->setOpen(true);
381  }
382  }
383  d_isableExpander = false;
384  }
385 }
386 
387 
388 void KNArticleManager::search()
389 {
390  if(s_earchDlg) {
391  s_earchDlg->show();
392 #ifdef Q_OS_UNIX
393  KWindowSystem::activateWindow(s_earchDlg->winId());
394 #endif
395  } else {
396  s_earchDlg = new SearchDialog( SearchDialog::STgroupSearch, 0 );
397  connect(s_earchDlg, SIGNAL(doSearch(KNArticleFilter*)), this,
398  SLOT(slotFilterChanged(KNArticleFilter*)));
399  connect(s_earchDlg, SIGNAL(dialogDone()), this,
400  SLOT(slotSearchDialogDone()));
401  s_earchDlg->show();
402  }
403 }
404 
405 
406 void KNArticleManager::setGroup( KNGroup::Ptr g )
407 {
408  g_roup = g;
409  if ( g )
410  emit aboutToShowGroup();
411 }
412 
413 
414 void KNArticleManager::setFolder( KNFolder::Ptr f )
415 {
416  f_older = f;
417  if ( f )
418  emit aboutToShowFolder();
419 }
420 
421 
422 KNArticleCollection::Ptr KNArticleManager::collection()
423 {
424  if(g_roup)
425  return g_roup;
426  if(f_older)
427  return f_older;
428 
429  return KNArticleCollection::Ptr();
430 }
431 
432 
433 bool KNArticleManager::loadArticle( KNArticle::Ptr a )
434 {
435  if (!a)
436  return false;
437 
438  if (a->hasContent())
439  return true;
440 
441  if (a->isLocked()) {
442  if ( a->type() == KNArticle::ATremote )
443  return true; // locked == we are already loading this article...
444  else
445  return false;
446  }
447 
448  if ( a->type() == KNArticle::ATremote ) {
449  KNGroup::Ptr g = boost::static_pointer_cast<KNGroup>( a->collection() );
450  if(g)
451  emitJob( new ArticleFetchJob( this, g->account(), a ) );
452  else
453  return false;
454  }
455  else { // local article
456  KNFolder::Ptr f = boost::static_pointer_cast<KNFolder>( a->collection() );
457  if( f && f->loadArticle( boost::static_pointer_cast<KNLocalArticle>( a ) ) )
458  knGlobals.memoryManager()->updateCacheEntry(a);
459  else
460  return false;
461  }
462  return true;
463 }
464 
465 
466 bool KNArticleManager::unloadArticle( KNArticle::Ptr a, bool force )
467 {
468  if(!a || a->isLocked() )
469  return false;
470  if(!a->hasContent())
471  return true;
472 
473  if (!force && a->isNotUnloadable())
474  return false;
475 
476  if ( !force && ( ArticleWidget::articleVisible( a ) ) )
477  return false;
478 
479  if (!force && ( a->type()== KNArticle::ATlocal ) &&
480  ( KNGlobals::self()->articleFactory()->findComposer( boost::static_pointer_cast<KNLocalArticle>( a ) ) != 0 ) )
481  return false;
482 
483  if ( !ArticleWindow::closeAllWindowsForArticle( a, force ) )
484  if (!force)
485  return false;
486 
487  ArticleWidget::articleRemoved( a );
488  if ( a->type() != KNArticle::ATlocal )
489  KNGlobals::self()->articleFactory()->deleteComposerForArticle( boost::static_pointer_cast<KNLocalArticle>( a ) );
490  a->updateListItem();
491  knGlobals.memoryManager()->removeCacheEntry(a);
492 
493  return true;
494 }
495 
496 
497 void KNArticleManager::copyIntoFolder( KNArticle::List &l, KNFolder::Ptr f )
498 {
499  if(!f) return;
500 
501  KNLocalArticle::Ptr loc;
502  KNLocalArticle::List l2;
503 
504  for ( KNArticle::List::Iterator it = l.begin(); it != l.end(); ++it ) {
505  if ( !(*it)->hasContent() )
506  continue;
507  loc = KNLocalArticle::Ptr( new KNLocalArticle( KNArticleCollection::Ptr() ) );
508  loc->setEditDisabled(true);
509  loc->setContent( (*it)->encodedContent() );
510  loc->parse();
511  l2.append(loc);
512  }
513 
514  if ( !l2.isEmpty() ) {
515 
516  f->setNotUnloadable(true);
517 
518  if ( !f->isLoaded() && !knGlobals.folderManager()->loadHeaders( f ) ) {
519  l2.clear();
520  f->setNotUnloadable(false);
521  return;
522  }
523 
524  if( !f->saveArticles( l2 ) ) {
525  for ( KNLocalArticle::List::Iterator it = l2.begin(); it != l2.end(); ++it ) {
526  if ( (*it)->isOrphant() )
527  (*it).reset(); // ok, this is ugly; we simply delete orphant articles
528  else
529  (*it)->KMime::Content::clear(); // no need to keep them in memory
530  }
531  KNHelper::displayInternalFileError();
532  } else {
533  for ( KNLocalArticle::List::Iterator it = l2.begin(); it != l2.end(); ++it )
534  (*it)->KMime::Content::clear(); // no need to keep them in memory
535  knGlobals.memoryManager()->updateCacheEntry( boost::static_pointer_cast<KNArticleCollection>( f ) );
536  }
537 
538  f->setNotUnloadable(false);
539  }
540 }
541 
542 
543 void KNArticleManager::moveIntoFolder( KNLocalArticle::List &l, KNFolder::Ptr f )
544 {
545  if(!f) return;
546  kDebug(5003) <<" Target folder:" << f->name();
547 
548  f->setNotUnloadable(true);
549 
550  if (!f->isLoaded() && !knGlobals.folderManager()->loadHeaders(f)) {
551  f->setNotUnloadable(false);
552  return;
553  }
554 
555  if ( f->saveArticles( l ) ) {
556  for ( KNLocalArticle::List::Iterator it = l.begin(); it != l.end(); ++it )
557  knGlobals.memoryManager()->updateCacheEntry( boost::static_pointer_cast<KNArticle>(*it) );
558  knGlobals.memoryManager()->updateCacheEntry( boost::static_pointer_cast<KNArticleCollection>( f ) );
559  } else {
560  for ( KNLocalArticle::List::Iterator it = l.begin(); it != l.end(); ++it )
561  if ( (*it)->isOrphant() )
562  (*it).reset(); // ok, this is ugly; we simply delete orphant articles
563  KNHelper::displayInternalFileError();
564  }
565 
566  f->setNotUnloadable(false);
567 }
568 
569 
570 bool KNArticleManager::deleteArticles(KNLocalArticle::List &l, bool ask)
571 {
572  if(ask) {
573  QStringList lst;
574  for ( KNLocalArticle::List::Iterator it = l.begin(); it != l.end(); ++it ) {
575  if ( (*it)->isLocked() )
576  continue;
577  if ( (*it)->subject()->isEmpty() )
578  lst << i18n("no subject");
579  else
580  lst << (*it)->subject()->asUnicodeString();
581  }
582  if( KMessageBox::Cancel == KMessageBox::warningContinueCancelList(
583  knGlobals.topWidget, i18n("Do you really want to delete these articles?"), lst,
584  i18n("Delete Articles"), KGuiItem(i18n("&Delete"),"edit-delete")) )
585  return false;
586  }
587 
588  for ( KNLocalArticle::List::Iterator it = l.begin(); it != l.end(); ++it )
589  knGlobals.memoryManager()->removeCacheEntry( boost::static_pointer_cast<KNArticle>(*it) );
590 
591  KNFolder::Ptr f = boost::static_pointer_cast<KNFolder>( l.first()->collection() );
592  if ( f ) {
593  f->removeArticles( l, true );
594  knGlobals.memoryManager()->updateCacheEntry( boost::static_pointer_cast<KNArticleCollection>( f ) );
595  return false; // composers for those articles were already removed in removeArticles
596  } else {
597  l.clear();
598  }
599 
600  return true;
601 }
602 
603 
604 void KNArticleManager::setAllRead( bool read, int lastcount )
605 {
606  if ( !g_roup )
607  return;
608 
609  int groupLength = g_roup->length();
610  int newCount = g_roup->newCount();
611  int readCount = g_roup->readCount();
612  int offset = lastcount;
613 
614  if ( lastcount > groupLength || lastcount < 0 )
615  offset = groupLength;
616 
617  KNRemoteArticle::Ptr a;
618  for ( int i = groupLength - offset; i < groupLength; ++i ) {
619  a = g_roup->at( i );
620  if ( a->getReadFlag() != read && !a->isIgnored() ) {
621  a->setRead( read );
622  a->setChanged( true );
623  if ( !read ) {
624  readCount--;
625  if ( a->isNew() )
626  newCount++;
627  } else {
628  readCount++;
629  if ( a->isNew() )
630  newCount--;
631  }
632  }
633  }
634 
635  g_roup->updateThreadInfo();
636  if ( lastcount < 0 && read ) {
637  // HACK: try to hide the effects of the ignore/filter new/unread count bug
638  g_roup->setReadCount( groupLength );
639  g_roup->setNewCount( 0 );
640  } else {
641  g_roup->setReadCount( readCount );
642  g_roup->setNewCount( newCount );
643  }
644 
645  g_roup->updateListItem();
646  showHdrs( true );
647 }
648 
649 
650 void KNArticleManager::setRead(KNRemoteArticle::List &l, bool r, bool handleXPosts)
651 {
652  if ( l.isEmpty() )
653  return;
654 
655  KNRemoteArticle::Ptr ref;
656  KNGroup::Ptr g = boost::static_pointer_cast<KNGroup>( l.first()->collection() );
657  int changeCnt=0, idRef=0;
658 
659  for ( KNRemoteArticle::List::Iterator it = l.begin(); it != l.end(); ++it ) {
660  if( r && knGlobals.settings()->markCrossposts() &&
661  handleXPosts && (*it)->newsgroups()->isCrossposted() ) {
662 
663  QList<QByteArray> groups = (*it)->newsgroups()->groups();
664  KNGroup::Ptr targetGroup;
665  KNRemoteArticle::Ptr xp;
666  KNRemoteArticle::List al;
667  QByteArray mid = (*it)->messageID()->as7BitString( false );
668 
669  for ( QList<QByteArray>::Iterator it2 = groups.begin(); it2 != groups.end(); ++it2 ) {
670  targetGroup = knGlobals.groupManager()->group(*it2, g->account());
671  if (targetGroup) {
672  if (targetGroup->isLoaded() && (xp=targetGroup->byMessageId(mid)) ) {
673  al.clear();
674  al.append(xp);
675  setRead(al, r, false);
676  } else {
677  targetGroup->appendXPostID(mid);
678  }
679  }
680  }
681  }
682 
683  else if ( (*it)->getReadFlag() != r ) {
684  (*it)->setRead( r );
685  (*it)->setChanged( true );
686  (*it)->updateListItem();
687 
688  if ( !(*it)->isIgnored() ) {
689  changeCnt++;
690  idRef = (*it)->idRef();
691 
692  while ( idRef != 0 ) {
693  ref=g->byId(idRef);
694  if(r) {
695  ref->decUnreadFollowUps();
696  if ( (*it)->isNew() )
697  ref->decNewFollowUps();
698  }
699  else {
700  ref->incUnreadFollowUps();
701  if ( (*it)->isNew() )
702  ref->incNewFollowUps();
703  }
704 
705  if(ref->listItem() &&
706  ((ref->unreadFollowUps()==0 || ref->unreadFollowUps()==1) ||
707  (ref->newFollowUps()==0 || ref->newFollowUps()==1)))
708  ref->updateListItem();
709 
710  idRef=ref->idRef();
711  }
712 
713  if(r) {
714  g->incReadCount();
715  if ( (*it)->isNew() )
716  g->decNewCount();
717  }
718  else {
719  g->decReadCount();
720  if ( (*it)->isNew() )
721  g->incNewCount();
722  }
723  }
724  }
725  }
726 
727  if(changeCnt>0) {
728  g->updateListItem();
729  if(g==g_roup)
730  updateStatusString();
731  }
732 }
733 
734 
735 void KNArticleManager::setAllNotNew()
736 {
737  if ( !g_roup )
738  return;
739  KNRemoteArticle::Ptr a;
740  for ( int i = 0; i < g_roup->length(); ++i) {
741  a = g_roup->at(i);
742  if ( a->isNew() ) {
743  a->setNew( false );
744  a->setChanged( true );
745  }
746  }
747  g_roup->setFirstNewIndex( -1 );
748  g_roup->setNewCount( 0 );
749  g_roup->updateThreadInfo();
750 }
751 
752 
753 bool KNArticleManager::toggleWatched(KNRemoteArticle::List &l)
754 {
755  if(l.isEmpty())
756  return true;
757 
758  KNRemoteArticle::Ptr a = l.first();
759  KNRemoteArticle::Ptr ref;
760  bool watch = (!a->isWatched());
761  KNGroup::Ptr g = boost::static_pointer_cast<KNGroup>( a->collection() );
762  int changeCnt=0, idRef=0;
763 
764  for ( KNRemoteArticle::List::Iterator it = l.begin(); it != l.end(); ++it ) {
765  if ( (*it)->isIgnored() ) {
766  (*it)->setIgnored(false);
767 
768  if ( !(*it)->getReadFlag() ) {
769  changeCnt++;
770  idRef = (*it)->idRef();
771 
772  while ( idRef != 0 ) {
773  ref=g->byId(idRef);
774 
775  ref->incUnreadFollowUps();
776  if ( (*it)->isNew() )
777  ref->incNewFollowUps();
778 
779  if(ref->listItem() &&
780  ((ref->unreadFollowUps()==0 || ref->unreadFollowUps()==1) ||
781  (ref->newFollowUps()==0 || ref->newFollowUps()==1)))
782  ref->updateListItem();
783 
784  idRef=ref->idRef();
785  }
786  g->decReadCount();
787  if ( (*it)->isNew() )
788  g->incNewCount();
789  }
790  }
791 
792  (*it)->setWatched( watch );
793  (*it)->updateListItem();
794  (*it)->setChanged( true );
795  }
796 
797  if(changeCnt>0) {
798  g->updateListItem();
799  if(g==g_roup)
800  updateStatusString();
801  }
802 
803  return watch;
804 }
805 
806 
807 bool KNArticleManager::toggleIgnored(KNRemoteArticle::List &l)
808 {
809  if(l.isEmpty())
810  return true;
811 
812  KNRemoteArticle::Ptr ref;
813  bool ignore = !l.first()->isIgnored();
814  KNGroup::Ptr g = boost::static_pointer_cast<KNGroup>( l.first()->collection() );
815  int changeCnt = 0, idRef = 0;
816 
817  for ( KNRemoteArticle::List::Iterator it = l.begin(); it != l.end(); ++it ) {
818  (*it)->setWatched(false);
819  if ( (*it)->isIgnored() != ignore ) {
820  (*it)->setIgnored( ignore );
821 
822  if ( !(*it)->getReadFlag() ) {
823  changeCnt++;
824  idRef = (*it)->idRef();
825 
826  while ( idRef != 0 ) {
827  ref = g->byId( idRef );
828 
829  if ( ignore ) {
830  ref->decUnreadFollowUps();
831  if ( (*it)->isNew() )
832  ref->decNewFollowUps();
833  } else {
834  ref->incUnreadFollowUps();
835  if ( (*it)->isNew() )
836  ref->incNewFollowUps();
837  }
838 
839  if(ref->listItem() &&
840  ((ref->unreadFollowUps()==0 || ref->unreadFollowUps()==1) ||
841  (ref->newFollowUps()==0 || ref->newFollowUps()==1)))
842  ref->updateListItem();
843 
844  idRef=ref->idRef();
845  }
846 
847  if ( ignore ) {
848  g->incReadCount();
849  if ( (*it)->isNew() )
850  g->decNewCount();
851  } else {
852  g->decReadCount();
853  if ( (*it)->isNew() )
854  g->incNewCount();
855  }
856 
857  }
858  }
859  (*it)->updateListItem();
860  (*it)->setChanged(true);
861  }
862 
863  if(changeCnt>0) {
864  g->updateListItem();
865  if(g==g_roup)
866  updateStatusString();
867  }
868 
869  return ignore;
870 }
871 
872 
873 void KNArticleManager::rescoreArticles(KNRemoteArticle::List &l)
874 {
875  if ( l.isEmpty() )
876  return;
877 
878  KNGroup::Ptr g = boost::static_pointer_cast<KNGroup>( l.first()->collection() );
879  KScoringManager *sm = knGlobals.scoringManager();
880  sm->initCache(g->groupname());
881 
882  for ( KNRemoteArticle::List::Iterator it = l.begin(); it != l.end(); ++it ) {
883  int defScore = 0;
884  if ( (*it)->isIgnored())
885  defScore = knGlobals.settings()->ignoredThreshold();
886  else if ( (*it)->isWatched() )
887  defScore = knGlobals.settings()->watchedThreshold();
888  (*it)->setScore(defScore);
889 
890  bool read = (*it)->isRead();
891 
892  KNScorableArticle sa( (*it) );
893  sm->applyRules(sa);
894  (*it)->updateListItem();
895  (*it)->setChanged( true );
896 
897  if ( !read && (*it)->isRead() != read )
898  g_roup->incReadCount();
899  }
900 }
901 
902 
903 void KNArticleManager::processJob(KNJobData *j)
904 {
905  if(j->type()==KNJobData::JTfetchArticle && !j->canceled()) {
906  KNRemoteArticle::Ptr a = boost::static_pointer_cast<KNRemoteArticle>( j->data() );
907  if(j->success()) {
908  ArticleWidget::articleChanged( a );
909  if(!a->isOrphant()) //orphant articles are deleted by the displaying widget
910  knGlobals.memoryManager()->updateCacheEntry( boost::static_pointer_cast<KNArticle>( a ) );
911  if(a->listItem())
912  a->updateListItem();
913  } else {
914  if ( j->error() == KIO::ERR_DOES_NOT_EXIST ) {
915  // article is not available at the server anymore
916  QString msgId = a->messageID()->as7BitString( false );
917  // strip of '<' and '>'
918  msgId = msgId.mid( 1, msgId.length() - 2 );
919  ArticleWidget::articleLoadError( a,
920  i18n("The article you requested is not available on your news server."
921  "<br />You could try to get it from <a href=\"http://groups.google.com/groups?selm=%1\">groups.google.com</a>.",
922  msgId ) );
923  // mark article as read
924  if ( knGlobals.settings()->autoMark() && !a->isOrphant() ) {
925  KNRemoteArticle::List l;
926  l.append( a );
927  setRead( l, true );
928  }
929  } else
930  ArticleWidget::articleLoadError( a, j->errorString() );
931  }
932  }
933 
934  delete j;
935 }
936 
937 
938 void KNArticleManager::createThread( KNRemoteArticle::Ptr a )
939 {
940  KNRemoteArticle::Ptr ref = a->displayedReference();
941 
942  if(ref) {
943  if(!ref->listItem())
944  createThread(ref);
945  a->setListItem( new KNHdrViewItem( ref->listItem() ), a );
946  }
947  else
948  a->setListItem( new KNHdrViewItem( v_iew ), a );
949 
950  a->setThreadMode( knGlobals.settings()->showThreads() );
951  a->initListItem();
952 }
953 
954 
955 void KNArticleManager::createCompleteThread( KNRemoteArticle::Ptr a )
956 {
957  KNRemoteArticle::Ptr ref = a->displayedReference();
958  if ( !ref ) {
959  return;
960  }
961 
962  KNRemoteArticle::Ptr art, top;
963  bool inThread=false;
964  bool showThreads = knGlobals.settings()->showThreads();
965 
966  while (ref->displayedReference() != 0)
967  ref=ref->displayedReference();
968 
969  top = ref;
970 
971  if (!top->listItem()) // shouldn't happen
972  return;
973 
974  for(int i=0; i<g_roup->count(); ++i) {
975  art=g_roup->at(i);
976  if(art->filterResult() && !art->listItem()) {
977 
978  if(art->displayedReference()==top) {
979  art->setListItem( new KNHdrViewItem( top->listItem() ), art );
980  art->setThreadMode(showThreads);
981  art->initListItem();
982  }
983  else {
984  ref=art->displayedReference();
985  inThread=false;
986  while(ref && !inThread) {
987  inThread=(ref==top);
988  ref=ref->displayedReference();
989  }
990  if(inThread)
991  createThread(art);
992  }
993  }
994  }
995 
996  if ( knGlobals.settings()->totalExpandThreads() )
997  top->listItem()->expandChildren();
998 }
999 
1000 
1001 void KNArticleManager::updateStatusString()
1002 {
1003  int displCnt=0;
1004 
1005  if(g_roup) {
1006  if(f_ilter)
1007  displCnt=f_ilter->count();
1008  else
1009  displCnt=g_roup->count();
1010 
1011  QString name = g_roup->name();
1012  if (g_roup->status()==KNGroup::moderated)
1013  name += i18n(" (moderated)");
1014 
1015  knGlobals.setStatusMsg(i18n(" %1: %2 new , %3 displayed",
1016  name, g_roup->newCount(), displCnt),SB_GROUP);
1017 
1018  if(f_ilter)
1019  knGlobals.setStatusMsg(i18n(" Filter: %1", f_ilter->translatedName()), SB_FILTER);
1020  else
1021  knGlobals.setStatusMsg( QString(), SB_FILTER );
1022  }
1023  else if(f_older) {
1024  if(f_ilter)
1025  displCnt=f_ilter->count();
1026  else
1027  displCnt=f_older->count();
1028  knGlobals.setStatusMsg(i18n(" %1: %2 displayed",
1029  f_older->name(), displCnt), SB_GROUP);
1030  knGlobals.setStatusMsg( QString(), SB_FILTER );
1031  } else {
1032  knGlobals.setStatusMsg( QString(), SB_GROUP );
1033  knGlobals.setStatusMsg( QString(), SB_FILTER );
1034  }
1035 }
1036 
1037 
1038 void KNArticleManager::slotFilterChanged(KNArticleFilter *f)
1039 {
1040  f_ilter=f;
1041  showHdrs();
1042 }
1043 
1044 
1045 void KNArticleManager::slotSearchDialogDone()
1046 {
1047  s_earchDlg->hide();
1048  slotFilterChanged(f_ilterMgr->currentFilter());
1049 }
1050 
1051 
1052 void KNArticleManager::slotItemExpanded(Q3ListViewItem *p)
1053 {
1054  if (d_isableExpander) // we don't want to call this method recursively
1055  return;
1056  d_isableExpander = true;
1057 
1058  KNRemoteArticle::Ptr top, art, ref;
1059  KNHdrViewItem *hdrItem;
1060  bool inThread=false;
1061  bool showThreads = knGlobals.settings()->showThreads();
1062  hdrItem=static_cast<KNHdrViewItem*>(p);
1063  top = boost::static_pointer_cast<KNRemoteArticle>( hdrItem->art );
1064 
1065  if (p->childCount() == 0) {
1066  ScopedCursorOverride cursor( Qt::WaitCursor );
1067 
1068  for(int i=0; i<g_roup->count(); ++i) {
1069  art=g_roup->at(i);
1070  if(art->filterResult() && !art->listItem()) {
1071 
1072  if(art->displayedReference()==top) {
1073  art->setListItem( new KNHdrViewItem( hdrItem ), art );
1074  art->setThreadMode(showThreads);
1075  art->initListItem();
1076  }
1077  else if( knGlobals.settings()->totalExpandThreads() ) { //totalExpand
1078  ref=art->displayedReference();
1079  inThread=false;
1080  while(ref && !inThread) {
1081  inThread=(ref==top);
1082  ref=ref->displayedReference();
1083  }
1084  if(inThread)
1085  createThread(art);
1086  }
1087  }
1088  }
1089 
1090  cursor.restore();
1091  }
1092 
1093  if ( knGlobals.settings()->totalExpandThreads() )
1094  hdrItem->expandChildren();
1095 
1096  d_isableExpander = false;
1097 }
1098 
1099 
1100 void KNArticleManager::setView(KNHeaderView* v) {
1101  v_iew = v;
1102  if(v) {
1103  connect(v, SIGNAL(expanded(Q3ListViewItem*)), this,
1104  SLOT(slotItemExpanded(Q3ListViewItem*)));
1105  }
1106 }
1107 
1108 //-----------------------------
KNArticleManager::updateViewForCollection
void updateViewForCollection(KNArticleCollection::Ptr c)
Definition: knarticlemanager.cpp:336
QList::clear
void clear()
KNArticleManager::unloadArticle
bool unloadArticle(KNArticle::Ptr a, bool force=true)
Definition: knarticlemanager.cpp:466
KNSaveHelper::getFile
QFile * getFile(const QString &dialogTitle)
returns a file open for writing
Definition: utilities.cpp:58
KNArticleManager::d_isableExpander
bool d_isableExpander
Definition: knarticlemanager.h:121
QWidget
KNArticleFactory::findComposer
KNComposer * findComposer(KNLocalArticle::Ptr a)
Definition: knarticlefactory.cpp:698
KNode::ArticleFetchJob
Downloads one specific article from the news server.
Definition: nntpjobs.h:83
QString::append
QString & append(QChar ch)
KNArticleFilter::count
int count() const
Definition: knarticlefilter.h:51
KNLocalArticle::Ptr
boost::shared_ptr< KNLocalArticle > Ptr
Shared pointer to a KNLocalArticle. To be used instead of raw KNLocalArticle*.
Definition: knarticle.h:216
KNHeaderView
Header view, displays the article listing of the currently selected news group or folder...
Definition: headerview.h:130
KNArticle::ATremote
Definition: knarticle.h:47
knmemorymanager.h
KNArticleManager::aboutToShowGroup
void aboutToShowGroup()
A newsgroup is about to be shown in the header view.
Q3ListViewItem::childCount
int childCount() const
KNJobConsumer::emitJob
void emitJob(KNJobData *j)
Send the job to the scheduler and append it to the job queue.
Definition: knjobdata.cpp:42
QByteArray
KNGroup::moderated
Definition: kngroup.h:50
utilities.h
knfolder.h
KNJobData::JTfetchArticle
Definition: knjobdata.h:112
KNArticleManager::loadArticle
bool loadArticle(KNArticle::Ptr a)
Loads the full content of the article a.
Definition: knarticlemanager.cpp:433
KNArticleManager::saveContentToFile
void saveContentToFile(KMime::Content *c, QWidget *parent)
Definition: knarticlemanager.cpp:82
KNArticleManager::f_ilter
KNArticleFilter * f_ilter
Definition: knarticlemanager.h:117
KNArticleManager::setAllNotNew
void setAllNotNew()
mark all articles in the current group as not new
Definition: knarticlemanager.cpp:735
KNArticleFilter::doFilter
void doFilter(KNGroup::Ptr g)
Definition: knarticlefilter.cpp:183
KNJobData
Abstract base class for all KNode internal jobs.
Definition: knjobdata.h:101
articlewidget.h
knarticlefactory.h
QString::simplified
QString simplified() const
KNArticleManager::setRead
void setRead(KNRemoteArticle::List &l, bool r=true, bool handleXPosts=true)
Definition: knarticlemanager.cpp:650
KNGlobals::self
static KNGlobals * self()
Return the KNGlobals instance.
Definition: knglobals.cpp:72
KNArticleManager::f_older
KNFolder::Ptr f_older
Definition: knarticlemanager.h:116
KNArticleManager::createCompleteThread
void createCompleteThread(KNRemoteArticle::Ptr a)
Definition: knarticlemanager.cpp:955
kngroupmanager.h
KNArticleManager::deleteTempFiles
void deleteTempFiles()
Definition: knarticlemanager.cpp:73
knfiltermanager.h
KNArticleManager::processJob
void processJob(KNJobData *j)
The actual work is done here.
Definition: knarticlemanager.cpp:903
KNGroup
Representation of a news group.
Definition: kngroup.h:41
knarticlemanager.h
KNFolder::Ptr
boost::shared_ptr< KNFolder > Ptr
Shared pointer to a KNFolder.
Definition: knfolder.h:38
KNArticleManager::saveArticleToFile
void saveArticleToFile(KNArticle::Ptr a, QWidget *parent)
Definition: knarticlemanager.cpp:96
KNArticleManager::aboutToShowFolder
void aboutToShowFolder()
A local folder is about to be shown in the header view.
knarticlewindow.h
KNArticleManager::copyIntoFolder
void copyIntoFolder(KNArticle::List &l, KNFolder::Ptr f)
Definition: knarticlemanager.cpp:497
QFile
KNHdrViewItem::expandChildren
void expandChildren()
Definition: knhdrviewitem.cpp:67
KNode::Utilities::ScopedCursorOverride::restore
void restore()
Restore the previous cursor shape.
Definition: scoped_cursor_override.h:59
KNArticleManager::slotFilterChanged
void slotFilterChanged(KNArticleFilter *f)
Definition: knarticlemanager.cpp:1038
QString::isNull
bool isNull() const
knnntpaccount.h
KNArticleFilter::translatedName
QString translatedName()
tries to translate the name
Definition: knarticlefilter.cpp:306
nntpjobs.h
scheduler.h
KNArticleManager::setView
void setView(KNHeaderView *v)
Allow to delay the setup of UI elements, since the knode part may not be available when the config di...
Definition: knarticlemanager.cpp:1100
scoped_cursor_override.h
KNHelper::displayTempFileError
static void displayTempFileError(QWidget *w=0)
use this for error on temporary files
Definition: utilities.cpp:362
KNArticleManager::KNArticleManager
KNArticleManager()
Definition: knarticlemanager.cpp:55
QRegExp
QObject::name
const char * name() const
KPIM::KScoringManager
Definition: kscoring.h:315
QList::append
void append(const T &value)
Q3ListViewItem
KNLocalArticle
This class encapsulates an article, that is stored locally in an MBOX-file.
Definition: knarticle.h:212
KNArticleManager::toggleWatched
bool toggleWatched(KNRemoteArticle::List &l)
Definition: knarticlemanager.cpp:753
KNArticleManager::updateListViewItems
void updateListViewItems()
Definition: knarticlemanager.cpp:343
KNHelper::displayExternalFileError
static void displayExternalFileError(QWidget *w=0)
use this for all external files
Definition: utilities.cpp:350
QObject
KNHelper::displayInternalFileError
static void displayInternalFileError(QWidget *w=0)
use this for all internal files
Definition: utilities.cpp:344
KNArticleManager::deleteArticles
bool deleteArticles(KNLocalArticle::List &l, bool ask=true)
Definition: knarticlemanager.cpp:570
KNJobData::type
jobType type() const
Definition: knjobdata.h:120
KNArticle::ATlocal
Definition: knarticle.h:48
KNArticleFilter
Article filter.
Definition: knarticlefilter.h:33
QList::isEmpty
bool isEmpty() const
KNGlobals::articleFactory
KNArticleFactory * articleFactory()
Returns the article factory.
Definition: knglobals.cpp:131
KNJobData::data
KNJobItem::Ptr data() const
Definition: knjobdata.h:123
KNHdrViewItem
Header view item.
Definition: knhdrviewitem.h:26
KNArticleManager::saveContentToTemp
QString saveContentToTemp(KMime::Content *c)
Definition: knarticlemanager.cpp:120
QList< KNArticle::Ptr >::Iterator
typedef Iterator
KNArticleManager::moveIntoFolder
void moveIntoFolder(KNLocalArticle::List &l, KNFolder::Ptr f)
Definition: knarticlemanager.cpp:543
knsearchdialog.h
QList::first
T & first()
knmainwidget.h
QString
QList
KNJobData::canceled
bool canceled() const
Returns true if the job has been canceled by the user.
Definition: knjobdata.h:132
KNArticleManager::setFolder
void setFolder(KNFolder::Ptr f)
Definition: knarticlemanager.cpp:414
KNArticleFactory::deleteComposerForArticle
void deleteComposerForArticle(KNLocalArticle::Ptr a)
Definition: knarticlefactory.cpp:688
KNArticleManager::~KNArticleManager
virtual ~KNArticleManager()
Definition: knarticlemanager.cpp:67
QStringList
KNode::SearchDialog::STgroupSearch
Definition: knsearchdialog.h:33
KNGroup::byId
KNRemoteArticle::Ptr byId(int id)
Definition: kngroup.h:122
KNode::ArticleWidget::articleVisible
static bool articleVisible(KNArticle::Ptr article)
check whether the given article is displayed in any instance
Definition: articlewidget.cpp:1096
KNArticleManager::search
void search()
Definition: knarticlemanager.cpp:388
QList::end
iterator end()
KNode::ArticleWindow::closeAllWindowsForArticle
static bool closeAllWindowsForArticle(KNArticle::Ptr art, bool force=true)
Clise all windows showing the given article.
Definition: knarticlewindow.cpp:48
KNArticleManager::collection
KNArticleCollection::Ptr collection()
Definition: knarticlemanager.cpp:422
KNode::SearchDialog::SearchDialog
SearchDialog(searchType t=STgroupSearch, QWidget *parent=0)
Create a new article search dialog.
Definition: knsearchdialog.cpp:28
headerview.h
knglobals.h
KNJobData::errorString
QString errorString() const
Returns the error message.
Definition: knjobdata.h:128
KNArticleManager::updateStatusString
void updateStatusString()
Definition: knarticlemanager.cpp:1001
QString::replace
QString & replace(int position, int n, QChar after)
KNode::ArticleWidget::articleRemoved
static void articleRemoved(KNArticle::Ptr article)
notify all instances that the given article has been removed
Definition: articlewidget.cpp:1105
KNArticleManager::setAllThreadsOpen
void setAllThreadsOpen(bool b=true)
Definition: knarticlemanager.cpp:367
KNRemoteArticle::Ptr
boost::shared_ptr< KNRemoteArticle > Ptr
Shared pointer to a KNRemoteArticle. To be used instead of raw KNRemoteArticle*.
Definition: knarticle.h:109
KNArticleManager::setAllRead
void setAllRead(bool read=true, int lastcount=-1)
Definition: knarticlemanager.cpp:604
KNHdrViewItem::art
KNArticle::Ptr art
Definition: knhdrviewitem.h:48
QString::mid
QString mid(int position, int n) const
knfoldermanager.h
settings.h
KNArticleManager::createThread
void createThread(KNRemoteArticle::Ptr a)
Definition: knarticlemanager.cpp:938
KNArticle::Ptr
boost::shared_ptr< KNArticle > Ptr
Shared pointer to a KNArticle. To be used instead of raw KNArticle*.
Definition: knarticle.h:41
KNHeaderView::setActive
void setActive(Q3ListViewItem *item)
Definition: headerview.cpp:141
KNHeaderView::clear
void clear()
Definition: headerview.cpp:163
KNArticleManager::toggleIgnored
bool toggleIgnored(KNRemoteArticle::List &l)
Definition: knarticlemanager.cpp:807
KNFilterManager::currentFilter
KNArticleFilter * currentFilter()
Definition: knfiltermanager.h:68
KNJobData::success
bool success() const
Returns true if the job finished successfully.
Definition: knjobdata.h:130
KNFolder::removeArticles
void removeArticles(KNLocalArticle::List &l, bool del=true)
Definition: knfolder.cpp:449
QString::length
int length() const
KNode::SearchDialog::dialogDone
void dialogDone()
KNArticleManager::v_iew
KNHeaderView * v_iew
Definition: knarticlemanager.h:114
KNode::ArticleWidget::articleLoadError
static void articleLoadError(KNArticle::Ptr article, const QString &error)
notify all instances about an error during loading the given article
Definition: articlewidget.cpp:1121
QByteArray::data
char * data()
QIODevice::write
qint64 write(const char *data, qint64 maxSize)
KNode::SearchDialog::doSearch
void doSearch(KNArticleFilter *)
KNArticleCollection::Ptr
boost::shared_ptr< KNArticleCollection > Ptr
Shared pointer to a KNArticle.
Definition: knarticlecollection.h:82
KNScorableArticle
Article interface for the scoring system.
Definition: knscoring.h:24
KNArticleManager::openContent
void openContent(KMime::Content *c)
Definition: knarticlemanager.cpp:163
KNRemoteArticle
KNRemoteArticle represents an article, whos body has to be retrieved from a remote host or from the l...
Definition: knarticle.h:105
KNFolder
Representation of a folder.
Definition: knfolder.h:30
SB_GROUP
#define SB_GROUP
Definition: resource.h:27
KNArticleManager::rescoreArticles
void rescoreArticles(KNRemoteArticle::List &l)
Definition: knarticlemanager.cpp:873
knscoring.h
KNArticleManager::f_ilterMgr
KNFilterManager * f_ilterMgr
Definition: knarticlemanager.h:118
KNode::Utilities::ScopedCursorOverride
This object change the application cursor to a given type and then restore the previous cursor when i...
Definition: scoped_cursor_override.h:36
KNSaveHelper
File save helper (includes file save dialog and network upload).
Definition: utilities.h:29
KNJobData::error
int error() const
Returns the error code (see KIO::Error).
Definition: knjobdata.h:126
KNArticleManager::showHdrs
void showHdrs(bool clear=true)
Definition: knarticlemanager.cpp:181
knhdrviewitem.h
KNArticleManager::s_earchDlg
KNode::SearchDialog * s_earchDlg
Definition: knarticlemanager.h:119
KNArticleManager::g_roup
KNGroup::Ptr g_roup
Definition: knarticlemanager.h:115
QByteArray::size
int size() const
QObject::connect
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QObject::parent
QObject * parent() const
KNode::ArticleWidget::articleChanged
static void articleChanged(KNArticle::Ptr article)
notify all instances that the given article has changed
Definition: articlewidget.cpp:1113
knGlobals
#define knGlobals
Keep compatibility with the old way.
Definition: knglobals.h:28
KNArticleManager::slotSearchDialogDone
void slotSearchDialogDone()
Definition: knarticlemanager.cpp:1045
QList::begin
iterator begin()
KNArticleManager::setGroup
void setGroup(KNGroup::Ptr g)
Definition: knarticlemanager.cpp:406
KNArticleManager::slotItemExpanded
void slotItemExpanded(Q3ListViewItem *p)
Definition: knarticlemanager.cpp:1052
KNArticleManager::mTempFiles
QList< KTemporaryFile * > mTempFiles
Definition: knarticlemanager.h:120
KNGroup::Ptr
boost::shared_ptr< KNGroup > Ptr
Shared pointer to a KNGroup.
Definition: kngroup.h:47
knarticlefilter.h
SB_FILTER
#define SB_FILTER
Definition: resource.h:28
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

KDE's Doxygen guidelines are available online.

knode

Skip menu "knode"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer
  • pimprint

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal