Skip to content
Permalink
Browse files

Add python bindings message bar

  • Loading branch information
NathanW2 committed Sep 4, 2012
1 parent 9e9d1ce commit ac2fcb2de509103f52ad96fd344877cb40119b60
@@ -26,6 +26,7 @@
%Include qgsmaptoolzoom.sip
%Include qgsmapoverviewcanvas.sip
%Include qgsmessageviewer.sip
%Include qgsmessagebar.sip
%Include qgsprojectbadlayerguihandler.sip
%Include qgsprojectionselector.sip
%Include qgsquickprint.sip
@@ -109,6 +109,9 @@ class QgisInterface : QObject
/** Return a pointer to the main window (instance of QgisApp in case of QGIS) */
virtual QWidget * mainWindow()=0;

/** Return the message bar of the main app */
virtual QgsMessageBar * messageBar() = 0;

/** Return pointers to the composer views of the running instance (currently only one)*/
//virtual QList<QgsComposerView*> composerViews()=0;

@@ -1943,6 +1943,12 @@ QgsPalLabeling *QgisApp::palLabeling()
return mLBL;
}

QgsMessageBar* QgisApp::messageBar()
{
Q_ASSERT( mInfoBar );
return mInfoBar;
}

void QgisApp::initLegend()
{
mMapLegend->setWhatsThis( tr( "Map legend that displays all the layers currently on the map canvas. Click on the check box to turn a layer on or off. Double click on a layer in the legend to customize its appearance and set other properties." ) );
@@ -166,6 +166,8 @@ class QgisApp : public QMainWindow, private Ui::MainWindow
/** Get the mapcanvas object from the app */
QgsMapCanvas *mapCanvas();

QgsMessageBar* messageBar();

/** Get the mapcanvas object from the app */
QgsPalLabeling *palLabeling();

@@ -262,6 +262,11 @@ QWidget * QgisAppInterface::mainWindow()
return qgis;
}

QgsMessageBar * QgisAppInterface::messageBar()
{
return qgis->messageBar();
}

QList<QgsComposerView*> QgisAppInterface::activeComposers()
{
QList<QgsComposerView*> composerViewList;
@@ -120,6 +120,8 @@ class QgisAppInterface : public QgisInterface
*/
QWidget * mainWindow();

QgsMessageBar * messageBar();

QList<QgsComposerView*> activeComposers();

/** Add action to the plugins menu */
@@ -32,6 +32,7 @@ class QgsRasterLayer;
class QgsVectorLayer;
class QgsLegendInterface;
class QgsFeature;
class QgsMessageBar;

#include <QObject>
#include <QPair>
@@ -157,6 +158,9 @@ class GUI_EXPORT QgisInterface : public QObject
/** Return a pointer to the main window (instance of QgisApp in case of QGIS) */
virtual QWidget * mainWindow() = 0;

/** Return the message bar of the main app */
virtual QgsMessageBar * messageBar() = 0;

/**Return mainwindows / composer views of running composer instances (currently only one)*/
virtual QList<QgsComposerView*> activeComposers() = 0;

0 comments on commit ac2fcb2

Please sign in to comment.
You can’t perform that action at this time.