mainwindow.cpp
changeset 93 31c6ce8efbc7
parent 91 855c486b9360
child 94 6783e13bb05d
     1.1 --- a/mainwindow.cpp	Thu Mar 24 20:48:58 2005 +0000
     1.2 +++ b/mainwindow.cpp	Thu Mar 24 21:10:38 2005 +0000
     1.3 @@ -12,6 +12,7 @@
     1.4  #include <qcolordialog.h>
     1.5  #include <qbitmap.h>
     1.6  #include <qinputdialog.h>
     1.7 +#include <qdatetime.h>			// for random seed
     1.8  
     1.9  
    1.10  #include <iostream>
    1.11 @@ -39,6 +40,7 @@
    1.12  #include "icons/viewzoomout.xpm"
    1.13  #include "icons/modecolor.xpm"
    1.14  #include "icons/modelink.xpm"
    1.15 +#include "icons/modecopy.xpm"
    1.16  #include "icons/vym-48x48.xpm"
    1.17  #include "icons/flag-note.xpm"
    1.18  #include "icons/flag-url.xpm"
    1.19 @@ -103,6 +105,7 @@
    1.20  extern QActionGroup* actionGroupModModes;
    1.21  extern QAction* actionModModeColor;
    1.22  extern QAction* actionModModeLink;
    1.23 +extern QAction* actionModModeCopy;
    1.24  
    1.25  extern QActionGroup *actionGroupFormatFrameTypes;
    1.26  extern QAction *actionFormatFrameNone;
    1.27 @@ -154,6 +157,11 @@
    1.28  	        settings.readNumEntry( "/vym/mainwindow/geometry/posY", 100));
    1.29  
    1.30  
    1.31 +	// Set random seed (random used for object IDs)
    1.32 +    QTime t = QTime::currentTime();		// set random seed
    1.33 +    srand( t.hour()*12+t.minute()*60+t.second()*60 );
    1.34 +
    1.35 +
    1.36  	// Initialize some settings, which are platform dependant
    1.37  	QString p,s;
    1.38  
    1.39 @@ -209,10 +217,6 @@
    1.40  
    1.41      statusBar();
    1.42  
    1.43 -	// Create the default map into first tab
    1.44 -//	fileNew();
    1.45 -//	tabWidget->addTab (new MapEditor(tabWidget,true), "unnamed");
    1.46 -//	currentMapEditor()->show();
    1.47  
    1.48  	// Initialize Find window
    1.49  	findWindow=new FindWindow(NULL,"findwindow");
    1.50 @@ -222,6 +226,8 @@
    1.51  		this, SLOT(editFindChanged() ) );	
    1.52  
    1.53  	updateGeometry();
    1.54 +
    1.55 +	// Creating  the default map into first tab is done in main.cpp now...
    1.56  }
    1.57  
    1.58  Main::~Main()
    1.59 @@ -702,16 +708,24 @@
    1.60      QAction *a;
    1.61  	actionGroupModModes=new QActionGroup ( this, "formatLinkStyles");
    1.62  	actionGroupModModes->setExclusive (true);
    1.63 -    a= new QAction( tr( "Use modifier to color branches" ), QPixmap(modecolor_xpm), tr( "Linkstyle Line" ), Key_C, actionGroupModModes, "modModeColor" );
    1.64 +	//FIXME Linkstyle line???
    1.65 +    a= new QAction( tr( "Use modifier to color branches" ), QPixmap(modecolor_xpm), tr( "Linkstyle Line" ), Key_K, actionGroupModModes, "modModeColor" );
    1.66  	a->setToggleAction(true);
    1.67  	a->addTo (tb);
    1.68  	a->setOn(true);
    1.69  	actionModModeColor=a;
    1.70      a= new QAction( tr( "Use modifier to draw links" ), QPixmap(modelink_xpm), tr( "Linkstyle Line" ), Key_L, actionGroupModModes, "modModeLink" );
    1.71 +	//FIXME Linkstyle line???
    1.72  
    1.73  	a->setToggleAction(true);
    1.74  	a->addTo (tb);
    1.75  	actionModModeLink=a;
    1.76 +    a= new QAction( tr( "Use modifier to copy" ), QPixmap(modecopy_xpm), tr( "Linkstyle Line" ), Key_C, actionGroupModModes, "modModeCopy" );
    1.77 +	//FIXME Linkstyle line???
    1.78 +
    1.79 +	a->setToggleAction(true);
    1.80 +	a->addTo (tb);
    1.81 +	actionModModeCopy=a;
    1.82  }
    1.83  
    1.84  // Flag Actions