Removed keyPressed() slot from QgsMapLayer and removed connections made in QgisApp.

(it doesn't make much sense to have it there)


git-svn-id: http://svn.osgeo.org/qgis/trunk@6665 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
wonder 2007-02-22 15:02:30 +00:00
parent f6eca1ed14
commit ff4a1e28ca
2 changed files with 0 additions and 54 deletions

View File

@ -1872,15 +1872,6 @@ bool QgisApp::addLayer(QFileInfo const & vectorFile)
// Register this layer with the layers registry
QgsMapLayerRegistry::instance()->addMapLayer(layer);
// connect up any keypresses to be passed tot he layer (e.g. so esc can stop rendering)
#ifdef QGISDEBUG
std::cout << " Connecting up maplayers keyPressed event to the QgisApp keyPress signal" << std::endl;
#endif
QObject::connect(this,
SIGNAL(keyPressed(QKeyEvent *)),
layer,
SLOT(keyPressed(QKeyEvent* )));
}
else
{
@ -1963,14 +1954,6 @@ bool QgisApp::addLayer(QStringList const &theLayerQStringList, const QString& en
// Register this layer with the layers registry
QgsMapLayerRegistry::instance()->addMapLayer(layer);
// connect up any keypresses to be passed tot he layer (e.g. so esc can stop rendering)
#ifdef QGISDEBUG
std::cout << " Connecting up maplayers keyPressed event to the QgisApp keyPress signal" << std::endl;
#endif
QObject::connect(this,
SIGNAL(keyPressed(QKeyEvent *)),
layer,
SLOT(keyPressed(QKeyEvent* )));
}
else
{
@ -2062,14 +2045,6 @@ void QgisApp::addDatabaseLayer()
// register this layer with the central layers registry
QgsMapLayerRegistry::instance()->addMapLayer(layer);
// connect up any keypresses to be passed tot he layer (e.g. so esc can stop rendering)
#ifdef QGISDEBUG
std::cout << " Connecting up maplayers keyPressed event to the QgisApp keyPress signal" << std::endl;
#endif
QObject::connect(this,
SIGNAL(keyPressed(QKeyEvent *)),
layer,
SLOT(keyPressed(QKeyEvent* )));
}
else
{
@ -4275,15 +4250,6 @@ void QgisApp::addVectorLayer(QString vectorLayerPath, QString baseName, QString
// Register this layer with the layers registry
QgsMapLayerRegistry::instance()->addMapLayer(layer);
// connect up any keypresses to be passed tot he layer (e.g. so esc can stop rendering)
#ifdef QGISDEBUG
std::cout << " Connecting up maplayers keyPressed event to the QgisApp keyPress signal" << std::endl;
#endif
QObject::connect(this,
SIGNAL(keyPressed(QKeyEvent * )),
layer,
SLOT(keyPressed(QKeyEvent* )));
QgsProject::instance()->dirty(false); // XXX this might be redundant
statusBar()->message(mMapCanvas->extent().stringRep(2));
@ -4947,14 +4913,6 @@ bool QgisApp::addRasterLayer(QgsRasterLayer * theRasterLayer, bool theForceRedra
SIGNAL(setStatus(QString)),
this,
SLOT(showStatusMessage(QString)));
// connect up any keypresses to be passed tot he layer (e.g. so esc can stop rendering)
#ifdef QGISDEBUG
std::cout << " Connecting up maplayers keyPressed event to the QgisApp keyPress signal" << std::endl;
#endif
QObject::connect(this ,
SIGNAL(keyPressed(QKeyEvent * )),
theRasterLayer,
SLOT(keyPressed(QKeyEvent* )));
// add it to the mapcanvas collection
// no longer necessary since adding to registry automatically adds to canvas
@ -5099,15 +5057,6 @@ void QgisApp::addRasterLayer(QString const & rasterLayerPath,
this,
SLOT(showStatusMessage(QString)));
// connect up any keypresses to be passed tot he layer (e.g. so esc can stop rendering)
#ifdef QGISDEBUG
std::cout << " Connecting up maplayers keyPressed event to the QgisApp keyPress signal" << std::endl;
#endif
QObject::connect(this,
SIGNAL(keyPressed(QKeyEvent * )),
layer,
SLOT(keyPressed(QKeyEvent* )));
QgsProject::instance()->dirty(false); // XXX this might be redundant
statusBar()->message(mMapCanvas->extent().stringRep(2));

View File

@ -222,9 +222,6 @@ public slots:
void setScaleBasedVisibility( bool theVisibilityFlag);
bool scaleBasedVisibility();
/** Layer can be informed when a key is pressed. */
virtual void keyPressed (QKeyEvent *e) {};
signals:
/** Emit a signal to notify of a progress event */