diff -r ec8c73975c1a -r 31c6ce8efbc7 mainwindow.cpp --- a/mainwindow.cpp Thu Mar 24 20:48:58 2005 +0000 +++ b/mainwindow.cpp Thu Mar 24 21:10:38 2005 +0000 @@ -12,6 +12,7 @@ #include #include #include +#include // for random seed #include @@ -39,6 +40,7 @@ #include "icons/viewzoomout.xpm" #include "icons/modecolor.xpm" #include "icons/modelink.xpm" +#include "icons/modecopy.xpm" #include "icons/vym-48x48.xpm" #include "icons/flag-note.xpm" #include "icons/flag-url.xpm" @@ -103,6 +105,7 @@ extern QActionGroup* actionGroupModModes; extern QAction* actionModModeColor; extern QAction* actionModModeLink; +extern QAction* actionModModeCopy; extern QActionGroup *actionGroupFormatFrameTypes; extern QAction *actionFormatFrameNone; @@ -154,6 +157,11 @@ settings.readNumEntry( "/vym/mainwindow/geometry/posY", 100)); + // Set random seed (random used for object IDs) + QTime t = QTime::currentTime(); // set random seed + srand( t.hour()*12+t.minute()*60+t.second()*60 ); + + // Initialize some settings, which are platform dependant QString p,s; @@ -209,10 +217,6 @@ statusBar(); - // Create the default map into first tab -// fileNew(); -// tabWidget->addTab (new MapEditor(tabWidget,true), "unnamed"); -// currentMapEditor()->show(); // Initialize Find window findWindow=new FindWindow(NULL,"findwindow"); @@ -222,6 +226,8 @@ this, SLOT(editFindChanged() ) ); updateGeometry(); + + // Creating the default map into first tab is done in main.cpp now... } Main::~Main() @@ -702,16 +708,24 @@ QAction *a; actionGroupModModes=new QActionGroup ( this, "formatLinkStyles"); actionGroupModModes->setExclusive (true); - a= new QAction( tr( "Use modifier to color branches" ), QPixmap(modecolor_xpm), tr( "Linkstyle Line" ), Key_C, actionGroupModModes, "modModeColor" ); + //FIXME Linkstyle line??? + a= new QAction( tr( "Use modifier to color branches" ), QPixmap(modecolor_xpm), tr( "Linkstyle Line" ), Key_K, actionGroupModModes, "modModeColor" ); a->setToggleAction(true); a->addTo (tb); a->setOn(true); actionModModeColor=a; a= new QAction( tr( "Use modifier to draw links" ), QPixmap(modelink_xpm), tr( "Linkstyle Line" ), Key_L, actionGroupModModes, "modModeLink" ); + //FIXME Linkstyle line??? a->setToggleAction(true); a->addTo (tb); actionModModeLink=a; + a= new QAction( tr( "Use modifier to copy" ), QPixmap(modecopy_xpm), tr( "Linkstyle Line" ), Key_C, actionGroupModModes, "modModeCopy" ); + //FIXME Linkstyle line??? + + a->setToggleAction(true); + a->addTo (tb); + actionModModeCopy=a; } // Flag Actions