23 #ifndef _AUTOBOOKMARKER_H_
24 #define _AUTOBOOKMARKER_H_
26 #include <tdetexteditor/plugin.h>
27 #include <tdetexteditor/configinterfaceextension.h>
29 #include <kdialogbase.h>
31 #include <tqptrlist.h>
37 enum REFlags { CaseSensitive=1, MinimalMatching=2 };
38 AutoBookmarkEnt(
const TQString &p=TQString::null,
39 const TQStringList &f=TQStringList(),
40 const TQStringList &m=TQStringList(),
44 TQStringList filemask;
45 TQStringList mimemask;
50 :
public KTextEditor::Plugin,
public KTextEditor::PluginViewInterface,
51 public KTextEditor::ConfigInterfaceExtension
55 AutoBookmarker( TQObject *parent = 0,
57 const TQStringList &args = TQStringList() );
58 virtual ~AutoBookmarker() {};
60 void addView (KTextEditor::View *view);
61 void removeView (KTextEditor::View *view);
64 uint configPages()
const {
return 1; };
65 KTextEditor::ConfigPage * configPage( uint number, TQWidget *parent,
const char *name );
66 TQString configPageName( uint )
const;
67 TQString configPageFullName( uint )
const;
68 TQPixmap configPagePixmap( uint,
int )
const;
73 void applyEntity( AutoBookmarkEnt *e );
76 typedef TQPtrList<AutoBookmarkEnt> ABEntityList;
77 typedef TQPtrListIterator<AutoBookmarkEnt> ABEntityListIterator;
86 static ABGlobal*
self();
88 ABEntityList* entities() {
return m_ents; };
94 static ABGlobal *s_self;
97 class AutoBookmarkerConfigPage :
public KTextEditor::ConfigPage
101 AutoBookmarkerConfigPage( TQWidget *parent,
const char *name );
102 virtual ~AutoBookmarkerConfigPage() {};
104 virtual void apply();
105 virtual void reset();
106 virtual void defaults();
115 class TQPushButton *btnNew, *btnDel, *btnEdit;
116 ABEntityList *m_ents;
123 AutoBookmarkerEntEditor( TQWidget *parent, AutoBookmarkEnt *e );
124 ~AutoBookmarkerEntEditor(){};
130 void slotPatternChanged(
const TQString& );
132 class TQLineEdit *lePattern, *leMimeTypes, *leFileMask;
133 class TQCheckBox *cbCS, *cbMM;