Version 1.13.0

This commit is contained in:
2020-09-16 01:28:37 +03:00
parent 1bcef63d3d
commit 22b9abfcb4
7 changed files with 81 additions and 13 deletions

View File

@@ -58,10 +58,16 @@ public:
ACEntry(const QString & t = QString(), const QString & n = QString(), const QString & h = QString()):
type(t), name(n), hint(h) {declaration_pos = -1;}
bool isNull() const {return type.isEmpty() && name.isEmpty();}
QString declaration() const;
ACEntry & addHint(QString h) {hint = h; return *this;}
ACEntry & addHelpHRef(QUrl h) {help_href = h; return *this;}
ACEntry & addCustomData(QVariant d) {custom_data = d; return *this;}
QString type;
QString name;
QString hint;
int declaration_pos;
QString declaration_file;
QUrl help_href;
QVariant custom_data;
};
@@ -80,6 +86,7 @@ public:
bool showSpaces() const {return spaces_;}
bool showLineNumbers() const;
void setHelpHintVisible(bool on);
bool isHelpHintVisible() const;
void setEditorFont(QFont f);
QFont editorFont() const;
@@ -88,7 +95,7 @@ public:
void registerAutoCompletitionClass(int id, ACClassType ac_class, const QString & name, const QIcon & icon = QIcon());
bool wordCompletitionEnabled() const {return word_complet;}
bool wordCompletitionEnabled() const {return word_complete;}
protected:
typedef QPair<QString, QString> StringsPair;
@@ -136,10 +143,10 @@ private:
QList<QTextEdit::ExtraSelection> es_selected, es_custom, es_brackets, es_search_list;
QMap<int, ACClass> ac_classes;
QStringList cursor_scope;
ACEntry link_entry;
ACEntry link_entry, help_entry;
int prev_lc, auto_comp_pl, timer, cur_search_ind, pos_press, pos_el_press;
bool spaces_, _ignore_focus_out, _first, _destructor, _replacing;
bool word_complet;
bool word_complete, help_visible;
bool eventFilter(QObject * o, QEvent * e) override;
void showEvent(QShowEvent * ) override;
@@ -155,6 +162,7 @@ private:
private slots:
void _activateLink(QCodeEdit::ACEntry e) {linkClicked(e);}
void gotoHelpHRef(QCodeEdit::ACEntry e);
void syncScrolls();
void scrollUp();
void scrollDown();
@@ -195,7 +203,7 @@ public slots:
void searchNext(bool next = true);
void searchPrevious();
void hideSearch();
void setWordCompletitionEnabled(bool on) {word_complet = on;}
void setWordCompletitionEnabled(bool on) {word_complete = on;}
signals:
void textChanged();