mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
Rationale: - there was a lot of large objects passed by value, so potentially there's a speed bump from this - even for implicitly shared classes like QString/QList there's still a (small) cost for copying the objects when there's no reason to - it's the right thing to do!
40 lines
979 B
Plaintext
40 lines
979 B
Plaintext
class QgsCodeEditor: QsciScintilla
|
|
{
|
|
%TypeHeaderCode
|
|
#include <qgscodeeditor.h>
|
|
%End
|
|
|
|
public:
|
|
QgsCodeEditor( QWidget *parent /TransferThis/ = 0, const QString& title = "" , bool folding = false, bool margin = false );
|
|
~QgsCodeEditor();
|
|
|
|
/** Set the widget title
|
|
* @param title widget title
|
|
*/
|
|
void setTitle( const QString& title );
|
|
|
|
/** Set margin visible state
|
|
* @param margin Set margin in the editor
|
|
*/
|
|
void setMarginVisible( bool margin );
|
|
bool marginVisible();
|
|
|
|
/** Set folding visible state
|
|
* @param folding Set folding in the editor
|
|
*/
|
|
void setFoldingVisible( bool folding);
|
|
bool foldingVisible();
|
|
|
|
/** 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 );
|
|
|
|
protected:
|
|
|
|
bool isFixedPitch( const QFont& font );
|
|
|
|
QFont getMonospaceFont();
|
|
};
|