# HG changeset patch # User insilmaril # Date 1199717569 0 # Node ID 3436b8eb3d9bd722b6654f8eae7174facbe5a72b # Parent 0ff5fc89dc5c60438bf14b4c1e3377bc95456ca8 Included french in vym.pro diff -r 0ff5fc89dc5c -r 3436b8eb3d9b branchobj.cpp --- a/branchobj.cpp Mon Jan 07 14:52:49 2008 +0000 +++ b/branchobj.cpp Mon Jan 07 14:52:49 2008 +0000 @@ -380,7 +380,7 @@ void BranchObj::setColorSubtree(QColor col) { - OrnamentedObj::setColor (col); + setColor (col); for (int i=0; isetColorSubtree(col); } diff -r 0ff5fc89dc5c -r 3436b8eb3d9b mainwindow.cpp --- a/mainwindow.cpp Mon Jan 07 14:52:49 2008 +0000 +++ b/mainwindow.cpp Mon Jan 07 14:52:49 2008 +0000 @@ -2858,6 +2858,8 @@ AttributeDialog dia(this); dia.setTable (me->attributeTable() ); dia.setBranch (bo); + dia.setMode (Definition); + dia.updateTable(); dia.exec(); } } diff -r 0ff5fc89dc5c -r 3436b8eb3d9b mapeditor.cpp --- a/mapeditor.cpp Mon Jan 07 14:52:49 2008 +0000 +++ b/mapeditor.cpp Mon Jan 07 14:52:49 2008 +0000 @@ -154,19 +154,37 @@ // Network netstate=Offline; - // Attributes + // Attributes //FIXME testing only... + QString k; + AttributeDef *ad; attrTable= new AttributeTable(); - attrTable->addKey ("Key A - Priority"); - attrTable->addValue ("Key A","P 1"); - attrTable->addValue ("Key A","P 2"); - attrTable->addValue ("Key A","P 3"); - attrTable->addValue ("Key A","P 4"); - attrTable->addKey ("Key B"); - attrTable->addValue ("Key B","w1"); - attrTable->addValue ("Key B","w2"); - attrTable->addKey ("Key Prio"); - attrTable->addValue ("Key Prio","Prio 1"); - attrTable->addValue ("Key Prio","Prio 2"); + k="A - StringList"; + ad=attrTable->addKey (k,StringList); + if (ad) + { + QStringList sl; + sl <<"val 1"<<"val 2"<< "val 3"; + ad->setValue (QVariant (sl)); + } + //attrTable->addValue ("Key A","P 1"); + //attrTable->addValue ("Key A","P 2"); + //attrTable->addValue ("Key A","P 3"); + //attrTable->addValue ("Key A","P 4"); + k="B - FreeString"; + ad=attrTable->addKey (k,FreeString); + if (ad) + { + //attrTable->addValue ("Key B","w1"); + //attrTable->addValue ("Key B","w2"); + } + k="C - UniqueString"; + ad=attrTable->addKey (k,UniqueString); + if (ad) + { + //attrTable->addKey ("Key Prio"); + //attrTable->addValue ("Key Prio","Prio 1"); + //attrTable->addValue ("Key Prio","Prio 2"); + } } MapEditor::~MapEditor() @@ -234,11 +252,9 @@ s=(((BranchObj*)lmo)->getHeading()); if (s=="") s="unnamed"; return QString("branch (%1)").arg(s); - //return QString("branch (%1)").arg(s); } if ((typeid(*lmo) == typeid(FloatImageObj) )) return QString ("floatimage [%1]").arg(((FloatImageObj*)lmo)->getOriginalFilename()); - //return QString ("floatimage [%1]").arg(((FloatImageObj*)lmo)->getOriginalFilename()); return QString("Unknown type has no name!"); } @@ -4216,12 +4232,16 @@ void MapEditor::testFunction2() { + mapCenter->reposition(); + scene()->update(); + +/* // Toggle hidemode if (hidemode==HideExport) setHideTmpMode (HideNone); else setHideTmpMode (HideExport); - +*/ /* LinkableMapObj *lmo=xelection.getBranch(); if (lmo) @@ -4598,9 +4618,9 @@ if (dst && lmosel) { if (e->state() & Qt::ShiftModifier) - colorBranch (((BranchObj*)(dst))->getColor()); + colorBranch (((BranchObj*)dst)->getColor()); else - colorSubtree (((BranchObj*)(dst))->getColor()); + colorSubtree (((BranchObj*)dst)->getColor()); } return; } diff -r 0ff5fc89dc5c -r 3436b8eb3d9b ornamentedobj.cpp --- a/ornamentedobj.cpp Mon Jan 07 14:52:49 2008 +0000 +++ b/ornamentedobj.cpp Mon Jan 07 14:52:49 2008 +0000 @@ -344,17 +344,17 @@ return vymLink; } -QList OrnamentedObj::getAttributes() -{ - return attributes; -} - void OrnamentedObj::setAttributes (const QList &al) { attributes=al; } +QList OrnamentedObj::getAttributes() +{ + return attributes; +} + void OrnamentedObj::clearStandardFlags() { standardFlags->deactivateAll();