#include <ContentEditor.h>
Public Slots | |
void | slotBrowse () |
void | slotExport () |
void | slotRevert () |
void | slotViewContentAs (int cType) |
void | slotTextChanged () |
Public Member Functions | |
ContentEditor (QWidget *parent=0, bool binaryContent=false, bool readOnly=true, Qt::WindowFlags f=0) | |
~ContentEditor () | |
QVariant | contents () const |
bool | isBinary () const |
bool | isReadOnly () const |
bool | isModified () const |
QTextEdit * | getEditor () |
void | prepareEditor (bool enableBinary=false, bool enableReadOnly=true) |
void | setContent (QVariant content=QVariant(), ContentType cType=StringCT, bool defaultValue=false) |
Private Member Functions | |
void | setConnections () |
Private Attributes | |
bool | contentBinary |
bool | contentReadOnly |
ContentType | defaultContentType |
ContentType | currentContentType |
QVariant | defaultContent |
QVariant | currentContent |
bool | modified |
QString | browsedFileName |
Definition at line 11 of file ContentEditor.h.
ContentEditor::ContentEditor | ( | QWidget * | parent = 0 , |
|
bool | binaryContent = false , |
|||
bool | readOnly = true , |
|||
Qt::WindowFlags | f = 0 | |||
) |
Definition at line 13 of file ContentEditor.cpp.
References contentBinary, contentReadOnly, prepareEditor(), setConnections(), and Ui_ContentEditor_BASE::setupUi().
ContentEditor::~ContentEditor | ( | ) |
Definition at line 28 of file ContentEditor.cpp.
QVariant ContentEditor::contents | ( | ) | const |
Definition at line 42 of file ContentEditor.cpp.
References contentBinary, contentReadOnly, currentContent, currentContentType, HexCT, modified, StringCT, and Ui_ContentEditor_BASE::textEdit.
Referenced by FolderTableDelegate::setModelData(), slotExport(), and slotViewContentAs().
bool ContentEditor::isBinary | ( | ) | const |
bool ContentEditor::isReadOnly | ( | ) | const |
bool ContentEditor::isModified | ( | ) | const |
Definition at line 77 of file ContentEditor.cpp.
References modified.
Referenced by FolderTableDelegate::setModelData().
QTextEdit * ContentEditor::getEditor | ( | ) |
void ContentEditor::prepareEditor | ( | bool | enableBinary = false , |
|
bool | enableReadOnly = true | |||
) |
Definition at line 87 of file ContentEditor.cpp.
References contentBinary, contentReadOnly, defaultContentType, HexCT, Ui_ContentEditor_BASE::pushButton_Browse, Ui_ContentEditor_BASE::pushButton_Export, Ui_ContentEditor_BASE::pushButton_OK, slotTextChanged(), and Ui_ContentEditor_BASE::textEdit.
Referenced by ContentEditor().
void ContentEditor::setContent | ( | QVariant | content = QVariant() , |
|
ContentType | cType = StringCT , |
|||
bool | defaultValue = false | |||
) |
Definition at line 118 of file ContentEditor.cpp.
References Ui_ContentEditor_BASE::comboBox_ContentType, currentContent, currentContentType, defaultContent, defaultContentType, HexCT, modified, Ui_ContentEditor_BASE::pushButton_Revert, slotTextChanged(), StringCT, and Ui_ContentEditor_BASE::textEdit.
Referenced by FolderTableDelegate::setEditorData(), slotBrowse(), slotRevert(), and slotViewContentAs().
void ContentEditor::setConnections | ( | ) | [private] |
Definition at line 33 of file ContentEditor.cpp.
References Ui_ContentEditor_BASE::comboBox_ContentType, Ui_ContentEditor_BASE::pushButton_Browse, Ui_ContentEditor_BASE::pushButton_Cancel, Ui_ContentEditor_BASE::pushButton_Export, Ui_ContentEditor_BASE::pushButton_Revert, slotBrowse(), slotExport(), slotRevert(), and slotViewContentAs().
Referenced by ContentEditor().
void ContentEditor::slotBrowse | ( | ) | [slot] |
Definition at line 192 of file ContentEditor.cpp.
References browsedFileName, contentBinary, defaultContent, HexCT, setContent(), and StringCT.
Referenced by setConnections().
void ContentEditor::slotExport | ( | ) | [slot] |
Definition at line 221 of file ContentEditor.cpp.
References contentBinary, and contents().
Referenced by setConnections().
void ContentEditor::slotRevert | ( | ) | [slot] |
Definition at line 260 of file ContentEditor.cpp.
References setContent().
Referenced by setConnections().
void ContentEditor::slotViewContentAs | ( | int | cType | ) | [slot] |
Definition at line 265 of file ContentEditor.cpp.
References contents(), setContent(), slotTextChanged(), and Ui_ContentEditor_BASE::textEdit.
Referenced by setConnections().
void ContentEditor::slotTextChanged | ( | ) | [slot] |
Definition at line 274 of file ContentEditor.cpp.
References contentReadOnly, modified, and Ui_ContentEditor_BASE::pushButton_Revert.
Referenced by prepareEditor(), setContent(), and slotViewContentAs().
bool ContentEditor::contentBinary [private] |
Definition at line 29 of file ContentEditor.h.
Referenced by ContentEditor(), contents(), isBinary(), prepareEditor(), slotBrowse(), and slotExport().
bool ContentEditor::contentReadOnly [private] |
Definition at line 30 of file ContentEditor.h.
Referenced by ContentEditor(), contents(), isReadOnly(), prepareEditor(), and slotTextChanged().
ContentType ContentEditor::defaultContentType [private] |
ContentType ContentEditor::currentContentType [private] |
QVariant ContentEditor::defaultContent [private] |
QVariant ContentEditor::currentContent [private] |
bool ContentEditor::modified [private] |
Definition at line 35 of file ContentEditor.h.
Referenced by contents(), isModified(), setContent(), and slotTextChanged().
QString ContentEditor::browsedFileName [private] |