KSieveUi::SieveEditorWidget Class
The SieveEditorWidget class Author: Laurent Montel <montel@kde.org>. More...
| Header: | #include <sieveeditorwidget.h> |
| CMake: | find_package(KPim6KSieveUi REQUIRED)target_link_libraries(mytarget PRIVATE KPim6::KSieveUi) |
Public Functions
| SieveEditorWidget(bool useMenuBar, QWidget *parent = nullptr) | |
| virtual | ~SieveEditorWidget() override |
| void | addFailedMessage(const QString &err) |
| void | addNormalMessage(const QString &msg) |
| void | addOkMessage(const QString &msg) |
| void | checkSpelling() |
| QString | currentHelpTitle() const |
| QUrl | currentHelpUrl() const |
| void | debugSieveScript() |
| bool | hasSelection() const |
| void | insertText(const QString &str) |
| bool | isModified() const |
| bool | isRedoAvailable() const |
| bool | isTextEditor() const |
| bool | isUndoAvailable() const |
| bool | isWordWrap() const |
| void | lowerCase() |
| KSieveUi::SieveEditorWidget::EditorMode | mode() const |
| void | openBookmarkUrl(const QUrl &url) |
| QString | originalScript() const |
| void | print() |
| void | printPreview() |
| bool | printSupportEnabled() const |
| void | resultDone() |
| void | reverseCase() |
| QString | script() const |
| void | sentenceCase() |
| void | setDebugScript(const QString &debug) |
| void | setListOfIncludeFile(const QStringList &listOfIncludeFile) |
| void | setModified(bool b) |
| void | setReadOnly(bool b) |
| void | setScript(const QString &script, bool clearUndoRedo = false) |
| void | setScriptName(const QString &name) |
| void | setSieveCapabilities(const QStringList &capabilities) |
| void | setSieveImapAccountSettings(const KSieveCore::SieveImapAccountSettings &sieveImapAccountSettings) |
| void | setTextAutoGenerateManager(TextAutoGenerateText::TextAutoGenerateManager *manager) |
| void | updateOriginalScript() |
| void | upperCase() |
| void | zoomIn() |
| void | zoomOut() |
| void | zoomReset() |
Public Slots
| void | comment() |
| void | copy() |
| void | cut() |
| void | find() |
| void | goToLine() |
| void | paste() |
| void | redo() |
| void | replace() |
| void | selectAll() |
| void | setWordWrap(bool state) |
| void | slotCheckSyntax() |
| void | slotCreateRulesGraphically() |
| void | slotImport() |
| void | slotSaveAs() |
| void | uncomment() |
| void | undo() |
Signals
| void | changeModeEditor(bool) |
| void | checkSyntax() |
| void | copyAvailable(bool) |
| void | enableButtonOk(bool b) |
| void | modeEditorChanged(KSieveUi::SieveEditorWidget::EditorMode) |
| void | redoAvailable(bool) |
| void | sieveEditorTabCurrentChanged() |
| void | undoAvailable(bool) |
| void | valueChanged(bool b) |
Detailed Description
Member Function Documentation
[explicit] SieveEditorWidget::SieveEditorWidget(bool useMenuBar, QWidget *parent = nullptr)
Constructs a SieveEditorWidget with the given settings and parent widget. useMenuBar true to display a menu bar. parent The parent widget.
[override virtual noexcept] SieveEditorWidget::~SieveEditorWidget()
Destroys the SieveEditorWidget.
void SieveEditorWidget::addFailedMessage(const QString &err)
Adds a failed message to the message display area. err The error message text.
void SieveEditorWidget::addNormalMessage(const QString &msg)
Adds a normal message to the message display area. msg The message text.
void SieveEditorWidget::addOkMessage(const QString &msg)
Adds a success message to the message display area. msg The success message text.
[signal] void SieveEditorWidget::changeModeEditor(bool)
Emitted when the editor mode is about to change. true if changing mode.
void SieveEditorWidget::checkSpelling()
Starts a spell check of the script.
[signal] void SieveEditorWidget::checkSyntax()
Emitted when syntax check is requested.
[slot] void SieveEditorWidget::comment()
Comments out the selected lines.
[slot] void SieveEditorWidget::copy()
Copies the selected text to the clipboard.
[signal] void SieveEditorWidget::copyAvailable(bool)
Emitted when text copy availability changes. true if text can be copied.
QString SieveEditorWidget::currentHelpTitle() const
Returns the current help title. Returns The help title string.
QUrl SieveEditorWidget::currentHelpUrl() const
Returns the current help URL. Returns The help URL.
[slot] void SieveEditorWidget::cut()
Cuts the selected text and places it on the clipboard.
void SieveEditorWidget::debugSieveScript()
Starts debugging the Sieve script.
[signal] void SieveEditorWidget::enableButtonOk(bool b)
Emitted when the OK button should be enabled or disabled. b true to enable the button.
[slot] void SieveEditorWidget::find()
Opens the find dialog.
[slot] void SieveEditorWidget::goToLine()
Opens the go to line dialog.
bool SieveEditorWidget::hasSelection() const
Checks if text is currently selected. Returns true if there is a selection.
void SieveEditorWidget::insertText(const QString &str)
insertText str text to insert in current position
bool SieveEditorWidget::isModified() const
Checks if the script has been modified. Returns true if the script is modified.
bool SieveEditorWidget::isRedoAvailable() const
Checks if redo is available. Returns true if redo can be performed.
bool SieveEditorWidget::isTextEditor() const
Checks if the editor is in text editor mode. Returns true if in text mode.
bool SieveEditorWidget::isUndoAvailable() const
Checks if undo is available. Returns true if undo can be performed.
bool SieveEditorWidget::isWordWrap() const
Checks if word wrap is enabled. Returns true if word wrap is active.
void SieveEditorWidget::lowerCase()
Converts the selected text to lowercase.
KSieveUi::SieveEditorWidget::EditorMode SieveEditorWidget::mode() const
Returns the current editor mode. Returns The EditorMode enumeration value.
[signal] void SieveEditorWidget::modeEditorChanged(KSieveUi::SieveEditorWidget::EditorMode)
Emitted when the editor mode has changed. The new editor mode.
void SieveEditorWidget::openBookmarkUrl(const QUrl &url)
Opens a bookmarked help URL. url The URL to open.
QString SieveEditorWidget::originalScript() const
Returns the original script before any modifications. Returns The original script content.
[slot] void SieveEditorWidget::paste()
Pastes content from the clipboard.
void SieveEditorWidget::print()
Prints the script.
void SieveEditorWidget::printPreview()
Shows the print preview dialog.
bool SieveEditorWidget::printSupportEnabled() const
Checks if print support is enabled. Returns true if printing is supported.
[slot] void SieveEditorWidget::redo()
Redoes the last undone action.
[signal] void SieveEditorWidget::redoAvailable(bool)
Emitted when redo availability changes. true if redo is now available.
[slot] void SieveEditorWidget::replace()
Opens the find and replace dialog.
void SieveEditorWidget::resultDone()
Marks the script as done (successful execution).
void SieveEditorWidget::reverseCase()
Reverses the case of the selected text.
QString SieveEditorWidget::script() const
Returns the current Sieve script. Returns The script content.
See also setScript().
[slot] void SieveEditorWidget::selectAll()
Selects all text in the editor.
void SieveEditorWidget::sentenceCase()
Converts the selected text to sentence case.
void SieveEditorWidget::setDebugScript(const QString &debug)
Sets the debug script for debugging purposes. debug The debug script content.
void SieveEditorWidget::setListOfIncludeFile(const QStringList &listOfIncludeFile)
Sets the list of include files available for Sieve scripts. listOfIncludeFile The list of include file names.
void SieveEditorWidget::setModified(bool b)
Sets the modified state of the script. b true if the script has been modified.
See also isModified().
void SieveEditorWidget::setReadOnly(bool b)
Sets the editor to read-only mode. b true to make the editor read-only.
void SieveEditorWidget::setScript(const QString &script, bool clearUndoRedo = false)
Sets the Sieve script content. script The script to set. clearUndoRedo true to clear undo/redo history.
See also script().
void SieveEditorWidget::setScriptName(const QString &name)
Sets the name of the Sieve script. name The script name.
void SieveEditorWidget::setSieveCapabilities(const QStringList &capabilities)
Sets the Sieve capabilities supported by the server. capabilities A list of capability strings.
void SieveEditorWidget::setSieveImapAccountSettings(const KSieveCore::SieveImapAccountSettings &sieveImapAccountSettings)
Sets the IMAP account settings for Sieve. sieveImapAccountSettings The account settings.
void SieveEditorWidget::setTextAutoGenerateManager(TextAutoGenerateText::TextAutoGenerateManager *manager)
setTextAutoGenerateManager manager
[slot] void SieveEditorWidget::setWordWrap(bool state)
Enables or disables word wrap. state true to enable word wrap.
See also isWordWrap().
[signal] void SieveEditorWidget::sieveEditorTabCurrentChanged()
Emitted when the editor tab has changed.
[slot] void SieveEditorWidget::slotCheckSyntax()
Checks the syntax of the script.
[slot] void SieveEditorWidget::slotCreateRulesGraphically()
Opens the graphical rule creator.
[slot] void SieveEditorWidget::slotImport()
Opens the import dialog.
[slot] void SieveEditorWidget::slotSaveAs()
Opens the save as dialog.
[slot] void SieveEditorWidget::uncomment()
Uncomments the selected lines.
[slot] void SieveEditorWidget::undo()
Undoes the last action.
[signal] void SieveEditorWidget::undoAvailable(bool)
Emitted when undo availability changes. true if undo is now available.
void SieveEditorWidget::updateOriginalScript()
Updates the original script content (marks current as original).
void SieveEditorWidget::upperCase()
Converts the selected text to uppercase.
[signal] void SieveEditorWidget::valueChanged(bool b)
Emitted when the script value has changed. b true if the script has been modified.
void SieveEditorWidget::zoomIn()
Zooms in the editor view.
void SieveEditorWidget::zoomOut()
Zooms out the editor view.
void SieveEditorWidget::zoomReset()
Resets the zoom level to default.