kexi

KexiEditor Class Reference

#include <kexieditor.h>

Inheritance diagram for KexiEditor:

KexiViewBase KexiActionProxy KexiQueryDesignerSQLEditor KexiScriptEditor List of all members.

Detailed Description

An text editor view that uses both KTextEditor and KTextEdit.

It is used for SQL and script editor.

Definition at line 39 of file kexieditor.h.


Public Slots

void setText (const QString &text)
void slotConfigureEditor ()

Signals

void textChanged ()

Public Member Functions

 KexiEditor (KexiMainWindow *mainWin, QWidget *parent, const char *name=0)
virtual ~KexiEditor ()
QString text ()
void setHighlightMode (const QString &highlightmodename)
void jump (int character)
void setCursorPosition (int line, int col)
void clearUndoRedo ()

Static Public Member Functions

static bool isAdvancedEditor ()

Protected Member Functions

virtual void updateActions (bool activated)

Constructor & Destructor Documentation

KexiEditor::KexiEditor ( KexiMainWindow mainWin,
QWidget *  parent,
const char *  name = 0 
)

Constructor.

Parameters:
mainWin The KexiMainWindow instance this KexiEditor belongs too.
parent The parent QWidget this KexiEditor is child of. You don't need to free the KexiEditor cause Qt will handle that for us.
name The name this KexiEditor has. Used only for debugging.

Definition at line 84 of file kexieditor.cpp.

KexiEditor::~KexiEditor (  )  [virtual]

Destructor.

Definition at line 129 of file kexieditor.cpp.


Member Function Documentation

bool KexiEditor::isAdvancedEditor (  )  [static]

Returns:
true if internally the KTextEditor::EditorChooser got used else, if a simple KTextEdit is used, false is returned.

Definition at line 138 of file kexieditor.cpp.

QString KexiEditor::text (  ) 

Returns:
the text displayed in the editor-widget.

Definition at line 147 of file kexieditor.cpp.

void KexiEditor::setHighlightMode ( const QString &  highlightmodename  ) 

Set the highlight-mode to highlightmodename .

If isAdvancedEditor returns false (KTextEdit is used rather then KTextEditor), then the method just does nothing. The highlightmodename could be any kind of string like e.g. "python", "kjs" or "sql" KTextEditor supports.

Definition at line 175 of file kexieditor.cpp.

void KexiEditor::jump ( int  character  ) 

Find row and column for this character and jump to the position.

Definition at line 202 of file kexieditor.cpp.

void KexiEditor::setCursorPosition ( int  line,
int  col 
)

Set the cursor position to line and col .

Definition at line 235 of file kexieditor.cpp.

void KexiEditor::clearUndoRedo (  ) 

Clear all remembered undo/redo-actions.

Only avaiable if isAdvancedEditor returns true.

Definition at line 245 of file kexieditor.cpp.

void KexiEditor::setText ( const QString &  text  )  [slot]

Sets editor's text to text. 'Dirty' flag remains unchanged.

Definition at line 159 of file kexieditor.cpp.

void KexiEditor::slotConfigureEditor (  )  [slot]

Display the configuration-dialog. Only avaiable if isAdvancedEditor() returns true.

Definition at line 191 of file kexieditor.cpp.

void KexiEditor::updateActions ( bool  activated  )  [protected, virtual]

Update the actions. This call is redirected to KexiViewBase::updateActions

Reimplemented from KexiViewBase.

Definition at line 133 of file kexieditor.cpp.

void KexiEditor::textChanged (  )  [signal]

Emitted if the text displayed in the editor changed.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys