From: Darius S. <dst...@us...> - 2001-07-20 15:57:32
|
Update of /cvsroot/kuml/kuml/kuml_gui/src/ige/common/commands In directory usw-pr-cvs1:/tmp/cvs-serv28950/common/commands Modified Files: CommandHistory.cpp CommandHistory.h CopyCmd.cpp CutCmd.cpp MoveCmd.cpp NewDocumentCmd.cpp NewDocumentCmd.h NewStdDocumentCmd.cpp NewStdDocumentCmd.h NewTextCmd.cpp PasteCmd.cpp Log Message: A Viewer can paint its layers now Index: CommandHistory.cpp =================================================================== RCS file: /cvsroot/kuml/kuml/kuml_gui/src/ige/common/commands/CommandHistory.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** CommandHistory.cpp 2001/06/20 19:21:23 1.1.1.1 --- CommandHistory.cpp 2001/07/20 15:57:28 1.2 *************** *** 32,35 **** --- 32,38 ---- CommandHistory::CommandHistory() { } + CommandHistory::~CommandHistory() { + // Delete all commands in history + } Index: CommandHistory.h =================================================================== RCS file: /cvsroot/kuml/kuml/kuml_gui/src/ige/common/commands/CommandHistory.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** CommandHistory.h 2001/06/20 19:21:24 1.1.1.1 --- CommandHistory.h 2001/07/20 15:57:28 1.2 *************** *** 24,28 **** public: ! CommandHistory(); void push(EditorCommand * c); --- 24,29 ---- public: ! CommandHistory(); ! ~CommandHistory(); void push(EditorCommand * c); Index: CopyCmd.cpp =================================================================== RCS file: /cvsroot/kuml/kuml/kuml_gui/src/ige/common/commands/CopyCmd.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** CopyCmd.cpp 2001/06/20 19:21:25 1.1.1.1 --- CopyCmd.cpp 2001/07/20 15:57:28 1.2 *************** *** 22,29 **** void CopyCmd::execute(Editor* editor){ ! debug("CopyCmd->Execute called (Not yet implemented!)"); } void CopyCmd::undo(){ ! debug("CopyCmd->Undo called (Not yet implemented!)"); } CopyCmd::~CopyCmd(){ --- 22,29 ---- void CopyCmd::execute(Editor* editor){ ! qDebug("CopyCmd->Execute called (Not yet implemented!)"); } void CopyCmd::undo(){ ! qDebug("CopyCmd->Undo called (Not yet implemented!)"); } CopyCmd::~CopyCmd(){ Index: CutCmd.cpp =================================================================== RCS file: /cvsroot/kuml/kuml/kuml_gui/src/ige/common/commands/CutCmd.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** CutCmd.cpp 2001/06/20 19:21:25 1.1.1.1 --- CutCmd.cpp 2001/07/20 15:57:28 1.2 *************** *** 21,28 **** void CutCmd::execute(Editor* editor){ ! debug("CutCmd->Execute called (Not yet implemented!)"); } void CutCmd::undo(){ ! debug("CutCmd->Undo called (Not yet implemented!)"); } CutCmd::~CutCmd(){} --- 21,28 ---- void CutCmd::execute(Editor* editor){ ! qDebug("CutCmd->Execute called (Not yet implemented!)"); } void CutCmd::undo(){ ! qDebug("CutCmd->Undo called (Not yet implemented!)"); } CutCmd::~CutCmd(){} Index: MoveCmd.cpp =================================================================== RCS file: /cvsroot/kuml/kuml/kuml_gui/src/ige/common/commands/MoveCmd.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** MoveCmd.cpp 2001/06/20 19:21:23 1.1.1.1 --- MoveCmd.cpp 2001/07/20 15:57:28 1.2 *************** *** 24,31 **** void MoveCmd::execute(Editor* editor){ ! debug("MoveCmd->Execute called (Not yet implemented!)"); } void MoveCmd::undo(){ ! debug("MoveCmd->Undo called (Not yet implemented!)"); } MoveCmd::~MoveCmd(){} --- 24,31 ---- void MoveCmd::execute(Editor* editor){ ! qDebug("MoveCmd->Execute called (Not yet implemented!)"); } void MoveCmd::undo(){ ! qDebug("MoveCmd->Undo called (Not yet implemented!)"); } MoveCmd::~MoveCmd(){} Index: NewDocumentCmd.cpp =================================================================== RCS file: /cvsroot/kuml/kuml/kuml_gui/src/ige/common/commands/NewDocumentCmd.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** NewDocumentCmd.cpp 2001/06/20 19:21:24 1.1.1.1 --- NewDocumentCmd.cpp 2001/07/20 15:57:28 1.2 *************** *** 18,26 **** #include "NewDocumentCmd.h" NewDocumentCmd::~NewDocumentCmd(){} NewDocumentCmd::NewDocumentCmd(){} void NewDocumentCmd::execute(Editor* editor){ ! createdDocument = createDocument(); } Document* NewDocumentCmd::getCreatedDocument(){ --- 18,28 ---- #include "NewDocumentCmd.h" + #include "ige/common/editors/Editor.h" NewDocumentCmd::~NewDocumentCmd(){} NewDocumentCmd::NewDocumentCmd(){} void NewDocumentCmd::execute(Editor* editor){ ! createdDocument = createDocument(editor->getViewer()); ! editor->setDocument(createdDocument); } Document* NewDocumentCmd::getCreatedDocument(){ Index: NewDocumentCmd.h =================================================================== RCS file: /cvsroot/kuml/kuml/kuml_gui/src/ige/common/commands/NewDocumentCmd.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** NewDocumentCmd.h 2001/06/20 19:21:24 1.1.1.1 --- NewDocumentCmd.h 2001/07/20 15:57:28 1.2 *************** *** 21,25 **** --- 21,28 ---- #include "EditorCommand.h" #include "AbstractCommand.h" + + class Viewer; class Document; + class NewDocumentCmd : public AbstractCommand { public: *************** *** 40,44 **** * The method will be invoked by execute(). */ ! virtual Document* createDocument() = 0; }; --- 43,47 ---- * The method will be invoked by execute(). */ ! virtual Document* createDocument(Viewer *viewer) = 0; }; Index: NewStdDocumentCmd.cpp =================================================================== RCS file: /cvsroot/kuml/kuml/kuml_gui/src/ige/common/commands/NewStdDocumentCmd.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** NewStdDocumentCmd.cpp 2001/06/20 19:21:24 1.1.1.1 --- NewStdDocumentCmd.cpp 2001/07/20 15:57:28 1.2 *************** *** 23,36 **** NewStdDocumentCmd::~NewStdDocumentCmd(){} NewStdDocumentCmd::NewStdDocumentCmd(){} ! void NewStdDocumentCmd::execute(Editor* editor){ ! debug("NewStdDocumentCmd->Execute called (Not yet implemented!)"); ! } void NewStdDocumentCmd::undo(){ ! debug("NewStdDocumentCmd->Undo called (Not yet implemented!)"); } class Document; ! Document* NewStdDocumentCmd::createDocument(){ ! StandardDocument * stdDoc = new StandardDocument(); return stdDoc; } --- 23,36 ---- NewStdDocumentCmd::~NewStdDocumentCmd(){} NewStdDocumentCmd::NewStdDocumentCmd(){} ! /*void NewStdDocumentCmd::execute(Editor* editor){ ! NewDocumentCmd::execute(editor); ! }*/ void NewStdDocumentCmd::undo(){ ! qDebug("NewStdDocumentCmd->Undo called (Not yet implemented!)"); } class Document; ! Document* NewStdDocumentCmd::createDocument(Viewer* viewer){ ! StandardDocument * stdDoc = new StandardDocument(viewer); return stdDoc; } Index: NewStdDocumentCmd.h =================================================================== RCS file: /cvsroot/kuml/kuml/kuml_gui/src/ige/common/commands/NewStdDocumentCmd.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** NewStdDocumentCmd.h 2001/06/20 19:21:24 1.1.1.1 --- NewStdDocumentCmd.h 2001/07/20 15:57:28 1.2 *************** *** 34,38 **** protected: /** Factory method. This implementation creates a StandardDocument. */ ! virtual Document * createDocument(); public: --- 34,38 ---- protected: /** Factory method. This implementation creates a StandardDocument. */ ! virtual Document * createDocument(Viewer *viewer); public: *************** *** 44,50 **** virtual void undo(); ! virtual void execute(Editor* editor); protected: }; --- 44,51 ---- virtual void undo(); ! // virtual void execute(Editor* editor); protected: + }; Index: NewTextCmd.cpp =================================================================== RCS file: /cvsroot/kuml/kuml/kuml_gui/src/ige/common/commands/NewTextCmd.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** NewTextCmd.cpp 2001/06/20 19:21:24 1.1.1.1 --- NewTextCmd.cpp 2001/07/20 15:57:28 1.2 *************** *** 22,29 **** void NewTextCmd::execute(Editor* editor){ ! debug("CreateTextCmd->Execute called (Not yet implemented!)"); } void NewTextCmd::undo(){ ! debug("CreateTextCmd->Undo called (Not yet implemented!)"); } View * NewTextCmd::createView(){} --- 22,29 ---- void NewTextCmd::execute(Editor* editor){ ! qDebug("CreateTextCmd->Execute called (Not yet implemented!)"); } void NewTextCmd::undo(){ ! qDebug("CreateTextCmd->Undo called (Not yet implemented!)"); } View * NewTextCmd::createView(){} Index: PasteCmd.cpp =================================================================== RCS file: /cvsroot/kuml/kuml/kuml_gui/src/ige/common/commands/PasteCmd.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** PasteCmd.cpp 2001/06/20 19:21:25 1.1.1.1 --- PasteCmd.cpp 2001/07/20 15:57:28 1.2 *************** *** 22,29 **** void PasteCmd::execute(Editor* editor){ ! debug("PasteCmd->Execute called (Not yet implemented!)"); } void PasteCmd::undo(){ ! debug("PasteCmd->Undo called (Not yet implemented!)"); } PasteCmd::~PasteCmd(){} --- 22,29 ---- void PasteCmd::execute(Editor* editor){ ! qDebug("PasteCmd->Execute called (Not yet implemented!)"); } void PasteCmd::undo(){ ! qDebug("PasteCmd->Undo called (Not yet implemented!)"); } PasteCmd::~PasteCmd(){} |