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

KDEUI

Signals | Public Member Functions | Protected Member Functions

KColorCells Class Reference

A table of editable color cells. More...

#include <kcolordialog.h>

Inheritance diagram for KColorCells:
Inheritance graph
[legend]

List of all members.

Signals

void colorDoubleClicked (int index, const QColor &color)
void colorSelected (int index, const QColor &color)

Public Member Functions

 KColorCells (QWidget *parent, int rows, int columns)
 ~KColorCells ()
QColor color (int index) const
int count () const
int selectedIndex () const
void setAcceptDrags (bool acceptDrags)
void setColor (int index, const QColor &col)
void setSelected (int index)
void setShading (bool shade)

Protected Member Functions

virtual void dragEnterEvent (QDragEnterEvent *)
virtual void dragMoveEvent (QDragMoveEvent *)
virtual void dropEvent (QDropEvent *)
virtual void mouseDoubleClickEvent (QMouseEvent *)
virtual void mouseMoveEvent (QMouseEvent *)
virtual void mousePressEvent (QMouseEvent *)
virtual void mouseReleaseEvent (QMouseEvent *)
int positionToCell (const QPoint &pos, bool ignoreBorders=false) const
virtual void resizeEvent (QResizeEvent *event)
virtual int sizeHintForColumn (int column) const
virtual int sizeHintForRow (int column) const

Detailed Description

A table of editable color cells.

Author:
Martin Jones <mjones@kde.org>

Definition at line 40 of file kcolordialog.h.


Constructor & Destructor Documentation

KColorCells::KColorCells ( QWidget *  parent,
int  rows,
int  columns 
)

Constructs a new table of color cells, consisting of rows * columns colors.

Parameters:
parentThe parent of the new widget
rowsThe number of rows in the table
columnsThe number of columns in the table

Definition at line 182 of file kcolordialog.cpp.

KColorCells::~KColorCells ( )

Definition at line 211 of file kcolordialog.cpp.


Member Function Documentation

QColor KColorCells::color ( int  index) const

Returns the color at a given index in the table.

Definition at line 216 of file kcolordialog.cpp.

void KColorCells::colorDoubleClicked ( int  index,
const QColor &  color 
) [signal]

Emitted when a color in the table is double-clicked.

void KColorCells::colorSelected ( int  index,
const QColor &  color 
) [signal]

Emitted when a color is selected in the table.

int KColorCells::count ( ) const

Returns the total number of color cells in the table.

Definition at line 226 of file kcolordialog.cpp.

void KColorCells::dragEnterEvent ( QDragEnterEvent *  event) [protected, virtual]

Definition at line 386 of file kcolordialog.cpp.

void KColorCells::dragMoveEvent ( QDragMoveEvent *  event) [protected, virtual]

Definition at line 396 of file kcolordialog.cpp.

void KColorCells::dropEvent ( QDropEvent *  event) [protected, virtual]

Definition at line 405 of file kcolordialog.cpp.

void KColorCells::mouseDoubleClickEvent ( QMouseEvent *  ) [protected, virtual]

Definition at line 448 of file kcolordialog.cpp.

void KColorCells::mouseMoveEvent ( QMouseEvent *  e) [protected, virtual]

Definition at line 362 of file kcolordialog.cpp.

void KColorCells::mousePressEvent ( QMouseEvent *  e) [protected, virtual]

Definition at line 326 of file kcolordialog.cpp.

void KColorCells::mouseReleaseEvent ( QMouseEvent *  e) [protected, virtual]

Definition at line 418 of file kcolordialog.cpp.

int KColorCells::positionToCell ( const QPoint &  pos,
bool  ignoreBorders = false 
) const [protected]

Definition at line 335 of file kcolordialog.cpp.

void KColorCells::resizeEvent ( QResizeEvent *  event) [protected, virtual]

Definition at line 301 of file kcolordialog.cpp.

int KColorCells::selectedIndex ( ) const

Returns the index of the cell which is currently selected.

Definition at line 248 of file kcolordialog.cpp.

void KColorCells::setAcceptDrags ( bool  acceptDrags)

Definition at line 236 of file kcolordialog.cpp.

void KColorCells::setColor ( int  index,
const QColor &  col 
)

Sets the color in the given index in the table.

Definition at line 253 of file kcolordialog.cpp.

void KColorCells::setSelected ( int  index)

Sets the currently selected cell to index.

Definition at line 241 of file kcolordialog.cpp.

void KColorCells::setShading ( bool  shade)

Definition at line 231 of file kcolordialog.cpp.

int KColorCells::sizeHintForColumn ( int  column) const [protected, virtual]

Definition at line 316 of file kcolordialog.cpp.

int KColorCells::sizeHintForRow ( int  column) const [protected, virtual]

Definition at line 321 of file kcolordialog.cpp.


The documentation for this class was generated from the following files:
  • kcolordialog.h
  • kcolordialog.cpp

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Modules
  • 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
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.3
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