Kate
katestyletreewidget.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef KATESTYLETREEWIDGET_H
00023 #define KATESTYLETREEWIDGET_H
00024
00025 #include <QtGui/QTreeWidget>
00026
00027 #include "kateextendedattribute.h"
00028
00029 class KateExtendedAttribute;
00030
00036 class KateStyleTreeWidget : public QTreeWidget
00037 {
00038 Q_OBJECT
00039
00040 friend class KateStyleListItem;
00041
00042 public:
00043 explicit KateStyleTreeWidget(QWidget *parent = 0, bool showUseDefaults = false);
00044
00045 void emitChanged();
00046
00047 void setBgCol( const QColor &c ) { bgcol = c; }
00048 void setSelCol( const QColor &c ) { selcol = c; }
00049 void setNormalCol( const QColor &c ) { normalcol = c; }
00050
00051 void addItem( QTreeWidgetItem *parent, const QString& styleName, KTextEditor::Attribute::Ptr defaultstyle, KateExtendedAttribute::Ptr data = KateExtendedAttribute::Ptr() );
00052 void addItem( const QString& styleName, KTextEditor::Attribute::Ptr defaultstyle, KateExtendedAttribute::Ptr data = KateExtendedAttribute::Ptr() );
00053
00054 void resizeColumns();
00055
00056 Q_SIGNALS:
00057 void changed();
00058
00059 protected:
00060 virtual void contextMenuEvent(QContextMenuEvent* event);
00061 virtual void showEvent(QShowEvent* event);
00062 virtual bool edit(const QModelIndex& index, EditTrigger trigger, QEvent* event);
00063
00064 private Q_SLOTS:
00065 void changeProperty( );
00066 void unsetColor( );
00067 void updateGroupHeadings();
00068
00069 private:
00070 QColor bgcol, selcol, normalcol;
00071 QFont docfont;
00072 };
00073
00074 #endif