QCodeEdit
2.2
|
A thin layer over QEditor. More...
Public Types | |
enum | Position { West, North, South, East } |
Public Member Functions | |
QCodeEdit (QWidget *p=0) | |
ctor | |
QCodeEdit (bool actions, QWidget *p=0) | |
ctor | |
QCodeEdit (const QString &layout, QWidget *p=0) | |
ctor | |
QCodeEdit (const QString &layout, bool actions, QWidget *p=0) | |
ctor | |
virtual | ~QCodeEdit () |
dtor | |
QEditor * | editor () const |
QPanelLayout * | panelLayout () const |
QAction * | addPanel (QPanel *panel, Position pos, bool _add=false) |
Add a panel. | |
QAction * | addPanel (const QString &name, Position pos, bool _add=false) |
bool | hasPanel (const QString &type) const |
QList< QPanel * > | panels (const QString &type=QString()) const |
QAction * | toggleViewAction (QPanel *p) const |
void | sendPanelCommand (const QString &type, const char *signature, const QList< QGenericArgument > &args=Q_COMMAND) |
Send a command to every panel of a given type. | |
QCodeEdit (QEditor *e, QPanelLayout *p) | |
ctor | |
QCodeEdit (QEditor *e, const QString &l) | |
ctor | |
Static Public Member Functions | |
static QCodeEdit * | manager (QEditor *e) |
static QEditor * | managed (const QString &f) |
The (first) managed editor editing a given file or a null pointer if none found. | |
Friends | |
class | QPanelWatcher |
A thin layer over QEditor.
The QCodeEdit class provides simple means to associate panels with editors and manage them.
QCodeEdit::QCodeEdit | ( | QWidget * | p = 0 | ) |
ctor
The created editor object comes with builtin actions.
QCodeEdit::QCodeEdit | ( | bool | actions, |
QWidget * | p = 0 |
||
) |
ctor
actions | whether the QEditor object should create builtin actions |
QCodeEdit::QCodeEdit | ( | const QString & | layout, |
QWidget * | p = 0 |
||
) |
ctor
layout | structure of the panel layout |
The created editor object comes with builtin actions.
QCodeEdit::QCodeEdit | ( | const QString & | layout, |
bool | actions, | ||
QWidget * | p = 0 |
||
) |
ctor
layout | structure of the panel layout |
actions | whether the QEditor object should create builtin actions |
QCodeEdit::~QCodeEdit | ( | ) | [virtual] |
dtor
QCodeEdit::QCodeEdit | ( | QEditor * | e, |
QPanelLayout * | p | ||
) |
ctor
e | editor to manage |
p | panel layout to associate with the editor |
QCodeEdit::QCodeEdit | ( | QEditor * | e, |
const QString & | l | ||
) |
ctor
e | editor to manage |
l | structure of the panel layout |
QAction * QCodeEdit::addPanel | ( | QPanel * | panel, |
Position | pos, | ||
bool | _add = false |
||
) |
Add a panel.
panel | panel to add |
pos | position of the panel in the layout |
_add | whether to add the show action of the panel to the menu of the editor |
References QPanel::attach().
Referenced by addPanel().
QAction * QCodeEdit::addPanel | ( | const QString & | name, |
Position | pos, | ||
bool | _add = false |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
name | name of panel to add |
pos | position of the panel in the layout |
_add | whether to add the show action of the panel to the menu of the editor |
References addPanel().
QEditor * QCodeEdit::editor | ( | ) | const |
bool QCodeEdit::hasPanel | ( | const QString & | type | ) | const |
Referenced by QEditor::gotoLine().
QCodeEdit * QCodeEdit::manager | ( | QEditor * | e | ) | [static] |
Referenced by QEditor::find(), QEditor::findNext(), QEditor::gotoLine(), and QEditor::replace().
QPanelLayout * QCodeEdit::panelLayout | ( | ) | const |
QList< QPanel * > QCodeEdit::panels | ( | const QString & | type = QString() | ) | const |
type | Type of panel to look for (no filtering is performed if empty) |
Referenced by sendPanelCommand(), and toggleViewAction().
void QCodeEdit::sendPanelCommand | ( | const QString & | type, |
const char * | signature, | ||
const QList< QGenericArgument > & | args = Q_COMMAND |
||
) |
Send a command to every panel of a given type.
signature | method name suitable for QMetaObject::invokeMethod() |
args | list of arguments suitable for QMetaObject::invokeMethod() |
Example use :
sendPanelCommand("Status", "setVisible" Q_COMMAND << Q_ARG(bool, false));
References panels().
Referenced by QEditor::find(), QEditor::findNext(), QEditor::gotoLine(), and QEditor::replace().
QAction * QCodeEdit::toggleViewAction | ( | QPanel * | p | ) | const |
References panels().