#include <kptdatetable.h>

Inherits TQGridView.

Signals

void closeMe (int)
 

Public Member Functions

 DateInternalMonthPicker (int fontsize, TQWidget *parent, const char *name=0)
 
TQSize sizeHint () const
 
TQSize minimumSizeHint () const
 
int getResult () const
 

Protected Member Functions

void setupPainter (TQPainter *p)
 
virtual void viewportResizeEvent (TQResizeEvent *)
 
virtual void paintCell (TQPainter *painter, int row, int col)
 
virtual void contentsMousePressEvent (TQMouseEvent *e)
 
virtual void contentsMouseMoveEvent (TQMouseEvent *e)
 
virtual void contentsMouseReleaseEvent (TQMouseEvent *e)
 

Protected Attributes

int result
 
short int activeCol
 
short int activeRow
 
TQRect max
 

Detailed Description

A table containing month names.

It is used to pick a month directly.

Definition at line 76 of file kptdatetable.h.

Constructor & Destructor Documentation

◆ DateInternalMonthPicker()

KPlato::DateInternalMonthPicker::DateInternalMonthPicker ( int  fontsize,
TQWidget *  parent,
const char *  name = 0 
)

The constructor.

Definition at line 763 of file kptdatetable.cpp.

Member Function Documentation

◆ closeMe

void KPlato::DateInternalMonthPicker::closeMe ( int  )
signal

This is send from the mouse click event handler.

◆ contentsMouseMoveEvent()

void KPlato::DateInternalMonthPicker::contentsMouseMoveEvent ( TQMouseEvent *  e)
protectedvirtual

Definition at line 863 of file kptdatetable.cpp.

◆ contentsMousePressEvent()

void KPlato::DateInternalMonthPicker::contentsMousePressEvent ( TQMouseEvent *  e)
protectedvirtual

Catch mouse click and move events to paint a rectangle around the item.

Definition at line 836 of file kptdatetable.cpp.

◆ contentsMouseReleaseEvent()

void KPlato::DateInternalMonthPicker::contentsMouseReleaseEvent ( TQMouseEvent *  e)
protectedvirtual

Emit monthSelected(int) when a cell has been released.

Definition at line 903 of file kptdatetable.cpp.

◆ getResult()

int KPlato::DateInternalMonthPicker::getResult ( ) const

Return the result.

0 means no selection (reject()), 1..12 are the months.

Definition at line 804 of file kptdatetable.cpp.

◆ minimumSizeHint()

TQSize KPlato::DateInternalMonthPicker::minimumSizeHint ( ) const
inline

The minimum size hint.

Definition at line 111 of file kptdatetable.h.

◆ paintCell()

void KPlato::DateInternalMonthPicker::paintCell ( TQPainter *  painter,
int  row,
int  col 
)
protectedvirtual

Paint a cell.

This simply draws the month names in it.

Definition at line 823 of file kptdatetable.cpp.

◆ setupPainter()

void KPlato::DateInternalMonthPicker::setupPainter ( TQPainter *  p)
protected

Set up the painter.

Definition at line 810 of file kptdatetable.cpp.

◆ sizeHint()

TQSize KPlato::DateInternalMonthPicker::sizeHint ( ) const

The size hint.

Definition at line 797 of file kptdatetable.cpp.

◆ viewportResizeEvent()

void KPlato::DateInternalMonthPicker::viewportResizeEvent ( TQResizeEvent *  )
protectedvirtual

The resize event.

Definition at line 816 of file kptdatetable.cpp.

Member Data Documentation

◆ activeCol

short int KPlato::DateInternalMonthPicker::activeCol
protected

the cell under mouse cursor when LBM is pressed

Definition at line 88 of file kptdatetable.h.

◆ activeRow

short int KPlato::DateInternalMonthPicker::activeRow
protected

Definition at line 89 of file kptdatetable.h.

◆ max

TQRect KPlato::DateInternalMonthPicker::max
protected

Contains the largest rectangle needed by the month names.

Definition at line 93 of file kptdatetable.h.

◆ result

int KPlato::DateInternalMonthPicker::result
protected

Store the month that has been clicked [1..12].

Definition at line 84 of file kptdatetable.h.


The documentation for this class was generated from the following files: