1.10.0
authorinsilmaril
Thu, 09 Aug 2007 18:34:08 +0000
changeset 582a4c3dd0e48de
parent 581 eaa3798cc33a
child 583 8b7e0d5a25e9
1.10.0
demos/vym-projectplan.vym
mainwindow.cpp
mainwindow.h
     1.1 Binary file demos/vym-projectplan.vym has changed
     2.1 --- a/mainwindow.cpp	Thu Aug 09 18:34:07 2007 +0000
     2.2 +++ b/mainwindow.cpp	Thu Aug 09 18:34:08 2007 +0000
     2.3 @@ -1071,43 +1071,34 @@
     2.4  void Main::setupFlagActions()
     2.5  {
     2.6  	// Create System Flags
     2.7 +	QToolBar *tb=NULL;
     2.8 +	bool avis=true;
     2.9 +
    2.10  	systemFlagsDefault = new FlagRowObj ();
    2.11  	systemFlagsDefault->setVisibility (false);
    2.12  	systemFlagsDefault->setName ("systemFlagsDef");
    2.13  
    2.14  	FlagObj *fo = new FlagObj ();
    2.15  	fo->load(QPixmap(flagsPath+"flag-note.png"));
    2.16 -	fo->setName("note");
    2.17 -	fo->setToolTip(tr("Note","Systemflag"));
    2.18 -	systemFlagsDefault->addFlag (fo);	// makes deep copy
    2.19 +	setupFlag (fo,tb,avis,"note",tr("Note","SystemFlag"));
    2.20  
    2.21  	fo->load(QPixmap(flagsPath+"flag-url.png"));
    2.22 -	fo->setName("url");
    2.23 -	fo->setToolTip(tr("WWW Document (external)","Systemflag"));
    2.24 -	systemFlagsDefault->addFlag (fo);
    2.25 +	setupFlag (fo,tb,avis,"url",tr("URL to Document ","SystemFlag"));
    2.26  	
    2.27  	fo->load(QPixmap(flagsPath+"flag-vymlink.png"));
    2.28 -	fo->setName("vymLink");
    2.29 -	fo->setToolTip(tr("Link to another vym map","Systemflag"));
    2.30 -	systemFlagsDefault->addFlag (fo);	
    2.31 +	setupFlag (fo,tb,avis,"vymLink",tr("Link to another vym map","SystemFlag"));
    2.32  
    2.33  	fo->load(QPixmap(flagsPath+"flag-scrolled-right.png"));
    2.34 -	fo->setName("scrolledright");
    2.35 -	fo->setToolTip(tr("subtree is scrolled","Systemflag"));
    2.36 -	systemFlagsDefault->addFlag (fo);
    2.37 +	setupFlag (fo,tb,avis,"scrolledright",tr("subtree is scrolled","SystemFlag"));
    2.38  	
    2.39  	fo->load(QPixmap(flagsPath+"flag-tmpUnscrolled-right.png"));
    2.40 -	fo->setName("tmpUnscrolledright");
    2.41 -	fo->setToolTip(tr("subtree is temporary scrolled","Systemflag"));
    2.42 -	systemFlagsDefault->addFlag (fo);
    2.43 +	setupFlag (fo,tb,avis,"tmpUnscrolledright",tr("subtree is temporary scrolled","SystemFlag"));
    2.44  
    2.45  	fo->load(QPixmap(flagsPath+"flag-hideexport.png"));
    2.46 -	fo->setName("hideInExport");
    2.47 -	fo->setToolTip(tr("Hide object in exported maps","Systemflag"));
    2.48 -	systemFlagsDefault->addFlag (fo);
    2.49 +	setupFlag (fo,tb,avis,"hideInExport",tr("Hide object in exported maps","SystemFlag"));
    2.50  
    2.51  	// Create Standard Flags
    2.52 -	QToolBar *tb=addToolBar (tr ("Standard Flags","Standard Flag Toolbar"));
    2.53 +	tb=addToolBar (tr ("Standard Flags","Standard Flag Toolbar"));
    2.54  	tb->setObjectName ("standardFlagTB");
    2.55  
    2.56  	standardFlagsDefault = new FlagRowObj ();
    2.57 @@ -1116,336 +1107,192 @@
    2.58  	standardFlagsDefault->setToolBar (tb);
    2.59  
    2.60  	fo->load(flagsPath+"flag-exclamationmark.png");
    2.61 -	fo->setName ("exclamationmark");
    2.62  	fo->setGroup("standard-mark");
    2.63 -	QAction *a=new QAction (fo->getPixmap(),fo->getName(),this);
    2.64 -	tb->addAction (a);
    2.65 -	fo->setAction (a);
    2.66 -	a->setCheckable(true);
    2.67 -	a->setObjectName(fo->getName());
    2.68 -	a->setToolTip(tr("Take care!","Standardflag"));
    2.69 -	connect (a, SIGNAL( triggered() ), this, SLOT( standardFlagChanged() ) );
    2.70 -	standardFlagsDefault->addFlag (fo);	// makes deep copy
    2.71 +	setupFlag (fo,tb,avis,"exclamationmark",tr("Take care!","Standardflag"));
    2.72  	
    2.73  	fo->load(flagsPath+"flag-questionmark.png");
    2.74 -	fo->setName("questionmark");
    2.75  	fo->setGroup("standard-mark");
    2.76 -	a=new QAction (fo->getPixmap(),fo->getName(),this);
    2.77 -	tb->addAction (a);
    2.78 -	fo->setAction (a);
    2.79 -	a->setCheckable(true);
    2.80 -	a->setObjectName(fo->getName());
    2.81 -	a->setToolTip(tr("Really?","Standardflag"));
    2.82 -	connect (a, SIGNAL( triggered() ), this, SLOT( standardFlagChanged() ) );
    2.83 -	standardFlagsDefault->addFlag (fo);	
    2.84 +	setupFlag (fo,tb,avis,"questionmark",tr("Really?","Standardflag"));
    2.85  
    2.86  	fo->load(flagsPath+"flag-hook-green.png");
    2.87 -	fo->setName("hook-green");
    2.88  	fo->setGroup("standard-hook");
    2.89 -	a=new QAction (fo->getPixmap(),fo->getName(),this);
    2.90 -	tb->addAction (a);
    2.91 -	fo->setAction (a);
    2.92 -	a->setCheckable(true);
    2.93 -	a->setObjectName(fo->getName());
    2.94 -	a->setToolTip(tr("ok!","Standardflag"));
    2.95 -	connect (a, SIGNAL( triggered() ), this, SLOT( standardFlagChanged() ) );
    2.96 -	standardFlagsDefault->addFlag (fo);	
    2.97 +	setupFlag (fo,tb,avis,"hook-green",tr("ok!","Standardflag"));
    2.98  
    2.99  	fo->load(flagsPath+"flag-cross-red.png");
   2.100 -	fo->setName("cross-red");
   2.101  	fo->setGroup("standard-hook");
   2.102 -	a=new QAction (fo->getPixmap(),fo->getName(),this);
   2.103 -	tb->addAction (a);
   2.104 -	fo->setAction (a);
   2.105 -	a->setCheckable(true);
   2.106 -	a->setObjectName(fo->getName());
   2.107 -	a->setToolTip(tr("Not ok!","Standardflag"));
   2.108 -	connect (a, SIGNAL( triggered() ), this, SLOT( standardFlagChanged() ) );
   2.109 -	standardFlagsDefault->addFlag (fo);	
   2.110 +	setupFlag (fo,tb,avis,"cross-red",tr("Not ok!","Standardflag"));
   2.111 +	fo->unsetGroup();
   2.112  
   2.113  	fo->load(flagsPath+"flag-stopsign.png");
   2.114 -	fo->setName("stopsign");
   2.115 -	a=new QAction (fo->getPixmap(),fo->getName(),this);
   2.116 -	tb->addAction (a);
   2.117 -	fo->setAction (a);
   2.118 -	a->setCheckable(true);
   2.119 -	a->setObjectName(fo->getName());
   2.120 -	a->setToolTip(tr("This won't work!","Standardflag"));
   2.121 -	connect (a, SIGNAL( triggered() ), this, SLOT( standardFlagChanged() ) );
   2.122 -	standardFlagsDefault->addFlag (fo);	
   2.123 +	setupFlag (fo,tb,avis,"stopsign",tr("This won't work!","Standardflag"));
   2.124  
   2.125  	fo->load(flagsPath+"flag-smiley-good.png");
   2.126 -	fo->setName("smiley-good");
   2.127  	fo->setGroup("standard-smiley");
   2.128 -	a=new QAction (fo->getPixmap(),fo->getName(),this);
   2.129 -	tb->addAction (a);
   2.130 -	fo->setAction (a);
   2.131 -	a->setCheckable(true);
   2.132 -	a->setObjectName(fo->getName());
   2.133 -	a->setToolTip(tr("Good","Standardflag"));
   2.134 -	connect (a, SIGNAL( triggered() ), this, SLOT( standardFlagChanged() ) );
   2.135 -	standardFlagsDefault->addFlag (fo);	
   2.136 +	setupFlag (fo,tb,avis,"smiley-good",tr("Good","Standardflag"));
   2.137  
   2.138  	fo->load(flagsPath+"flag-smiley-sad.png");
   2.139 -	fo->setName("smiley-sad");
   2.140  	fo->setGroup("standard-smiley");
   2.141 -	a=new QAction (fo->getPixmap(),fo->getName(),this);
   2.142 -	tb->addAction (a);
   2.143 -	fo->setAction (a);
   2.144 -	a->setCheckable(true);
   2.145 -	a->setObjectName(fo->getName());
   2.146 -	a->setToolTip(tr("Bad","Standardflag"));
   2.147 -	connect (a, SIGNAL( triggered() ), this, SLOT( standardFlagChanged() ) );
   2.148 -	standardFlagsDefault->addFlag (fo);	
   2.149  
   2.150  	fo->load(flagsPath+"flag-smiley-omg.png");
   2.151 +	fo->setGroup("standard-smiley");
   2.152 +	setupFlag (fo,tb,avis,"smiley-omb",tr("Oh no!","Standardflag"));
   2.153  	// Original omg.png (in KDE emoticons)
   2.154 -	fo->setName("smiley-omg");
   2.155 -	fo->setGroup("standard-smiley");
   2.156 -	a=new QAction (fo->getPixmap(),fo->getName(),this);
   2.157 -	tb->addAction (a);
   2.158 -	fo->setAction (a);
   2.159 -	a->setCheckable(true);
   2.160 -	a->setObjectName(fo->getName());
   2.161 -	a->setToolTip(tr("Oh no!","Standardflag"));
   2.162 -	connect (a, SIGNAL( triggered() ), this, SLOT( standardFlagChanged() ) );
   2.163 -	standardFlagsDefault->addFlag (fo);	
   2.164 +	fo->unsetGroup();
   2.165  
   2.166  	fo->load(flagsPath+"flag-kalarm.png");
   2.167 -	fo->setName("clock");
   2.168 -	a=new QAction (fo->getPixmap(),fo->getName(),this);
   2.169 -	tb->addAction (a);
   2.170 -	fo->setAction (a);
   2.171 -	a->setCheckable(true);
   2.172 -	a->setObjectName(fo->getName());
   2.173 -	a->setToolTip(tr("Time critical","Standardflag"));
   2.174 -	connect (a, SIGNAL( triggered() ), this, SLOT( standardFlagChanged() ) );
   2.175 -	standardFlagsDefault->addFlag (fo);	
   2.176 +	setupFlag (fo,tb,avis,"clock",tr("Time critical","Standardflag"));
   2.177  
   2.178  	fo->load(flagsPath+"flag-phone.png");
   2.179 -	fo->setName("phone");
   2.180 -	a=new QAction (fo->getPixmap(),fo->getName(),this);
   2.181 -	tb->addAction (a);
   2.182 -	fo->setAction (a);
   2.183 -	a->setCheckable(true);
   2.184 -	a->setObjectName(fo->getName());
   2.185 -	a->setToolTip(tr("Call...","Standardflag"));
   2.186 -	connect (a, SIGNAL( triggered() ), this, SLOT( standardFlagChanged() ) );
   2.187 -	standardFlagsDefault->addFlag (fo);	
   2.188 +	setupFlag (fo,tb,avis,"phone",tr("Call...","Standardflag"));
   2.189  
   2.190  	fo->load(flagsPath+"flag-lamp.png");
   2.191 -	fo->setName("lamp");
   2.192 -	a=new QAction (fo->getPixmap(),fo->getName(),this);
   2.193 -	tb->addAction (a);
   2.194 -	fo->setAction (a);
   2.195 -	a->setCheckable(true);
   2.196 -	a->setObjectName(fo->getName());
   2.197 -	a->setToolTip(tr("Idea!","Standardflag"));
   2.198 -	connect (a, SIGNAL( triggered() ), this, SLOT( standardFlagChanged() ) );
   2.199 -	standardFlagsDefault->addFlag (fo);	
   2.200 +	setupFlag (fo,tb,avis,"lamp",tr("Idea!","Standardflag"));
   2.201  
   2.202  	fo->load(flagsPath+"flag-arrow-up.png");
   2.203 -	fo->setName("arrow-up");
   2.204  	fo->setGroup("standard-arrow");
   2.205 -	a=new QAction (fo->getPixmap(),fo->getName(),this);
   2.206 -	tb->addAction (a);
   2.207 -	fo->setAction (a);
   2.208 -	a->setCheckable(true);
   2.209 -	a->setObjectName(fo->getName());
   2.210 -	a->setToolTip(tr("Important","Standardflag"));
   2.211 -	connect (a, SIGNAL( triggered() ), this, SLOT( standardFlagChanged() ) );
   2.212 -	standardFlagsDefault->addFlag (fo);	
   2.213 +	setupFlag (fo,tb,avis,"arrow-up",tr("Important","Standardflag"));
   2.214  
   2.215  	fo->load(flagsPath+"flag-arrow-down.png");
   2.216 -	fo->setName("arrow-down");
   2.217  	fo->setGroup("standard-arrow");
   2.218 -	a=new QAction (fo->getPixmap(),fo->getName(),this);
   2.219 -	tb->addAction (a);
   2.220 -	fo->setAction (a);
   2.221 -	a->setCheckable(true);
   2.222 -	a->setObjectName(fo->getName());
   2.223 -	a->setToolTip(tr("Unimportant","Standardflag"));
   2.224 -	connect (a, SIGNAL( triggered() ), this, SLOT( standardFlagChanged() ) );
   2.225 -	standardFlagsDefault->addFlag (fo);	
   2.226 +	setupFlag (fo,tb,avis,"arrow-down",tr("Unimportant","Standardflag"));
   2.227  
   2.228  	fo->load(flagsPath+"flag-arrow-2up.png");
   2.229 -	fo->setName("2arrow-up");
   2.230  	fo->setGroup("standard-arrow");
   2.231 -	a=new QAction (fo->getPixmap(),fo->getName(),this);
   2.232 -	tb->addAction (a);
   2.233 -	fo->setAction (a);
   2.234 -	a->setCheckable(true);
   2.235 -	a->setObjectName(fo->getName());
   2.236 -	a->setToolTip(tr("Very important!","Standardflag"));
   2.237 -	connect (a, SIGNAL( triggered() ), this, SLOT( standardFlagChanged() ) );
   2.238 -	standardFlagsDefault->addFlag (fo);	
   2.239 +	setupFlag (fo,tb,avis,"2arrow-up",tr("Very important!","Standardflag"));
   2.240  
   2.241  	fo->load(flagsPath+"flag-arrow-2down.png");
   2.242 -	fo->setName("2arrow-down");
   2.243  	fo->setGroup("standard-arrow");
   2.244 -	a=new QAction (fo->getPixmap(),fo->getName(),this);
   2.245 -	tb->addAction (a);
   2.246 -	fo->setAction (a);
   2.247 -	a->setCheckable(true);
   2.248 -	a->setObjectName(fo->getName());
   2.249 -	a->setToolTip(tr("Very unimportant!","Standardflag"));
   2.250 -	connect (a, SIGNAL( triggered() ), this, SLOT( standardFlagChanged() ) );
   2.251 -	standardFlagsDefault->addFlag (fo);	
   2.252 +	setupFlag (fo,tb,avis,"present",tr("Very unimportant!","Standardflag"));
   2.253 +	fo->unsetGroup();
   2.254  
   2.255  	fo->load(flagsPath+"flag-thumb-up.png");
   2.256 -	fo->setName("thumb-up");
   2.257  	fo->setGroup("standard-thumb");
   2.258 -	a=new QAction (fo->getPixmap(),fo->getName(),this);
   2.259 -	tb->addAction (a);
   2.260 -	fo->setAction (a);
   2.261 -	a->setCheckable(true);
   2.262 -	a->setObjectName(fo->getName());
   2.263 -	a->setToolTip(tr("I like this","Standardflag"));
   2.264 -	connect (a, SIGNAL( triggered() ), this, SLOT( standardFlagChanged() ) );
   2.265 -	standardFlagsDefault->addFlag (fo);	
   2.266 +	setupFlag (fo,tb,avis,"thumb-up",tr("I like this","Standardflag"));
   2.267  
   2.268  	fo->load(flagsPath+"flag-thumb-down.png");
   2.269 -	fo->setName("thumb-down");
   2.270  	fo->setGroup("standard-thumb");
   2.271 -	a=new QAction (fo->getPixmap(),fo->getName(),this);
   2.272 -	tb->addAction (a);
   2.273 -	fo->setAction (a);
   2.274 -	a->setCheckable(true);
   2.275 -	a->setObjectName(fo->getName());
   2.276 -	a->setToolTip(tr("I do not like this","Standardflag"));
   2.277 -	connect (a, SIGNAL( triggered() ), this, SLOT( standardFlagChanged() ) );
   2.278 -	standardFlagsDefault->addFlag (fo);	
   2.279 +	setupFlag (fo,tb,avis,"thumb-down",tr("I do not like this","Standardflag"));
   2.280 +	fo->unsetGroup();
   2.281  	
   2.282  	fo->load(flagsPath+"flag-rose.png");
   2.283 -	fo->setName("rose");
   2.284 -	a=new QAction (fo->getPixmap(),fo->getName(),this);
   2.285 -	tb->addAction (a);
   2.286 -	fo->setAction (a);
   2.287 -	a->setCheckable(true);
   2.288 -	a->setObjectName(fo->getName());
   2.289 -	a->setToolTip(tr("Rose","Standardflag"));
   2.290 -	connect (a, SIGNAL( triggered() ), this, SLOT( standardFlagChanged() ) );
   2.291 -	standardFlagsDefault->addFlag (fo);	
   2.292 +	setupFlag (fo,tb,avis,"rose",tr("Rose","Standardflag"));
   2.293  
   2.294  	fo->load(flagsPath+"flag-heart.png");
   2.295 -	fo->setName("heart");
   2.296 -	a=new QAction (fo->getPixmap(),fo->getName(),this);
   2.297 -	tb->addAction (a);
   2.298 -	a->setCheckable(true);
   2.299 -	a->setObjectName(fo->getName());
   2.300 -	a->setToolTip(tr("I just love... ","Standardflag"));
   2.301 -	connect (a, SIGNAL( triggered() ), this, SLOT( standardFlagChanged() ) );
   2.302 -	standardFlagsDefault->addFlag (fo);	
   2.303 -
   2.304 +	setupFlag (fo,tb,avis,"heart",tr("I just love...","Standardflag"));
   2.305  
   2.306  	fo->load(flagsPath+"flag-present.png");
   2.307 -	setupFlag (fo,tb,"present",tr("Surprise!","Standardflag"));
   2.308 +	setupFlag (fo,tb,avis,"present",tr("Surprise!","Standardflag"));
   2.309  
   2.310  	fo->load(flagsPath+"flag-flash.png");
   2.311 -	setupFlag (fo,tb,"flash",tr("Dangerous","Standardflag"));
   2.312 +	setupFlag (fo,tb,avis,"flash",tr("Dangerous","Standardflag"));
   2.313  	
   2.314  	// Original: xsldbg_output.png
   2.315  	fo->load(flagsPath+"flag-info.png");
   2.316 -	setupFlag (fo,tb,"info",tr("Info","Standardflag"));
   2.317 +	setupFlag (fo,tb,avis,"info",tr("Info","Standardflag"));
   2.318  
   2.319  	// Original khelpcenter.png
   2.320  	fo->load(flagsPath+"flag-lifebelt.png");
   2.321 -	setupFlag (fo,tb,"lifebelt",tr("This will help","Standardflag"));
   2.322 +	setupFlag (fo,tb,avis,"lifebelt",tr("This will help","Standardflag"));
   2.323  
   2.324  	// Freemind flags
   2.325  
   2.326 +	avis=false;
   2.327 +
   2.328  	fo->load(flagsPath+"freemind/warning.png");
   2.329 -	setupFlag (fo,tb,"freemind-warning",tr("Important","Freemind-Flag"));
   2.330 +	setupFlag (fo,tb, avis, "freemind-warning",tr("Important","Freemind-Flag"));
   2.331  
   2.332  	for (int i=1; i<8; i++)
   2.333  	{
   2.334  		fo->load(flagsPath+QString("freemind/priority-%1.png").arg(i));
   2.335 -		setupFlag (fo,tb,QString("freemind-priority-%1").arg(i),tr("Priority","Freemind-Flag"));
   2.336 +		setupFlag (fo,tb, avis,QString("freemind-priority-%1").arg(i),tr("Priority","Freemind-Flag"));
   2.337  	}
   2.338  
   2.339  	fo->load(flagsPath+"freemind/back.png");
   2.340 -	setupFlag (fo,tb,"freemind-back",tr("Back","Freemind-Flag"));
   2.341 +	setupFlag (fo,tb,avis,"freemind-back",tr("Back","Freemind-Flag"));
   2.342  
   2.343  	fo->load(flagsPath+"freemind/forward.png");
   2.344 -	setupFlag (fo,tb,"freemind-forward",tr("Forward","Freemind-Flag"));
   2.345 -
   2.346 +	setupFlag (fo,tb,avis,"freemind-forward",tr("Forward","Freemind-Flag"));
   2.347  
   2.348  	fo->load(flagsPath+"freemind/attach.png");
   2.349 -	setupFlag (fo,tb,"freemind-attach",tr("Look here","Freemind-Flag"));
   2.350 -
   2.351 +	setupFlag (fo,tb,avis,"freemind-attach",tr("Look here","Freemind-Flag"));
   2.352  
   2.353  	fo->load(flagsPath+"freemind/clanbomber.png");
   2.354 -	setupFlag (fo,tb,"freemind-clanbomber",tr("Dangerous","Freemind-Flag"));
   2.355 -
   2.356 +	setupFlag (fo,tb,avis,"freemind-clanbomber",tr("Dangerous","Freemind-Flag"));
   2.357  
   2.358  	fo->load(flagsPath+"freemind/desktopnew.png");
   2.359 -	setupFlag (fo,tb,"freemind-desktopnew",tr("Don't forget","Freemind-Flag"));
   2.360 -
   2.361 +	setupFlag (fo,tb,avis,"freemind-desktopnew",tr("Don't forget","Freemind-Flag"));
   2.362  
   2.363  	fo->load(flagsPath+"freemind/flag.png");
   2.364 -	setupFlag (fo,tb,"freemind-flag",tr("Flag","Freemind-Flag"));
   2.365 +	setupFlag (fo,tb,avis,"freemind-flag",tr("Flag","Freemind-Flag"));
   2.366  
   2.367  
   2.368  	fo->load(flagsPath+"freemind/gohome.png");
   2.369 -	setupFlag (fo,tb,"freemind-gohome",tr("Home","Freemind-Flag"));
   2.370 +	setupFlag (fo,tb,avis,"freemind-gohome",tr("Home","Freemind-Flag"));
   2.371  
   2.372  
   2.373  	fo->load(flagsPath+"freemind/kaddressbook.png");
   2.374 -	setupFlag (fo,tb,"freemind-kaddressbook",tr("Telephone","Freemind-Flag"));
   2.375 -
   2.376 +	setupFlag (fo,tb,avis,"freemind-kaddressbook",tr("Telephone","Freemind-Flag"));
   2.377  
   2.378  	fo->load(flagsPath+"freemind/knotify.png");
   2.379 -	setupFlag (fo,tb,"freemind-knotify",tr("Music","Freemind-Flag"));
   2.380 -
   2.381 +	setupFlag (fo,tb,avis,"freemind-knotify",tr("Music","Freemind-Flag"));
   2.382  
   2.383  	fo->load(flagsPath+"freemind/korn.png");
   2.384 -	setupFlag (fo,tb,"freemind-korn",tr("Mailbox","Freemind-Flag"));
   2.385 -
   2.386 +	setupFlag (fo,tb,avis,"freemind-korn",tr("Mailbox","Freemind-Flag"));
   2.387  
   2.388  	fo->load(flagsPath+"freemind/mail.png");
   2.389 -	setupFlag (fo,tb,"freemind-mail",tr("Maix","Freemind-Flag"));
   2.390 +	setupFlag (fo,tb,avis,"freemind-mail",tr("Maix","Freemind-Flag"));
   2.391  
   2.392  	fo->load(flagsPath+"freemind/password.png");
   2.393 -	setupFlag (fo,tb,"freemind-password",tr("Password","Freemind-Flag"));
   2.394 +	setupFlag (fo,tb,avis,"freemind-password",tr("Password","Freemind-Flag"));
   2.395  
   2.396  	fo->load(flagsPath+"freemind/pencil.png");
   2.397 -	setupFlag (fo,tb,"freemind-pencil",tr("To be improved","Freemind-Flag"));
   2.398 +	setupFlag (fo,tb,avis,"freemind-pencil",tr("To be improved","Freemind-Flag"));
   2.399  
   2.400  	fo->load(flagsPath+"freemind/stop.png");
   2.401 -	setupFlag (fo,tb,"freemind-stop",tr("Stop","Freemind-Flag"));
   2.402 +	setupFlag (fo,tb,avis,"freemind-stop",tr("Stop","Freemind-Flag"));
   2.403  
   2.404  	fo->load(flagsPath+"freemind/wizard.png");
   2.405 -	setupFlag (fo,tb,"freemind-wizard",tr("Magic","Freemind-Flag"));
   2.406 +	setupFlag (fo,tb,avis,"freemind-wizard",tr("Magic","Freemind-Flag"));
   2.407  
   2.408  	fo->load(flagsPath+"freemind/xmag.png");
   2.409 -	setupFlag (fo,tb,"freemind-xmag",tr("To be discussed","Freemind-Flag"));
   2.410 +	setupFlag (fo,tb,avis,"freemind-xmag",tr("To be discussed","Freemind-Flag"));
   2.411  
   2.412  	fo->load(flagsPath+"freemind/bell.png");
   2.413 -	setupFlag (fo,tb,"freemind-bell",tr("Reminder","Freemind-Flag"));
   2.414 +	setupFlag (fo,tb,avis,"freemind-bell",tr("Reminder","Freemind-Flag"));
   2.415  
   2.416  	fo->load(flagsPath+"freemind/bookmark.png");
   2.417 -	setupFlag (fo,tb,"freemind-bookmark",tr("Excellent","Freemind-Flag"));
   2.418 +	setupFlag (fo,tb,avis,"freemind-bookmark",tr("Excellent","Freemind-Flag"));
   2.419  
   2.420  	fo->load(flagsPath+"freemind/penguin.png");
   2.421 -	setupFlag (fo,tb,"freemind-penguin",tr("Linux","Freemind-Flag"));
   2.422 +	setupFlag (fo,tb,avis,"freemind-penguin",tr("Linux","Freemind-Flag"));
   2.423  
   2.424  	fo->load(flagsPath+"freemind/licq.png");
   2.425 -	setupFlag (fo,tb,"freemind-licq",tr("Sweet","Freemind-Flag"));
   2.426 +	setupFlag (fo,tb,avis,"freemind-licq",tr("Sweet","Freemind-Flag"));
   2.427  
   2.428  	delete (fo);
   2.429  }
   2.430  
   2.431 -void Main::setupFlag (FlagObj *fo, QToolBar *tb, const QString &name, const QString &tooltip)
   2.432 +void Main::setupFlag (FlagObj *fo, QToolBar *tb, bool aw, const QString &name, const QString &tooltip)
   2.433  {
   2.434  	fo->setName(name);
   2.435 +	fo->setToolTip (tooltip);
   2.436  	QAction *a=new QAction (fo->getPixmap(),fo->getName(),this);
   2.437 -	tb->addAction (a);
   2.438 -	fo->setAction (a);
   2.439 -	a->setCheckable(true);
   2.440 -	a->setObjectName(fo->getName());
   2.441 -	a->setToolTip(tooltip);
   2.442 -	connect (a, SIGNAL( triggered() ), this, SLOT( standardFlagChanged() ) );
   2.443 -	standardFlagsDefault->addFlag (fo);	
   2.444 +	if (tb)
   2.445 +	{
   2.446 +		// StandardFlag
   2.447 +		tb->addAction (a);
   2.448 +		fo->setAction (a);
   2.449 +		fo->setAlwaysVisible(aw);
   2.450 +		a->setCheckable(true);
   2.451 +		a->setObjectName(fo->getName());
   2.452 +		a->setToolTip(tooltip);
   2.453 +		connect (a, SIGNAL( triggered() ), this, SLOT( standardFlagChanged() ) );
   2.454 +		standardFlagsDefault->addFlag (fo);	
   2.455 +	} else
   2.456 +	{
   2.457 +		// SystemFlag
   2.458 +		systemFlagsDefault->addFlag (fo);	
   2.459 +	}
   2.460  }
   2.461  // Network Actions
   2.462  void Main::setupNetworkActions()
     3.1 --- a/mainwindow.h	Thu Aug 09 18:34:07 2007 +0000
     3.2 +++ b/mainwindow.h	Thu Aug 09 18:34:08 2007 +0000
     3.3 @@ -44,7 +44,7 @@
     3.4      void setupViewActions();
     3.5      void setupModeActions();
     3.6      void setupWindowActions();
     3.7 -    void setupFlag(FlagObj *fo, QToolBar *tb, const QString &name, const QString &tooltip);
     3.8 +    void setupFlag(FlagObj *fo, QToolBar *tb, bool aw, const QString &name, const QString &tooltip);
     3.9      void setupFlagActions();
    3.10      void setupNetworkActions();
    3.11      void setupSettingsActions();