SubmitEditorWidget Class

(VcsBase::SubmitEditorWidget)

The SubmitEditorWidget class presents a VCS commit message in a text editor and a checkable list of modified files in a list window. More...

Header: #include <SubmitEditorWidget>

Public Functions

QString descriptionText() const
int fileListSelectionMode() const
bool isDescriptionMandatory() const
bool isEmptyFileListEnabled() const
bool lineWrap() const
int lineWrapWidth() const
void setDescriptionMandatory(bool)
void setDescriptionText(const QString &text)
void setEmptyFileListEnabled(bool e)
void setFileListSelectionMode(int sm)
void setLineWrap(bool)
void setLineWrapWidth(int)

Detailed Description

The user can delete files from the list by unchecking them or diff the selection by doubleclicking. A list model which contains state and file columns should be set using setFileModel().

Additionally, standard creator actions can be registered: Undo/redo will be set up to work with the description editor. Submit will be set up to be enabled according to checkstate. Diff will be set up to trigger diffSelected().

Note that the actions are connected by signals; in the rare event that there are several instances of the SubmitEditorWidget belonging to the same context active, the actions must be registered/unregistered in the editor change event. Care should be taken to ensure the widget is deleted properly when the editor closes.