mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-03 01:50:24 +08:00
0.14.3: exposed all gui widgets to public API. CloudViewer: fixed camera orientation reset
This commit is contained in:
@@ -148,6 +148,7 @@ ImageView::ImageView(QWidget * parent) :
|
||||
QWidget(parent),
|
||||
_savedFileName((QDir::homePath()+ "/") + "picture" + ".png"),
|
||||
_alpha(50),
|
||||
_defaultBgColor(Qt::black),
|
||||
_imageItem(0),
|
||||
_imageDepthItem(0)
|
||||
{
|
||||
@@ -202,6 +203,7 @@ void ImageView::saveSettings(QSettings & settings, const QString & group) const
|
||||
settings.setValue("features_shown", this->isFeaturesShown());
|
||||
settings.setValue("lines_shown", this->isLinesShown());
|
||||
settings.setValue("alpha", this->getAlpha());
|
||||
settings.setValue("bg_color", this->getDefaultBackgroundColor());
|
||||
settings.setValue("graphics_view", this->isGraphicsViewMode());
|
||||
settings.setValue("graphics_view_scale", this->isGraphicsViewScaled());
|
||||
if(!group.isEmpty())
|
||||
@@ -221,6 +223,7 @@ void ImageView::loadSettings(QSettings & settings, const QString & group)
|
||||
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());
|
||||
this->setDefaultBackgroundColor(settings.value("bg_color", this->getDefaultBackgroundColor()).value<QColor>());
|
||||
this->setGraphicsViewMode(settings.value("graphics_view", this->isGraphicsViewMode()).toBool());
|
||||
this->setGraphicsViewScaled(settings.value("graphics_view_scale", this->isGraphicsViewScaled()).toBool());
|
||||
if(!group.isEmpty())
|
||||
@@ -259,6 +262,11 @@ bool ImageView::isGraphicsViewScaled() const
|
||||
return _graphicsViewScaled->isChecked();
|
||||
}
|
||||
|
||||
const QColor & ImageView::getDefaultBackgroundColor() const
|
||||
{
|
||||
return _defaultBgColor;
|
||||
}
|
||||
|
||||
const QColor & ImageView::getBackgroundColor() const
|
||||
{
|
||||
return _graphicsView->backgroundBrush().color();
|
||||
@@ -416,6 +424,12 @@ void ImageView::setGraphicsViewScaled(bool scaled)
|
||||
}
|
||||
}
|
||||
|
||||
void ImageView::setDefaultBackgroundColor(const QColor & color)
|
||||
{
|
||||
_defaultBgColor = color;
|
||||
setBackgroundColor(color);
|
||||
}
|
||||
|
||||
void ImageView::setBackgroundColor(const QColor & color)
|
||||
{
|
||||
_graphicsView->setBackgroundBrush(QBrush(color));
|
||||
|
||||
Reference in New Issue
Block a user