X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiCompleter.h;h=2a17c842e63d927789b1416ecfc2ff4bc90d3824;hb=425d092204118ea6c24c28e85fdf03fcf2bb51a4;hp=7cb87535a09187043bee5e6b3681480d181d519f;hpb=b4466b63f6c7ee665b8c3e18629a6595132a1b80;p=lyx.git diff --git a/src/frontends/qt4/GuiCompleter.h b/src/frontends/qt4/GuiCompleter.h index 7cb87535a0..2a17c842e6 100644 --- a/src/frontends/qt4/GuiCompleter.h +++ b/src/frontends/qt4/GuiCompleter.h @@ -31,7 +31,8 @@ class Buffer; namespace frontend { class GuiWorkArea; -class RtlItemDelegate; +class CompleterItemDelegate; +class GuiCompletionModel; class GuiCompleter : private QCompleter { @@ -69,6 +70,8 @@ public: QString currentCompletion() const; /// docstring longestUniqueCompletion() const; + /// + bool uniqueCompletionAvailable() const; public Q_SLOTS: /// Show the popup. @@ -88,8 +91,12 @@ private Q_SLOTS: void popupHighlighted(const QString & completion); /// void updateAvailability(); - /// - void asyncCompletePopup(); + /// the asynchronous part of updatePopup(cur) + void asyncUpdatePopup(); + /// the asynchronous part of hidePopup(cur) + void asyncHidePopup(); + /// the asynchronous part of hideInline(cur) + void asyncHideInline(); private: /// @@ -131,8 +138,13 @@ private: bool inlineVisible_; /// bool popupVisible_; + /// the model reset is asynchronous in hidePopup/Inline. So let's mark + /// a coming reset here by setting it to false. + bool modelActive_; + /// + CompleterItemDelegate * itemDelegate_; /// - RtlItemDelegate * rtlItemDelegate_; + GuiCompletionModel * model_; }; // GuiCompleter } // namespace frontend