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

cutescintilla.h

00001 /***************************************************************************
00002                           cutescintilla.h  -  extension on qscintilla
00003                              -------------------
00004     begin                : Sam Jul 19 23:53:49 CEST 2003
00005     copyright            : (C) 2003 by Heiko Köhler
00006     email                : heicom@users.sourceforge.net
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef __CUTESCINTILLA_H__
00019 #define __CUTESCINTILLA_H__
00020 
00021 #include <qextscintilla.h>
00022 #include <qmap.h>
00023 #include <qaction.h>
00024 #include <qpopupmenu.h>
00025 
00026 #include "readtags.h"
00027 
00029 class CUTEScintilla : public QextScintilla
00030 {
00031     Q_OBJECT
00032 public:
00033     enum AutoCompletion { Document, TagsFile, None };
00034     CUTEScintilla(QWidget *parent=0, const char *name=0, tagFile *tags=0);
00036     void setActions(QMap<int, QAction*>);
00038     void autoComplete();
00041     void setAutoCompletionThreshold(int);
00042     void setAutoCompletionSource(AutoCompletion ac)
00043         { autoCompletionSource = ac; }
00045     void setTagsFile(tagFile *t)
00046         { tags = t; }
00047 protected slots:
00048     void slotCharAdded(int);
00049 protected:
00050     void autoCompleteFromDocument();
00051     void autoCompleteFromTagsFile();
00052     bool eventFilter(QObject *obj, QEvent *e);
00053     void contextMenu(QContextMenuEvent *e);
00054     void keyPressEvent( QKeyEvent *e );
00055     void dragEnterEvent( QDragEnterEvent *e ) { qDebug("dragEnterEvent"); }
00056     void dropEvent( QDropEvent *e );
00057 private:
00058     QMap<int, int> keyMap;
00059     QPopupMenu *menu;
00060     int threshold;
00061     static char wordChars[];
00062     AutoCompletion autoCompletionSource;
00063     tagFile *tags;
00064 };
00065 
00066 #endif

Generated on Sat Mar 6 16:21:56 2004 by doxygen 1.3.2