mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 09:35:28 +00:00
36 lines
1.1 KiB
C++
36 lines
1.1 KiB
C++
|
|
#include "regionmapsubview.hpp"
|
|
|
|
#include "regionmap.hpp"
|
|
#include "../../model/settings/usersettings.hpp"
|
|
|
|
CSVWorld::RegionMapSubView::RegionMapSubView (CSMWorld::UniversalId universalId,
|
|
CSMDoc::Document& document)
|
|
: CSVDoc::SubView (universalId)
|
|
{
|
|
mRegionMap = new RegionMap (universalId, document, this);
|
|
|
|
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);
|
|
|
|
setWidget (mRegionMap);
|
|
|
|
connect (mRegionMap, SIGNAL (editRequest (const CSMWorld::UniversalId&, const std::string&)),
|
|
this, SLOT (editRequest (const CSMWorld::UniversalId&, const std::string&)));
|
|
}
|
|
|
|
void CSVWorld::RegionMapSubView::setEditLock (bool locked)
|
|
{
|
|
mRegionMap->setEditLock (locked);
|
|
}
|
|
|
|
void CSVWorld::RegionMapSubView::editRequest (const CSMWorld::UniversalId& id,
|
|
const std::string& hint)
|
|
{
|
|
focusId (id, hint);
|
|
}
|