kexi

#include <kexitableviewheader.h>

Public Member Functions

 KexiTableViewHeader (TQWidget *parent=0, const char *name=0)
int addLabel (const TQString &s, int size=-1)
int addLabel (const TQIconSet &iconset, const TQString &s, int size=-1)
void removeLabel (int section)
void setToolTip (int section, const TQString &toolTip)
virtual bool eventFilter (TQObject *watched, TQEvent *e)
void setSelectedSection (int section)
int selectedSection () const
TQColor selectionBackgroundColor () const
void setSelectionBackgroundColor (const TQColor &color)

Protected Slots

void slotSizeChange (int section, int oldSize, int newSize)

Protected Member Functions

virtual void paintSection (TQPainter *p, int index, const TQRect &fr)
virtual void styleChange (TQStyle &oldStyle)

Protected Attributes

int m_lastToolTipSection
TQRect m_toolTipRect
TQStringList m_toolTips
TQColor m_selectionBackgroundColor
int m_selectedSection
bool m_styleChangeEnabled: 1

Detailed Description

A table view header with additional actions.

Displays field description (Field::description()) text as tool tip, if available. Displays tool tips if a pointed section is not wide enough to fit its label text.

Todo
react on indexChange ( int section, int fromIndex, int toIndex ) signal

Definition at line 33 of file kexitableviewheader.h.

Constructor & Destructor Documentation

◆ KexiTableViewHeader()

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

Definition at line 61 of file kexitableviewheader.cpp.

◆ ~KexiTableViewHeader()

KexiTableViewHeader::~KexiTableViewHeader ( )
virtual

Definition at line 74 of file kexitableviewheader.cpp.

Member Function Documentation

◆ addLabel() [1/2]

int KexiTableViewHeader::addLabel ( const TQIconSet & iconset,
const TQString & s,
int size = -1 )

Definition at line 95 of file kexitableviewheader.cpp.

◆ addLabel() [2/2]

int KexiTableViewHeader::addLabel ( const TQString & s,
int size = -1 )

Definition at line 88 of file kexitableviewheader.cpp.

◆ eventFilter()

bool KexiTableViewHeader::eventFilter ( TQObject * watched,
TQEvent * e )
virtual

Definition at line 120 of file kexitableviewheader.cpp.

◆ paintSection()

void KexiTableViewHeader::paintSection ( TQPainter * p,
int index,
const TQRect & fr )
protectedvirtual

Definition at line 185 of file kexitableviewheader.cpp.

◆ removeLabel()

void KexiTableViewHeader::removeLabel ( int section)

Definition at line 102 of file kexitableviewheader.cpp.

◆ selectedSection()

int KexiTableViewHeader::selectedSection ( ) const

Definition at line 180 of file kexitableviewheader.cpp.

◆ selectionBackgroundColor()

TQColor KexiTableViewHeader::selectionBackgroundColor ( ) const

Definition at line 163 of file kexitableviewheader.cpp.

◆ setSelectedSection()

void KexiTableViewHeader::setSelectedSection ( int section)

Definition at line 168 of file kexitableviewheader.cpp.

◆ setSelectionBackgroundColor()

void KexiTableViewHeader::setSelectionBackgroundColor ( const TQColor & color)

Definition at line 158 of file kexitableviewheader.cpp.

◆ setToolTip()

void KexiTableViewHeader::setToolTip ( int section,
const TQString & toolTip )

Sets toolTip for section.

Definition at line 113 of file kexitableviewheader.cpp.

◆ slotSizeChange

void KexiTableViewHeader::slotSizeChange ( int section,
int oldSize,
int newSize )
protectedslot

Definition at line 151 of file kexitableviewheader.cpp.

◆ styleChange()

void KexiTableViewHeader::styleChange ( TQStyle & oldStyle)
protectedvirtual

Definition at line 78 of file kexitableviewheader.cpp.

Member Data Documentation

◆ m_lastToolTipSection

int KexiTableViewHeader::m_lastToolTipSection
protected

Definition at line 67 of file kexitableviewheader.h.

◆ m_selectedSection

int KexiTableViewHeader::m_selectedSection
protected

Definition at line 72 of file kexitableviewheader.h.

◆ m_selectionBackgroundColor

TQColor KexiTableViewHeader::m_selectionBackgroundColor
protected

Definition at line 71 of file kexitableviewheader.h.

◆ m_styleChangeEnabled

bool KexiTableViewHeader::m_styleChangeEnabled
protected

Definition at line 73 of file kexitableviewheader.h.

◆ m_toolTipRect

TQRect KexiTableViewHeader::m_toolTipRect
protected

Definition at line 68 of file kexitableviewheader.h.

◆ m_toolTips

TQStringList KexiTableViewHeader::m_toolTips
protected

Definition at line 70 of file kexitableviewheader.h.


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