diff -r 0f2326c2a325 -r 1c3b8676e58c ginebra2/EditorSnippet.cpp --- a/ginebra2/EditorSnippet.cpp Wed Jun 23 17:59:43 2010 +0300 +++ b/ginebra2/EditorSnippet.cpp Tue Jul 06 14:03:49 2010 +0300 @@ -29,11 +29,18 @@ connectAll(); } - void EditorSnippet::setWidget(QGraphicsWidget * widget){ - ChromeSnippet::setWidget(widget); + void EditorSnippet::setChromeWidget(QGraphicsWidget * widget){ + ChromeSnippet::setChromeWidget(widget); connectAll(); } + EditorSnippet * EditorSnippet::instance(const QString& elementId, ChromeWidget * chrome, const QWebElement & element) + { + EditorSnippet* that = new EditorSnippet(elementId, chrome, 0, element); + that->setChromeWidget( new TextEditItem( that, chrome ) ); + return that; + } + void EditorSnippet::connectAll(){ if(m_widget){ GTextEditor * editor = static_cast(m_widget)->editor(); @@ -82,4 +89,16 @@ void EditorSnippet::unselect(){ return static_cast(m_widget)->unselect(); } + + int EditorSnippet::getTextOptions(){ + return (int) static_cast(m_widget)->getTextOptions(); + } + + void EditorSnippet::setTextOptions(int flag){ + return static_cast(m_widget)->setTextOptions(flag); + } + + void EditorSnippet::setMaxTextLength(int length){ + return static_cast(m_widget)->setMaxTextLength(length); + } }