QGIS/python/gui/qgscodeeditor.sip

49 lines
1.3 KiB
Plaintext
Raw Normal View History

2014-07-12 20:50:08 +10:00
class QgsCodeEditor: QsciScintilla
{
%TypeHeaderCode
#include <qgscodeeditor.h>
%End
public:
2016-02-14 03:50:23 +01:00
/**
* Construct a new code editor.
*
* @param parent The parent QWidget
* @param title The title to show in the code editor dialog
* @param folding False: Enable margin for code editor
* @param margin False: Enable folding for code editor
* @note added in 2.6
*/
QgsCodeEditor( QWidget *parent /TransferThis/ = 0, const QString& title = "" , bool folding = false, bool margin = false );
2014-07-12 20:50:08 +10:00
~QgsCodeEditor();
2014-09-23 19:30:41 +10:00
/** Set the widget title
* @param title widget title
2016-02-14 03:50:23 +01:00
*/
void setTitle( const QString& title );
2014-11-13 23:13:13 +01:00
/** Set margin visible state
* @param margin Set margin in the editor
*/
void setMarginVisible( bool margin );
bool marginVisible();
2014-07-12 20:50:08 +10:00
/** Set folding visible state
* @param folding Set folding in the editor
*/
void setFoldingVisible( bool folding);
bool foldingVisible();
2014-11-13 23:13:13 +01:00
2014-09-23 19:30:41 +10:00
/** Insert text at cursor position, or replace any selected text if user has
* made a selection.
* @param theText The text to be inserted
*/
void insertText( const QString& theText );
2014-09-23 19:30:41 +10:00
protected:
bool isFixedPitch( const QFont& font );
QFont getMonospaceFont();
2014-07-12 20:50:08 +10:00
};