Various fixes, also from 1.12. branch
authorinsilmaril
Mon Oct 06 11:10:20 2008 +0000 (2008-10-06)
changeset 7267f43b93242aa
parent 725 7ea31701156e
child 727 96402b172173
Various fixes, also from 1.12. branch
animpoint.cpp
demos/vym-projectplan.vym
lang/vym_zh_CN.ts
linkablemapobj.cpp
linkablemapobj.h
mainwindow.cpp
mainwindow.h
mapeditor.cpp
mapeditor.h
selection.cpp
selection.h
tex/vym.changelog
treeitem.cpp
treeitem.h
treemodel.cpp
treemodel.h
version.h
vym.pro
vymmodel.cpp
vymmodel.h
vymview.cpp
vymview.h
xml-vym.cpp
     1.1 --- a/animpoint.cpp	Tue Aug 05 07:36:53 2008 +0000
     1.2 +++ b/animpoint.cpp	Mon Oct 06 11:10:20 2008 +0000
     1.3 @@ -114,8 +114,12 @@
     1.4  		setY (destPos.y() );
     1.5  		return animated;
     1.6  	}
     1.7 -	setX (startPos.x() + vector.x()*sqrt(n/animTicks) );
     1.8 -	setY (startPos.y() + vector.y()*sqrt(n/animTicks) );
     1.9 +
    1.10 +	// Some math slow down the movement
    1.11 +	qreal f=1-n/animTicks;
    1.12 +	qreal ff=1-f*f*f;
    1.13 +	setX (startPos.x() + vector.x()*ff );
    1.14 +	setY (startPos.y() + vector.y()*ff );
    1.15  
    1.16  	return animated;
    1.17  }
     2.1 Binary file demos/vym-projectplan.vym has changed
     3.1 --- a/lang/vym_zh_CN.ts	Tue Aug 05 07:36:53 2008 +0000
     3.2 +++ b/lang/vym_zh_CN.ts	Mon Oct 06 11:10:20 2008 +0000
     3.3 @@ -1,9 +1,10 @@
     3.4  <?xml version="1.0" encoding="utf-8"?>
     3.5  <!DOCTYPE TS><TS version="1.1" language="zh_CN">
     3.6 +<defaultcodec></defaultcodec>
     3.7  <context>
     3.8      <name>AboutDialog</name>
     3.9      <message>
    3.10 -        <location filename="../aboutdialog.cpp" line="205"/>
    3.11 +        <location filename="../aboutdialog.cpp" line="208"/>
    3.12          <source>Ok</source>
    3.13          <comment>Ok Button</comment>
    3.14          <translation>确定</translation>
    3.15 @@ -12,23 +13,23 @@
    3.16  <context>
    3.17      <name>AboutTextBrowser</name>
    3.18      <message>
    3.19 -        <location filename="../aboutdialog.cpp" line="228"/>
    3.20 +        <location filename="../aboutdialog.cpp" line="231"/>
    3.21          <source>Please use Settings-&gt;</source>
    3.22          <translation>请使用 &quot;设置&quot;-&gt;</translation>
    3.23      </message>
    3.24      <message>
    3.25 -        <location filename="../aboutdialog.cpp" line="228"/>
    3.26 +        <location filename="../aboutdialog.cpp" line="231"/>
    3.27          <source>Set application to open an URL</source>
    3.28          <translation>设置用于打开 URL 的应用程序</translation>
    3.29      </message>
    3.30      <message>
    3.31 -        <location filename="../aboutdialog.cpp" line="226"/>
    3.32 +        <location filename="../aboutdialog.cpp" line="229"/>
    3.33          <source>Warning</source>
    3.34          <comment>About window</comment>
    3.35          <translation>警告</translation>
    3.36      </message>
    3.37      <message>
    3.38 -        <location filename="../aboutdialog.cpp" line="227"/>
    3.39 +        <location filename="../aboutdialog.cpp" line="230"/>
    3.40          <source>Couldn&apos;t find a viewer to open %1.
    3.41  </source>
    3.42          <comment>About window</comment>
    3.43 @@ -41,12 +42,12 @@
    3.44      <message>
    3.45          <location filename="../attributedialog.cpp" line="74"/>
    3.46          <source>AttributeDialog - Edit definitions</source>
    3.47 -        <translation type="unfinished"></translation>
    3.48 +        <translation>属性对话框 - 编辑定义</translation>
    3.49      </message>
    3.50      <message>
    3.51          <location filename="../attributedialog.cpp" line="76"/>
    3.52          <source>AttributeDialog - Edit %1</source>
    3.53 -        <translation type="unfinished"></translation>
    3.54 +        <translation>属性对话框 - 编辑 %1</translation>
    3.55      </message>
    3.56  </context>
    3.57  <context>
    3.58 @@ -54,17 +55,17 @@
    3.59      <message>
    3.60          <location filename="../attributedialog.cpp" line="48"/>
    3.61          <source>Attributes</source>
    3.62 -        <translation type="unfinished"></translation>
    3.63 +        <translation>属性</translation>
    3.64      </message>
    3.65      <message>
    3.66          <location filename="../attributedialog.cpp" line="49"/>
    3.67          <source>Add key</source>
    3.68 -        <translation type="unfinished"></translation>
    3.69 +        <translation>添加键</translation>
    3.70      </message>
    3.71      <message>
    3.72          <location filename="../attributedialog.cpp" line="50"/>
    3.73          <source>Close</source>
    3.74 -        <translation type="unfinished">关闭</translation>
    3.75 +        <translation>关闭</translation>
    3.76      </message>
    3.77  </context>
    3.78  <context>
    3.79 @@ -72,7 +73,7 @@
    3.80      <message>
    3.81          <location filename="../attributewidget.ui" line="13"/>
    3.82          <source>Form</source>
    3.83 -        <translation type="unfinished"></translation>
    3.84 +        <translation>表单</translation>
    3.85      </message>
    3.86  </context>
    3.87  <context>
    3.88 @@ -81,125 +82,125 @@
    3.89          <location filename="../branchpropwindow.cpp" line="16"/>
    3.90          <source>Property Editor</source>
    3.91          <comment>Window caption</comment>
    3.92 -        <translation type="unfinished"></translation>
    3.93 +        <translation>属性编辑器</translation>
    3.94      </message>
    3.95      <message>
    3.96          <location filename="../branchpropwindow.cpp" line="32"/>
    3.97          <source>Name</source>
    3.98          <comment>Branchprop window: Attribute name</comment>
    3.99 -        <translation type="unfinished"></translation>
   3.100 +        <translation>名</translation>
   3.101      </message>
   3.102      <message>
   3.103          <location filename="../branchpropwindow.cpp" line="33"/>
   3.104          <source>Value</source>
   3.105          <comment>Branchprop window: Attribute value</comment>
   3.106 -        <translation type="unfinished"></translation>
   3.107 +        <translation>值</translation>
   3.108      </message>
   3.109      <message>
   3.110          <location filename="../branchpropwindow.cpp" line="34"/>
   3.111          <source>Type</source>
   3.112          <comment>Branchprop window: Attribute type</comment>
   3.113 -        <translation type="unfinished"></translation>
   3.114 +        <translation>类型</translation>
   3.115      </message>
   3.116      <message>
   3.117          <location filename="../branchpropwindow.ui" line="19"/>
   3.118          <source>Branch Property Editor</source>
   3.119 -        <translation type="unfinished"></translation>
   3.120 +        <translation>分支属性编辑器</translation>
   3.121      </message>
   3.122      <message>
   3.123          <location filename="../branchpropwindow.ui" line="29"/>
   3.124          <source>Frame</source>
   3.125 -        <translation type="unfinished"></translation>
   3.126 +        <translation>边框</translation>
   3.127      </message>
   3.128      <message>
   3.129          <location filename="../branchpropwindow.ui" line="50"/>
   3.130          <source>Geometry</source>
   3.131 -        <translation type="unfinished"></translation>
   3.132 +        <translation>几何</translation>
   3.133      </message>
   3.134      <message>
   3.135          <location filename="../branchpropwindow.ui" line="63"/>
   3.136          <source>No Frame</source>
   3.137 -        <translation type="unfinished">无边框</translation>
   3.138 +        <translation>无边框</translation>
   3.139      </message>
   3.140      <message>
   3.141          <location filename="../branchpropwindow.ui" line="68"/>
   3.142          <source>Rectangle</source>
   3.143 -        <translation type="unfinished">矩形</translation>
   3.144 +        <translation>矩形</translation>
   3.145      </message>
   3.146      <message>
   3.147          <location filename="../branchpropwindow.ui" line="73"/>
   3.148          <source>Ellipse</source>
   3.149 -        <translation type="unfinished"></translation>
   3.150 +        <translation>椭圆</translation>
   3.151      </message>
   3.152      <message>
   3.153          <location filename="../branchpropwindow.ui" line="94"/>
   3.154          <source>Padding</source>
   3.155 -        <translation type="unfinished"></translation>
   3.156 +        <translation>填充</translation>
   3.157      </message>
   3.158      <message>
   3.159          <location filename="../branchpropwindow.ui" line="101"/>
   3.160          <source>Borderline width</source>
   3.161 -        <translation type="unfinished"></translation>
   3.162 +        <translation>边缘宽度</translation>
   3.163      </message>
   3.164      <message>
   3.165          <location filename="../branchpropwindow.ui" line="151"/>
   3.166          <source>Colors</source>
   3.167 -        <translation type="unfinished"></translation>
   3.168 +        <translation>颜色</translation>
   3.169      </message>
   3.170      <message>
   3.171          <location filename="../branchpropwindow.ui" line="194"/>
   3.172          <source>Borderline color</source>
   3.173 -        <translation type="unfinished"></translation>
   3.174 +        <translation>边缘颜色</translation>
   3.175      </message>
   3.176      <message>
   3.177          <location filename="../branchpropwindow.ui" line="217"/>
   3.178          <source>Background color</source>
   3.179 -        <translation type="unfinished"></translation>
   3.180 +        <translation>背景颜色</translation>
   3.181      </message>
   3.182      <message>
   3.183          <location filename="../branchpropwindow.ui" line="246"/>
   3.184          <source>Layout</source>
   3.185 -        <translation type="unfinished"></translation>
   3.186 +        <translation>布局</translation>
   3.187      </message>
   3.188      <message>
   3.189          <location filename="../branchpropwindow.ui" line="254"/>
   3.190          <source>Include images horizontally</source>
   3.191 -        <translation type="unfinished">在水平方向包含图象</translation>
   3.192 +        <translation>在水平方向包含图象</translation>
   3.193      </message>
   3.194      <message>
   3.195          <location filename="../branchpropwindow.ui" line="261"/>
   3.196          <source>Include images vertically</source>
   3.197 -        <translation type="unfinished">在垂直方向包含图象</translation>
   3.198 +        <translation>在垂直方向包含图象</translation>
   3.199      </message>
   3.200      <message>
   3.201          <location filename="../branchpropwindow.ui" line="284"/>
   3.202          <source>Link</source>
   3.203 -        <translation type="unfinished"></translation>
   3.204 +        <translation>链接</translation>
   3.205      </message>
   3.206      <message>
   3.207          <location filename="../branchpropwindow.ui" line="290"/>
   3.208          <source>Hide link if unselected</source>
   3.209 -        <translation type="unfinished"></translation>
   3.210 +        <translation>未选中时隐藏链接</translation>
   3.211      </message>
   3.212      <message>
   3.213          <location filename="../branchpropwindow.ui" line="311"/>
   3.214          <source>Attributes</source>
   3.215 -        <translation type="unfinished"></translation>
   3.216 +        <translation>属性</translation>
   3.217      </message>
   3.218      <message>
   3.219          <location filename="../branchpropwindow.ui" line="337"/>
   3.220          <source>+</source>
   3.221 -        <translation type="unfinished"></translation>
   3.222 +        <translation>+</translation>
   3.223      </message>
   3.224      <message>
   3.225          <location filename="../branchpropwindow.ui" line="344"/>
   3.226          <source>-</source>
   3.227 -        <translation type="unfinished"></translation>
   3.228 +        <translation>-</translation>
   3.229      </message>
   3.230      <message>
   3.231          <location filename="../branchpropwindow.ui" line="413"/>
   3.232          <source>Close</source>
   3.233 -        <translation type="unfinished">关闭</translation>
   3.234 +        <translation>关闭</translation>
   3.235      </message>
   3.236  </context>
   3.237  <context>
   3.238 @@ -283,7 +284,6 @@
   3.239          <translation>在该导图中保存设置</translation>
   3.240      </message>
   3.241      <message>
   3.242 -        <location filename="" line="0"/>
   3.243          <source>showWarnings e.g. if directory is not empty</source>
   3.244          <translation type="obsolete">显示警告,例如当目录非空时</translation>
   3.245      </message>
   3.246 @@ -353,22 +353,18 @@
   3.247          <translation>VYM - 导出 HTML 至目录</translation>
   3.248      </message>
   3.249      <message>
   3.250 -        <location filename="" line="0"/>
   3.251          <source>VYM - Path to CSS file</source>
   3.252          <translation type="obsolete">VYM - CSS 文件路径</translation>
   3.253      </message>
   3.254      <message>
   3.255 -        <location filename="" line="0"/>
   3.256          <source>VYM - Path to XSL file</source>
   3.257          <translation type="obsolete">VYM - XSL 文件路径</translation>
   3.258      </message>
   3.259      <message>
   3.260 -        <location filename="" line="0"/>
   3.261          <source>VYM - Path to pre export script</source>
   3.262          <translation type="obsolete">VYM - 预导出脚本路径</translation>
   3.263      </message>
   3.264      <message>
   3.265 -        <location filename="" line="0"/>
   3.266          <source>VYM - Path to post export script</source>
   3.267          <translation type="obsolete">VYM - 导出后脚本路径</translation>
   3.268      </message>
   3.269 @@ -400,7 +396,7 @@
   3.270      <message>
   3.271          <location filename="../exportxhtmldialog.ui" line="165"/>
   3.272          <source>show warnings of xslt processor</source>
   3.273 -        <translation type="unfinished"></translation>
   3.274 +        <translation>显示 XSLT 处理器的警告</translation>
   3.275      </message>
   3.276  </context>
   3.277  <context>
   3.278 @@ -474,7 +470,7 @@
   3.279      <message>
   3.280          <location filename="../vymmodel.cpp" line="105"/>
   3.281          <source>New map</source>
   3.282 -        <translation type="unfinished">新建导图</translation>
   3.283 +        <translation>新建导图</translation>
   3.284      </message>
   3.285  </context>
   3.286  <context>
   3.287 @@ -490,7 +486,6 @@
   3.288          <translation>重做</translation>
   3.289      </message>
   3.290      <message>
   3.291 -        <location filename="" line="0"/>
   3.292          <source>New Row</source>
   3.293          <translation type="obsolete">新行</translation>
   3.294      </message>
   3.295 @@ -582,7 +577,6 @@
   3.296          <translation>卷起分支</translation>
   3.297      </message>
   3.298      <message>
   3.299 -        <location filename="" line="0"/>
   3.300          <source>Unscroll all</source>
   3.301          <translation type="obsolete">展开全部</translation>
   3.302      </message>
   3.303 @@ -607,7 +601,6 @@
   3.304          <translation>使用当前选定分支的标题作为 URL</translation>
   3.305      </message>
   3.306      <message>
   3.307 -        <location filename="" line="0"/>
   3.308          <source>Create URL to Bugzilla</source>
   3.309          <translation type="obsolete">创建至 Bugzilla 的 URL</translation>
   3.310      </message>
   3.311 @@ -744,7 +737,6 @@
   3.312          <translation>直线链接样式</translation>
   3.313      </message>
   3.314      <message>
   3.315 -        <location filename="" line="0"/>
   3.316          <source>Linkstyle Parabel</source>
   3.317          <translation type="obsolete">抛物线链接样式</translation>
   3.318      </message>
   3.319 @@ -764,17 +756,14 @@
   3.320          <translation>多股抛物线</translation>
   3.321      </message>
   3.322      <message>
   3.323 -        <location filename="" line="0"/>
   3.324          <source>Linkstyle Thick Parabel</source>
   3.325          <translation type="obsolete">粗抛物线链接样式</translation>
   3.326      </message>
   3.327      <message>
   3.328 -        <location filename="" line="0"/>
   3.329          <source>No Frame</source>
   3.330          <translation type="obsolete">无边框</translation>
   3.331      </message>
   3.332      <message>
   3.333 -        <location filename="" line="0"/>
   3.334          <source>Rectangle</source>
   3.335          <translation type="obsolete">矩形</translation>
   3.336      </message>
   3.337 @@ -819,12 +808,10 @@
   3.338          <translation>缩小</translation>
   3.339      </message>
   3.340      <message>
   3.341 -        <location filename="" line="0"/>
   3.342          <source>&amp;Next Window</source>
   3.343          <translation type="obsolete">下一窗口(&amp;N)</translation>
   3.344      </message>
   3.345      <message>
   3.346 -        <location filename="" line="0"/>
   3.347          <source>&amp;Previous Window</source>
   3.348          <translation type="obsolete">上一窗口(&amp;P)</translation>
   3.349      </message>
   3.350 @@ -894,12 +881,10 @@
   3.351          <translation>新建</translation>
   3.352      </message>
   3.353      <message>
   3.354 -        <location filename="" line="0"/>
   3.355          <source>Critical Load Error</source>
   3.356          <translation type="obsolete">严重载入错误</translation>
   3.357      </message>
   3.358      <message>
   3.359 -        <location filename="" line="0"/>
   3.360          <source>Couldn&apos;t find a map (*.xml) in .vym archive.
   3.361  </source>
   3.362          <translation type="obsolete">无法在 .vym 存档中找到导图(*.xml)。
   3.363 @@ -921,29 +906,24 @@
   3.364          <translation>导入:将选中项替换为 vym 导图</translation>
   3.365      </message>
   3.366      <message>
   3.367 -        <location filename="" line="0"/>
   3.368          <source>Save Error</source>
   3.369          <translation type="obsolete">保存错误</translation>
   3.370      </message>
   3.371      <message>
   3.372 -        <location filename="" line="0"/>
   3.373          <source>
   3.374  could not be removed before saving</source>
   3.375          <translation type="obsolete">
   3.376  无法在保存前删除</translation>
   3.377      </message>
   3.378      <message>
   3.379 -        <location filename="" line="0"/>
   3.380          <source>compressed (vym default)</source>
   3.381          <translation type="obsolete">压缩(vym 默认)</translation>
   3.382      </message>
   3.383      <message>
   3.384 -        <location filename="" line="0"/>
   3.385          <source>uncompressed</source>
   3.386          <translation type="obsolete">未压缩</translation>
   3.387      </message>
   3.388      <message>
   3.389 -        <location filename="" line="0"/>
   3.390          <source>Export XML to directory</source>
   3.391          <translation type="obsolete">导出 XML 至目录</translation>
   3.392      </message>
   3.393 @@ -983,7 +963,6 @@
   3.394          <translation>严重错误</translation>
   3.395      </message>
   3.396      <message>
   3.397 -        <location filename="" line="0"/>
   3.398          <source>Couldn&apos;t find the documentation
   3.399  vym.pdf in various places.</source>
   3.400          <translation type="obsolete">无法在任何位置找到文档 vym.pdf。</translation>
   3.401 @@ -1052,7 +1031,6 @@
   3.402  您希望新建一个吗?</translation>
   3.403      </message>
   3.404      <message>
   3.405 -        <location filename="" line="0"/>
   3.406          <source>The map %1
   3.407  did not use the compressed vym file format.
   3.408  Writing it uncompressed will also write images 
   3.409 @@ -1104,17 +1082,14 @@
   3.410          <translation>重做</translation>
   3.411      </message>
   3.412      <message>
   3.413 -        <location filename="" line="0"/>
   3.414          <source>Create URL to FATE</source>
   3.415          <translation type="obsolete">创建至 FATE 的 URL</translation>
   3.416      </message>
   3.417      <message>
   3.418 -        <location filename="" line="0"/>
   3.419          <source>Include top and bottom position of images into branch</source>
   3.420          <translation type="obsolete">将图象上下位置包括进分支</translation>
   3.421      </message>
   3.422      <message>
   3.423 -        <location filename="" line="0"/>
   3.424          <source>Include left and right position of images into branch</source>
   3.425          <translation type="obsolete">将图象左右位置包括进分支</translation>
   3.426      </message>
   3.427 @@ -1124,31 +1099,26 @@
   3.428          <translation>隐藏链接</translation>
   3.429      </message>
   3.430      <message>
   3.431 -        <location filename="" line="0"/>
   3.432          <source>Note</source>
   3.433          <comment>Systemflag</comment>
   3.434          <translation type="obsolete">注解</translation>
   3.435      </message>
   3.436      <message>
   3.437 -        <location filename="" line="0"/>
   3.438          <source>WWW Document (external)</source>
   3.439          <comment>Systemflag</comment>
   3.440          <translation type="obsolete">WWW 文档(外部)</translation>
   3.441      </message>
   3.442      <message>
   3.443 -        <location filename="" line="0"/>
   3.444          <source>Link to another vym map</source>
   3.445          <comment>Systemflag</comment>
   3.446          <translation type="obsolete">至另一 vym 导图的链接</translation>
   3.447      </message>
   3.448      <message>
   3.449 -        <location filename="" line="0"/>
   3.450          <source>subtree is scrolled</source>
   3.451          <comment>Systemflag</comment>
   3.452          <translation type="obsolete">子树已卷起</translation>
   3.453      </message>
   3.454      <message>
   3.455 -        <location filename="" line="0"/>
   3.456          <source>subtree is temporary scrolled</source>
   3.457          <comment>Systemflag</comment>
   3.458          <translation type="obsolete">子树暂时卷起</translation>
   3.459 @@ -1232,7 +1202,6 @@
   3.460          <translation>我不喜欢</translation>
   3.461      </message>
   3.462      <message>
   3.463 -        <location filename="" line="0"/>
   3.464          <source>I just love... </source>
   3.465          <comment>Standardflag</comment>
   3.466          <translation type="obsolete">我就是爱……<byte value="x9"/></translation>
   3.467 @@ -1265,7 +1234,6 @@
   3.468          <translation>KDE 书签</translation>
   3.469      </message>
   3.470      <message>
   3.471 -        <location filename="" line="0"/>
   3.472          <source>Export as ASCII</source>
   3.473          <translation type="obsolete">导出为 ASCII</translation>
   3.474      </message>
   3.475 @@ -1295,7 +1263,6 @@
   3.476          <translation>导出时隐藏对象</translation>
   3.477      </message>
   3.478      <message>
   3.479 -        <location filename="" line="0"/>
   3.480          <source>Hide object in exported maps</source>
   3.481          <comment>Systemflag</comment>
   3.482          <translation type="obsolete">导出时将被隐藏的对象</translation>
   3.483 @@ -1395,7 +1362,6 @@
   3.484          <translation>显示注解编辑器</translation>
   3.485      </message>
   3.486      <message>
   3.487 -        <location filename="" line="0"/>
   3.488          <source>Show history window</source>
   3.489          <translation type="obsolete">显示历史窗口</translation>
   3.490      </message>
   3.491 @@ -1410,7 +1376,6 @@
   3.492          <translation>无法启动 %1 以打开一个新标签。</translation>
   3.493      </message>
   3.494      <message>
   3.495 -        <location filename="" line="0"/>
   3.496          <source>Export map as image</source>
   3.497          <translation type="obsolete">将导图导出为图象</translation>
   3.498      </message>
   3.499 @@ -1448,14 +1413,12 @@
   3.500          <translation>打开子树中的所有链接</translation>
   3.501      </message>
   3.502      <message>
   3.503 -        <location filename="" line="0"/>
   3.504          <source>Couldn&apos;t create temporary directory before load
   3.505  </source>
   3.506          <translation type="obsolete">无法在载入前创建临时目录
   3.507  </translation>
   3.508      </message>
   3.509      <message>
   3.510 -        <location filename="" line="0"/>
   3.511          <source>Couldn&apos;t create temporary directory before save
   3.512  </source>
   3.513          <translation type="obsolete">无法在保存前创建临时目录</translation>
   3.514 @@ -1466,7 +1429,6 @@
   3.515          <translation>对不起,当前只有 Konqueror 和 Mozilla 支持标签浏览。</translation>
   3.516      </message>
   3.517      <message>
   3.518 -        <location filename="" line="0"/>
   3.519          <source>&amp;New...</source>
   3.520          <comment>File menu</comment>
   3.521          <translation type="obsolete">新建(&amp;N)...</translation>
   3.522 @@ -1722,7 +1684,6 @@
   3.523          <translation>卷起分支</translation>
   3.524      </message>
   3.525      <message>
   3.526 -        <location filename="" line="0"/>
   3.527          <source>Unscroll all scrolled branches</source>
   3.528          <comment>Edit menu</comment>
   3.529          <translation type="obsolete">展开所有卷起的分支</translation>
   3.530 @@ -1764,13 +1725,11 @@
   3.531          <translation>将标题作为 URL</translation>
   3.532      </message>
   3.533      <message>
   3.534 -        <location filename="" line="0"/>
   3.535          <source>Create URL to Bugzilla</source>
   3.536          <comment>Edit menu</comment>
   3.537          <translation type="obsolete">创建至 Bugzilla 的 URL</translation>
   3.538      </message>
   3.539      <message>
   3.540 -        <location filename="" line="0"/>
   3.541          <source>Create URL to FATE</source>
   3.542          <comment>Edit menu</comment>
   3.543          <translation type="obsolete">创建至 FATE 的 URL</translation>
   3.544 @@ -1914,24 +1873,20 @@
   3.545          <translation>着色子树(&amp;T)</translation>
   3.546      </message>
   3.547      <message>
   3.548 -        <location filename="" line="0"/>
   3.549          <source>No Frame</source>
   3.550          <comment>Branch attribute</comment>
   3.551          <translation type="obsolete">无边框</translation>
   3.552      </message>
   3.553      <message>
   3.554 -        <location filename="" line="0"/>
   3.555          <source>RectangleBranch attribute</source>
   3.556          <translation type="obsolete">举行分支属性</translation>
   3.557      </message>
   3.558      <message>
   3.559 -        <location filename="" line="0"/>
   3.560          <source>Include images vertically</source>
   3.561          <comment>Branch attribute</comment>
   3.562          <translation type="obsolete">在垂直方向包含图象</translation>
   3.563      </message>
   3.564      <message>
   3.565 -        <location filename="" line="0"/>
   3.566          <source>Include images horizontally</source>
   3.567          <comment>Branch attribute</comment>
   3.568          <translation type="obsolete">在水平方向包含图象</translation>
   3.569 @@ -1979,19 +1934,16 @@
   3.570          <translation>显示注解编辑器</translation>
   3.571      </message>
   3.572      <message>
   3.573 -        <location filename="" line="0"/>
   3.574          <source>Show history window</source>
   3.575          <comment>View action</comment>
   3.576          <translation type="obsolete">显示历史窗口</translation>
   3.577      </message>
   3.578      <message>
   3.579 -        <location filename="" line="0"/>
   3.580          <source>Next Window</source>
   3.581          <comment>View action</comment>
   3.582          <translation type="obsolete">下一窗口</translation>
   3.583      </message>
   3.584      <message>
   3.585 -        <location filename="" line="0"/>
   3.586          <source>Previous Window</source>
   3.587          <comment>View action</comment>
   3.588          <translation type="obsolete">上一窗口</translation>
   3.589 @@ -2099,7 +2051,6 @@
   3.590          <translation>删除</translation>
   3.591      </message>
   3.592      <message>
   3.593 -        <location filename="" line="0"/>
   3.594          <source>URLs and vymLinks</source>
   3.595          <comment>Context menu name</comment>
   3.596          <translation type="obsolete">URL 以及 vym链接</translation>
   3.597 @@ -2123,7 +2074,6 @@
   3.598          <translation>保存图象</translation>
   3.599      </message>
   3.600      <message>
   3.601 -        <location filename="" line="0"/>
   3.602          <source>The directory %1 is not empty.
   3.603  Do you risk to overwrite its contents?</source>
   3.604          <comment>write directory</comment>
   3.605 @@ -2134,497 +2084,499 @@
   3.606          <location filename="../mainwindow.cpp" line="301"/>
   3.607          <source>&amp;New map</source>
   3.608          <comment>File menu</comment>
   3.609 -        <translation type="unfinished"></translation>
   3.610 +        <translation>新建导图(&amp;N)</translation>
   3.611      </message>
   3.612      <message>
   3.613          <location filename="../mainwindow.cpp" line="308"/>
   3.614          <source>&amp;Copy to new map</source>
   3.615          <comment>File menu</comment>
   3.616 -        <translation type="unfinished"></translation>
   3.617 +        <translation>复制到新导图(&amp;C)</translation>
   3.618      </message>
   3.619      <message>
   3.620          <location filename="../mainwindow.cpp" line="309"/>
   3.621          <source>Copy selection to mapcenter of a new map</source>
   3.622          <comment>Status tip File menu</comment>
   3.623 -        <translation type="unfinished"></translation>
   3.624 +        <translation>复制选区到新导图的图心</translation>
   3.625      </message>
   3.626      <message>
   3.627          <location filename="../mainwindow.cpp" line="532"/>
   3.628          <source>Add mapcenter</source>
   3.629          <comment>Canvas context menu</comment>
   3.630 -        <translation type="unfinished"></translation>
   3.631 +        <translation>添加图心</translation>
   3.632      </message>
   3.633      <message>
   3.634          <location filename="../mainwindow.cpp" line="631"/>
   3.635          <source>Sort children</source>
   3.636          <comment>Edit menu</comment>
   3.637 -        <translation type="unfinished"></translation>
   3.638 +        <translation>子分支排序</translation>
   3.639      </message>
   3.640      <message>
   3.641          <location filename="../mainwindow.cpp" line="661"/>
   3.642          <source>Unscroll childs</source>
   3.643          <comment>Edit menu</comment>
   3.644 -        <translation type="unfinished"></translation>
   3.645 +        <translation>展开子分支</translation>
   3.646      </message>
   3.647      <message>
   3.648          <location filename="../mainwindow.cpp" line="662"/>
   3.649          <source>Unscroll all scrolled branches in selected subtree</source>
   3.650 -        <translation type="unfinished"></translation>
   3.651 +        <translation>在选择子树里展开所有卷起的分支</translation>
   3.652      </message>
   3.653      <message>
   3.654          <location filename="../mainwindow.cpp" line="707"/>
   3.655          <source>Edit local URL...</source>
   3.656          <comment>Edit menu</comment>
   3.657 -        <translation type="unfinished"></translation>
   3.658 +        <translation>编辑本地 URL...</translation>
   3.659      </message>
   3.660      <message>
   3.661          <location filename="../mainwindow.cpp" line="708"/>
   3.662          <source>Edit local URL</source>
   3.663 -        <translation type="unfinished"></translation>
   3.664 +        <translation>编辑本地 URL</translation>
   3.665      </message>
   3.666      <message>
   3.667          <location filename="../mainwindow.cpp" line="723"/>
   3.668          <source>Create URL to Novell Bugzilla</source>
   3.669          <comment>Edit menu</comment>
   3.670 -        <translation type="unfinished"></translation>
   3.671 +        <translation>创建至 Novell Bugzilla 的 URL</translation>
   3.672      </message>
   3.673      <message>
   3.674          <location filename="../mainwindow.cpp" line="724"/>
   3.675          <source>Create URL to Novell Bugzilla</source>
   3.676 -        <translation type="unfinished"></translation>
   3.677 +        <translation>创建至 Novell Bugzilla 的 URL</translation>
   3.678      </message>
   3.679      <message>
   3.680          <location filename="../mainwindow.cpp" line="730"/>
   3.681          <source>Create URL to Novell FATE</source>
   3.682          <comment>Edit menu</comment>
   3.683 -        <translation type="unfinished"></translation>
   3.684 +        <translation>创建至 Novell FATE 的 URL</translation>
   3.685      </message>
   3.686      <message>
   3.687          <location filename="../mainwindow.cpp" line="731"/>
   3.688          <source>Create URL to Novell FATE</source>
   3.689 -        <translation type="unfinished"></translation>
   3.690 +        <translation>创建至 Novell FATE 的 URL</translation>
   3.691      </message>
   3.692      <message>
   3.693          <location filename="../mainwindow.cpp" line="874"/>
   3.694          <source>Property window</source>
   3.695          <comment>Dialog to edit properties of selection</comment>
   3.696 -        <translation type="unfinished"></translation>
   3.697 +        <translation>属性窗口</translation>
   3.698      </message>
   3.699      <message>
   3.700          <location filename="../mainwindow.cpp" line="875"/>
   3.701          <source>Set properties for selection</source>
   3.702 -        <translation type="unfinished"></translation>
   3.703 +        <translation>设置选区属性</translation>
   3.704      </message>
   3.705      <message>
   3.706          <location filename="../mainwindow.cpp" line="939"/>
   3.707          <source>Linkstyle Curve</source>
   3.708 -        <translation type="unfinished"></translation>
   3.709 +        <translation>曲线链接样式</translation>
   3.710      </message>
   3.711      <message>
   3.712          <location filename="../mainwindow.cpp" line="951"/>
   3.713          <source>Linkstyle Thick Curve</source>
   3.714 -        <translation type="unfinished"></translation>
   3.715 +        <translation>粗曲线链接样式</translation>
   3.716      </message>
   3.717      <message>
   3.718          <location filename="../mainwindow.cpp" line="974"/>
   3.719          <source>Set &amp;Link Color</source>
   3.720 -        <translation type="unfinished"></translation>
   3.721 +        <translation>设置链接颜色(&amp;L)</translation>
   3.722      </message>
   3.723      <message>
   3.724          <location filename="../mainwindow.cpp" line="980"/>
   3.725          <source>Set &amp;Selection Color</source>
   3.726 -        <translation type="unfinished"></translation>
   3.727 +        <translation>设置选区颜色(&amp;S)</translation>
   3.728      </message>
   3.729      <message>
   3.730          <location filename="../mainwindow.cpp" line="981"/>
   3.731          <source>Set Selection Color</source>
   3.732 -        <translation type="unfinished"></translation>
   3.733 +        <translation>设置选区颜色</translation>
   3.734      </message>
   3.735      <message>
   3.736          <location filename="../mainwindow.cpp" line="992"/>
   3.737          <source>Set &amp;Background image</source>
   3.738 -        <translation type="unfinished"></translation>
   3.739 +        <translation>设置背景图像(&amp;B)</translation>
   3.740      </message>
   3.741      <message>
   3.742          <location filename="../mainwindow.cpp" line="993"/>
   3.743          <source>Set Background image</source>
   3.744 -        <translation type="unfinished"></translation>
   3.745 +        <translation>设置背景图像</translation>
   3.746      </message>
   3.747      <message>
   3.748          <location filename="../mainwindow.cpp" line="1029"/>
   3.749          <source>Show selection</source>
   3.750          <comment>View action</comment>
   3.751 -        <translation type="unfinished"></translation>
   3.752 +        <translation>显示选区</translation>
   3.753      </message>
   3.754      <message>
   3.755          <location filename="../mainwindow.cpp" line="1030"/>
   3.756          <source>Show selection</source>
   3.757 -        <translation type="unfinished"></translation>
   3.758 +        <translation>显示选区</translation>
   3.759      </message>
   3.760      <message>
   3.761          <location filename="../mainwindow.cpp" line="1047"/>
   3.762          <source>History Window</source>
   3.763          <comment>View action</comment>
   3.764 -        <translation type="unfinished"></translation>
   3.765 +        <translation>历史窗口</translation>
   3.766      </message>
   3.767      <message>
   3.768          <location filename="../mainwindow.cpp" line="1048"/>
   3.769          <source>Show History Window</source>
   3.770 -        <translation type="unfinished"></translation>
   3.771 +        <translation>显示历史窗口</translation>
   3.772      </message>
   3.773      <message>
   3.774          <location filename="../mainwindow.cpp" line="1060"/>
   3.775          <source>Antialiasing</source>
   3.776          <comment>View action</comment>
   3.777 -        <translation type="unfinished"></translation>
   3.778 +        <translation>反锯齿</translation>
   3.779      </message>
   3.780      <message>
   3.781          <location filename="../mainwindow.cpp" line="1061"/>
   3.782          <source>Antialiasing</source>
   3.783 -        <translation type="unfinished"></translation>
   3.784 +        <translation>反锯齿</translation>
   3.785      </message>
   3.786      <message>
   3.787          <location filename="../mainwindow.cpp" line="1068"/>
   3.788          <source>Smooth pixmap transformations</source>
   3.789          <comment>View action</comment>
   3.790 -        <translation type="unfinished"></translation>
   3.791 +        <translation>平滑位图变形</translation>
   3.792      </message>
   3.793      <message>
   3.794          <location filename="../mainwindow.cpp" line="1076"/>
   3.795          <source>Next Map</source>
   3.796          <comment>View action</comment>
   3.797 -        <translation type="unfinished"></translation>
   3.798 +        <translation>下一导图</translation>
   3.799      </message>
   3.800      <message>
   3.801          <location filename="../mainwindow.cpp" line="1082"/>
   3.802          <source>Previous Map</source>
   3.803          <comment>View action</comment>
   3.804 -        <translation type="unfinished"></translation>
   3.805 +        <translation>上一导图</translation>
   3.806      </message>
   3.807      <message>
   3.808          <location filename="../mainwindow.cpp" line="1136"/>
   3.809          <source>Note</source>
   3.810          <comment>SystemFlag</comment>
   3.811 -        <translation type="unfinished">注解</translation>
   3.812 +        <translation>注解</translation>
   3.813      </message>
   3.814      <message>
   3.815          <location filename="../mainwindow.cpp" line="1139"/>
   3.816          <source>URL to Document </source>
   3.817          <comment>SystemFlag</comment>
   3.818 -        <translation type="unfinished"></translation>
   3.819 +        <translation>到文档的 URL</translation>
   3.820      </message>
   3.821      <message>
   3.822          <location filename="../mainwindow.cpp" line="1142"/>
   3.823          <source>Link to another vym map</source>
   3.824          <comment>SystemFlag</comment>
   3.825 -        <translation type="unfinished">至另一 vym 导图的链接</translation>
   3.826 +        <translation>至另一 vym 导图的链接</translation>
   3.827      </message>
   3.828      <message>
   3.829          <location filename="../mainwindow.cpp" line="1145"/>
   3.830          <source>subtree is scrolled</source>
   3.831          <comment>SystemFlag</comment>
   3.832 -        <translation type="unfinished">子树已卷起</translation>
   3.833 +        <translation>子树已卷起</translation>
   3.834      </message>
   3.835      <message>
   3.836          <location filename="../mainwindow.cpp" line="1148"/>
   3.837          <source>subtree is temporary scrolled</source>
   3.838          <comment>SystemFlag</comment>
   3.839 -        <translation type="unfinished">子树暂时卷起</translation>
   3.840 +        <translation>子树暂时卷起</translation>
   3.841      </message>
   3.842      <message>
   3.843          <location filename="../mainwindow.cpp" line="1151"/>
   3.844          <source>Hide object in exported maps</source>
   3.845          <comment>SystemFlag</comment>
   3.846 -        <translation type="unfinished">导出时将被隐藏的对象</translation>
   3.847 +        <translation>导出时将被隐藏的对象</translation>
   3.848      </message>
   3.849      <message>
   3.850          <location filename="../mainwindow.cpp" line="1235"/>
   3.851          <source>I just love...</source>
   3.852          <comment>Standardflag</comment>
   3.853 -        <translation type="unfinished"></translation>
   3.854 +        <translation>我只是喜欢 ...</translation>
   3.855      </message>
   3.856      <message>
   3.857          <location filename="../mainwindow.cpp" line="1256"/>
   3.858          <source>Important</source>
   3.859          <comment>Freemind-Flag</comment>
   3.860 -        <translation type="unfinished">重要</translation>
   3.861 +        <translation>重要</translation>
   3.862      </message>
   3.863      <message>
   3.864          <location filename="../mainwindow.cpp" line="1261"/>
   3.865          <source>Priority</source>
   3.866          <comment>Freemind-Flag</comment>
   3.867 -        <translation type="unfinished"></translation>
   3.868 +        <translation>优先级</translation>
   3.869      </message>
   3.870      <message>
   3.871          <location filename="../mainwindow.cpp" line="1265"/>
   3.872          <source>Back</source>
   3.873          <comment>Freemind-Flag</comment>
   3.874 -        <translation type="unfinished"></translation>
   3.875 +        <translation>返回</translation>
   3.876      </message>
   3.877      <message>
   3.878          <location filename="../mainwindow.cpp" line="1268"/>
   3.879          <source>Forward</source>
   3.880          <comment>Freemind-Flag</comment>
   3.881 -        <translation type="unfinished"></translation>
   3.882 +        <translation>前进</translation>
   3.883      </message>
   3.884      <message>
   3.885          <location filename="../mainwindow.cpp" line="1271"/>
   3.886          <source>Look here</source>
   3.887          <comment>Freemind-Flag</comment>
   3.888 -        <translation type="unfinished"></translation>
   3.889 +        <translation>看这里</translation>
   3.890      </message>
   3.891      <message>
   3.892          <location filename="../mainwindow.cpp" line="1274"/>
   3.893          <source>Dangerous</source>
   3.894          <comment>Freemind-Flag</comment>
   3.895 -        <translation type="unfinished">危险</translation>
   3.896 +        <translation>危险</translation>
   3.897      </message>
   3.898      <message>
   3.899          <location filename="../mainwindow.cpp" line="1277"/>
   3.900          <source>Don&apos;t forget</source>
   3.901          <comment>Freemind-Flag</comment>
   3.902 -        <translation type="unfinished"></translation>
   3.903 +        <translation>不要忘记</translation>
   3.904      </message>
   3.905      <message>
   3.906          <location filename="../mainwindow.cpp" line="1280"/>
   3.907          <source>Flag</source>
   3.908          <comment>Freemind-Flag</comment>
   3.909 -        <translation type="unfinished"></translation>
   3.910 +        <translation>标记</translation>
   3.911      </message>
   3.912      <message>
   3.913          <location filename="../mainwindow.cpp" line="1284"/>
   3.914          <source>Home</source>
   3.915          <comment>Freemind-Flag</comment>
   3.916 -        <translation type="unfinished"></translation>
   3.917 +        <translation>家</translation>
   3.918      </message>
   3.919      <message>
   3.920          <location filename="../mainwindow.cpp" line="1288"/>
   3.921          <source>Telephone</source>
   3.922          <comment>Freemind-Flag</comment>
   3.923 -        <translation type="unfinished"></translation>
   3.924 +        <translation>电话</translation>
   3.925      </message>
   3.926      <message>
   3.927          <location filename="../mainwindow.cpp" line="1291"/>
   3.928          <source>Music</source>
   3.929          <comment>Freemind-Flag</comment>
   3.930 -        <translation type="unfinished"></translation>
   3.931 +        <translation>音乐</translation>
   3.932      </message>
   3.933      <message>
   3.934          <location filename="../mainwindow.cpp" line="1294"/>
   3.935          <source>Mailbox</source>
   3.936          <comment>Freemind-Flag</comment>
   3.937 -        <translation type="unfinished"></translation>
   3.938 +        <translation>邮箱</translation>
   3.939      </message>
   3.940      <message>
   3.941          <location filename="../mainwindow.cpp" line="1297"/>
   3.942          <source>Maix</source>
   3.943          <comment>Freemind-Flag</comment>
   3.944 -        <translation type="unfinished"></translation>
   3.945 +        <translation>Maix</translation>
   3.946      </message>
   3.947      <message>
   3.948          <location filename="../mainwindow.cpp" line="1300"/>
   3.949          <source>Password</source>
   3.950          <comment>Freemind-Flag</comment>
   3.951 -        <translation type="unfinished"></translation>
   3.952 +        <translation>密码</translation>
   3.953      </message>
   3.954      <message>
   3.955          <location filename="../mainwindow.cpp" line="1303"/>
   3.956          <source>To be improved</source>
   3.957          <comment>Freemind-Flag</comment>
   3.958 -        <translation type="unfinished"></translation>
   3.959 +        <translation>将要改进</translation>
   3.960      </message>
   3.961      <message>
   3.962          <location filename="../mainwindow.cpp" line="1306"/>
   3.963          <source>Stop</source>
   3.964          <comment>Freemind-Flag</comment>
   3.965 -        <translation type="unfinished"></translation>
   3.966 +        <translation>停止</translation>
   3.967      </message>
   3.968      <message>
   3.969          <location filename="../mainwindow.cpp" line="1309"/>
   3.970          <source>Magic</source>
   3.971          <comment>Freemind-Flag</comment>
   3.972 -        <translation type="unfinished"></translation>
   3.973 +        <translation>神奇</translation>
   3.974      </message>
   3.975      <message>
   3.976          <location filename="../mainwindow.cpp" line="1312"/>
   3.977          <source>To be discussed</source>
   3.978          <comment>Freemind-Flag</comment>
   3.979 -        <translation type="unfinished"></translation>
   3.980 +        <translation>将要讨论</translation>
   3.981      </message>
   3.982      <message>
   3.983          <location filename="../mainwindow.cpp" line="1315"/>
   3.984          <source>Reminder</source>
   3.985          <comment>Freemind-Flag</comment>
   3.986 -        <translation type="unfinished"></translation>
   3.987 +        <translation>提醒</translation>
   3.988      </message>
   3.989      <message>
   3.990          <location filename="../mainwindow.cpp" line="1318"/>
   3.991          <source>Excellent</source>
   3.992          <comment>Freemind-Flag</comment>
   3.993 -        <translation type="unfinished"></translation>
   3.994 +        <translation>优异</translation>
   3.995      </message>
   3.996      <message>
   3.997          <location filename="../mainwindow.cpp" line="1321"/>
   3.998          <source>Linux</source>
   3.999          <comment>Freemind-Flag</comment>
  3.1000 -        <translation type="unfinished"></translation>
  3.1001 +        <translation>Linux</translation>
  3.1002      </message>
  3.1003      <message>
  3.1004          <location filename="../mainwindow.cpp" line="1324"/>
  3.1005          <source>Sweet</source>
  3.1006          <comment>Freemind-Flag</comment>
  3.1007 -        <translation type="unfinished"></translation>
  3.1008 +        <translation>甜蜜</translation>
  3.1009      </message>
  3.1010      <message>
  3.1011          <location filename="../mainwindow.cpp" line="1390"/>
  3.1012          <source>Set path for macros</source>
  3.1013          <comment>Settings action</comment>
  3.1014 -        <translation type="unfinished"></translation>
  3.1015 +        <translation>设置宏路径</translation>
  3.1016      </message>
  3.1017      <message>
  3.1018          <location filename="../mainwindow.cpp" line="1391"/>
  3.1019          <source>Set path for macros</source>
  3.1020 -        <translation type="unfinished"></translation>
  3.1021 +        <translation>设置宏路径</translation>
  3.1022      </message>
  3.1023      <message>
  3.1024          <location filename="../mainwindow.cpp" line="1395"/>
  3.1025          <source>Set number of undo levels</source>
  3.1026          <comment>Settings action</comment>
  3.1027 -        <translation type="unfinished"></translation>
  3.1028 +        <translation>设置 undo 级</translation>
  3.1029      </message>
  3.1030      <message>
  3.1031          <location filename="../mainwindow.cpp" line="1396"/>
  3.1032          <source>Set number of undo levels</source>
  3.1033 -        <translation type="unfinished"></translation>
  3.1034 +        <translation>设置 undo 级</translation>
  3.1035      </message>
  3.1036      <message>
  3.1037          <location filename="../mainwindow.cpp" line="1402"/>
  3.1038          <source>Autosave</source>
  3.1039          <comment>Settings action</comment>
  3.1040 -        <translation type="unfinished"></translation>
  3.1041 +        <translation>自动保存</translation>
  3.1042      </message>
  3.1043      <message>
  3.1044          <location filename="../mainwindow.cpp" line="1403"/>
  3.1045          <source>Autosave</source>
  3.1046 -        <translation type="unfinished"></translation>
  3.1047 +        <translation>自动保存</translation>
  3.1048      </message>
  3.1049      <message>
  3.1050          <location filename="../mainwindow.cpp" line="1410"/>
  3.1051          <source>Autosave time</source>
  3.1052          <comment>Settings action</comment>
  3.1053 -        <translation type="unfinished"></translation>
  3.1054 +        <translation>自动保存时间</translation>
  3.1055      </message>
  3.1056      <message>
  3.1057          <location filename="../mainwindow.cpp" line="1411"/>
  3.1058          <source>Autosave time</source>
  3.1059 -        <translation type="unfinished"></translation>
  3.1060 +        <translation>自动保存时间</translation>
  3.1061      </message>
  3.1062      <message>
  3.1063          <location filename="../mainwindow.cpp" line="1416"/>
  3.1064          <source>Write backup file on save</source>
  3.1065          <comment>Settings action</comment>
  3.1066 -        <translation type="unfinished"></translation>
  3.1067 +        <translation>保存时备份</translation>
  3.1068      </message>
  3.1069      <message>
  3.1070          <location filename="../mainwindow.cpp" line="1417"/>
  3.1071          <source>Write backup file on save</source>
  3.1072 -        <translation type="unfinished"></translation>
  3.1073 +        <translation>保存时备份</translation>
  3.1074      </message>
  3.1075      <message>
  3.1076          <location filename="../mainwindow.cpp" line="1469"/>
  3.1077          <source>Animation</source>
  3.1078          <comment>Settings action</comment>
  3.1079 -        <translation type="unfinished"></translation>
  3.1080 +        <translation>动画</translation>
  3.1081      </message>
  3.1082      <message>
  3.1083          <location filename="../mainwindow.cpp" line="1470"/>
  3.1084          <source>Animation</source>
  3.1085 -        <translation type="unfinished"></translation>
  3.1086 +        <translation>动画</translation>
  3.1087      </message>
  3.1088      <message>
  3.1089          <location filename="../mainwindow.cpp" line="1514"/>
  3.1090          <source>Open VYM example maps </source>
  3.1091          <comment>Help action</comment>
  3.1092 -        <translation type="unfinished"></translation>
  3.1093 +        <translation>打开  VYM 的例子导图</translation>
  3.1094      </message>
  3.1095      <message>
  3.1096          <location filename="../mainwindow.cpp" line="1515"/>
  3.1097          <source>Open VYM example maps </source>
  3.1098 -        <translation type="unfinished"></translation>
  3.1099 +        <translation>打开  VYM 的例子导图</translation>
  3.1100      </message>
  3.1101      <message>
  3.1102          <location filename="../mainwindow.cpp" line="1569"/>
  3.1103          <source>References (URLs, vymLinks, ...)</source>
  3.1104          <comment>Context menu name</comment>
  3.1105 -        <translation type="unfinished"></translation>
  3.1106 +        <translation>引用 (URL, vym链接...)</translation>
  3.1107      </message>
  3.1108      <message>
  3.1109          <location filename="../mainwindow.cpp" line="1645"/>
  3.1110          <source>&amp;%1 %2</source>
  3.1111 -        <translation type="unfinished"></translation>
  3.1112 +        <translation>&amp;%1 %2</translation>
  3.1113      </message>
  3.1114      <message>
  3.1115          <location filename="../mainwindow.cpp" line="2108"/>
  3.1116          <source>Load Freemind map</source>
  3.1117 -        <translation type="unfinished"></translation>
  3.1118 +        <translation>导入 Freemid 导图</translation>
  3.1119      </message>
  3.1120      <message>
  3.1121          <location filename="../mainwindow.cpp" line="2202"/>
  3.1122          <source>Export as CSV</source>
  3.1123 -        <translation type="unfinished"></translation>
  3.1124 +        <translation>导出为 CSV</translation>
  3.1125      </message>
  3.1126      <message>
  3.1127          <location filename="../mainwindow.cpp" line="3268"/>
  3.1128          <source>Directory with vym macros:</source>
  3.1129 -        <translation type="unfinished"></translation>
  3.1130 +        <translation>vym宏的目录:</translation>
  3.1131      </message>
  3.1132      <message>
  3.1133          <location filename="../mainwindow.cpp" line="3300"/>
  3.1134          <source>QInputDialog::getInteger()</source>
  3.1135 -        <translation type="unfinished"></translation>
  3.1136 +        <translation>QInputDialog::getInteger()</translation>
  3.1137      </message>
  3.1138      <message>
  3.1139          <location filename="../mainwindow.cpp" line="3281"/>
  3.1140          <source>Number of undo/redo levels:</source>
  3.1141 -        <translation type="unfinished"></translation>
  3.1142 +        <translation>撤消级别 :</translation>
  3.1143      </message>
  3.1144      <message>
  3.1145          <location filename="../mainwindow.cpp" line="3286"/>
  3.1146          <source>Settings have been changed. The next map opened will have &quot;%1&quot; undo/redo levels</source>
  3.1147 -        <translation type="unfinished"></translation>
  3.1148 +        <translation>设置已更改。下一个导图将有 %1 个撤消级别</translation>
  3.1149      </message>
  3.1150      <message>
  3.1151          <location filename="../mainwindow.cpp" line="3301"/>
  3.1152          <source>Number of seconds before autosave:</source>
  3.1153 -        <translation type="unfinished"></translation>
  3.1154 +        <translation>自动保存的秒数:</translation>
  3.1155      </message>
  3.1156      <message>
  3.1157          <location filename="../mainwindow.cpp" line="3411"/>
  3.1158          <source>History for %1</source>
  3.1159          <comment>Window Caption</comment>
  3.1160 -        <translation type="unfinished"></translation>
  3.1161 +        <translation>%1 的历史</translation>
  3.1162      </message>
  3.1163      <message>
  3.1164          <location filename="../mainwindow.cpp" line="3735"/>
  3.1165          <source>Couldn&apos;t find the documentation %1 in:
  3.1166  %2</source>
  3.1167 -        <translation type="unfinished"></translation>
  3.1168 +        <translation>在:
  3.1169 +%2 中找不到%1 的文档 </translation>
  3.1170      </message>
  3.1171      <message>
  3.1172          <location filename="../mainwindow.cpp" line="3771"/>
  3.1173          <source>Load vym example map</source>
  3.1174 -        <translation type="unfinished"></translation>
  3.1175 +        <translation>载入 vym 例子导图</translation>
  3.1176      </message>
  3.1177      <message>
  3.1178          <location filename="../mainwindow.cpp" line="3820"/>
  3.1179          <source>Couldn&apos;t find a macro at  %1.
  3.1180  </source>
  3.1181 -        <translation type="unfinished"></translation>
  3.1182 +        <translation>在 %1 不能找到宏
  3.1183 +</translation>
  3.1184      </message>
  3.1185      <message>
  3.1186          <location filename="../mainwindow.cpp" line="3821"/>
  3.1187          <source>Set directory for vym macros</source>
  3.1188 -        <translation type="unfinished"></translation>
  3.1189 +        <translation>设置宏目录</translation>
  3.1190      </message>
  3.1191  </context>
  3.1192  <context>
  3.1193 @@ -2660,7 +2612,6 @@
  3.1194          <translation>请输入 URL:</translation>
  3.1195      </message>
  3.1196      <message>
  3.1197 -        <location filename="" line="0"/>
  3.1198          <source>vym map</source>
  3.1199          <translation type="obsolete">vym 导图</translation>
  3.1200      </message>
  3.1201 @@ -2675,7 +2626,6 @@
  3.1202          <translation>严重导入错误</translation>
  3.1203      </message>
  3.1204      <message>
  3.1205 -        <location filename="" line="0"/>
  3.1206          <source>New Map</source>
  3.1207          <comment>Heading of mapcenter in new map</comment>
  3.1208          <translation type="obsolete">新建导图</translation>
  3.1209 @@ -2718,7 +2668,6 @@
  3.1210          <translation>未命名</translation>
  3.1211      </message>
  3.1212      <message>
  3.1213 -        <location filename="" line="0"/>
  3.1214          <source>History for </source>
  3.1215          <translation type="obsolete">历史<byte value="x9"/></translation>
  3.1216      </message>
  3.1217 @@ -2752,20 +2701,20 @@
  3.1218      <message>
  3.1219          <location filename="../mapeditor.cpp" line="1795"/>
  3.1220          <source>Critical Load Error</source>
  3.1221 -        <translation type="unfinished">严重载入错误</translation>
  3.1222 +        <translation>严重载入错误</translation>
  3.1223      </message>
  3.1224      <message>
  3.1225          <location filename="../mapeditor.cpp" line="1602"/>
  3.1226          <source>Couldn&apos;t create temporary directory before load
  3.1227  </source>
  3.1228 -        <translation type="unfinished">无法在载入前创建临时目录
  3.1229 +        <translation>无法在载入前创建临时目录
  3.1230  </translation>
  3.1231      </message>
  3.1232      <message>
  3.1233          <location filename="../mapeditor.cpp" line="1645"/>
  3.1234          <source>Couldn&apos;t find a map (*.xml) in .vym archive.
  3.1235  </source>
  3.1236 -        <translation type="unfinished">无法在 .vym 存档中找到导图(*.xml)。
  3.1237 +        <translation>无法在 .vym 存档中找到导图(*.xml)。
  3.1238  </translation>
  3.1239      </message>
  3.1240      <message>
  3.1241 @@ -2776,7 +2725,7 @@
  3.1242  and flags and thus may overwrite files in the given directory
  3.1243  
  3.1244  Do you want to write the map</source>
  3.1245 -        <translation type="unfinished">导图 %1
  3.1246 +        <translation>导图 %1
  3.1247  未使用 vym 压缩文件格式。
  3.1248  如果写入的话,图象与标记都会写入,这可能导致
  3.1249  指定目录中的文件被覆盖。
  3.1250 @@ -2786,91 +2735,93 @@
  3.1251      <message>
  3.1252          <location filename="../mapeditor.cpp" line="1746"/>
  3.1253          <source>compressed (vym default)</source>
  3.1254 -        <translation type="unfinished">压缩(vym 默认)</translation>
  3.1255 +        <translation>压缩(vym 默认)</translation>
  3.1256      </message>
  3.1257      <message>
  3.1258          <location filename="../mapeditor.cpp" line="1747"/>
  3.1259          <source>uncompressed</source>
  3.1260 -        <translation type="unfinished">未压缩</translation>
  3.1261 +        <translation>未压缩</translation>
  3.1262      </message>
  3.1263      <message>
  3.1264          <location filename="../mapeditor.cpp" line="1782"/>
  3.1265          <source>Save Error</source>
  3.1266 -        <translation type="unfinished">保存错误</translation>
  3.1267 +        <translation>保存错误</translation>
  3.1268      </message>
  3.1269      <message>
  3.1270          <location filename="../mapeditor.cpp" line="1778"/>
  3.1271          <source>%1
  3.1272  could not be removed before saving</source>
  3.1273 -        <translation type="unfinished"></translation>
  3.1274 +        <translation>%1
  3.1275 +在保存时不能移除</translation>
  3.1276      </message>
  3.1277      <message>
  3.1278          <location filename="../mapeditor.cpp" line="1783"/>
  3.1279          <source>%1
  3.1280  could not be renamed before saving</source>
  3.1281 -        <translation type="unfinished"></translation>
  3.1282 +        <translation>%1
  3.1283 +在保存时不能重命名</translation>
  3.1284      </message>
  3.1285      <message>
  3.1286          <location filename="../mapeditor.cpp" line="1796"/>
  3.1287          <source>Couldn&apos;t create temporary directory before save
  3.1288  </source>
  3.1289 -        <translation type="unfinished">无法在保存前创建临时目录</translation>
  3.1290 +        <translation>无法在保存前创建临时目录</translation>
  3.1291      </message>
  3.1292      <message>
  3.1293          <location filename="../mapeditor.cpp" line="2033"/>
  3.1294          <source>Export map as image</source>
  3.1295 -        <translation type="unfinished">将导图导出为图象</translation>
  3.1296 +        <translation>将导图导出为图象</translation>
  3.1297      </message>
  3.1298      <message>
  3.1299          <location filename="../mapeditor.cpp" line="2110"/>
  3.1300          <source>Export XML to directory</source>
  3.1301 -        <translation type="unfinished">导出 XML 至目录</translation>
  3.1302 +        <translation>导出 XML 至目录</translation>
  3.1303      </message>
  3.1304      <message>
  3.1305          <location filename="../mapeditor.cpp" line="2260"/>
  3.1306          <source>Autosave disabled during undo.</source>
  3.1307 -        <translation type="unfinished"></translation>
  3.1308 +        <translation>在撤消时禁用自动保存。</translation>
  3.1309      </message>
  3.1310      <message>
  3.1311          <location filename="../mapeditor.cpp" line="3268"/>
  3.1312          <source>Load background image</source>
  3.1313 -        <translation type="unfinished"></translation>
  3.1314 +        <translation>载入背景图像</translation>
  3.1315      </message>
  3.1316      <message>
  3.1317          <location filename="../mapeditor.cpp" line="3489"/>
  3.1318          <source>Text</source>
  3.1319          <comment>Filedialog</comment>
  3.1320 -        <translation type="unfinished"></translation>
  3.1321 +        <translation>文本</translation>
  3.1322      </message>
  3.1323      <message>
  3.1324          <location filename="../mapeditor.cpp" line="3490"/>
  3.1325          <source>Spreadsheet</source>
  3.1326          <comment>Filedialog</comment>
  3.1327 -        <translation type="unfinished"></translation>
  3.1328 +        <translation>电子表格</translation>
  3.1329      </message>
  3.1330      <message>
  3.1331          <location filename="../mapeditor.cpp" line="3491"/>
  3.1332          <source>Textdocument</source>
  3.1333          <comment>Filedialog</comment>
  3.1334 -        <translation type="unfinished"></translation>
  3.1335 +        <translation>文本文档</translation>
  3.1336      </message>
  3.1337      <message>
  3.1338          <location filename="../mapeditor.cpp" line="3492"/>
  3.1339          <source>Images</source>
  3.1340          <comment>Filedialog</comment>
  3.1341 -        <translation type="unfinished">图象</translation>
  3.1342 +        <translation>图象</translation>
  3.1343      </message>
  3.1344      <message>
  3.1345          <location filename="../mapeditor.cpp" line="3495"/>
  3.1346          <source>Set URL to a local file</source>
  3.1347 -        <translation type="unfinished"></translation>
  3.1348 +        <translation>设置到本地文档的 URL</translation>
  3.1349      </message>
  3.1350      <message>
  3.1351          <location filename="../mapeditor.cpp" line="3727"/>
  3.1352          <source>%1 items on map
  3.1353  </source>
  3.1354          <comment>Info about map</comment>
  3.1355 -        <translation type="unfinished"></translation>
  3.1356 +        <translation>在导图上的 %1 条目</translation>
  3.1357      </message>
  3.1358      <message>
  3.1359          <location filename="../mapeditor.cpp" line="5291"/>
  3.1360 @@ -2879,23 +2830,27 @@
  3.1361     %1
  3.1362  
  3.1363  Do you want to reload that map with the new file?</source>
  3.1364 -        <translation type="unfinished"></translation>
  3.1365 +        <translation>在磁盘上的导图文件发生了更改:
  3.1366 +
  3.1367 +%1
  3.1368 +
  3.1369 +您想要从新文件中重新载入吗?</translation>
  3.1370      </message>
  3.1371      <message>
  3.1372          <location filename="../mapeditor.cpp" line="5297"/>
  3.1373          <source>Reload</source>
  3.1374 -        <translation type="unfinished"></translation>
  3.1375 +        <translation>重新载入</translation>
  3.1376      </message>
  3.1377      <message>
  3.1378          <location filename="../mapeditor.cpp" line="5298"/>
  3.1379          <source>Ignore</source>
  3.1380 -        <translation type="unfinished"></translation>
  3.1381 +        <translation>忽略</translation>
  3.1382      </message>
  3.1383  </context>
  3.1384  <context>
  3.1385      <name>QObject</name>
  3.1386      <message>
  3.1387 -        <location filename="../file.cpp" line="439"/>
  3.1388 +        <location filename="../file.cpp" line="447"/>
  3.1389          <source>This is not an image.</source>
  3.1390          <translation>这不是图象。</translation>
  3.1391      </message>
  3.1392 @@ -2942,7 +2897,7 @@
  3.1393          <translation>zip 未正常退出</translation>
  3.1394      </message>
  3.1395      <message>
  3.1396 -        <location filename="../file.cpp" line="316"/>
  3.1397 +        <location filename="../file.cpp" line="379"/>
  3.1398          <source>Couldn&apos;t start unzip to decompress data.</source>
  3.1399          <translation>无法启动 unzip 以解压数据。</translation>
  3.1400      </message>
  3.1401 @@ -2978,7 +2933,7 @@
  3.1402          <translation>取消</translation>
  3.1403      </message>
  3.1404      <message>
  3.1405 -        <location filename="../file.cpp" line="441"/>
  3.1406 +        <location filename="../file.cpp" line="449"/>
  3.1407          <source>Sorry, no preview for
  3.1408  multiple selected files.</source>
  3.1409          <translation>对不起,无法预览
  3.1410 @@ -3022,26 +2977,27 @@
  3.1411      <message>
  3.1412          <location filename="../exports.cpp" line="131"/>
  3.1413          <source>Export as ASCII</source>
  3.1414 -        <translation type="unfinished">导出为 ASCII</translation>
  3.1415 +        <translation>导出为 ASCII</translation>
  3.1416      </message>
  3.1417      <message>
  3.1418          <location filename="../exports.cpp" line="131"/>
  3.1419          <source>(still experimental)</source>
  3.1420 -        <translation type="unfinished">(仍处于试验阶段)</translation>
  3.1421 +        <translation>(仍处于试验阶段)</translation>
  3.1422      </message>
  3.1423      <message>
  3.1424          <location filename="../file.cpp" line="99"/>
  3.1425          <source>The directory %1 is not empty.
  3.1426  Do you risk to overwrite its contents?</source>
  3.1427          <comment>write directory</comment>
  3.1428 -        <translation type="unfinished">目录 %1 非空。
  3.1429 +        <translation>目录 %1 非空。
  3.1430  您希望冒险覆盖其内容吗?</translation>
  3.1431      </message>
  3.1432      <message>
  3.1433          <location filename="../main.cpp" line="193"/>
  3.1434          <source>Couldn&apos;t open %1.
  3.1435  </source>
  3.1436 -        <translation type="unfinished"></translation>
  3.1437 +        <translation>不能打开 %1.
  3.1438 +</translation>
  3.1439      </message>
  3.1440  </context>
  3.1441  <context>
  3.1442 @@ -3062,7 +3018,7 @@
  3.1443      <message>
  3.1444          <location filename="../simplescripteditor.cpp" line="61"/>
  3.1445          <source>Save script</source>
  3.1446 -        <translation type="unfinished"></translation>
  3.1447 +        <translation>保存脚本</translation>
  3.1448      </message>
  3.1449      <message>
  3.1450          <location filename="../simplescripteditor.cpp" line="73"/>
  3.1451 @@ -3070,79 +3026,81 @@
  3.1452  exists already.
  3.1453  Do you want to overwrite it?</source>
  3.1454          <comment>dialog &apos;save as&apos;</comment>
  3.1455 -        <translation type="unfinished">文件 %1 已存在。
  3.1456 +        <translation>文件 %1 
  3.1457 +已存在。
  3.1458  您希望覆盖它吗?</translation>
  3.1459      </message>
  3.1460      <message>
  3.1461          <location filename="../simplescripteditor.cpp" line="78"/>
  3.1462          <source>Overwrite</source>
  3.1463 -        <translation type="unfinished">覆盖</translation>
  3.1464 +        <translation>覆盖</translation>
  3.1465      </message>
  3.1466      <message>
  3.1467          <location filename="../simplescripteditor.cpp" line="79"/>
  3.1468          <source>Cancel</source>
  3.1469 -        <translation type="unfinished">取消</translation>
  3.1470 +        <translation>取消</translation>
  3.1471      </message>
  3.1472      <message>
  3.1473          <location filename="../simplescripteditor.cpp" line="105"/>
  3.1474          <source>Load script</source>
  3.1475 -        <translation type="unfinished"></translation>
  3.1476 +        <translation>加载脚本</translation>
  3.1477      </message>
  3.1478      <message>
  3.1479          <location filename="../simplescripteditor.cpp" line="116"/>
  3.1480          <source>Error</source>
  3.1481 -        <translation type="unfinished">错误</translation>
  3.1482 +        <translation>错误</translation>
  3.1483      </message>
  3.1484      <message>
  3.1485          <location filename="../simplescripteditor.cpp" line="117"/>
  3.1486          <source>Couldn&apos;t open %1.
  3.1487  </source>
  3.1488 -        <translation type="unfinished"></translation>
  3.1489 +        <translation>不能打开 %1.
  3.1490 +</translation>
  3.1491      </message>
  3.1492      <message>
  3.1493          <location filename="../simplescripteditor.ui" line="13"/>
  3.1494          <source>Simple Script Editor</source>
  3.1495 -        <translation type="unfinished"></translation>
  3.1496 +        <translation>简单脚本编辑器</translation>
  3.1497      </message>
  3.1498      <message>
  3.1499          <location filename="../simplescripteditor.ui" line="38"/>
  3.1500          <source>Save as</source>
  3.1501 -        <translation type="unfinished"></translation>
  3.1502 +        <translation>另存为</translation>
  3.1503      </message>
  3.1504      <message>
  3.1505          <location filename="../simplescripteditor.ui" line="48"/>
  3.1506          <source>Save</source>
  3.1507 -        <translation type="unfinished">保存</translation>
  3.1508 +        <translation>保存</translation>
  3.1509      </message>
  3.1510      <message>
  3.1511          <location filename="../simplescripteditor.ui" line="51"/>
  3.1512          <source>Qt::CTRL + Qt::Key_S</source>
  3.1513 -        <translation type="unfinished"></translation>
  3.1514 +        <translation>Qt::CTRL + Qt::Key_S</translation>
  3.1515      </message>
  3.1516      <message>
  3.1517          <location filename="../simplescripteditor.ui" line="58"/>
  3.1518          <source>Open</source>
  3.1519 -        <translation type="unfinished">打开</translation>
  3.1520 +        <translation>打开</translation>
  3.1521      </message>
  3.1522      <message>
  3.1523          <location filename="../simplescripteditor.ui" line="61"/>
  3.1524          <source>Qt::CTRL +Qt::Key_O</source>
  3.1525 -        <translation type="unfinished"></translation>
  3.1526 +        <translation>Qt::CTRL +Qt::Key_O</translation>
  3.1527      </message>
  3.1528      <message>
  3.1529          <location filename="../simplescripteditor.ui" line="68"/>
  3.1530          <source>Run</source>
  3.1531 -        <translation type="unfinished"></translation>
  3.1532 +        <translation>运行</translation>
  3.1533      </message>
  3.1534      <message>
  3.1535          <location filename="../simplescripteditor.ui" line="71"/>
  3.1536          <source>Qt::CTRL + Qt::Key_R</source>
  3.1537 -        <translation type="unfinished"></translation>
  3.1538 +        <translation>Qt::CTRL + Qt::Key_R</translation>
  3.1539      </message>
  3.1540      <message>
  3.1541          <location filename="../simplescripteditor.ui" line="78"/>
  3.1542          <source>Close</source>
  3.1543 -        <translation type="unfinished">关闭</translation>
  3.1544 +        <translation>关闭</translation>
  3.1545      </message>
  3.1546  </context>
  3.1547  <context>
  3.1548 @@ -3483,7 +3441,7 @@
  3.1549      <message>
  3.1550          <location filename="../warningdialog.ui" line="106"/>
  3.1551          <source>showAgainBox</source>
  3.1552 -        <translation type="unfinished">再次提醒</translation>
  3.1553 +        <translation>再次提醒</translation>
  3.1554      </message>
  3.1555      <message>
  3.1556          <location filename="../warningdialog.ui" line="132"/>
  3.1557 @@ -3498,12 +3456,12 @@
  3.1558      <message>
  3.1559          <location filename="../warningdialog.cpp" line="11"/>
  3.1560          <source>Proceed</source>
  3.1561 -        <translation type="unfinished">进行</translation>
  3.1562 +        <translation>进行</translation>
  3.1563      </message>
  3.1564      <message>
  3.1565          <location filename="../warningdialog.cpp" line="15"/>
  3.1566          <source>Show this message again</source>
  3.1567 -        <translation type="unfinished"></translation>
  3.1568 +        <translation>再次显示这条消息</translation>
  3.1569      </message>
  3.1570  </context>
  3.1571  </TS>
     4.1 --- a/linkablemapobj.cpp	Tue Aug 05 07:36:53 2008 +0000
     4.2 +++ b/linkablemapobj.cpp	Mon Oct 06 11:10:20 2008 +0000
     4.3 @@ -99,6 +99,9 @@
     4.4  
     4.5  	// Reset ID
     4.6  	objID="";
     4.7 +
     4.8 +	// Crossreference to treemodel
     4.9 +	treeItem=NULL;
    4.10  }
    4.11  
    4.12  void LinkableMapObj::copy (LinkableMapObj* other)
    4.13 @@ -111,6 +114,17 @@
    4.14  	relPos=other->relPos;
    4.15  	useOrientation=other->useOrientation;
    4.16  	objID=other->objID;
    4.17 +	treeItem=other->treeItem;
    4.18 +}
    4.19 +
    4.20 +void LinkableMapObj::setTreeItem (TreeItem *ti)
    4.21 +{
    4.22 +	treeItem=ti;
    4.23 +}
    4.24 +
    4.25 +TreeItem* LinkableMapObj::getTreeItem ()
    4.26 +{
    4.27 +	return treeItem;
    4.28  }
    4.29  
    4.30  void LinkableMapObj::setModel (VymModel *vm)
     5.1 --- a/linkablemapobj.h	Tue Aug 05 07:36:53 2008 +0000
     5.2 +++ b/linkablemapobj.h	Mon Oct 06 11:10:20 2008 +0000
     5.3 @@ -5,6 +5,7 @@
     5.4  #include "noteobj.h"
     5.5  #include "headingobj.h"
     5.6  #include "flagrowobj.h"
     5.7 +#include "treeitem.h"
     5.8  
     5.9  #define MAX_DEPTH 999
    5.10  
    5.11 @@ -57,6 +58,8 @@
    5.12      virtual void init ();
    5.13      virtual void copy (LinkableMapObj*);
    5.14  
    5.15 +	virtual void setTreeItem(TreeItem *);
    5.16 +	virtual TreeItem* getTreeItem();
    5.17  	virtual void setModel (VymModel *vm);
    5.18  	virtual VymModel* getModel ();
    5.19  
    5.20 @@ -166,5 +169,7 @@
    5.21  	bool useOrientation;
    5.22  
    5.23  	QString objID;					// id set during load/save currently used for xLinks
    5.24 +
    5.25 +	TreeItem *treeItem;				// Crossrefence to treemodel
    5.26  };
    5.27  #endif
     6.1 --- a/mainwindow.cpp	Tue Aug 05 07:36:53 2008 +0000
     6.2 +++ b/mainwindow.cpp	Mon Oct 06 11:10:20 2008 +0000
     6.3 @@ -1719,11 +1719,14 @@
     6.4  
     6.5  VymView *Main::createView (VymModel *model)
     6.6  {
     6.7 -	VymView *vm=new VymView;
     6.8 -
     6.9 +	VymView *vm=new VymView (model);
    6.10 +
    6.11 +/*
    6.12  	// Create TreeView
    6.13  	QTreeView *tv=new QTreeView;
    6.14 -	tv->setModel (model->getTreeModel() );
    6.15 +	tv->setModel (model);
    6.16 +	tv->setMinimumWidth (350);
    6.17 +	tv->setColumnWidth (0,350);
    6.18  
    6.19  	// Create good old MapEditor
    6.20  	MapEditor* me=model->getMapEditor();
    6.21 @@ -1741,6 +1744,7 @@
    6.22  	sizes.append (600);
    6.23  	vm->setSizes (sizes);
    6.24  
    6.25 +*/
    6.26  	return vm;
    6.27  }
    6.28  
     7.1 --- a/mainwindow.h	Tue Aug 05 07:36:53 2008 +0000
     7.2 +++ b/mainwindow.h	Mon Oct 06 11:10:20 2008 +0000
     7.3 @@ -11,10 +11,7 @@
     7.4  #include "mapeditor.h"
     7.5  #include "simplescripteditor.h"
     7.6  #include "texteditor.h"
     7.7 -
     7.8 -class VymView : public QSplitter 
     7.9 -{
    7.10 -};
    7.11 +#include "vymview.h"
    7.12  
    7.13  class Main : public QMainWindow 
    7.14  {
     8.1 --- a/mapeditor.cpp	Tue Aug 05 07:36:53 2008 +0000
     8.2 +++ b/mapeditor.cpp	Mon Oct 06 11:10:20 2008 +0000
     8.3 @@ -267,7 +267,7 @@
     8.4  			QString("%1 (\"%2\")").arg(u).arg(f), 
     8.5  			bo,
     8.6  			QString("%1 (\"%2\")").arg(r).arg(f),
     8.7 -			QString("Toggling standard flag \"%1\" of %2").arg(f).arg(getName(bo)));
     8.8 +			QString("Toggling standard flag \"%1\" of %2").arg(f).arg(model->getObjectName(bo)));
     8.9  		bo->toggleStandardFlag (f,mainWindow->useFlagGroups());
    8.10  		model->updateSelection();
    8.11  	}
    8.12 @@ -652,7 +652,7 @@
    8.13  						"moveRel "+pold,
    8.14  						fio,
    8.15  						"moveRel "+pnow,
    8.16 -						QString("Move %1 to relative position %2").arg(getName(fio)).arg(pnow));
    8.17 +						QString("Move %1 to relative position %2").arg(model->getObjectName(fio)).arg(pnow));
    8.18  					fio->getParObj()->requestReposition();
    8.19  					model->reposition();
    8.20  
    8.21 @@ -774,7 +774,7 @@
    8.22  			tmpXLink->setEnd ( ((BranchObj*)(dst)) );
    8.23  			tmpXLink->updateXLink();
    8.24  			tmpXLink->activate(); //FIXME savestate missing
    8.25 -			//model->saveStateComplete(QString("Activate xLink from %1 to %2").arg(getName(tmpXLink->getBegin())).arg(getName(tmpXLink->getEnd())) );	
    8.26 +			//model->saveStateComplete(QString("Activate xLink from %1 to %2").arg(model->getObjectName(tmpXLink->getBegin())).arg(model->getObjectName(tmpXLink->getEnd())) );	
    8.27  		} else
    8.28  		{
    8.29  			delete(tmpXLink);
    8.30 @@ -797,7 +797,7 @@
    8.31  				"moveRel "+pold,
    8.32  				fo,
    8.33  				"moveRel "+pnow,
    8.34 -				QString("Move %1 to relative position %2").arg(getName(fo)).arg(pnow));
    8.35 +				QString("Move %1 to relative position %2").arg(model->getObjectName(fo)).arg(pnow));
    8.36  
    8.37  			fo->getParObj()->requestReposition();
    8.38  			model->reposition();
    8.39 @@ -822,7 +822,7 @@
    8.40                      "move "+pold,
    8.41                      bo,
    8.42                      "move "+pnow,
    8.43 -                    QString("Move mapcenter %1 to position %2").arg(getName(bo)).arg(pnow));
    8.44 +                    QString("Move mapcenter %1 to position %2").arg(model->getObjectName(bo)).arg(pnow));
    8.45              }
    8.46  		}
    8.47  	
    8.48 @@ -880,7 +880,7 @@
    8.49  				model->saveState (
    8.50  					postSelStr,undoCom,
    8.51  					preSelStr, redoCom,
    8.52 -					QString("Relink %1 to %2").arg(getName(bsel)).arg(getName(dst)) );
    8.53 +					QString("Relink %1 to %2").arg(model->getObjectName(bsel)).arg(model->getObjectName(dst)) );
    8.54  
    8.55  				model->reposition();	// not necessary if we undo temporary move  below
    8.56  			} else
    8.57 @@ -900,7 +900,7 @@
    8.58                          model->saveState(
    8.59                              model->getSelectString(lmosel), "moveRel "+qpointfToString(movingObj_orgRelPos), 
    8.60                              preSelStr, "moveRel "+ps, 
    8.61 -                            QString("Move %1 to relative position %2").arg(getName(lmosel)).arg(ps));
    8.62 +                            QString("Move %1 to relative position %2").arg(model->getObjectName(lmosel)).arg(ps));
    8.63                      }
    8.64  				}
    8.65  
    8.66 @@ -1054,6 +1054,13 @@
    8.67  }
    8.68        
    8.69  
    8.70 -// FIXME the following are not needed...
    8.71 -QString MapEditor::getName(const LinkableMapObj*) {return QString();}
    8.72 +void MapEditor::setSelectionModel (QItemSelectionModel *sm)
    8.73 +{
    8.74 +	selModel=sm;
    8.75 +}
    8.76  
    8.77 +QItemSelectionModel* MapEditor::selectionModel ()
    8.78 +{
    8.79 +	return selModel;
    8.80 +}
    8.81 +
     9.1 --- a/mapeditor.h	Tue Aug 05 07:36:53 2008 +0000
     9.2 +++ b/mapeditor.h	Mon Oct 06 11:10:20 2008 +0000
     9.3 @@ -2,10 +2,10 @@
     9.4  #define MAPEDITOR_H
     9.5  
     9.6  #include <QGraphicsView>
     9.7 +#include <QItemSelectionModel>
     9.8  
     9.9  #include "attribute.h"
    9.10  #include "ornamentedobj.h"
    9.11 -#include "selection.h"		// FIXME should not be needed
    9.12  #include "settings.h"
    9.13  #include "vymmodel.h"
    9.14  
    9.15 @@ -92,8 +92,12 @@
    9.16  
    9.17  	QPoint exportOffset;		// set before export, used in save
    9.18  
    9.19 -	Selection xelection;					// FIXME only here to get rid of some gcc errors...
    9.20 -	QString getName(const LinkableMapObj*);	// FIXME see above, renamed to getObjectName in VymModel...
    9.21 +public:
    9.22 +	void setSelectionModel (QItemSelectionModel*);
    9.23 +	QItemSelectionModel* selectionModel();
    9.24 +private:	
    9.25 +    QItemSelectionModel* selModel;	// we treat MapEditor as View here...
    9.26 +
    9.27  };
    9.28  #endif
    9.29  
    10.1 --- a/selection.cpp	Tue Aug 05 07:36:53 2008 +0000
    10.2 +++ b/selection.cpp	Mon Oct 06 11:10:20 2008 +0000
    10.3 @@ -3,7 +3,6 @@
    10.4  #include "selection.h"
    10.5  
    10.6  #include "mainwindow.h"
    10.7 -#include "mapeditor.h"
    10.8  #include "vymmodel.h"
    10.9  
   10.10  
   10.11 @@ -186,6 +185,13 @@
   10.12  		return NULL;
   10.13  }
   10.14  
   10.15 +TreeItem* Selection::getBranchItem()
   10.16 +{
   10.17 +	BranchObj* bo=getBranch();
   10.18 +	if (bo) return bo->getTreeItem();
   10.19 +	return NULL;
   10.20 +}
   10.21 +
   10.22  FloatImageObj* Selection::getFloatImage()
   10.23  {
   10.24  	if (!selectList.isEmpty())
    11.1 --- a/selection.h	Tue Aug 05 07:36:53 2008 +0000
    11.2 +++ b/selection.h	Mon Oct 06 11:10:20 2008 +0000
    11.3 @@ -5,6 +5,7 @@
    11.4  #include <QList>
    11.5  #include <QGraphicsScene>
    11.6  
    11.7 +#include "treeitem.h"
    11.8  
    11.9  class BranchObj;
   11.10  class FloatImageObj;
   11.11 @@ -38,6 +39,7 @@
   11.12  	LinkableMapObj * first();		// first in selection list
   11.13  	LinkableMapObj * single();		// NULL, if multiple selected
   11.14  	BranchObj* getBranch();
   11.15 +	TreeItem* getBranchItem();		
   11.16  	FloatImageObj* getFloatImage();
   11.17  
   11.18  	QString getSelectString();
    12.1 --- a/tex/vym.changelog	Tue Aug 05 07:36:53 2008 +0000
    12.2 +++ b/tex/vym.changelog	Mon Oct 06 11:10:20 2008 +0000
    12.3 @@ -1,5 +1,15 @@
    12.4  -------------------------------------------------------------------
    12.5 -Sun Jul 27 16:37:24 CEST 2008 - uwe
    12.6 +Mon Oct  6 11:16:48 CEST 2008 - uwedr@suse.de
    12.7 +
    12.8 +- Bugfix: Updated chinese translation from Moligaloo
    12.9 +
   12.10 +-------------------------------------------------------------------
   12.11 +Sun Oct  5 16:58:32 CEST 2008 - uwedr@suse.de
   12.12 +
   12.13 +- Bugfix: No more segfault for "delete & keep childs" on MapCenter
   12.14 +
   12.15 +-------------------------------------------------------------------
   12.16 +Sun Jul 27 16:37:24 CEST 2008 - uwedr@suse.de
   12.17  
   12.18  - Bugfix: Animation timer didn't stop after animation was done, which
   12.19            caused high load
    13.1 --- a/treeitem.cpp	Tue Aug 05 07:36:53 2008 +0000
    13.2 +++ b/treeitem.cpp	Mon Oct 06 11:10:20 2008 +0000
    13.3 @@ -6,6 +6,7 @@
    13.4  {
    13.5      parentItem = parent;
    13.6      itemData = data;
    13.7 +	lmo=NULL;
    13.8  }
    13.9  
   13.10  TreeItem::~TreeItem()
   13.11 @@ -38,9 +39,36 @@
   13.12      return itemData.value(column);
   13.13  }
   13.14  
   13.15 -TreeItem *TreeItem::parent()
   13.16 +void TreeItem::setHeading (const QString s)
   13.17  {
   13.18 -    return parentItem;
   13.19 +	itemData[0]=s;
   13.20 +}
   13.21 +
   13.22 +QString TreeItem::getHeading ()
   13.23 +{
   13.24 +	return itemData[0].toString();
   13.25 +}
   13.26 +
   13.27 +void TreeItem::setType(const Type t)
   13.28 +{
   13.29 +	type=t;
   13.30 +	itemData[1]=getTypeName();
   13.31 +}
   13.32 +
   13.33 +TreeItem::Type TreeItem::getType()
   13.34 +{
   13.35 +	return type;
   13.36 +}
   13.37 +
   13.38 +QString TreeItem::getTypeName()
   13.39 +{
   13.40 +	switch (type)
   13.41 +	{
   13.42 +		case Undefined: return QString ("Undefined");
   13.43 +		case MapCenter: return QString ("MapCenter");
   13.44 +		case Branch: return QString ("Branch");
   13.45 +		default: return QString ("TreeItem::getTypeName no typename defined?!");
   13.46 +	}
   13.47  }
   13.48  
   13.49  int TreeItem::row() const
   13.50 @@ -50,3 +78,24 @@
   13.51  
   13.52      return 0;
   13.53  }
   13.54 +
   13.55 +int TreeItem::column() const
   13.56 +{
   13.57 +    return 0;
   13.58 +}
   13.59 +
   13.60 +TreeItem *TreeItem::parent()
   13.61 +{
   13.62 +    return parentItem;
   13.63 +}
   13.64 +
   13.65 +LinkableMapObj* TreeItem::getLMO()
   13.66 +{
   13.67 +	return lmo;
   13.68 +}
   13.69 +
   13.70 +void TreeItem::setLMO(LinkableMapObj *l)
   13.71 +{
   13.72 +	lmo=l;
   13.73 +}
   13.74 +
    14.1 --- a/treeitem.h	Tue Aug 05 07:36:53 2008 +0000
    14.2 +++ b/treeitem.h	Mon Oct 06 11:10:20 2008 +0000
    14.3 @@ -4,9 +4,12 @@
    14.4  #include <QList>
    14.5  #include <QVariant>
    14.6  
    14.7 +class LinkableMapObj;
    14.8 +
    14.9  class TreeItem
   14.10  {
   14.11  public:
   14.12 +	enum Type {Undefined,MapCenter,Branch};
   14.13      TreeItem(const QList<QVariant> &data, TreeItem *parent = 0);
   14.14      ~TreeItem();
   14.15  
   14.16 @@ -16,13 +19,27 @@
   14.17      int childCount() const;
   14.18      int columnCount() const;
   14.19      QVariant data(int column) const;
   14.20 +	void setHeading (const QString s);
   14.21 +	QString getHeading();
   14.22 +	void setType (const Type t);
   14.23 +	Type getType ();
   14.24 +	QString getTypeName ();
   14.25 +	
   14.26      int row() const;
   14.27 +	int column() const;
   14.28      TreeItem *parent();
   14.29  
   14.30 +	// Relation to map objects in graphicsscene
   14.31 +	LinkableMapObj* getLMO();
   14.32 +	void setLMO (LinkableMapObj*);
   14.33 +
   14.34  private:
   14.35      QList<TreeItem*> childItems;
   14.36      QList<QVariant> itemData;
   14.37      TreeItem *parentItem;
   14.38 + 
   14.39 +	Type type;
   14.40 +	LinkableMapObj *lmo;
   14.41  };
   14.42  
   14.43  #endif
    15.1 --- a/treemodel.cpp	Tue Aug 05 07:36:53 2008 +0000
    15.2 +++ b/treemodel.cpp	Mon Oct 06 11:10:20 2008 +0000
    15.3 @@ -3,13 +3,16 @@
    15.4  #include "treeitem.h"
    15.5  #include "treemodel.h"
    15.6  
    15.7 +TreeItem* TreeModel::itFirst=NULL;
    15.8 +TreeItem* TreeModel::itCur=NULL;
    15.9 +
   15.10  TreeModel::TreeModel(QObject *parent)
   15.11      : QAbstractItemModel(parent)
   15.12  {
   15.13      QList<QVariant> rootData;
   15.14      rootData << "Heading" << "Type" <<"Note";
   15.15      rootItem = new TreeItem(rootData);
   15.16 -    setupModelData(rootItem);
   15.17 + //   setupModelData(rootItem);
   15.18  }
   15.19  
   15.20  TreeModel::~TreeModel()
   15.21 @@ -98,7 +101,158 @@
   15.22      return parentItem->childCount();
   15.23  }
   15.24  
   15.25 -void TreeModel::setupModelData(TreeItem *root)
   15.26 +TreeItem* TreeModel::first()
   15.27 +{
   15.28 +	itCur=NULL;	
   15.29 +	itFirst=rootItem;
   15.30 +	return rootItem; 
   15.31 +}
   15.32 +	
   15.33 +TreeItem* TreeModel::next()
   15.34 +{
   15.35 +/*
   15.36 +	BranchObj *bo;
   15.37 +	BranchObj *lmo;
   15.38 +	BranchObj *po=(BranchObj*)parObj;
   15.39 +
   15.40 +	if (branch.isEmpty())
   15.41 +		bo=NULL;
   15.42 +	else
   15.43 +		bo=branch.first();
   15.44 +
   15.45 +	if (!itCur)
   15.46 +	{
   15.47 +		// no itCur, we are just beginning
   15.48 +		if (bo) 
   15.49 +		{
   15.50 +			// we have children, return first one
   15.51 +			itCur=this;
   15.52 +			return bo;
   15.53 +		}	
   15.54 +		else
   15.55 +		{
   15.56 +			// No children, so there is no next
   15.57 +			itCur=this;
   15.58 +			return NULL;
   15.59 +		}	
   15.60 +	}
   15.61 +
   15.62 +	// We have an itCur
   15.63 +	if (itCur==po)
   15.64 +	{	// We come from parent
   15.65 +		if (bo)
   15.66 +		{
   15.67 +			// there are children, go there
   15.68 +			itCur=this;
   15.69 +			return bo;
   15.70 +		}	
   15.71 +		else
   15.72 +		{	// no children, try to go up again
   15.73 +			if (po)
   15.74 +			{
   15.75 +				// go back to parent and try to find next there
   15.76 +				itCur=this;
   15.77 +				lmo=po->next();
   15.78 +				itCur=this;
   15.79 +				return lmo;
   15.80 +
   15.81 +			}	
   15.82 +			else
   15.83 +			{
   15.84 +				// can't go up, I am mapCenter, no next
   15.85 +				itCur=NULL;
   15.86 +				return NULL;
   15.87 +			}	
   15.88 +		}
   15.89 +	}
   15.90 +
   15.91 +	// We don't come from parent, but from brother or children
   15.92 +
   15.93 +	// Try to find last child, where we came from, in my own children
   15.94 +	bool searching=true;
   15.95 +	int i=0;
   15.96 +	while (i<branch.size())
   15.97 +	{
   15.98 +		// Try to find itCur in my own children
   15.99 +		if (itCur==branch.at(i))
  15.100 +		{
  15.101 +			// ok, we come from my own children
  15.102 +			if (i<branch.size()-1)
  15.103 +				bo=branch.at(i+1);
  15.104 +			 else
  15.105 +				bo=NULL;
  15.106 +			searching=false;
  15.107 +			i=branch.size();
  15.108 +		} 	
  15.109 +		++i;	
  15.110 +	}
  15.111 +	if (!searching)
  15.112 +	{	// found itCur in my children
  15.113 +		if (bo)
  15.114 +		{
  15.115 +			// found a brother of lastLMO 
  15.116 +			itCur=this;
  15.117 +			return bo;
  15.118 +		}	
  15.119 +		else
  15.120 +		{
  15.121 +			if (po)
  15.122 +			{
  15.123 +				if (this==itFirst) return NULL;	// Stop at starting point
  15.124 +				// go up
  15.125 +				itCur=this;
  15.126 +				lmo=po->next();
  15.127 +				itCur=this;
  15.128 +				return lmo;
  15.129 +			}
  15.130 +			else
  15.131 +			{
  15.132 +				// can't go up, I am mapCenter
  15.133 +				itCur=NULL;
  15.134 +				return NULL;
  15.135 +			}	
  15.136 +		}
  15.137 +	}
  15.138 +
  15.139 +	// couldn't find last child, it must be a nephew of mine
  15.140 +	if (branch.size()>0)
  15.141 +	{
  15.142 +		// proceed with my first child
  15.143 +		itCur=this;	
  15.144 +		return branch.first();
  15.145 +	}	
  15.146 +	else
  15.147 +	{
  15.148 +		// or go back to my parents
  15.149 +		if (po)
  15.150 +		{
  15.151 +			// go up
  15.152 +			itCur=this;
  15.153 +			lmo=po->next();
  15.154 +			itCur=this;
  15.155 +			return lmo;
  15.156 +		}	
  15.157 +		else
  15.158 +		{
  15.159 +			// can't go up, I am mapCenter
  15.160 +			itCur=NULL;
  15.161 +			return NULL;
  15.162 +		}	
  15.163 +	}	
  15.164 +	*/
  15.165 +}
  15.166 +
  15.167 +QModelIndex TreeModel::index (TreeItem* ti)
  15.168 +{
  15.169 +	return createIndex (ti->row(),ti->column(),ti);
  15.170 +}
  15.171 +
  15.172 +TreeItem* TreeModel::LMOToItem (LinkableMapObj *lmo)// FIXME not used so far!!!
  15.173 +{
  15.174 +	TreeItem *ti=rootItem;		
  15.175 +}
  15.176 +
  15.177 +void TreeModel::setupModelData(TreeItem *root)	// FIXME not needed anymore
  15.178  {
  15.179  	QList<QVariant> cData;
  15.180  
  15.181 @@ -125,6 +279,4 @@
  15.182  	cData.clear();
  15.183  	cData << "Main B"<<"Branch" <<"Data 3";
  15.184  	mco->appendChild(new TreeItem(cData, mco));
  15.185 -
  15.186 -	//QModelIndex ix=index (0,0,QModelIndex() );
  15.187  }
    16.1 --- a/treemodel.h	Tue Aug 05 07:36:53 2008 +0000
    16.2 +++ b/treemodel.h	Mon Oct 06 11:10:20 2008 +0000
    16.3 @@ -5,7 +5,9 @@
    16.4  #include <QModelIndex>
    16.5  #include <QVariant>
    16.6  
    16.7 +
    16.8  class TreeItem;
    16.9 +class LinkableMapObj;
   16.10  
   16.11  class TreeModel : public QAbstractItemModel
   16.12  {
   16.13 @@ -25,10 +27,17 @@
   16.14      int rowCount(const QModelIndex &parent = QModelIndex()) const;
   16.15      int columnCount(const QModelIndex &parent = QModelIndex()) const;
   16.16  
   16.17 -private:
   16.18 +	TreeItem *first();
   16.19 +	TreeItem *next();
   16.20 +
   16.21 +protected:
   16.22 +	QModelIndex index (TreeItem* ti);
   16.23 +	TreeItem *LMOToItem(LinkableMapObj*);
   16.24      void setupModelData(TreeItem *parent);
   16.25  
   16.26      TreeItem *rootItem;
   16.27 +	static TreeItem* itFirst;
   16.28 +	static TreeItem* itCur;
   16.29  };
   16.30  
   16.31  #endif
    17.1 --- a/version.h	Tue Aug 05 07:36:53 2008 +0000
    17.2 +++ b/version.h	Mon Oct 06 11:10:20 2008 +0000
    17.3 @@ -7,7 +7,7 @@
    17.4  #define __VYM_VERSION "1.13.0"
    17.5  //#define __VYM_CODENAME "Codename: RC-1"
    17.6  #define __VYM_CODENAME "Codename: development version"
    17.7 -#define __VYM_BUILD_DATE "2008-08-05"
    17.8 +#define __VYM_BUILD_DATE "2008-09-10"
    17.9  
   17.10  
   17.11  bool checkVersion(const QString &);
    18.1 --- a/vym.pro	Tue Aug 05 07:36:53 2008 +0000
    18.2 +++ b/vym.pro	Mon Oct 06 11:10:20 2008 +0000
    18.3 @@ -76,6 +76,7 @@
    18.4  	settings.h \
    18.5  	treeitem.h \
    18.6  	treemodel.h \
    18.7 +	vymview.h \
    18.8  	warningdialog.h
    18.9  
   18.10  SOURCES	+= \
   18.11 @@ -132,6 +133,7 @@
   18.12  	xmlobj.cpp \
   18.13  	xsltproc.cpp \
   18.14  	settings.cpp \
   18.15 +	vymview.cpp \
   18.16  	warningdialog.cpp
   18.17  
   18.18  FORMS = \
    19.1 --- a/vymmodel.cpp	Tue Aug 05 07:36:53 2008 +0000
    19.2 +++ b/vymmodel.cpp	Mon Oct 06 11:10:20 2008 +0000
    19.3 @@ -17,6 +17,7 @@
    19.4  
    19.5  #include "warningdialog.h"
    19.6  #include "xml-freemind.h"
    19.7 +#include "xmlobj.h"
    19.8  #include "xml-vym.h"
    19.9  
   19.10  
   19.11 @@ -118,9 +119,6 @@
   19.12  	itFind=NULL;				
   19.13  	EOFind=false;
   19.14  
   19.15 -	// TreeModel
   19.16 -	treeModel=new TreeModel;
   19.17 -
   19.18  	// animations
   19.19  	animationUse=settings.readBoolEntry("/animation/use",false);
   19.20  	animationTicks=settings.readNumEntry("/animation/ticks",10);
   19.21 @@ -164,11 +162,6 @@
   19.22  	return mapEditor;
   19.23  }
   19.24  
   19.25 -TreeModel* VymModel::getTreeModel()
   19.26 -{
   19.27 -	return treeModel;
   19.28 -}
   19.29 -
   19.30  bool VymModel::isRepositionBlocked()
   19.31  {
   19.32  	return blockReposition;
   19.33 @@ -190,6 +183,9 @@
   19.34  	// offset		offset of bbox of whole map in scene. 
   19.35  	//				Needed for XML export
   19.36  	
   19.37 +
   19.38 +	XMLObj xml;
   19.39 +
   19.40  	// Save Header
   19.41  	QString ls;
   19.42  	switch (linkstyle)
   19.43 @@ -211,22 +207,22 @@
   19.44  	QString s="<?xml version=\"1.0\" encoding=\"utf-8\"?><!DOCTYPE vymmap>\n";
   19.45  	QString colhint="";
   19.46  	if (linkcolorhint==LinkableMapObj::HeadingColor) 
   19.47 -		colhint=attribut("linkColorHint","HeadingColor");
   19.48 -
   19.49 -	QString mapAttr=attribut("version",vymVersion);
   19.50 +		colhint=xml.attribut("linkColorHint","HeadingColor");
   19.51 +
   19.52 +	QString mapAttr=xml.attribut("version",vymVersion);
   19.53  	if (!saveSel)
   19.54 -		mapAttr+= attribut("author",author) +
   19.55 -				  attribut("comment",comment) +
   19.56 -			      attribut("date",getDate()) +
   19.57 -		          attribut("backgroundColor", mapScene->backgroundBrush().color().name() ) +
   19.58 -		          attribut("selectionColor", selection.getColor().name() ) +
   19.59 -		          attribut("linkStyle", ls ) +
   19.60 -		          attribut("linkColor", defLinkColor.name() ) +
   19.61 -		          attribut("defXLinkColor", defXLinkColor.name() ) +
   19.62 -		          attribut("defXLinkWidth", QString().setNum(defXLinkWidth,10) ) +
   19.63 +		mapAttr+= xml.attribut("author",author) +
   19.64 +				  xml.attribut("comment",comment) +
   19.65 +			      xml.attribut("date",getDate()) +
   19.66 +		          xml.attribut("backgroundColor", mapScene->backgroundBrush().color().name() ) +
   19.67 +		          xml.attribut("selectionColor", selection.getColor().name() ) +
   19.68 +		          xml.attribut("linkStyle", ls ) +
   19.69 +		          xml.attribut("linkColor", defLinkColor.name() ) +
   19.70 +		          xml.attribut("defXLinkColor", defXLinkColor.name() ) +
   19.71 +		          xml.attribut("defXLinkWidth", QString().setNum(defXLinkWidth,10) ) +
   19.72  		          colhint; 
   19.73 -	s+=beginElement("vymmap",mapAttr);
   19.74 -	incIndent();
   19.75 +	s+=xml.beginElement("vymmap",mapAttr);
   19.76 +	xml.incIndent();
   19.77  
   19.78  	// Find the used flags while traversing the tree
   19.79  	standardFlagsDefault->resetUsedCounter();
   19.80 @@ -254,10 +250,10 @@
   19.81  
   19.82  	// Save selection
   19.83  	if (!selection.isEmpty() && !saveSel ) 
   19.84 -		s+=valueElement("select",selection.getSelectString());
   19.85 -
   19.86 -	decIndent();
   19.87 -	s+=endElement("vymmap");
   19.88 +		s+=xml.valueElement("select",selection.getSelectString());
   19.89 +
   19.90 +	xml.decIndent();
   19.91 +	s+=xml.endElement("vymmap");
   19.92  
   19.93  	if (writeflags)
   19.94  		standardFlagsDefault->saveToDir (tmpdir+"/flags/","",writeflags);
   19.95 @@ -1488,27 +1484,33 @@
   19.96  			"setHeading (\""+s+"\")", 
   19.97  			QString("Set heading of %1 to \"%2\"").arg(getObjectName(sel)).arg(s) );
   19.98  		sel->setHeading(s );
   19.99 +		TreeItem *ti=selection.getBranchItem();
  19.100 +		if (ti) ti->setHeading (s);
  19.101 +		//FIXME ix is wrong ModelIndex below, ix2 is (hopefully) correct:
  19.102 +		QModelIndex ix=index( ti->row(), ti->column(), index (0,0,QModelIndex()) );
  19.103 +		cout <<"VM::setHeading  s="<<s.toStdString()<<"  ti="<<ti<<"  r,c=("<<ti->row()<<","<<ti->column()<<")"<<endl;
  19.104 +		QModelIndex ix2=index (ti);
  19.105 +		emit (dataChanged ( ix2,ix2));
  19.106 +		cout <<"                (r,c)=("<<ix2.row()<<","<<ix2.column()<<")"<<endl;
  19.107 +
  19.108 +		// FIXME playing around with selections:
  19.109 +		// but somehow not all mco are visible in tree then???
  19.110 +//		if (mapEditor)
  19.111 +		if (NULL)
  19.112 +		{
  19.113 +			
  19.114 +			QItemSelectionModel *selectionModel=mapEditor->selectionModel();
  19.115 +			selectionModel->clear();
  19.116 +			QItemSelection sel (ix2,ix2);
  19.117 +			selectionModel->select (sel, QItemSelectionModel::Select);
  19.118 +		}
  19.119 +
  19.120  		reposition();
  19.121  		selection.update();
  19.122  		ensureSelectionVisible();
  19.123  	}
  19.124  }
  19.125  
  19.126 -/* FIXME delete this
  19.127 -QString VymModel::getHeading(bool &ok, QPoint &p)
  19.128 -{
  19.129 -	BranchObj *bo=selection.getBranch();
  19.130 -	if (bo)
  19.131 -	{
  19.132 -		ok=true;
  19.133 -		//p=scene->mapFromScene(bo->getAbsPos());	// FIXME this is view-dependant!!!
  19.134 -		return bo->getHeading();
  19.135 -	}
  19.136 -	ok=false;
  19.137 -	return QString();
  19.138 -}
  19.139 -*/
  19.140 -
  19.141  void VymModel::setHeadingInt(const QString &s)
  19.142  {
  19.143  	BranchObj *bo=selection.getBranch();
  19.144 @@ -1962,6 +1964,36 @@
  19.145  	}
  19.146  }
  19.147  
  19.148 +void VymModel::createMapCenter()
  19.149 +{
  19.150 +	MapCenterObj *mco=addMapCenter (QPointF (0,0) );
  19.151 +	selection.select (mco);
  19.152 +}
  19.153 +
  19.154 +void VymModel::createBranch()
  19.155 +{
  19.156 +	BranchObj *bo=selection.getBranch();
  19.157 +	if (bo)
  19.158 +	{
  19.159 +		BranchObj *newbo=addNewBranchInt (-2); // FIXME Old model, merge with below
  19.160 +
  19.161 +		// Create TreeItem
  19.162 +		QList<QVariant> cData;
  19.163 +		cData << "VM:createBranch" << "undef"<<"undef";
  19.164 +		TreeItem *parti=bo->getTreeItem();
  19.165 +		TreeItem *ti=new TreeItem (cData,parti);
  19.166 +		ti->setLMO (newbo);
  19.167 +		ti->setType (TreeItem::Branch);
  19.168 +		parti->appendChild (ti);
  19.169 +
  19.170 +		if (newbo)
  19.171 +		{
  19.172 +			newbo->setTreeItem (ti);
  19.173 +			selection.select (newbo);
  19.174 +		}
  19.175 +	}
  19.176 +}
  19.177 +
  19.178  MapCenterObj* VymModel::addMapCenter ()
  19.179  {
  19.180  	MapCenterObj *mco=addMapCenter (contextPos);
  19.181 @@ -1986,6 +2018,16 @@
  19.182  	mapCenter->setHeading (QApplication::translate("Heading of mapcenter in new map", "New map"));
  19.183  	mapCenter->setMapEditor(mapEditor);		//FIXME needed to get defLinkStyle, mapLinkColorHint ... for later added objects
  19.184  	mapCenters.append(mapCenter);
  19.185 +
  19.186 +	// Create TreeItem
  19.187 +	QList<QVariant> cData;
  19.188 +	cData << "VM:addMapCenter" << "undef"<<"undef";
  19.189 +	TreeItem *ti=new TreeItem (cData,rootItem);
  19.190 +	ti->setLMO (mapCenter);
  19.191 +	ti->setType (TreeItem::MapCenter);
  19.192 +	mapCenter->setTreeItem (ti);
  19.193 +	rootItem->appendChild (ti);
  19.194 +
  19.195  	return mapCenter;
  19.196  }
  19.197  
  19.198 @@ -2180,6 +2222,17 @@
  19.199  	if (bo)
  19.200  	{
  19.201  		par=(BranchObj*)(bo->getParObj());
  19.202 +
  19.203 +		// Don't use this on mapcenter
  19.204 +		if (!par) return;
  19.205 +
  19.206 +		// Check if we have childs at all to keep
  19.207 +		if (bo->countBranches()==0) 
  19.208 +		{
  19.209 +			deleteSelection();
  19.210 +			return;
  19.211 +		}
  19.212 +
  19.213  		QPointF p=bo->getRelPos();
  19.214  		saveStateChangingPart(
  19.215  			bo->getParObj(),
  19.216 @@ -4704,6 +4757,21 @@
  19.217  	}		
  19.218  }
  19.219  
  19.220 +void VymModel::selectParent()
  19.221 +{
  19.222 +	LinkableMapObj *lmo=selection.first();
  19.223 +	BranchObj* par;
  19.224 +	if (lmo)
  19.225 +	{
  19.226 +		par=(BranchObj*)(lmo->getParObj());
  19.227 +		if (!par) return;
  19.228 +		selection.select(par);
  19.229 +		selection.update();
  19.230 +		ensureSelectionVisible();
  19.231 +		sendSelection();
  19.232 +	}		
  19.233 +}
  19.234 +
  19.235  Selection::Type VymModel::selectionType()
  19.236  {
  19.237  	return selection.type();
    20.1 --- a/vymmodel.h	Tue Aug 05 07:36:53 2008 +0000
    20.2 +++ b/vymmodel.h	Mon Oct 06 11:10:20 2008 +0000
    20.3 @@ -9,14 +9,10 @@
    20.4  #include "mapeditor.h"
    20.5  #include "parser.h"
    20.6  #include "selection.h"
    20.7 +#include "treeitem.h"
    20.8  #include "treemodel.h"
    20.9 -#include "xmlobj.h"
   20.10  
   20.11 -
   20.12 -/*! \brief This will later be divided into Model/View
   20.13 -*/
   20.14 -
   20.15 -class VymModel : public QObject,  public XMLObj {		
   20.16 +class VymModel : public TreeModel {		
   20.17  	Q_OBJECT
   20.18  
   20.19  ////////////////////////////////////////////
   20.20 @@ -39,11 +35,6 @@
   20.21  
   20.22  	MapEditor* getMapEditor();			// FIXME not necessary
   20.23  
   20.24 -private:
   20.25 -	TreeModel* treeModel;
   20.26 -public:	
   20.27 -	TreeModel* getTreeModel();
   20.28 -
   20.29  	bool isRepositionBlocked();		//!< While load or undo there is no need to update graphicsview
   20.30  
   20.31  	void updateActions();			//!< Update buttons in mainwindow
   20.32 @@ -288,6 +279,10 @@
   20.33      void moveBranchDown();	//!< Move branch down
   20.34  	void sortChildren();	//!< Sort children lexically
   20.35  
   20.36 +	// The create methods are used to quickly parse a XML file
   20.37 +	void createMapCenter();	//!< Create and select MapCenter
   20.38 +	void createBranch();	//!< Create and select Branch
   20.39 +
   20.40  	/*! \brief Add new mapcenter
   20.41  
   20.42  	    Disclaimer: Still experimental, not fully supported yet.
   20.43 @@ -552,6 +547,7 @@
   20.44      void selectRightBranch();
   20.45      void selectFirstBranch();
   20.46      void selectLastBranch();
   20.47 +	void selectParent();
   20.48  
   20.49  public:
   20.50  	Selection::Type selectionType();
    21.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    21.2 +++ b/vymview.cpp	Mon Oct 06 11:10:20 2008 +0000
    21.3 @@ -0,0 +1,39 @@
    21.4 +#include "vymview.h"
    21.5 +
    21.6 +#include "mapeditor.h"
    21.7 +
    21.8 +VymView::VymView(VymModel *model)
    21.9 +{
   21.10 +	// Create TreeView
   21.11 +	QTreeView *treeview=new QTreeView;
   21.12 +	treeview->setModel ((QAbstractItemModel*)model);
   21.13 +	treeview->setMinimumWidth (350);
   21.14 +	treeview->setColumnWidth (0,350);
   21.15 +
   21.16 +	// Create good old MapEditor
   21.17 +	MapEditor* me=model->getMapEditor();
   21.18 +	if (!me) me=new MapEditor (model);
   21.19 +
   21.20 +	me->setSelectionModel (treeview->selectionModel() );
   21.21 +
   21.22 +	//me->viewport()->setFocus();
   21.23 +	//FIXME me->setAntiAlias (actionViewToggleAntiAlias->isOn());
   21.24 +	//FIXME me->setSmoothPixmap(actionViewToggleSmoothPixmapTransform->isOn());
   21.25 +
   21.26 +	addWidget (treeview);
   21.27 +	addWidget (me);
   21.28 +
   21.29 +	// Set geometry
   21.30 +	QList <int> sizes;
   21.31 +	sizes.append (150);
   21.32 +	sizes.append (600);
   21.33 +	setSizes (sizes);
   21.34 +}
   21.35 +
   21.36 +QItemSelectionModel* VymView::selectionModel() 
   21.37 +{
   21.38 +	if (treeview) return treeview->selectionModel();
   21.39 +	return NULL;
   21.40 +}
   21.41 +
   21.42 +
    22.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    22.2 +++ b/vymview.h	Mon Oct 06 11:10:20 2008 +0000
    22.3 @@ -0,0 +1,22 @@
    22.4 +#ifndef VYMVIEW_H 
    22.5 +#define VYMVIEW_H
    22.6 +
    22.7 +#include <QItemSelectionModel>
    22.8 +#include <QSplitter>
    22.9 +#include <QTreeView>
   22.10 +
   22.11 +class VymModel;
   22.12 +
   22.13 +
   22.14 +class VymView : public QSplitter 
   22.15 +{
   22.16 +public:
   22.17 +	VymView(VymModel *model);
   22.18 +	QItemSelectionModel* selectionModel();
   22.19 +private:
   22.20 +	QTreeView *treeview;
   22.21 +};
   22.22 +
   22.23 +
   22.24 +#endif
   22.25 +
    23.1 --- a/xml-vym.cpp	Tue Aug 05 07:36:53 2008 +0000
    23.2 +++ b/xml-vym.cpp	Mon Oct 06 11:10:20 2008 +0000
    23.3 @@ -18,15 +18,6 @@
    23.4  extern Settings settings;
    23.5  extern QString vymVersion;
    23.6  
    23.7 -/*
    23.8 -parseVYMHandler::parseVYMHandler() {}
    23.9 -
   23.10 -parseVYMHandler::~parseVYMHandler() {}
   23.11 -
   23.12 -QString parseVYMHandler::errorProtocol() { return errorProt; }
   23.13 -
   23.14 -*/
   23.15 -
   23.16  bool parseVYMHandler::startDocument()
   23.17  {
   23.18      errorProt = "";
   23.19 @@ -39,18 +30,6 @@
   23.20      return true;
   23.21  }
   23.22  
   23.23 -
   23.24 -/*
   23.25 -QString parseVYMHandler::parseHREF(QString href)
   23.26 -{
   23.27 -	QString type=href.section(":",0,0);
   23.28 -	QString path=href.section(":",1,1);
   23.29 -	if (!tmpDir.endsWith("/"))
   23.30 -		return tmpDir + "/" + path;
   23.31 -	else	
   23.32 -		return tmpDir + path;
   23.33 -}
   23.34 -*/
   23.35  bool parseVYMHandler::startElement  ( const QString&, const QString&,
   23.36                      const QString& eName, const QXmlAttributes& atts ) 
   23.37  {
   23.38 @@ -144,7 +123,8 @@
   23.39  		{	
   23.40  			// Really use the found mapcenter as MCO in a new map
   23.41  
   23.42 -			lastBranch=model->addMapCenter(); 
   23.43 +			model->createMapCenter(); 
   23.44 +			lastBranch=model->getSelectedBranch();
   23.45  		} else
   23.46  		{
   23.47  			// Treat the found mapcenter as a branch 
   23.48 @@ -156,8 +136,8 @@
   23.49  				lastBranch=(BranchObj*)lmo;
   23.50  				if (loadMode==ImportAdd)
   23.51  				{
   23.52 -					lastBranch->addBranch();
   23.53 -					lastBranch=lastBranch->getLastBranch();
   23.54 +					model->createBranch();
   23.55 +					lastBranch=model->getSelectedBranch();
   23.56  				} else
   23.57  					lastBranch->clear();
   23.58  			} else
   23.59 @@ -216,8 +196,8 @@
   23.60  				state=StateBranch;
   23.61  				if (loadMode==ImportAdd)
   23.62  				{
   23.63 -					lastBranch->addBranch();
   23.64 -					lastBranch=lastBranch->getLastBranch();
   23.65 +					model->createBranch();
   23.66 +					lastBranch=model->getSelectedBranch();
   23.67  					
   23.68  				} else
   23.69  					lastBranch->clear();
   23.70 @@ -233,8 +213,8 @@
   23.71  	} else if ( eName == "branch" && state == StateMapCenter) 
   23.72  	{
   23.73  		state=StateBranch;
   23.74 -		lastBranch->addBranch();
   23.75 -		lastBranch=lastBranch->getLastBranch();
   23.76 +		model->createBranch();
   23.77 +		lastBranch=model->getSelectedBranch();
   23.78  		readBranchAttr (atts);
   23.79  	} else if ( eName == "htmlnote" && state == StateBranch) 
   23.80  	{
   23.81 @@ -254,8 +234,8 @@
   23.82  		if (!readXLinkAttr (atts)) return false;
   23.83      } else if ( eName == "branch" && state == StateBranch ) 
   23.84  	{
   23.85 -        lastBranch->addBranch();
   23.86 -		lastBranch=lastBranch->getLastBranch();		
   23.87 +		model->createBranch();
   23.88 +		lastBranch=model->getSelectedBranch();
   23.89  		readBranchAttr (atts);
   23.90      } else if ( eName == "html" && state == StateHtmlNote ) 
   23.91  	{
   23.92 @@ -286,7 +266,8 @@
   23.93      switch ( state ) 
   23.94  	{
   23.95          case StateBranch: 
   23.96 -			lastBranch=(BranchObj*)(lastBranch->getParObj());
   23.97 +			model->selectParent();
   23.98 +			lastBranch=model->getSelectedBranch();
   23.99              break;
  23.100          case StateHtml: 
  23.101  			htmldata+="</"+eName+">";
  23.102 @@ -335,7 +316,7 @@
  23.103  			htmldata+=ch_org;
  23.104  			break;
  23.105          case StateHeading: 
  23.106 -            lastBranch->setHeading(ch_simplified);
  23.107 +            model->setHeading(ch_simplified);
  23.108              break;
  23.109          default: 
  23.110  			return false;