mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
add QgsLegend stub to main window
git-svn-id: http://svn.osgeo.org/qgis/trunk@77 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
1ffe4e25e7
commit
842a0153a9
@ -1,6 +1,6 @@
|
||||
#############################################################################
|
||||
# Makefile for building: qgis
|
||||
# Generated by qmake (1.03a) on: Mon Jul 29 21:23:00 2002
|
||||
# Generated by qmake (1.03a) on: Tue Jul 30 21:54:55 2002
|
||||
# Project: src.pro
|
||||
# Template: app
|
||||
# Command: $(QMAKE) src.pro
|
||||
@ -59,7 +59,8 @@ HEADERS = qgsdbsourceselectbase.ui.h \
|
||||
qgssymbol.h \
|
||||
qgsmarkersymbol.h \
|
||||
qgslinesymbol.h \
|
||||
qgspolygonsymbol.h
|
||||
qgspolygonsymbol.h \
|
||||
qgslegend.h
|
||||
SOURCES = main.cpp \
|
||||
qgisapp.cpp \
|
||||
qgsdatabaselayer.cpp \
|
||||
@ -71,7 +72,8 @@ SOURCES = main.cpp \
|
||||
qgsnewconnection.cpp \
|
||||
qgsrect.cpp \
|
||||
qgspoint.cpp \
|
||||
qgscoordinatetransform.cpp
|
||||
qgscoordinatetransform.cpp \
|
||||
qgslegend.cpp
|
||||
OBJECTS = main.o \
|
||||
qgisapp.o \
|
||||
qgsdatabaselayer.o \
|
||||
@ -84,6 +86,7 @@ OBJECTS = main.o \
|
||||
qgsrect.o \
|
||||
qgspoint.o \
|
||||
qgscoordinatetransform.o \
|
||||
qgslegend.o \
|
||||
qgsdbsourceselectbase.o \
|
||||
qgisappbase.o \
|
||||
qgsnewconnectionbase.o
|
||||
@ -98,11 +101,13 @@ UICIMPLS = qgsdbsourceselectbase.cpp \
|
||||
qgsnewconnectionbase.cpp
|
||||
SRCMOC = moc_qgisapp.cpp \
|
||||
moc_qgsmapcanvas.cpp \
|
||||
moc_qgslegend.cpp \
|
||||
moc_qgsdbsourceselectbase.cpp \
|
||||
moc_qgisappbase.cpp \
|
||||
moc_qgsnewconnectionbase.cpp
|
||||
OBJMOC = moc_qgisapp.o \
|
||||
moc_qgsmapcanvas.o \
|
||||
moc_qgslegend.o \
|
||||
moc_qgsdbsourceselectbase.o \
|
||||
moc_qgisappbase.o \
|
||||
moc_qgsnewconnectionbase.o
|
||||
@ -178,6 +183,7 @@ main.o: main.cpp qgisapp.h \
|
||||
|
||||
qgisapp.o: qgisapp.cpp qgsrect.h \
|
||||
qgsmapcanvas.h \
|
||||
qgslegend.h \
|
||||
qgsdbsourceselect.h \
|
||||
qgsdatabaselayer.h \
|
||||
qgis.h \
|
||||
@ -242,6 +248,8 @@ qgspoint.o: qgspoint.cpp qgspoint.h
|
||||
qgscoordinatetransform.o: qgscoordinatetransform.cpp qgspoint.h \
|
||||
qgscoordinatetransform.h
|
||||
|
||||
qgslegend.o: qgslegend.cpp qgslegend.h
|
||||
|
||||
qgsdbsourceselectbase.h: qgsdbsourceselectbase.ui
|
||||
$(UIC) qgsdbsourceselectbase.ui -o qgsdbsourceselectbase.h
|
||||
|
||||
@ -273,6 +281,8 @@ moc_qgisapp.o: moc_qgisapp.cpp qgisapp.h qgisappbase.h
|
||||
moc_qgsmapcanvas.o: moc_qgsmapcanvas.cpp qgsmapcanvas.h qgsrect.h \
|
||||
qgspoint.h
|
||||
|
||||
moc_qgslegend.o: moc_qgslegend.cpp qgslegend.h
|
||||
|
||||
moc_qgsdbsourceselectbase.o: moc_qgsdbsourceselectbase.cpp qgsdbsourceselectbase.h
|
||||
|
||||
moc_qgisappbase.o: moc_qgisappbase.cpp qgisappbase.h
|
||||
@ -285,6 +295,9 @@ moc_qgisapp.cpp: $(MOC) qgisapp.h
|
||||
moc_qgsmapcanvas.cpp: $(MOC) qgsmapcanvas.h
|
||||
$(MOC) qgsmapcanvas.h -o moc_qgsmapcanvas.cpp
|
||||
|
||||
moc_qgslegend.cpp: $(MOC) qgslegend.h
|
||||
$(MOC) qgslegend.h -o moc_qgslegend.cpp
|
||||
|
||||
moc_qgsdbsourceselectbase.cpp: $(MOC) qgsdbsourceselectbase.h
|
||||
$(MOC) qgsdbsourceselectbase.h -o moc_qgsdbsourceselectbase.cpp
|
||||
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include <iomanip>
|
||||
#include "qgsrect.h"
|
||||
#include "qgsmapcanvas.h"
|
||||
#include "qgslegend.h"
|
||||
#include "qgsdbsourceselect.h"
|
||||
#include "qgsdatabaselayer.h"
|
||||
#include "qgis.h"
|
||||
@ -50,7 +51,7 @@ QgisApp::QgisApp (QWidget * parent, const char *name, WFlags fl):
|
||||
QGridLayout *FrameLayout =
|
||||
new QGridLayout (frameMain, 1, 2, 4, 6, "mainFrameLayout");
|
||||
QSplitter *split = new QSplitter (frameMain);
|
||||
mapToc = new QWidget (split); //frameMain);
|
||||
mapLegend = new QgsLegend (split); //frameMain);
|
||||
//add a canvas
|
||||
mapCanvas = new QgsMapCanvas (split);
|
||||
// resize it to fit in the frame
|
||||
@ -59,7 +60,7 @@ QgisApp::QgisApp (QWidget * parent, const char *name, WFlags fl):
|
||||
mapCanvas->setBackgroundColor (Qt::white); //QColor (220, 235, 255));
|
||||
mapCanvas->setMinimumWidth (400);
|
||||
FrameLayout->addWidget (split, 0, 0);
|
||||
mapToc->setBackgroundColor (QColor (192, 192, 192));
|
||||
mapLegend->setBackgroundColor (QColor (192, 192, 192));
|
||||
connect( mapCanvas, SIGNAL( xyCoordinates(QgsPoint &) ), this, SLOT( showMouseCoordinate(QgsPoint &) ) );
|
||||
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ class QRect;
|
||||
class QCanvasView;
|
||||
class QStringList;
|
||||
class QgsPoint;
|
||||
class QgsLegend;
|
||||
#include "qgisappbase.h"
|
||||
|
||||
class QgsMapCanvas;
|
||||
@ -59,7 +60,7 @@ private:
|
||||
//! Map canvas
|
||||
QgsMapCanvas *mapCanvas;
|
||||
//! Table of contents (legend) for the map
|
||||
QWidget *mapToc;
|
||||
QgsLegend *mapLegend;
|
||||
//! scale factor
|
||||
double scaleFactor;
|
||||
//! Current map window extent in real-world coordinates
|
||||
|
@ -26,7 +26,8 @@ HEADERS += qgsdbsourceselectbase.ui.h \
|
||||
qgssymbol.h \
|
||||
qgsmarkersymbol.h \
|
||||
qgslinesymbol.h \
|
||||
qgspolygonsymbol.h
|
||||
qgspolygonsymbol.h \
|
||||
qgslegend.h
|
||||
|
||||
INTERFACES += qgsdbsourceselectbase.ui qgisappbase.ui qgsnewconnectionbase.ui
|
||||
SOURCES += main.cpp \
|
||||
@ -40,4 +41,5 @@ SOURCES += main.cpp \
|
||||
qgsnewconnection.cpp \
|
||||
qgsrect.cpp \
|
||||
qgspoint.cpp \
|
||||
qgscoordinatetransform.cpp
|
||||
qgscoordinatetransform.cpp \
|
||||
qgslegend.cpp
|
||||
|
Loading…
x
Reference in New Issue
Block a user