From: Gerard F. <ger...@us...> - 2002-03-17 22:56:31
|
Update of /cvsroot/kuml/kuml_old/kuml In directory usw-pr-cvs1:/tmp/cvs-serv1995/kuml Modified Files: iokumlutility.cpp kuml.cpp kumlview.cpp kumlview.h Log Message: 2002-03-17 Gerard Flynn <ger...@li...> * save/load of classes in class diagrams now works, connexions still broken * added loaded classes to the "project" package (multiple packages are not supported at this time) * changed the initial sizes of the 2 halfs of the kUML screen so that most space is reserved for the diagram (KumlApp::initView) * changed Classes::writeAsKuml to output the class name * added loading of drawingclass to Diagram::readAsKuml VS: Committing in . VS: VS: Modified Files: VS: ChangeLog kuml/iokumlutility.cpp kuml/kuml.cpp VS: kuml/kumlview.cpp kuml/kumlview.h kuml/data/classes.cpp VS: kuml/data/element.cpp kuml/data/package.cpp VS: kuml/data/repository.cpp kuml/diagrams/diagram.cpp VS: kuml/diagrams/diagramloader.cpp kuml/drawobj/drawingclass.cpp VS: kuml/drawobj/drawingclass.h kuml/drawobj/drawingrect.cpp VS: kuml/overview/winoverview.cpp VS: ---------------------------------------------------------------------- Index: iokumlutility.cpp =================================================================== RCS file: /cvsroot/kuml/kuml_old/kuml/iokumlutility.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** iokumlutility.cpp 3 Mar 2002 22:03:41 -0000 1.2 --- iokumlutility.cpp 17 Mar 2002 22:56:28 -0000 1.3 *************** *** 88,91 **** --- 88,93 ---- debug( "IOKumlUtility::readStatement handling GroupItem" ); groupType = firstToken; + debug( QString( " groupType : " ) + groupType ); + debug( QString( " secondToken : " ) + secondToken ); if(secondToken == openGroupChar) groupName = ""; *************** *** 95,98 **** --- 97,101 ---- groupName += QString(" ") + nextToken; } + debug( QString( " groupName : " ) + groupName ); debug( "IOKumlUtility::readStatement returning GroupItem" ); return GroupItem; Index: kuml.cpp =================================================================== RCS file: /cvsroot/kuml/kuml_old/kuml/kuml.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** kuml.cpp 3 Mar 2002 22:03:41 -0000 1.3 --- kuml.cpp 17 Mar 2002 22:56:28 -0000 1.4 *************** *** 24,27 **** --- 24,28 ---- #include <qfile.h> #include <qfiledialog.h> + #include <qvaluelist.h> #if defined (KDE2) *************** *** 193,238 **** KumlApp::KumlApp() { ! GlobalInformation::getInstance().setApplication(this); ! flag = noFlag; toolbox = NULL; setCaption("kUML " VERSION); ! project = new Projects("oo chart","Path"); ! /////////////////////////////////////////////////////////////////// ! // read the config file options ! readOptions(); ! /////////////////////////////////////////////////////////////////// ! // call inits to invoke all other construction parts ! initMenuBar(); ! initToolBar(); ! initStatusBar(); ! initView(); ! /////////////////////////////////////////////////////////////////// ! // enable bars dependend on config file setups ! if (!bViewToolbar) ! enableToolBar(KToolBar::Hide,0); ! if (!bViewStatusbar) ! enableStatusBar(KStatusBar::Hide); #if !defined (KDE2) ! menuBar()->setMenuBarPos(menu_bar_pos); ! toolBar()->setBarPos(tool_bar_pos); #else // defined (KDE2) ! ! // ! // TODO: Figure out where to place the menubar and tool bar. ! // #endif // defined (KDE2) ! /////////////////////////////////////////////////////////////////// ! // disable menu and toolbar items at startup ! resize(850,650); } //////////////////////////////////////////////////////////////////////// --- 194,239 ---- KumlApp::KumlApp() { ! GlobalInformation::getInstance().setApplication(this); ! flag = noFlag; toolbox = NULL; setCaption("kUML " VERSION); ! project = new Projects("oo chart","Path"); ! /////////////////////////////////////////////////////////////////// ! // read the config file options ! readOptions(); ! /////////////////////////////////////////////////////////////////// ! // call inits to invoke all other construction parts ! initMenuBar(); ! initToolBar(); ! initStatusBar(); ! initView(); ! /////////////////////////////////////////////////////////////////// ! // enable bars dependend on config file setups ! if (!bViewToolbar) ! enableToolBar(KToolBar::Hide,0); ! if (!bViewStatusbar) ! enableStatusBar(KStatusBar::Hide); #if !defined (KDE2) ! menuBar()->setMenuBarPos(menu_bar_pos); ! toolBar()->setBarPos(tool_bar_pos); #else // defined (KDE2) ! ! // ! // TODO: Figure out where to place the menubar and tool bar. ! // #endif // defined (KDE2) ! /////////////////////////////////////////////////////////////////// ! // disable menu and toolbar items at startup ! resize(850,650); } //////////////////////////////////////////////////////////////////////// *************** *** 547,550 **** --- 548,556 ---- splitleft = new QSplitter (split, "panner1"); splitleft->setOrientation (QFrame::Vertical); + + QValueList<int> i_sizes_h; + i_sizes_h.append( (int)( 0.1 * width() ) ); + i_sizes_h.append( (int)( 0.9 * width() ) ); + split->setSizes( i_sizes_h ); #endif // defined (KDE2) *************** *** 1418,1441 **** LVIDiagrams *listviewitem = NULL; ! DlgNewDiagram *newdialog = new DlgNewDiagram((QWidget*)0,"Create new diagram", getPtrDrawingArea()); ! connect(newdialog, SIGNAL(sigNewDiagram(Diagram*)), getPtrDrawingArea(), SLOT(slotSetDiagram(Diagram*))); ! if(newdialog->exec()) { ! diagram = newdialog->getCreatedDiagram(); ! DiagramLVIFactory lviFactory(overview->getLVIForDiagram(diagram)); ! listviewitem = lviFactory.createLVI(diagram); ! //listviewitem = (LVIDiagrams*)overview->getLVIForDiagram(newdialog->getCreatedDiagram()); overview->setSelected(listviewitem, true); newdialog->getCreatedDiagram()->setLVI(listviewitem); ! // Fill the toolbox with items of the diagram ! // newdialog->getCreatedDiagram()->fillToolBox(toolbox); ! // toolbox->enable(KToolBar::Show); ! // show(); ! ! connect(listviewitem, SIGNAL(sigSetDiagram(Diagram*)), getPtrDrawingArea(), SLOT(slotSetDiagram(Diagram*))); listviewitem->setOpen(true); ! ! getPtrDrawingArea()->slotSetDiagram(diagram); } --- 1424,1448 ---- LVIDiagrams *listviewitem = NULL; ! DlgNewDiagram *newdialog = new DlgNewDiagram((QWidget*)0,"Create new diagram", getPtrDrawingArea()); ! connect(newdialog, SIGNAL(sigNewDiagram(Diagram*)), getPtrDrawingArea(), SLOT(slotSetDiagram(Diagram*))); ! if(newdialog->exec()) { ! diagram = newdialog->getCreatedDiagram(); ! DiagramLVIFactory lviFactory(overview->getLVIForDiagram(diagram)); ! listviewitem = lviFactory.createLVI(diagram); ! //listviewitem = (LVIDiagrams*)overview->getLVIForDiagram(newdialog->getCreatedDiagram()); overview->setSelected(listviewitem, true); newdialog->getCreatedDiagram()->setLVI(listviewitem); ! // Fill the toolbox with items of the diagram ! // newdialog->getCreatedDiagram()->fillToolBox(toolbox); ! // toolbox->enable(KToolBar::Show); ! // show(); ! ! connect( listviewitem, SIGNAL( sigSetDiagram( Diagram* ) ), ! getPtrDrawingArea(), SLOT( slotSetDiagram( Diagram* ) ) ); listviewitem->setOpen(true); ! ! getPtrDrawingArea()->slotSetDiagram(diagram); } Index: kumlview.cpp =================================================================== RCS file: /cvsroot/kuml/kuml_old/kuml/kumlview.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** kumlview.cpp 8 Oct 2000 04:21:54 -0000 1.1.1.1 --- kumlview.cpp 17 Mar 2002 22:56:28 -0000 1.2 *************** *** 23,26 **** --- 23,30 ---- #include "resource.h" + #define DRAWING_WIDTH 1200 + #define DRAWING_HEIGHT 900 + + //////////////////////////////////////////////////////////////////////// void KumlView::resizeScrollview(int width, int height) { *************** *** 67,71 **** drawingArea = new DrawingArea(/*(QWidget*)*/scrollView, main); ! drawingArea->setGeometry(0,0,DRAWING_AREA_WIDTH,DRAWING_AREA_HEIGHT); // connect( drawingArea, SIGNAL(sigMouseMoveX(int)), // rulh, SLOT(slotNewValue(int)) ); --- 71,75 ---- drawingArea = new DrawingArea(/*(QWidget*)*/scrollView, main); ! drawingArea->setGeometry(0,0,DRAWING_WIDTH,DRAWING_HEIGHT); // connect( drawingArea, SIGNAL(sigMouseMoveX(int)), // rulh, SLOT(slotNewValue(int)) ); *************** *** 80,87 **** drawingArea->setMouseTracking(TRUE); ! drawingArea = new DrawingArea((QWidget*)scrollView, main); ! drawingArea->setGeometry(0,0,DRAWING_AREA_WIDTH,DRAWING_AREA_HEIGHT); ! ! scrollView->addChild(drawingArea); } //////////////////////////////////////////////////////////////////////// --- 84,91 ---- drawingArea->setMouseTracking(TRUE); ! drawingArea = new DrawingArea((QWidget*)scrollView, main); ! drawingArea->setGeometry(0,0,DRAWING_WIDTH,DRAWING_HEIGHT); ! ! scrollView->addChild(drawingArea); } //////////////////////////////////////////////////////////////////////// Index: kumlview.h =================================================================== RCS file: /cvsroot/kuml/kuml_old/kuml/kumlview.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** kumlview.h 8 Oct 2000 04:21:54 -0000 1.1.1.1 --- kumlview.h 17 Mar 2002 22:56:28 -0000 1.2 *************** *** 58,72 **** ~KumlView(); ! DrawingArea *getDrawingArea() { return drawingArea; } ! QScrollView *scrollView; //////////////////////////////////////////////////////////////////////// protected: ! void resizeEvent ( QResizeEvent *e ) ; void mouseMoveEvent ( QMouseEvent *e ); ! ! void updateRulers(QMouseEvent *e); //////////////////////////////////////////////////////////////////////// public slots: ! void resizeScrollview(int,int); private slots: --- 58,72 ---- ~KumlView(); ! DrawingArea *getDrawingArea() { return drawingArea; } ! QScrollView *scrollView; //////////////////////////////////////////////////////////////////////// protected: ! void resizeEvent ( QResizeEvent *e ) ; void mouseMoveEvent ( QMouseEvent *e ); ! ! void updateRulers(QMouseEvent *e); //////////////////////////////////////////////////////////////////////// public slots: ! void resizeScrollview(int,int); private slots: *************** *** 75,81 **** private: ! DrawingArea *drawingArea; ! Projects *project; ! //////////////////////////////////////////////////////////////////////// }; --- 75,81 ---- private: ! DrawingArea *drawingArea; ! Projects *project; ! //////////////////////////////////////////////////////////////////////// }; |