1.1 --- a/mainwindow.cpp Tue Jun 06 14:58:11 2006 +0000
1.2 +++ b/mainwindow.cpp Tue Jun 13 08:49:12 2006 +0000
1.3 @@ -1,9 +1,11 @@
1.4 +#include <QtGui>
1.5 +
1.6 #include "mainwindow.h"
1.7
1.8 -#include <qstatusbar.h>
1.9 -#include <qmessagebox.h>
1.10 -#include <qmenubar.h>
1.11 -#include <qapplication.h>
1.12 +//#include <qstatusbar.h>
1.13 +//#include <qmessagebox.h>
1.14 +//#include <qmenubar.h>
1.15 +//#include <qapplication.h>
1.16 #include <qpainter.h>
1.17 #include <qprinter.h>
1.18 #include <qfile.h>
1.19 @@ -19,7 +21,7 @@
1.20 #include <QShowEvent>
1.21 #include <QHideEvent>
1.22 #include <Q3PopupMenu>
1.23 -#include <Q3ActionGroup>
1.24 +#include <QActionGroup>
1.25 #include <Q3PtrList>
1.26 //#include <qdatetime.h> // for random seed
1.27
1.28 @@ -101,16 +103,16 @@
1.29 extern QAction *actionFormatIncludeImagesVer;
1.30 extern QAction *actionFormatIncludeImagesHor;
1.31
1.32 -extern Q3ActionGroup* actionGroupModModes;
1.33 +extern QActionGroup* actionGroupModModes;
1.34 extern QAction* actionModModeColor;
1.35 extern QAction* actionModModeLink;
1.36 extern QAction* actionModModeCopy;
1.37
1.38 -extern Q3ActionGroup *actionGroupFormatFrameTypes;
1.39 +extern QActionGroup *actionGroupFormatFrameTypes;
1.40 extern QAction *actionFormatFrameNone;
1.41 extern QAction *actionFormatFrameRectangle;
1.42
1.43 -extern Q3ActionGroup *actionGroupFormatLinkStyles;
1.44 +extern QActionGroup *actionGroupFormatLinkStyles;
1.45 extern QAction *actionFormatLinkStyleLine;
1.46 extern QAction *actionFormatLinkStyleParabel;
1.47 extern QAction *actionFormatLinkStylePolyLine;
1.48 @@ -150,7 +152,7 @@
1.49 extern QString flagsPath;
1.50
1.51 Main::Main(QWidget* parent, const char* name, Qt::WFlags f) :
1.52 - Q3MainWindow(parent,name,f)
1.53 + QMainWindow(parent,name,f)
1.54 {
1.55 mainWindow=this;
1.56
1.57 @@ -319,8 +321,7 @@
1.58 // File Actions
1.59 void Main::setupFileActions()
1.60 {
1.61 - Q3ToolBar *tb = new Q3ToolBar( this );
1.62 - tb->setLabel( "File Actions" );
1.63 + QToolBar *tb = addToolBar( tr ("&File") );
1.64 Q3PopupMenu *menu = new Q3PopupMenu( this );
1.65 menuBar()->insertItem( tr( "&File" ), menu );
1.66
1.67 @@ -418,7 +419,7 @@
1.68 //Edit Actions
1.69 void Main::setupEditActions()
1.70 {
1.71 - Q3ToolBar *tb = new Q3ToolBar( this );
1.72 + QToolBar *tb = addToolBar( tr ("&Edit") );
1.73 tb->setLabel( "Edit Actions" );
1.74 Q3PopupMenu *menu = new Q3PopupMenu( this );
1.75 menuBar()->insertItem( tr( "&Edit" ), menu );
1.76 @@ -607,24 +608,28 @@
1.77 menu->insertSeparator();
1.78
1.79 // Shortcuts to modify heading:
1.80 + /*
1.81 a = new QAction(tr( "Edit heading" ),this);
1.82 a->setStatusTip ( tr( "edit Heading" ));
1.83 - a->setShortcut ( Qt::Key_Enter );
1.84 - connect( a, SIGNAL( activated() ), this, SLOT( editHeading() ) );
1.85 + a->setShortcut ( Qt::Key_Enter);
1.86 + connect( a, SIGNAL( triggered() ), this, SLOT( editHeading() ) );
1.87 actionListBranches.append(a);
1.88 + */
1.89 a = new QAction( tr( "Edit heading" ), this);
1.90 a->setStatusTip (tr( "edit Heading" ));
1.91 a->setShortcut (Qt::Key_Return );
1.92 connect( a, SIGNAL( activated() ), this, SLOT( editHeading() ) );
1.93 - actionListBranches.append(a);
1.94 + //actionListBranches.append(a);
1.95 + a->addTo( menu );
1.96 actionEditHeading=a;
1.97 + /*
1.98 a = new QAction( tr( "Edit heading" ),this);
1.99 a->setStatusTip (tr( "edit Heading" ));
1.100 a->setShortcut ( Qt::Key_F2 );
1.101 connect( a, SIGNAL( activated() ), this, SLOT( editHeading() ) );
1.102 a->setEnabled (false);
1.103 - actionEditHeading=a;
1.104 actionListBranches.append(a);
1.105 + */
1.106
1.107 // Shortcut to delete selection
1.108 a = new QAction( tr( "Delete Selection" ),this);
1.109 @@ -638,11 +643,11 @@
1.110 alt = new QAction(tr( "Add branch as child" ), this);
1.111 alt->setStatusTip ( tr( "Add a branch as child of selection" ));
1.112 alt->setShortcut (Qt::Key_A);
1.113 - connect( alt, SIGNAL( activated() ), this, SLOT( editNewBranch() ) );
1.114 + connect( alt, SIGNAL( activated() ), this, SLOT( editNewBranch() ) );
1.115 a = new QAction(tr( "Add branch as child" ), this);
1.116 a->setStatusTip ( tr( "Add a branch as child of selection" ));
1.117 a->setShortcut (Qt::Key_Insert);
1.118 - a->setEnabled (false);
1.119 +// a->setEnabled (false);
1.120 connect( a, SIGNAL( activated() ), this, SLOT( editNewBranch() ) );
1.121 actionListBranches.append(a);
1.122 #if defined (Q_OS_MACX)
1.123 @@ -783,7 +788,7 @@
1.124 Q3PopupMenu *menu = new Q3PopupMenu( this );
1.125 menuBar()->insertItem( tr( "F&ormat" ), menu );
1.126
1.127 - Q3ToolBar *tb = new Q3ToolBar( this );
1.128 + QToolBar *tb = addToolBar( tr("Format Actions","Toolbars"));
1.129 QAction *a;
1.130 QPixmap pix( 16,16);
1.131 pix.fill (Qt::black);
1.132 @@ -824,7 +829,7 @@
1.133 actionFormatColorSubtree=a;
1.134
1.135 menu->insertSeparator();
1.136 - actionGroupFormatLinkStyles=new Q3ActionGroup ( this, "formatLinkStyles");
1.137 + actionGroupFormatLinkStyles=new QActionGroup ( this);
1.138 actionGroupFormatLinkStyles->setExclusive (true);
1.139 a= new QAction( tr( "Linkstyle Line" ), actionGroupFormatLinkStyles);
1.140 a->setStatusTip (tr( "Line" ));
1.141 @@ -848,7 +853,7 @@
1.142 actionFormatLinkStylePolyParabel=a;
1.143 actionGroupFormatLinkStyles->addTo (menu);
1.144
1.145 - actionGroupFormatFrameTypes=new Q3ActionGroup ( this, "formatFrameTypes");
1.146 + actionGroupFormatFrameTypes=new QActionGroup ( this);
1.147 actionGroupFormatFrameTypes->setExclusive (true);
1.148 a = new QAction( tr( "No Frame" ), actionGroupFormatFrameTypes );
1.149 a->setStatusTip (tr("No Frame"));
1.150 @@ -904,7 +909,7 @@
1.151 // View Actions
1.152 void Main::setupViewActions()
1.153 {
1.154 - Q3ToolBar *tb = new Q3ToolBar( this );
1.155 + QToolBar *tb = addToolBar( tr("View Actions","Toolbars") );
1.156 tb->setLabel( "View Actions" );
1.157 Q3PopupMenu *menu = new Q3PopupMenu( this );
1.158 menuBar()->insertItem( tr( "&View" ), menu );
1.159 @@ -972,10 +977,9 @@
1.160 //QPopupMenu *menu = new QPopupMenu( this );
1.161 //menuBar()->insertItem( tr( "&Mode (using modifiers)" ), menu );
1.162
1.163 - Q3ToolBar *tb = new Q3ToolBar( this );
1.164 - tb->setLabel( tr ("Modes when using modifiers") );
1.165 + QToolBar *tb = addToolBar( tr ("Modes when using modifiers","Toolbars") );
1.166 QAction *a;
1.167 - actionGroupModModes=new Q3ActionGroup ( this, "formatLinkStyles");
1.168 + actionGroupModModes=new QActionGroup ( this);
1.169 actionGroupModModes->setExclusive (true);
1.170 a= new QAction( QPixmap(iconPath+"modecolor.png"), tr( "Use modifier to color branches" ), actionGroupModModes);
1.171 a->setShortcut (Qt::Key_J);
1.172 @@ -1040,145 +1044,282 @@
1.173 systemFlagsDefault->addFlag (fo);
1.174
1.175 // Create Standard Flags
1.176 + QToolBar *tb=addToolBar (tr ("Standard Flags","Standard Flag Toolbar"));
1.177 +
1.178 standardFlagsDefault = new FlagRowObj ();
1.179 standardFlagsDefault->setVisibility (false);
1.180 standardFlagsDefault->setName ("standardFlagsDef");
1.181 + standardFlagsDefault->setToolBar (tb);
1.182
1.183 fo->load(QPixmap(flagsPath+"flag-exclamationmark.png"));
1.184 fo->setName ("exclamationmark");
1.185 fo->setGroup("standard-mark");
1.186 - fo->setToolTip(tr("Take care!","Standardflag"));
1.187 + QAction *a=new QAction (fo->getPixmap(),fo->getName(),this);
1.188 + tb->addAction (a);
1.189 + fo->setAction (a);
1.190 + a->setCheckable(true);
1.191 + a->setObjectName(fo->getName());
1.192 + a->setToolTip(tr("Take care!","Standardflag"));
1.193 + connect (a, SIGNAL( activated() ), this, SLOT( standardFlagChanged() ) );
1.194 standardFlagsDefault->addFlag (fo); // makes deep copy
1.195
1.196 fo->load(QPixmap(flagsPath+"flag-questionmark.png"));
1.197 fo->setName("questionmark");
1.198 fo->setGroup("standard-mark");
1.199 - fo->setToolTip(tr("Really?","Standardflag"));
1.200 + a=new QAction (fo->getPixmap(),fo->getName(),this);
1.201 + tb->addAction (a);
1.202 + fo->setAction (a);
1.203 + a->setCheckable(true);
1.204 + a->setObjectName(fo->getName());
1.205 + a->setToolTip(tr("Really?","Standardflag"));
1.206 + connect (a, SIGNAL( activated() ), this, SLOT( standardFlagChanged() ) );
1.207 standardFlagsDefault->addFlag (fo);
1.208
1.209 fo->load(QPixmap(flagsPath+"flag-hook-green.png"));
1.210 fo->setName("hook-green");
1.211 fo->setGroup("standard-hook");
1.212 - fo->setToolTip(tr("ok!","Standardflag"));
1.213 + a=new QAction (fo->getPixmap(),fo->getName(),this);
1.214 + tb->addAction (a);
1.215 + fo->setAction (a);
1.216 + a->setCheckable(true);
1.217 + a->setObjectName(fo->getName());
1.218 + a->setToolTip(tr("ok!","Standardflag"));
1.219 + connect (a, SIGNAL( activated() ), this, SLOT( standardFlagChanged() ) );
1.220 standardFlagsDefault->addFlag (fo);
1.221
1.222 fo->load(QPixmap(flagsPath+"flag-cross-red.png"));
1.223 fo->setName("cross-red");
1.224 fo->setGroup("standard-hook");
1.225 - fo->setToolTip(tr("Not ok!","Standardflag"));
1.226 + a=new QAction (fo->getPixmap(),fo->getName(),this);
1.227 + tb->addAction (a);
1.228 + fo->setAction (a);
1.229 + a->setCheckable(true);
1.230 + a->setObjectName(fo->getName());
1.231 + a->setToolTip(tr("Not ok!","Standardflag"));
1.232 + connect (a, SIGNAL( activated() ), this, SLOT( standardFlagChanged() ) );
1.233 standardFlagsDefault->addFlag (fo);
1.234
1.235 fo->load(QPixmap(flagsPath+"flag-stopsign.png"));
1.236 fo->setName("stopsign");
1.237 - fo->setToolTip(tr("This won't work!","Standardflag"));
1.238 + a=new QAction (fo->getPixmap(),fo->getName(),this);
1.239 + tb->addAction (a);
1.240 + fo->setAction (a);
1.241 + a->setCheckable(true);
1.242 + a->setObjectName(fo->getName());
1.243 + a->setToolTip(tr("This won't work!","Standardflag"));
1.244 + connect (a, SIGNAL( activated() ), this, SLOT( standardFlagChanged() ) );
1.245 standardFlagsDefault->addFlag (fo);
1.246
1.247 fo->load(QPixmap(flagsPath+"flag-smiley-good.png"));
1.248 fo->setName("smiley-good");
1.249 fo->setGroup("standard-smiley");
1.250 - fo->setToolTip(tr("Good","Standardflag"));
1.251 + a=new QAction (fo->getPixmap(),fo->getName(),this);
1.252 + tb->addAction (a);
1.253 + fo->setAction (a);
1.254 + a->setCheckable(true);
1.255 + a->setObjectName(fo->getName());
1.256 + a->setToolTip(tr("Good","Standardflag"));
1.257 + connect (a, SIGNAL( activated() ), this, SLOT( standardFlagChanged() ) );
1.258 standardFlagsDefault->addFlag (fo);
1.259
1.260 fo->load(QPixmap(flagsPath+"flag-smiley-sad.png"));
1.261 fo->setName("smiley-sad");
1.262 fo->setGroup("standard-smiley");
1.263 - fo->setToolTip(tr("Bad","Standardflag"));
1.264 + a=new QAction (fo->getPixmap(),fo->getName(),this);
1.265 + tb->addAction (a);
1.266 + fo->setAction (a);
1.267 + a->setCheckable(true);
1.268 + a->setObjectName(fo->getName());
1.269 + a->setToolTip(tr("Bad","Standardflag"));
1.270 + connect (a, SIGNAL( activated() ), this, SLOT( standardFlagChanged() ) );
1.271 standardFlagsDefault->addFlag (fo);
1.272
1.273 fo->load(QPixmap(flagsPath+"flag-smiley-omg.png"));
1.274 // Original omg.png (in KDE emoticons)
1.275 fo->setName("smiley-omg");
1.276 fo->setGroup("standard-smiley");
1.277 - fo->setToolTip(tr("Oh no!","Standardflag"));
1.278 + a=new QAction (fo->getPixmap(),fo->getName(),this);
1.279 + tb->addAction (a);
1.280 + fo->setAction (a);
1.281 + a->setCheckable(true);
1.282 + a->setObjectName(fo->getName());
1.283 + a->setToolTip(tr("Oh no!","Standardflag"));
1.284 + connect (a, SIGNAL( activated() ), this, SLOT( standardFlagChanged() ) );
1.285 standardFlagsDefault->addFlag (fo);
1.286
1.287 fo->load(QPixmap(flagsPath+"flag-kalarm.png"));
1.288 fo->setName("clock");
1.289 - fo->setToolTip(tr("Time critical","Standardflag"));
1.290 + a=new QAction (fo->getPixmap(),fo->getName(),this);
1.291 + tb->addAction (a);
1.292 + fo->setAction (a);
1.293 + a->setCheckable(true);
1.294 + a->setObjectName(fo->getName());
1.295 + a->setToolTip(tr("Time critical","Standardflag"));
1.296 + connect (a, SIGNAL( activated() ), this, SLOT( standardFlagChanged() ) );
1.297 standardFlagsDefault->addFlag (fo);
1.298
1.299 fo->load(QPixmap(flagsPath+"flag-phone.png"));
1.300 fo->setName("phone");
1.301 - fo->setToolTip(tr("Call...","Standardflag"));
1.302 + a=new QAction (fo->getPixmap(),fo->getName(),this);
1.303 + tb->addAction (a);
1.304 + fo->setAction (a);
1.305 + a->setCheckable(true);
1.306 + a->setObjectName(fo->getName());
1.307 + a->setToolTip(tr("Call...","Standardflag"));
1.308 + connect (a, SIGNAL( activated() ), this, SLOT( standardFlagChanged() ) );
1.309 standardFlagsDefault->addFlag (fo);
1.310
1.311 fo->load(QPixmap(flagsPath+"flag-lamp.png"));
1.312 fo->setName("lamp");
1.313 - fo->setToolTip(tr("Idea!","Standardflag"));
1.314 + a=new QAction (fo->getPixmap(),fo->getName(),this);
1.315 + tb->addAction (a);
1.316 + fo->setAction (a);
1.317 + a->setCheckable(true);
1.318 + a->setObjectName(fo->getName());
1.319 + a->setToolTip(tr("Idea!","Standardflag"));
1.320 + connect (a, SIGNAL( activated() ), this, SLOT( standardFlagChanged() ) );
1.321 standardFlagsDefault->addFlag (fo);
1.322
1.323 fo->load(QPixmap(flagsPath+"flag-arrow-up.png"));
1.324 fo->setName("arrow-up");
1.325 fo->setGroup("standard-arrow");
1.326 - fo->setToolTip(tr("Important","Standardflag"));
1.327 + a=new QAction (fo->getPixmap(),fo->getName(),this);
1.328 + tb->addAction (a);
1.329 + fo->setAction (a);
1.330 + a->setCheckable(true);
1.331 + a->setObjectName(fo->getName());
1.332 + a->setToolTip(tr("Important","Standardflag"));
1.333 + connect (a, SIGNAL( activated() ), this, SLOT( standardFlagChanged() ) );
1.334 standardFlagsDefault->addFlag (fo);
1.335
1.336 fo->load(QPixmap(flagsPath+"flag-arrow-down.png"));
1.337 fo->setName("arrow-down");
1.338 fo->setGroup("standard-arrow");
1.339 - fo->setToolTip(tr("Unimportant","Standardflag"));
1.340 + a=new QAction (fo->getPixmap(),fo->getName(),this);
1.341 + tb->addAction (a);
1.342 + fo->setAction (a);
1.343 + a->setCheckable(true);
1.344 + a->setObjectName(fo->getName());
1.345 + a->setToolTip(tr("Unimportant","Standardflag"));
1.346 + connect (a, SIGNAL( activated() ), this, SLOT( standardFlagChanged() ) );
1.347 standardFlagsDefault->addFlag (fo);
1.348
1.349 fo->load(QPixmap(flagsPath+"flag-arrow-2up.png"));
1.350 fo->setName("2arrow-up");
1.351 fo->setGroup("standard-arrow");
1.352 - fo->setToolTip(tr("Very important!","Standardflag"));
1.353 + a=new QAction (fo->getPixmap(),fo->getName(),this);
1.354 + tb->addAction (a);
1.355 + fo->setAction (a);
1.356 + a->setCheckable(true);
1.357 + a->setObjectName(fo->getName());
1.358 + a->setToolTip(tr("Very important!","Standardflag"));
1.359 + connect (a, SIGNAL( activated() ), this, SLOT( standardFlagChanged() ) );
1.360 standardFlagsDefault->addFlag (fo);
1.361
1.362 fo->load(QPixmap(flagsPath+"flag-arrow-2down.png"));
1.363 fo->setName("2arrow-down");
1.364 fo->setGroup("standard-arrow");
1.365 - fo->setToolTip(tr("Very unimportant!","Standardflag"));
1.366 + a=new QAction (fo->getPixmap(),fo->getName(),this);
1.367 + tb->addAction (a);
1.368 + fo->setAction (a);
1.369 + a->setCheckable(true);
1.370 + a->setObjectName(fo->getName());
1.371 + a->setToolTip(tr("Very unimportant!","Standardflag"));
1.372 + connect (a, SIGNAL( activated() ), this, SLOT( standardFlagChanged() ) );
1.373 standardFlagsDefault->addFlag (fo);
1.374
1.375 fo->load(QPixmap(flagsPath+"flag-thumb-up.png"));
1.376 fo->setName("thumb-up");
1.377 fo->setGroup("standard-thumb");
1.378 - fo->setToolTip(tr("I like this","Standardflag"));
1.379 + a=new QAction (fo->getPixmap(),fo->getName(),this);
1.380 + tb->addAction (a);
1.381 + fo->setAction (a);
1.382 + a->setCheckable(true);
1.383 + a->setObjectName(fo->getName());
1.384 + a->setToolTip(tr("I like this","Standardflag"));
1.385 + connect (a, SIGNAL( activated() ), this, SLOT( standardFlagChanged() ) );
1.386 standardFlagsDefault->addFlag (fo);
1.387
1.388 fo->load(QPixmap(flagsPath+"flag-thumb-down.png"));
1.389 fo->setName("thumb-down");
1.390 fo->setGroup("standard-thumb");
1.391 - fo->setToolTip(tr("I like this","Standardflag"));
1.392 - fo->setToolTip(tr("I do not like this","Standardflag"));
1.393 + a=new QAction (fo->getPixmap(),fo->getName(),this);
1.394 + tb->addAction (a);
1.395 + fo->setAction (a);
1.396 + a->setCheckable(true);
1.397 + a->setObjectName(fo->getName());
1.398 + a->setToolTip(tr("I do not like this","Standardflag"));
1.399 + connect (a, SIGNAL( activated() ), this, SLOT( standardFlagChanged() ) );
1.400 standardFlagsDefault->addFlag (fo);
1.401
1.402 fo->load(QPixmap(flagsPath+"flag-rose.png"));
1.403 fo->setName("rose");
1.404 - fo->setToolTip(tr("Rose","Standardflag"));
1.405 + a=new QAction (fo->getPixmap(),fo->getName(),this);
1.406 + tb->addAction (a);
1.407 + fo->setAction (a);
1.408 + a->setCheckable(true);
1.409 + a->setObjectName(fo->getName());
1.410 + a->setToolTip(tr("Rose","Standardflag"));
1.411 + connect (a, SIGNAL( activated() ), this, SLOT( standardFlagChanged() ) );
1.412 standardFlagsDefault->addFlag (fo);
1.413
1.414 fo->load(QPixmap(flagsPath+"flag-heart.png"));
1.415 fo->setName("heart");
1.416 - fo->setToolTip(tr("I just love... ","Standardflag"));
1.417 + a=new QAction (fo->getPixmap(),fo->getName(),this);
1.418 + tb->addAction (a);
1.419 + a->setCheckable(true);
1.420 + a->setObjectName(fo->getName());
1.421 + a->setToolTip(tr("I just love... ","Standardflag"));
1.422 + connect (a, SIGNAL( activated() ), this, SLOT( standardFlagChanged() ) );
1.423 standardFlagsDefault->addFlag (fo);
1.424
1.425 fo->load(QPixmap(flagsPath+"flag-present.png"));
1.426 fo->setName("present");
1.427 - fo->setToolTip(tr("Surprise!","Standardflag"));
1.428 + a=new QAction (fo->getPixmap(),fo->getName(),this);
1.429 + tb->addAction (a);
1.430 + fo->setAction (a);
1.431 + a->setCheckable(true);
1.432 + a->setObjectName(fo->getName());
1.433 + a->setToolTip(tr("Surprise!","Standardflag"));
1.434 + connect (a, SIGNAL( activated() ), this, SLOT( standardFlagChanged() ) );
1.435 standardFlagsDefault->addFlag (fo);
1.436
1.437 fo->load(QPixmap(flagsPath+"flag-flash.png"));
1.438 fo->setName("flash");
1.439 - fo->setToolTip(tr("Dangerous","Standardflag"));
1.440 + a=new QAction (fo->getPixmap(),fo->getName(),this);
1.441 + tb->addAction (a);
1.442 + fo->setAction (a);
1.443 + a->setCheckable(true);
1.444 + a->setObjectName(fo->getName());
1.445 + a->setToolTip(tr("Dangerous","Standardflag"));
1.446 + connect (a, SIGNAL( activated() ), this, SLOT( standardFlagChanged() ) );
1.447 standardFlagsDefault->addFlag (fo);
1.448
1.449 fo->load(QPixmap(flagsPath+"flag-info.png"));
1.450 // Original: xsldbg_output.png
1.451 fo->setName("info");
1.452 - fo->setToolTip(tr("Info","Standardflag"));
1.453 + a=new QAction (fo->getPixmap(),fo->getName(),this);
1.454 + tb->addAction (a);
1.455 + fo->setAction (a);
1.456 + a->setCheckable(true);
1.457 + a->setObjectName(fo->getName());
1.458 + a->setToolTip(tr("Info","Standardflag"));
1.459 + connect (a, SIGNAL( activated() ), this, SLOT( standardFlagChanged() ) );
1.460 standardFlagsDefault->addFlag (fo);
1.461
1.462 fo->load(QPixmap(flagsPath+"flag-lifebelt.png"));
1.463 // Original khelpcenter.png
1.464 fo->setName("lifebelt");
1.465 - fo->setToolTip(tr("This will help","Standardflag"));
1.466 + a=new QAction (fo->getPixmap(),fo->getName(),this);
1.467 + tb->addAction (a);
1.468 + fo->setAction (a);
1.469 + a->setCheckable(true);
1.470 + a->setObjectName(fo->getName());
1.471 + a->setToolTip(tr("This will help","Standardflag"));
1.472 + connect (a, SIGNAL( activated() ), this, SLOT( standardFlagChanged() ) );
1.473 standardFlagsDefault->addFlag (fo);
1.474
1.475 delete (fo);
1.476 -
1.477 - standardFlagsDefault->makeToolbar(this, "Standard Flags");
1.478 }
1.479
1.480 // Settings Actions
1.481 @@ -1638,7 +1779,7 @@
1.482 // create a new mapeditor in a new tab
1.483 if ( lmode==NewMap && (!me || !me->isDefault() ) )
1.484 {
1.485 - me = new MapEditor (tabWidget,true);
1.486 + me= new MapEditor ( NULL,true);
1.487 tabWidget->addTab (me,fn);
1.488 tabIndex=tabWidget->indexOf (me);
1.489 tabWidget->setCurrentPage (tabIndex);
1.490 @@ -2544,12 +2685,19 @@
1.491
1.492 void Main::editHeading()
1.493 {
1.494 + qWarning ("Main::editHeading called");
1.495 if (currentMapEditor())
1.496 currentMapEditor()->editHeading();
1.497 }
1.498
1.499 void Main::editNewBranch()
1.500 {
1.501 + //FIXME
1.502 + // tried to see if maybe currentMapEditor is not set, but
1.503 + // ME does not seem to send a key event anyway...:q
1.504 + //here i was last time...
1.505 +
1.506 + cout << "Main::editNewBranch\n";
1.507 if (currentMapEditor())
1.508 currentMapEditor()->addNewBranch(0);
1.509 }