Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Examples  

workspacemanager.h

Go to the documentation of this file.
00001 
00002 //
00003 // YASA work space manager
00004 //
00005 // Project: Yasa 2
00006 // Author : Jan Blumenthal
00007 // Start  : 2002/02/28
00008 // $Header: /sources/yasa/yasagui/workspacemanager.h,v 1.5 2003/01/24 15:47:44 bj Exp $
00009 //
00011 //
00012 // This program is free software; you can redistribute it and/or modify
00013 // it under the terms of the GNU General Public License as published by
00014 // the Free Software Foundation; either version 2 of the License, or
00015 // (at your option) any later version.
00016 //
00017 // This program is distributed in the hope that it will be useful,
00018 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00019 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020 // GNU General Public License for more details.
00021 //
00022 // You should have received a copy of the GNU General Public License
00023 // along with this program (See the included file COPYING);
00024 // if not, write to the Free Software Foundation, Inc.,
00025 // 675 Mass Ave, Cambridge, MA 02139, USA.
00026 //
00028 #ifndef YASAGUI_WORKSPACEMANAGER_INCLUDE
00029 #define YASAGUI_WORKSPACEMANAGER_INCLUDE
00030 
00031 #include <yasagui/yasagui.h>
00032 #include <qobject.h>
00033 #include <qlist.h>
00034 #include "object.h"
00035 #include "filedialog.h"
00036 
00037 
00039 class YWorkSpace;
00040 class YActionHandler;
00041 class YApplication;
00042 
00045 class YWorkSpaceManager : public YObject
00046 {
00047     Q_OBJECT
00048     YApplication            &application;
00049     YWorkSpace              *workspace;
00050     YActionHandler          *actionhandler;
00051     YFileDialog             filedialog;                         
00052 
00053     int                     CreateNewWorkSpace();
00054 public:                     YWorkSpaceManager(YApplication &app);
00055                             ~YWorkSpaceManager()
00056                             {
00057                                 CloseWorkSpace();
00058                             }
00059     int                     InitInstance(YActionHandler *ah)
00060                             {
00061                                 actionhandler=ah;
00062                                 return 0;
00063                             }
00064     YWorkSpace*             GetWorkSpace();
00065     virtual int             SetConfig(YInputParser &parser);
00066     virtual int             GetConfig(YOutputParser &parser);
00067     int                     ReadWorkSpace(const QString &filename);
00068     int                     WriteWorkSpace(const QString &newfilename);
00069     YApplication&           GetApplication() const                          {   return application; }
00070 public slots:
00071     int                     NewWorkSpace();
00072     void                    OpenWorkSpace();
00073     void                    CloseWorkSpace();
00074     void                    SaveWorkSpace();
00075     void                    SaveWorkSpaceAs();
00076 signals:
00077     void                    WorkSpaceDestroyed(YWorkSpace *);   
00078     void                    NewWorkSpaceCreated(YWorkSpace *);  
00079 };
00080 
00081 
00083 #endif                                                          // ifndef YASAGUI_WORKSPACEMANAGER_INCLUDE

Generated on Thu Feb 13 23:43:57 2003 for Yasa by doxygen1.3-rc3