1.1 --- a/branchobj.cpp Mon Apr 27 12:07:15 2009 +0000
1.2 +++ b/branchobj.cpp Mon Apr 27 12:42:06 2009 +0000
1.3 @@ -48,6 +48,8 @@
1.4
1.5 BranchObj::~BranchObj ()
1.6 {
1.7 +// cout << "Destr BranchObj of "<<this<<" ("<<treeItem->getHeading().toStdString()<<")"<<endl;
1.8 +
1.9 // If I'm animated, I need to un-animate myself first
1.10 if (anim.isAnimated() )
1.11 {
1.12 @@ -55,7 +57,6 @@
1.13 model->stopAnimation (this);
1.14 }
1.15
1.16 - cout << "Destr BranchObj of "<<this<<" ("<<treeItem->getHeading().toStdString()<<")"<<endl;
1.17 // Check, if this branch was the last child to be deleted
1.18 // If so, unset the scrolled flags in parent // FIXME-2 better do this in model?
1.19
2.1 --- a/linkablemapobj.cpp Mon Apr 27 12:07:15 2009 +0000
2.2 +++ b/linkablemapobj.cpp Mon Apr 27 12:42:06 2009 +0000
2.3 @@ -564,39 +564,6 @@
2.4 return parObj;
2.5 }
2.6
2.7 -LinkableMapObj* LinkableMapObj::findObjBySelect (QString s) // FIXME-0 already in VM???
2.8 -{
2.9 - LinkableMapObj *lmo=this;
2.10 - QString part;
2.11 - QString typ;
2.12 - QString num;
2.13 - while (!s.isEmpty() )
2.14 - {
2.15 - part=s.section(",",0,0);
2.16 - typ=part.left (3);
2.17 - num=part.right(part.length() - 3);
2.18 - if (typ=="mc:")
2.19 - {
2.20 - if (treeItem->depth()>0)
2.21 - return false; // in a subtree there is no center
2.22 - else
2.23 - break;
2.24 - } else
2.25 - if (typ=="bo:")
2.26 - lmo=lmo->getTreeItem()->getBranchObjNum (num.toInt());
2.27 - else
2.28 - if (typ=="fi:")
2.29 - lmo=((BranchObj*)lmo)->getFloatImageNum (num.toUInt());
2.30 - if (!lmo) break;
2.31 -
2.32 - if (s.contains(","))
2.33 - s=s.right(s.length() - part.length() -1 );
2.34 - else
2.35 - break;
2.36 - }
2.37 - return lmo;
2.38 -}
2.39 -
2.40 QPointF LinkableMapObj::getChildPos()
2.41 {
2.42 return childPos;
3.1 --- a/linkablemapobj.h Mon Apr 27 12:07:15 2009 +0000
3.2 +++ b/linkablemapobj.h Mon Apr 27 12:42:06 2009 +0000
3.3 @@ -96,7 +96,6 @@
3.4 // redraw link with given style
3.5 LinkableMapObj* getChildObj(); // returns pointer to fromObj
3.6 LinkableMapObj* getParObj(); // returns pointer to toObj
3.7 - virtual LinkableMapObj* findObjBySelect(QString s); // find obj by selectstring
3.8 virtual void setDockPos()=0; // sets childPos and parPos
3.9 QPointF getChildPos(); // returns pos where children dock
3.10 QPointF getParPos(); // returns pos where parents dock
4.1 --- a/mainwindow.cpp Mon Apr 27 12:07:15 2009 +0000
4.2 +++ b/mainwindow.cpp Mon Apr 27 12:42:06 2009 +0000
4.3 @@ -3070,10 +3070,11 @@
4.4 void Main::editUpperBranch()
4.5 {
4.6 VymModel *m=currentModel();
4.7 - if (m) m->selectUpperBranch(); // FIXME-0 check also lower... this probably should go into view...
4.8 + if (m) m->selectUpperBranch(); // FIXME-3 check also lower... this probably should go into view...
4.9 }
4.10
4.11 -void Main::editLowerBranch()
4.12 +void Main::editLowerBranch() // FIXME-3 check also lower... this probably should go into view...
4.13 +
4.14 {
4.15 VymModel *m=currentModel();
4.16 if (m) m->selectLowerBranch();
5.1 --- a/selection.cpp Mon Apr 27 12:07:15 2009 +0000
5.2 +++ b/selection.cpp Mon Apr 27 12:42:06 2009 +0000
5.3 @@ -42,7 +42,8 @@
5.4 }
5.5 */
5.6 }
5.7 -bool Selection::select(LinkableMapObj *lmo) // TODO no multiselections yet
5.8 +bool Selection::select(LinkableMapObj *lmo)// FIXME-2 VM emit signal in VM instead and get rid of this
5.9 +
5.10 {
5.11 return model->select (lmo);
5.12 /*
5.13 @@ -56,7 +57,8 @@
5.14 */
5.15 }
5.16
5.17 -bool Selection::select (const QString &s) // TODO no multiselections yet
5.18 +bool Selection::select (const QString &s)// FIXME-2 VM emit signal in VM instead and get rid of this
5.19 +
5.20 {
5.21 return model->select (s);
5.22 /*
6.1 --- a/treeitem.cpp Mon Apr 27 12:07:15 2009 +0000
6.2 +++ b/treeitem.cpp Mon Apr 27 12:42:06 2009 +0000
6.3 @@ -111,7 +111,6 @@
6.4 qWarning ("TreeItem::removeChild tried to remove non existing item?!\n");
6.5 else
6.6 {
6.7 - cout << "TI::removeChild this="<<this<<" row="<<row<<endl;
6.8 if (childItems.at(row)->isBranchLikeType())
6.9 branchCounter--;
6.10 childItems.removeAt (row);
7.1 --- a/treemodel.cpp Mon Apr 27 12:07:15 2009 +0000
7.2 +++ b/treemodel.cpp Mon Apr 27 12:42:06 2009 +0000
7.3 @@ -181,15 +181,12 @@
7.4 bool TreeModel::removeRows ( int row, int count, const QModelIndex & parent)
7.5 {
7.6 int last=row+count-1;
7.7 - cout << "TreeModel::removeRows row="<<row<<" count="<<count<<" last="<<last<<endl;
7.8 TreeItem *pi= getItem (parent);
7.9 TreeItem *ti;
7.10 - cout << " pi="<<pi<<" "<<pi->getHeading().toStdString()<<endl;
7.11 beginRemoveRows (parent,row,last);
7.12
7.13 for (int i=row; i<=last; i++)
7.14 {
7.15 - cout << "TreeModel::removeRows removing i="<<i<<std::endl;
7.16 ti=pi->getChildNum (row);
7.17 pi->removeChild (row); // does not delete object!
7.18 switch (ti->getType())
8.1 --- a/vymmodel.cpp Mon Apr 27 12:07:15 2009 +0000
8.2 +++ b/vymmodel.cpp Mon Apr 27 12:42:06 2009 +0000
8.3 @@ -273,7 +273,7 @@
8.4 {
8.5 QString s;
8.6
8.7 - for (int i=0; i<rootItem->branchCount(); i++) // FIXME-0 remove mapCenters
8.8 + for (int i=0; i<rootItem->branchCount(); i++)
8.9 s+=((MapCenterItem*)rootItem->getBranchNum(i))->saveToDir (tmpdir,prefix,offset);
8.10 return s;
8.11 }
8.12 @@ -985,10 +985,7 @@
8.13 void VymModel::setChanged()
8.14 {
8.15 if (!mapChanged)
8.16 - {
8.17 autosaveTimer->start(settings.value("/mainwindow/autosave/ms/",300000).toInt());
8.18 - cout <<" timer started with "<<settings.value("/mainwindow/autosave/ms/",300000).toInt()<<endl;
8.19 - }
8.20 mapChanged=true;
8.21 mapDefault=false;
8.22 mapUnsaved=true;
8.23 @@ -2255,7 +2252,6 @@
8.24
8.25 BranchItem* VymModel::relinkBranch (BranchItem *branch, BranchItem *dst, int pos)
8.26 {
8.27 - cout << "VM::relinkBranch "<<branch->getHeadingStd()<<" to "<<dst->getHeadingStd()<<" at pos="<<pos<<endl;
8.28 if (branch && dst)
8.29 {
8.30 emit (layoutAboutToBeChanged() );
8.31 @@ -2273,7 +2269,6 @@
8.32 n=0;
8.33 else
8.34 n=dst->getFirstBranch()->childNumber();
8.35 - cout << "*** dst->bCount="<<dst->branchCount()<<" n="<<n<<" pos="<<pos<<endl;
8.36 beginInsertRows (index(dst),n+pos,n+pos);
8.37 dst->insertBranch (pos,branch);
8.38 endInsertRows();
8.39 @@ -2339,7 +2334,6 @@
8.40
8.41 emit (layoutAboutToBeChanged() );
8.42
8.43 - cout << "VM::delete selbi="<<selbi<<" row="<<ix.row()<<endl;
8.44 parentIndex=parent(index(selbi));
8.45 int n=ix.row();
8.46 beginRemoveRows (parentIndex,n,n);