kshowmaildoc.cpp

00001 /***************************************************************************
00002                           kshowmaildoc.cpp  -  description
00003                              -------------------
00004     begin                : Fre Sep 28 23:29:54 CEST 2001
00005     copyright            : (C) 2001 by Eggert Ehmke
00006     email                : eggert.ehmke@berlin.de
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 // include files for TQt
00019 #include <tqdir.h>
00020 #include <tqwidget.h>
00021 
00022 // include files for KDE
00023 #include <tdelocale.h>
00024 #include <tdemessagebox.h>
00025 #include <tdeio/job.h>
00026 #include <tdeio/netaccess.h>
00027 
00028 // application specific includes
00029 #include "kshowmaildoc.h"
00030 #include "kshowmail.h"
00031 #include "kshowmailview.h"
00032 
00033 KshowmailView *KshowmailDoc::pView = 0L;
00034 
00035 KshowmailDoc::KshowmailDoc(TQWidget *parent, const char *name) : TQObject(parent, name)
00036 {
00037 }
00038 
00039 KshowmailDoc::~KshowmailDoc()
00040 {
00041 }
00042 
00043 void KshowmailDoc::addView(KshowmailView *view)
00044 {
00045   pView = view;
00046 }
00047 
00048 void KshowmailDoc::removeView(KshowmailView*)
00049 {
00050   delete pView;
00051 }
00052 
00053 void KshowmailDoc::setURL(const KURL &url)
00054 {
00055   doc_url=url;
00056 }
00057 
00058 const KURL& KshowmailDoc::URL() const
00059 {
00060   return doc_url;
00061 }
00062 
00063 // this could be deleted; perhaps we build a tree view sometime ?
00064 void KshowmailDoc::slotUpdateAllViews(KshowmailView *sender)
00065 {
00066   if(pView)
00067   {
00068      if(pView!=sender)
00069         pView->repaint();
00070   }
00071 }
00072 
00073 bool KshowmailDoc::newDocument()
00074 {
00076   // TODO: Add your document initialization code here
00078   doc_url.setFileName(i18n("Untitled"));
00079 
00080   return true;
00081 }

Generated on Thu Jul 5 19:36:06 2007 for kshowmail by  doxygen 1.5.0