00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef KSG_WORKSPACE_H
00025 #define KSG_WORKSPACE_H
00026
00027 #include <tqptrlist.h>
00028 #include <tqtabwidget.h>
00029
00030 class KConfig;
00031 class KURL;
00032 class TQString;
00033 class WorkSheet;
00034
00035 class Workspace : public QTabWidget
00036 {
00037 Q_OBJECT
00038
00039 public:
00040 Workspace( TQWidget* parent, const char* name = 0 );
00041 ~Workspace();
00042
00043 void saveProperties( KConfig* );
00044 void readProperties( KConfig* );
00045
00046 bool saveOnQuit();
00047
00048 void showProcesses();
00049
00050 WorkSheet *restoreWorkSheet( const TQString &fileName,
00051 const TQString &newName = TQString::null );
00052 void deleteWorkSheet( const TQString &fileName );
00053
00054 public slots:
00055 void newWorkSheet();
00056 void loadWorkSheet();
00057 void loadWorkSheet( const KURL& );
00058 void saveWorkSheet();
00059 void saveWorkSheet( WorkSheet *sheet );
00060 void saveWorkSheetAs();
00061 void saveWorkSheetAs( WorkSheet *sheet );
00062 void deleteWorkSheet();
00063 void removeAllWorkSheets();
00064 void cut();
00065 void copy();
00066 void paste();
00067 void configure();
00068 void updateCaption( TQWidget* );
00069 void updateSheetTitle( TQWidget* );
00070 void applyStyle();
00071
00072 signals:
00073 void announceRecentURL( const KURL &url );
00074 void setCaption( const TQString &text, bool modified );
00075
00076 private:
00077 TQPtrList<WorkSheet> mSheetList;
00078
00079
00080 TQString mWorkDir;
00081 bool mAutoSave;
00082 };
00083
00084 #endif