equal
deleted
inserted
replaced
33 { |
33 { |
34 Q_OBJECT |
34 Q_OBJECT |
35 public: |
35 public: |
36 EditorSnippet(const QString & elementId, ChromeWidget * chrome, QGraphicsWidget * widget, const QWebElement & element); |
36 EditorSnippet(const QString & elementId, ChromeWidget * chrome, QGraphicsWidget * widget, const QWebElement & element); |
37 virtual ~EditorSnippet() {;} |
37 virtual ~EditorSnippet() {;} |
38 virtual void setWidget(QGraphicsWidget * widget); |
38 static EditorSnippet * instance(const QString& elementId, ChromeWidget * chrome, const QWebElement & element); |
|
39 virtual void setChromeWidget(QGraphicsWidget * widget); |
39 Q_PROPERTY( QString text READ text WRITE setText) |
40 Q_PROPERTY( QString text READ text WRITE setText) |
40 void setText( const QString & text ); |
41 void setText( const QString & text ); |
41 QString text(); |
42 QString text(); |
42 public slots: |
43 public slots: |
43 int charCount(); |
44 int charCount(); |
44 void setCursorPosition(int pos); |
45 void setCursorPosition(int pos); |
45 void selectAll(); |
46 void selectAll(); |
46 void unselect(); |
47 void unselect(); |
47 void onFocusChanged(bool in); |
48 void onFocusChanged(bool in); |
48 void onTapped(QPointF& pos); |
49 void onTapped(QPointF& pos); |
|
50 int getTextOptions(); |
|
51 // Calling this function will overwrite the existing options |
|
52 void setTextOptions(int flag); |
|
53 void setMaxTextLength(int length); |
49 signals: |
54 signals: |
50 void activated(); |
55 void activated(); |
51 void lostFocus(); |
56 void lostFocus(); |
52 void gainedFocus(); |
57 void gainedFocus(); |
53 void textChanged(); |
58 void textChanged(); |