• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kate
 

kate

  • kate
  • plugins
  • autobookmarker
autobookmarker.h
1/*
2 This library is free software you can redistribute it and/or
3 modify it under the terms of the GNU Library General Public
4 License.
5
6 This library is distributed in the hope that it will be useful,
7 but WITHOUT ANY WARRANTY; without even the implied warranty of
8 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9 Library General Public License for more details.
10
11 You should have received a copy of the GNU Library General Public License
12 along with this library; see the file COPYING.LIB. If not, write to
13 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
14 Boston, MA 02110-1301, USA.
15
16 ---
17 file: autobookmarker.h
18
19 KTextEditor plugin to add bookmarks to documents.
20 Copyright Anders Lund <anders.lund@lund.tdcadsl.dk>, 2003
21*/
22
23#ifndef _AUTOBOOKMARKER_H_
24#define _AUTOBOOKMARKER_H_
25
26#include <tdetexteditor/plugin.h>
27#include <tdetexteditor/configinterfaceextension.h>
28
29#include <kdialogbase.h>
30
31#include <tqptrlist.h>
32#include <tqvbox.h>
33
34class AutoBookmarkEnt
35{
36 public:
37 enum REFlags { CaseSensitive=1, MinimalMatching=2 };
38 AutoBookmarkEnt(const TQString &p=TQString::null,
39 const TQStringList &f=TQStringList(),
40 const TQStringList &m=TQStringList(),
41 int flags=1 );
42 ~AutoBookmarkEnt(){};
43 TQString pattern;
44 TQStringList filemask;
45 TQStringList mimemask;
46 int flags;
47};
48
49class AutoBookmarker
50 : public KTextEditor::Plugin, public KTextEditor::PluginViewInterface,
51 public KTextEditor::ConfigInterfaceExtension
52{
53 TQ_OBJECT
54 public:
55 AutoBookmarker( TQObject *parent = 0,
56 const char* name = 0,
57 const TQStringList &args = TQStringList() );
58 virtual ~AutoBookmarker() {};
59
60 void addView (KTextEditor::View *view);
61 void removeView (KTextEditor::View *view);
62
63 // ConfigInterfaceExtention
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;
69 bool abDone;
70
71 private slots:
72 void slotCompleted();
73 void applyEntity( AutoBookmarkEnt *e );
74};
75
76typedef TQPtrList<AutoBookmarkEnt> ABEntityList;
77typedef TQPtrListIterator<AutoBookmarkEnt> ABEntityListIterator;
78
79/* singleton to keep the data */
80class ABGlobal
81{
82 public:
83 ABGlobal();
84 ~ABGlobal();
85
86 static ABGlobal* self();
87
88 ABEntityList* entities() { return m_ents; };
89 void readConfig();
90 void writeConfig();
91
92 private:
93 ABEntityList *m_ents;
94 static ABGlobal *s_self;
95};
96
97class AutoBookmarkerConfigPage : public KTextEditor::ConfigPage
98{
99 TQ_OBJECT
100 public:
101 AutoBookmarkerConfigPage( TQWidget *parent, const char *name );
102 virtual ~AutoBookmarkerConfigPage() {};
103
104 virtual void apply();
105 virtual void reset();
106 virtual void defaults();
107
108 private slots:
109 void slotNew();
110 void slotDel();
111 void slotEdit();
112
113 private:
114 class TDEListView *lvPatterns;
115 class TQPushButton *btnNew, *btnDel, *btnEdit;
116 ABEntityList *m_ents;
117};
118
119class AutoBookmarkerEntEditor : public KDialogBase
120{
121 TQ_OBJECT
122 public:
123 AutoBookmarkerEntEditor( TQWidget *parent, AutoBookmarkEnt *e );
124 ~AutoBookmarkerEntEditor(){};
125
126 void apply();
127
128 private slots:
129 void showMTDlg();
130 void slotPatternChanged( const TQString& );
131 private:
132 class TQLineEdit *lePattern, *leMimeTypes, *leFileMask;
133 class TQCheckBox *cbCS, *cbMM;
134 AutoBookmarkEnt *e;
135};
136
137#endif //_AUTOBOOKMARKER_H_
KDialogBase
KDialogBase::apply
void apply()
TDEListView

kate

Skip menu "kate"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kate

Skip menu "kate"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for kate by doxygen 1.9.4
This website is maintained by Timothy Pearson.