Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added accessor for canvas bg colour
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@7876 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Jan 9, 2008
1 parent b0b6689 commit 8f4169f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/gui/qgsmapcanvas.cpp
Expand Up @@ -941,6 +941,10 @@ void QgsMapCanvas::setCanvasColor(const QColor & theColor)
mScene->setBackgroundBrush(bgBrush);
} // setbgColor

QColor QgsMapCanvas::canvasColor() const
{
return mScene->backgroundBrush().color();
}

int QgsMapCanvas::layerCount() const
{
Expand Down
2 changes: 2 additions & 0 deletions src/gui/qgsmapcanvas.h
Expand Up @@ -160,6 +160,8 @@ class GUI_EXPORT QgsMapCanvas : public QGraphicsView

/** Write property of QColor bgColor. */
virtual void setCanvasColor(const QColor & _newVal);
/** Read property of QColor bgColor. */
virtual QColor canvasColor() const;

/** Emits signal scalChanged to update scale in main window */
void updateScale();
Expand Down

0 comments on commit 8f4169f

Please sign in to comment.