- enhancement: code completion ui redesigned
1
NEWS.md
|
@ -4,6 +4,7 @@ Red Panda C++ Version 0.14.0
|
|||
- enhancement: new class ( to project) wizard
|
||||
- enhancement: greatly speed up code completion
|
||||
- fix: code folding calcuation not correct when some codes are folded and editing after them
|
||||
- enhancement: code completion ui redesigned
|
||||
|
||||
Red Panda C++ Version 0.13.4
|
||||
- fix: when copy comments, don't auto indent
|
||||
|
|
|
@ -719,7 +719,7 @@ void Editor::keyPressEvent(QKeyEvent *event)
|
|||
mFilename,
|
||||
lastWord,
|
||||
caretY());
|
||||
StatementKind kind = mParser->getKindOfStatement(statement);
|
||||
StatementKind kind = getKindOfStatement(statement);
|
||||
if (kind == StatementKind::skClass
|
||||
|| kind == StatementKind::skEnumClassType
|
||||
|| kind == StatementKind::skEnumType
|
||||
|
@ -889,7 +889,7 @@ void Editor::onPreparePaintHighlightToken(int line, int aChar, const QString &to
|
|||
// qDebug()<<s;
|
||||
PStatement statement = mParser->findStatementOf(mFilename,
|
||||
s , p.Line);
|
||||
StatementKind kind = mParser->getKindOfStatement(statement);
|
||||
StatementKind kind = getKindOfStatement(statement);
|
||||
if (kind == StatementKind::skUnknown) {
|
||||
if ((pEndPos.Line>=1)
|
||||
&& (pEndPos.Char>=0)
|
||||
|
@ -1155,7 +1155,7 @@ void Editor::inputMethodEvent(QInputMethodEvent *event)
|
|||
mFilename,
|
||||
lastWord,
|
||||
caretY());
|
||||
StatementKind kind = mParser->getKindOfStatement(statement);
|
||||
StatementKind kind = getKindOfStatement(statement);
|
||||
if (kind == StatementKind::skClass
|
||||
|| kind == StatementKind::skEnumClassType
|
||||
|| kind == StatementKind::skEnumType
|
||||
|
@ -3504,7 +3504,7 @@ void Editor::onExportedFormatToken(PSynHighlighter syntaxHighlighter, int Line,
|
|||
// qDebug()<<s;
|
||||
PStatement statement = mParser->findStatementOf(mFilename,
|
||||
s , p.Line);
|
||||
StatementKind kind = mParser->getKindOfStatement(statement);
|
||||
StatementKind kind = getKindOfStatement(statement);
|
||||
if (kind == StatementKind::skUnknown) {
|
||||
if ((pEndPos.Line>=1)
|
||||
&& (pEndPos.Char>=0)
|
||||
|
|
|
@ -215,5 +215,7 @@
|
|||
<file>resources/iconsets/newlook/actions/08Problem-06Correct.svg</file>
|
||||
<file>resources/iconsets/newlook/actions/08Problem-07Wrong.svg</file>
|
||||
<file>resources/iconsets/newlook/actions/08Problem-08Running.svg</file>
|
||||
<file>resources/iconsets/newlook/classparser/code_snippet.svg</file>
|
||||
<file>resources/iconsets/newlook/classparser/keyword.svg</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
|
@ -67,6 +67,8 @@ void IconsManager::updateParserIcons(const QString &iconSet, int size)
|
|||
mIconPixmaps.insert(PARSER_PROTECTED_VAR, createSVGIcon(iconFolder+"var_protected.svg",size,size));
|
||||
mIconPixmaps.insert(PARSER_PUBLIC_VAR, createSVGIcon(iconFolder+"var_public.svg",size,size));
|
||||
mIconPixmaps.insert(PARSER_PRIVATE_VAR, createSVGIcon(iconFolder+"var_private.svg",size,size));
|
||||
mIconPixmaps.insert(PARSER_KEYWORD, createSVGIcon(iconFolder+"keyword.svg",size,size));
|
||||
mIconPixmaps.insert(PARSER_CODE_SNIPPET, createSVGIcon(iconFolder+"code_snippet.svg",size,size));
|
||||
|
||||
}
|
||||
|
||||
|
@ -221,3 +223,74 @@ void IconsManager::prepareCustomIconSet(const QString &customIconSet)
|
|||
return;
|
||||
copyFolder(":/resources/iconsets",customIconSet);
|
||||
}
|
||||
|
||||
QPixmap IconsManager::getPixmapForStatement(PStatement statement)
|
||||
{
|
||||
if (!statement)
|
||||
return QPixmap();
|
||||
StatementKind kind = getKindOfStatement(statement);
|
||||
switch (kind) {
|
||||
case StatementKind::skTypedef:
|
||||
return *(pIconsManager->getPixmap(IconsManager::PARSER_TYPE));
|
||||
case StatementKind::skClass:
|
||||
return *(pIconsManager->getPixmap(IconsManager::PARSER_CLASS));
|
||||
case StatementKind::skNamespace:
|
||||
case StatementKind::skNamespaceAlias:
|
||||
return *(pIconsManager->getPixmap(IconsManager::PARSER_NAMESPACE));
|
||||
case StatementKind::skPreprocessor:
|
||||
return *(pIconsManager->getPixmap(IconsManager::PARSER_DEFINE));
|
||||
case StatementKind::skEnumClassType:
|
||||
case StatementKind::skEnumType:
|
||||
case StatementKind::skEnum:
|
||||
return *(pIconsManager->getPixmap(IconsManager::PARSER_ENUM));
|
||||
case StatementKind::skFunction:
|
||||
case StatementKind::skConstructor:
|
||||
case StatementKind::skDestructor:
|
||||
if (statement->scope == StatementScope::ssGlobal)
|
||||
return *(pIconsManager->getPixmap(IconsManager::PARSER_GLOBAL_METHOD));
|
||||
if (statement->isInherited) {
|
||||
if (statement->classScope == StatementClassScope::scsProtected) {
|
||||
return *(pIconsManager->getPixmap(IconsManager::PARSER_INHERITED_PROTECTED_METHOD));
|
||||
} else if (statement->classScope == StatementClassScope::scsPublic) {
|
||||
return *(pIconsManager->getPixmap(IconsManager::PARSER_INHERITED_METHOD));
|
||||
}
|
||||
} else {
|
||||
if (statement->classScope == StatementClassScope::scsProtected) {
|
||||
return *(pIconsManager->getPixmap(IconsManager::PARSER_PROTECTED_METHOD));
|
||||
} else if (statement->classScope == StatementClassScope::scsPublic) {
|
||||
return *(pIconsManager->getPixmap(IconsManager::PARSER_PUBLIC_METHOD));
|
||||
} else {
|
||||
return *(pIconsManager->getPixmap(IconsManager::PARSER_PRIVATE_METHOD));
|
||||
}
|
||||
}
|
||||
break;
|
||||
case StatementKind::skGlobalVariable:
|
||||
return *(pIconsManager->getPixmap(IconsManager::PARSER_GLOBAL_VAR));
|
||||
case StatementKind::skVariable:
|
||||
// if (statement->scope == StatementScope::ssGlobal)
|
||||
// return QIcon(":/icons/images/classparser/global.ico");
|
||||
if (statement->isInherited) {
|
||||
if (statement->classScope == StatementClassScope::scsProtected) {
|
||||
return *(pIconsManager->getPixmap(IconsManager::PARSER_INHERITED_PROTECTD_VAR));
|
||||
} else if (statement->classScope == StatementClassScope::scsPublic) {
|
||||
return *(pIconsManager->getPixmap(IconsManager::PARSER_INHERITED_VAR));
|
||||
}
|
||||
} else {
|
||||
if (statement->classScope == StatementClassScope::scsProtected) {
|
||||
return *(pIconsManager->getPixmap(IconsManager::PARSER_PROTECTED_VAR));
|
||||
} else if (statement->classScope == StatementClassScope::scsPublic) {
|
||||
return *(pIconsManager->getPixmap(IconsManager::PARSER_PUBLIC_VAR));
|
||||
} else {
|
||||
return *(pIconsManager->getPixmap(IconsManager::PARSER_PRIVATE_VAR));
|
||||
}
|
||||
}
|
||||
break;
|
||||
case StatementKind::skKeyword:
|
||||
return *(pIconsManager->getPixmap(IconsManager::PARSER_KEYWORD));
|
||||
case StatementKind::skUserCodeSnippet:
|
||||
return *(pIconsManager->getPixmap(IconsManager::PARSER_CODE_SNIPPET));
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return QPixmap();
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include <QObject>
|
||||
#include <QPixmap>
|
||||
#include <memory>
|
||||
#include "parser/parserutils.h"
|
||||
|
||||
class QToolButton;
|
||||
class QPushButton;
|
||||
|
@ -53,6 +54,8 @@ public:
|
|||
PARSER_PROTECTED_VAR,
|
||||
PARSER_PUBLIC_VAR,
|
||||
PARSER_PRIVATE_VAR,
|
||||
PARSER_KEYWORD,
|
||||
PARSER_CODE_SNIPPET,
|
||||
|
||||
ACTION_MISC_BACK,
|
||||
ACTION_MISC_FORWARD,
|
||||
|
@ -165,6 +168,8 @@ public:
|
|||
|
||||
void prepareCustomIconSet(const QString &customIconSet);
|
||||
|
||||
QPixmap getPixmapForStatement(PStatement statement);
|
||||
|
||||
signals:
|
||||
void actionIconsUpdated();
|
||||
private:
|
||||
|
|
|
@ -4523,19 +4523,6 @@ void MainWindow::onEvalValueReady(const QString& value)
|
|||
this, &MainWindow::onEvalValueReady);
|
||||
}
|
||||
|
||||
void MainWindow::onMemoryExamineReady(const QStringList& value)
|
||||
{
|
||||
// ui->txtMemoryView->clear();
|
||||
// foreach (QString s, value) {
|
||||
// s.replace("\t"," ");
|
||||
// ui->txtMemoryView->appendPlainText(s);
|
||||
// }
|
||||
// ui->txtMemoryView->moveCursor(QTextCursor::Start);
|
||||
|
||||
// disconnect(mDebugger, &Debugger::memoryExamineReady,
|
||||
// this, &MainWindow::onMemoryExamineReady);
|
||||
}
|
||||
|
||||
void MainWindow::onLocalsReady(const QStringList& value)
|
||||
{
|
||||
ui->txtLocals->clear();
|
||||
|
@ -6157,7 +6144,6 @@ void MainWindow::on_actionNew_Class_triggered()
|
|||
NewClassDialog dialog;
|
||||
dialog.setPath(mProject->folder());
|
||||
if (dialog.exec()==QDialog::Accepted) {
|
||||
qDebug()<<"Let's create class";
|
||||
QDir dir(dialog.path());
|
||||
if (dialog.className().isEmpty()
|
||||
|| dialog.sourceName().isEmpty()
|
||||
|
@ -6186,7 +6172,7 @@ void MainWindow::on_actionNew_Class_triggered()
|
|||
QString headerFilename = includeTrailingPathDelimiter(dialog.path())+dialog.headerName();
|
||||
stringsToFile(header, headerFilename);
|
||||
QStringList source;
|
||||
source.append(QString("#include \"%1\";").arg(dialog.headerName()));
|
||||
source.append(QString("#include \"%1\"").arg(dialog.headerName()));
|
||||
source.append("");
|
||||
source.append("");
|
||||
QString sourceFilename = includeTrailingPathDelimiter(dialog.path())+dialog.sourceName();
|
||||
|
|
|
@ -203,7 +203,6 @@ public slots:
|
|||
void onStartParsing();
|
||||
void onEndParsing(int total, int updateView);
|
||||
void onEvalValueReady(const QString& value);
|
||||
void onMemoryExamineReady(const QStringList& value);
|
||||
void onLocalsReady(const QStringList& value);
|
||||
void onEditorContextMenu(const QPoint& pos);
|
||||
void onEditorRightTabContextMenu(const QPoint& pos);
|
||||
|
|
|
@ -673,22 +673,6 @@ QString CppParser::getHeaderFileName(const QString &relativeTo, const QString &l
|
|||
mPreprocessor.projectIncludePathList());
|
||||
}
|
||||
|
||||
StatementKind CppParser::getKindOfStatement(const PStatement& statement)
|
||||
{
|
||||
if (!statement)
|
||||
return StatementKind::skUnknown;
|
||||
if (statement->kind == StatementKind::skVariable) {
|
||||
if (!statement->parentScope.lock()) {
|
||||
return StatementKind::skGlobalVariable;
|
||||
} else if (statement->scope == StatementScope::ssLocal) {
|
||||
return StatementKind::skLocalVariable;
|
||||
} else {
|
||||
return StatementKind::skVariable;
|
||||
}
|
||||
}
|
||||
return statement->kind;
|
||||
}
|
||||
|
||||
void CppParser::invalidateFile(const QString &fileName)
|
||||
{
|
||||
{
|
||||
|
|
|
@ -97,7 +97,7 @@ public:
|
|||
QSet<QString> getFileUsings(const QString& filename);
|
||||
|
||||
QString getHeaderFileName(const QString& relativeTo, const QString& line);// both
|
||||
StatementKind getKindOfStatement(const PStatement& statement);
|
||||
|
||||
void invalidateFile(const QString& fileName);
|
||||
bool isIncludeLine(const QString &line);
|
||||
bool isProjectHeaderFile(const QString& fileName);
|
||||
|
|
|
@ -597,3 +597,20 @@ bool isMemberOperator(QString token)
|
|||
{
|
||||
return MemberOperators.contains(token);
|
||||
}
|
||||
|
||||
|
||||
StatementKind getKindOfStatement(const PStatement& statement)
|
||||
{
|
||||
if (!statement)
|
||||
return StatementKind::skUnknown;
|
||||
if (statement->kind == StatementKind::skVariable) {
|
||||
if (!statement->parentScope.lock()) {
|
||||
return StatementKind::skGlobalVariable;
|
||||
} else if (statement->scope == StatementScope::ssLocal) {
|
||||
return StatementKind::skLocalVariable;
|
||||
} else {
|
||||
return StatementKind::skVariable;
|
||||
}
|
||||
}
|
||||
return statement->kind;
|
||||
}
|
||||
|
|
|
@ -243,7 +243,6 @@ struct FileIncludes {
|
|||
QSet<QString> dependedFiles; // the files depends on me
|
||||
};
|
||||
using PFileIncludes = std::shared_ptr<FileIncludes>;
|
||||
using ColorCallback = std::function<QColor (PStatement)>;
|
||||
|
||||
extern QStringList CppDirectives;
|
||||
extern QStringList JavadocTags;
|
||||
|
@ -274,5 +273,6 @@ QStringList getOwnerExpressionAndMember(
|
|||
QString& memberOperator,
|
||||
QStringList& memberExpression);
|
||||
bool isMemberOperator(QString token);
|
||||
StatementKind getKindOfStatement(const PStatement& statement);
|
||||
|
||||
#endif // PARSER_UTILS_H
|
||||
|
|
|
@ -49,16 +49,14 @@
|
|||
y="0.091440894"
|
||||
rx="7.9375"
|
||||
ry="7.9375" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:28.2222px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
|
||||
x="2.0044124"
|
||||
y="23.212391"
|
||||
id="text3748"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan3746"
|
||||
style="font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:28.2222px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Italic';stroke-width:0.264583"
|
||||
x="2.0044124"
|
||||
y="23.212391">C</tspan></text>
|
||||
<g
|
||||
aria-label="C"
|
||||
id="text3748"
|
||||
style="font-size:28.2222px;line-height:1.25;stroke-width:0.264583">
|
||||
<path
|
||||
id="path843"
|
||||
style="font-style:italic;-inkscape-font-specification:'sans-serif Italic'"
|
||||
d="M 15.496094,1.8085938 C 11.370996,1.9327556 7.3577132,4.2467687 5.3392436,7.873358 c -1.6993874,2.966607 -2.3618088,6.532679 -1.8632397,9.912326 0.3887975,2.663505 2.3830253,4.960476 4.9471105,5.760622 3.3771256,1.097213 7.0984606,0.529193 10.2839106,-0.912552 0.422546,-0.256803 1.123247,-0.322262 1.303468,-0.780928 0.263522,-1.289464 0.524521,-2.579447 0.790288,-3.868451 -0.610727,-0.04477 -1.206043,-0.04115 -1.636155,0.461024 -2.534818,1.877969 -5.952437,2.995811 -9.044838,1.949746 C 8.1413438,19.686936 7.254914,17.465259 7.2927011,15.498365 7.2331434,11.990361 8.53091,8.1330692 11.638395,6.2081688 14.77041,4.2466644 19.232527,4.9514065 21.707288,7.6645539 22.111629,7.8196586 22.860609,7.8889181 22.746234,7.2183601 22.971102,6.0934213 23.199239,4.9691325 23.421875,3.84375 21.031066,2.432932 18.284264,1.6393827 15.496094,1.8085938 Z" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.6 KiB |
|
@ -0,0 +1,57 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="100"
|
||||
height="100"
|
||||
viewBox="0 0 26.458333 26.458333"
|
||||
version="1.1"
|
||||
id="svg5"
|
||||
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
|
||||
sodipodi:docname="code_snippet.svg"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<sodipodi:namedview
|
||||
id="namedview7"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:document-units="px"
|
||||
showgrid="false"
|
||||
inkscape:zoom="5.786981"
|
||||
inkscape:cx="87.092043"
|
||||
inkscape:cy="42.077207"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1001"
|
||||
inkscape:window-x="-9"
|
||||
inkscape:window-y="-9"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="layer1"
|
||||
units="px"
|
||||
width="100px" />
|
||||
<defs
|
||||
id="defs2" />
|
||||
<g
|
||||
inkscape:label="图层 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<rect
|
||||
style="fill:#ca83ed;fill-opacity:1;stroke:none;stroke-width:0.864658;stroke-miterlimit:4;stroke-dasharray:none"
|
||||
id="rect1440"
|
||||
width="26.508604"
|
||||
height="26.308193"
|
||||
x="0.084942333"
|
||||
y="0.091440894"
|
||||
rx="7.9375"
|
||||
ry="7.9375" />
|
||||
<path
|
||||
id="text8201"
|
||||
style="font-style:normal;font-weight:normal;font-size:21.1667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.31498"
|
||||
d="m 13.111245,2.2825509 c -2.348539,0.059182 -4.8139327,1.5297087 -5.58758,4.1690206 -0.7874942,2.4176596 -0.089418,5.4448725 1.9301187,6.7919205 1.6812573,1.213408 3.6757193,1.770353 5.3104153,3.055298 0.817467,0.920718 -0.134568,2.33044 -1.10511,2.388107 -1.211783,0.193114 -2.7393,0.347884 -3.652864,-0.746565 -0.3734612,-0.796934 -0.3001395,-1.730649 -0.3974085,-2.599727 -1.4820236,0.08489 -2.9639453,0.172262 -4.4457259,0.262449 -0.161521,2.41425 0.4628584,5.16698 2.4128326,6.477032 2.3281245,1.590867 5.2844218,1.711381 7.8542608,0.891336 2.648333,-0.890016 4.68128,-3.991174 4.230272,-7.169014 -0.164321,-1.999092 -1.524944,-3.54211 -3.081552,-4.320636 -1.518157,-0.978687 -3.300048,-1.457822 -4.657699,-2.7296165 -0.566721,-0.8318283 0.170751,-1.9518783 1.013171,-1.9460808 1.227088,-0.2416656 2.985473,-0.060884 3.301541,1.6143063 0.09121,0.7217464 0.08177,1.4863059 0.926477,1.1423614 1.249508,-0.063853 2.49901,-0.1278769 3.748524,-0.1916042 C 20.863976,7.1498104 20.067068,4.8668143 18.382356,3.6096493 16.847218,2.4279955 14.923143,2.1761966 13.111245,2.2825509 Z" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.8 KiB |
|
@ -41,7 +41,7 @@
|
|||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<rect
|
||||
style="fill:#a0a0a0;fill-opacity:0.50196081;stroke:none;stroke-width:0.864658;stroke-miterlimit:4;stroke-dasharray:none"
|
||||
style="fill:#a0a0a0;fill-opacity:0.501961;stroke:none;stroke-width:0.864658;stroke-miterlimit:4;stroke-dasharray:none"
|
||||
id="rect1440"
|
||||
width="26.508671"
|
||||
height="26.308193"
|
||||
|
@ -49,16 +49,9 @@
|
|||
y="0.091440894"
|
||||
rx="7.9375"
|
||||
ry="7.9375" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
<path
|
||||
id="text3748"
|
||||
style="font-style:normal;font-weight:normal;font-size:28.2222px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
|
||||
x="2.0690711"
|
||||
y="24.182268"
|
||||
id="text3748"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan3746"
|
||||
style="font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:28.2222px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Italic';stroke-width:0.264583"
|
||||
x="2.0690711"
|
||||
y="24.182268">#</tspan></text>
|
||||
d="M 12.960938,2.6503906 C 12.202474,4.5065104 11.44401,6.3626302 10.685547,8.21875 c -1.3385418,0 -2.6770835,0 -4.0156251,0 C 6.3008921,9.1461369 5.9300936,10.072819 5.5605469,11 c 1.3359375,0 2.671875,0 4.0078125,0 -0.4453125,1.103516 -0.890625,2.207031 -1.3359375,3.310547 -1.2682292,0 -2.5364584,0 -3.8046875,0 -0.3736649,0.916801 -0.7456678,1.83428 -1.1171875,2.751953 1.2565104,0 2.5130208,0 3.7695312,0 -0.8039706,1.943387 -1.6086067,3.886498 -2.4121093,5.830078 1.047526,0 2.095052,0 3.1425781,0 0.8037085,-1.943495 1.6081255,-3.886697 2.4121091,-5.830078 0.840495,0 1.68099,0 2.521485,0 -0.803971,1.943387 -1.608607,3.886498 -2.41211,5.830078 1.047526,0 2.095052,0 3.142578,0 0.803709,-1.943495 1.608126,-3.886697 2.41211,-5.830078 1.337239,0 2.674479,0 4.011719,0 0.374278,-0.917081 0.747013,-1.834791 1.121093,-2.751953 -1.328776,0 -2.657552,0 -3.986328,0 0.445313,-1.103516 0.890625,-2.207031 1.335938,-3.310547 1.259114,0 2.518229,0 3.777343,0 0.374233,-0.925819 0.743897,-1.8534861 1.113282,-2.78125 -1.256511,0 -2.513021,0 -3.769532,0 0.80406,-1.9661364 1.607876,-3.9323724 2.41211,-5.8984375 -1.047526,0 -2.095052,0 -3.142578,0 -0.805081,1.9657179 -1.607906,3.9323603 -2.41211,5.8984375 -0.840495,0 -1.680989,0 -2.521484,0 0.803216,-1.9662148 1.608213,-3.9317031 2.410156,-5.8984375 -1.046875,0 -2.09375,0 -3.140625,0 -0.04492,0.110026 -0.08984,0.2200521 -0.134765,0.3300781 z M 15.230469,11 c -0.445964,1.103516 -0.891927,2.207031 -1.337891,3.310547 -0.841146,0 -1.682292,0 -2.523437,0 0.445312,-1.103516 0.890625,-2.207031 1.335937,-3.310547 0.841797,0 1.683594,0 2.525391,0 z" />
|
||||
</g>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 3.3 KiB |
|
@ -49,16 +49,9 @@
|
|||
y="0.091440894"
|
||||
rx="7.9375"
|
||||
ry="7.9375" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
<path
|
||||
id="text3748"
|
||||
style="font-style:normal;font-weight:normal;font-size:28.2222px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
|
||||
x="3.2975819"
|
||||
y="23.341707"
|
||||
id="text3748"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan3746"
|
||||
style="font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:28.2222px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Italic';stroke-width:0.264583"
|
||||
x="3.2975819"
|
||||
y="23.341707">E</tspan></text>
|
||||
d="m 8.4863281,2.703125 c -1.624712,7.0560557 -3.2517528,14.111577 -4.875,21.167969 4.8684896,0 9.7369789,0 14.6054689,0 0.258897,-1.129255 0.519814,-2.258049 0.78125,-3.386719 -3.597005,0 -7.194011,0 -10.7910158,0 0.515625,-2.233724 1.0312501,-4.467448 1.546875,-6.701172 3.5963538,0 7.1927088,0 10.7890628,0 0.26199,-1.124134 0.522155,-2.248693 0.783203,-3.373047 -3.597005,0 -7.194011,0 -10.791016,0 0.360026,-1.5761716 0.720052,-3.1523435 1.080078,-4.7285154 3.597006,0 7.194011,0 10.791016,0 0.258271,-1.1299003 0.521322,-2.2587032 0.779297,-3.3886718 -4.86849,-1e-7 -9.736979,0 -14.6054689,0 -0.03125,0.1367187 -0.0625,0.2734375 -0.09375,0.4101562 z" />
|
||||
</g>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.3 KiB |
|
@ -49,16 +49,9 @@
|
|||
y="0.091440894"
|
||||
rx="7.9375"
|
||||
ry="7.9375" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
<path
|
||||
id="text3748"
|
||||
style="font-style:normal;font-weight:normal;font-size:28.2222px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
|
||||
x="4.9140434"
|
||||
y="18.880272"
|
||||
id="text3748"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan3746"
|
||||
style="font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:28.2222px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Italic';stroke-width:0.264583"
|
||||
x="4.9140434"
|
||||
y="18.880272">g</tspan></text>
|
||||
d="M 14.296875,2.5449219 C 10.732631,2.7239109 7.7660282,5.4762747 6.5053704,8.6908442 5.5875761,11.008267 5.1781714,13.696085 6.0286248,16.092865 c 0.6875308,1.983558 2.7865566,3.163288 4.8307502,3.082916 1.554216,0.05609 3.085116,-0.393347 4.378906,-1.251953 -0.304034,1.64959 -1.26337,3.391412 -3.026265,3.781885 -2.104258,0.554705 -4.2991507,-0.06421 -6.2784222,-0.764307 -0.7654336,-0.25804 -0.638632,0.603056 -0.8094435,1.0923 -0.1832806,0.796714 -0.3674188,1.593231 -0.5499315,2.390122 3.0348933,0.893478 6.4290032,1.259109 9.4316402,0.05664 2.718409,-1.102252 4.24908,-3.897599 4.91718,-6.617567 1.17663,-4.95956 2.277452,-9.9376205 3.42657,-14.9039176 -1.141276,0 -2.282552,0 -3.423828,0 -0.105439,0.7457116 -0.658757,0.1787499 -1.103515,0.07422 C 16.697359,2.6229203 15.488741,2.4906113 14.296875,2.5449219 Z m 0.46875,3.2773437 c 1.06794,2.817e-4 2.117114,0.2941268 3.085937,0.7285156 -0.591145,2.5878907 -1.182291,5.1757818 -1.773437,7.7636718 -1.631062,1.008097 -3.683762,2.004866 -5.599609,1.216797 C 9.1740188,14.786974 9.2655165,13.037856 9.4098554,11.747107 9.6752987,9.3472424 10.982219,6.7439436 13.445609,6.0052031 13.873133,5.8797113 14.320552,5.8249847 14.765625,5.8222656 Z" />
|
||||
</g>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.9 KiB |
|
@ -49,16 +49,9 @@
|
|||
y="0.091440894"
|
||||
rx="7.9375"
|
||||
ry="7.9375" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
<path
|
||||
id="text3748"
|
||||
style="font-style:normal;font-weight:normal;font-size:28.2222px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
|
||||
x="4.9140434"
|
||||
y="24.376242"
|
||||
id="text3748"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan3746"
|
||||
style="font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:28.2222px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Italic';stroke-width:0.264583"
|
||||
x="4.9140434"
|
||||
y="24.376242">f</tspan></text>
|
||||
d="m 16.098372,1.9030648 c -2.396461,0.096413 -4.613442,1.6362393 -5.570083,3.8295959 -0.36319,0.7376088 -0.5902985,1.5333253 -0.7639008,2.3344666 -0.5800781,0 -1.1601562,0 -1.7402343,0 -0.2468457,1.0424167 -0.4979783,2.0838227 -0.75,3.1249997 0.5391604,0.06459 1.4021894,-0.129832 1.7377815,0.09755 -0.9942104,4.409486 -1.9864546,8.819416 -2.9819222,13.228618 1.234375,0 2.46875,0 3.703125,0 0.9986138,-4.442514 2.0016398,-8.884039 3.0019528,-13.326172 1.528646,0 3.057292,0 4.585938,0 0.246845,-1.042417 0.497978,-2.0838222 0.75,-3.1249997 -1.556641,0 -3.113282,0 -4.669922,0 0.284997,-1.2711599 0.9852,-2.7642859 2.456475,-2.9013647 1.115419,-0.2366453 2.2128,0.189347 3.295869,0.3212866 0.635475,0.070618 0.396076,-0.9653125 0.645549,-1.3814116 0.145406,-0.6156914 0.291087,-1.2313178 0.436091,-1.847104 -1.363155,-0.2619531 -2.745758,-0.446203 -4.136719,-0.3554688 z" />
|
||||
</g>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.6 KiB |
|
@ -0,0 +1,63 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="100"
|
||||
height="100"
|
||||
viewBox="0 0 26.458333 26.458333"
|
||||
version="1.1"
|
||||
id="svg5"
|
||||
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
|
||||
sodipodi:docname="keyword.svg"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<sodipodi:namedview
|
||||
id="namedview7"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:document-units="px"
|
||||
showgrid="false"
|
||||
inkscape:zoom="5.786981"
|
||||
inkscape:cx="87.092043"
|
||||
inkscape:cy="27.389065"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1001"
|
||||
inkscape:window-x="-9"
|
||||
inkscape:window-y="-9"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="layer1"
|
||||
units="px"
|
||||
width="100px" />
|
||||
<defs
|
||||
id="defs2" />
|
||||
<g
|
||||
inkscape:label="图层 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<rect
|
||||
style="fill:#78ebff;fill-opacity:1;stroke:none;stroke-width:0.864658;stroke-miterlimit:4;stroke-dasharray:none"
|
||||
id="rect1440"
|
||||
width="26.508604"
|
||||
height="26.308193"
|
||||
x="0.084942333"
|
||||
y="0.091440894"
|
||||
rx="7.9375"
|
||||
ry="7.9375" />
|
||||
<g
|
||||
aria-label="K"
|
||||
transform="scale(0.8935237,1.1191645)"
|
||||
id="text2513"
|
||||
style="font-size:23.689px;line-height:1.25;stroke-width:0.296111">
|
||||
<path
|
||||
id="path17727"
|
||||
style="font-style:italic;font-weight:bold;-inkscape-font-specification:'sans-serif Bold Italic'"
|
||||
d="m 5.3378906,20.222656 c 1.4882813,0 2.9765625,0 4.4648438,0 0.4219226,-1.828114 0.8434546,-3.656318 1.2656246,-5.484375 0.669917,-0.271984 1.028288,-1.356134 1.890625,-1.02539 0.702894,0.659505 0.980496,1.667389 1.515266,2.463149 0.749469,1.348872 1.498938,2.697744 2.248406,4.046616 1.630209,0 3.260417,0 4.890625,0 -1.747026,-3.068849 -3.491758,-6.139009 -5.240234,-9.207031 2.898972,-2.6733573 5.799606,-5.3449143 8.699219,-8.0175781 -1.758464,0 -3.516927,0 -5.275391,0 -2.590559,2.5292314 -5.180169,5.0594348 -7.771484,7.5878911 0.582489,-2.5291918 1.164064,-5.0585938 1.746093,-7.5878911 -1.488281,0 -2.976562,0 -4.4648434,0 C 7.983724,8.7395833 6.6608073,14.48112 5.3378906,20.222656 Z" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.5 KiB |
|
@ -49,17 +49,10 @@
|
|||
y="0.091440894"
|
||||
rx="7.9375"
|
||||
ry="7.9375" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
<path
|
||||
id="text3748"
|
||||
style="font-style:normal;font-weight:normal;font-size:28.2222px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
|
||||
x="5.6899452"
|
||||
y="24.376242"
|
||||
id="text3748"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan3746"
|
||||
style="font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:28.2222px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Italic';stroke-width:0.264583"
|
||||
x="5.6899452"
|
||||
y="24.376242">f</tspan></text>
|
||||
d="m 16.033203,2.2910156 c -2.39625,0.096289 -4.613548,1.636537 -5.570083,3.8295959 -0.363574,0.7372758 -0.5870713,1.5342606 -0.7619481,2.3344666 -0.5807292,0 -1.1614584,0 -1.7421875,0 -0.2468457,1.0424167 -0.4979783,2.0838229 -0.75,3.1249999 0.5391604,0.06459 1.4021894,-0.129832 1.7377815,0.09755 -0.9942104,4.409486 -1.9864546,8.819416 -2.9819221,13.228618 1.235026,0 2.470052,0 3.7050781,0 0.9986141,-4.442514 2.0016401,-8.884039 3.0019531,-13.326172 1.527995,0 3.05599,0 4.583984,0 0.246846,-1.042417 0.497979,-2.0838224 0.75,-3.1249999 -1.55664,0 -3.113281,0 -4.669921,0 0.285427,-1.2715784 0.986477,-2.7622689 2.456475,-2.9013647 1.115419,-0.2366453 2.2128,0.189347 3.295868,0.3212866 0.635476,0.070618 0.396077,-0.9653125 0.64555,-1.3814116 0.145405,-0.6156914 0.291087,-1.2313178 0.436091,-1.847104 -1.363153,-0.2619542 -2.74576,-0.4462057 -4.136719,-0.3554688 z" />
|
||||
<rect
|
||||
style="fill:#2e5c00;fill-opacity:1;stroke-width:1.29084"
|
||||
id="rect943"
|
||||
|
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 3.2 KiB |
|
@ -49,17 +49,10 @@
|
|||
y="0.091440894"
|
||||
rx="7.9375"
|
||||
ry="7.9375" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
<path
|
||||
id="text3748"
|
||||
style="font-style:normal;font-weight:normal;font-size:28.2222px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
|
||||
x="5.6899452"
|
||||
y="24.376242"
|
||||
id="text3748"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan3746"
|
||||
style="font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:28.2222px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Italic';stroke-width:0.264583"
|
||||
x="5.6899452"
|
||||
y="24.376242">f</tspan></text>
|
||||
d="m 16.033203,2.2910156 c -2.39625,0.096289 -4.613548,1.636537 -5.570083,3.8295959 -0.363574,0.7372758 -0.5870713,1.5342606 -0.7619481,2.3344666 -0.5807292,0 -1.1614584,0 -1.7421875,0 -0.2468457,1.0424167 -0.4979783,2.0838229 -0.75,3.1249999 0.5391604,0.06459 1.4021894,-0.129832 1.7377815,0.09755 -0.9942104,4.409486 -1.9864546,8.819416 -2.9819221,13.228618 1.235026,0 2.470052,0 3.7050781,0 0.9986141,-4.442514 2.0016401,-8.884039 3.0019531,-13.326172 1.527995,0 3.05599,0 4.583984,0 0.246846,-1.042417 0.497979,-2.0838224 0.75,-3.1249999 -1.55664,0 -3.113281,0 -4.669921,0 0.285427,-1.2715784 0.986477,-2.7622689 2.456475,-2.9013647 1.115419,-0.2366453 2.2128,0.189347 3.295868,0.3212866 0.635476,0.070618 0.396077,-0.9653125 0.64555,-1.3814116 0.145405,-0.6156914 0.291087,-1.2313178 0.436091,-1.847104 -1.363153,-0.2619542 -2.74576,-0.4462057 -4.136719,-0.3554688 z" />
|
||||
<rect
|
||||
style="fill:#235aff;fill-opacity:1;stroke-width:1.29084"
|
||||
id="rect943"
|
||||
|
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 3.3 KiB |
|
@ -49,17 +49,10 @@
|
|||
y="0.091440894"
|
||||
rx="7.9375"
|
||||
ry="7.9375" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
<path
|
||||
id="text3748"
|
||||
style="font-style:normal;font-weight:normal;font-size:28.2222px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
|
||||
x="5.6899452"
|
||||
y="24.376242"
|
||||
id="text3748"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan3746"
|
||||
style="font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:28.2222px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Italic';stroke-width:0.264583"
|
||||
x="5.6899452"
|
||||
y="24.376242">f</tspan></text>
|
||||
d="m 16.033203,2.2910156 c -2.39625,0.096289 -4.613548,1.636537 -5.570083,3.8295959 -0.363574,0.7372758 -0.5870713,1.5342606 -0.7619481,2.3344666 -0.5807292,0 -1.1614584,0 -1.7421875,0 -0.2468457,1.0424167 -0.4979783,2.0838229 -0.75,3.1249999 0.5391604,0.06459 1.4021894,-0.129832 1.7377815,0.09755 -0.9942104,4.409486 -1.9864546,8.819416 -2.9819221,13.228618 1.235026,0 2.470052,0 3.7050781,0 0.9986141,-4.442514 2.0016401,-8.884039 3.0019531,-13.326172 1.527995,0 3.05599,0 4.583984,0 0.246846,-1.042417 0.497979,-2.0838224 0.75,-3.1249999 -1.55664,0 -3.113281,0 -4.669921,0 0.285427,-1.2715784 0.986477,-2.7622689 2.456475,-2.9013647 1.115419,-0.2366453 2.2128,0.189347 3.295868,0.3212866 0.635476,0.070618 0.396077,-0.9653125 0.64555,-1.3814116 0.145405,-0.6156914 0.291087,-1.2313178 0.436091,-1.847104 -1.363153,-0.2619542 -2.74576,-0.4462057 -4.136719,-0.3554688 z" />
|
||||
<rect
|
||||
style="fill:#800000;fill-opacity:1;stroke-width:1.29084"
|
||||
id="rect943"
|
||||
|
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 3.3 KiB |
|
@ -8,7 +8,7 @@
|
|||
version="1.1"
|
||||
id="svg5"
|
||||
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
|
||||
sodipodi:docname="method_inherited_protected.svg"
|
||||
sodipodi:docname="method_protected.svg"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
|
@ -49,17 +49,10 @@
|
|||
y="0.091440894"
|
||||
rx="7.9375"
|
||||
ry="7.9375" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
<path
|
||||
id="text3748"
|
||||
style="font-style:normal;font-weight:normal;font-size:28.2222px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
|
||||
x="5.6899452"
|
||||
y="24.376242"
|
||||
id="text3748"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan3746"
|
||||
style="font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:28.2222px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Italic';stroke-width:0.264583"
|
||||
x="5.6899452"
|
||||
y="24.376242">f</tspan></text>
|
||||
d="m 16.033203,2.2910156 c -2.39625,0.096289 -4.613548,1.636537 -5.570083,3.8295959 -0.363574,0.7372758 -0.5870713,1.5342606 -0.7619481,2.3344666 -0.5807292,0 -1.1614584,0 -1.7421875,0 -0.2468457,1.0424167 -0.4979783,2.0838229 -0.75,3.1249999 0.5391604,0.06459 1.4021894,-0.129832 1.7377815,0.09755 -0.9942104,4.409486 -1.9864546,8.819416 -2.9819221,13.228618 1.235026,0 2.470052,0 3.7050781,0 0.9986141,-4.442514 2.0016401,-8.884039 3.0019531,-13.326172 1.527995,0 3.05599,0 4.583984,0 0.246846,-1.042417 0.497979,-2.0838224 0.75,-3.1249999 -1.55664,0 -3.113281,0 -4.669921,0 0.285427,-1.2715784 0.986477,-2.7622689 2.456475,-2.9013647 1.115419,-0.2366453 2.2128,0.189347 3.295868,0.3212866 0.635476,0.070618 0.396077,-0.9653125 0.64555,-1.3814116 0.145405,-0.6156914 0.291087,-1.2313178 0.436091,-1.847104 -1.363153,-0.2619542 -2.74576,-0.4462057 -4.136719,-0.3554688 z" />
|
||||
<rect
|
||||
style="fill:#235aff;fill-opacity:1;stroke-width:1.29084"
|
||||
id="rect943"
|
||||
|
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 3.3 KiB |
|
@ -8,7 +8,7 @@
|
|||
version="1.1"
|
||||
id="svg5"
|
||||
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
|
||||
sodipodi:docname="method_inherited.svg"
|
||||
sodipodi:docname="method_public.svg"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
|
@ -49,17 +49,10 @@
|
|||
y="0.091440894"
|
||||
rx="7.9375"
|
||||
ry="7.9375" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
<path
|
||||
id="text3748"
|
||||
style="font-style:normal;font-weight:normal;font-size:28.2222px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
|
||||
x="5.6899452"
|
||||
y="24.376242"
|
||||
id="text3748"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan3746"
|
||||
style="font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:28.2222px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Italic';stroke-width:0.264583"
|
||||
x="5.6899452"
|
||||
y="24.376242">f</tspan></text>
|
||||
d="m 16.033203,2.2910156 c -2.39625,0.096289 -4.613548,1.636537 -5.570083,3.8295959 -0.363574,0.7372758 -0.5870713,1.5342606 -0.7619481,2.3344666 -0.5807292,0 -1.1614584,0 -1.7421875,0 -0.2468457,1.0424167 -0.4979783,2.0838229 -0.75,3.1249999 0.5391604,0.06459 1.4021894,-0.129832 1.7377815,0.09755 -0.9942104,4.409486 -1.9864546,8.819416 -2.9819221,13.228618 1.235026,0 2.470052,0 3.7050781,0 0.9986141,-4.442514 2.0016401,-8.884039 3.0019531,-13.326172 1.527995,0 3.05599,0 4.583984,0 0.246846,-1.042417 0.497979,-2.0838224 0.75,-3.1249999 -1.55664,0 -3.113281,0 -4.669921,0 0.285427,-1.2715784 0.986477,-2.7622689 2.456475,-2.9013647 1.115419,-0.2366453 2.2128,0.189347 3.295868,0.3212866 0.635476,0.070618 0.396077,-0.9653125 0.64555,-1.3814116 0.145405,-0.6156914 0.291087,-1.2313178 0.436091,-1.847104 -1.363153,-0.2619542 -2.74576,-0.4462057 -4.136719,-0.3554688 z" />
|
||||
<rect
|
||||
style="fill:#2e5c00;fill-opacity:1;stroke-width:1.29084"
|
||||
id="rect943"
|
||||
|
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 3.2 KiB |
|
@ -49,16 +49,9 @@
|
|||
y="0.091440894"
|
||||
rx="7.9375"
|
||||
ry="7.9375" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:28.2222px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
|
||||
x="2.3277049"
|
||||
y="23.341707"
|
||||
id="text3748"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan3746"
|
||||
style="font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:28.2222px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Italic';stroke-width:0.264583"
|
||||
x="2.3277049"
|
||||
y="23.341707">N</tspan></text>
|
||||
<path
|
||||
id="text3748"
|
||||
style="font-style:normal;font-weight:normal;font-size:28.2222px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.25157"
|
||||
d="M 7.7039971,2.703125 C 6.2300354,9.7590719 4.7574236,16.815364 3.2826126,23.871094 c 1.1035804,0 2.2071609,0 3.3107412,0 1.175129,-5.613545 2.346991,-11.227929 3.5208632,-16.8417971 1.550528,5.6140571 3.104014,11.2271191 4.652694,16.8417971 1.224828,0 2.449655,0 3.674482,0 1.504436,-7.192246 3.003982,-14.385747 4.507905,-21.5781252 -1.103581,-1e-7 -2.207161,0 -3.310741,0 C 18.574658,7.3746099 17.514049,12.457096 16.451416,17.539062 15.045752,12.45708 13.641248,7.3747044 12.234857,2.2929688 c -1.481447,-1e-7 -2.9628928,0 -4.4443392,0 -0.02884,0.1367187 -0.05768,0.2734375 -0.086521,0.4101562 z" />
|
||||
</g>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.3 KiB |
|
@ -49,16 +49,9 @@
|
|||
y="0.091440894"
|
||||
rx="7.9375"
|
||||
ry="7.9375" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
<path
|
||||
id="text3748"
|
||||
style="font-style:normal;font-weight:normal;font-size:28.2222px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
|
||||
x="5.366653"
|
||||
y="23.471024"
|
||||
id="text3748"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan3746"
|
||||
style="font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:28.2222px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Italic';stroke-width:0.264583"
|
||||
x="5.366653"
|
||||
y="23.471024">f</tspan></text>
|
||||
d="M 15.710938,1.3847656 C 13.316447,1.4840766 11.098795,3.019205 10.142013,5.21203 9.7742335,5.9485136 9.5529711,6.7477036 9.3769531,7.5488281 c -0.5800781,0 -1.1601562,0 -1.7402343,0 -0.2468457,1.0424167 -0.4979783,2.0838225 -0.75,3.1249999 0.5391604,0.06459 1.4021894,-0.129832 1.7377815,0.09755 C 7.6302899,15.180868 6.6380457,19.590798 5.6425781,24 c 1.234375,0 2.46875,0 3.703125,0 0.9986139,-4.442514 2.0016399,-8.884039 3.0019529,-13.326172 1.528646,0 3.057292,0 4.585938,0 0.246845,-1.0424165 0.497978,-2.0838224 0.75,-3.1249999 -1.557292,0 -3.114584,0 -4.671875,0 0.287133,-1.2699393 0.986594,-2.7612544 2.456562,-2.9008859 1.116302,-0.2338351 2.212161,0.1866611 3.295782,0.3208078 0.635475,0.070618 0.396076,-0.9653125 0.645549,-1.3814116 C 19.555018,2.971647 19.700699,2.3560206 19.845703,1.7402344 18.483697,1.4789323 17.100471,1.2968915 15.710938,1.3847656 Z" />
|
||||
</g>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.6 KiB |
|
@ -8,7 +8,7 @@
|
|||
version="1.1"
|
||||
id="svg5"
|
||||
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
|
||||
sodipodi:docname="static_method - 副本.svg"
|
||||
sodipodi:docname="static_var.svg"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
|
@ -49,16 +49,9 @@
|
|||
y="0.091440894"
|
||||
rx="7.9375"
|
||||
ry="7.9375" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
<path
|
||||
id="text3748"
|
||||
style="font-style:normal;font-weight:normal;font-size:28.2222px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
|
||||
x="3.6208744"
|
||||
y="21.337294"
|
||||
id="text3748"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan3746"
|
||||
style="font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:28.2222px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Italic';stroke-width:0.264583"
|
||||
x="3.6208744"
|
||||
y="21.337294">v</tspan></text>
|
||||
d="m 5.5527344,6.0351562 c 0.9014045,5.2773928 1.8051173,10.5543928 2.7050781,15.8320318 1.1054687,-10e-7 2.2109375,0 3.3164065,0 3.484619,-5.483983 6.971193,-10.966724 10.455078,-16.4511724 -1.369792,0 -2.739583,0 -4.109375,0 C 15.598956,9.1769278 13.280814,12.939586 10.960938,16.701172 10.363512,12.93952 9.7695125,9.1773205 9.1699219,5.4160156 c -1.2408854,0 -2.4817709,0 -3.7226563,0 0.035156,0.2063802 0.070312,0.4127604 0.1054688,0.6191406 z" />
|
||||
</g>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
@ -41,7 +41,7 @@
|
|||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<rect
|
||||
style="fill:#cd9a00;fill-opacity:1;stroke:none;stroke-width:0.864658;stroke-miterlimit:4;stroke-dasharray:none"
|
||||
style="fill:#deaa88;fill-opacity:1;stroke:none;stroke-width:0.864658;stroke-miterlimit:4;stroke-dasharray:none"
|
||||
id="rect1440"
|
||||
width="26.508671"
|
||||
height="26.308193"
|
||||
|
@ -49,16 +49,9 @@
|
|||
y="0.091440894"
|
||||
rx="7.9375"
|
||||
ry="7.9375" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
<path
|
||||
id="text3748"
|
||||
style="font-style:normal;font-weight:normal;font-size:28.2222px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
|
||||
x="2.7156558"
|
||||
y="23.729656"
|
||||
id="text3748"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan3746"
|
||||
style="font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:28.2222px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Italic';stroke-width:0.264583"
|
||||
x="2.7156558"
|
||||
y="23.729656">T</tspan></text>
|
||||
d="m 5.1484375,3.0957031 c -0.223341,0.9908778 -0.44429,1.9822963 -0.6699219,2.9726563 2.4381511,0 4.8763021,0 7.3144534,0 -1.401226,6.0637596 -2.8009665,12.1278626 -4.2031252,18.1914066 1.2805989,0 2.5611982,0 3.8417972,0 1.402859,-6.06338 2.80178,-12.127675 4.203125,-18.1914066 2.440104,0 4.880208,0 7.320312,0 0.251685,-1.129402 0.505669,-2.258298 0.761719,-3.3867188 -6.158854,0 -12.317708,0 -18.4765626,0 -0.030599,0.1380209 -0.061198,0.2760417 -0.091797,0.4140625 z" />
|
||||
</g>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.2 KiB |
|
@ -49,17 +49,10 @@
|
|||
y="0.091440894"
|
||||
rx="7.9375"
|
||||
ry="7.9375" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
<path
|
||||
id="text3748"
|
||||
style="font-style:normal;font-weight:normal;font-size:28.2222px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
|
||||
x="2.5352347"
|
||||
y="21.495853"
|
||||
id="text3748"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan3746"
|
||||
style="font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:28.2222px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Italic';stroke-width:0.264583"
|
||||
x="2.5352347"
|
||||
y="21.495853">v</tspan></text>
|
||||
d="m 4.4667969,6.1933594 c 0.9020375,5.2773956 1.8065276,10.5543746 2.7070312,15.8320316 1.1048177,0 2.2096354,0 3.3144529,0 3.484619,-5.483983 6.971194,-10.966723 10.455078,-16.4511722 -1.369791,0 -2.739583,0 -4.109375,0 C 14.513019,9.335131 12.194877,13.097789 9.875,16.859375 9.2782002,13.097728 8.6850334,9.3354988 8.0859375,5.5742188 c -1.2415365,-10e-8 -2.4830729,0 -3.7246094,0 0.035156,0.2063802 0.070312,0.4127604 0.1054688,0.6191406 z" />
|
||||
<rect
|
||||
style="fill:#2e5c00;fill-opacity:1;stroke-width:1.29084"
|
||||
id="rect943"
|
||||
|
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.8 KiB |
|
@ -49,17 +49,10 @@
|
|||
y="0.091440894"
|
||||
rx="7.9375"
|
||||
ry="7.9375" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
<path
|
||||
id="text3748"
|
||||
style="font-style:normal;font-weight:normal;font-size:28.2222px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
|
||||
x="1.3922237"
|
||||
y="21.678736"
|
||||
id="text3748"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan3746"
|
||||
style="font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:28.2222px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Italic';stroke-width:0.264583"
|
||||
x="1.3922237"
|
||||
y="21.678736">v</tspan></text>
|
||||
d="m 3.3242188,6.375 c 0.9014076,5.278043 1.8050986,10.555699 2.7050781,15.833984 1.1054687,0 2.2109375,0 3.3164062,0 C 12.830365,16.724378 16.3168,11.240898 19.800781,5.7558594 c -1.369791,0 -2.739583,0 -4.109375,0 C 13.370401,9.5173981 11.052305,13.280736 8.7324219,17.042969 8.1349928,13.280667 7.5410212,9.5178114 6.9414062,5.7558594 c -1.2408854,0 -2.4817708,0 -3.7226562,0 C 3.253906,5.9622396 3.289062,6.1686198 3.3242188,6.375 Z" />
|
||||
<rect
|
||||
style="fill:#235aff;fill-opacity:1;stroke-width:1.29084"
|
||||
id="rect943"
|
||||
|
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
@ -49,17 +49,10 @@
|
|||
y="0.091440894"
|
||||
rx="7.9375"
|
||||
ry="7.9375" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
<path
|
||||
id="text3748"
|
||||
style="font-style:normal;font-weight:normal;font-size:28.2222px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
|
||||
x="1.117901"
|
||||
y="21.724457"
|
||||
id="text3748"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan3746"
|
||||
style="font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:28.2222px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Italic';stroke-width:0.264583"
|
||||
x="1.117901"
|
||||
y="21.724457">v</tspan></text>
|
||||
d="m 3.0488281,6.421875 c 0.9020376,5.277396 1.8065277,10.554375 2.7070313,15.832031 1.1048177,0 2.2096354,0 3.3144531,0 C 12.555515,16.769881 16.04296,11.28728 19.527344,5.8027344 c -1.370443,0 -2.740886,0 -4.111328,0 C 13.095636,9.5636068 10.778221,13.326311 8.4589844,17.087891 7.861559,13.326239 7.2675594,9.5640392 6.6679688,5.8027344 c -1.2415365,0 -2.483073,0 -3.7246094,0 0.035156,0.2063802 0.070312,0.4127604 0.1054687,0.6191406 z" />
|
||||
<rect
|
||||
style="fill:#800000;fill-opacity:1;stroke-width:1.29084"
|
||||
id="rect943"
|
||||
|
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
@ -8,7 +8,7 @@
|
|||
version="1.1"
|
||||
id="svg5"
|
||||
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
|
||||
sodipodi:docname="var_inherited_protected.svg"
|
||||
sodipodi:docname="var_protected.svg"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
|
@ -49,17 +49,10 @@
|
|||
y="0.091440894"
|
||||
rx="7.9375"
|
||||
ry="7.9375" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
<path
|
||||
id="text3748"
|
||||
style="font-style:normal;font-weight:normal;font-size:28.2222px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
|
||||
x="1.3922237"
|
||||
y="21.678736"
|
||||
id="text3748"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan3746"
|
||||
style="font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:28.2222px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Italic';stroke-width:0.264583"
|
||||
x="1.3922237"
|
||||
y="21.678736">v</tspan></text>
|
||||
d="m 3.3242188,6.375 c 0.9014076,5.278043 1.8050986,10.555699 2.7050781,15.833984 1.1054687,0 2.2109375,0 3.3164062,0 C 12.830365,16.724378 16.3168,11.240898 19.800781,5.7558594 c -1.369791,0 -2.739583,0 -4.109375,0 C 13.370401,9.5173981 11.052305,13.280736 8.7324219,17.042969 8.1349928,13.280667 7.5410212,9.5178114 6.9414062,5.7558594 c -1.2408854,0 -2.4817708,0 -3.7226562,0 C 3.253906,5.9622396 3.289062,6.1686198 3.3242188,6.375 Z" />
|
||||
<rect
|
||||
style="fill:#235aff;fill-opacity:1;stroke-width:1.29084"
|
||||
id="rect943"
|
||||
|
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
@ -8,7 +8,7 @@
|
|||
version="1.1"
|
||||
id="svg5"
|
||||
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
|
||||
sodipodi:docname="var_inherited.svg"
|
||||
sodipodi:docname="var_public.svg"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
|
@ -49,17 +49,10 @@
|
|||
y="0.091440894"
|
||||
rx="7.9375"
|
||||
ry="7.9375" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
<path
|
||||
id="text3748"
|
||||
style="font-style:normal;font-weight:normal;font-size:28.2222px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
|
||||
x="2.5352347"
|
||||
y="21.495853"
|
||||
id="text3748"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan3746"
|
||||
style="font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:28.2222px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Italic';stroke-width:0.264583"
|
||||
x="2.5352347"
|
||||
y="21.495853">v</tspan></text>
|
||||
d="m 4.4667969,6.1933594 c 0.9020375,5.2773956 1.8065276,10.5543746 2.7070312,15.8320316 1.1048177,0 2.2096354,0 3.3144529,0 3.484619,-5.483983 6.971194,-10.966723 10.455078,-16.4511722 -1.369791,0 -2.739583,0 -4.109375,0 C 14.513019,9.335131 12.194877,13.097789 9.875,16.859375 9.2782002,13.097728 8.6850334,9.3354988 8.0859375,5.5742188 c -1.2415365,-10e-8 -2.4830729,0 -3.7246094,0 0.035156,0.2063802 0.070312,0.4127604 0.1054688,0.6191406 z" />
|
||||
<rect
|
||||
style="fill:#2e5c00;fill-opacity:1;stroke-width:1.29084"
|
||||
id="rect943"
|
||||
|
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.8 KiB |
|
@ -210,6 +210,8 @@ QString Settings::Dirs::data(Settings::Dirs::DataType dataType) const
|
|||
return dataDir;
|
||||
case DataType::ColorSheme:
|
||||
return ":/colorschemes/colorschemes";
|
||||
case DataType::IconSet:
|
||||
return ":/resources/iconsets";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
@ -4710,6 +4712,16 @@ void Settings::UI::setNewClassDialogWidth(int newNewClassDialogWidth)
|
|||
mNewClassDialogWidth = newNewClassDialogWidth;
|
||||
}
|
||||
|
||||
int Settings::UI::newClassDialogHeight() const
|
||||
{
|
||||
return mNewClassDialogHeight;
|
||||
}
|
||||
|
||||
void Settings::UI::setNewClassDialogHeight(int newNewClassDialogHeight)
|
||||
{
|
||||
mNewClassDialogHeight = newNewClassDialogHeight;
|
||||
}
|
||||
|
||||
int Settings::UI::settingsDialogHeight() const
|
||||
{
|
||||
return mSettingsDialogHeight;
|
||||
|
|
|
@ -980,6 +980,9 @@ public:
|
|||
int newClassDialogWidth() const;
|
||||
void setNewClassDialogWidth(int newNewClassDialogWidth);
|
||||
|
||||
int newClassDialogHeight() const;
|
||||
void setNewClassDialogHeight(int newNewClassDialogHeight);
|
||||
|
||||
private:
|
||||
QByteArray mMainWindowState;
|
||||
QByteArray mMainWindowGeometry;
|
||||
|
|
|
@ -148,12 +148,7 @@ QVariant ClassBrowserModel::data(const QModelIndex &index, int role) const
|
|||
} else if (role == Qt::ForegroundRole) {
|
||||
if (mColors && node->statement) {
|
||||
PStatement statement = (node->statement);
|
||||
StatementKind kind;
|
||||
if (mParser) {
|
||||
kind = mParser->getKindOfStatement(statement);
|
||||
} else {
|
||||
kind = statement->kind;
|
||||
}
|
||||
StatementKind kind = getKindOfStatement(statement);
|
||||
if (kind == StatementKind::skKeyword) {
|
||||
if (statement->command.startsWith('#'))
|
||||
kind = StatementKind::skPreprocessor;
|
||||
|
@ -168,74 +163,8 @@ QVariant ClassBrowserModel::data(const QModelIndex &index, int role) const
|
|||
return pMainWindow->palette().color(QPalette::Text);
|
||||
} else if (role == Qt::DecorationRole) {
|
||||
if (node->statement) {
|
||||
PStatement statement = (node->statement);
|
||||
StatementKind kind;
|
||||
if (mParser) {
|
||||
kind = mParser->getKindOfStatement(statement);
|
||||
} else {
|
||||
kind = statement->kind;
|
||||
}
|
||||
switch (kind) {
|
||||
case StatementKind::skTypedef:
|
||||
return *(pIconsManager->getPixmap(IconsManager::PARSER_TYPE));
|
||||
case StatementKind::skClass:
|
||||
return *(pIconsManager->getPixmap(IconsManager::PARSER_CLASS));
|
||||
case StatementKind::skNamespace:
|
||||
case StatementKind::skNamespaceAlias:
|
||||
return *(pIconsManager->getPixmap(IconsManager::PARSER_NAMESPACE));
|
||||
case StatementKind::skPreprocessor:
|
||||
return *(pIconsManager->getPixmap(IconsManager::PARSER_DEFINE));
|
||||
case StatementKind::skEnumClassType:
|
||||
case StatementKind::skEnumType:
|
||||
case StatementKind::skEnum:
|
||||
return *(pIconsManager->getPixmap(IconsManager::PARSER_ENUM));
|
||||
case StatementKind::skFunction:
|
||||
case StatementKind::skConstructor:
|
||||
case StatementKind::skDestructor:
|
||||
if (statement->scope == StatementScope::ssGlobal)
|
||||
return *(pIconsManager->getPixmap(IconsManager::PARSER_GLOBAL_METHOD));
|
||||
if (statement->isInherited) {
|
||||
if (statement->classScope == StatementClassScope::scsProtected) {
|
||||
return *(pIconsManager->getPixmap(IconsManager::PARSER_INHERITED_PROTECTED_METHOD));
|
||||
} else if (statement->classScope == StatementClassScope::scsPublic) {
|
||||
return *(pIconsManager->getPixmap(IconsManager::PARSER_INHERITED_METHOD));
|
||||
}
|
||||
} else {
|
||||
if (statement->classScope == StatementClassScope::scsProtected) {
|
||||
return *(pIconsManager->getPixmap(IconsManager::PARSER_PROTECTED_METHOD));
|
||||
} else if (statement->classScope == StatementClassScope::scsPublic) {
|
||||
return *(pIconsManager->getPixmap(IconsManager::PARSER_PUBLIC_METHOD));
|
||||
} else {
|
||||
return *(pIconsManager->getPixmap(IconsManager::PARSER_PRIVATE_METHOD));
|
||||
}
|
||||
}
|
||||
break;
|
||||
case StatementKind::skGlobalVariable:
|
||||
return *(pIconsManager->getPixmap(IconsManager::PARSER_GLOBAL_VAR));
|
||||
case StatementKind::skVariable:
|
||||
// if (statement->scope == StatementScope::ssGlobal)
|
||||
// return QIcon(":/icons/images/classparser/global.ico");
|
||||
if (statement->isInherited) {
|
||||
if (statement->classScope == StatementClassScope::scsProtected) {
|
||||
return *(pIconsManager->getPixmap(IconsManager::PARSER_INHERITED_PROTECTD_VAR));
|
||||
} else if (statement->classScope == StatementClassScope::scsPublic) {
|
||||
return *(pIconsManager->getPixmap(IconsManager::PARSER_INHERITED_VAR));
|
||||
}
|
||||
} else {
|
||||
if (statement->classScope == StatementClassScope::scsProtected) {
|
||||
return *(pIconsManager->getPixmap(IconsManager::PARSER_PROTECTED_VAR));
|
||||
} else if (statement->classScope == StatementClassScope::scsPublic) {
|
||||
return *(pIconsManager->getPixmap(IconsManager::PARSER_PUBLIC_VAR));
|
||||
} else {
|
||||
return *(pIconsManager->getPixmap(IconsManager::PARSER_PRIVATE_VAR));
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return pIconsManager->getPixmapForStatement(node->statement);
|
||||
}
|
||||
|
||||
}
|
||||
return QVariant();
|
||||
}
|
||||
|
|
|
@ -19,14 +19,10 @@
|
|||
#include "../editor.h"
|
||||
#include "../editorlist.h"
|
||||
|
||||
#include <QPainter>
|
||||
#include <QTextDocument>
|
||||
#include <qabstracttextdocumentlayout.h>
|
||||
|
||||
CodeCompletionListView::CodeCompletionListView(QWidget *parent) : QListView(parent)
|
||||
{
|
||||
setUniformItemSizes(true);
|
||||
setItemDelegate(&mDelegate);
|
||||
// setItemDelegate(&mDelegate);
|
||||
}
|
||||
|
||||
void CodeCompletionListView::keyPressEvent(QKeyEvent *event)
|
||||
|
@ -63,54 +59,3 @@ void CodeCompletionListView::setKeypressedCallback(const KeyPressedCallback &new
|
|||
{
|
||||
mKeypressedCallback = newKeypressedCallback;
|
||||
}
|
||||
|
||||
|
||||
void CodeCompletionListItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
|
||||
{
|
||||
QVariant data = index.data();
|
||||
if (data.canConvert<QString>()) {
|
||||
painter->save();
|
||||
QString richText = qvariant_cast<QString>(data);
|
||||
|
||||
if (option.state & QStyle::State_Selected)
|
||||
painter->fillRect(option.rect, option.palette.highlight());
|
||||
|
||||
QColor color = index.data(Qt::ForegroundRole).value<QColor>();
|
||||
if (!color.isValid()) {
|
||||
color = option.palette.color(QPalette::Text);
|
||||
}
|
||||
painter->setPen(color);
|
||||
QTextDocument doc;
|
||||
doc.setHtml(richText);
|
||||
doc.setDefaultFont(painter->font());
|
||||
QTransform transform;
|
||||
transform.translate(option.rect.left(),option.rect.top());
|
||||
painter->setTransform(transform);
|
||||
QRect clipRect = option.rect;
|
||||
clipRect.moveTopLeft(QPoint(0,0));
|
||||
painter->setClipRect(clipRect);
|
||||
QAbstractTextDocumentLayout::PaintContext ctx;
|
||||
|
||||
ctx.palette.setColor(QPalette::Text, color);
|
||||
ctx.clip = clipRect;
|
||||
doc.documentLayout()->draw(painter,ctx);
|
||||
painter->restore();
|
||||
} else {
|
||||
QStyledItemDelegate::paint(painter, option, index);
|
||||
}
|
||||
}
|
||||
|
||||
QSize CodeCompletionListItemDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
|
||||
{
|
||||
QVariant data = index.data();
|
||||
if (data.canConvert<QString>()) {
|
||||
QString richText = qvariant_cast<QString>(data);
|
||||
|
||||
QTextDocument doc;
|
||||
doc.setHtml(richText);
|
||||
return QSize(doc.size().width(),doc.size().height());
|
||||
} else {
|
||||
return QStyledItemDelegate::sizeHint(option, index);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -24,16 +24,6 @@
|
|||
using KeyPressedCallback = std::function<bool (QKeyEvent *)>;
|
||||
using InputMethodCallback = std::function<bool (QInputMethodEvent*)>;
|
||||
|
||||
class CodeCompletionListItemDelegate: public QStyledItemDelegate {
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
// QAbstractItemDelegate interface
|
||||
public:
|
||||
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
|
||||
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;
|
||||
};
|
||||
|
||||
class CodeCompletionListView: public QListView {
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -50,7 +40,6 @@ protected:
|
|||
void keyPressEvent(QKeyEvent *event) override;
|
||||
private:
|
||||
KeyPressedCallback mKeypressedCallback;
|
||||
CodeCompletionListItemDelegate mDelegate;
|
||||
|
||||
// QWidget interface
|
||||
protected:
|
||||
|
|
|
@ -21,11 +21,13 @@
|
|||
#include "../editorlist.h"
|
||||
#include "../symbolusagemanager.h"
|
||||
#include "../colorscheme.h"
|
||||
#include "../iconsmanager.h"
|
||||
|
||||
#include <QKeyEvent>
|
||||
#include <QVBoxLayout>
|
||||
#include <QDebug>
|
||||
#include <QApplication>
|
||||
#include <QPainter>
|
||||
|
||||
CodeCompletionPopup::CodeCompletionPopup(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
|
@ -34,20 +36,9 @@ CodeCompletionPopup::CodeCompletionPopup(QWidget *parent) :
|
|||
setWindowFlags(Qt::Popup);
|
||||
mListView = new CodeCompletionListView(this);
|
||||
mModel=new CodeCompletionListModel(&mCompletionStatementList);
|
||||
mModel->setColorCallback([this](PStatement statement)->QColor{
|
||||
StatementKind kind;
|
||||
if (mParser) {
|
||||
kind = mParser->getKindOfStatement(statement);
|
||||
} else {
|
||||
kind = statement->kind;
|
||||
}
|
||||
PColorSchemeItem item = mColors->value(kind,PColorSchemeItem());
|
||||
if (item) {
|
||||
return item->foreground();
|
||||
}
|
||||
return palette().color(QPalette::Text);
|
||||
});
|
||||
mDelegate = new CodeCompletionListItemDelegate(mModel,this);
|
||||
mListView->setModel(mModel);
|
||||
mListView->setItemDelegate(mDelegate);
|
||||
setLayout(new QVBoxLayout());
|
||||
layout()->addWidget(mListView);
|
||||
layout()->setMargin(0);
|
||||
|
@ -130,6 +121,16 @@ bool CodeCompletionPopup::search(const QString &memberPhrase, bool autoHideOnSin
|
|||
setCursor(oldCursor);
|
||||
|
||||
if (!mCompletionStatementList.isEmpty()) {
|
||||
PColorSchemeItem item = mColors->value(StatementKind::skUnknown,PColorSchemeItem());
|
||||
if (item)
|
||||
mDelegate->setNormalColor(item->foreground());
|
||||
else
|
||||
mDelegate->setNormalColor(palette().color(QPalette::Text));
|
||||
item = mColors->value(StatementKind::skLocalVariable,PColorSchemeItem());
|
||||
if (item)
|
||||
mDelegate->setMatchedColor(item->foreground());
|
||||
else
|
||||
mDelegate->setMatchedColor(palette().color(QPalette::HighlightedText));
|
||||
mListView->setCurrentIndex(mModel->index(0,0));
|
||||
// if only one suggestion, and is exactly the symbol to search, hide the frame (the search is over)
|
||||
// if only one suggestion and auto hide , don't show the frame
|
||||
|
@ -966,35 +967,114 @@ QVariant CodeCompletionListModel::data(const QModelIndex &index, int role) const
|
|||
switch(role) {
|
||||
case Qt::DisplayRole: {
|
||||
PStatement statement = mStatements->at(index.row());
|
||||
QString text = statement->command;
|
||||
for (int i = statement->matchPositions.size()-1;i>=0;i--) {
|
||||
text.insert(statement->matchPositions[i]->end,"</b></u>");
|
||||
text.insert(statement->matchPositions[i]->start,"<u><b>");
|
||||
return statement->command;
|
||||
}
|
||||
return text;
|
||||
}
|
||||
case Qt::ForegroundRole: {
|
||||
case Qt::DecorationRole:
|
||||
PStatement statement = mStatements->at(index.row());
|
||||
if (mColorCallback)
|
||||
return mColorCallback(statement);
|
||||
return qApp->palette().color(QPalette::Text);
|
||||
}
|
||||
return pIconsManager->getPixmapForStatement(statement);
|
||||
}
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
PStatement CodeCompletionListModel::statement(const QModelIndex &index) const
|
||||
{
|
||||
if (!index.isValid())
|
||||
return PStatement();
|
||||
if (index.row()>=mStatements->count())
|
||||
return PStatement();
|
||||
return mStatements->at(index.row());
|
||||
}
|
||||
|
||||
QPixmap CodeCompletionListModel::statementIcon(const QModelIndex &index) const
|
||||
{
|
||||
if (!index.isValid())
|
||||
return QPixmap();
|
||||
if (index.row()>=mStatements->count())
|
||||
return QPixmap();
|
||||
PStatement statement = mStatements->at(index.row());
|
||||
return pIconsManager->getPixmapForStatement(statement);
|
||||
}
|
||||
|
||||
void CodeCompletionListModel::notifyUpdated()
|
||||
{
|
||||
beginResetModel();
|
||||
endResetModel();
|
||||
}
|
||||
|
||||
const ColorCallback &CodeCompletionListModel::colorCallback() const
|
||||
void CodeCompletionListItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
|
||||
{
|
||||
return mColorCallback;
|
||||
PStatement statement;
|
||||
if (mModel && (statement = mModel->statement(index)) ) {
|
||||
painter->save();
|
||||
if (option.state & QStyle::State_Selected)
|
||||
painter->fillRect(option.rect, option.palette.highlight());
|
||||
QPixmap icon = mModel->statementIcon(index);
|
||||
int x=option.rect.left();
|
||||
if (!icon.isNull()) {
|
||||
painter->drawPixmap(x,option.rect.top()+(option.rect.height()-icon.height())/2,icon);
|
||||
x+=icon.width();
|
||||
}
|
||||
QString text = statement->command;
|
||||
int pos=0;
|
||||
int y=option.rect.bottom()-painter->fontMetrics().descent();
|
||||
foreach (const PStatementMathPosition& matchPosition, statement->matchPositions) {
|
||||
if (pos<matchPosition->start) {
|
||||
QString t = text.mid(pos,matchPosition->start-pos);
|
||||
painter->setPen(mNormalColor);
|
||||
painter->drawText(x,y,t);
|
||||
x+=painter->fontMetrics().horizontalAdvance(t);
|
||||
}
|
||||
QString t = text.mid(matchPosition->start, matchPosition->end-matchPosition->start);
|
||||
painter->setPen(mMatchedColor);
|
||||
painter->drawText(x,y,t);
|
||||
x+=painter->fontMetrics().horizontalAdvance(t);
|
||||
pos=matchPosition->end;
|
||||
}
|
||||
if (pos<text.length()) {
|
||||
QString t = text.mid(pos,text.length()-pos);
|
||||
painter->setPen(mNormalColor);
|
||||
painter->drawText(x,y,t);
|
||||
x+=painter->fontMetrics().horizontalAdvance(t);
|
||||
}
|
||||
painter->restore();
|
||||
} else {
|
||||
QStyledItemDelegate::paint(painter, option, index);
|
||||
}
|
||||
}
|
||||
|
||||
void CodeCompletionListModel::setColorCallback(const ColorCallback &newColorCallback)
|
||||
CodeCompletionListModel *CodeCompletionListItemDelegate::model() const
|
||||
{
|
||||
mColorCallback = newColorCallback;
|
||||
return mModel;
|
||||
}
|
||||
|
||||
void CodeCompletionListItemDelegate::setModel(CodeCompletionListModel *newModel)
|
||||
{
|
||||
mModel = newModel;
|
||||
}
|
||||
|
||||
const QColor &CodeCompletionListItemDelegate::normalColor() const
|
||||
{
|
||||
return mNormalColor;
|
||||
}
|
||||
|
||||
void CodeCompletionListItemDelegate::setNormalColor(const QColor &newNormalColor)
|
||||
{
|
||||
mNormalColor = newNormalColor;
|
||||
}
|
||||
|
||||
const QColor &CodeCompletionListItemDelegate::matchedColor() const
|
||||
{
|
||||
return mMatchedColor;
|
||||
}
|
||||
|
||||
void CodeCompletionListItemDelegate::setMatchedColor(const QColor &newMatchedColor)
|
||||
{
|
||||
mMatchedColor = newMatchedColor;
|
||||
}
|
||||
|
||||
CodeCompletionListItemDelegate::CodeCompletionListItemDelegate(CodeCompletionListModel *model, QWidget *parent) : QStyledItemDelegate(parent),
|
||||
mModel(model)
|
||||
{
|
||||
mNormalColor = qApp->palette().color(QPalette::Text);
|
||||
mMatchedColor = qApp->palette().color(QPalette::BrightText);
|
||||
}
|
||||
|
|
|
@ -29,13 +29,36 @@ public:
|
|||
explicit CodeCompletionListModel(const StatementList* statements,QObject *parent = nullptr);
|
||||
int rowCount(const QModelIndex &parent) const override;
|
||||
QVariant data(const QModelIndex &index, int role) const override;
|
||||
PStatement statement(const QModelIndex &index) const;
|
||||
QPixmap statementIcon(const QModelIndex &index) const;
|
||||
void notifyUpdated();
|
||||
const ColorCallback &colorCallback() const;
|
||||
void setColorCallback(const ColorCallback &newColorCallback);
|
||||
|
||||
private:
|
||||
const StatementList* mStatements;
|
||||
ColorCallback mColorCallback;
|
||||
};
|
||||
|
||||
class CodeCompletionListItemDelegate: public QStyledItemDelegate {
|
||||
Q_OBJECT
|
||||
public:
|
||||
CodeCompletionListItemDelegate(CodeCompletionListModel *model=nullptr, QWidget *parent = nullptr);
|
||||
|
||||
|
||||
// QAbstractItemDelegate interface
|
||||
public:
|
||||
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
|
||||
CodeCompletionListModel *model() const;
|
||||
void setModel(CodeCompletionListModel *newModel);
|
||||
|
||||
const QColor &normalColor() const;
|
||||
void setNormalColor(const QColor &newNormalColor);
|
||||
|
||||
const QColor &matchedColor() const;
|
||||
void setMatchedColor(const QColor &newMatchedColor);
|
||||
|
||||
private:
|
||||
CodeCompletionListModel *mModel;
|
||||
QColor mNormalColor;
|
||||
QColor mMatchedColor;
|
||||
};
|
||||
|
||||
class CodeCompletionPopup : public QWidget
|
||||
|
@ -121,6 +144,7 @@ private:
|
|||
QString mMemberOperator;
|
||||
QMutex mMutex;
|
||||
std::shared_ptr<QHash<StatementKind, std::shared_ptr<ColorSchemeItem> > > mColors;
|
||||
CodeCompletionListItemDelegate* mDelegate;
|
||||
|
||||
PCppParser mParser;
|
||||
PStatement mCurrentStatement;
|
||||
|
|