ndmanagerdoc.h

00001 /***************************************************************************
00002  *   Copyright (C) 2004 by Lynn Hazan                                      *
00003  *   lynn.hazan@myrealbox.com                                              *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 #ifndef NDMANAGERDOC_H
00021 #define NDMANAGERDOC_H
00022 
00023 // include files for QT
00024 #include <qstring.h>
00025 
00026 // include files for KDE
00027 #include <kurl.h>
00028 
00029 //include files for the application
00030 
00034 class ndManagerDoc{
00035 
00036  private: 
00038   KURL docUrl;
00039     
00040 public:
00044  ndManagerDoc(QWidget* parent);
00045  ~ndManagerDoc();
00046    
00048   enum OpenSaveCreateReturnMessage {OK=0,OPEN_ERROR=1,DOWNLOAD_ERROR=3,INCORRECT_FILE=4,SAVE_ERROR=5,
00049                              UPLOAD_ERROR=6,INCORRECT_CONTENT=7,CREATION_ERROR=8,PARSE_ERROR=9,MISSING_FILE=10,ALREADY_OPENED=11};
00050   
00052   void closeDocument();
00053   
00058   OpenSaveCreateReturnMessage openDocument(const KURL& url);
00059        
00061  inline const KURL& url() const{return docUrl;};
00062                          
00066   OpenSaveCreateReturnMessage newDocument();
00067  
00071  inline OpenSaveCreateReturnMessage save(){return save(docUrl);};
00072  
00077  OpenSaveCreateReturnMessage save(KURL url);
00078  
00083  inline OpenSaveCreateReturnMessage saveAs(KURL newUrl){
00084   docUrl = newUrl;
00085   return save(docUrl);  
00086  }; 
00087  
00089  OpenSaveCreateReturnMessage saveDefault();
00090 
00095  OpenSaveCreateReturnMessage saveScript(QString scriptName);
00096 
00100  inline void rename(KURL newUrl){
00101   docUrl = newUrl; 
00102  }; 
00103  
00104 private:
00105 
00107  QWidget* parent;    
00108  
00109 };
00110 
00111 #endif

Generated on Sat Sep 15 16:04:45 2007 for ndmanager.kdevelop by  doxygen 1.5.1