2013-07-08 13:12:50 +02:00
|
|
|
|
|
|
|
#include "regionmapsubview.hpp"
|
|
|
|
|
2014-04-10 22:12:09 +02:00
|
|
|
#include "regionmap.hpp"
|
2014-09-23 06:30:41 +10:00
|
|
|
#include "../../model/settings/usersettings.hpp"
|
2013-07-08 13:12:50 +02:00
|
|
|
|
|
|
|
CSVWorld::RegionMapSubView::RegionMapSubView (CSMWorld::UniversalId universalId,
|
|
|
|
CSMDoc::Document& document)
|
|
|
|
: CSVDoc::SubView (universalId)
|
|
|
|
{
|
2014-04-13 14:17:18 +02:00
|
|
|
mRegionMap = new RegionMap (universalId, document, this);
|
2013-07-08 13:12:50 +02:00
|
|
|
|
2014-09-23 06:30:41 +10:00
|
|
|
int minWidth = 325;
|
|
|
|
if(CSMSettings::UserSettings::instance().hasSettingDefinitions("SubView/minimum width"))
|
|
|
|
minWidth = CSMSettings::UserSettings::instance().settingValue("SubView/minimum width").toInt();
|
|
|
|
else
|
|
|
|
CSMSettings::UserSettings::instance().setDefinitions("SubView/minimum width", (QStringList() << "minWidth"));
|
|
|
|
mRegionMap->setMinimumWidth(minWidth);
|
|
|
|
|
2014-04-10 22:12:09 +02:00
|
|
|
setWidget (mRegionMap);
|
2014-04-13 15:46:31 +02:00
|
|
|
|
|
|
|
connect (mRegionMap, SIGNAL (editRequest (const CSMWorld::UniversalId&, const std::string&)),
|
|
|
|
this, SLOT (editRequest (const CSMWorld::UniversalId&, const std::string&)));
|
2013-07-08 13:12:50 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void CSVWorld::RegionMapSubView::setEditLock (bool locked)
|
|
|
|
{
|
2014-04-10 22:12:09 +02:00
|
|
|
mRegionMap->setEditLock (locked);
|
2014-04-13 15:46:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void CSVWorld::RegionMapSubView::editRequest (const CSMWorld::UniversalId& id,
|
|
|
|
const std::string& hint)
|
|
|
|
{
|
|
|
|
focusId (id, hint);
|
2014-09-23 06:30:41 +10:00
|
|
|
}
|