• Skip to content
  • Skip to link menu
KDE 4.3 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

Kate

katestyletreewidget.h

Go to the documentation of this file.
00001 /* This file is part of the KDE libraries
00002    Copyright (C) 2001-2003 Christoph Cullmann <cullmann@kde.org>
00003    Copyright (C) 2002, 2003 Anders Lund <anders.lund@lund.tdcadsl.dk>
00004    Copyright (C) 2005-2006 Hamish Rodda <rodda@kde.org>
00005    Copyright (C) 2007 Mirko Stocker <me@misto.ch>
00006 
00007    This library is free software; you can redistribute it and/or
00008    modify it under the terms of the GNU Library General Public
00009    License version 2 as published by the Free Software Foundation.
00010 
00011    This library is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014    Library General Public License for more details.
00015 
00016    You should have received a copy of the GNU Library General Public License
00017    along with this library; see the file COPYING.LIB.  If not, write to
00018    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019    Boston, MA 02110-1301, USA.
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

Kate

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal