22#include <Qsci/qscilexerjson.h>
47 QgsQsciLexerR *lexer =
new QgsQsciLexerR(
this );
50 lexer->setDefaultFont( font );
51 lexer->setFont( font, -1 );
53 font.setItalic(
true );
54 lexer->setFont( font, QgsQsciLexerR::Comment );
83QgsQsciLexerR::QgsQsciLexerR( QObject *parent )
89const char *QgsQsciLexerR::language()
const
94const char *QgsQsciLexerR::lexer()
const
99int QgsQsciLexerR::lexerId()
const
101 return QsciScintillaBase::SCLEX_R;
104QString QgsQsciLexerR::description(
int style )
const
109 return tr(
"Default" );
111 return tr(
"Comment" );
113 return tr(
"Keyword" );
115 return tr(
"Base Keyword" );
117 return tr(
"Other Keyword" );
119 return tr(
"Number" );
121 return tr(
"String" );
123 return tr(
"String 2" );
125 return tr(
"Operator" );
127 return tr(
"Identifier" );
129 return tr(
"Infix" );
131 return tr(
"Infix EOL" );
133 return tr(
"Backticks" );
135 return tr(
"Raw String" );
137 return tr(
"Raw String 2" );
139 return tr(
"Escape Sequence" );
144const char *QgsQsciLexerR::keywords(
int set )
const
149 return "if else repeat while function for in next break TRUE FALSE NULL NA Inf NaN";
152 return "abbreviate abline abs acf acos acosh addmargins aggregate agrep alarm alias alist all anova any aov aperm append apply approx "
153 "approxfun apropos ar args arima array arrows asin asinh assign assocplot atan atanh attach attr attributes autoload autoloader "
154 "ave axis backsolve barplot basename beta bindtextdomain binomial biplot bitmap bmp body box boxplot bquote break browser builtins "
155 "bxp by bzfile c call cancor capabilities casefold cat category cbind ccf ceiling character charmatch chartr chol choose chull "
156 "citation class close cm cmdscale codes coef coefficients col colnames colors colorspaces colours comment complex confint "
157 "conflicts contour contrasts contributors convolve cophenetic coplot cor cos cosh cov covratio cpgram crossprod cummax cummin "
158 "cumprod cumsum curve cut cutree cycle data dataentry date dbeta dbinom dcauchy dchisq de debug debugger decompose delay deltat "
159 "demo dendrapply density deparse deriv det detach determinant deviance dexp df dfbeta dfbetas dffits dgamma dgeom dget dhyper "
160 "diag diff diffinv difftime digamma dim dimnames dir dirname dist dlnorm dlogis dmultinom dnbinom dnorm dotchart double dpois "
161 "dput drop dsignrank dt dump dunif duplicated dweibull dwilcox eapply ecdf edit effects eigen emacs embed end environment eval "
162 "evalq example exists exp expression factanal factor factorial family fft fifo file filter find fitted fivenum fix floor flush "
163 "for force formals format formula forwardsolve fourfoldplot frame frequency ftable function gamma gaussian gc gcinfo gctorture "
164 "get getenv geterrmessage gettext gettextf getwd gl glm globalenv gray grep grey grid gsub gzcon gzfile hat hatvalues hcl "
165 "hclust head heatmap help hist history hsv httpclient iconv iconvlist identical identify if ifelse image influence inherits "
166 "integer integrate interaction interactive intersect invisible isoreg jitter jpeg julian kappa kernapply kernel kmeans knots "
167 "kronecker ksmooth labels lag lapply layout lbeta lchoose lcm legend length letters levels lfactorial lgamma library licence "
168 "license line lines list lm load loadhistory loadings local locator loess log logb logical loglin lowess ls lsfit machine mad "
169 "mahalanobis makepredictcall manova mapply match matlines matplot matpoints matrix max mean median medpolish menu merge "
170 "message methods mget min missing mode monthplot months mosaicplot mtext mvfft names napredict naprint naresid nargs nchar "
171 "ncol next nextn ngettext nlevels nlm nls noquote nrow numeric objects offset open optim optimise optimize options order "
172 "ordered outer pacf page pairlist pairs palette par parse paste pbeta pbinom pbirthday pcauchy pchisq pdf pentagamma person "
173 "persp pexp pf pgamma pgeom phyper pi pico pictex pie piechart pipe plclust plnorm plogis plot pmatch pmax pmin pnbinom png "
174 "pnorm points poisson poly polygon polym polyroot postscript power ppoints ppois ppr prcomp predict preplot pretty princomp "
175 "print prmatrix prod profile profiler proj promax prompt provide psigamma psignrank pt ptukey punif pweibull pwilcox q qbeta "
176 "qbinom qbirthday qcauchy qchisq qexp qf qgamma qgeom qhyper qlnorm qlogis qnbinom qnorm qpois qqline qqnorm qqplot qr "
177 "qsignrank qt qtukey quantile quarters quasi quasibinomial quasipoisson quit qunif quote qweibull qwilcox rainbow range "
178 "rank raw rbeta rbind rbinom rcauchy rchisq readline real recover rect reformulate regexpr relevel remove reorder rep repeat "
179 "replace replicate replications require reshape resid residuals restart return rev rexp rf rgamma rgb rgeom rhyper rle rlnorm "
180 "rlogis rm rmultinom rnbinom rnorm round row rownames rowsum rpois rsignrank rstandard rstudent rt rug runif runmed rweibull "
181 "rwilcox sample sapply save savehistory scale scan screen screeplot sd search searchpaths seek segments seq sequence serialize "
182 "setdiff setequal setwd shell sign signif sin single sinh sink smooth solve sort source spectrum spline splinefun split sprintf "
183 "sqrt stack stars start stderr stdin stdout stem step stepfun stl stop stopifnot str strftime strheight stripchart strptime "
184 "strsplit strtrim structure strwidth strwrap sub subset substitute substr substring sum summary sunflowerplot supsmu svd sweep "
185 "switch symbols symnum system t table tabulate tail tan tanh tapply tempdir tempfile termplot terms tetragamma text time title "
186 "toeplitz tolower topenv toupper trace traceback transform trigamma trunc truncate try ts tsdiag tsp typeof unclass undebug "
187 "union unique uniroot unix unlink unlist unname unserialize unsplit unstack untrace unz update upgrade url var varimax vcov "
188 "vector version vi vignette warning warnings weekdays weights which while window windows with write wsbrowser xedit xemacs "
189 "xfig xinch xor xtabs xyinch yinch zapsmall";
192 return "acme aids aircondit amis aml banking barchart barley beaver bigcity boot brambles breslow bs bwplot calcium cane capability "
193 "cav censboot channing city claridge cloth cloud coal condense contourplot control corr darwin densityplot dogs dotplot ducks "
194 "empinf envelope environmental ethanol fir frets gpar grav gravity grob hirose histogram islay knn larrows levelplot llines "
195 "logit lpoints lsegments lset ltext lvqinit lvqtest manaus melanoma melanoma motor multiedit neuro nitrofen nodal ns nuclear "
196 "oneway parallel paulsen poisons polar qq qqmath remission rfs saddle salinity shingle simplex singer somgrid splom stripplot "
197 "survival tau tmd tsboot tuna unit urine viewport wireframe wool xyplot";
ScriptLanguage
Scripting languages.
@ Decoration
Decoration color.
@ Identifier
Identifier color.
@ DoubleQuote
Double quote color.
@ CommentLine
Line comment color.
@ Default
Default text color.
@ Background
Background color.
@ SingleQuote
Single quote color.
@ Operator
Operator color.
QgsCodeEditorR(QWidget *parent=nullptr, QgsCodeEditor::Mode mode=QgsCodeEditor::Mode::ScriptEditor)
Constructor for QgsCodeEditorR.
void initializeLexer() override
Called when the dialect specific code lexer needs to be initialized (or reinitialized).
Qgis::ScriptLanguage language() const override
Returns the associated scripting language.
A text editor based on QScintilla2.
void runPostLexerConfigurationTasks()
Performs tasks which must be run after a lexer has been set for the widget.
void setTitle(const QString &title)
Set the widget title.
Flag
Flags controlling behavior of code editor.
void setLineNumbersVisible(bool visible)
Sets whether line numbers should be visible in the editor.
QFont lexerFont() const
Returns the font to use in the lexer.
QColor lexerColor(QgsCodeEditorColorScheme::ColorRole role) const
Returns the color to use in the lexer for the specified role.