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

KDEUI

Signals | Public Member Functions | Protected Member Functions | Properties | List of all members
KColorCells Class Reference

#include <kcolordialog.h>

Inheritance diagram for KColorCells:
QTableWidget

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 ()
 
bool acceptDrags () const
 
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)
 
bool shading () const
 

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
 

Properties

bool acceptDrags
 
bool shading
 

Detailed Description

A table of editable color cells.

Author
Martin Jones mjone.nosp@m.s@kd.nosp@m.e.org

Definition at line 40 of file kcolordialog.h.

Constructor & Destructor Documentation

◆ KColorCells()

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::~KColorCells ( )

Definition at line 211 of file kcolordialog.cpp.

Member Function Documentation

◆ acceptDrags()

bool KColorCells::acceptDrags ( ) const

Definition at line 246 of file kcolordialog.cpp.

◆ color()

QColor KColorCells::color ( int  index) const

Returns the color at a given index in the table.

Definition at line 216 of file kcolordialog.cpp.

◆ colorDoubleClicked

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

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

◆ colorSelected

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

Emitted when a color is selected in the table.

◆ count()

int KColorCells::count ( ) const

Returns the total number of color cells in the table.

Definition at line 226 of file kcolordialog.cpp.

◆ dragEnterEvent()

void KColorCells::dragEnterEvent ( QDragEnterEvent *  event)
protectedvirtual

Definition at line 396 of file kcolordialog.cpp.

◆ dragMoveEvent()

void KColorCells::dragMoveEvent ( QDragMoveEvent *  event)
protectedvirtual

Definition at line 406 of file kcolordialog.cpp.

◆ dropEvent()

void KColorCells::dropEvent ( QDropEvent *  event)
protectedvirtual

Definition at line 415 of file kcolordialog.cpp.

◆ mouseDoubleClickEvent()

void KColorCells::mouseDoubleClickEvent ( QMouseEvent *  )
protectedvirtual

Definition at line 458 of file kcolordialog.cpp.

◆ mouseMoveEvent()

void KColorCells::mouseMoveEvent ( QMouseEvent *  e)
protectedvirtual

Definition at line 372 of file kcolordialog.cpp.

◆ mousePressEvent()

void KColorCells::mousePressEvent ( QMouseEvent *  e)
protectedvirtual

Definition at line 336 of file kcolordialog.cpp.

◆ mouseReleaseEvent()

void KColorCells::mouseReleaseEvent ( QMouseEvent *  e)
protectedvirtual

Definition at line 428 of file kcolordialog.cpp.

◆ positionToCell()

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

Definition at line 345 of file kcolordialog.cpp.

◆ resizeEvent()

void KColorCells::resizeEvent ( QResizeEvent *  event)
protectedvirtual

Definition at line 311 of file kcolordialog.cpp.

◆ selectedIndex()

int KColorCells::selectedIndex ( ) const

Returns the index of the cell which is currently selected.

Definition at line 258 of file kcolordialog.cpp.

◆ setAcceptDrags()

void KColorCells::setAcceptDrags ( bool  acceptDrags)

Definition at line 241 of file kcolordialog.cpp.

◆ setColor()

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

Sets the color in the given index in the table.

Definition at line 263 of file kcolordialog.cpp.

◆ setSelected()

void KColorCells::setSelected ( int  index)

Sets the currently selected cell to index.

Definition at line 251 of file kcolordialog.cpp.

◆ setShading()

void KColorCells::setShading ( bool  shade)

Definition at line 231 of file kcolordialog.cpp.

◆ shading()

bool KColorCells::shading ( ) const

Definition at line 236 of file kcolordialog.cpp.

◆ sizeHintForColumn()

int KColorCells::sizeHintForColumn ( int  column) const
protectedvirtual

Definition at line 326 of file kcolordialog.cpp.

◆ sizeHintForRow()

int KColorCells::sizeHintForRow ( int  column) const
protectedvirtual

Definition at line 331 of file kcolordialog.cpp.

Property Documentation

◆ acceptDrags

bool KColorCells::acceptDrags
readwrite

Definition at line 1 of file kcolordialog.h.

◆ shading

bool KColorCells::shading
readwrite

Definition at line 1 of file kcolordialog.h.


The documentation for this class was generated from the following files:
  • kcolordialog.h
  • kcolordialog.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

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

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • 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
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