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

kmail

  • sources
  • kde-4.12
  • kdepim
  • kmail
  • configuredialog
colorlistbox.h
Go to the documentation of this file.
1 /*
2  * This file is part of libkdepim.
3  *
4  * Copyright (C) 2000 Espen Sand, espen@kde.org
5  * Copyright (C) 2007 Mathias Soeken, msoeken@tzi.de
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along
18  * with this program; if not, write to the Free Software Foundation, Inc.,
19  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20  *
21  */
22 
23 #ifndef COLORLISTBOX_H
24 #define COLORLISTBOX_H
25 
26 #include <QTreeWidget>
27 
28 class QDragLeaveEvent;
29 class QDropEvent;
30 class QDragMoveEvent;
31 class QDragLeaveEvent;
32 
33 class ColorListBox : public QTreeWidget
34 {
35  Q_OBJECT
36 
37 public:
38  explicit ColorListBox( QWidget *parent=0 );
39  void addColor( const QString& text, const QColor& color=Qt::black );
40  void setColor( int index, const QColor &color );
41  // like setColor, but does not emit changed()
42  void setColorSilently( int index, const QColor &color );
43  QColor color( int index ) const;
44 
45 signals:
46  void changed();
47 
48 protected:
49  void dragEnterEvent( QDragEnterEvent *e );
50  void dragLeaveEvent( QDragLeaveEvent *e );
51  void dragMoveEvent( QDragMoveEvent *e );
52  void dropEvent( QDropEvent *e );
53 
54 private slots:
55  void newColor( const QModelIndex& index );
56 
57 private:
58  QTreeWidgetItem* mCurrentOnDragEnter;
59 };
60 
61 #endif
ColorListBox::dragEnterEvent
void dragEnterEvent(QDragEnterEvent *e)
Definition: colorlistbox.cpp:90
QTreeWidget
text
virtual QByteArray text(quint32 serialNumber) const =0
ColorListBox::dropEvent
void dropEvent(QDropEvent *e)
Definition: colorlistbox.cpp:122
ColorListBox::setColor
void setColor(int index, const QColor &color)
Definition: colorlistbox.cpp:59
QWidget
ColorListBox::dragLeaveEvent
void dragLeaveEvent(QDragLeaveEvent *e)
Definition: colorlistbox.cpp:102
ColorListBox::color
QColor color(int index) const
Definition: colorlistbox.cpp:67
QTreeWidgetItem
ColorListBox::setColorSilently
void setColorSilently(int index, const QColor &color)
Definition: colorlistbox.cpp:52
ColorListBox::dragMoveEvent
void dragMoveEvent(QDragMoveEvent *e)
Definition: colorlistbox.cpp:111
ColorListBox::changed
void changed()
ColorListBox
Definition: colorlistbox.h:33
ColorListBox::addColor
void addColor(const QString &text, const QColor &color=Qt::black)
Definition: colorlistbox.cpp:45
ColorListBox::ColorListBox
ColorListBox(QWidget *parent=0)
Definition: colorlistbox.cpp:34
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:58:51 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kmail

Skip menu "kmail"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

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