diff -r 1c3b8676e58c -r 232fbd5a2dcb ginebra2/EditorWidget.h --- a/ginebra2/EditorWidget.h Tue Jul 06 14:03:49 2010 +0300 +++ b/ginebra2/EditorWidget.h Wed Aug 18 09:37:05 2010 +0300 @@ -54,6 +54,7 @@ bool hasSelection() { return (cursorX()!= anchorX()); } Qt::InputMethodHints inputMethodHints() const { return m_hints; } void setInputMethodHints(Qt::InputMethodHints hints); + void setSpecificButton(QString& commitString, QString& buttonIconPath); protected: virtual void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget); @@ -68,6 +69,7 @@ private slots: void contentsChange(int position, int charsRemoved, int charsAdded); + void specificBtnTriggered(bool checked); signals: void cursorXChanged(qreal newx); @@ -80,6 +82,9 @@ int m_defaultStartDragDistance; int m_maxTextLength; Qt::InputMethodHints m_hints; + bool m_setSpecificBtn; + QString m_spBtnCommitString; + QString m_spBtnIconPath; }; class GLineEditor : public QGraphicsWidget @@ -110,6 +115,7 @@ // Calling this function will overwrite the existing hints void setInputMethodHints(Qt::InputMethodHints hints) { m_editor->setInputMethodHints(hints); } void setMaxTextLength(int length) { m_editor->setMaxTextLength(length); } + void setSpecificButton(QString commitString, QString buttonIcon) { m_editor->setSpecificButton(commitString, buttonIcon);} protected: virtual bool eventFilter(QObject * object, QEvent * event);