mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
Emit signal when showing / hiding composer
This commit is contained in:
parent
127f7c0dd8
commit
4d051b8b32
@ -107,4 +107,9 @@ class QgsComposerView: QGraphicsView
|
||||
/**Current action (e.g. adding composer map) has been finished. The purpose of this signal is that
|
||||
QgsComposer may set the selection tool again*/
|
||||
void actionFinished();
|
||||
|
||||
/**Emitted before composerview is shown*/
|
||||
void composerViewShow( QgsComposerView* );
|
||||
/**Emitted before composerview is hidden*/
|
||||
void composerViewHide( QgsComposerView* );
|
||||
};
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "qgscomposerscalebar.h"
|
||||
#include "qgscomposershape.h"
|
||||
#include "qgscomposerattributetable.h"
|
||||
#include "qgslogger.h"
|
||||
|
||||
QgsComposerView::QgsComposerView( QWidget* parent, const char* name, Qt::WFlags f )
|
||||
: QGraphicsView( parent )
|
||||
@ -499,6 +500,18 @@ void QgsComposerView::paintEvent( QPaintEvent* event )
|
||||
}
|
||||
}
|
||||
|
||||
void QgsComposerView::hideEvent( QHideEvent* e )
|
||||
{
|
||||
emit( composerViewShow( this ) );
|
||||
e->ignore();
|
||||
}
|
||||
|
||||
void QgsComposerView::showEvent( QShowEvent* e )
|
||||
{
|
||||
emit( composerViewHide( this ) );
|
||||
e->ignore();
|
||||
}
|
||||
|
||||
void QgsComposerView::setComposition( QgsComposition* c )
|
||||
{
|
||||
setScene( c );
|
||||
|
@ -117,6 +117,8 @@ class GUI_EXPORT QgsComposerView: public QGraphicsView
|
||||
|
||||
void paintEvent( QPaintEvent* event );
|
||||
|
||||
void hideEvent( QHideEvent* e );
|
||||
void showEvent( QShowEvent* e );
|
||||
|
||||
private:
|
||||
/**Status of shift key (used for multiple selection)*/
|
||||
@ -167,6 +169,11 @@ class GUI_EXPORT QgsComposerView: public QGraphicsView
|
||||
/**Current action (e.g. adding composer map) has been finished. The purpose of this signal is that
|
||||
QgsComposer may set the selection tool again*/
|
||||
void actionFinished();
|
||||
|
||||
/**Emitted before composerview is shown*/
|
||||
void composerViewShow( QgsComposerView* );
|
||||
/**Emitted before composerview is hidden*/
|
||||
void composerViewHide( QgsComposerView* );
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user