vymmodel.cpp
changeset 785 5987f9f15bac
parent 784 9db215a4ad53
child 786 6269016c9905
     1.1 --- a/vymmodel.cpp	Mon Jul 27 12:53:17 2009 +0000
     1.2 +++ b/vymmodel.cpp	Mon Aug 03 10:42:12 2009 +0000
     1.3 @@ -1497,7 +1497,6 @@
     1.4  			QString("Set heading of %1 to \"%2\"").arg(getObjectName(selbi)).arg(s) );
     1.5  		selbi->setHeading(s );
     1.6  		emitDataHasChanged ( selbi);	//FIXME-3 maybe emit signal from TreeItem? 
     1.7 -
     1.8  		reposition();
     1.9  		emitSelectionChanged();
    1.10  	}
    1.11 @@ -1727,55 +1726,46 @@
    1.12  	}	
    1.13  }
    1.14  
    1.15 -void VymModel::setIncludeImagesVer(bool b)	//FIXME-2
    1.16 -{
    1.17 -/*
    1.18 +void VymModel::setIncludeImagesVer(bool b)
    1.19 +{
    1.20  	BranchItem *bi=getSelectedBranchItem();
    1.21 -	if (ti)
    1.22 +	if (bi)
    1.23  	{
    1.24 -		BranchObj *bo=bi->getLMO();
    1.25 -		if (bo)
    1.26 -		{
    1.27 -			QString u= b ? "false" : "true";
    1.28 -			QString r=!b ? "false" : "true";
    1.29 -			
    1.30 -			saveState(
    1.31 -				bo,
    1.32 -				QString("setIncludeImagesVertically (%1)").arg(u),
    1.33 -				bo, 
    1.34 -				QString("setIncludeImagesVertically (%1)").arg(r),
    1.35 -				QString("Include images vertically in %1").arg(getObjectName(bo))
    1.36 -			);	
    1.37 -			bo->setIncludeImagesVer(b);
    1.38 -			reposition();
    1.39 -		}	
    1.40 +		QString u= b ? "false" : "true";
    1.41 +		QString r=!b ? "false" : "true";
    1.42 +		
    1.43 +		saveState(
    1.44 +			bi,
    1.45 +			QString("setIncludeImagesVertically (%1)").arg(u),
    1.46 +			bi, 
    1.47 +			QString("setIncludeImagesVertically (%1)").arg(r),
    1.48 +			QString("Include images vertically in %1").arg(getObjectName(bi))
    1.49 +		);	
    1.50 +		bi->setIncludeImagesVer(b);
    1.51 +		emitDataHasChanged ( bi);	
    1.52 +		reposition();
    1.53  	}	
    1.54 -*/}
    1.55 -
    1.56 -void VymModel::setIncludeImagesHor(bool b)	//FIXME-2
    1.57 -{
    1.58 -/*
    1.59 -	TreeItem *bi=getSelectedBranchItem();
    1.60 -	if (ti)
    1.61 +}
    1.62 +
    1.63 +void VymModel::setIncludeImagesHor(bool b)	
    1.64 +{
    1.65 +	BranchItem *bi=getSelectedBranchItem();
    1.66 +	if (bi)
    1.67  	{
    1.68 -		BranchObj *bo=bi->getLMO();
    1.69 -		if (bo)
    1.70 -		{
    1.71 -			QString u= b ? "false" : "true";
    1.72 -			QString r=!b ? "false" : "true";
    1.73 -			
    1.74 -			saveState(
    1.75 -				bo,
    1.76 -				QString("setIncludeImagesHorizontally (%1)").arg(u),
    1.77 -				bo, 
    1.78 -				QString("setIncludeImagesHorizontally (%1)").arg(r),
    1.79 -				QString("Include images horizontally in %1").arg(getObjectName(bo))
    1.80 -			);	
    1.81 -			bo->setIncludeImagesHor(b);
    1.82 -			reposition();
    1.83 -		}	
    1.84 +		QString u= b ? "false" : "true";
    1.85 +		QString r=!b ? "false" : "true";
    1.86 +		
    1.87 +		saveState(
    1.88 +			bi,
    1.89 +			QString("setIncludeImagesHorizontally (%1)").arg(u),
    1.90 +			bi, 
    1.91 +			QString("setIncludeImagesHorizontally (%1)").arg(r),
    1.92 +			QString("Include images horizontally in %1").arg(getObjectName(bi))
    1.93 +		);	
    1.94 +		bi->setIncludeImagesHor(b);
    1.95 +		emitDataHasChanged ( bi);
    1.96 +		reposition();
    1.97  	}	
    1.98 -	*/
    1.99  }
   1.100  
   1.101  void VymModel::setHideLinkUnselected (bool b)//FIXME-2
   1.102 @@ -2235,7 +2225,7 @@
   1.103  	return false;
   1.104  }
   1.105  
   1.106 -void VymModel::deleteSelection()
   1.107 +void VymModel::deleteSelection()	// FIXME-2 include fix for deleted mapcenters from 1.12.4
   1.108  {
   1.109  	BranchItem *selbi=getSelectedBranchItem();
   1.110  
   1.111 @@ -4160,7 +4150,7 @@
   1.112  	}
   1.113  }	
   1.114  
   1.115 -void VymModel::setMapBackgroundImage (const QString &fn)	//FIXME-2 missing savestate
   1.116 +void VymModel::setMapBackgroundImage (const QString &fn)	//FIXME-2 missing savestate, move to ME
   1.117  {
   1.118  	QColor oldcol=mapScene->backgroundBrush().color();
   1.119  	/*
   1.120 @@ -4473,7 +4463,7 @@
   1.121      }
   1.122  }
   1.123  
   1.124 -/* FIXME-3
   1.125 +/* FIXME-3 Playing with DBUS...
   1.126  QDBusVariant VymModel::query (const QString &query)
   1.127  {
   1.128  	TreeItem *selti=getSelectedItem();
   1.129 @@ -4484,6 +4474,11 @@
   1.130  }
   1.131  */
   1.132  
   1.133 +void VymModel::testslot()	//FIXME-3
   1.134 +{
   1.135 +	cout << "VM::testslot called\n";
   1.136 +}
   1.137 +
   1.138  void VymModel::selectMapSelectionColor()
   1.139  {
   1.140  	QColor col = QColorDialog::getColor( defLinkColor, NULL);