• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeui
 

tdeui

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

#include <tdeselect.h>

Inheritance diagram for KXYSelector:
KHSSelector

Signals

void valueChanged (int x, int y)
 

Public Member Functions

 KXYSelector (TQWidget *parent=0, const char *name=0)
 
 ~KXYSelector ()
 
void setValues (int xPos, int yPos)
 
void setXValue (int xPos)
 
void setYValue (int yPos)
 
void setRange (int minX, int minY, int maxX, int maxY)
 
int xValue () const
 
int yValue () const
 
TQRect contentsRect () const
 

Protected Member Functions

virtual void drawContents (TQPainter *)
 
virtual void drawCursor (TQPainter *p, int xp, int yp)
 
virtual void paintEvent (TQPaintEvent *e)
 
virtual void mousePressEvent (TQMouseEvent *e)
 
virtual void mouseMoveEvent (TQMouseEvent *e)
 
virtual void wheelEvent (TQWheelEvent *)
 
void valuesFromPosition (int x, int y, int &xVal, int &yVal) const
 
virtual void virtual_hook (int id, void *data)
 

Detailed Description

KXYSelector is the base class for other widgets which provides the ability to choose from a two-dimensional range of values.

The currently chosen value is indicated by a cross. An example is the KHSSelector which allows to choose from a range of colors, and which is used in KColorDialog.

A custom drawing routine for the widget surface has to be provided by the subclass.

Definition at line 43 of file tdeselect.h.

Constructor & Destructor Documentation

◆ KXYSelector()

KXYSelector::KXYSelector ( TQWidget *  parent = 0,
const char *  name = 0 
)

Constructs a two-dimensional selector widget which has a value range of [0..100] in both directions.

Definition at line 36 of file tdeselect.cpp.

◆ ~KXYSelector()

KXYSelector::~KXYSelector ( )

Destructs the widget.

Definition at line 50 of file tdeselect.cpp.

Member Function Documentation

◆ contentsRect()

TQRect KXYSelector::contentsRect ( ) const
Returns
the rectangle on which subclasses should draw.

Definition at line 99 of file tdeselect.cpp.

◆ drawContents()

void KXYSelector::drawContents ( TQPainter *  )
protectedvirtual

Override this function to draw the contents of the widget.

The default implementation does nothing.

Draw within contentsRect() only.

Reimplemented in KHSSelector.

Definition at line 217 of file tdeselect.cpp.

◆ drawCursor()

void KXYSelector::drawCursor ( TQPainter *  p,
int  xp,
int  yp 
)
protectedvirtual

Override this function to draw the cursor which indicates the currently selected value pair.

Definition at line 221 of file tdeselect.cpp.

◆ mouseMoveEvent()

void KXYSelector::mouseMoveEvent ( TQMouseEvent *  e)
protectedvirtual

Definition at line 149 of file tdeselect.cpp.

◆ mousePressEvent()

void KXYSelector::mousePressEvent ( TQMouseEvent *  e)
protectedvirtual

Definition at line 144 of file tdeselect.cpp.

◆ paintEvent()

void KXYSelector::paintEvent ( TQPaintEvent *  e)
protectedvirtual

Definition at line 110 of file tdeselect.cpp.

◆ setRange()

void KXYSelector::setRange ( int  minX,
int  minY,
int  maxX,
int  maxY 
)

Sets the range of possible values.

Definition at line 54 of file tdeselect.cpp.

◆ setValues()

void KXYSelector::setValues ( int  xPos,
int  yPos 
)

Sets the current values in horizontal and vertical direction.

Parameters
xPosthe horizontal value
yPosthe veritcal value

Definition at line 75 of file tdeselect.cpp.

◆ setXValue()

void KXYSelector::setXValue ( int  xPos)

Sets the current horizontal value.

Parameters
xPosthe horizontal value

Definition at line 65 of file tdeselect.cpp.

◆ setYValue()

void KXYSelector::setYValue ( int  yPos)

Sets the current vertical value.

Parameters
yPosthe veritcal value

Definition at line 70 of file tdeselect.cpp.

◆ valueChanged

void KXYSelector::valueChanged ( int  x,
int  y 
)
signal

This signal is emitted whenever the user chooses a value, e.g.

by clicking with the mouse on the widget.

◆ valuesFromPosition()

void KXYSelector::valuesFromPosition ( int  x,
int  y,
int &  xVal,
int &  yVal 
) const
protected

Converts a pixel position to its corresponding values.

Definition at line 171 of file tdeselect.cpp.

◆ virtual_hook()

void KXYSelector::virtual_hook ( int  id,
void *  data 
)
protectedvirtual

Definition at line 524 of file tdeselect.cpp.

◆ wheelEvent()

void KXYSelector::wheelEvent ( TQWheelEvent *  e)
protectedvirtual

Definition at line 161 of file tdeselect.cpp.

◆ xValue()

int KXYSelector::xValue ( ) const
inline
Returns
the current value in horizontal direction.

Definition at line 88 of file tdeselect.h.

◆ yValue()

int KXYSelector::yValue ( ) const
inline
Returns
the current value in vertical direction.

Definition at line 92 of file tdeselect.h.


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

tdeui

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

tdeui

Skip menu "tdeui"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeui by doxygen 1.9.4
This website is maintained by Timothy Pearson.