Thanks Chris, I'm beginning to get a better idea of what does what and how it all hangs together.
One thing I pointed out I CAN see the details for:
SlySven wrote:...
- The same right click menu has a "lock" item which does not appear to change the speedwalk flag that the roomLocked(ID) reports on, which is what I would have thought it would affect? (I recognise this as being equivalent to the TinTin++ room AVOID flag!)
...
Ah, I found that it did Lock the room but I wasn't examining the information about that in the correct way! Anyhow it does indeed lock the room but there is no easy way to undo the effect in the same manner, digging in the source code reveals it is all in T2DMap.cpp, specifically, in the function void T2DMap::mousePressEvent(QMouseEvent *event) which begins at line 1900, the following chunk (lines 2152-2166):
Code: Select all
//QAction * action5 = new QAction("user data", this );
//action5->setStatusTip(tr("set user data"));
//connect( action5, SIGNAL(triggered()), this, SLOT(slot_setUserData()));
QAction * action6 = new QAction("lock", this );
action6->setStatusTip(tr("lock room for speed walks"));
connect( action6, SIGNAL(triggered()), this, SLOT(slot_lockRoom()));
QAction * action7 = new QAction("weight", this );
action7->setStatusTip(tr("set room weight"));
connect( action7, SIGNAL(triggered()), this, SLOT(slot_setRoomWeight()));
QAction * action8 = new QAction("exits", this );
action8->setStatusTip(tr("set room exits"));
connect( action8, SIGNAL(triggered()), this, SLOT(slot_setExits()));
QAction * action10 = new QAction("letter", this );
action10->setStatusTip(tr("set a letter to mark special rooms"));
connect( action10, SIGNAL(triggered()), this, SLOT(slot_setCharacter()));
...
calls this function at line 2709:
Code: Select all
void T2DMap::slot_lockRoom()
{
// if( mMultiSelection )
// {
mMultiRect = QRect(0,0,0,0);
for( int j=0; j<mMultiSelectionList.size(); j++ )
{
if( mpMap->rooms.contains( mMultiSelectionList[j] ) )
{
mpMap->rooms[mMultiSelectionList[j]]->isLocked = true;
mpHost->mpMap->mMapGraphNeedsUpdate = true;
}
}
// }
// else if( mpHost->mpMap->rooms.contains( mRoomSelection ) )
// {
// mpHost->mpMap->rooms[mRoomSelection]->isLocked = true;
// mpHost->mpMap->mMapGraphNeedsUpdate = true;
// }
}
So which would be more appropriate, adding another "slot"
to "unlock" (all the selected rooms if more than one is selected) by setting the isLocked to false or changing it to a dialogue that reports the current setting (of each for a multiple selection) to permit changing either way? I guess the former is the simplest and easiest to implement...