Toolbar widget for editing arbitrary text. More...
#include <edittool.h>
Signals | |
| void | clicked (const QString &name) |
Public Member Functions | |
| EditTool (const QString &cName, QWidget *parent=0, const char *name=NULL) | |
| ~EditTool () | |
| QSize | sizeHint () const |
| QString | getName () const |
| QString | getText () const |
| void | setText (const QString &newText) |
Protected Slots | |
| void | textEntered () |
Protected Member Functions | |
| void | resizeEvent (QResizeEvent *e) |
Protected Attributes | |
| QLineEdit * | ed |
| QString | text |
| QString | textName |
Toolbar widget for editing arbitrary text.
Toolbutton allowing to change text in the line edit control Scripts can read/write the text when needed Can be placed in toolbar in place of ordinary button
| gui::EditTool::EditTool | ( | const QString & | cName, | |
| QWidget * | parent = 0, |
|||
| const char * | name = NULL | |||
| ) |
Default constructor of EditTool
| parent | Toolbar containing this control | |
| name | Name of this widget (passed to QWidget constructor) | |
| cName | name of color in this widget |
References ed, text, textEntered(), and textName.
| gui::EditTool::~EditTool | ( | ) |
default destructor
| void gui::EditTool::clicked | ( | const QString & | name | ) | [signal] |
Signal emitted when user changes the text
| name | Name of the text tool |
Referenced by textEntered().
| QString gui::EditTool::getName | ( | ) | const |
Return name of the text edit box
References textName.
| QString gui::EditTool::getText | ( | ) | const |
Return text inside this control
References text.
| void gui::EditTool::resizeEvent | ( | QResizeEvent * | e | ) | [protected] |
Called on resizing of property editing control Will simply set the same fixed size to inner editbox
| e | resize event |
References ed.
| void gui::EditTool::setText | ( | const QString & | newText | ) |
| QSize gui::EditTool::sizeHint | ( | ) | const |
| void gui::EditTool::textEntered | ( | ) | [protected, slot] |
Called on pressing enter or loosing focus
References clicked(), ed, text, and textName.
Referenced by EditTool().
QLineEdit* gui::EditTool::ed [protected] |
combo box or line edit for the text
Referenced by EditTool(), resizeEvent(), setText(), sizeHint(), and textEntered().
QString gui::EditTool::text [protected] |
Text typed in the tool
Referenced by EditTool(), getText(), setText(), and textEntered().
QString gui::EditTool::textName [protected] |
Name of text in this widget
Referenced by EditTool(), getName(), and textEntered().