1.1 --- a/branchobj.cpp Mon Jan 07 14:52:49 2008 +0000
1.2 +++ b/branchobj.cpp Mon Jan 07 14:52:49 2008 +0000
1.3 @@ -380,7 +380,7 @@
1.4
1.5 void BranchObj::setColorSubtree(QColor col)
1.6 {
1.7 - OrnamentedObj::setColor (col);
1.8 + setColor (col);
1.9 for (int i=0; i<branch.size(); ++i)
1.10 branch.at(i)->setColorSubtree(col);
1.11 }
2.1 --- a/mainwindow.cpp Mon Jan 07 14:52:49 2008 +0000
2.2 +++ b/mainwindow.cpp Mon Jan 07 14:52:49 2008 +0000
2.3 @@ -2858,6 +2858,8 @@
2.4 AttributeDialog dia(this);
2.5 dia.setTable (me->attributeTable() );
2.6 dia.setBranch (bo);
2.7 + dia.setMode (Definition);
2.8 + dia.updateTable();
2.9 dia.exec();
2.10 }
2.11 }
3.1 --- a/mapeditor.cpp Mon Jan 07 14:52:49 2008 +0000
3.2 +++ b/mapeditor.cpp Mon Jan 07 14:52:49 2008 +0000
3.3 @@ -154,19 +154,37 @@
3.4 // Network
3.5 netstate=Offline;
3.6
3.7 - // Attributes
3.8 + // Attributes //FIXME testing only...
3.9 + QString k;
3.10 + AttributeDef *ad;
3.11 attrTable= new AttributeTable();
3.12 - attrTable->addKey ("Key A - Priority");
3.13 - attrTable->addValue ("Key A","P 1");
3.14 - attrTable->addValue ("Key A","P 2");
3.15 - attrTable->addValue ("Key A","P 3");
3.16 - attrTable->addValue ("Key A","P 4");
3.17 - attrTable->addKey ("Key B");
3.18 - attrTable->addValue ("Key B","w1");
3.19 - attrTable->addValue ("Key B","w2");
3.20 - attrTable->addKey ("Key Prio");
3.21 - attrTable->addValue ("Key Prio","Prio 1");
3.22 - attrTable->addValue ("Key Prio","Prio 2");
3.23 + k="A - StringList";
3.24 + ad=attrTable->addKey (k,StringList);
3.25 + if (ad)
3.26 + {
3.27 + QStringList sl;
3.28 + sl <<"val 1"<<"val 2"<< "val 3";
3.29 + ad->setValue (QVariant (sl));
3.30 + }
3.31 + //attrTable->addValue ("Key A","P 1");
3.32 + //attrTable->addValue ("Key A","P 2");
3.33 + //attrTable->addValue ("Key A","P 3");
3.34 + //attrTable->addValue ("Key A","P 4");
3.35 + k="B - FreeString";
3.36 + ad=attrTable->addKey (k,FreeString);
3.37 + if (ad)
3.38 + {
3.39 + //attrTable->addValue ("Key B","w1");
3.40 + //attrTable->addValue ("Key B","w2");
3.41 + }
3.42 + k="C - UniqueString";
3.43 + ad=attrTable->addKey (k,UniqueString);
3.44 + if (ad)
3.45 + {
3.46 + //attrTable->addKey ("Key Prio");
3.47 + //attrTable->addValue ("Key Prio","Prio 1");
3.48 + //attrTable->addValue ("Key Prio","Prio 2");
3.49 + }
3.50 }
3.51
3.52 MapEditor::~MapEditor()
3.53 @@ -234,11 +252,9 @@
3.54 s=(((BranchObj*)lmo)->getHeading());
3.55 if (s=="") s="unnamed";
3.56 return QString("branch (%1)").arg(s);
3.57 - //return QString("branch (<font color=\"#0000ff\">%1</font>)").arg(s);
3.58 }
3.59 if ((typeid(*lmo) == typeid(FloatImageObj) ))
3.60 return QString ("floatimage [%1]").arg(((FloatImageObj*)lmo)->getOriginalFilename());
3.61 - //return QString ("floatimage [<font color=\"#0000ff\">%1</font>]").arg(((FloatImageObj*)lmo)->getOriginalFilename());
3.62 return QString("Unknown type has no name!");
3.63 }
3.64
3.65 @@ -4216,12 +4232,16 @@
3.66
3.67 void MapEditor::testFunction2()
3.68 {
3.69 + mapCenter->reposition();
3.70 + scene()->update();
3.71 +
3.72 +/*
3.73 // Toggle hidemode
3.74 if (hidemode==HideExport)
3.75 setHideTmpMode (HideNone);
3.76 else
3.77 setHideTmpMode (HideExport);
3.78 -
3.79 +*/
3.80 /*
3.81 LinkableMapObj *lmo=xelection.getBranch();
3.82 if (lmo)
3.83 @@ -4598,9 +4618,9 @@
3.84 if (dst && lmosel)
3.85 {
3.86 if (e->state() & Qt::ShiftModifier)
3.87 - colorBranch (((BranchObj*)(dst))->getColor());
3.88 + colorBranch (((BranchObj*)dst)->getColor());
3.89 else
3.90 - colorSubtree (((BranchObj*)(dst))->getColor());
3.91 + colorSubtree (((BranchObj*)dst)->getColor());
3.92 }
3.93 return;
3.94 }
4.1 --- a/ornamentedobj.cpp Mon Jan 07 14:52:49 2008 +0000
4.2 +++ b/ornamentedobj.cpp Mon Jan 07 14:52:49 2008 +0000
4.3 @@ -344,17 +344,17 @@
4.4 return vymLink;
4.5 }
4.6
4.7 -QList <Attribute> OrnamentedObj::getAttributes()
4.8 -{
4.9 - return attributes;
4.10 -}
4.11 -
4.12
4.13 void OrnamentedObj::setAttributes (const QList <Attribute> &al)
4.14 {
4.15 attributes=al;
4.16 }
4.17
4.18 +QList <Attribute> OrnamentedObj::getAttributes()
4.19 +{
4.20 + return attributes;
4.21 +}
4.22 +
4.23 void OrnamentedObj::clearStandardFlags()
4.24 {
4.25 standardFlags->deactivateAll();