• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • twin/lib
 

twin/lib

Public Types | Public Member Functions | Protected Member Functions | Friends | List of all members
KCommonDecorationButton Class Referenceabstract

#include <kcommondecoration.h>

Inherits TQButton.

Public Types

enum  {
  ManualReset = 1 << 0 , SizeChange = 1 << 1 , ToggleChange = 1 << 2 , StateChange = 1 << 3 ,
  IconChange = 1 << 4 , DecorationReset = 1 << 5
}
 

Public Member Functions

 KCommonDecorationButton (ButtonType type, KCommonDecoration *parent, const char *name)
 
virtual void reset (unsigned long changed)=0
 
KCommonDecoration * decoration () const
 
ButtonType type () const
 
bool isLeft () const
 
void setRealizeButtons (int btns)
 
void setSize (const TQSize &s)
 
void setTipText (const TQString &tip)
 
ButtonState lastMousePress () const
 
TQSize sizeHint () const
 

Protected Member Functions

void setToggleButton (bool toggle)
 
void setOn (bool on)
 
void setLeft (bool left)
 
void mousePressEvent (TQMouseEvent *e)
 
void mouseReleaseEvent (TQMouseEvent *e)
 

Friends

class KCommonDecoration
 

Detailed Description

Title bar buttons of KCommonDecoration need to inherit this class.

Definition at line 292 of file kcommondecoration.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

These flags specify what has changed, e.g.

the reason for a reset().

Enumerator
ManualReset 

The button might want to do a full reset for some reason...

SizeChange 

The button size changed.

See also
setSize()
ToggleChange 

The button toggle state has changed.

See also
setToggleButton()
StateChange 

The button has been set pressed or not...

See also
setOn()
IconChange 

The window icon has been changed.

DecorationReset 

E.g. when decoration colors have changed.

Definition at line 306 of file kcommondecoration.h.

Constructor & Destructor Documentation

◆ KCommonDecorationButton()

KCommonDecorationButton::KCommonDecorationButton ( ButtonType  type,
KCommonDecoration *  parent,
const char *  name 
)

Definition at line 899 of file kcommondecoration.cpp.

◆ ~KCommonDecorationButton()

KCommonDecorationButton::~KCommonDecorationButton ( )
virtual

Definition at line 910 of file kcommondecoration.cpp.

Member Function Documentation

◆ decoration()

KCommonDecoration * KCommonDecorationButton::decoration ( ) const
Returns
the KCommonDecoration the button belongs to.

Definition at line 914 of file kcommondecoration.cpp.

◆ isLeft()

bool KCommonDecorationButton::isLeft ( ) const

Whether the button is left of the titlebar or not.

Definition at line 924 of file kcommondecoration.cpp.

◆ lastMousePress()

ButtonState KCommonDecorationButton::lastMousePress ( ) const
inline

The mouse button that has been clicked last time.

Definition at line 349 of file kcommondecoration.h.

◆ mousePressEvent()

void KCommonDecorationButton::mousePressEvent ( TQMouseEvent *  e)
protected

Definition at line 973 of file kcommondecoration.cpp.

◆ mouseReleaseEvent()

void KCommonDecorationButton::mouseReleaseEvent ( TQMouseEvent *  e)
protected

Definition at line 983 of file kcommondecoration.cpp.

◆ reset()

virtual void KCommonDecorationButton::reset ( unsigned long  changed)
pure virtual

Initialize the button after size change etc.

◆ setLeft()

void KCommonDecorationButton::setLeft ( bool  left)
protected

Definition at line 929 of file kcommondecoration.cpp.

◆ setOn()

void KCommonDecorationButton::setOn ( bool  on)
protected

Definition at line 965 of file kcommondecoration.cpp.

◆ setRealizeButtons()

void KCommonDecorationButton::setRealizeButtons ( int  btns)

Set which mouse buttons the button should honor.

Used e.g. to prevent accidental right mouse clicks.

Definition at line 934 of file kcommondecoration.cpp.

◆ setSize()

void KCommonDecorationButton::setSize ( const TQSize &  s)

Set the button size.

Definition at line 939 of file kcommondecoration.cpp.

◆ setTipText()

void KCommonDecorationButton::setTipText ( const TQString &  tip)

Set/update the button's tool tip.

Definition at line 954 of file kcommondecoration.cpp.

◆ setToggleButton()

void KCommonDecorationButton::setToggleButton ( bool  toggle)
protected

Definition at line 959 of file kcommondecoration.cpp.

◆ sizeHint()

TQSize KCommonDecorationButton::sizeHint ( ) const

Definition at line 949 of file kcommondecoration.cpp.

◆ type()

ButtonType KCommonDecorationButton::type ( ) const
Returns
the button type.
See also
ButtonType

Definition at line 919 of file kcommondecoration.cpp.

Friends And Related Function Documentation

◆ KCommonDecoration

friend class KCommonDecoration
friend

Definition at line 294 of file kcommondecoration.h.


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

twin/lib

Skip menu "twin/lib"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

twin/lib

Skip menu "twin/lib"
  • kate
  • libkonq
  • twin
  •   lib
Generated for twin/lib by doxygen 1.9.4
This website is maintained by Timothy Pearson.