diff -r 9db215a4ad53 -r 5987f9f15bac vymmodel.cpp --- a/vymmodel.cpp Mon Jul 27 12:53:17 2009 +0000 +++ b/vymmodel.cpp Mon Aug 03 10:42:12 2009 +0000 @@ -1497,7 +1497,6 @@ QString("Set heading of %1 to \"%2\"").arg(getObjectName(selbi)).arg(s) ); selbi->setHeading(s ); emitDataHasChanged ( selbi); //FIXME-3 maybe emit signal from TreeItem? - reposition(); emitSelectionChanged(); } @@ -1727,55 +1726,46 @@ } } -void VymModel::setIncludeImagesVer(bool b) //FIXME-2 -{ -/* +void VymModel::setIncludeImagesVer(bool b) +{ BranchItem *bi=getSelectedBranchItem(); - if (ti) + if (bi) { - BranchObj *bo=bi->getLMO(); - if (bo) - { - QString u= b ? "false" : "true"; - QString r=!b ? "false" : "true"; - - saveState( - bo, - QString("setIncludeImagesVertically (%1)").arg(u), - bo, - QString("setIncludeImagesVertically (%1)").arg(r), - QString("Include images vertically in %1").arg(getObjectName(bo)) - ); - bo->setIncludeImagesVer(b); - reposition(); - } + QString u= b ? "false" : "true"; + QString r=!b ? "false" : "true"; + + saveState( + bi, + QString("setIncludeImagesVertically (%1)").arg(u), + bi, + QString("setIncludeImagesVertically (%1)").arg(r), + QString("Include images vertically in %1").arg(getObjectName(bi)) + ); + bi->setIncludeImagesVer(b); + emitDataHasChanged ( bi); + reposition(); } -*/} - -void VymModel::setIncludeImagesHor(bool b) //FIXME-2 -{ -/* - TreeItem *bi=getSelectedBranchItem(); - if (ti) +} + +void VymModel::setIncludeImagesHor(bool b) +{ + BranchItem *bi=getSelectedBranchItem(); + if (bi) { - BranchObj *bo=bi->getLMO(); - if (bo) - { - QString u= b ? "false" : "true"; - QString r=!b ? "false" : "true"; - - saveState( - bo, - QString("setIncludeImagesHorizontally (%1)").arg(u), - bo, - QString("setIncludeImagesHorizontally (%1)").arg(r), - QString("Include images horizontally in %1").arg(getObjectName(bo)) - ); - bo->setIncludeImagesHor(b); - reposition(); - } + QString u= b ? "false" : "true"; + QString r=!b ? "false" : "true"; + + saveState( + bi, + QString("setIncludeImagesHorizontally (%1)").arg(u), + bi, + QString("setIncludeImagesHorizontally (%1)").arg(r), + QString("Include images horizontally in %1").arg(getObjectName(bi)) + ); + bi->setIncludeImagesHor(b); + emitDataHasChanged ( bi); + reposition(); } - */ } void VymModel::setHideLinkUnselected (bool b)//FIXME-2 @@ -2235,7 +2225,7 @@ return false; } -void VymModel::deleteSelection() +void VymModel::deleteSelection() // FIXME-2 include fix for deleted mapcenters from 1.12.4 { BranchItem *selbi=getSelectedBranchItem(); @@ -4160,7 +4150,7 @@ } } -void VymModel::setMapBackgroundImage (const QString &fn) //FIXME-2 missing savestate +void VymModel::setMapBackgroundImage (const QString &fn) //FIXME-2 missing savestate, move to ME { QColor oldcol=mapScene->backgroundBrush().color(); /* @@ -4473,7 +4463,7 @@ } } -/* FIXME-3 +/* FIXME-3 Playing with DBUS... QDBusVariant VymModel::query (const QString &query) { TreeItem *selti=getSelectedItem(); @@ -4484,6 +4474,11 @@ } */ +void VymModel::testslot() //FIXME-3 +{ + cout << "VM::testslot called\n"; +} + void VymModel::selectMapSelectionColor() { QColor col = QColorDialog::getColor( defLinkColor, NULL);