1.1 --- a/mapeditor.cpp Mon Jan 07 14:52:49 2008 +0000
1.2 +++ b/mapeditor.cpp Mon Jan 07 14:52:49 2008 +0000
1.3 @@ -154,19 +154,37 @@
1.4 // Network
1.5 netstate=Offline;
1.6
1.7 - // Attributes
1.8 + // Attributes //FIXME testing only...
1.9 + QString k;
1.10 + AttributeDef *ad;
1.11 attrTable= new AttributeTable();
1.12 - attrTable->addKey ("Key A - Priority");
1.13 - attrTable->addValue ("Key A","P 1");
1.14 - attrTable->addValue ("Key A","P 2");
1.15 - attrTable->addValue ("Key A","P 3");
1.16 - attrTable->addValue ("Key A","P 4");
1.17 - attrTable->addKey ("Key B");
1.18 - attrTable->addValue ("Key B","w1");
1.19 - attrTable->addValue ("Key B","w2");
1.20 - attrTable->addKey ("Key Prio");
1.21 - attrTable->addValue ("Key Prio","Prio 1");
1.22 - attrTable->addValue ("Key Prio","Prio 2");
1.23 + k="A - StringList";
1.24 + ad=attrTable->addKey (k,StringList);
1.25 + if (ad)
1.26 + {
1.27 + QStringList sl;
1.28 + sl <<"val 1"<<"val 2"<< "val 3";
1.29 + ad->setValue (QVariant (sl));
1.30 + }
1.31 + //attrTable->addValue ("Key A","P 1");
1.32 + //attrTable->addValue ("Key A","P 2");
1.33 + //attrTable->addValue ("Key A","P 3");
1.34 + //attrTable->addValue ("Key A","P 4");
1.35 + k="B - FreeString";
1.36 + ad=attrTable->addKey (k,FreeString);
1.37 + if (ad)
1.38 + {
1.39 + //attrTable->addValue ("Key B","w1");
1.40 + //attrTable->addValue ("Key B","w2");
1.41 + }
1.42 + k="C - UniqueString";
1.43 + ad=attrTable->addKey (k,UniqueString);
1.44 + if (ad)
1.45 + {
1.46 + //attrTable->addKey ("Key Prio");
1.47 + //attrTable->addValue ("Key Prio","Prio 1");
1.48 + //attrTable->addValue ("Key Prio","Prio 2");
1.49 + }
1.50 }
1.51
1.52 MapEditor::~MapEditor()
1.53 @@ -234,11 +252,9 @@
1.54 s=(((BranchObj*)lmo)->getHeading());
1.55 if (s=="") s="unnamed";
1.56 return QString("branch (%1)").arg(s);
1.57 - //return QString("branch (<font color=\"#0000ff\">%1</font>)").arg(s);
1.58 }
1.59 if ((typeid(*lmo) == typeid(FloatImageObj) ))
1.60 return QString ("floatimage [%1]").arg(((FloatImageObj*)lmo)->getOriginalFilename());
1.61 - //return QString ("floatimage [<font color=\"#0000ff\">%1</font>]").arg(((FloatImageObj*)lmo)->getOriginalFilename());
1.62 return QString("Unknown type has no name!");
1.63 }
1.64
1.65 @@ -4216,12 +4232,16 @@
1.66
1.67 void MapEditor::testFunction2()
1.68 {
1.69 + mapCenter->reposition();
1.70 + scene()->update();
1.71 +
1.72 +/*
1.73 // Toggle hidemode
1.74 if (hidemode==HideExport)
1.75 setHideTmpMode (HideNone);
1.76 else
1.77 setHideTmpMode (HideExport);
1.78 -
1.79 +*/
1.80 /*
1.81 LinkableMapObj *lmo=xelection.getBranch();
1.82 if (lmo)
1.83 @@ -4598,9 +4618,9 @@
1.84 if (dst && lmosel)
1.85 {
1.86 if (e->state() & Qt::ShiftModifier)
1.87 - colorBranch (((BranchObj*)(dst))->getColor());
1.88 + colorBranch (((BranchObj*)dst)->getColor());
1.89 else
1.90 - colorSubtree (((BranchObj*)(dst))->getColor());
1.91 + colorSubtree (((BranchObj*)dst)->getColor());
1.92 }
1.93 return;
1.94 }