Skip to content
Permalink
Browse files
Some docstring improvements
  • Loading branch information
m-kuhn committed Apr 8, 2017
1 parent 14e949b commit 5805cf99f113c0c6dc45f4d1e482c28a98476d95
Showing with 39 additions and 3 deletions.
  1. +9 −1 python/core/qgslegendstyle.sip
  2. +5 −0 python/gui/qgsmessagelogviewer.sip
  3. +19 −2 src/core/qgslegendstyle.h
  4. +6 −0 src/gui/qgsmessagelogviewer.h
@@ -30,19 +30,27 @@ class QgsLegendStyle
Symbol,
SymbolLabel
};
enum Side //! margin side

enum Side
{
Top,
Bottom,
Left,
Right };

QgsLegendStyle();

QFont font() const;
%Docstring
The font for this style.
:rtype: QFont
%End

void setFont( const QFont &font );
%Docstring
The font for this style.
%End


double margin( Side side );
%Docstring
@@ -20,7 +20,12 @@ class QgsMessageLogViewer: QDialog
#include "qgsmessagelogviewer.h"
%End
public:

QgsMessageLogViewer( QStatusBar *statusBar = 0, QWidget *parent /TransferThis/ = 0, Qt::WindowFlags fl = QgisGui::ModalDialogFlags );
%Docstring
Create a new message log viewer, it will automatically connect to the system's
QgsMessageLog.instance() singleton.
%End

public slots:
void logMessage( QString message, QString tag, QgsMessageLog::MessageLevel level );
@@ -43,19 +43,36 @@ class CORE_EXPORT QgsLegendStyle
Symbol, //!< Symbol without label
SymbolLabel
};
enum Side //! margin side

//! Margin side
enum Side
{
Top = 0,
Bottom = 1,
Left = 2,
Right = 3
};

QgsLegendStyle();

/**
* The font for this style.
*/
QFont font() const { return mFont; }
SIP_SKIP QFont &rfont() { return mFont; }

/**
* The font for this style.
*/
void setFont( const QFont &font ) { mFont = font; }

/**
* Modifiable reference to font.
*
* \see setFont()
* \note Not available in Python bindings
*/
SIP_SKIP QFont &rfont() { return mFont; }

double margin( Side side ) { return mMarginMap.value( side ); }
void setMargin( Side side, double margin ) { mMarginMap[side] = margin; }

@@ -35,7 +35,13 @@ class GUI_EXPORT QgsMessageLogViewer: public QDialog, private Ui::QgsMessageLogV
{
Q_OBJECT
public:

/**
* Create a new message log viewer, it will automatically connect to the system's
* QgsMessageLog::instance() singleton.
*/
QgsMessageLogViewer( QStatusBar *statusBar = nullptr, QWidget *parent SIP_TRANSFERTHIS = nullptr, Qt::WindowFlags fl = QgisGui::ModalDialogFlags );
// TODO QGIS 3.0: remove statusBar (it's unused)

public slots:
void logMessage( QString message, QString tag, QgsMessageLog::MessageLevel level );

0 comments on commit 5805cf9

Please sign in to comment.