20 #ifndef __KATE_SCHEMA_H__
21 #define __KATE_SCHEMA_H__
23 #include "katehighlight.h"
24 #include "katedialogs.h"
26 #include <tqstringlist.h>
27 #include <tqintdict.h>
29 #include <tqlistview.h>
32 #include <tdeconfig.h>
33 #include <tdeaction.h>
36 class KateStyleListItem;
37 class KateStyleListCaption;
44 class KateSchemaManager
48 ~KateSchemaManager ();
53 void update (
bool readfromfile =
true);
60 void addSchema (
const TQString &t);
62 void removeSchema (uint number);
67 bool validSchema (uint number);
72 uint number (
const TQString &name);
77 TQString
name (uint number);
82 const TQStringList &list () {
return m_schemas; }
84 static TQString normalSchema ();
85 static TQString printingSchema ();
89 TQStringList m_schemas;
98 KateViewSchemaAction(
const TQString& text, TQObject* parent = 0,
const char* name = 0)
101 ~KateViewSchemaAction(){;};
103 void updateMenu (KateView *view);
108 TQGuardedPtr<KateView> m_view;
113 void slotAboutToShow();
116 void setSchema (
int mode);
128 class KateStyleListView :
public TQListView
132 friend class KateStyleListItem;
135 KateStyleListView( TQWidget *parent=0,
bool showUseDefaults=
false);
136 ~KateStyleListView() {};
139 void showPopupMenu( KateStyleListItem *i,
const TQPoint &globalPos,
bool showtitle=
false );
140 void emitChanged() { emit changed(); };
142 void setBgCol(
const TQColor &c ) { bgcol = c; }
143 void setSelCol(
const TQColor &c ) { selcol = c; }
144 void setNormalCol(
const TQColor &c ) { normalcol = c; }
148 void showPopupMenu( TQListViewItem *i,
const TQPoint &globalPos );
150 void slotMousePressed(
int, TQListViewItem*,
const TQPoint&,
int );
152 void mSlotPopupHandler(
int z );
153 void unsetColor(
int );
159 TQColor bgcol, selcol, normalcol;
163 class KateSchemaConfigColorTab :
public TQWidget
168 KateSchemaConfigColorTab( TQWidget *parent = 0,
const char *name = 0 );
169 ~KateSchemaConfigColorTab();
187 TQColor
back, selected, current, bracket, wwmarker, iconborder, tmarker, linenumber;
188 TQMap<int, TQColor> markerColors;
192 TQMap<int,SchemaColors> m_schemas;
198 void schemaChanged(
int newSchema );
204 void slotMarkerColorChanged(
const TQColor&);
205 void slotComboBoxChanged(
int index);
208 typedef TQMap<int,TQFont> FontMap;
210 class KateSchemaConfigFontTab :
public TQWidget
215 KateSchemaConfigFontTab( TQWidget *parent = 0,
const char *name = 0 );
216 ~KateSchemaConfigFontTab();
223 void schemaChanged(
int newSchema );
234 void slotFontSelected(
const TQFont &
font );
237 class KateSchemaConfigFontColorTab :
public TQWidget
242 KateSchemaConfigFontColorTab( TQWidget *parent = 0,
const char *name = 0 );
243 ~KateSchemaConfigFontColorTab();
246 void schemaChanged (uint schema);
250 KateAttributeList *attributeList (uint schema);
253 KateStyleListView *m_defaultStyles;
254 TQIntDict<KateAttributeList> m_defaultStyleLists;
257 class KateSchemaConfigHighlightTab :
public TQWidget
262 KateSchemaConfigHighlightTab( TQWidget *parent = 0,
const char *name = 0, KateSchemaConfigFontColorTab *page = 0, uint hl = 0 );
263 ~KateSchemaConfigHighlightTab();
266 void schemaChanged (uint schema);
271 void hlChanged(
int z);
274 KateSchemaConfigFontColorTab *m_defaults;
277 KateStyleListView *m_styles;
282 TQIntDict< TQIntDict<KateHlItemDataList> > m_hlDict;
285 class KateSchemaConfigPage :
public KateConfigPage
290 KateSchemaConfigPage ( TQWidget *parent,
class KateDocument *doc=0 );
291 ~KateSchemaConfigPage ();
301 void deleteSchema ();
303 void schemaChanged (
int schema);
305 void newCurrentPage (TQWidget *w);
311 class TQTabWidget *m_tabWidget;
312 class TQPushButton *btndel;
313 class TQComboBox *defaultSchemaCombo;
314 class TQComboBox *schemaCombo;
315 KateSchemaConfigColorTab *m_colorTab;
316 KateSchemaConfigFontTab *m_fontTab;
317 KateSchemaConfigFontColorTab *m_fontColorTab;
318 KateSchemaConfigHighlightTab *m_highlightTab;
TQString name(StdAccel id)
const TDEShortcut & back()
const TDEShortcut & reload()