• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • applications API Reference
  • KDE Home
  • Contact Us
 

Kate

  • kde-4.14
  • applications
  • kate
  • part
  • schema
katestyletreewidget.h
Go to the documentation of this file.
1 /* This file is part of the KDE libraries
2  Copyright (C) 2001-2003 Christoph Cullmann <cullmann@kde.org>
3  Copyright (C) 2002, 2003 Anders Lund <anders.lund@lund.tdcadsl.dk>
4  Copyright (C) 2005-2006 Hamish Rodda <rodda@kde.org>
5  Copyright (C) 2007 Mirko Stocker <me@misto.ch>
6 
7  This library is free software; you can redistribute it and/or
8  modify it under the terms of the GNU Library General Public
9  License version 2 as published by the Free Software Foundation.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Library General Public License for more details.
15 
16  You should have received a copy of the GNU Library General Public License
17  along with this library; see the file COPYING.LIB. If not, write to
18  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  Boston, MA 02110-1301, USA.
20 */
21 
22 #ifndef KATESTYLETREEWIDGET_H
23 #define KATESTYLETREEWIDGET_H
24 
25 #include <QtGui/QTreeWidget>
26 
27 #include "kateextendedattribute.h"
28 
29 class KateExtendedAttribute;
30 
36 class KateStyleTreeWidget : public QTreeWidget
37 {
38  Q_OBJECT
39 
40  friend class KateStyleListItem;
41 
42  public:
43  explicit KateStyleTreeWidget(QWidget *parent = 0, bool showUseDefaults = false);
44 
45  void emitChanged();
46 
47  void setBgCol( const QColor &c ) { bgcol = c; }
48  void setSelCol( const QColor &c ) { selcol = c; }
49  void setNormalCol( const QColor &c ) { normalcol = c; }
50 
51  void addItem( QTreeWidgetItem *parent, const QString& styleName, KTextEditor::Attribute::Ptr defaultstyle, KateExtendedAttribute::Ptr data = KateExtendedAttribute::Ptr() );
52  void addItem( const QString& styleName, KTextEditor::Attribute::Ptr defaultstyle, KateExtendedAttribute::Ptr data = KateExtendedAttribute::Ptr() );
53 
54  void resizeColumns();
55 
56  Q_SIGNALS:
57  void changed();
58 
59  protected:
60  virtual void contextMenuEvent(QContextMenuEvent* event);
61  virtual void showEvent(QShowEvent* event);
62  virtual bool edit(const QModelIndex& index, EditTrigger trigger, QEvent* event);
63 
64  private Q_SLOTS:
65  void changeProperty( );
66  void unsetColor( );
67  void updateGroupHeadings();
68 
69  private:
70  QColor bgcol, selcol, normalcol;
71  QFont docfont;
72 };
73 
74 #endif
KateStyleTreeWidget::setSelCol
void setSelCol(const QColor &c)
Definition: katestyletreewidget.h:48
QModelIndex
QEvent
QWidget
KateStyleTreeWidget::changed
void changed()
QFont
KateExtendedAttribute::Ptr
KSharedPtr< KateExtendedAttribute > Ptr
Definition: kateextendedattribute.h:38
KateStyleTreeWidget::setBgCol
void setBgCol(const QColor &c)
Definition: katestyletreewidget.h:47
kateextendedattribute.h
KateStyleTreeWidget
QTreeWidget that automatically adds columns for KateStyleListItems and provides a popup menu and a sl...
Definition: katestyletreewidget.h:36
KateStyleTreeWidget::edit
virtual bool edit(const QModelIndex &index, EditTrigger trigger, QEvent *event)
Definition: katestyletreewidget.cpp:169
QTreeWidget
KateStyleTreeWidget::KateStyleTreeWidget
KateStyleTreeWidget(QWidget *parent=0, bool showUseDefaults=false)
Definition: katestyletreewidget.cpp:126
QShowEvent
QContextMenuEvent
KateStyleTreeWidget::addItem
void addItem(QTreeWidgetItem *parent, const QString &styleName, KTextEditor::Attribute::Ptr defaultstyle, KateExtendedAttribute::Ptr data=KateExtendedAttribute::Ptr())
Definition: katestyletreewidget.cpp:325
QString
QColor
KateStyleTreeWidget::showEvent
virtual void showEvent(QShowEvent *event)
Definition: katestyletreewidget.cpp:197
QTreeWidget::event
virtual bool event(QEvent *e)
KateStyleTreeWidget::setNormalCol
void setNormalCol(const QColor &c)
Definition: katestyletreewidget.h:49
KateStyleTreeWidget::contextMenuEvent
virtual void contextMenuEvent(QContextMenuEvent *event)
Definition: katestyletreewidget.cpp:204
KateStyleTreeWidget::resizeColumns
void resizeColumns()
Definition: katestyletreewidget.cpp:191
KateStyleTreeWidget::KateStyleListItem
friend class KateStyleListItem
Definition: katestyletreewidget.h:40
QTreeWidgetItem
QObject::parent
QObject * parent() const
KateExtendedAttribute
An extension of the KTextEditor::Attribute class, with convenience functions for access to extra kate...
Definition: kateextendedattribute.h:35
KateStyleTreeWidget::emitChanged
void emitChanged()
Definition: katestyletreewidget.cpp:314
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:58 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Kate

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

applications API Reference

Skip menu "applications API Reference"
  •   kate
  •       kate
  •   KTextEditor
  •   Kate
  • Konsole

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal