mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 17:40:23 +08:00
DatabaseViewer: Saving/loading settings, added 3D view, added Grid from 3d projection parameter
This commit is contained in:
@@ -74,6 +74,40 @@ ImageView::~ImageView() {
|
||||
clear();
|
||||
}
|
||||
|
||||
void ImageView::saveSettings(QSettings & settings, const QString & group) const
|
||||
{
|
||||
if(!group.isEmpty())
|
||||
{
|
||||
settings.beginGroup(group);
|
||||
}
|
||||
settings.setValue("image_shown", this->isImageShown());
|
||||
settings.setValue("depth_shown", this->isImageDepthShown());
|
||||
settings.setValue("features_shown", this->isFeaturesShown());
|
||||
settings.setValue("lines_shown", this->isLinesShown());
|
||||
settings.setValue("alpha", this->getAlpha());
|
||||
if(!group.isEmpty())
|
||||
{
|
||||
settings.endGroup();
|
||||
}
|
||||
}
|
||||
|
||||
void ImageView::loadSettings(QSettings & settings, const QString & group)
|
||||
{
|
||||
if(!group.isEmpty())
|
||||
{
|
||||
settings.beginGroup(group);
|
||||
}
|
||||
this->setImageShown(settings.value("image_shown", this->isImageShown()).toBool());
|
||||
this->setImageDepthShown(settings.value("depth_shown", this->isImageDepthShown()).toBool());
|
||||
this->setFeaturesShown(settings.value("features_shown", this->isFeaturesShown()).toBool());
|
||||
this->setLinesShown(settings.value("lines_shown", this->isLinesShown()).toBool());
|
||||
this->setAlpha(settings.value("alpha", this->getAlpha()).toInt());
|
||||
if(!group.isEmpty())
|
||||
{
|
||||
settings.endGroup();
|
||||
}
|
||||
}
|
||||
|
||||
void ImageView::resetZoom()
|
||||
{
|
||||
_zoom = _minZoom;
|
||||
|
||||
Reference in New Issue
Block a user