- enhancement: Delay for tooltips.
- enhancement: "Tool tips delay" option in Options/editor/Tooltips
This commit is contained in:
parent
a8d9550632
commit
8254de68c8
2
NEWS.md
2
NEWS.md
|
@ -31,6 +31,8 @@ Red Panda C++ Version 2.12
|
||||||
- enhancement: Parser not correctly released if save a c file to non-c file.
|
- enhancement: Parser not correctly released if save a c file to non-c file.
|
||||||
- enhancement: Improve auto indent for embedding no-brace statements like for-for-if.
|
- enhancement: Improve auto indent for embedding no-brace statements like for-for-if.
|
||||||
- enhancement: Toggle comment for asm/makefile/lua files.
|
- enhancement: Toggle comment for asm/makefile/lua files.
|
||||||
|
- enhancement: Delay for tooltips.
|
||||||
|
- enhancement: "Tool tips delay" option in Options/editor/Tooltips
|
||||||
|
|
||||||
Red Panda C++ Version 2.11
|
Red Panda C++ Version 2.11
|
||||||
|
|
||||||
|
|
|
@ -195,6 +195,8 @@ Editor::Editor(QWidget *parent, const QString& filename,
|
||||||
mAutoBackupTimer.setInterval(1);
|
mAutoBackupTimer.setInterval(1);
|
||||||
connect(&mAutoBackupTimer, &QTimer::timeout,
|
connect(&mAutoBackupTimer, &QTimer::timeout,
|
||||||
this, &Editor::onAutoBackupTimer);
|
this, &Editor::onAutoBackupTimer);
|
||||||
|
connect(&mTooltipTimer, &QTimer::timeout,
|
||||||
|
this, &Editor::onTooltipTimer);
|
||||||
}
|
}
|
||||||
|
|
||||||
connect(horizontalScrollBar(), &QScrollBar::valueChanged,
|
connect(horizontalScrollBar(), &QScrollBar::valueChanged,
|
||||||
|
@ -1233,169 +1235,21 @@ bool Editor::event(QEvent *event)
|
||||||
&& !pMainWindow->completionPopup()->isVisible()
|
&& !pMainWindow->completionPopup()->isVisible()
|
||||||
&& !pMainWindow->functionTip()->isVisible()
|
&& !pMainWindow->functionTip()->isVisible()
|
||||||
&& !pMainWindow->headerCompletionPopup()->isVisible()) {
|
&& !pMainWindow->headerCompletionPopup()->isVisible()) {
|
||||||
if(mHoverModifiedLine!=-1) {
|
|
||||||
invalidateLine(mHoverModifiedLine);
|
|
||||||
mHoverModifiedLine=-1;
|
|
||||||
}
|
|
||||||
|
|
||||||
QHoverEvent *helpEvent = static_cast<QHoverEvent *>(event);
|
|
||||||
QSynedit::BufferCoord p;
|
|
||||||
TipType reason = getTipType(helpEvent->pos(),p);
|
|
||||||
PSyntaxIssue pError;
|
|
||||||
int line ;
|
|
||||||
if (reason == TipType::Error) {
|
|
||||||
pError = getSyntaxIssueAtPosition(p);
|
|
||||||
} else if (pointToLine(helpEvent->pos(),line)) {
|
|
||||||
//issue tips is prefered
|
|
||||||
PSyntaxIssueList issues = getSyntaxIssuesAtLine(line);
|
|
||||||
if (issues && !issues->isEmpty()) {
|
|
||||||
reason = TipType::Error;
|
|
||||||
pError = issues->front();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get subject
|
|
||||||
bool isIncludeLine = false;
|
|
||||||
bool isIncludeNextLine = false;
|
|
||||||
QSynedit::BufferCoord pBeginPos,pEndPos;
|
|
||||||
QString s;
|
|
||||||
QStringList expression;
|
|
||||||
switch (reason) {
|
|
||||||
case TipType::Preprocessor:
|
|
||||||
// When hovering above a preprocessor line, determine if we want to show an include or a identifier hint
|
|
||||||
if (mParser) {
|
|
||||||
s = document()->getLine(p.line - 1);
|
|
||||||
isIncludeNextLine = mParser->isIncludeNextLine(s);
|
|
||||||
if (!isIncludeNextLine)
|
|
||||||
isIncludeLine = mParser->isIncludeLine(s);
|
|
||||||
if (!isIncludeNextLine &&!isIncludeLine)
|
|
||||||
s = wordAtRowCol(p);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case TipType::Identifier:
|
|
||||||
if (pMainWindow->debugger()->executing() && !pMainWindow->debugger()->inferiorRunning())
|
|
||||||
s = getWordAtPosition(this,p, pBeginPos,pEndPos, WordPurpose::wpEvaluation); // debugging
|
|
||||||
else if (!mCompletionPopup->isVisible()
|
|
||||||
&& !mHeaderCompletionPopup->isVisible()) {
|
|
||||||
expression = getExpressionAtPosition(p);
|
|
||||||
s = expression.join(""); // information during coding
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case TipType::Selection:
|
|
||||||
s = selText(); // when a selection is available, always only use that
|
|
||||||
break;
|
|
||||||
case TipType::Error:
|
|
||||||
s = pError->token;
|
|
||||||
break;
|
|
||||||
case TipType::None:
|
|
||||||
cancelHint();
|
|
||||||
mCurrentWord = "";
|
|
||||||
mCurrentTipType = TipType::None;
|
|
||||||
event->ignore();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
s = s.trimmed();
|
|
||||||
if ((s == mCurrentWord) && (mCurrentTipType == reason)) {
|
|
||||||
if (mParser
|
|
||||||
&& mParser->enabled()
|
|
||||||
&& qApp->queryKeyboardModifiers() == Qt::ControlModifier) {
|
|
||||||
if (!hasFocus())
|
|
||||||
activate();
|
|
||||||
setCursor(Qt::PointingHandCursor);
|
|
||||||
} else {
|
|
||||||
updateMouseCursor();
|
|
||||||
}
|
|
||||||
if (pointToLine(helpEvent->pos(),line)) {
|
|
||||||
invalidateLine(line);
|
|
||||||
mHoverModifiedLine=line;
|
|
||||||
}
|
|
||||||
event->ignore();
|
|
||||||
return true; // do NOT remove hint when subject stays the same
|
|
||||||
}
|
|
||||||
|
|
||||||
// Remove hint
|
|
||||||
cancelHint();
|
cancelHint();
|
||||||
mCurrentWord = s;
|
mTooltipTimer.stop();
|
||||||
mCurrentTipType = reason;
|
if (pSettings->editor().tipsDelay()>0) {
|
||||||
|
mTooltipTimer.setSingleShot(true);
|
||||||
|
mTooltipTimer.start(pSettings->editor().tipsDelay());
|
||||||
// Determine what to do with subject
|
|
||||||
QString hint = "";
|
|
||||||
switch (reason) {
|
|
||||||
case TipType::Preprocessor:
|
|
||||||
if (isIncludeNextLine || isIncludeLine) {
|
|
||||||
if (pSettings->editor().enableHeaderToolTips())
|
|
||||||
hint = getFileHint(s, isIncludeNextLine);
|
|
||||||
} else if (//devEditor.ParserHints and
|
|
||||||
!mCompletionPopup->isVisible()
|
|
||||||
&& !mHeaderCompletionPopup->isVisible()) {
|
|
||||||
if (pSettings->editor().enableIdentifierToolTips())
|
|
||||||
hint = getParserHint(QStringList(),s,p.line);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case TipType::Identifier:
|
|
||||||
case TipType::Selection:
|
|
||||||
if (!mCompletionPopup->isVisible()
|
|
||||||
&& !mHeaderCompletionPopup->isVisible()) {
|
|
||||||
if (pMainWindow->debugger()->executing()
|
|
||||||
&& (pSettings->editor().enableDebugTooltips())) {
|
|
||||||
showDebugHint(s,p.line);
|
|
||||||
} else if (pSettings->editor().enableIdentifierToolTips()) { //if devEditor.ParserHints {
|
|
||||||
hint = getParserHint(expression, s, p.line);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case TipType::Error:
|
|
||||||
if (pSettings->editor().enableIssueToolTips())
|
|
||||||
hint = getErrorHint(pError);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
// qDebug()<<"hint:"<<hint;
|
|
||||||
if (!hint.isEmpty()) {
|
|
||||||
// QApplication* app = dynamic_cast<QApplication *>(QApplication::instance());
|
|
||||||
// if (app->keyboardModifiers().testFlag(Qt::ControlModifier)) {
|
|
||||||
if (mParser
|
|
||||||
&& mParser->enabled()
|
|
||||||
&& qApp->queryKeyboardModifiers() == Qt::ControlModifier) {
|
|
||||||
if (!hasFocus())
|
|
||||||
activate();
|
|
||||||
setCursor(Qt::PointingHandCursor);
|
|
||||||
} else if (cursor() == Qt::PointingHandCursor) {
|
|
||||||
updateMouseCursor();
|
|
||||||
}
|
|
||||||
if (pointToLine(helpEvent->pos(),line)) {
|
|
||||||
invalidateLine(line);
|
|
||||||
mHoverModifiedLine=line;
|
|
||||||
}
|
|
||||||
if (pMainWindow->functionTip()->isVisible()) {
|
|
||||||
pMainWindow->functionTip()->hide();
|
|
||||||
}
|
|
||||||
QToolTip::showText(mapToGlobal(helpEvent->pos()),hint,this);
|
|
||||||
event->ignore();
|
|
||||||
} else {
|
} else {
|
||||||
updateMouseCursor();
|
onTooltipTimer();
|
||||||
event->ignore();
|
|
||||||
}
|
}
|
||||||
return true;
|
event->ignore();
|
||||||
} else if (event->type() == QEvent::HoverLeave) {
|
} else if (event->type() == QEvent::HoverLeave) {
|
||||||
cancelHint();
|
cancelHint();
|
||||||
return true;
|
return true;
|
||||||
} else if (event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease ) {
|
} else if (event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease ) {
|
||||||
if (!mCurrentWord.isEmpty()) {
|
if (!mCurrentWord.isEmpty()) {
|
||||||
QKeyEvent* keyEvent = dynamic_cast<QKeyEvent*>(event);
|
onTooltipTimer();
|
||||||
if (keyEvent->key() == Qt::Key_Control) {
|
|
||||||
QApplication* app = dynamic_cast<QApplication *>(QApplication::instance());
|
|
||||||
//postEvent takes the owner ship
|
|
||||||
QHoverEvent* hoverEvent=new QHoverEvent(QEvent::HoverMove,
|
|
||||||
mapFromGlobal(QCursor::pos()),
|
|
||||||
mapFromGlobal(QCursor::pos()),
|
|
||||||
Qt::ControlModifier
|
|
||||||
);
|
|
||||||
app->postEvent(this,hoverEvent);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return QSynEdit::event(event);
|
return QSynEdit::event(event);
|
||||||
|
@ -1408,7 +1262,7 @@ void Editor::mouseReleaseEvent(QMouseEvent *event)
|
||||||
}
|
}
|
||||||
|
|
||||||
// if ctrl+clicked
|
// if ctrl+clicked
|
||||||
if ((cursor() == Qt::PointingHandCursor) && (event->modifiers() == Qt::ControlModifier)
|
if ((event->modifiers() == Qt::ControlModifier)
|
||||||
&& (event->button() == Qt::LeftButton)) {
|
&& (event->button() == Qt::LeftButton)) {
|
||||||
|
|
||||||
QSynedit::BufferCoord p;
|
QSynedit::BufferCoord p;
|
||||||
|
@ -1886,8 +1740,10 @@ void Editor::onStatusChanged(QSynedit::StatusChanges changes)
|
||||||
if (pSettings->editor().showFunctionTips()) {
|
if (pSettings->editor().showFunctionTips()) {
|
||||||
updateFunctionTip(false);
|
updateFunctionTip(false);
|
||||||
mFunctionTipTimer.stop();
|
mFunctionTipTimer.stop();
|
||||||
mFunctionTipTimer.start(500);
|
if (pSettings->editor().tipsDelay()>0)
|
||||||
// updateFunctionTip();
|
mFunctionTipTimer.start(500);
|
||||||
|
else
|
||||||
|
onFunctionTipsTimer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1970,6 +1826,151 @@ void Editor::onAutoBackupTimer()
|
||||||
saveAutoBackup();
|
saveAutoBackup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Editor::onTooltipTimer()
|
||||||
|
{
|
||||||
|
if(mHoverModifiedLine!=-1) {
|
||||||
|
invalidateLine(mHoverModifiedLine);
|
||||||
|
mHoverModifiedLine=-1;
|
||||||
|
}
|
||||||
|
|
||||||
|
QSynedit::BufferCoord p;
|
||||||
|
QPoint pos = mapFromGlobal(QCursor::pos());
|
||||||
|
TipType reason = getTipType(pos,p);
|
||||||
|
PSyntaxIssue pError;
|
||||||
|
int line ;
|
||||||
|
if (reason == TipType::Error) {
|
||||||
|
pError = getSyntaxIssueAtPosition(p);
|
||||||
|
} else if (pointToLine(pos,line)) {
|
||||||
|
//issue tips is prefered
|
||||||
|
PSyntaxIssueList issues = getSyntaxIssuesAtLine(line);
|
||||||
|
if (issues && !issues->isEmpty()) {
|
||||||
|
reason = TipType::Error;
|
||||||
|
pError = issues->front();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get subject
|
||||||
|
bool isIncludeLine = false;
|
||||||
|
bool isIncludeNextLine = false;
|
||||||
|
QSynedit::BufferCoord pBeginPos,pEndPos;
|
||||||
|
QString s;
|
||||||
|
QStringList expression;
|
||||||
|
switch (reason) {
|
||||||
|
case TipType::Preprocessor:
|
||||||
|
// When hovering above a preprocessor line, determine if we want to show an include or a identifier hint
|
||||||
|
if (mParser) {
|
||||||
|
s = document()->getLine(p.line - 1);
|
||||||
|
isIncludeNextLine = mParser->isIncludeNextLine(s);
|
||||||
|
if (!isIncludeNextLine)
|
||||||
|
isIncludeLine = mParser->isIncludeLine(s);
|
||||||
|
if (!isIncludeNextLine &&!isIncludeLine)
|
||||||
|
s = wordAtRowCol(p);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case TipType::Identifier:
|
||||||
|
if (pMainWindow->debugger()->executing() && !pMainWindow->debugger()->inferiorRunning())
|
||||||
|
s = getWordAtPosition(this,p, pBeginPos,pEndPos, WordPurpose::wpEvaluation); // debugging
|
||||||
|
else if (!mCompletionPopup->isVisible()
|
||||||
|
&& !mHeaderCompletionPopup->isVisible()) {
|
||||||
|
expression = getExpressionAtPosition(p);
|
||||||
|
s = expression.join(""); // information during coding
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case TipType::Selection:
|
||||||
|
s = selText(); // when a selection is available, always only use that
|
||||||
|
break;
|
||||||
|
case TipType::Error:
|
||||||
|
s = pError->token;
|
||||||
|
break;
|
||||||
|
case TipType::None:
|
||||||
|
cancelHint();
|
||||||
|
mCurrentWord = "";
|
||||||
|
mCurrentTipType = TipType::None;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
s = s.trimmed();
|
||||||
|
if ((s == mCurrentWord) && (mCurrentTipType == reason)) {
|
||||||
|
if (mParser
|
||||||
|
&& mParser->enabled()
|
||||||
|
&& qApp->queryKeyboardModifiers() == Qt::ControlModifier) {
|
||||||
|
if (!hasFocus())
|
||||||
|
activate();
|
||||||
|
setCursor(Qt::PointingHandCursor);
|
||||||
|
} else {
|
||||||
|
updateMouseCursor();
|
||||||
|
}
|
||||||
|
if (pointToLine(pos,line)) {
|
||||||
|
invalidateLine(line);
|
||||||
|
mHoverModifiedLine=line;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove hint
|
||||||
|
cancelHint();
|
||||||
|
mCurrentWord = s;
|
||||||
|
mCurrentTipType = reason;
|
||||||
|
|
||||||
|
|
||||||
|
// Determine what to do with subject
|
||||||
|
QString hint = "";
|
||||||
|
switch (reason) {
|
||||||
|
case TipType::Preprocessor:
|
||||||
|
if (isIncludeNextLine || isIncludeLine) {
|
||||||
|
if (pSettings->editor().enableHeaderToolTips())
|
||||||
|
hint = getFileHint(s, isIncludeNextLine);
|
||||||
|
} else if (//devEditor.ParserHints and
|
||||||
|
!mCompletionPopup->isVisible()
|
||||||
|
&& !mHeaderCompletionPopup->isVisible()) {
|
||||||
|
if (pSettings->editor().enableIdentifierToolTips())
|
||||||
|
hint = getParserHint(QStringList(),s,p.line);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case TipType::Identifier:
|
||||||
|
case TipType::Selection:
|
||||||
|
if (!mCompletionPopup->isVisible()
|
||||||
|
&& !mHeaderCompletionPopup->isVisible()) {
|
||||||
|
if (pMainWindow->debugger()->executing()
|
||||||
|
&& (pSettings->editor().enableDebugTooltips())) {
|
||||||
|
showDebugHint(s,p.line);
|
||||||
|
} else if (pSettings->editor().enableIdentifierToolTips()) { //if devEditor.ParserHints {
|
||||||
|
hint = getParserHint(expression, s, p.line);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case TipType::Error:
|
||||||
|
if (pSettings->editor().enableIssueToolTips())
|
||||||
|
hint = getErrorHint(pError);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
// qDebug()<<"hint:"<<hint;
|
||||||
|
if (!hint.isEmpty()) {
|
||||||
|
// QApplication* app = dynamic_cast<QApplication *>(QApplication::instance());
|
||||||
|
// if (app->keyboardModifiers().testFlag(Qt::ControlModifier)) {
|
||||||
|
if (mParser
|
||||||
|
&& mParser->enabled()
|
||||||
|
&& qApp->queryKeyboardModifiers() == Qt::ControlModifier) {
|
||||||
|
if (!hasFocus())
|
||||||
|
activate();
|
||||||
|
setCursor(Qt::PointingHandCursor);
|
||||||
|
} else if (cursor() == Qt::PointingHandCursor) {
|
||||||
|
updateMouseCursor();
|
||||||
|
}
|
||||||
|
if (pointToLine(pos,line)) {
|
||||||
|
invalidateLine(line);
|
||||||
|
mHoverModifiedLine=line;
|
||||||
|
}
|
||||||
|
if (pMainWindow->functionTip()->isVisible()) {
|
||||||
|
pMainWindow->functionTip()->hide();
|
||||||
|
}
|
||||||
|
QToolTip::showText(mapToGlobal(pos),hint,this);
|
||||||
|
} else {
|
||||||
|
updateMouseCursor();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Editor::resolveAutoDetectEncodingOption()
|
void Editor::resolveAutoDetectEncodingOption()
|
||||||
{
|
{
|
||||||
if (mEncodingOption==ENCODING_AUTO_DETECT) {
|
if (mEncodingOption==ENCODING_AUTO_DETECT) {
|
||||||
|
@ -3829,8 +3830,8 @@ void Editor::cancelHint()
|
||||||
|
|
||||||
// disable editor hint
|
// disable editor hint
|
||||||
QToolTip::hideText();
|
QToolTip::hideText();
|
||||||
//mCurrentWord = "";
|
mCurrentWord="";
|
||||||
//mCurrentTipType = TipType::None;
|
mCurrentTipType=TipType::None;
|
||||||
updateMouseCursor();
|
updateMouseCursor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -236,6 +236,7 @@ private slots:
|
||||||
void onLinesInserted(int first,int count);
|
void onLinesInserted(int first,int count);
|
||||||
void onFunctionTipsTimer();
|
void onFunctionTipsTimer();
|
||||||
void onAutoBackupTimer();
|
void onAutoBackupTimer();
|
||||||
|
void onTooltipTimer();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void resolveAutoDetectEncodingOption();
|
void resolveAutoDetectEncodingOption();
|
||||||
|
@ -344,6 +345,7 @@ private:
|
||||||
std::shared_ptr<QHash<StatementKind, std::shared_ptr<ColorSchemeItem> > > mStatementColors;
|
std::shared_ptr<QHash<StatementKind, std::shared_ptr<ColorSchemeItem> > > mStatementColors;
|
||||||
QTimer mFunctionTipTimer;
|
QTimer mFunctionTipTimer;
|
||||||
QTimer mAutoBackupTimer;
|
QTimer mAutoBackupTimer;
|
||||||
|
QTimer mTooltipTimer;
|
||||||
int mHoverModifiedLine;
|
int mHoverModifiedLine;
|
||||||
|
|
||||||
static QHash<ParserLanguage,std::weak_ptr<CppParser>> mSharedParsers;
|
static QHash<ParserLanguage,std::weak_ptr<CppParser>> mSharedParsers;
|
||||||
|
|
|
@ -777,6 +777,16 @@ void Settings::Editor::setEnableEditTempBackup(bool newEnableEditTempBackup)
|
||||||
mEnableEditTempBackup = newEnableEditTempBackup;
|
mEnableEditTempBackup = newEnableEditTempBackup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int Settings::Editor::tipsDelay() const
|
||||||
|
{
|
||||||
|
return mTipsDelay;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Settings::Editor::setTipsDelay(int newTipsDelay)
|
||||||
|
{
|
||||||
|
mTipsDelay = newTipsDelay;
|
||||||
|
}
|
||||||
|
|
||||||
bool Settings::Editor::showTrailingSpaces() const
|
bool Settings::Editor::showTrailingSpaces() const
|
||||||
{
|
{
|
||||||
return mShowTrailingSpaces;
|
return mShowTrailingSpaces;
|
||||||
|
@ -1408,6 +1418,7 @@ void Settings::Editor::doSave()
|
||||||
saveValue("enable_header_tooltips",mEnableHeaderToolTips);
|
saveValue("enable_header_tooltips",mEnableHeaderToolTips);
|
||||||
saveValue("enable_issue_tooltips",mEnableIssueToolTips);
|
saveValue("enable_issue_tooltips",mEnableIssueToolTips);
|
||||||
saveValue("show_function_tips",mShowFunctionTips);
|
saveValue("show_function_tips",mShowFunctionTips);
|
||||||
|
saveValue("tips_delay",mTipsDelay);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Settings::Editor::doLoad()
|
void Settings::Editor::doLoad()
|
||||||
|
@ -1563,6 +1574,7 @@ void Settings::Editor::doLoad()
|
||||||
mEnableHeaderToolTips = boolValue("enable_header_tooltips", true);
|
mEnableHeaderToolTips = boolValue("enable_header_tooltips", true);
|
||||||
mEnableIssueToolTips = boolValue("enable_issue_tooltips", true);
|
mEnableIssueToolTips = boolValue("enable_issue_tooltips", true);
|
||||||
mShowFunctionTips = boolValue("show_function_tips",true);
|
mShowFunctionTips = boolValue("show_function_tips",true);
|
||||||
|
mTipsDelay = intValue("tips_delay",500);
|
||||||
}
|
}
|
||||||
|
|
||||||
QSynedit::EditCaretType Settings::Editor::caretForOverwrite() const
|
QSynedit::EditCaretType Settings::Editor::caretForOverwrite() const
|
||||||
|
|
|
@ -402,6 +402,9 @@ public:
|
||||||
bool enableEditTempBackup() const;
|
bool enableEditTempBackup() const;
|
||||||
void setEnableEditTempBackup(bool newEnableEditTempBackup);
|
void setEnableEditTempBackup(bool newEnableEditTempBackup);
|
||||||
|
|
||||||
|
int tipsDelay() const;
|
||||||
|
void setTipsDelay(int newTipsDelay);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
//General
|
//General
|
||||||
// indents
|
// indents
|
||||||
|
@ -527,6 +530,7 @@ public:
|
||||||
|
|
||||||
|
|
||||||
//hints tooltip
|
//hints tooltip
|
||||||
|
int mTipsDelay;
|
||||||
bool mEnableTooltips;
|
bool mEnableTooltips;
|
||||||
bool mEnableDebugTooltips;
|
bool mEnableDebugTooltips;
|
||||||
bool mEnableIdentifierToolTips;
|
bool mEnableIdentifierToolTips;
|
||||||
|
|
|
@ -38,7 +38,7 @@ void EditorTooltipsWidget::doLoad()
|
||||||
ui->chkIdentifierTooltips->setChecked(pSettings->editor().enableIdentifierToolTips());
|
ui->chkIdentifierTooltips->setChecked(pSettings->editor().enableIdentifierToolTips());
|
||||||
ui->chkHeaderTooltips->setChecked(pSettings->editor().enableHeaderToolTips());
|
ui->chkHeaderTooltips->setChecked(pSettings->editor().enableHeaderToolTips());
|
||||||
ui->chkDebugTooltips->setChecked(pSettings->editor().enableDebugTooltips());
|
ui->chkDebugTooltips->setChecked(pSettings->editor().enableDebugTooltips());
|
||||||
|
ui->spinTipsDelay->setValue(pSettings->editor().tipsDelay());
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditorTooltipsWidget::doSave()
|
void EditorTooltipsWidget::doSave()
|
||||||
|
@ -49,5 +49,6 @@ void EditorTooltipsWidget::doSave()
|
||||||
pSettings->editor().setEnableIdentifierToolTips(ui->chkIdentifierTooltips->isChecked());
|
pSettings->editor().setEnableIdentifierToolTips(ui->chkIdentifierTooltips->isChecked());
|
||||||
pSettings->editor().setEnableHeaderToolTips(ui->chkHeaderTooltips->isChecked());
|
pSettings->editor().setEnableHeaderToolTips(ui->chkHeaderTooltips->isChecked());
|
||||||
pSettings->editor().setEnableDebugTooltips(ui->chkDebugTooltips->isChecked());
|
pSettings->editor().setEnableDebugTooltips(ui->chkDebugTooltips->isChecked());
|
||||||
|
pSettings->editor().setTipsDelay(ui->spinTipsDelay->value());
|
||||||
pSettings->editor().save();
|
pSettings->editor().save();
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,6 +61,57 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="widget" native="true">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Tool tips delay</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QSpinBox" name="spinTipsDelay">
|
||||||
|
<property name="suffix">
|
||||||
|
<string>ms</string>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>5000</number>
|
||||||
|
</property>
|
||||||
|
<property name="singleStep">
|
||||||
|
<number>100</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer">
|
<spacer name="verticalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
|
|
@ -1687,6 +1687,14 @@
|
||||||
<source>Show expression value tooltips when debugging</source>
|
<source>Show expression value tooltips when debugging</source>
|
||||||
<translation>Mostrar dicas com valor de expressão ao depurar</translation>
|
<translation>Mostrar dicas com valor de expressão ao depurar</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Tool tips delay</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>ms</source>
|
||||||
|
<translation type="unfinished">ms</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>EnvironmentAppearenceWidget</name>
|
<name>EnvironmentAppearenceWidget</name>
|
||||||
|
@ -6531,6 +6539,10 @@
|
||||||
<source>ASM files</source>
|
<source>ASM files</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Lua files</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>RegisterModel</name>
|
<name>RegisterModel</name>
|
||||||
|
@ -7472,6 +7484,53 @@
|
||||||
<translation>Valor</translation>
|
<translation>Valor</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>XMakeCompiler</name>
|
||||||
|
<message>
|
||||||
|
<source>Building xmake.lua file...</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>- Filename: %1</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Can't open '%1' for write!</source>
|
||||||
|
<translation type="unfinished">Impossível abrir '%1' para gravar!</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Compiling project changes...</source>
|
||||||
|
<translation type="unfinished">Compilando alterações em projeto ...</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>- Project Filename: %1</source>
|
||||||
|
<translation type="unfinished">- Nome de arquivo de projeto: %1</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>- Compiler Set Name: %1</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Make program '%1' doesn't exists!</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Please check the "program" page of compiler settings.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Processing makefile:</source>
|
||||||
|
<translation type="unfinished">Processando makefile:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>- makefile processer: %1</source>
|
||||||
|
<translation type="unfinished">- Processador do makefile: %1</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>- Command: %1 %2</source>
|
||||||
|
<translation type="unfinished">- Comando: %1 %2</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>editorcustomctypekeywords</name>
|
<name>editorcustomctypekeywords</name>
|
||||||
<message>
|
<message>
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1564,6 +1564,14 @@
|
||||||
<source>Show expression value tooltips when debugging</source>
|
<source>Show expression value tooltips when debugging</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Tool tips delay</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>ms</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>EnvironmentAppearenceWidget</name>
|
<name>EnvironmentAppearenceWidget</name>
|
||||||
|
@ -6152,6 +6160,10 @@
|
||||||
<source>ASM files</source>
|
<source>ASM files</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Lua files</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>RegisterModel</name>
|
<name>RegisterModel</name>
|
||||||
|
@ -6955,6 +6967,53 @@
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>XMakeCompiler</name>
|
||||||
|
<message>
|
||||||
|
<source>Building xmake.lua file...</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>- Filename: %1</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Can't open '%1' for write!</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Compiling project changes...</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>- Project Filename: %1</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>- Compiler Set Name: %1</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Make program '%1' doesn't exists!</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Please check the "program" page of compiler settings.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Processing makefile:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>- makefile processer: %1</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>- Command: %1 %2</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>editorcustomctypekeywords</name>
|
<name>editorcustomctypekeywords</name>
|
||||||
<message>
|
<message>
|
||||||
|
|
Loading…
Reference in New Issue