/** * Construct an object with the given parent */ CommandLineInterpreter::CommandLineInterpreter(const ScriptingEnv & environ, QWidget *parent) : ScriptEditor(parent,environ.createCodeLexer()), m_runner(), m_history(), m_inputBuffer(),m_status(Waiting), m_promptKey(markerDefine(QsciScintilla::ThreeRightArrows)), m_continuationKey(markerDefine(QsciScintilla::ThreeDots)), m_currentPromptLineIndex(0), m_pastedText(), m_pasteQueue(), m_copy(NULL), m_cut(NULL), m_paste(NULL), m_saveAs(NULL), m_zoomIn(NULL), m_zoomOut(NULL) { enableAutoCompletion(); setupEnvironment(environ); setupMargin(); setupIndentation(); setupFont(); initActions(); setContextMenuPolicy(Qt::CustomContextMenu); connect(this, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(showContextMenu(const QPoint &))); setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); // Need to disable some default key bindings that Scintilla provides as they don't really // fit here remapWindowEditingKeys(); }
void CodeEditor::setupMargins() { updateLineNumberMarginWidth(); setMarginSensitivity(0, true); setMarginSensitivity(1, true); markerDefine(QsciScintilla::RightArrow, MARKER); setMarkerBackgroundColor(QColor("#ee1111"), MARKER); markerDefine(QsciScintilla::Background, LINE_BG); setMarkerBackgroundColor(QColor("#ffff00").lighter(170), LINE_BG); }
/** * Constructor * @param parent :: The parent widget (can be NULL) * @param codelexer :: define the syntax highlighting and code completion. * @param settingsGroup :: Used when saving settings to persistent store */ ScriptEditor::ScriptEditor(QWidget *parent, QsciLexer *codelexer, const QString & settingsGroup) : QsciScintilla(parent), m_filename(""), m_progressArrowKey(markerDefine(QsciScintilla::RightArrow)), m_currentExecLine(0), m_completer(NULL),m_previousKey(0), m_findDialog(new FindReplaceDialog(this)), m_settingsGroup(settingsGroup) { // Older versions of QScintilla still use just CR as the line ending, which is pre-OSX. // New versions just use unix-style for everything but Windows. #if defined(Q_OS_WIN) setEolMode(EolWindows); #else setEolMode(EolUnix); #endif //Syntax highlighting and code completion setLexer(codelexer); readSettings(); setMarginLineNumbers(1,true); //Editor properties setAutoIndent(true); setFocusPolicy(Qt::StrongFocus); emit undoAvailable(isUndoAvailable()); emit redoAvailable(isRedoAvailable()); }
DocumentEditor::DocumentEditor(QFileSystemWatcher& watcher_, QWidget* parent_) : ScintillaExt(parent_), _watcher(watcher_) { //codec _notified = true; setUtf8(true); _codec = ""; _bomMode = BomLeaveAsIs; _hasBom = false; _charsetAutoDetect = true; _addNewLineOnSave = false; _trimOnSave = false; _autoDetectEol = false; _autoDetectIndent = false; _isNew = true; _isCloned = false; _clone = 0; _fullPath = ""; //macro _macro = new QsciMacro(this); //load settings Settings settings; settings.applyToDocument(this); // set the 1st margin accept markers // number 1 and 2 (binary mask 00000110 == 6) //setMarginMarkerMask(1, 7); /*markerDefine(QsciScintilla::Circle, MARKER_BOOK); setMarkerBackgroundColor(Qt::green, MARKER_BOOK); setMarkerForegroundColor(Qt::black, MARKER_BOOK);*/ markerDefine(QPixmap(":/images/ledblue.png").scaled(40,16, Qt::KeepAspectRatio, Qt::SmoothTransformation), MARKER_BOOK); setModified(false); // define search indicator createIndicator(INDICATOR_SEARCH, INDIC_ROUNDBOX, Qt::green); // define quick search indicators createIndicator(INDICATOR_QUICK_SEARCH1, INDIC_ROUNDBOX, Qt::green); createIndicator(INDICATOR_QUICK_SEARCH2, INDIC_ROUNDBOX, Qt::blue); // define highlight indicators createIndicator(INDICATOR_HIGHLIGHT1, INDIC_ROUNDBOX, Qt::cyan); createIndicator(INDICATOR_HIGHLIGHT2, INDIC_ROUNDBOX, Qt::green); createIndicator(INDICATOR_HIGHLIGHT3, INDIC_ROUNDBOX, Qt::magenta); createIndicator(INDICATOR_HIGHLIGHT4, INDIC_ROUNDBOX, Qt::red); createIndicator(INDICATOR_HIGHLIGHT5, INDIC_ROUNDBOX, Qt::blue); createIndicator(INDICATOR_HIGHLIGHT6, INDIC_ROUNDBOX, Qt::yellow); //connection connect(this, SIGNAL(marginClicked(int,int, Qt::KeyboardModifiers)), this, SLOT(toggleBookmark(int,int, Qt::KeyboardModifiers))); }
int QSourceCodeWidget::CreateMarkerCircle( QColor color, int markerID ){ markerID = markerDefine( QsciScintilla::Circle, markerID ); if(markerID==-1){ printf("Marker Creation Failed\n"); fflush(stdout); } else{ setMarkerBackgroundColor( color, markerID ); setMarkerForegroundColor( color, markerID ); } return markerID; }
void Buffer::setFoldLines(FoldLines foldLines) { switch(foldLines) { case None: markerDefine(SC_MARKNUM_FOLDERSUB, SC_MARK_EMPTY); markerDefine(SC_MARKNUM_FOLDERTAIL, SC_MARK_EMPTY); markerDefine(SC_MARKNUM_FOLDERMIDTAIL, SC_MARK_EMPTY); break; case CircleLine: markerDefine(SC_MARKNUM_FOLDERSUB, SC_MARK_VLINE); markerDefine(SC_MARKNUM_FOLDERTAIL, SC_MARK_LCORNERCURVE); markerDefine(SC_MARKNUM_FOLDERMIDTAIL, SC_MARK_TCORNERCURVE); break; case BoxLine: markerDefine(SC_MARKNUM_FOLDERSUB, SC_MARK_VLINE); markerDefine(SC_MARKNUM_FOLDERTAIL, SC_MARK_LCORNER); markerDefine(SC_MARKNUM_FOLDERMIDTAIL, SC_MARK_TCORNER); break; } }
DocumentEditor::DocumentEditor(DocumentEditor* document_, QWidget *parent_) : ScintillaExt(parent_), _watcher(document_->_watcher) { _notified = true; //codec setUtf8(true); _codec = document_->_codec; _bomMode = document_->_bomMode; _hasBom = document_->_hasBom; _charsetAutoDetect = document_->_charsetAutoDetect; //document info _autoDetectEol = document_->_autoDetectEol; _autoDetectIndent = document_->_autoDetectIndent; _isNew = document_->isNew(); _fullPath = document_->getFullPath(); setDocument(document_->document()); _clone = document_; _isCloned = true; document_->_clone = this; document_->_isCloned = true; QsciLexer* l = document_->lexer(); if(l != 0) { QString lexLang = l->language(); QsciLexer* newLex = LexerManager::getInstance().lexerFactory(lexLang, this); if(newLex == 0) { //could not find the lexer newLex = LexerManager::getInstance().getAutoLexer(this); } setLexer(newLex); } //macro _macro = new QsciMacro(this); //load settings Settings settings; settings.applyToDocument(this); markerDefine(QPixmap(":/images/ledblue.png").scaled(40,16, Qt::KeepAspectRatio, Qt::SmoothTransformation), MARKER_BOOK); //connection connect(this, SIGNAL(marginClicked(int,int, Qt::KeyboardModifiers)), this, SLOT(toggleBookmark(int,int, Qt::KeyboardModifiers))); }
/** * Constructor * @param parent :: The parent widget (can be NULL) * @param codelexer :: define the syntax highlighting and code completion. * @param settingsGroup :: Used when saving settings to persistent store */ ScriptEditor::ScriptEditor(QWidget *parent, QsciLexer *codelexer, const QString & settingsGroup) : QsciScintilla(parent), m_filename(""), m_progressArrowKey(markerDefine(QsciScintilla::RightArrow)), m_currentExecLine(0), m_completer(NULL),m_previousKey(0), m_findDialog(new FindReplaceDialog(this)), m_settingsGroup(settingsGroup) { //Syntax highlighting and code completion setLexer(codelexer); readSettings(); setMarginLineNumbers(1,true); //Editor properties setAutoIndent(true); setFocusPolicy(Qt::StrongFocus); emit undoAvailable(isUndoAvailable()); emit redoAvailable(isRedoAvailable()); }
pEditor::pEditor( QWidget* p ) : QsciScintilla( p ) { const QSize mPixSize = QSize( 16, 16 ); // register image for bookmarks markerDefine( QPixmap( ":/editor/bookmark.png" ).scaled( mPixSize ), mdBookmark ); // deal with utf8 setUtf8( true ); // connection connect( this, SIGNAL( linesChanged() ), this, SLOT( linesChanged() ) ); connect( this, SIGNAL( copyAvailable( bool ) ), this, SLOT( setCopyAvailable( bool ) ) ); connect( this, SIGNAL( cursorPositionChanged( int, int ) ), this, SLOT( cursorPositionChanged( int, int ) ) ); connect( this, SIGNAL( textChanged() ), this, SLOT( textChanged() ) ); connect( QApplication::clipboard(), SIGNAL( dataChanged() ), this, SLOT( clipboardDataChanged() ) ); // init pasteAvailable if ( !mPasteAvailableInit ) { mPasteAvailableInit = true; mPasteAvailable = !QApplication::clipboard()->text().isEmpty(); } // init qscishortcutsmanager if needed standardCommands()->clearKeys(); standardCommands()->clearAlternateKeys(); SendScintilla( QsciScintillaBase::SCI_ASSIGNCMDKEY, SCK_TAB, SCI_TAB); SendScintilla( QsciScintillaBase::SCI_ASSIGNCMDKEY, SCK_ESCAPE, SCI_CANCEL); SendScintilla( QsciScintillaBase::SCI_ASSIGNCMDKEY, SCK_RETURN, SCI_NEWLINE); SendScintilla( QsciScintillaBase::SCI_ASSIGNCMDKEY, SCK_DOWN, SCI_LINEDOWN); SendScintilla( QsciScintillaBase::SCI_ASSIGNCMDKEY, SCK_UP, SCI_LINEUP); SendScintilla( QsciScintillaBase::SCI_ASSIGNCMDKEY, SCK_RIGHT, SCI_CHARRIGHT); SendScintilla( QsciScintillaBase::SCI_ASSIGNCMDKEY, SCK_LEFT, SCI_CHARLEFT); SendScintilla( QsciScintillaBase::SCI_ASSIGNCMDKEY, SCK_BACK, SCI_DELETEBACK); SendScintilla( QsciScintillaBase::SCI_ASSIGNCMDKEY, SCK_PRIOR, SCI_PAGEUP); SendScintilla( QsciScintillaBase::SCI_ASSIGNCMDKEY, SCK_NEXT, SCI_PAGEDOWN); SendScintilla( QsciScintillaBase::SCI_ASSIGNCMDKEY, SCK_HOME, SCI_VCHOME); SendScintilla( QsciScintillaBase::SCI_ASSIGNCMDKEY, SCK_END, SCI_LINEEND); // Create shortcuts manager, if not created qSciShortcutsManager::instance(); }
SonicPiScintilla::SonicPiScintilla(SonicPiLexer *lexer, SonicPiTheme *theme) : QsciScintilla() { this->theme = theme; standardCommands()->clearKeys(); standardCommands()->clearAlternateKeys(); QString skey; QSettings settings("sonic-pi.net", "Key bindings"); #if defined(Q_OS_MAC) int SPi_CTRL = Qt::META; int SPi_META = Qt::CTRL; #else int SPi_CTRL = Qt::CTRL; int SPi_META = Qt::ALT; #endif // basic navigation addKeyBinding(settings, QsciCommand::PageDown, Qt::Key_PageDown); addKeyBinding(settings, QsciCommand::PageUp, Qt::Key_PageUp); addKeyBinding(settings, QsciCommand::LineDown, Qt::Key_N | SPi_CTRL); addOtherKeyBinding(settings, QsciCommand::LineDown, Qt::Key_Down); addKeyBinding(settings, QsciCommand::LineDownExtend, Qt::Key_Down | Qt::SHIFT); addKeyBinding(settings, QsciCommand::LineUp, Qt::Key_P | SPi_CTRL); addOtherKeyBinding(settings, QsciCommand::LineUp, Qt::Key_Up); addKeyBinding(settings, QsciCommand::LineUpExtend, Qt::Key_Up | Qt::SHIFT); addKeyBinding(settings, QsciCommand::CharRight, Qt::Key_F | SPi_CTRL); addOtherKeyBinding(settings, QsciCommand::CharRight, Qt::Key_Right); addKeyBinding(settings, QsciCommand::CharRightExtend, Qt::Key_Right | Qt::SHIFT); addKeyBinding(settings, QsciCommand::WordRight, Qt::Key_F | SPi_META); addOtherKeyBinding(settings, QsciCommand::WordRight, Qt::Key_Right | SPi_CTRL); addKeyBinding(settings, QsciCommand::WordRightExtend, Qt::Key_Right | SPi_CTRL | Qt::SHIFT); addKeyBinding(settings, QsciCommand::CharLeft, Qt::Key_B | SPi_CTRL); addOtherKeyBinding(settings, QsciCommand::CharLeft, Qt::Key_Left); addKeyBinding(settings, QsciCommand::CharLeftExtend, Qt::Key_Left | Qt::SHIFT); addKeyBinding(settings, QsciCommand::WordLeft, Qt::Key_B | SPi_META); addOtherKeyBinding(settings, QsciCommand::WordLeft, Qt::Key_Left | SPi_CTRL); addKeyBinding(settings, QsciCommand::WordLeftExtend, Qt::Key_Left | SPi_CTRL | Qt::SHIFT); addKeyBinding(settings, QsciCommand::Delete, Qt::Key_D | SPi_CTRL); addOtherKeyBinding(settings, QsciCommand::Delete, Qt::Key_Delete); addKeyBinding(settings, QsciCommand::DeleteBack, Qt::Key_H | SPi_CTRL); addOtherKeyBinding(settings, QsciCommand::DeleteBack, Qt::Key_Backspace); addKeyBinding(settings, QsciCommand::Home, Qt::Key_A | SPi_CTRL); addKeyBinding(settings, QsciCommand::VCHome, Qt::Key_Home); addKeyBinding(settings, QsciCommand::VCHomeExtend, Qt::Key_Home | Qt::SHIFT); addKeyBinding(settings, QsciCommand::DocumentStart, Qt::Key_Home | SPi_CTRL); addKeyBinding(settings, QsciCommand::DocumentStartExtend, Qt::Key_Home | SPi_CTRL | Qt::SHIFT); addKeyBinding(settings, QsciCommand::LineEnd, Qt::Key_E | SPi_CTRL); addOtherKeyBinding(settings, QsciCommand::LineEnd, Qt::Key_End); addKeyBinding(settings, QsciCommand::LineEndExtend, Qt::Key_End | Qt::SHIFT); addKeyBinding(settings, QsciCommand::DocumentEnd, Qt::Key_End | SPi_CTRL); addKeyBinding(settings, QsciCommand::DocumentEndExtend, Qt::Key_End | SPi_CTRL | Qt::SHIFT); addKeyBinding(settings, QsciCommand::Delete, Qt::Key_D | SPi_CTRL); addKeyBinding(settings, QsciCommand::VerticalCentreCaret, Qt::Key_L | SPi_CTRL); // tab return addKeyBinding(settings, QsciCommand::Newline, Qt::Key_Return); addKeyBinding(settings, QsciCommand::Backtab, Qt::Key_Tab | Qt::SHIFT); // copy paste addKeyBinding(settings, QsciCommand::SelectionCopy, Qt::Key_C | SPi_META); addOtherKeyBinding(settings, QsciCommand::SelectionCopy, Qt::Key_C | SPi_CTRL); addKeyBinding(settings, QsciCommand::SelectionCut, Qt::Key_X | SPi_META); addOtherKeyBinding(settings, QsciCommand::SelectionCut, Qt::Key_X | SPi_CTRL); addKeyBinding(settings, QsciCommand::Paste, Qt::Key_V | SPi_META); addOtherKeyBinding(settings, QsciCommand::Paste, Qt::Key_Y | SPi_CTRL); addKeyBinding(settings, QsciCommand::Undo, Qt::Key_Z | SPi_META); addOtherKeyBinding(settings, QsciCommand::Undo, Qt::Key_Z | SPi_CTRL); addKeyBinding(settings, QsciCommand::Redo, Qt::Key_Z | Qt::SHIFT | SPi_META); addOtherKeyBinding(settings, QsciCommand::Redo, Qt::Key_Z | Qt::SHIFT | SPi_CTRL); addKeyBinding(settings, QsciCommand::SelectAll, Qt::Key_A | SPi_META); // delete word left and right addKeyBinding(settings, QsciCommand::DeleteWordLeft, Qt::Key_Backslash | SPi_META); addKeyBinding(settings, QsciCommand::DeleteWordLeft, Qt::Key_Backspace | SPi_META); addKeyBinding(settings, QsciCommand::DeleteWordRight, Qt::Key_D | SPi_META); standardCommands()->readSettings(settings); this->setMatchedBraceBackgroundColor(theme->color("MatchedBraceBackground")); this->setMatchedBraceForegroundColor(theme->color("MatchedBraceForeground")); setIndentationWidth(2); setIndentationGuides(true); setIndentationGuidesForegroundColor(theme->color("IndentationGuidesForeground")); setBraceMatching( SonicPiScintilla::SloppyBraceMatch); //TODO: add preference toggle for this: //this->setFolding(SonicPiScintilla::CircledTreeFoldStyle, 2); setCaretLineVisible(true); setCaretLineBackgroundColor(theme->color("CaretLineBackground")); setFoldMarginColors(theme->color("FoldMarginForeground"),theme->color("FoldMarginForeground")); setMarginLineNumbers(0, true); setMarginsBackgroundColor(theme->color("MarginBackground")); setMarginsForegroundColor(theme->color("MarginForeground")); setMarginsFont(QFont("Menlo", 15, -1, true)); setUtf8(true); setText("#loading..."); setLexer((QsciLexer *)lexer); markerDefine(RightArrow, 8); setMarkerBackgroundColor("deeppink", 8); setAutoCompletionThreshold(1); setAutoCompletionSource(SonicPiScintilla::AcsAPIs); setAutoCompletionCaseSensitivity(false); setSelectionBackgroundColor(theme->color("SelectionBackground")); setSelectionForegroundColor(theme->color("SelectionForeground")); setCaretWidth(5); setCaretForegroundColor(theme->color("CaretForeground")); setEolMode(EolUnix); SendScintilla(SCI_SETWORDCHARS, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:_?!"); }
void Buffer::setFoldSymbols(Buffer::FoldSymbols foldSymbols) { switch(foldSymbols) { case Arrows: markerDefine(SC_MARKNUM_FOLDEROPEN, SC_MARK_ARROWDOWN); markerDefine(SC_MARKNUM_FOLDER, SC_MARK_ARROW); markerDefine(SC_MARKNUM_FOLDEROPENMID, SC_MARK_ARROWDOWN); markerDefine(SC_MARKNUM_FOLDEREND, SC_MARK_ARROW); break; case PlusMinus: markerDefine(SC_MARKNUM_FOLDEROPEN, SC_MARK_MINUS); markerDefine(SC_MARKNUM_FOLDER, SC_MARK_PLUS); markerDefine(SC_MARKNUM_FOLDEROPENMID, SC_MARK_MINUS); markerDefine(SC_MARKNUM_FOLDEREND, SC_MARK_PLUS); break; case CirclePlusMinus: markerDefine(SC_MARKNUM_FOLDEROPEN, SC_MARK_CIRCLEMINUS); markerDefine(SC_MARKNUM_FOLDER, SC_MARK_CIRCLEPLUS); markerDefine(SC_MARKNUM_FOLDEROPENMID, SC_MARK_CIRCLEMINUSCONNECTED); markerDefine(SC_MARKNUM_FOLDEREND, SC_MARK_CIRCLEPLUSCONNECTED); break; case BoxPlusMinus: markerDefine(SC_MARKNUM_FOLDEROPEN, SC_MARK_BOXMINUS); markerDefine(SC_MARKNUM_FOLDER, SC_MARK_BOXPLUS); markerDefine(SC_MARKNUM_FOLDEROPENMID, SC_MARK_BOXMINUSCONNECTED); markerDefine(SC_MARKNUM_FOLDEREND, SC_MARK_BOXPLUSCONNECTED); break; } }
void Editor::setEditorStyle (void) { //QFont font ("Consolas", 14, QFont::Normal, false); QFont font (config.editorFontName, config.editorFontSize, QFont::Normal, false); lblCursorPosition->setFont(font); QFontMetrics fontMetrics(font); //QColor backColor = QColor(22, 30, 32); TextStyle style; config.GetThemeStyle(config.themeName, "DEFAULT", style); QColor backColor = style.backColor;//QColor(config.editorColorName); setColor(backColor); QString css = "color:" + style.foreColor.name() + ";"; css += "background-color:" + style.backColor.name() + ";"; css += "border: 1px solid " + style.foreColor.name() + ";"; lblCursorPosition->setStyleSheet(css); // margin setMarginLineNumbers(100, true); setMarginsFont(font); config.GetThemeStyle(config.themeName, "MARGIN", style); setMarginsBackgroundColor(style.backColor);//QColor(24,32,34));//QColor(20,28,30)); setMarginsForegroundColor(style.foreColor); //QColor(42,50,52)); setMarginWidth(0, fontMetrics.width("00000") + 6); // General editor things setTabWidth(4); ensureCursorVisible(); setIndicatorForegroundColor (Qt::red, 1); // compile error/warning mark markerDefine(QsciScintilla::RightArrow, 1); setMarkerBackgroundColor(Qt::red, 1); markerDefine(QsciScintilla::Circle, 0); setMarkerBackgroundColor(Qt::red, 0); setMarkerForegroundColor(Qt::white, 0); // caret setCaretLineVisible(true); setCaretWidth(2); config.GetThemeStyle(config.themeName, "CARET", style); setCaretForegroundColor(style.foreColor);//QColor(220, 200, 200)); caretLineBackColor = style.backColor; setCaretLineBackgroundColor(caretLineBackColor);//QColor(24, 32, 34)); //setCaretLineBackgroundColor(QColor(255, 0, 0, 100)); //SendScintilla (SC_TECHNOLOGY_DIRECTWRITE, 1); //SendScintilla (SCI_SETBUFFEREDDRAW, 1); //SendScintilla (SCI_SETTWOPHASEDRAW, 1); //SendScintilla (SCI_SETFONTQUALITY, SC_EFF_QUALITY_NON_ANTIALIASED);//SC_EFF_QUALITY_DEFAULT); // matched and unmatched braces coloring if (config.highlightBraces) { setBraceMatching(QsciScintilla::SloppyBraceMatch); } else { setBraceMatching(QsciScintilla::NoBraceMatch); } setMatchedBraceBackgroundColor(backColor); setMatchedBraceForegroundColor(QColor(220, 220, 50)); setUnmatchedBraceBackgroundColor(QColor(0,0,0)); setUnmatchedBraceForegroundColor(QColor(255, 0, 0)); // selection config.GetThemeStyle(config.themeName, "SELECTION", style); setSelectionForegroundColor(style.foreColor);//QColor(150, 150, 150)); setSelectionBackgroundColor(style.backColor);//QColor(52, 60, 62)); // maim cpp styles setLexerStyle(-1, "DEFAULT");//QColor (120, 120, 120),backColor); //setLexerStyle(-1, Qt::red, Qt::blue); //setLexerStyle(QsciLexerCPP::Default, Qt::blue, Qt::yellow); setLexerStyle(QsciLexerCPP::Default, "DEFAULT"); //setLexerStyle(QsciLexerCPP::callSTYLE_CALLTIP, QColor (255,0,0), QColor(255,255,255)); setLexerStyle(QsciLexerCPP::Comment, "COMMENT"); setLexerStyle(QsciLexerCPP::CommentDoc, "COMMENT DOC"); setLexerStyle(QsciLexerCPP::CommentLine, "COMMENT LIN E DOC"); setLexerStyle(QsciLexerCPP::Number, "NUMBER"); setLexerStyle(QsciLexerCPP::Keyword, "KEYWORD"); setLexerStyle(QsciLexerCPP::DoubleQuotedString, "DOUBLE QUOTED STRING"); setLexerStyle(QsciLexerCPP::SingleQuotedString, "SINGLE QUOTED STRING"); setLexerStyle(QsciLexerCPP::PreProcessor, "PREPROCESSOR"); setLexerStyle(QsciLexerCPP::Operator, "OPERATOR"); setLexerStyle(QsciLexerCPP::Identifier, "IDENTIFIER"); setLexerStyle(QsciLexerCPP::UnclosedString, "UNCLOSED STRING"); // secondary styles setLexerStyle(QsciLexerCPP::UUID, "UUID"); setLexerStyle(QsciLexerCPP::VerbatimString, "VERBATIM STRING"); setLexerStyle(QsciLexerCPP::Regex, "REGEX"); setLexerStyle(QsciLexerCPP::CommentLineDoc, "COMMENT LINE DOC"); setLexerStyle(QsciLexerCPP::KeywordSet2, "KEYWORD SET 2"); setLexerStyle(QsciLexerCPP::CommentDocKeyword, "COMMENT DOC KEYWORD"); setLexerStyle(QsciLexerCPP::CommentDocKeywordError, "COMMENT DOC KEYWORD ERROR"); setLexerStyle(QsciLexerCPP::GlobalClass, "GLOBAL CLASS"); setLexerStyle(QsciLexerCPP::RawString, "DOUBLE QUOTED STRING"); setLexerStyle(QsciLexerCPP::TripleQuotedVerbatimString, "VERBATIM STRING"); setLexerStyle(QsciLexerCPP::HashQuotedString, "VERBATIM STRING"); setLexerStyle(QsciLexerCPP::PreProcessorComment, "PREPROCESSOR"); setLexerStyle(QsciLexerCPP::PreProcessorCommentLineDoc, "PREPROCESSOR"); }