1.1 --- a/attributedialog.cpp Mon Mar 23 09:06:51 2009 +0000
1.2 +++ b/attributedialog.cpp Thu Mar 26 07:49:17 2009 +0000
1.3 @@ -88,7 +88,7 @@
1.4 {
1.5 aw=new AttributeWidget (this);
1.6 aw->setKey (keyList.at(i) );
1.7 - // FIXME aw->setValues (table->getValues (keyList.at(i) ));
1.8 + // FIXME-3 aw->setValues (table->getValues (keyList.at(i) ));
1.9 aw->show();
1.10 tableLayout->addWidget (aw);
1.11 }
2.1 --- a/branchobj.cpp Mon Mar 23 09:06:51 2009 +0000
2.2 +++ b/branchobj.cpp Thu Mar 26 07:49:17 2009 +0000
2.3 @@ -17,11 +17,7 @@
2.4 // BranchObj
2.5 /////////////////////////////////////////////////////////////////
2.6
2.7 -BranchObj* BranchObj::itLast=NULL;
2.8 -BranchObj* BranchObj::itFirst=NULL;
2.9 -
2.10 -
2.11 -BranchObj::BranchObj () :OrnamentedObj() // FIXME needed at all?
2.12 +BranchObj::BranchObj () :OrnamentedObj() // FIXME-3 needed at all?
2.13 {
2.14 // cout << "Const BranchObj ()\n";
2.15 setParObj (this);
2.16 @@ -392,155 +388,6 @@
2.17 branch.at(i)->setColorSubtree(col);
2.18 }
2.19
2.20 -BranchObj* BranchObj::first()
2.21 -{
2.22 - itLast=NULL;
2.23 - itFirst=this;
2.24 - return this;
2.25 -}
2.26 -
2.27 -BranchObj* BranchObj::next()
2.28 -{
2.29 - BranchObj *bo;
2.30 - BranchObj *lmo;
2.31 - BranchObj *po=(BranchObj*)parObj;
2.32 -
2.33 - if (branch.isEmpty())
2.34 - bo=NULL;
2.35 - else
2.36 - bo=branch.first();
2.37 -
2.38 - if (!itLast)
2.39 - {
2.40 - // no itLast, we are just beginning
2.41 - if (bo)
2.42 - {
2.43 - // we have children, return first one
2.44 - itLast=this;
2.45 - return bo;
2.46 - }
2.47 - else
2.48 - {
2.49 - // No children, so there is no next
2.50 - itLast=this;
2.51 - return NULL;
2.52 - }
2.53 - }
2.54 -
2.55 - // We have an itLast
2.56 - if (itLast==po)
2.57 - { // We come from parent
2.58 - if (bo)
2.59 - {
2.60 - // there are children, go there
2.61 - itLast=this;
2.62 - return bo;
2.63 - }
2.64 - else
2.65 - { // no children, try to go up again
2.66 - if (po)
2.67 - {
2.68 - // go back to parent and try to find next there
2.69 - itLast=this;
2.70 - lmo=po->next();
2.71 - itLast=this;
2.72 - return lmo;
2.73 -
2.74 - }
2.75 - else
2.76 - {
2.77 - // can't go up, I am mapCenter, no next
2.78 - itLast=NULL;
2.79 - return NULL;
2.80 - }
2.81 - }
2.82 - }
2.83 -
2.84 - // We don't come from parent, but from brother or children
2.85 -
2.86 - // Try to find last child, where we came from, in my own children
2.87 - bool searching=true;
2.88 - int i=0;
2.89 - while (i<branch.size())
2.90 - {
2.91 - // Try to find itLast in my own children
2.92 - if (itLast==branch.at(i))
2.93 - {
2.94 - // ok, we come from my own children
2.95 - if (i<branch.size()-1)
2.96 - bo=branch.at(i+1);
2.97 - else
2.98 - bo=NULL;
2.99 - searching=false;
2.100 - i=branch.size();
2.101 - }
2.102 - ++i;
2.103 - }
2.104 - if (!searching)
2.105 - { // found itLast in my children
2.106 - if (bo)
2.107 - {
2.108 - // found a brother of lastLMO
2.109 - itLast=this;
2.110 - return bo;
2.111 - }
2.112 - else
2.113 - {
2.114 - if (po)
2.115 - {
2.116 - if (this==itFirst) return NULL; // Stop at starting point
2.117 - // go up
2.118 - itLast=this;
2.119 - lmo=po->next();
2.120 - itLast=this;
2.121 - return lmo;
2.122 - }
2.123 - else
2.124 - {
2.125 - // can't go up, I am mapCenter
2.126 - itLast=NULL;
2.127 - return NULL;
2.128 - }
2.129 - }
2.130 - }
2.131 -
2.132 - // couldn't find last child, it must be a nephew of mine
2.133 - if (branch.size()>0)
2.134 - {
2.135 - // proceed with my first child
2.136 - itLast=this;
2.137 - return branch.first();
2.138 - }
2.139 - else
2.140 - {
2.141 - // or go back to my parents
2.142 - if (po)
2.143 - {
2.144 - // go up
2.145 - itLast=this;
2.146 - lmo=po->next();
2.147 - itLast=this;
2.148 - return lmo;
2.149 - }
2.150 - else
2.151 - {
2.152 - // can't go up, I am mapCenter
2.153 - itLast=NULL;
2.154 - return NULL;
2.155 - }
2.156 - }
2.157 -}
2.158 -
2.159 -BranchObj* BranchObj::getLastIterator()
2.160 -{
2.161 - return itLast;
2.162 -}
2.163 -
2.164 -void BranchObj::setLastIterator(BranchObj* it)
2.165 -{
2.166 - itLast=it;
2.167 -}
2.168 -
2.169 void BranchObj::positionContents()
2.170 {
2.171 for (int i=0; i<floatimage.size(); ++i )
2.172 @@ -787,7 +634,7 @@
2.173 if (hidden) return "";
2.174
2.175 // Update of note is usually done while unselecting a branch
2.176 - if (isNoteInEditor) getNoteFromTextEditor();
2.177 + // if (isNoteInEditor) getNoteFromTextEditor(); //FIXME-2 moved to TreeItem
2.178
2.179 QString s,a;
2.180 QString scrolledAttr;
2.181 @@ -840,8 +687,8 @@
2.182 s+=floatimage.at(i)->saveToDir (tmpdir,prefix);
2.183
2.184 // save note
2.185 - if (!note.isEmpty() )
2.186 - s+=note.saveToDir();
2.187 + if (!treeItem->getNoteObj().isEmpty() )
2.188 + s+=treeItem->getNoteObj().saveToDir();
2.189
2.190 // Save branches
2.191 for (int i=0; i<branch.size(); ++i)
2.192 @@ -1078,7 +925,7 @@
2.193 bo->depth=depth+1;
2.194 bo->setDefAttr(MovedBranch);
2.195 if (scrolled) tmpUnscroll();
2.196 - //setLastSelectedBranch (bo); //FIXME needed?
2.197 + //setLastSelectedBranch (bo); //FIXME-3 needed?
2.198 return bo;
2.199 }
2.200
2.201 @@ -1112,7 +959,7 @@
2.202 bo->depth=depth+1;
2.203 bo->setDefAttr (MovedBranch);
2.204 if (scrolled) tmpUnscroll();
2.205 - //setLastSelectedBranch (bo); //FIXME needed?
2.206 + //setLastSelectedBranch (bo); //FIXME-3 needed?
2.207 qSort (branch.begin(),branch.end(), isAbove);
2.208 return bo;
2.209 }
2.210 @@ -1535,28 +1382,27 @@
2.211 bboxTotal.setHeight(max (r.height(), bbox.height()));
2.212 }
2.213
2.214 -void BranchObj::select() // FIXME try to get rid of this in BO completely
2.215 +void BranchObj::select() // FIXME-2 try to get rid of this in BO completely
2.216 {
2.217 cout << "BO::select()\n";
2.218 - // update NoteEditor FIXME do this via VymView::changeSelection
2.219 - textEditor->setText(note.getNote() );
2.220 - QString fnh=note.getFilenameHint();
2.221 + textEditor->setText(treeItem->getNoteObj().getNote() );
2.222 + QString fnh=treeItem->getNoteObj().getFilenameHint();
2.223 if (fnh!="")
2.224 - textEditor->setFilenameHint(note.getFilenameHint() );
2.225 + textEditor->setFilenameHint(treeItem->getNoteObj().getFilenameHint() );
2.226 else
2.227 textEditor->setFilenameHint(getHeading() );
2.228 - textEditor->setFontHint (note.getFontHint() );
2.229 - isNoteInEditor=true;
2.230 + textEditor->setFontHint (treeItem->getNoteObj().getFontHint() );
2.231 + //isNoteInEditor=true;
2.232
2.233 // set selected and visible
2.234 LinkableMapObj::select();
2.235
2.236 - //if (po) po->setLastSelectedBranch(this); FIXME needed?
2.237 + //if (po) po->setLastSelectedBranch(this); needed?
2.238
2.239 // temporary unscroll, if we have scrolled parents somewhere
2.240 if (parObj) ((BranchObj*)(parObj))->tmpUnscroll();
2.241
2.242 - /* FIXME moved to vymmodel or vymview...
2.243 + /* moved to vymmodel or vymview...
2.244 // Show URL and link in statusbar
2.245 QString status;
2.246 if (!url.isEmpty()) status+="URL: "+url+" ";
2.247 @@ -1571,15 +1417,17 @@
2.248 */
2.249 }
2.250
2.251 -void BranchObj::unselect()
2.252 +void BranchObj::unselect() //FIXME-3 should not be needed
2.253 {
2.254 LinkableMapObj::unselect();
2.255 // Delete any messages like vymLink in StatusBar
2.256 - mainWindow->statusMessage (""); //FIXME this causes segfault, when MainWindow is already gone in global destructor on quitting vym
2.257 + mainWindow->statusMessage (""); //this causes segfault, when MainWindow is already gone in global destructor on quitting vym
2.258
2.259 +/*
2.260 // Save current note
2.261 if (isNoteInEditor) getNoteFromTextEditor();
2.262 isNoteInEditor=false;
2.263 +*/
2.264
2.265 // reset temporary unscroll, if we have scrolled parents somewhere
2.266 if (parObj) ((BranchObj*)(parObj))->resetTmpUnscroll();
3.1 --- a/branchobj.h Mon Mar 23 09:06:51 2009 +0000
3.2 +++ b/branchobj.h Thu Mar 26 07:49:17 2009 +0000
3.3 @@ -52,11 +52,6 @@
3.4 virtual void setLinkColor(); // set the color of link
3.5 virtual void setColorSubtree(QColor); // set the color of heading
3.6
3.7 - BranchObj* first (); // set Iterator to first LMO
3.8 - BranchObj* next (); // find next LMO after given one
3.9 - BranchObj* getLastIterator(); // to interrupt and resume next iteration
3.10 - void setLastIterator (BranchObj*); // needed by next()
3.11 -
3.12 virtual void positionContents();
3.13 virtual void move (double x,double y);
3.14 virtual void move (QPointF);
4.1 --- a/branchpropwindow.cpp Mon Mar 23 09:06:51 2009 +0000
4.2 +++ b/branchpropwindow.cpp Thu Mar 26 07:49:17 2009 +0000
4.3 @@ -44,7 +44,7 @@
4.4 else
4.5 hide();
4.6
4.7 - // FIXME for now remove attribute tab
4.8 + // FIXME-2 for now remove attribute tab
4.9 ui.tabWidget->removeTab (3);
4.10
4.11 }
4.12 @@ -126,7 +126,7 @@
4.13 attributeModel->removeRows(0, attributeModel->rowCount(), QModelIndex());
4.14
4.15 /*
4.16 - // FIXME some samples for attribute testing
4.17 + // FIXME-3 some samples for attribute testing
4.18 QStringList attrTypes=mapEditor->attributeTable()->getTypes();
4.19 for (int i=0; i<attrTypes.count()-1;i++)
4.20 {
4.21 @@ -263,7 +263,7 @@
4.22
4.23 void BranchPropertyWindow::deleteAttributeClicked()
4.24 {
4.25 - //FIXME cout << "BPW::delete\n";
4.26 + //FIXME-3 cout << "BPW::delete\n";
4.27 }
4.28
4.29 void BranchPropertyWindow::connectSignals()
5.1 --- a/exports.cpp Mon Mar 23 09:06:51 2009 +0000
5.2 +++ b/exports.cpp Thu Mar 26 07:49:17 2009 +0000
5.3 @@ -129,7 +129,7 @@
5.4 caption=vymName+ " -" +QObject::tr("Export as ASCII")+" "+QObject::tr("(still experimental)");
5.5 }
5.6
5.7 -void ExportASCII::doExport()
5.8 +void ExportASCII::doExport() //FIXME-1 segfaults...
5.9 {
5.10 QFile file (outputFile);
5.11 if ( !file.open( QIODevice::WriteOnly ) )
5.12 @@ -189,10 +189,10 @@
5.13 }
5.14
5.15 // If necessary, write note
5.16 - if (!bo->getNote().isEmpty())
5.17 + if (!cur->getNoteObj().isEmpty())
5.18 {
5.19 curIndent +=" | ";
5.20 - s=bo->getNoteASCII( curIndent, 80);
5.21 + s=cur->getNoteASCII( curIndent, 80);
5.22 ts << s;
5.23 }
5.24 }
5.25 @@ -240,9 +240,9 @@
5.26 if (!bo->hasHiddenExportParent() )
5.27 {
5.28 // If necessary, write note
5.29 - if (!bo->getNote().isEmpty())
5.30 + if (!cur->getNoteObj().isEmpty())
5.31 {
5.32 - s =bo->getNoteASCII();
5.33 + s =cur->getNoteASCII();
5.34 s=s.replace ("\n","\n"+curIndent);
5.35 ts << ("\""+s+"\",");
5.36 } else
5.37 @@ -419,8 +419,8 @@
5.38
5.39 }
5.40 // If necessary, write note
5.41 - if (!bo->getNote().isEmpty()) {
5.42 - ts << (bo->getNoteASCII());
5.43 + if (!cur->getNoteObj().isEmpty()) {
5.44 + ts << (cur->getNoteASCII());
5.45 ts << ("\n");
5.46 }
5.47 }
5.48 @@ -446,6 +446,7 @@
5.49
5.50 uint i=0;
5.51 bo=current->getFirstBranch();
5.52 + TreeItem *ti=bo->getTreeItem();
5.53 if (bo)
5.54 {
5.55 if (!bo->hasHiddenExportParent() )
5.56 @@ -457,8 +458,8 @@
5.57 r+="<text:list-item><text:p >";
5.58 r+=quotemeta(bo->getHeading());
5.59 // If necessary, write note
5.60 - if (!bo->getNote().isEmpty())
5.61 - r+=bo->getNoteOpenDoc();
5.62 + if (!ti->getNoteObj().isEmpty())
5.63 + r+=ti->getNoteOpenDoc();
5.64 r+="</text:p>";
5.65 r+=buildList (bo); // recursivly add deeper branches
5.66 r+="</text:list-item>\n";
5.67 @@ -476,7 +477,7 @@
5.68 {
5.69 QString allPages;
5.70
5.71 -/* FIXME not adapted to multiple mapCenters yet
5.72 +/* FIXME-2 not adapted to multiple mapCenters yet, see patch already done in 1.12.2...
5.73 // Insert new content
5.74 content.replace ("<!-- INSERT TITLE -->",quotemeta(mapCenter->getHeading()));
5.75 content.replace ("<!-- INSERT AUTHOR -->",quotemeta(mapCenter->getAuthor()));
6.1 --- a/flagrowobj.cpp Mon Mar 23 09:06:51 2009 +0000
6.2 +++ b/flagrowobj.cpp Thu Mar 26 07:49:17 2009 +0000
6.3 @@ -295,7 +295,7 @@
6.4 name=n;
6.5 }
6.6
6.7 -void FlagRowObj::updateToolbar() //FIXME this needs to be changed with VM
6.8 +void FlagRowObj::updateToolbar() //FIXME-2 this needs to be changed with VM
6.9 {
6.10 if (parentRow)
6.11 {
7.1 --- a/floatimageobj.cpp Mon Mar 23 09:06:51 2009 +0000
7.2 +++ b/floatimageobj.cpp Thu Mar 26 07:49:17 2009 +0000
7.3 @@ -225,21 +225,3 @@
7.4 //TODO abstract in linkablemapobj.h
7.5 }
7.6
7.7 -/*
7.8 -QString FloatImageObj::getSelectString() //FIXME move to selection
7.9 -{
7.10 - QString s;
7.11 - if (parObj)
7.12 - {
7.13 - if (parObj->getDepth()==0)
7.14 - s= "fi:" + QString("%1").arg( ((BranchObj*)(parObj))->getFloatImageNum(this));
7.15 - else
7.16 - s= ((BranchObj*)(parObj))->getSelectString() + ",fi:" + QString("%1").arg( ((BranchObj*)(parObj))->getFloatImageNum(this));
7.17 - } else
7.18 - s="mc:";
7.19 -
7.20 - return s;
7.21 -
7.22 -}
7.23 -*/
7.24 -
8.1 --- a/linkablemapobj.cpp Mon Mar 23 09:06:51 2009 +0000
8.2 +++ b/linkablemapobj.cpp Thu Mar 26 07:49:17 2009 +0000
8.3 @@ -150,11 +150,11 @@
8.4 model=parObj->getModel();
8.5 }
8.6
8.7 -void LinkableMapObj::setParObjTmp(LinkableMapObj*,QPointF,int) // FIXME make pure virtual
8.8 +void LinkableMapObj::setParObjTmp(LinkableMapObj*,QPointF,int) // FIXME-3 make pure virtual
8.9 {
8.10 }
8.11
8.12 -void LinkableMapObj::unsetParObjTmp() // FIXME make pure virtual
8.13 +void LinkableMapObj::unsetParObjTmp() // FIXME-3 make pure virtual
8.14 {
8.15 }
8.16
8.17 @@ -247,7 +247,7 @@
8.18
8.19 void LinkableMapObj::setLinkStyle(Style newstyle)
8.20 {
8.21 - //if (newstyle=style) return; FIXME
8.22 + //if (newstyle=style) return; FIXME-3
8.23 delLink();
8.24
8.25 style=newstyle;
8.26 @@ -406,11 +406,11 @@
8.27 segment.at(i)->show();
8.28 break;
8.29 case PolyLine:
8.30 - if (!p) cout << "LMO::setVis p==0 (PolyLine)\n"; //FIXME
8.31 + if (!p) cout << "LMO::setVis p==0 (PolyLine)\n"; //FIXME-3
8.32 if (p) p->show();
8.33 break;
8.34 case PolyParabel:
8.35 - if (!p) cout << "LMO::setVis p==0 (PolyParabel) "<<((BranchObj*)this)->getHeading().toStdString()<<endl; //FIXME
8.36 + if (!p) cout << "LMO::setVis p==0 (PolyParabel) "<<((BranchObj*)this)->getHeading().toStdString()<<endl; //FIXME-3
8.37 if (p) p->show();
8.38 break;
8.39 default:
9.1 --- a/mainwindow.cpp Mon Mar 23 09:06:51 2009 +0000
9.2 +++ b/mainwindow.cpp Thu Mar 26 07:49:17 2009 +0000
9.3 @@ -122,7 +122,6 @@
9.4 procBrowser=NULL;
9.5
9.6 // Satellite windows //////////////////////////////////////////
9.7 -
9.8 // history window
9.9 historyWindow=new HistoryWindow();
9.10 connect (historyWindow, SIGNAL (windowClosed() ), this, SLOT (updateActions()));
9.11 @@ -1669,7 +1668,7 @@
9.12 actionFormatLinkColor->addTo( canvasContextMenu );
9.13 actionFormatSelectionColor->addTo( canvasContextMenu );
9.14 actionFormatBackColor->addTo( canvasContextMenu );
9.15 - // actionFormatBackImage->addTo( canvasContextMenu ); //FIXME makes vym too slow: postponed for later version
9.16 + // actionFormatBackImage->addTo( canvasContextMenu ); //FIXME-4 makes vym too slow: postponed for later version
9.17
9.18 // Menu for last opened files
9.19 // Create actions
9.20 @@ -1902,7 +1901,7 @@
9.21
9.22 //tabWidget->currentPage() won't be NULL here, because of above...
9.23 tabWidget->setCurrentIndex (tabIndex);
9.24 - //FIXME no me anymore... me->viewport()->setFocus();
9.25 + //FIXME-3 no me anymore... me->viewport()->setFocus();
9.26
9.27 if (err!=aborted)
9.28 {
9.29 @@ -2018,7 +2017,7 @@
9.30 // call fileSaveAs() now, this will call fileSave()
9.31 // again.
9.32 // First switch to editor
9.33 - //FIXME needed??? tabWidget->setCurrentWidget (m->getMapEditor());
9.34 + //FIXME-3 needed??? tabWidget->setCurrentWidget (m->getMapEditor());
9.35 fileSaveAs(savemode);
9.36 }
9.37
9.38 @@ -2247,7 +2246,7 @@
9.39 if (m) m->exportASCII();
9.40 }
9.41
9.42 -void Main::fileExportCSV() //FIXME not scriptable yet
9.43 +void Main::fileExportCSV() //FIXME-2 not scriptable yet
9.44 {
9.45 VymModel *m=currentModel();
9.46 if (m)
9.47 @@ -2266,7 +2265,7 @@
9.48 }
9.49 }
9.50
9.51 -void Main::fileExportLaTeX() //FIXME not scriptable yet
9.52 +void Main::fileExportLaTeX() //FIXME-2 not scriptable yet
9.53 {
9.54 VymModel *m=currentModel();
9.55 if (m)
9.56 @@ -2285,7 +2284,7 @@
9.57 }
9.58 }
9.59
9.60 -void Main::fileExportKDE3Bookmarks() //FIXME not scriptable yet
9.61 +void Main::fileExportKDE3Bookmarks() //FIXME-2 not scriptable yet
9.62 {
9.63 ExportKDE3Bookmarks ex;
9.64 VymModel *m=currentModel();
9.65 @@ -2296,7 +2295,7 @@
9.66 }
9.67 }
9.68
9.69 -void Main::fileExportKDE4Bookmarks() //FIXME not scriptable yet
9.70 +void Main::fileExportKDE4Bookmarks() //FIXME-2 not scriptable yet
9.71 {
9.72 ExportKDE4Bookmarks ex;
9.73 VymModel *m=currentModel();
9.74 @@ -2307,7 +2306,7 @@
9.75 }
9.76 }
9.77
9.78 -void Main::fileExportTaskjuggler() //FIXME not scriptable yet
9.79 +void Main::fileExportTaskjuggler() //FIXME-2 not scriptable yet
9.80 {
9.81 ExportTaskjuggler ex;
9.82 VymModel *m=currentModel();
9.83 @@ -2326,7 +2325,7 @@
9.84 }
9.85 }
9.86
9.87 -void Main::fileExportOOPresentation() //FIXME not scriptable yet
9.88 +void Main::fileExportOOPresentation() //FIXME-2 not scriptable yet
9.89 {
9.90 ExportOOFileDialog *fd=new ExportOOFileDialog( this,vymName+" - "+tr("Export to")+" Open Office");
9.91 // TODO add preview in dialog
9.92 @@ -2395,7 +2394,7 @@
9.93 // Better would be delete (me), but then we could have a Qt error:
9.94 // "QObject: Do not delete object, 'MapEditor', during its event handler!"
9.95 // So we only remove data now and call deconstructor when vym closes later
9.96 - // FIXME this needs to be moved to vymview... me->clear();
9.97 + // FIXME-3 this needs to be moved to vymview... me->clear();
9.98 // some model->clear is needed to free up memory ...
9.99
9.100 updateActions();
9.101 @@ -2867,7 +2866,7 @@
9.102
9.103 // Calc some stats
9.104 QString stats;
9.105 -/* FIXME no stats at the moment (view dependent...)
9.106 +/* FIXME-2 no stats at the moment (view dependent...)
9.107 stats+=tr("%1 items on map\n","Info about map").arg (mapScene->items().size(),6);
9.108
9.109 uint b=0;
9.110 @@ -3243,7 +3242,7 @@
9.111 }
9.112
9.113
9.114 -void Main::formatHideLinkUnselected() //FIXME get rid of this with imagepropertydialog
9.115 +void Main::formatHideLinkUnselected() //FIXME-3 get rid of this with imagepropertydialog
9.116 {
9.117 VymModel *m=currentModel();
9.118 if (m)
9.119 @@ -3455,7 +3454,7 @@
9.120 historyWindow->update (undoSet);
9.121 }
9.122
9.123 -void Main::updateNoteFlag()
9.124 +void Main::updateNoteFlag()
9.125 {
9.126 // this slot is connected to TextEditor::textHasChanged()
9.127
9.128 @@ -3463,9 +3462,66 @@
9.129 if (m) m->updateNoteFlag();
9.130 }
9.131
9.132 -void Main::updateSatellites(VymModel* model)
9.133 +/*
9.134 +void Main::updateNoteInEditor (VymModel *model, const NoteObj ¬e)
9.135 {
9.136 - branchPropertyWindow->setModel (model );
9.137 + if (model&& model==currentModel() )
9.138 + {
9.139 + textEditor->setNote (note);
9.140 + }
9.141 +}
9.142 +*/
9.143 +
9.144 +void Main::updateContent (QModelIndex index )
9.145 +{
9.146 + cout << "Main::updateContent model="<<sender();
9.147 + TreeItem *ti=((VymModel*)sender())->getItem(index);
9.148 + cout << " item="<<ti->getHeading().toStdString()<<" ("<<ti<<")"<<endl;
9.149 + textEditor->setNote (ti->getNoteObj() );
9.150 +}
9.151 +
9.152 +void Main::changeSelection (VymModel *model, const QItemSelection &newsel, const QItemSelection &oldsel)
9.153 +{
9.154 + //branchPropertyWindow->setModel (model ); //FIXME-1 this used to be called from BranchObj::select()
9.155 + if (model && model==currentModel() )
9.156 + {
9.157 + // NoteEditor
9.158 + TreeItem *ti;
9.159 + if (!oldsel.indexes().isEmpty() )
9.160 + {
9.161 + ti=model->getItem(oldsel.indexes().first());
9.162 + //cout << "Main::changeSel getting note from "<<ti->getHeading().toStdString()<<": \""<<ti->getNote().toStdString()<<"\""<<endl;
9.163 + ti->setNoteObj (textEditor->getNoteObj(),false );
9.164 + }
9.165 + if (!newsel.indexes().isEmpty() )
9.166 + {
9.167 + ti=model->getItem(newsel.indexes().first());
9.168 + if (!ti->getNoteObj().isEmpty() )
9.169 + {
9.170 + //cout << "Main::changeSel setting note of "<<ti->getHeading().toStdString()<<" m=("<<ti->getModel()<<") to \""<<ti->getNote().toStdString()<<"\""<<endl;
9.171 + textEditor->setNote(ti->getNoteObj() );
9.172 + } else
9.173 + textEditor->setNote(NoteObj() );
9.174 + } else
9.175 + {
9.176 + textEditor->setInactive();
9.177 + }
9.178 +
9.179 + // Show URL and link in statusbar
9.180 + QString status;
9.181 + QString s=model->getURL();
9.182 + if (!s.isEmpty() ) status+="URL: "+s+" ";
9.183 + s=model->getVymLink();
9.184 + if (!s.isEmpty() ) status+="Link: "+s;
9.185 + if (!status.isEmpty() ) statusMessage (status);
9.186 +
9.187 +
9.188 + // Update Toolbar // FIXME-1, was so far in BranchObj
9.189 + //updateFlagsToolbar();
9.190 +
9.191 + // Update actions
9.192 + updateActions();
9.193 + }
9.194 }
9.195
9.196 void Main::updateActions()
10.1 --- a/mainwindow.h Mon Mar 23 09:06:51 2009 +0000
10.2 +++ b/mainwindow.h Thu Mar 26 07:49:17 2009 +0000
10.3 @@ -215,7 +215,10 @@
10.4 public slots:
10.5 void windowToggleSmoothPixmap();
10.6 void updateNoteFlag();
10.7 - void updateSatellites(VymModel*);
10.8 +// void updateNoteInEditor (VymModel *model, const NoteObj ¬e);
10.9 + void updateContent (QModelIndex index);
10.10 + void changeSelection (VymModel *model,const QItemSelection &newSel, const QItemSelection &delSel);
10.11 +
10.12 void updateActions();
10.13 ModMode getModMode();
10.14 bool autoEditNewBranch();
11.1 --- a/mapcenterobj.cpp Mon Mar 23 09:06:51 2009 +0000
11.2 +++ b/mapcenterobj.cpp Thu Mar 26 07:49:17 2009 +0000
11.3 @@ -175,11 +175,11 @@
11.4 s+=frame->saveToDir ();
11.5
11.6 // Update of note is usually done while unselecting a branch
11.7 - if (isNoteInEditor) getNoteFromTextEditor();
11.8 + //if (isNoteInEditor) getNoteFromTextEditor(); FIXME-3
11.9
11.10 // save note
11.11 - if (!note.isEmpty() )
11.12 - s+=note.saveToDir();
11.13 + if (!treeItem->getNoteObj().isEmpty() )
11.14 + s+=treeItem->getNoteObj().saveToDir();
11.15
11.16 // Save branches
11.17 for (int i=0; i<branch.size(); ++i)
12.1 --- a/mapeditor.cpp Mon Mar 23 09:06:51 2009 +0000
12.2 +++ b/mapeditor.cpp Thu Mar 26 07:49:17 2009 +0000
12.3 @@ -43,7 +43,7 @@
12.4 model=vm;
12.5 model->setScene (mapScene);
12.6 model->registerEditor(this);
12.7 -// model->addMapCenter(); // FIXME create this in MapEditor until BO and MCO are independent of scene
12.8 +// model->addMapCenter(); // FIXME-3 create this in MapEditor until BO and MCO are independent of scene
12.9 model->makeDefault(); // No changes in model so far
12.10
12.11 setScene (mapScene);
12.12 @@ -70,7 +70,7 @@
12.13
12.14 setAcceptDrops (true);
12.15
12.16 - //model->reposition(); //FIXME really still needed?
12.17 + //model->reposition(); //FIXME-3 really still needed?
12.18
12.19
12.20 // Action to embed LineEdit for heading in Scene
12.21 @@ -93,7 +93,7 @@
12.22 selectionColor =QColor (255,255,0);
12.23
12.24
12.25 - // Attributes //FIXME testing only...
12.26 + // Attributes //FIXME-2 testing only...
12.27 QString k;
12.28 AttributeDef *ad;
12.29 attrTable= new AttributeTable();
12.30 @@ -128,7 +128,7 @@
12.31
12.32 MapEditor::~MapEditor()
12.33 {
12.34 - cout <<"Destructor MapEditor for "<<model->getMapName().toStdString()<<endl;
12.35 + //cout <<"Destructor MapEditor for "<<model->getMapName().toStdString()<<endl;
12.36 // No need to remove tmp files:
12.37 // tmpMapDir is in tmpVymDir,
12.38 // so it gets removed automagically when vym closes
12.39 @@ -217,7 +217,7 @@
12.40 font.setPointSize(10);
12.41 pp.setFont (font);
12.42 QRectF footerBox(0,viewBottom,printer->width(),15);
12.43 - // FIXME fileName not any longer available here: pp.drawText ( footerBox,Qt::AlignLeft,"VYM - " +fileName);
12.44 + // FIXME-3 fileName not any longer available here: pp.drawText ( footerBox,Qt::AlignLeft,"VYM - " +fileName);
12.45 pp.drawText ( footerBox, Qt::AlignRight, QDate::currentDate().toString(Qt::TextDate));
12.46 }
12.47 mapScene->render (
12.48 @@ -414,21 +414,21 @@
12.49 if (model->getSelectedBranch() )
12.50 {
12.51 // Context Menu on branch or mapcenter
12.52 - //FIXME model->updateActions(); needed?
12.53 + //FIXME-3 model->updateActions(); needed?
12.54 branchContextMenu->popup(e->globalPos() );
12.55 } else
12.56 {
12.57 if (model->getSelectedFloatImage() )
12.58 {
12.59 // Context Menu on floatimage
12.60 - // model->updateActions(); FIXME needed?
12.61 + // model->updateActions(); FIXME-3 needed?
12.62 floatimageContextMenu->popup(e->globalPos() );
12.63 }
12.64 }
12.65 } else
12.66 { // No MapObj found, we are on the Canvas itself
12.67 // Context Menu on scene
12.68 - // model->updateActions(); FIXME needed?
12.69 + // model->updateActions(); FIXME-3 needed?
12.70
12.71 // Open context menu synchronously to position new mapcenter
12.72 model->setContextPos (p);
12.73 @@ -513,7 +513,7 @@
12.74 mainWindow->windowToggleNoteEditor();
12.75 else if (foname=="hideInExport")
12.76 model->toggleHideExport();
12.77 - // FIXME needed? xelection.update();
12.78 + // FIXME-3 needed? xelection.update();
12.79 return;
12.80 }
12.81 }
12.82 @@ -558,7 +558,7 @@
12.83 */
12.84 // Select the clicked object
12.85
12.86 - // FIXME VM better let "find" return an index instead of lmo...
12.87 + // FIXME-2 VM better let "find" return an index instead of lmo...
12.88 // Get index of clicked LMO
12.89 TreeItem *ti=lmo->getTreeItem();
12.90 /*
12.91 @@ -603,8 +603,8 @@
12.92 // a button in the toolbar)
12.93 if (e->button() == Qt::MidButton )
12.94 model->toggleScroll();
12.95 - // model->updateActions(); FIXME needed?
12.96 - // FIXME needed? xelection.update();
12.97 + // model->updateActions(); FIXME-3 needed?
12.98 + // FIXME-3 needed? xelection.update();
12.99 } else
12.100 { // No MapObj found, we are on the scene itself
12.101 // Left Button move Pos of sceneView
12.102 @@ -799,7 +799,7 @@
12.103 {
12.104 tmpXLink->setEnd ( ((BranchObj*)(dst)) );
12.105 tmpXLink->updateXLink();
12.106 - tmpXLink->activate(); //FIXME savestate missing
12.107 + tmpXLink->activate(); //FIXME-2 savestate missing
12.108 //model->saveStateComplete(QString("Activate xLink from %1 to %2").arg(model->getObjectName(tmpXLink->getBegin())).arg(model->getObjectName(tmpXLink->getEnd())) );
12.109 } else
12.110 {
12.111 @@ -947,13 +947,13 @@
12.112 model->reposition();
12.113 }
12.114 }
12.115 - model->updateSelection(); //FIXME needed? at least not after pos of selection has changed...
12.116 + model->updateSelection(); //FIXME-3 needed? at least not after pos of selection has changed...
12.117 // Finally resize scene, if needed
12.118 scene()->update();
12.119 movingObj=NULL;
12.120
12.121 // Just make sure, that actions are still ok,e.g. the move branch up/down buttons...
12.122 - // model->updateActions(); FIXME neeeded?
12.123 + // model->updateActions(); FIXME-3 neeeded?
12.124 } else
12.125 // maybe we moved View: set old cursor
12.126 setCursor (Qt::ArrowCursor);
12.127 @@ -1108,10 +1108,10 @@
12.128 }
12.129 }
12.130
12.131 -void MapEditor::updateCurrent (const QModelIndex &,const QModelIndex &) //FIXME not used?
12.132 +void MapEditor::updateCurrent (const QModelIndex &,const QModelIndex &) //FIXME-3 not used?
12.133 {
12.134
12.135 -/* FIXME testing
12.136 +/* testing
12.137
12.138 cout << "ME::updateCurrent\n";
12.139
13.1 --- a/noteobj.cpp Mon Mar 23 09:06:51 2009 +0000
13.2 +++ b/noteobj.cpp Thu Mar 26 07:49:17 2009 +0000
13.3 @@ -20,11 +20,16 @@
13.4 note=s;
13.5 }
13.6
13.7 +void NoteObj::operator= (const NoteObj &other)
13.8 +{
13.9 + copy (other);
13.10 +}
13.11 +
13.12 void NoteObj::copy (NoteObj other)
13.13 {
13.14 note=other.note;
13.15 fonthint=other.fonthint;
13.16 - filenamehint="";
13.17 + filenamehint=other.filenamehint;
13.18 }
13.19
13.20 void NoteObj::clear()
13.21 @@ -39,7 +44,7 @@
13.22 note=s;
13.23 }
13.24
13.25 -QString NoteObj::getNote()
13.26 +QString NoteObj::getNote() const
13.27 {
13.28 return note;
13.29 }
13.30 @@ -51,7 +56,7 @@
13.31
13.32 QString NoteObj::getNoteASCII(const QString &indent, const int &width)
13.33 {
13.34 - // FIXME make use of width
13.35 + // FIXME-3 make use of width
13.36 QString r=note;
13.37
13.38 // Remove all <style...> ...</style>
13.39 @@ -90,7 +95,7 @@
13.40 r.replace (rx,indent);
13.41 r=indent + r; // Don't forget first line
13.42
13.43 -/* FIXME wrap text at width
13.44 +/* FIXME-2 wrap text at width
13.45 if (fonthint !="fixed")
13.46 {
13.47 }
13.48 @@ -143,7 +148,7 @@
13.49 fonthint=s;
13.50 }
13.51
13.52 -QString NoteObj::getFontHint()
13.53 +QString NoteObj::getFontHint() const
13.54 {
13.55 // only for backward compatibility (pre 1.5 )
13.56 return fonthint;
13.57 @@ -154,7 +159,7 @@
13.58 filenamehint=s;
13.59 }
13.60
13.61 -QString NoteObj::getFilenameHint()
13.62 +QString NoteObj::getFilenameHint() const
13.63 {
13.64 return filenamehint;
13.65 }
14.1 --- a/noteobj.h Mon Mar 23 09:06:51 2009 +0000
14.2 +++ b/noteobj.h Thu Mar 26 07:49:17 2009 +0000
14.3 @@ -15,17 +15,18 @@
14.4 public:
14.5 NoteObj();
14.6 NoteObj(const QString&);
14.7 + void operator= (const NoteObj &);
14.8 void copy (NoteObj);
14.9 void clear();
14.10 void setNote (const QString&);
14.11 - QString getNote();
14.12 + QString getNote() const;
14.13 QString getNoteASCII();
14.14 - QString getNoteASCII(const QString &indent, const int &width);
14.15 + QString getNoteASCII(const QString &indent, const int &width=0);
14.16 QString getNoteOpenDoc();
14.17 void setFontHint (const QString&);
14.18 - QString getFontHint ();
14.19 + QString getFontHint () const;
14.20 void setFilenameHint (const QString&);
14.21 - QString getFilenameHint ();
14.22 + QString getFilenameHint () const;
14.23 bool isEmpty();
14.24 QString saveToDir();
14.25
15.1 --- a/ornamentedobj.cpp Mon Mar 23 09:06:51 2009 +0000
15.2 +++ b/ornamentedobj.cpp Thu Mar 26 07:49:17 2009 +0000
15.3 @@ -45,10 +45,6 @@
15.4 heading = new HeadingObj(scene);
15.5 heading->move (absPos.x(), absPos.y());
15.6
15.7 - note.setNote("");
15.8 - note.setFontHint (textEditor->getFontHintDefault() );
15.9 - isNoteInEditor=false;
15.10 -
15.11 systemFlags=new FlagRowObj(scene);
15.12 systemFlags->clone(systemFlagsDefault);
15.13 systemFlags->setName ("systemFlags");
15.14 @@ -75,7 +71,6 @@
15.15 heading->copy(other->heading);
15.16 setColor (other->heading->getColor());
15.17
15.18 - note.copy (other->note);
15.19 systemFlags->copy (other->systemFlags);
15.20 standardFlags->copy (other->standardFlags);
15.21
15.22 @@ -260,38 +255,6 @@
15.23 move2RelPos (p.x(),p.y());
15.24 }
15.25
15.26 -void OrnamentedObj::setNote(QString s)
15.27 -{
15.28 - note.setNote(s);
15.29 - updateNoteFlag();
15.30 -}
15.31 -
15.32 -void OrnamentedObj::setNote(NoteObj n)
15.33 -{
15.34 - note=n;
15.35 - updateNoteFlag();
15.36 -}
15.37 -
15.38 -QString OrnamentedObj::getNote()
15.39 -{
15.40 - return note.getNote();
15.41 -}
15.42 -
15.43 -QString OrnamentedObj::getNoteASCII(const QString &indent, const int &width)
15.44 -{
15.45 - return note.getNoteASCII(indent,width);
15.46 -}
15.47 -
15.48 -QString OrnamentedObj::getNoteASCII()
15.49 -{
15.50 - return note.getNoteASCII();
15.51 -}
15.52 -
15.53 -QString OrnamentedObj::getNoteOpenDoc()
15.54 -{
15.55 - return note.getNoteOpenDoc();
15.56 -}
15.57 -
15.58 void OrnamentedObj::setURL(QString s)
15.59 {
15.60 url=s;
15.61 @@ -407,20 +370,25 @@
15.62 return false;
15.63 }
15.64
15.65 -void OrnamentedObj::getNoteFromTextEditor ()
15.66 +/* FIXME-3 should move to VymView ?! void OrnamentedObj::getNoteFromTextEditor ()
15.67 {
15.68 note.setFilenameHint (textEditor->getFilename());
15.69 note.setFontHint (textEditor->getFontHint() );
15.70 setNote( textEditor->getText() );
15.71 }
15.72 +*/
15.73
15.74 -void OrnamentedObj::updateNoteFlag()
15.75 +void OrnamentedObj::updateSystemFlags()
15.76 {
15.77 - bool noteEmpty;
15.78 + // FIXME-3 check if note here and text in editor are still in sync!!
15.79 + // Best would be to always have current text here...
15.80 + bool noteEmpty=treeItem->getNoteObj().isEmpty();
15.81 + /*
15.82 if (isNoteInEditor)
15.83 noteEmpty=textEditor->isEmpty();
15.84 else
15.85 noteEmpty=note.isEmpty();
15.86 + */
15.87
15.88 if (!noteEmpty)
15.89 {
15.90 @@ -432,12 +400,11 @@
15.91 if (!systemFlags->isActive ("note")) return;
15.92 systemFlags->deactivate("note");
15.93 }
15.94 - model->setChanged();
15.95 + //model->setChanged();
15.96 calcBBoxSize();
15.97 positionBBox();
15.98 move (absPos.x(), absPos.y() );
15.99 forceReposition();
15.100 -
15.101 }
15.102
15.103 void OrnamentedObj::updateFlagsToolbar()
16.1 --- a/ornamentedobj.h Mon Mar 23 09:06:51 2009 +0000
16.2 +++ b/ornamentedobj.h Thu Mar 26 07:49:17 2009 +0000
16.3 @@ -53,12 +53,6 @@
16.4 virtual void moveBy (QPointF);
16.5 virtual void move2RelPos (QPointF); // move relativly to parent^
16.6 virtual void move2RelPos (double,double);
16.7 - virtual void setNote(QString); // set note
16.8 - virtual void setNote(NoteObj); // set note
16.9 - virtual QString getNote(); // returns note (HTML)
16.10 - virtual QString getNoteASCII(const QString &indent, const int &width); // returns note (ASCII)
16.11 - virtual QString getNoteASCII(); // returns note (ASCII)
16.12 - virtual QString getNoteOpenDoc(); // returns note (OpenDoc)
16.13
16.14 virtual void setURL (QString);
16.15 virtual QString getURL ();
16.16 @@ -76,18 +70,16 @@
16.17 virtual bool isSetStandardFlag(QString);
16.18 virtual QString getSystemFlagName (const QPointF &p);
16.19 virtual bool isActiveFlag(const QString&); // check if flag is set
16.20 - virtual void updateNoteFlag();
16.21 - virtual void getNoteFromTextEditor ();
16.22 + virtual void updateSystemFlags();
16.23 + //virtual void getNoteFromTextEditor ();// FIXME should move to vymview?!
16.24 virtual void updateFlagsToolbar();
16.25 virtual void setHideInExport(bool); // set export of object (and children)
16.26 - virtual bool hideInExport();
16.27 - virtual bool isHidden ();
16.28 + virtual bool hideInExport(); // FIXME moved to treeitem
16.29 + virtual bool isHidden (); // FIXME moved to treeitem
16.30 virtual QString getOrnXMLAttr(); // get attributes for saveToDir
16.31
16.32 protected:
16.33 HeadingObj *heading; // Heading
16.34 - NoteObj note; // Notes
16.35 - bool isNoteInEditor; // true if TextEditor has this note
16.36 FlagRowObj *systemFlags; // System Flags
16.37 FlagRowObj *standardFlags; // Standard Flags
16.38 FrameObj *frame; // frame around object
16.39 @@ -97,7 +89,7 @@
16.40 QList <Attribute> attributes; // List with attributes
16.41
16.42 bool hideExport; // hide in exports if set
16.43 - bool hidden; // true if temporary hidden
16.44 + bool hidden; // true if temporary hidden // FIXME moved to treeitem needs to move
16.45 };
16.46
16.47 #endif
17.1 --- a/scripts/update-bookmarks Mon Mar 23 09:06:51 2009 +0000
17.2 +++ b/scripts/update-bookmarks Thu Mar 26 07:49:17 2009 +0000
17.3 @@ -7,3 +7,4 @@
17.4 # And now the same using QDBUS in KDE 4:
17.5
17.6 qdbus| grep konqueror- | xargs -iOBJECT qdbus OBJECT /KBookmarkManager/konqueror org.kde.KIO.KBookmarkManager.notifyCompleteChange
17.7 +#qdbus| grep konqueror- | xargs -iOBJECT qdbus OBJECT /KBookmarkManager/kfilePlaces org.kde.KIO.KBookmarkManager.notifyCompleteChange
18.1 --- a/selection.cpp Mon Mar 23 09:06:51 2009 +0000
18.2 +++ b/selection.cpp Thu Mar 26 07:49:17 2009 +0000
18.3 @@ -26,7 +26,7 @@
18.4 model=m;
18.5 }
18.6
18.7 -void Selection::update() // FIXME VM emit signal in VM instead and get rid of this
18.8 +void Selection::update() // FIXME-2 VM emit signal in VM instead and get rid of this
18.9 {
18.10 /*
18.11 QRectF bbox;
18.12 @@ -88,19 +88,6 @@
18.13 void Selection::unselect()
18.14 {
18.15 model->unselect();
18.16 - /*
18.17 - cout << "Sel::unselect\n";
18.18 - if (!selectList.isEmpty() )
18.19 - {
18.20 - for (int i=0; i< selectList.count(); ++i)
18.21 - selectList.at(i)->unselect();
18.22 - lastSelectList=selectList;
18.23 - selectList.clear();
18.24 - // FIXME VM move to ME
18.25 - //while (!selboxList.isEmpty() )
18.26 - // delete selboxList.takeFirst();
18.27 - }
18.28 - */
18.29 }
18.30
18.31 bool Selection::isBlocked()
18.32 @@ -164,7 +151,7 @@
18.33 TreeItem* Selection::getBranchItem()
18.34 {
18.35 BranchObj* bo=getBranch();
18.36 - if (bo) return bo->getTreeItem(); // FIXME VM get directly from treemodl
18.37 + if (bo) return bo->getTreeItem(); // VM get directly from treemodl
18.38 return NULL;
18.39 }
18.40
18.41 @@ -186,7 +173,7 @@
18.42 return NULL;
18.43 }
18.44
18.45 -QString Selection::getSelectString() // FIXME VM this is also in VM ?! clean up here...
18.46 +QString Selection::getSelectString() // FIXME-2 VM this is also in VM ?! clean up here...
18.47 // TODO no multiselections yet
18.48 {
18.49 if (selectList.count()==1)
19.1 --- a/texteditor.cpp Mon Mar 23 09:06:51 2009 +0000
19.2 +++ b/texteditor.cpp Thu Mar 26 07:49:17 2009 +0000
19.3 @@ -186,6 +186,29 @@
19.4 return filenameHint;
19.5 }
19.6
19.7 +QString TextEditor::getText()
19.8 +{
19.9 + if (e->toPlainText().isEmpty())
19.10 + return QString();
19.11 + else
19.12 + return e->text();
19.13 +}
19.14 +
19.15 +NoteObj TextEditor::getNoteObj()
19.16 +{
19.17 + NoteObj note (getText() );
19.18 + note.setFontHint (getFontHint() );
19.19 + note.setFilenameHint (getFilenameHint () );
19.20 + return note;
19.21 +}
19.22 +
19.23 +void TextEditor::setNote (const NoteObj ¬e)
19.24 +{
19.25 + setText (note.getNote() );
19.26 + setFilenameHint (note.getFilenameHint() );
19.27 + setFontHint (note.getFontHint() );
19.28 +}
19.29 +
19.30 bool TextEditor::findText(const QString &t, const QTextDocument::FindFlags &flags)
19.31 {
19.32 if (e->find (t,flags))
19.33 @@ -504,14 +527,6 @@
19.34 return;
19.35 }
19.36
19.37 -QString TextEditor::getText()
19.38 -{
19.39 - if (e->toPlainText().isEmpty())
19.40 - return "";
19.41 - else
19.42 - return e->text();
19.43 -}
19.44 -
19.45 void TextEditor::editorChanged()
19.46 {
19.47 if (isEmpty())
19.48 @@ -528,7 +543,7 @@
19.49 }
19.50
19.51
19.52 -void TextEditor::setText(QString t)
19.53 +void TextEditor::setText(const QString &t)
19.54 {
19.55 blockChangedSignal=true;
19.56 e->setReadOnly(false);
20.1 --- a/texteditor.h Mon Mar 23 09:06:51 2009 +0000
20.2 +++ b/texteditor.h Thu Mar 26 07:49:17 2009 +0000
20.3 @@ -6,6 +6,7 @@
20.4 enum EditorState {inactiveEditor,emptyEditor,filledEditor};
20.5
20.6 class MyTextEdit;
20.7 +class NoteObj;
20.8
20.9 class TextEditor : public QMainWindow {
20.10 Q_OBJECT
20.11 @@ -23,6 +24,10 @@
20.12 QString getFilename ();
20.13 void setFilenameHint (const QString&);
20.14 QString getFilenameHint ();
20.15 + QString getText();
20.16 + NoteObj getNoteObj();
20.17 + void setNote(const NoteObj ¬e);
20.18 +
20.19 bool findText(const QString &, const QTextDocument::FindFlags &); // find Text
20.20
20.21 protected:
20.22 @@ -33,13 +38,10 @@
20.23 void closeEvent( QCloseEvent* );
20.24
20.25
20.26 -public:
20.27 - QString getText();
20.28 -
20.29 public slots:
20.30 - void editorChanged(); // received when text() changed
20.31 - void setText(QString); // set Text (by MapEditor)
20.32 - void setInactive(); // Nothing can be entered
20.33 + void editorChanged(); // received when text() changed
20.34 + void setText(const QString &); // set Text (by MapEditor)
20.35 + void setInactive(); // Nothing can be entered
20.36 void editCopyAll();
20.37
20.38 signals:
21.1 --- a/treeitem.cpp Mon Mar 23 09:06:51 2009 +0000
21.2 +++ b/treeitem.cpp Thu Mar 26 07:49:17 2009 +0000
21.3 @@ -1,10 +1,16 @@
21.4 +#include <iostream>
21.5 +using namespace std;
21.6 +
21.7 #include <QStringList>
21.8
21.9 #include "branchobj.h"
21.10 #include "treeitem.h"
21.11 +#include "vymmodel.h"
21.12
21.13 TreeItem::TreeItem(const QList<QVariant> &data, TreeItem *parent)
21.14 {
21.15 + model=NULL;
21.16 +
21.17 parentItem = parent;
21.18 itemData = data;
21.19 lmo=NULL;
21.20 @@ -12,6 +18,12 @@
21.21 branchOffset=0;
21.22 branchCounter=0;
21.23 lastSelectedBranchNum=-1;
21.24 +
21.25 + note.setNote("");
21.26 + // note.setFontHint (textEditor->getFontHintDefault() ); //FIXME-2
21.27 + // isNoteInEditor=false;
21.28 +
21.29 +
21.30 }
21.31
21.32 TreeItem::~TreeItem()
21.33 @@ -19,10 +31,36 @@
21.34 qDeleteAll(childItems);
21.35 }
21.36
21.37 +QString TreeItem::saveToDir (const QString &tmpdir,const QString &prefix, const QPointF& offset)
21.38 +{
21.39 + qWarning ("TreeItem::saveToDir called directly");
21.40 + return QString();
21.41 +}
21.42 +
21.43 +
21.44 +/*
21.45 +void TreeItem::copy (OrnamentedObj* other) //FIXME-2
21.46 +
21.47 +{
21.48 + note.copy (other->note);
21.49 + model=other->model;
21.50 +}
21.51 +*/
21.52 +
21.53 +void TreeItem::setModel (VymModel *m)
21.54 +{
21.55 + model=m;
21.56 +}
21.57 +
21.58 +VymModel* TreeItem::getModel ()
21.59 +{
21.60 + return model;
21.61 +}
21.62
21.63 void TreeItem::appendChild(TreeItem *item)
21.64 {
21.65 childItems.append(item);
21.66 + item->setModel (model);
21.67
21.68 if (item->type == Branch || item->type ==MapCenter)
21.69 {
21.70 @@ -32,8 +70,6 @@
21.71 }
21.72 }
21.73
21.74 -#include <iostream>
21.75 -using namespace std;
21.76 void TreeItem::removeChild(int row)
21.77 {
21.78 if (row<0 || row > childItems.size()-1)
21.79 @@ -109,7 +145,7 @@
21.80 case Undefined: return -1;
21.81 case MapCenter: return parentItem->childItems.indexOf (this) - branchOffset;
21.82 case Branch: return parentItem->childItems.indexOf (this) - branchOffset;
21.83 - case Image: return -1; // FIXME
21.84 + case Image: return -1; // FIXME-2
21.85 default: return -1;
21.86 }
21.87
21.88 @@ -132,26 +168,43 @@
21.89
21.90 void TreeItem::setNote(const QString s)
21.91 {
21.92 - switch (type)
21.93 - {
21.94 - case MapCenter:
21.95 - ((BranchObj*)lmo)->setNote(s);
21.96 - break;
21.97 - case Branch:
21.98 - ((BranchObj*)lmo)->setNote(s);
21.99 - break;
21.100 - default: ;
21.101 - }
21.102 + note.setNote(s);
21.103 + // updateNoteFlag(); FIXME-2 needed?
21.104 + if (model)
21.105 + model->emitContentHasChanged (this);
21.106 +}
21.107 +
21.108 +void TreeItem::setNoteObj(const NoteObj &n, bool updateNoteEditor)
21.109 +{
21.110 + note=n;
21.111 + // updateNoteFlag(); FIXME-2 needed?
21.112 + if (model && updateNoteEditor)
21.113 + model->emitContentHasChanged (this);
21.114 }
21.115
21.116 QString TreeItem::getNote()
21.117 {
21.118 - switch (type)
21.119 - {
21.120 - case MapCenter: return ((BranchObj*)lmo)->getNote();
21.121 - case Branch: return ((BranchObj*)lmo)->getNote();
21.122 - default: return QString ();
21.123 - }
21.124 + return note.getNote();
21.125 +}
21.126 +
21.127 +NoteObj TreeItem::getNoteObj()
21.128 +{
21.129 + return note;
21.130 +}
21.131 +
21.132 +QString TreeItem::getNoteASCII(const QString &indent, const int &width)
21.133 +{
21.134 + return note.getNoteASCII(indent,width);
21.135 +}
21.136 +
21.137 +QString TreeItem::getNoteASCII()
21.138 +{
21.139 + return note.getNoteASCII();
21.140 +}
21.141 +
21.142 +QString TreeItem::getNoteOpenDoc()
21.143 +{
21.144 + return note.getNoteOpenDoc();
21.145 }
21.146
21.147 void TreeItem::setType(const Type t)
21.148 @@ -221,7 +274,7 @@
21.149 return getBranchNum (lastSelectedBranchNum);
21.150 }
21.151
21.152 -LinkableMapObj* TreeItem::getLMO() // FIXME VM should be unnecessary in the end
21.153 +LinkableMapObj* TreeItem::getLMO() // FIXME-3 VM should be unnecessary in the end
21.154 {
21.155 return lmo;
21.156 }
22.1 --- a/treeitem.h Mon Mar 23 09:06:51 2009 +0000
22.2 +++ b/treeitem.h Thu Mar 26 07:49:17 2009 +0000
22.3 @@ -4,16 +4,25 @@
22.4 #include <QList>
22.5 #include <QVariant>
22.6
22.7 +#include "noteobj.h"
22.8 +#include "xmlobj.h"
22.9 +
22.10 class LinkableMapObj;
22.11 +class VymModel;
22.12
22.13 -class TreeItem
22.14 +class TreeItem:public XMLObj
22.15 {
22.16 public:
22.17 enum Type {Undefined,MapCenter,Branch,Image};
22.18 TreeItem(const QList<QVariant> &data, TreeItem *parent = 0);
22.19 ~TreeItem();
22.20 + QString saveToDir (const QString &tmpdir,const QString &prefix, const QPointF& offset);
22.21 +
22.22
22.23 // General housekeeping
22.24 + void setModel (VymModel *m);
22.25 + VymModel* getModel();
22.26 +
22.27 void appendChild (TreeItem *child);
22.28 void removeChild (int row);
22.29
22.30 @@ -33,8 +42,22 @@
22.31 QVariant data(int column) const;
22.32 void setHeading (const QString s);
22.33 QString getHeading();
22.34 +
22.35 +protected:
22.36 + NoteObj note;
22.37 +public:
22.38 void setNote(const QString s);
22.39 QString getNote();
22.40 + virtual void setNoteObj(const NoteObj &, bool updateNoteEditor=true);
22.41 + virtual NoteObj getNoteObj();
22.42 + virtual QString getNoteASCII(const QString &indent, const int &width); // returns note (ASCII)
22.43 + virtual QString getNoteASCII(); // returns note (ASCII)
22.44 + virtual QString getNoteOpenDoc(); // returns note (OpenDoc)
22.45 +
22.46 +
22.47 +protected:
22.48 + Type type;
22.49 +public:
22.50 void setType (const Type t);
22.51 Type getType ();
22.52 QString getTypeName ();
22.53 @@ -53,16 +76,19 @@
22.54 void setLMO (LinkableMapObj*);
22.55
22.56 protected:
22.57 + VymModel *model;
22.58 +
22.59 QList<TreeItem*> childItems;
22.60 QList<QVariant> itemData;
22.61 TreeItem *parentItem;
22.62
22.63 - Type type;
22.64 LinkableMapObj *lmo;
22.65
22.66 int branchOffset;
22.67 int branchCounter;
22.68 int lastSelectedBranchNum;
22.69 +
22.70 + bool hidden; //! Hidden in export if true
22.71 };
22.72
22.73 #endif
23.1 --- a/treemodel.cpp Mon Mar 23 09:06:51 2009 +0000
23.2 +++ b/treemodel.cpp Thu Mar 26 07:49:17 2009 +0000
23.3 @@ -81,7 +81,8 @@
23.4 if (!parentItem)
23.5 {
23.6 cout <<"TreeModel::parent ti=="<<ti<<" "<<ti->getHeading().toStdString()<<endl;
23.7 - return QModelIndex(); // FIXME do this to avoid segfault, but why?
23.8 + return QModelIndex(); // FIXME-3 do this to avoid segfault, but why?
23.9 + // see also my question on qt-interest in march
23.10 }
23.11
23.12 return createIndex(parentItem->childNumber(), 0, parentItem);
23.13 @@ -185,9 +186,7 @@
23.14 cout << "TreeModel::removeRows row="<<row<<" count="<<count<<" last="<<last<<endl;
23.15 TreeItem *pi= getItem (parent);
23.16 cout << " pi="<<pi<<" "<<pi->getHeading().toStdString()<<endl;
23.17 - cout << " ok0\n";
23.18 beginRemoveRows (parent,row,last);
23.19 - cout << " ok1\n";
23.20
23.21 for (int i=row; i<=last; i++)
23.22 {
24.1 --- a/version.h Mon Mar 23 09:06:51 2009 +0000
24.2 +++ b/version.h Thu Mar 26 07:49:17 2009 +0000
24.3 @@ -7,7 +7,7 @@
24.4 #define __VYM_VERSION "1.13.0"
24.5 //#define __VYM_CODENAME "Codename: RC-1"
24.6 #define __VYM_CODENAME "Codename: development version"
24.7 -#define __VYM_BUILD_DATE "2009-03-19"
24.8 +#define __VYM_BUILD_DATE "2009-03-24"
24.9
24.10
24.11 bool checkVersion(const QString &);
25.1 --- a/vym.pro Mon Mar 23 09:06:51 2009 +0000
25.2 +++ b/vym.pro Thu Mar 26 07:49:17 2009 +0000
25.3 @@ -31,6 +31,7 @@
25.4 attributedelegate.h\
25.5 attributedialog.h \
25.6 attributewidget.h \
25.7 + branchitem.h \
25.8 branchobj.h \
25.9 branchpropwindow.h\
25.10 editxlinkdialog.h \
25.11 @@ -87,6 +88,7 @@
25.12 attributedelegate.cpp \
25.13 attributedialog.cpp \
25.14 attributewidget.cpp \
25.15 + branchitem.cpp \
25.16 branchobj.cpp \
25.17 branchpropwindow.cpp \
25.18 editxlinkdialog.cpp \
26.1 --- a/vymmodel.cpp Mon Mar 23 09:06:51 2009 +0000
26.2 +++ b/vymmodel.cpp Thu Mar 26 07:49:17 2009 +0000
26.3 @@ -53,6 +53,7 @@
26.4 {
26.5 // cout << "Const VymModel\n";
26.6 init();
26.7 + rootItem->setModel (this);
26.8 }
26.9
26.10
26.11 @@ -69,22 +70,22 @@
26.12 selModel->clearSelection();
26.13
26.14 // Remove stuff
26.15 - while (!mapCenters.isEmpty()) // FIXME VM needs to be in treemodel only...
26.16 + while (!mapCenters.isEmpty()) // FIXME-2 VM needs to be in treemodel only...
26.17 delete mapCenters.takeFirst();
26.18
26.19 QModelIndex ri=index(rootItem);
26.20 - //removeRows (0, rowCount(ri),ri); // FIXME here should be at least a beginRemoveRows...
26.21 + //removeRows (0, rowCount(ri),ri); // FIXME-2 here should be at least a beginRemoveRows...
26.22 }
26.23
26.24 void VymModel::init ()
26.25 {
26.26 // We should have at least one map center to start with
26.27 - // addMapCenter(); FIXME VM create this in MapEditor as long as model is part of that
26.28 + // addMapCenter(); FIXME-2 VM create this in MapEditor as long as model is part of that
26.29
26.30 // No MapEditor yet
26.31 mapEditor=NULL;
26.32
26.33 - // Also no scene yet (should not be needed anyway) FIXME VM
26.34 + // Also no scene yet (should not be needed anyway) FIXME-3 VM
26.35 mapScene=NULL;
26.36
26.37 // History
26.38 @@ -150,7 +151,7 @@
26.39 netstate=Offline;
26.40
26.41 // Create MapCenter
26.42 - // addMapCenter(); FIXME VM create this in MapEditor until BO and MCO are independent of scene
26.43 + // addMapCenter(); FIXME-2 VM create this in MapEditor until BO and MCO are independent of scene
26.44
26.45 }
26.46
26.47 @@ -164,7 +165,7 @@
26.48 }
26.49
26.50
26.51 -MapEditor* VymModel::getMapEditor() // FIXME VM better return favourite editor here
26.52 +MapEditor* VymModel::getMapEditor() // FIXME-2 VM better return favourite editor here
26.53 {
26.54 return mapEditor;
26.55 }
26.56 @@ -174,7 +175,7 @@
26.57 return blockReposition;
26.58 }
26.59
26.60 -void VymModel::updateActions() // FIXME maybe don't update if blockReposition is set
26.61 +void VymModel::updateActions() // FIXME-2 maybe don't update if blockReposition is set
26.62 {
26.63 cout << "VymModel::updateActions \n";
26.64 // Tell mainwindow to update states of actions
26.65 @@ -233,12 +234,12 @@
26.66 s+=xml.beginElement("vymmap",mapAttr);
26.67 xml.incIndent();
26.68
26.69 - // Find the used flags while traversing the tree // FIXME this can be done local to vymmodel maybe...
26.70 + // Find the used flags while traversing the tree // FIXME-2 this can be done local to vymmodel maybe...
26.71 standardFlagsDefault->resetUsedCounter();
26.72
26.73 // Reset the counters before saving
26.74 // TODO constr. of FIO creates lots of objects, better do this in some other way...
26.75 - FloatImageObj (mapScene).resetSaveCounter();// FIXME this can be done local to vymmodel maybe...
26.76 + FloatImageObj (mapScene).resetSaveCounter();// FIXME-2 this can be done local to vymmodel maybe...
26.77
26.78 // Build xml recursivly
26.79 if (!saveSel || typeid (*saveSel) == typeid (MapCenterObj))
26.80 @@ -350,7 +351,7 @@
26.81 if (lmode==NewMap)
26.82 {
26.83 selModel->clearSelection();
26.84 - // FIXME VM not needed??? model->setMapEditor(this);
26.85 + // FIXME-2 VM not needed??? model->setMapEditor(this);
26.86 // (map state is set later at end of load...)
26.87 } else
26.88 {
26.89 @@ -464,7 +465,7 @@
26.90 file.close();
26.91 if ( ok )
26.92 {
26.93 - reposition(); // FIXME VM reposition the view instead...
26.94 + reposition(); // FIXME-2 VM reposition the view instead...
26.95 selection.update();
26.96 if (lmode==NewMap)
26.97 {
26.98 @@ -889,7 +890,7 @@
26.99 {
26.100 importDirInt (fd->selectedFile() );
26.101 reposition();
26.102 - //FIXME VM needed? scene()->update();
26.103 + //FIXME-3 VM needed? scene()->update();
26.104 }
26.105 }
26.106 }
26.107 @@ -932,7 +933,7 @@
26.108 QDateTime tmod=QFileInfo (filePath).lastModified();
26.109 if (tmod>fileChangedTime)
26.110 {
26.111 - // FIXME VM switch to current mapeditor and finish lineedits...
26.112 + // FIXME-2 VM switch to current mapeditor and finish lineedits...
26.113 QMessageBox mb( vymName,
26.114 tr("The file of the map on disk has changed:\n\n"
26.115 " %1\n\nDo you want to reload that map with the new file?").arg(filePath),
26.116 @@ -1200,7 +1201,7 @@
26.117
26.118 void VymModel::saveState(const SaveMode &savemode, const QString &undoSelection, const QString &undoCom, const QString &redoSelection, const QString &redoCom, const QString &comment, LinkableMapObj *saveSel)
26.119 {
26.120 - sendData(redoCom); //FIXME testing
26.121 + sendData(redoCom); //FIXME-3 testing
26.122
26.123 // Main saveState
26.124
26.125 @@ -1463,7 +1464,7 @@
26.126 return QDate::currentDate().toString ("yyyy-MM-dd");
26.127 }
26.128
26.129 -int VymModel::countBranches() // FIXME Optimize this: use internal counter instead of going through whole map each time...
26.130 +int VymModel::countBranches() // FIXME-2 Optimize this: use internal counter instead of going through whole map each time...
26.131 {
26.132 int c=0;
26.133 TreeItem *cur=NULL;
26.134 @@ -1491,15 +1492,15 @@
26.135 "setHeading (\""+s+"\")",
26.136 QString("Set heading of %1 to \"%2\"").arg(getObjectName(sel)).arg(s) );
26.137 sel->setHeading(s );
26.138 - /* FIXME testing only
26.139 + /* FIXME-3 testing only
26.140 */
26.141 TreeItem *ti=getSelectedItem();
26.142 if (ti)
26.143 {
26.144 ti->setHeading (s);
26.145 - //FIXME VM ix is wrong ModelIndex below, ix2 is (hopefully) correct:
26.146 + //FIXME-3 VM ix is wrong ModelIndex below, ix2 is (hopefully) correct:
26.147 //QModelIndex ix=index( ti->row(), ti->column(), index (0,0,QModelIndex()) );
26.148 - //FIXME VM testing only cout <<"VM::setHeading s="<<s.toStdString()<<" ti="<<ti<<" r,c=("<<ti->row()<<","<<ti->column()<<")"<<endl;
26.149 + //FIXME-3 VM testing only cout <<"VM::setHeading s="<<s.toStdString()<<" ti="<<ti<<" r,c=("<<ti->row()<<","<<ti->column()<<")"<<endl;
26.150 QModelIndex ix2=index (ti);
26.151 emit (dataChanged ( ix2,ix2));
26.152 }
26.153 @@ -1585,8 +1586,7 @@
26.154
26.155 void VymModel::setScene (QGraphicsScene *s)
26.156 {
26.157 - cout << "VM::setscene scene="<<s<<endl;
26.158 - mapScene=s; // FIXME VM should not be necessary anymore, move all occurences to MapEditor
26.159 + mapScene=s; // FIXME-2 VM should not be necessary anymore, move all occurences to MapEditor
26.160 //init(); // Here we have a mapScene set,
26.161 // which is (still) needed to create MapCenters
26.162 }
26.163 @@ -1621,8 +1621,10 @@
26.164 return "";
26.165 }
26.166
26.167 -QStringList VymModel::getURLs()
26.168 -{
26.169 +QStringList VymModel::getURLs() // FIXME-1 first, next moved to vymmodel
26.170 +{
26.171 + return QStringList();
26.172 + /*
26.173 QStringList urls;
26.174 BranchObj *bo=getSelectedBranch();
26.175 if (bo)
26.176 @@ -1635,6 +1637,7 @@
26.177 }
26.178 }
26.179 return urls;
26.180 + */
26.181 }
26.182
26.183 void VymModel::linkFloatImageTo(const QString &dstString)
26.184 @@ -1824,7 +1827,7 @@
26.185 updateActions();
26.186 reposition();
26.187 selection.update();
26.188 - // FIXME VM needed? scene()->update();
26.189 + // FIXME-3 VM needed? scene()->update();
26.190 }
26.191 }
26.192
26.193 @@ -1929,7 +1932,7 @@
26.194 BranchObj *obo=par->moveBranchUp (bo); // bo will be the one below selection
26.195 saveState (getSelectString(bo),"moveBranchDown ()",getSelectString(obo),"moveBranchUp ()",QString("Move up %1").arg(getObjectName(bo)));
26.196 reposition();
26.197 - //FIXME VM needed? scene()->update();
26.198 + //FIXME-3 VM needed? scene()->update();
26.199 selection.update();
26.200 ensureSelectionVisible();
26.201 }
26.202 @@ -1946,7 +1949,7 @@
26.203 BranchObj *obo=par->moveBranchDown(bo); // bo will be the one above selection
26.204 saveState(getSelectString(bo),"moveBranchUp ()",getSelectString(obo),"moveBranchDown ()",QString("Move down %1").arg(getObjectName(bo)));
26.205 reposition();
26.206 - //FIXME VM needed? scene()->update();
26.207 + //FIXME-3 VM needed? scene()->update();
26.208 selection.update();
26.209 ensureSelectionVisible();
26.210 }
26.211 @@ -1984,7 +1987,7 @@
26.212 BranchObj *bo=getSelectedBranch();
26.213 if (bo)
26.214 {
26.215 - FloatImageObj *newfio=bo->addFloatImage(); // FIXME VM Old model, merge with below
26.216 + FloatImageObj *newfio=bo->addFloatImage(); // FIXME-1 VM Old model, merge with below
26.217
26.218 // Create TreeItem
26.219 QList<QVariant> cData;
26.220 @@ -1998,7 +2001,7 @@
26.221 if (newfio)
26.222 {
26.223 newfio->setTreeItem (ti);
26.224 - select (newfio); // FIXME VM really needed here?
26.225 + select (newfio); // FIXME-2 VM really needed here?
26.226 return ti;
26.227 }
26.228 }
26.229 @@ -2008,8 +2011,7 @@
26.230 MapCenterObj* VymModel::addMapCenter ()
26.231 {
26.232 MapCenterObj *mco=addMapCenter (contextPos);
26.233 - cout <<"VM::addMCO () mapScene="<<mapScene<<endl;
26.234 - //FIXME selection.select (mco);
26.235 + //FIXME-3 selection.select (mco);
26.236 updateActions();
26.237 ensureSelectionVisible();
26.238 saveState (
26.239 @@ -2025,7 +2027,7 @@
26.240 MapCenterObj* VymModel::addMapCenter(QPointF absPos)
26.241 {
26.242 MapCenterObj *mapCenter = new MapCenterObj(mapScene,this);
26.243 - mapCenter->setMapEditor(mapEditor); //FIXME VM needed to get defLinkStyle, mapLinkColorHint ... for later added objects
26.244 + mapCenter->setMapEditor(mapEditor); //FIXME-3 VM needed to get defLinkStyle, mapLinkColorHint ... for later added objects
26.245 mapCenter->move (absPos);
26.246 mapCenter->setVisibility (true);
26.247 mapCenter->setHeading (QApplication::translate("Heading of mapcenter in new map", "New map"));
26.248 @@ -2035,7 +2037,6 @@
26.249 QModelIndex parix=index(rootItem);
26.250
26.251 int n=rootItem->branchCount();
26.252 - cout << "VM::addMapCenter n="<<n<<endl;
26.253
26.254 emit (layoutAboutToBeChanged() );
26.255 beginInsertRows (parix,n,n+1);
26.256 @@ -2126,19 +2127,19 @@
26.257 if (newbo)
26.258 {
26.259 newbo->setTreeItem (ti);
26.260 - select (newbo); // FIXME VM really needed here?
26.261 + select (newbo); // FIXME-2 VM really needed here?
26.262 }
26.263
26.264 }else if (num==-1)
26.265 {
26.266 num=bo->getNum()+1;
26.267 bo=(BranchObj*)bo->getParObj();
26.268 - if (bo) newbo=bo->insertBranch(num); //FIXME VM still missing
26.269 + if (bo) newbo=bo->insertBranch(num); //FIXME-1 VM still missing
26.270 }else if (num==-3)
26.271 {
26.272 num=bo->getNum();
26.273 bo=(BranchObj*)bo->getParObj();
26.274 - if (bo) newbo=bo->insertBranch(num); //FIXME VM still missing
26.275 + if (bo) newbo=bo->insertBranch(num); //FIXME-1 VM still missing
26.276 }
26.277 }
26.278 return newbo;
26.279 @@ -2155,7 +2156,7 @@
26.280
26.281 if (bo)
26.282 {
26.283 - // FIXME VM do we still need this in model? setCursor (Qt::ArrowCursor);
26.284 + // FIXME-1 VM do we still need this in model? setCursor (Qt::ArrowCursor);
26.285
26.286 newbo=addNewBranchInt (pos-2);
26.287
26.288 @@ -2169,7 +2170,7 @@
26.289 QString ("Add new branch to %1").arg(getObjectName(bo)));
26.290
26.291 reposition();
26.292 - // selection.update(); FIXME
26.293 + // selection.update(); FIXME-3
26.294 latestSelectionString=getSelectString(newbo);
26.295 // In Network mode, the client needs to know where the new branch is,
26.296 // so we have to pass on this information via saveState.
26.297 @@ -2197,7 +2198,7 @@
26.298 BranchObj *parbo=(BranchObj*)(bo->getParObj());
26.299
26.300 // add below selection
26.301 - newbo=parbo->insertBranch(bo->getNum()+1); //FIXME VM still missing
26.302 + newbo=parbo->insertBranch(bo->getNum()+1); //FIXME-1 VM still missing
26.303
26.304 if (newbo)
26.305 {
26.306 @@ -2210,7 +2211,7 @@
26.307 QString ("Add branch before %1").arg(getObjectName(bo)));
26.308
26.309 reposition();
26.310 - // selection.update(); FIXME
26.311 + // selection.update(); FIXME-3
26.312 }
26.313 }
26.314 latestSelectionString=selection.getSelectString();
26.315 @@ -2219,7 +2220,7 @@
26.316
26.317 void VymModel::deleteSelection()
26.318 {
26.319 - BranchObj *bo = getSelectedBranch(); // FIXME VM should not be necessary
26.320 + BranchObj *bo = getSelectedBranch(); // FIXME-2 VM should not be necessary
26.321 if (!bo) return;
26.322
26.323 QModelIndex ix=getSelectedIndex();
26.324 @@ -2229,11 +2230,11 @@
26.325 if (!parentIndex.isValid()) return;
26.326 TreeItem *ti=bo->getTreeItem();
26.327
26.328 - if (selectionType()==TreeItem::MapCenter) //FIXME VM still missing
26.329 + if (selectionType()==TreeItem::MapCenter) //FIXME-1 VM still missing
26.330 {
26.331 // BranchObj* par=(BranchObj*)(bo->getParObj());
26.332 //selection.unselect();
26.333 - /* FIXME VM Note: does saveStateRemovingPart work for MCO? (No parent!)
26.334 + /* FIXME-1 VM Note: does saveStateRemovingPart work for MCO? (No parent!)
26.335 saveStateRemovingPart (bo, QString ("Delete %1").arg(getObjectName(bo)));
26.336 */
26.337 /*
26.338 @@ -2272,7 +2273,7 @@
26.339 emit (layoutChanged() );
26.340 return;
26.341 }
26.342 - FloatImageObj *fio=selection.getFloatImage(); //FIXME VM still missing
26.343 + FloatImageObj *fio=selection.getFloatImage(); //FIXME-1 VM still missing
26.344
26.345 if (fio)
26.346 {
26.347 @@ -2292,7 +2293,7 @@
26.348 }
26.349 }
26.350
26.351 -void VymModel::deleteKeepChildren() //FIXME VM still missing
26.352 +void VymModel::deleteKeepChildren() //FIXME-1 VM still missing
26.353
26.354 {
26.355 BranchObj *bo=getSelectedBranch();
26.356 @@ -2329,7 +2330,7 @@
26.357 }
26.358 }
26.359
26.360 -void VymModel::deleteChildren() //FIXME VM still missing
26.361 +void VymModel::deleteChildren() //FIXME-1 VM still missing
26.362
26.363 {
26.364 BranchObj *bo=getSelectedBranch();
26.365 @@ -2366,7 +2367,7 @@
26.366 );
26.367 bo->toggleScroll();
26.368 selection.update();
26.369 - // FIXME VM needed? scene()->update();
26.370 + // FIXME-3 VM needed? scene()->update();
26.371 return true;
26.372 }
26.373 return false;
26.374 @@ -2391,7 +2392,7 @@
26.375 );
26.376 bo->toggleScroll();
26.377 selection.update();
26.378 - // FIXME VM needed? scene()->update();
26.379 + // FIXME-3 VM needed? scene()->update();
26.380 return true;
26.381 }
26.382 return false;
26.383 @@ -2409,8 +2410,10 @@
26.384 }
26.385 }
26.386
26.387 -void VymModel::unscrollChildren()
26.388 -{
26.389 +void VymModel::unscrollChildren() // FIXME-1 first, next moved to vymmodel
26.390 +
26.391 +{
26.392 +/*
26.393 BranchObj *bo=getSelectedBranch();
26.394 if (bo)
26.395 {
26.396 @@ -2421,7 +2424,9 @@
26.397 bo=bo->next();
26.398 }
26.399 }
26.400 +*/
26.401 }
26.402 +
26.403 void VymModel::addFloatImage (const QPixmap &img)
26.404 {
26.405 BranchObj *bo=getSelectedBranch();
26.406 @@ -2434,7 +2439,7 @@
26.407 saveState (PartOfMap, s, "nop ()", s, "copy ()","Copy dropped image to clipboard",fio );
26.408 saveState (fio,"delete ()", bo,QString("paste(%1)").arg(curStep),"Pasting dropped image");
26.409 reposition();
26.410 - // FIXME VM needed? scene()->update();
26.411 + // FIXME-3 VM needed? scene()->update();
26.412 }
26.413 }
26.414
26.415 @@ -2585,7 +2590,7 @@
26.416 "setVymLink (\""+fd->selectedFile()+"\")",
26.417 QString("Set vymlink of %1 to %2").arg(getObjectName(bo)).arg(fd->selectedFile())
26.418 );
26.419 - setVymLink (fd->selectedFile() ); // FIXME ok?
26.420 + setVymLink (fd->selectedFile() ); // FIXME-2 ok?
26.421 }
26.422 }
26.423 }
26.424 @@ -2619,7 +2624,7 @@
26.425 bo->setVymLink ("" );
26.426 updateActions();
26.427 reposition();
26.428 - // FIXME VM needed? scene()->update();
26.429 + // FIXME-3 VM needed? scene()->update();
26.430 }
26.431 }
26.432
26.433 @@ -2633,8 +2638,10 @@
26.434
26.435 }
26.436
26.437 -QStringList VymModel::getVymLinks()
26.438 -{
26.439 +QStringList VymModel::getVymLinks() // FIXME-1 first, next moved to vymmodel
26.440 +{
26.441 + return QStringList();
26.442 +/*
26.443 QStringList links;
26.444 BranchObj *bo=getSelectedBranch();
26.445 if (bo)
26.446 @@ -2647,6 +2654,7 @@
26.447 }
26.448 }
26.449 return links;
26.450 +*/
26.451 }
26.452
26.453
26.454 @@ -2664,7 +2672,7 @@
26.455 }
26.456 }
26.457
26.458 -void VymModel::editXLink(int i) // FIXME VM missing saveState
26.459 +void VymModel::editXLink(int i) // FIXME-1 VM missing saveState
26.460 {
26.461 BranchObj *bo=getSelectedBranch();
26.462 if (bo)
26.463 @@ -2850,7 +2858,7 @@
26.464 parser.setError (Aborted,"Type of selection is not a branch");
26.465 } else if (parser.checkParCount(0))
26.466 {
26.467 - //FIXME missing action for copy
26.468 + //FIXME-1 missing action for copy
26.469 }
26.470 /////////////////////////////////////////////////////////////////////
26.471 } else if (com=="cut")
26.472 @@ -3629,7 +3637,7 @@
26.473 // Any errors?
26.474 if (parser.errorLevel()==NoError)
26.475 {
26.476 - // setChanged(); FIXME should not be called e.g. for export?!
26.477 + // setChanged(); FIXME-2 should not be called e.g. for export?!
26.478 reposition();
26.479 }
26.480 else
26.481 @@ -3839,12 +3847,15 @@
26.482 void VymModel::updateNoteFlag()
26.483 {
26.484 setChanged();
26.485 + cout << "VM::updateNoteFlag()\n";
26.486 + /* FIXME-1 modify note flag
26.487 BranchObj *bo=getSelectedBranch();
26.488 if (bo)
26.489 {
26.490 bo->updateNoteFlag();
26.491 mainWindow->updateActions();
26.492 }
26.493 + */
26.494 }
26.495
26.496 void VymModel::updateRelPositions()
26.497 @@ -4066,7 +4077,7 @@
26.498 }
26.499 }
26.500
26.501 -void VymModel::selectMapBackgroundImage () // FIXME move to ME
26.502 +void VymModel::selectMapBackgroundImage () // FIXME-2 move to ME
26.503 {
26.504 Q3FileDialog *fd=new Q3FileDialog( NULL);
26.505 fd->setMode (Q3FileDialog::ExistingFile);
26.506 @@ -4087,7 +4098,7 @@
26.507 }
26.508 }
26.509
26.510 -void VymModel::setMapBackgroundImage (const QString &fn) //FIXME missing savestate
26.511 +void VymModel::setMapBackgroundImage (const QString &fn) //FIXME-2 missing savestate
26.512 {
26.513 QColor oldcol=mapScene->backgroundBrush().color();
26.514 /*
26.515 @@ -4103,7 +4114,7 @@
26.516 mapScene->setBackgroundBrush(brush);
26.517 }
26.518
26.519 -void VymModel::selectMapBackgroundColor() // FIXME move to ME
26.520 +void VymModel::selectMapBackgroundColor() // FIXME-1 move to ME
26.521 {
26.522 QColor col = QColorDialog::getColor( mapScene->backgroundBrush().color(), NULL);
26.523 if ( !col.isValid() ) return;
26.524 @@ -4111,7 +4122,7 @@
26.525 }
26.526
26.527
26.528 -void VymModel::setMapBackgroundColor(QColor col) // FIXME move to ME
26.529 +void VymModel::setMapBackgroundColor(QColor col) // FIXME-1 move to ME
26.530 {
26.531 QColor oldcol=mapScene->backgroundBrush().color();
26.532 saveState(
26.533 @@ -4121,38 +4132,38 @@
26.534 mapScene->setBackgroundBrush(col);
26.535 }
26.536
26.537 -QColor VymModel::getMapBackgroundColor() // FIXME move to ME
26.538 +QColor VymModel::getMapBackgroundColor() // FIXME-1 move to ME
26.539 {
26.540 return mapScene->backgroundBrush().color();
26.541 }
26.542
26.543
26.544 -LinkableMapObj::ColorHint VymModel::getMapLinkColorHint() // FIXME move to ME
26.545 +LinkableMapObj::ColorHint VymModel::getMapLinkColorHint() // FIXME-1 move to ME
26.546 {
26.547 return linkcolorhint;
26.548 }
26.549
26.550 -QColor VymModel::getMapDefLinkColor() // FIXME move to ME
26.551 +QColor VymModel::getMapDefLinkColor() // FIXME-1 move to ME
26.552 {
26.553 return defLinkColor;
26.554 }
26.555
26.556 -void VymModel::setMapDefXLinkColor(QColor col) // FIXME move to ME
26.557 +void VymModel::setMapDefXLinkColor(QColor col) // FIXME-1 move to ME
26.558 {
26.559 defXLinkColor=col;
26.560 }
26.561
26.562 -QColor VymModel::getMapDefXLinkColor() // FIXME move to ME
26.563 +QColor VymModel::getMapDefXLinkColor() // FIXME-1 move to ME
26.564 {
26.565 return defXLinkColor;
26.566 }
26.567
26.568 -void VymModel::setMapDefXLinkWidth (int w) // FIXME move to ME
26.569 +void VymModel::setMapDefXLinkWidth (int w) // FIXME-1 move to ME
26.570 {
26.571 defXLinkWidth=w;
26.572 }
26.573
26.574 -int VymModel::getMapDefXLinkWidth() // FIXME move to ME
26.575 +int VymModel::getMapDefXLinkWidth() // FIXME-1 move to ME
26.576 {
26.577 return defXLinkWidth;
26.578 }
26.579 @@ -4276,7 +4287,7 @@
26.580 if (!tcpServer->listen(QHostAddress::Any,port)) {
26.581 QMessageBox::critical(NULL, "vym server",
26.582 QString("Unable to start the server: %1.").arg(tcpServer->errorString()));
26.583 - //FIXME needed? we are no widget any longer... close();
26.584 + //FIXME-3 needed? we are no widget any longer... close();
26.585 return;
26.586 }
26.587 connect(tcpServer, SIGNAL(newConnection()), this, SLOT(newClient()));
26.588 @@ -4415,11 +4426,18 @@
26.589 mapEditor->setSelectionColor (col);
26.590 }
26.591
26.592 -void VymModel::updateSelection()
26.593 -{
26.594 - QItemSelection newsel=selModel->selection();
26.595 - updateSelection (newsel);
26.596 +/*
26.597 +void VymModel::changeSelection (const QItemSelection &newsel,const QItemSelection &oldsel)
26.598 +{
26.599 + cout << "VymModel::changeSelection (";
26.600 + if (!newsel.indexes().isEmpty() )
26.601 + cout << getItem(newsel.indexes().first() )->getHeading().toStdString();
26.602 + cout << ",";
26.603 + if (!oldsel.indexes().isEmpty() )
26.604 + cout << getItem(oldsel.indexes().first() )->getHeading().toStdString();
26.605 + cout << ")\n";
26.606 }
26.607 +*/
26.608
26.609 void VymModel::updateSelection(const QItemSelection &newsel)
26.610 {
26.611 @@ -4428,6 +4446,12 @@
26.612 sendSelection();
26.613 }
26.614
26.615 +void VymModel::updateSelection()
26.616 +{
26.617 + QItemSelection newsel=selModel->selection();
26.618 + updateSelection (newsel);
26.619 +}
26.620 +
26.621 void VymModel::setSelectionColor(QColor col)
26.622 {
26.623 if ( !col.isValid() ) return;
26.624 @@ -4450,7 +4474,7 @@
26.625 for (int i=0;i<mapCenters.count(); i++)
26.626 mapCenters.at(i)->setHideTmp (mode);
26.627 reposition();
26.628 - // FIXME needed? scene()->update();
26.629 + // FIXME-3 needed? scene()->update();
26.630 }
26.631
26.632
26.633 @@ -4469,7 +4493,6 @@
26.634 void VymModel::setSelectionModel (QItemSelectionModel *sm)
26.635 {
26.636 selModel=sm;
26.637 - cout << "VM::setSelModel selModel="<<selModel<<endl;
26.638 }
26.639
26.640 QItemSelectionModel* VymModel::getSelectionModel()
26.641 @@ -4529,7 +4552,7 @@
26.642 QModelIndex ix=index(ti);
26.643 selModel->select (ix,QItemSelectionModel::ClearAndSelect );
26.644 ti->setLastSelectedBranch();
26.645 - //updateSelection(oldsel); //FIXME needed?
26.646 + //updateSelection(oldsel); //FIXME-3 needed?
26.647 return true;
26.648 }
26.649 return false;
26.650 @@ -4545,11 +4568,16 @@
26.651 selection.reselect();
26.652 }
26.653
26.654 -void VymModel::ensureSelectionVisible()
26.655 +void VymModel::ensureSelectionVisible() //FIXME-3 needed? in vymmodel.h commented...
26.656 {
26.657 LinkableMapObj *lmo=getSelectedLMO();
26.658 if (lmo &&mapEditor) mapEditor->ensureVisible (lmo->getBBox() );
26.659 -
26.660 +}
26.661 +
26.662 +void VymModel::emitContentHasChanged (TreeItem *ti)
26.663 +{
26.664 + QModelIndex ix=index(ti);
26.665 + emit (contentHasChanged (ix) );
26.666 }
26.667
26.668 void VymModel::selectInt (LinkableMapObj *lmo)
26.669 @@ -4557,7 +4585,7 @@
26.670 if (selection.select(lmo))
26.671 {
26.672 //selection.update();
26.673 - sendSelection (); // FIXME VM use signal
26.674 + sendSelection (); // FIXME-4 VM use signal
26.675 }
26.676 }
26.677
26.678 @@ -4947,10 +4975,11 @@
26.679
26.680 TreeItem* VymModel::getSelectedItem()
26.681 {
26.682 - // FIXME this may not only be branch, but also float etc...
26.683 - BranchObj* bo=getSelectedBranch();
26.684 - if (bo) return bo->getTreeItem(); // FIXME VM get directly from treemodl
26.685 - return NULL;
26.686 + QModelIndexList list=selModel->selectedIndexes();
26.687 + if (!list.isEmpty() )
26.688 + return getItem (list.first() );
26.689 + else
26.690 + return NULL;
26.691 }
26.692
26.693 QModelIndex VymModel::getSelectedIndex()
26.694 @@ -4976,7 +5005,7 @@
26.695 return QString();
26.696 }
26.697
26.698 -QString VymModel::getSelectString (LinkableMapObj *lmo) // FIXME VM needs to use TreeModel
26.699 +QString VymModel::getSelectString (LinkableMapObj *lmo) // FIXME-2 VM needs to use TreeModel
26.700 {
26.701 QString s;
26.702 if (!lmo) return s;
27.1 --- a/vymmodel.h Mon Mar 23 09:06:51 2009 +0000
27.2 +++ b/vymmodel.h Thu Mar 26 07:49:17 2009 +0000
27.3 @@ -417,7 +417,10 @@
27.4
27.5 //void ensureSelectionVisible(); //!< Show selection in all views
27.6
27.7 + void emitContentHasChanged (TreeItem *ti);
27.8 +
27.9 signals:
27.10 + void contentHasChanged (QModelIndex ix);
27.11 void newChildObject(QModelIndex ix);
27.12
27.13 private:
27.14 @@ -572,6 +575,13 @@
27.15 QString getSelectString ();
27.16 QString getSelectString (LinkableMapObj *lmo);
27.17
27.18 +
27.19 + /*
27.20 +public slots:
27.21 + void changeSelection (const QItemSelection &newSel, const QItemSelection &delSel);
27.22 + */
27.23 +
27.24 +public:
27.25 void updateSelection(const QItemSelection &oldsel);
27.26 void updateSelection();
27.27 void selectMapLinkColor();
27.28 @@ -583,7 +593,6 @@
27.29 public:
27.30 void setSelectionColor(QColor);
27.31 QColor getSelectionColor();
27.32 -
27.33 };
27.34
27.35 #endif
28.1 --- a/vymview.cpp Mon Mar 23 09:06:51 2009 +0000
28.2 +++ b/vymview.cpp Thu Mar 26 07:49:17 2009 +0000
28.3 @@ -35,15 +35,19 @@
28.4 selModel, SIGNAL (currentChanged(const QModelIndex &, const QModelIndex &)),
28.5 me,SLOT (updateCurrent(const QModelIndex &,const QModelIndex &)));
28.6
28.7 - // VymModel may want to update selection, e.g. during animation
28.8 + // VymModel may want to update selection or other data, e.g. during animation
28.9 connect (
28.10 model, SIGNAL (selectionChanged(const QItemSelection &, const QItemSelection &)),
28.11 me,SLOT (updateSelection(const QItemSelection &,const QItemSelection &)));
28.12 connect (
28.13 model, SIGNAL (newChildObject(QModelIndex) ),
28.14 this,SLOT (updateChilds (QModelIndex) ) );
28.15 + connect (
28.16 + model, SIGNAL (contentHasChanged(QModelIndex) ),
28.17 + mainWindow, SLOT (updateContent(QModelIndex) ) );
28.18 +
28.19
28.20 - //me->viewport()->setFocus(); //FIXME needed?
28.21 + //me->viewport()->setFocus(); //FIXME-3 needed?
28.22 me->setAntiAlias (mainWindow->isAliased());
28.23 me->setSmoothPixmap(mainWindow->hasSmoothPixmapTransform());
28.24
28.25 @@ -72,23 +76,19 @@
28.26 treeview->setExpanded (ix,true);
28.27 }
28.28
28.29 -void VymView::changeSelection (const QItemSelection &, const QItemSelection &)
28.30 +void VymView::changeSelection (const QItemSelection &newsel, const QItemSelection &oldsel)
28.31 {
28.32 - cout << "VymView::changeSelection (newsel,delsel)\n";
28.33 - //treeview->expandAll(); //FIXME only for testing
28.34 + /*
28.35 + cout <<"VymView::changeSelection (";
28.36 + if (!newsel.indexes().isEmpty() )
28.37 + cout << model->getItem(newsel.indexes().first() )->getHeading().toStdString();
28.38 + cout << " <- ";
28.39 + if (!oldsel.indexes().isEmpty() )
28.40 + cout << model->getItem(oldsel.indexes().first() )->getHeading().toStdString();
28.41 + cout << ")\n";
28.42 + */
28.43
28.44 - // Show URL and link in statusbar
28.45 - QString status;
28.46 - QString s=model->getURL();
28.47 - if (!s.isEmpty() ) status+="URL: "+s+" ";
28.48 - s=model->getVymLink();
28.49 - if (!s.isEmpty() ) status+="Link: "+s;
28.50 - if (!status.isEmpty() ) mainWindow->statusMessage (status);
28.51 -
28.52 - // Update Toolbar // FIXME, was so far in BranchObj
28.53 - //updateFlagsToolbar();
28.54 -
28.55 - // Update actions
28.56 - mainWindow->updateActions();
28.57 + // Notify mainwindow to update satellites like NoteEditor, if needed (model==currenModel...)
28.58 + mainWindow->changeSelection (model,newsel,oldsel); // FIXME-3 maybe connect VymModel <-> MainWindow directly?
28.59 }
28.60
29.1 --- a/xml-freemind.cpp Mon Mar 23 09:06:51 2009 +0000
29.2 +++ b/xml-freemind.cpp Thu Mar 26 07:49:17 2009 +0000
29.3 @@ -67,8 +67,8 @@
29.4 "saved using freemind " +atts.value("version")+". "
29.5 "The version of this vym can parse freemind " + v +".");
29.6 }
29.7 - //FIXME TreeItem *ti=model->first(); // FIXME this will be NULL !!!
29.8 - TreeItem *ti=NULL; // FIXME
29.9 + //FIXME-3 TreeItem *ti=model->first(); // this will be NULL !!!
29.10 + TreeItem *ti=NULL;
29.11
29.12 BranchObj *bo;
29.13 if (ti->getType()==TreeItem::MapCenter)
29.14 @@ -76,7 +76,7 @@
29.15 else
29.16 qWarning ("parseFreeMindHandler::startElement no mapCenter!!");
29.17
29.18 - //FIXME cout <<"model="<<model<<" first="<<model->first()<<endl;
29.19 + //cout <<"model="<<model<<" first="<<model->first()<<endl;
29.20
29.21 lastBranch=bo->addBranch();
29.22
29.23 @@ -250,7 +250,7 @@
29.24 case StateFont: break;
29.25 case StateHook: break;
29.26 case StateText:
29.27 - lastBranch->setNote (ch_simplified);
29.28 + lastBranch->getTreeItem()->setNote (ch_simplified);
29.29 break;
29.30 default:
29.31 return false;
30.1 --- a/xml-vym.cpp Mon Mar 23 09:06:51 2009 +0000
30.2 +++ b/xml-vym.cpp Thu Mar 26 07:49:17 2009 +0000
30.3 @@ -202,7 +202,7 @@
30.4 // selection==lmo==NULL
30.5 // Treat it like ImportAdd then...
30.6 loadMode=ImportAdd;
30.7 - // FIXME lmo=model->first()->getLMO();
30.8 + // FIXME-3 lmo=model->first()->getLMO();
30.9 // Do we really have no MCO when loading?????
30.10 cout << "xml-vym aborted\n";
30.11 }
30.12 @@ -298,7 +298,7 @@
30.13 state=StateHtmlNote;
30.14 htmldata.replace ("<br></br>","<br />");
30.15 no.setNote (htmldata);
30.16 - lastBranch->setNote (no);
30.17 + lastBranch->getTreeItem()->setNoteObj (no);
30.18 }
30.19 break;
30.20 default:
30.21 @@ -326,7 +326,7 @@
30.22 case StateMapSetting:break;
30.23 case StateMapCenter: break;
30.24 case StateNote:
30.25 - lastBranch->setNote(ch_simplified);
30.26 + lastBranch->getTreeItem()->setNote(ch_simplified);
30.27 break;
30.28 case StateBranch: break;
30.29 case StateStandardFlag:
30.30 @@ -488,7 +488,7 @@
30.31 }
30.32 if (!a.value( "fonthint").isEmpty() )
30.33 no.setFontHint(a.value ("fonthint") );
30.34 - lastBranch->setNote(no);
30.35 + lastBranch->getTreeItem()->setNoteObj(no);
30.36 return true;
30.37 }
30.38