- enhancement: More elements in the demo of editor color theme optiont page.
This commit is contained in:
parent
47eb9ebecf
commit
66b0d34ff8
1
NEWS.md
1
NEWS.md
|
@ -11,6 +11,7 @@ Red Panda C++ Version 3.1
|
||||||
- enhancement: Handle time/memory limits in problems info from competitive-companion in background thread.
|
- enhancement: Handle time/memory limits in problems info from competitive-companion in background thread.
|
||||||
- enhancement: When problems info from competitive-companion received, show tips in the status bar.
|
- enhancement: When problems info from competitive-companion received, show tips in the status bar.
|
||||||
- fix: Layout for function tips.
|
- fix: Layout for function tips.
|
||||||
|
- enhancement: More elements in the demo of editor color theme optiont page.
|
||||||
|
|
||||||
Red Panda C++ Version 3.0
|
Red Panda C++ Version 3.0
|
||||||
|
|
||||||
|
|
|
@ -66,12 +66,15 @@ EditorColorSchemeWidget::EditorColorSchemeWidget(const QString& name, const QStr
|
||||||
this, &EditorColorSchemeWidget::onItemSelectionChanged);
|
this, &EditorColorSchemeWidget::onItemSelectionChanged);
|
||||||
connect(this, &SettingsWidget::settingsChanged,this,
|
connect(this, &SettingsWidget::settingsChanged,this,
|
||||||
&EditorColorSchemeWidget::onSettingChanged);
|
&EditorColorSchemeWidget::onSettingChanged);
|
||||||
|
ui->editDemo->setUseCodeFolding(true);
|
||||||
|
qDebug()<<"1----";
|
||||||
ui->editDemo->document()->setText(
|
ui->editDemo->document()->setText(
|
||||||
"#include <iostream>\n"
|
"#include <iostream>\n"
|
||||||
"#include <conio.h>\n"
|
"#include <conio.h>\n"
|
||||||
"\n"
|
"\n"
|
||||||
"int x=10;\n"
|
"int1 x=10;\n"
|
||||||
"\n"
|
"int yyy=10;\n"
|
||||||
|
"//Demo text\n"
|
||||||
"int main(int argc, char **argv)\n"
|
"int main(int argc, char **argv)\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
" int numbers[20];\n"
|
" int numbers[20];\n"
|
||||||
|
@ -87,7 +90,14 @@ EditorColorSchemeWidget::EditorColorSchemeWidget(const QString& name, const QStr
|
||||||
"}\n"
|
"}\n"
|
||||||
);
|
);
|
||||||
ui->editDemo->setReadOnly(true);
|
ui->editDemo->setReadOnly(true);
|
||||||
ui->editDemo->setStatementColors(mStatementColors);
|
ui->editDemo->toggleBreakpoint(9);
|
||||||
|
ui->editDemo->toggleBookmark(10);
|
||||||
|
ui->editDemo->addSyntaxIssues(4, 1, 5, CompileIssueType::Error, "Wrong type");
|
||||||
|
ui->editDemo->addSyntaxIssues(5, 5, 8, CompileIssueType::Warning, "Variable y defined but not used.");
|
||||||
|
ui->editDemo->setCaretY(10);
|
||||||
|
ui->editDemo->setActiveBreakpointFocus(11,false);
|
||||||
|
ui->editDemo->reparseDocument();
|
||||||
|
ui->editDemo->invalidate();
|
||||||
onItemSelectionChanged();
|
onItemSelectionChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -251,6 +261,7 @@ void EditorColorSchemeWidget::onSettingChanged()
|
||||||
{
|
{
|
||||||
pColorManager->updateStatementColors(mStatementColors,ui->cbScheme->currentText());
|
pColorManager->updateStatementColors(mStatementColors,ui->cbScheme->currentText());
|
||||||
ui->editDemo->applyColorScheme(ui->cbScheme->currentText());
|
ui->editDemo->applyColorScheme(ui->cbScheme->currentText());
|
||||||
|
ui->editDemo->setStatementColors(mStatementColors);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditorColorSchemeWidget::onForegroundChanged()
|
void EditorColorSchemeWidget::onForegroundChanged()
|
||||||
|
|
Loading…
Reference in New Issue