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:
gsherman 2004-01-31 23:54:40 +00:00
parent 7f100809f7
commit ea3ad95bee
5 changed files with 539 additions and 583 deletions

View File

@ -17,7 +17,7 @@
* *
***************************************************************************/
/* $Id$ */
#include <dlfcn.h>
#include <qapplication.h>
@ -899,7 +899,18 @@ void QgisApp::testButton()
// 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()
{
layerProperties(legendView->currentItem());

View File

@ -103,6 +103,11 @@ class QgisApp:public QgisAppBase
void layerProperties(QListViewItem *);
//! Show layer properties for selected layer (called by right-click menu)
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
void rightClickLegendMenu(QListViewItem *, const QPoint &, int);
//! Remove a layer from the map and legend

File diff suppressed because it is too large Load Diff

View File

@ -653,7 +653,16 @@ QgsDataProvider* QgsVectorLayer::getDataProvider()
{
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()
{
if(m_propertiesDialog)
@ -666,10 +675,6 @@ void QgsVectorLayer::showLayerProperties()
m_propertiesDialog = new QgsVectorLayerProperties(this);
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()
@ -745,7 +750,8 @@ void QgsVectorLayer::initContextMenu(QgisApp *app){
popMenu->insertItem(tr("&Zoom to extent of selected layer"), app, SLOT(zoomToLayerExtent()));
popMenu->insertItem(tr("&Open attribute table"), app, SLOT(attributeTable()));
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->insertItem(tr("&Remove"), app, SLOT(removeLayer()));
}

View File

@ -95,6 +95,8 @@ class QgsVectorLayer:public QgsMapLayer
QString providerType();
//! Return the validity of the layer
inline bool isValid(){ return valid;}
//! new layer properties dialog
void showNewLayerProperties();
protected:
/**Pointer to the table display object if there is one, else a pointer to 0*/
QgsAttributeTableDisplay* tabledisplay;