Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members

CUTEView Class Reference

#include <cuteview.h>

List of all members.

Public Types

enum  { CUTE_MARGIN = 0, CUTE_LINENUMBER_MARGIN = 1, CUTE_FOLD_MARGIN = 2 }

Signals

void save ()
void closed (CUTEView *view=0)
void setTabCaption (QWidget *view, QString name)

Public Member Functions

 CUTEView (QWidget *parent=0, QString title="Document", tagFile *tags=0)
void configure ()
void sendEditor (unsigned int msg, unsigned long wParam=0, long lParam=0)
bool loadFile (const char *file)
bool reloadFile ()
bool saveFile (const char *file=0, bool force=false)
void toggleBookmark (int line)
void addError (int line)
int addBookmark (int line)
void deleteAllErrors ()
void findNextBookmark ()
void findPrevBookmark ()
void insertCommand (QString)
void filter (QString)
void startMacroRecording ()
void stopMacroRecording ()
void runMacro ()
void loadMacro (QString &file)
void saveMacro (QString &file)
bool setMacro (QString)
QString macroString ()
bool findFirst (const QString &expr, bool re=false, bool cs=false, bool wo=false, bool wrap=true, bool forward=TRUE, int line=-1, int index=-1)
bool findNext ()
bool findPrev ()
void setupLexer (const QString &)
void replaceAll (const QString &expr, const QString &replaceStr, bool re, bool cs, bool wo, bool wrap, bool forward=TRUE, bool confirm=false)
bool edited ()
bool canUndo ()
bool canRedo ()
void undo ()
void redo ()
QString line (int l)
CUTEScintilla * scintilla ()
void setActions (QMap< int, QAction * >)
char * fileName ()
Config::Lexer * lexer ()
void setLexer (Config::Lexer *l)
void getCursorPosition (int &line, int &index)
void getSelection (int &lineFrom, int &indexFrom, int &lineTo, int &indexTo)
void clear ()
QValueList< int > bookmarks ()
void removeAllBookmarks ()
QString langName ()
void setFocus ()

Protected Slots

void slotDocumentChanged ()
void slotMarginClicked (int margin, int line, Qt::ButtonState state)
void insertStdout ()
void processExited ()
void recordMacro (unsigned int, unsigned long, long)
void slotCharAdded (int)

Protected Member Functions

void closeEvent (QCloseEvent *e)


Detailed Description

view in mulit document interface


Member Function Documentation

int CUTEView::addBookmark (  int  line  ) 
 

displays a bookmark in a line

void CUTEView::addError (  int  line  ) 
 

displays an error in a line

QValueList<int> CUTEView::bookmarks (   ) 
 

return all bookmarks handles

bool CUTEView::canRedo (   ) 
 

if redo function is available

bool CUTEView::canUndo (   ) 
 

if undo function is available

void CUTEView::clear (   ) 
 

clear text and all markers

void CUTEView::closeEvent (  QCloseEvent *  e  )  [protected]
 

called when view is about to be closed

void CUTEView::configure (   ) 
 

sets all settings of view from global config

void CUTEView::deleteAllErrors (   ) 
 

deletes all errors in view

bool CUTEView::edited (   ) 
 

weather text has been modified

char* CUTEView::fileName (   )  [inline]
 

retrieves file name

void CUTEView::filter (  QString   ) 
 

filters selection and insert output of filter at current cursor pos

bool CUTEView::findFirst (  const QString &  expr,
bool  re = false,
bool  cs = false,
bool  wo = false,
bool  wrap = true,
bool  forward = TRUE,
int  line = -1,
int  index = -1
) 
 

finds first occurence of string with some options

bool CUTEView::findNext (   ) 
 

finds next occurence

void CUTEView::findNextBookmark (   ) 
 

jumps to next found bookmark

bool CUTEView::findPrev (   ) 
 

find previous occurence

void CUTEView::findPrevBookmark (   ) 
 

jumps to previous found bookmark

void CUTEView::getCursorPosition (  int &  line,
int &  index
) 
 

get the current line/index of cursor

void CUTEView::getSelection (  int &  lineFrom,
int &  indexFrom,
int &  lineTo,
int &  indexTo
) 
 

get the line/index of selected text

void CUTEView::insertCommand (  QString   ) 
 

inserts output of a command at current cursor pos

void CUTEView::insertStdout (   )  [protected, slot]
 

called from insertCommand and filter in order to insert program output

QString CUTEView::langName (   ) 
 

return language name

Config::Lexer* CUTEView::lexer (   )  [inline]
 

returns chosen lexer of view

QString CUTEView::line (  int  l  )  [inline]
 

retrieves a line

bool CUTEView::loadFile (  const char *  file  ) 
 

loads file from disk

void CUTEView::loadMacro (  QString &  file  ) 
 

loads macro from file

QString CUTEView::macroString (   ) 
 

retrieves the current macro as a string

void CUTEView::processExited (   )  [protected, slot]
 

called when child process has finished

void CUTEView::recordMacro (  unsigned  int,
unsigned  long,
long 
)  [protected, slot]
 

handle macro recording

void CUTEView::redo (   ) 
 

redo last action

bool CUTEView::reloadFile (   ) 
 

rereads fiel from disk

void CUTEView::removeAllBookmarks (   ) 
 

deletes all Bookmarks in view

void CUTEView::replaceAll (  const QString &  expr,
const QString &  replaceStr,
bool  re,
bool  cs,
bool  wo,
bool  wrap,
bool  forward = TRUE,
bool  confirm = false
) 
 

replaces all occurence of string in view

void CUTEView::runMacro (   ) 
 

runs last recorded or loaded macro

bool CUTEView::saveFile (  const char *  file = 0,
bool  force = false
) 
 

saves text of view to file, if forced then an empty file will also be created

void CUTEView::saveMacro (  QString &  file  ) 
 

save macro to file

CUTEScintilla* CUTEView::scintilla (   ) 
 

returns wrapped QScintilla text widget

void CUTEView::sendEditor (  unsigned int  msg,
unsigned long  wParam = 0,
long  lParam = 0
) 
 

sends scintilla command

void CUTEView::setActions (  QMap< int, QAction * >   ) 
 

set shortcuts, defined in QActions

void CUTEView::setFocus (   )  [inline]
 

the scintilla widget has the focus

void CUTEView::setLexer (  Config::Lexer *  l  )  [inline]
 

sets lexer for highlighting and folding

bool CUTEView::setMacro (  QString   ) 
 

sets the macro in QString to be the current one

void CUTEView::setupLexer (  const QString &   ) 
 

choose lexer by a file name

void CUTEView::slotCharAdded (  int   )  [protected, slot]
 

called when char has been typed

void CUTEView::slotDocumentChanged (   )  [protected, slot]
 

called when text has been changed

void CUTEView::slotMarginClicked (  int  margin,
int  line,
Qt::ButtonState  state
)  [protected, slot]
 

sets markers

void CUTEView::startMacroRecording (   ) 
 

starts macro recording if none is be recorded

void CUTEView::stopMacroRecording (   ) 
 

stops macro recording

void CUTEView::toggleBookmark (  int  line  ) 
 

toggles bookmark at given line

void CUTEView::undo (   ) 
 

undo last action


The documentation for this class was generated from the following file:
Generated on Sun May 2 20:02:58 2004 by doxygen 1.3.2