namespace frontend {
class GuiWorkArea;
+class RtlItemDelegate;
class GuiCompleter : private QCompleter
{
bool popupPossible(Cursor const & cur) const;
///
bool inlinePossible(Cursor const & cur) const;
+ ///
+ bool completionAvailable() const;
/// Activate the current completion, i.e. finalize it.
void activate();
/// Do a completion as far as it is unique, but at least one character.
/// Show the inline completion.
void showInline();
+ /// Hide the popup.
+ void hidePopup();
+ /// Hide the inline completion.
+ void hideInline();
+
private Q_SLOTS:
///
void popupActivated(const QString & completion);
///
void popupHighlighted(const QString & completion);
+ ///
+ void updateAvailability();
+ /// 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:
///
///
void showInline(Cursor & cur);
///
+ void hidePopup(Cursor & cur);
+ ///
+ void hideInline(Cursor & cur);
+ ///
void updatePopup(Cursor & cur);
///
void updateInline(Cursor & cur, QString const & completion);
int updateLock_;
/// the BufferView::inlineCursorPos might be reset by destructive
/// operations like backspace. Hence, we have to keep this flag
- /// in addition to know whether the popup is to be kept visible.
+ /// in addition to know whether the completion is to be kept visible.
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_;
+ ///
+ RtlItemDelegate * rtlItemDelegate_;
}; // GuiCompleter
} // namespace frontend