mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
Stubbed in new vector layer properties dialog (only accessible from right-click menu)
git-svn-id: http://svn.osgeo.org/qgis/trunk@660 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
7f100809f7
commit
ea3ad95bee
@ -17,7 +17,7 @@
|
|||||||
* *
|
* *
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
|
|
||||||
#include <qapplication.h>
|
#include <qapplication.h>
|
||||||
@ -899,7 +899,18 @@ void QgisApp::testButton()
|
|||||||
// delete sfl;
|
// delete sfl;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
void QgisApp::newLayerProperties()
|
||||||
|
{
|
||||||
|
newLayerProperties(legendView->currentItem());
|
||||||
|
}
|
||||||
|
void QgisApp::newLayerProperties(QListViewItem *lvi)
|
||||||
|
{
|
||||||
|
std::cout << "Showing new layer properties dialog" << std::endl;
|
||||||
|
QgsMapLayer *lyr;
|
||||||
|
lyr = ((QgsLegendItem *)lvi)->layer();
|
||||||
|
QgsVectorLayer *vectorLayer = (QgsVectorLayer*)lyr;
|
||||||
|
vectorLayer->showNewLayerProperties();
|
||||||
|
}
|
||||||
void QgisApp::layerProperties()
|
void QgisApp::layerProperties()
|
||||||
{
|
{
|
||||||
layerProperties(legendView->currentItem());
|
layerProperties(legendView->currentItem());
|
||||||
|
@ -103,6 +103,11 @@ class QgisApp:public QgisAppBase
|
|||||||
void layerProperties(QListViewItem *);
|
void layerProperties(QListViewItem *);
|
||||||
//! Show layer properties for selected layer (called by right-click menu)
|
//! Show layer properties for selected layer (called by right-click menu)
|
||||||
void layerProperties();
|
void layerProperties();
|
||||||
|
//! new layer properties dialog -- to replace existing suite of dialogs
|
||||||
|
void newLayerProperties();
|
||||||
|
//! new layer properties dialog -- to replace existing suite of dialogs
|
||||||
|
void newLayerProperties(QListViewItem *);
|
||||||
|
|
||||||
//! Show the right-click menu for the legend
|
//! Show the right-click menu for the legend
|
||||||
void rightClickLegendMenu(QListViewItem *, const QPoint &, int);
|
void rightClickLegendMenu(QListViewItem *, const QPoint &, int);
|
||||||
//! Remove a layer from the map and legend
|
//! Remove a layer from the map and legend
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -653,7 +653,16 @@ QgsDataProvider* QgsVectorLayer::getDataProvider()
|
|||||||
{
|
{
|
||||||
return dataProvider;
|
return dataProvider;
|
||||||
}
|
}
|
||||||
|
//TODO FIX THIS NEW PROPERTIES DIALOG WHICH REPLACES ALL EXISTING PROPERTY
|
||||||
|
//TODO AND SYMBOLOGY DIALOGS
|
||||||
|
// Currently this just opens the dialog and populates some general
|
||||||
|
// layer properties. When fully functional, this function should replace
|
||||||
|
// showLayerProperties().
|
||||||
|
void QgsVectorLayer::showNewLayerProperties()
|
||||||
|
{
|
||||||
|
QgsDlgVectorLayerProperties *vlp = new QgsDlgVectorLayerProperties(this);
|
||||||
|
vlp->show();
|
||||||
|
}
|
||||||
void QgsVectorLayer::showLayerProperties()
|
void QgsVectorLayer::showLayerProperties()
|
||||||
{
|
{
|
||||||
if(m_propertiesDialog)
|
if(m_propertiesDialog)
|
||||||
@ -666,10 +675,6 @@ void QgsVectorLayer::showLayerProperties()
|
|||||||
m_propertiesDialog = new QgsVectorLayerProperties(this);
|
m_propertiesDialog = new QgsVectorLayerProperties(this);
|
||||||
m_propertiesDialog->show();
|
m_propertiesDialog->show();
|
||||||
}
|
}
|
||||||
//TODO FIX THIS NEW PROPERTIES DIALOG WHICH REPLACES ALL EXISTING PROPERTY
|
|
||||||
//TODO AND SYMBOLOGY DIALOGS
|
|
||||||
/* QgsDlgVectorLayerProperties *vlp = new QgsDlgVectorLayerProperties(this);
|
|
||||||
vlp->show(); */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QgsRenderer* QgsVectorLayer::renderer()
|
QgsRenderer* QgsVectorLayer::renderer()
|
||||||
@ -745,7 +750,8 @@ void QgsVectorLayer::initContextMenu(QgisApp *app){
|
|||||||
popMenu->insertItem(tr("&Zoom to extent of selected layer"), app, SLOT(zoomToLayerExtent()));
|
popMenu->insertItem(tr("&Zoom to extent of selected layer"), app, SLOT(zoomToLayerExtent()));
|
||||||
popMenu->insertItem(tr("&Open attribute table"), app, SLOT(attributeTable()));
|
popMenu->insertItem(tr("&Open attribute table"), app, SLOT(attributeTable()));
|
||||||
popMenu->insertSeparator();
|
popMenu->insertSeparator();
|
||||||
popMenu->insertItem(tr("&Properties"), app, SLOT(layerProperties()));
|
popMenu->insertItem(tr("&Properties"), this, SLOT(showLayerProperties()));
|
||||||
|
popMenu->insertItem("New Properties dialog", this, SLOT(showNewLayerProperties()));
|
||||||
popMenu->insertSeparator();
|
popMenu->insertSeparator();
|
||||||
popMenu->insertItem(tr("&Remove"), app, SLOT(removeLayer()));
|
popMenu->insertItem(tr("&Remove"), app, SLOT(removeLayer()));
|
||||||
}
|
}
|
||||||
|
@ -95,6 +95,8 @@ class QgsVectorLayer:public QgsMapLayer
|
|||||||
QString providerType();
|
QString providerType();
|
||||||
//! Return the validity of the layer
|
//! Return the validity of the layer
|
||||||
inline bool isValid(){ return valid;}
|
inline bool isValid(){ return valid;}
|
||||||
|
//! new layer properties dialog
|
||||||
|
void showNewLayerProperties();
|
||||||
protected:
|
protected:
|
||||||
/**Pointer to the table display object if there is one, else a pointer to 0*/
|
/**Pointer to the table display object if there is one, else a pointer to 0*/
|
||||||
QgsAttributeTableDisplay* tabledisplay;
|
QgsAttributeTableDisplay* tabledisplay;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user