|
From: Darius S. <dst...@us...> - 2001-07-22 23:15:57
|
Update of /cvsroot/kuml/kuml/kuml_gui/src/editorapp/editorapp
In directory usw-pr-cvs1:/tmp/cvs-serv1529
Modified Files:
editorapp.cpp editorapp.h editorappdoc.h editorappview.cpp
editorappview.h
Log Message:
Let the editor execute more commands
Index: editorapp.cpp
===================================================================
RCS file: /cvsroot/kuml/kuml/kuml_gui/src/editorapp/editorapp/editorapp.cpp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** editorapp.cpp 2001/07/08 16:01:51 1.1.1.1
--- editorapp.cpp 2001/07/22 23:15:55 1.2
***************
*** 43,46 ****
--- 43,47 ----
viewToolBar->setOn(true);
viewStatusBar->setOn(true);
+ resize(600,600);
}
Index: editorapp.h
===================================================================
RCS file: /cvsroot/kuml/kuml/kuml_gui/src/editorapp/editorapp/editorapp.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** editorapp.h 2001/07/08 16:01:51 1.1.1.1
--- editorapp.h 2001/07/22 23:15:55 1.2
***************
*** 55,59 ****
EditorAppApp();
/** destructor */
! ~EditorAppApp();
/** initializes all QActions of the application */
void initActions();
--- 55,59 ----
EditorAppApp();
/** destructor */
! virtual ~EditorAppApp();
/** initializes all QActions of the application */
void initActions();
Index: editorappdoc.h
===================================================================
RCS file: /cvsroot/kuml/kuml/kuml_gui/src/editorapp/editorapp/editorappdoc.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** editorappdoc.h 2001/07/08 16:01:52 1.1.1.1
--- editorappdoc.h 2001/07/22 23:15:55 1.2
***************
*** 34,38 ****
public:
EditorAppDoc();
! ~EditorAppDoc();
void newDoc();
bool save();
--- 34,38 ----
public:
EditorAppDoc();
! virtual ~EditorAppDoc();
void newDoc();
bool save();
Index: editorappview.cpp
===================================================================
RCS file: /cvsroot/kuml/kuml/kuml_gui/src/editorapp/editorapp/editorappview.cpp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** editorappview.cpp 2001/07/08 16:01:50 1.1.1.1
--- editorappview.cpp 2001/07/22 23:15:55 1.2
***************
*** 19,44 ****
#include "editorappview.h"
#include "ige/common/commands/NewTextCmd.h"
#include "ige/common/commands/NewStdDocumentCmd.h"
EditorAppView::EditorAppView(QWidget *parent, EditorAppDoc *doc) : DoubleBufferViewer(parent)
- //EditorAppView::EditorAppView(QWidget *parent, EditorAppDoc *doc) : QWidget(parent)
{
! /** connect doc with the view*/
! connect(doc, SIGNAL(documentChanged()), this, SLOT(slotDocumentChanged()));
// Add interaction
editor = new StandardEditor(this);
NewStdDocumentCmd *cmd1 = new NewStdDocumentCmd();
editor->execute(cmd1);
NewTextCmd *cmd2 = new NewTextCmd();
editor->execute(cmd2);
! editor->undo();
}
EditorAppView::~EditorAppView()
{
}
--- 19,57 ----
#include "editorappview.h"
#include "ige/common/commands/NewTextCmd.h"
+ #include "ige/common/commands/MoveCmd.h"
#include "ige/common/commands/NewStdDocumentCmd.h"
EditorAppView::EditorAppView(QWidget *parent, EditorAppDoc *doc) : DoubleBufferViewer(parent)
{
! connect(doc, SIGNAL(documentChanged()), this, SLOT(slotDocumentChanged()));
+ /* ################################################################## */
// Add interaction
editor = new StandardEditor(this);
+ // Create an empty standard document
NewStdDocumentCmd *cmd1 = new NewStdDocumentCmd();
editor->execute(cmd1);
+ // Create some simple text views
NewTextCmd *cmd2 = new NewTextCmd();
editor->execute(cmd2);
+ editor->execute(new MoveCmd(cmd2->getCreated(), -20,50));
! NewTextCmd *cmd3 = new NewTextCmd();
! editor->execute(cmd3);
! editor->execute(new MoveCmd(cmd3->getCreated(), 70,80));
!
! NewTextCmd *cmd4 = new NewTextCmd();
! editor->execute(cmd4);
! editor->execute(new MoveCmd(cmd4->getCreated(), 160,200));
!
! // editor->undo();
! /* ################################################################## */
}
EditorAppView::~EditorAppView()
{
+ delete editor;
}
Index: editorappview.h
===================================================================
RCS file: /cvsroot/kuml/kuml/kuml_gui/src/editorapp/editorapp/editorappview.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** editorappview.h 2001/07/08 16:01:50 1.1.1.1
--- editorappview.h 2001/07/22 23:15:55 1.2
***************
*** 40,44 ****
public:
EditorAppView(QWidget *parent=0, EditorAppDoc* doc=0);
! ~EditorAppView();
protected slots:
--- 40,44 ----
public:
EditorAppView(QWidget *parent=0, EditorAppDoc* doc=0);
! virtual ~EditorAppView();
protected slots:
|