hide export for floatimages.
1.1 --- a/linkablemapobj.cpp Wed Mar 15 13:53:53 2006 +0000
1.2 +++ b/linkablemapobj.cpp Wed Mar 15 13:53:53 2006 +0000
1.3 @@ -103,6 +103,7 @@
1.4
1.5 // Rel Positions
1.6 relPos=QPoint(0,0);
1.7 + useRelPos=false;
1.8 useOrientation=true;
1.9 }
1.10
2.1 --- a/main.cpp Wed Mar 15 13:53:53 2006 +0000
2.2 +++ b/main.cpp Wed Mar 15 13:53:53 2006 +0000
2.3 @@ -68,7 +68,6 @@
2.4 QAction *actionEditSelectFirst;
2.5 QAction *actionEditSelectLast;
2.6 QAction *actionEditLoadImage;
2.7 -QAction *actionEditToggleFloatExport;
2.8
2.9 QAction *actionFormatColor;
2.10 QAction *actionFormatPickColor;
3.1 --- a/mainwindow.cpp Wed Mar 15 13:53:53 2006 +0000
3.2 +++ b/mainwindow.cpp Wed Mar 15 13:53:53 2006 +0000
3.3 @@ -123,7 +123,6 @@
3.4 extern QAction *actionEditSelectFirst;
3.5 extern QAction *actionEditSelectLast;
3.6 extern QAction *actionEditLoadImage;
3.7 -extern QAction *actionEditToggleFloatExport;
3.8
3.9 extern QAction* actionFormatColor;
3.10 extern QAction* actionFormatPickColor;
3.11 @@ -494,6 +493,7 @@
3.12 actionEditToggleScroll=a;
3.13 #endif
3.14 actionEditToggleScroll->setEnabled (false);
3.15 + actionEditToggleScroll->setToggleAction(true);
3.16 actionEditToggleScroll->addTo( tb );
3.17 actionEditToggleScroll->addTo( menu );
3.18 actionListBranches.append(actionEditToggleScroll);
3.19 @@ -1175,12 +1175,14 @@
3.20 actionEditCopy->addTo( floatimageContextMenu );
3.21 actionEditCut->addTo( floatimageContextMenu );
3.22
3.23 +/* FIXME not needed any longer
3.24 floatimageContextMenu->insertSeparator();
3.25 a = new QAction( tr( "Use for Export" ), QPixmap(), tr( "Use for Export"), 0, this, "useForExport" );
3.26 a->setToggleAction(true);
3.27 connect( a, SIGNAL( activated() ), this, SLOT( editToggleFloatExport() ) );
3.28 a->addTo( floatimageContextMenu);
3.29 actionEditToggleFloatExport=a;
3.30 + */
3.31
3.32 floatimageContextMenu->insertSeparator();
3.33 actionFormatHideLinkUnselected->addTo( floatimageContextMenu );
3.34 @@ -1711,11 +1713,9 @@
3.35 }
3.36 }
3.37
3.38 - if (me->saveZipped())
3.39 - {
3.40 + if (saveZipped && !tmpMapDir.isEmpty())
3.41 // Delete tmpDir
3.42 removeDir (QDir(tmpMapDir));
3.43 - }
3.44
3.45 if (err==success)
3.46 {
3.47 @@ -1737,7 +1737,6 @@
3.48
3.49 void Main::fileSaveAs(const SaveMode& savemode)
3.50 {
3.51 - QString tmpMapDir;
3.52 QString fn;
3.53
3.54 if (currentMapEditor())
3.55 @@ -2225,7 +2224,7 @@
3.56 void Main::editToggleHideExport()
3.57 {
3.58 if (currentMapEditor())
3.59 - currentMapEditor()->toggleHideExport();
3.60 + currentMapEditor()->setHideExport();
3.61 }
3.62
3.63 void Main::editMapInfo()
3.64 @@ -2373,12 +2372,6 @@
3.65 currentMapEditor()->saveFloatImage(item);
3.66 }
3.67
3.68 -void Main::editToggleFloatExport()
3.69 -{
3.70 - if (currentMapEditor())
3.71 - currentMapEditor()->toggleFloatExport();
3.72 -}
3.73 -
3.74 void Main::editFollowXLink(int item)
3.75 {
3.76 if (currentMapEditor())
4.1 --- a/mainwindow.h Wed Mar 15 13:53:53 2006 +0000
4.2 +++ b/mainwindow.h Wed Mar 15 13:53:53 2006 +0000
4.3 @@ -126,7 +126,6 @@
4.4 void editLastBranch();
4.5 void editLoadImage();
4.6 void editSaveImage(int);
4.7 - void editToggleFloatExport();
4.8 void editFollowXLink (int);
4.9 void editEditXLink (int);
4.10
5.1 --- a/mapeditor.cpp Wed Mar 15 13:53:53 2006 +0000
5.2 +++ b/mapeditor.cpp Wed Mar 15 13:53:53 2006 +0000
5.3 @@ -80,7 +80,6 @@
5.4 extern QAction *actionEditSelectFirst;
5.5 extern QAction *actionEditSelectLast;
5.6 extern QAction *actionEditLoadImage;
5.7 -extern QAction *actionEditToggleFloatExport;
5.8
5.9 extern QAction* actionFormatPickColor;
5.10 extern QAction* actionFormatColorBranch;
5.11 @@ -339,11 +338,6 @@
5.12 d.mkdir (tmpMapDir,true);
5.13 }
5.14
5.15 -void MapEditor::delTmpDirs()
5.16 -{
5.17 - removeDir (QDir(tmpMapDir));
5.18 -}
5.19 -
5.20 QString MapEditor::saveToDir(const QString &tmpdir, const QString &prefix, bool writeflags, const QPoint &offset, LinkableMapObj *saveSelection)
5.21 {
5.22 // tmpdir temporary directory to which data will be written
5.23 @@ -2297,16 +2291,37 @@
5.24 }
5.25 }
5.26
5.27 +void MapEditor::setHideExport()
5.28 +{
5.29 + if (selection && (typeid(*selection) == typeid(BranchObj) ||
5.30 + typeid(*selection) == typeid(MapCenterObj)) ||
5.31 + (typeid(*selection)==typeid(FloatImageObj))
5.32 + )
5.33 + {
5.34 + saveState(); //TODO undoCommand
5.35 + OrnamentedObj *oo=(OrnamentedObj*)selection;
5.36 + oo->setHideInExport(actionEditToggleHideExport->isOn());
5.37 + updateActions();
5.38 + mapCenter->reposition();
5.39 + adjustCanvasSize();
5.40 + canvas()->update();
5.41 + }
5.42 +}
5.43 +
5.44 void MapEditor::toggleHideExport()
5.45 {
5.46 if (selection && (typeid(*selection) == typeid(BranchObj) ||
5.47 - typeid(*selection) == typeid(MapCenterObj)) //||
5.48 -// (typeid(*selection)==typeid(FloatImageObj))
5.49 + typeid(*selection) == typeid(MapCenterObj)) ||
5.50 + (typeid(*selection)==typeid(FloatImageObj))
5.51 )
5.52 {
5.53 saveState(); //TODO undoCommand
5.54 - BranchObj *bo=(BranchObj*)selection;
5.55 - bo->setHideInExport(actionEditToggleHideExport->isOn());
5.56 + OrnamentedObj *oo=(OrnamentedObj*)selection;
5.57 + if (oo->hideInExport())
5.58 + oo->setHideInExport(false);
5.59 + else
5.60 + oo->setHideInExport(true);
5.61 + actionEditToggleHideExport->setOn (oo->hideInExport());
5.62 updateActions();
5.63 mapCenter->reposition();
5.64 adjustCanvasSize();
5.65 @@ -2468,6 +2483,12 @@
5.66
5.67 standardFlagsDefault->setEnabled (true);
5.68
5.69 + actionEditToggleScroll->setEnabled (true);
5.70 + if ( bo->isScrolled() )
5.71 + actionEditToggleScroll->setOn(true);
5.72 + else
5.73 + actionEditToggleScroll->setOn(false);
5.74 +
5.75 if ( bo->getURL().isEmpty() )
5.76 actionEditOpenURL->setEnabled (false);
5.77 else
5.78 @@ -2494,7 +2515,6 @@
5.79 for (a=actionListBranches.first();a;a=actionListBranches.next())
5.80 a->setEnabled(true);
5.81 actionEditDelete->setEnabled (true);
5.82 - actionEditToggleFloatExport->setEnabled (false);
5.83 switch (selection->getFrameType())
5.84 {
5.85 case NoFrame:
5.86 @@ -2515,12 +2535,15 @@
5.87 }
5.88 if ( (typeid(*selection) == typeid(FloatImageObj)) )
5.89 {
5.90 + FloatObj *fo=(FloatImageObj*)selection;
5.91 standardFlagsDefault->setEnabled (false);
5.92
5.93 actionEditOpenURL->setEnabled (false);
5.94 actionEditOpenVymLink->setEnabled (false);
5.95 actionEditDeleteVymLink->setEnabled (false);
5.96 - actionEditToggleHideExport->setEnabled (false);
5.97 + actionEditToggleHideExport->setEnabled (true);
5.98 + actionEditToggleHideExport->setOn (fo->hideInExport() );
5.99 +
5.100
5.101 actionEditCopy->setEnabled (true);
5.102 actionEditCut->setEnabled (true);
5.103 @@ -2528,8 +2551,6 @@
5.104 for (a=actionListBranches.first();a;a=actionListBranches.next())
5.105 a->setEnabled(false);
5.106 actionEditDelete->setEnabled (true);
5.107 - actionEditToggleFloatExport->setOn
5.108 - ( ((FloatImageObj*)selection)->getFloatExport() );
5.109 actionFormatHideLinkUnselected->setOn
5.110 ( selection->getHideLinkUnselected());
5.111 }
5.112 @@ -2544,12 +2565,12 @@
5.113 for (a=actionListBranches.first();a;a=actionListBranches.next())
5.114 a->setEnabled(false);
5.115
5.116 + actionEditToggleScroll->setEnabled (true);
5.117 actionEditOpenURL->setEnabled (false);
5.118 actionEditOpenVymLink->setEnabled (false);
5.119 actionEditDeleteVymLink->setEnabled (false);
5.120 actionEditHeading2URL->setEnabled (false);
5.121 actionEditDelete->setEnabled (false);
5.122 - actionEditToggleFloatExport->setEnabled (false);
5.123 }
5.124 }
5.125
5.126 @@ -2786,17 +2807,6 @@
5.127 }
5.128 }
5.129
5.130 -void MapEditor::toggleFloatExport()
5.131 -{
5.132 - if (selection &&
5.133 - (typeid(*selection) == typeid(FloatImageObj))||
5.134 - (typeid(*selection) == typeid(FloatObj)) )
5.135 - {
5.136 - FloatImageObj *fio=((FloatImageObj*)selection);
5.137 - fio->setFloatExport (actionEditToggleFloatExport->isOn() );
5.138 - }
5.139 -}
5.140 -
5.141 void MapEditor::setFrame(const FrameType &t)
5.142 {
5.143 if (selection &&
5.144 @@ -2960,6 +2970,7 @@
5.145 void MapEditor::testFunction()
5.146 {
5.147 cout << "MapEditor::testFunction() called\n";
5.148 + mapCenter->reposition();
5.149 adjustCanvasSize();
5.150
5.151 /*
5.152 @@ -3106,18 +3117,16 @@
5.153 // Do not move, if systemFlag clicked
5.154 if (foname=="url")
5.155 openURL();
5.156 - else
5.157 - if (foname=="vymLink")
5.158 - {
5.159 - mainWindow->editOpenVymLink();
5.160 - // tabWidget may change, better return now
5.161 - // before segfaulting...
5.162 - return;
5.163 - } else
5.164 - if (foname=="note")
5.165 - mainWindow->windowToggleNoteEditor();
5.166 - else
5.167 - if (foname=="hideInExport") toggleHideExport();
5.168 + else if (foname=="vymLink")
5.169 + {
5.170 + mainWindow->editOpenVymLink();
5.171 + // tabWidget may change, better return now
5.172 + // before segfaulting...
5.173 + return;
5.174 + } else if (foname=="note")
5.175 + mainWindow->windowToggleNoteEditor();
5.176 + else if (foname=="hideInExport")
5.177 + toggleHideExport();
5.178 }
5.179 }
5.180
6.1 --- a/mapeditor.h Wed Mar 15 13:53:53 2006 +0000
6.2 +++ b/mapeditor.h Wed Mar 15 13:53:53 2006 +0000
6.3 @@ -31,7 +31,6 @@
6.4
6.5 private:
6.6 void makeTmpDirs(); // create temporary directories
6.7 - void delTmpDirs(); // delete temporary directories
6.8 QString saveToDir(const QString&,const QString &,bool, const QPoint &,LinkableMapObj*);
6.9 void saveState(); // save actual state to backup
6.10 void saveState(LinkableMapObj *);
6.11 @@ -128,7 +127,10 @@
6.12 void editVymLink(); // edit link to another map
6.13 void deleteVymLink(); // delete link to another map
6.14 QString getVymLink(); // return path to map
6.15 + void setHideExport(); // toggle the export flag
6.16 +protected:
6.17 void toggleHideExport(); // toggle the export flag
6.18 +public:
6.19 void removeBranchHere(); // remove but keep childs
6.20 void removeChilds(); // remove childs
6.21 void editMapInfo(); // dialog to enter author, ...
6.22 @@ -151,7 +153,6 @@
6.23 void unScrollAll();
6.24 void loadFloatImage ();
6.25 void saveFloatImage (int);
6.26 - void toggleFloatExport();
6.27 void setFrame(const FrameType &);
6.28 void setIncludeImagesVer(bool);
6.29 void setIncludeImagesHor(bool);