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

tdeui

Public Types | Signals | Public Member Functions | List of all members
KStatusBar Class Reference

#include <kstatusbar.h>

Inherits TQStatusBar.

Public Types

enum  BarStatus { Toggle , Show , Hide }
 

Signals

void pressed (int)
 
void released (int)
 

Public Member Functions

 KStatusBar (TQWidget *parent=0L, const char *name=0L)
 
 ~KStatusBar ()
 
void insertItem (const TQString &text, int id, int stretch=0, bool permanent=false)
 
void insertFixedItem (const TQString &text, int id, bool permanent=false)
 
void removeItem (int id)
 
bool hasItem (int id) const
 
void changeItem (const TQString &text, int id)
 
void setItemAlignment (int id, int align)
 
void setItemFixed (int id, int width=-1)
 

Detailed Description

KDE statusbar widget

Display status messages.

You can insert text labels or custom widgets. Their geometry is managed internally. KStatusBar resizes itself, but positioning is left to TDEMainWindow (or to you, if you don't use TDEMainWindow ).

A special type of item is a message which is a temporary text-message displayed on top of other items in full-width. Messages are visible for specified time, or until you call the slot TQStatusBar::clear(). See TQStatusBar::message for details.

It is useful to connect the TDEActionCollection signals to the TQStatusBar::message slots.

KStatusBar inherits TQStatusBar, you can freely use all QStatusBar methods.

Empty text items are not visible. They will become visible when you change (add) text.

Author
Mark Donohoe (donoh.nosp@m.oe@k.nosp@m.de.or.nosp@m.g) Maintained by Sven Radej radej.nosp@m.@kde.nosp@m..org
See also
TDEActionCollection

Definition at line 87 of file kstatusbar.h.

Member Enumeration Documentation

◆ BarStatus

enum KStatusBar::BarStatus
Deprecated:
WARNING: This enum is only for backward compatibility and it may be removed. No method here uses it.

Definition at line 97 of file kstatusbar.h.

Constructor & Destructor Documentation

◆ KStatusBar()

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

Constructs a status bar.

parent is usually TDEMainWindow.

Definition at line 61 of file kstatusbar.cpp.

◆ ~KStatusBar()

KStatusBar::~KStatusBar ( )

Destructor.

Deletes all internal objects.

Definition at line 74 of file kstatusbar.cpp.

Member Function Documentation

◆ changeItem()

void KStatusBar::changeItem ( const TQString &  text,
int  id 
)

Changes the text in a status bar field.

The item will be resized to fit the text. If you change text to be empty, item will not be visible (untill you add some text).

Parameters
textThe label's text string
idThe id of item.

Definition at line 112 of file kstatusbar.cpp.

◆ hasItem()

bool KStatusBar::hasItem ( int  id) const
Since
3.2

Returns true if an item with id exists already in KStatusBar, otherwise returns false.

Parameters
idid of the item

Definition at line 103 of file kstatusbar.cpp.

◆ insertFixedItem()

void KStatusBar::insertFixedItem ( const TQString &  text,
int  id,
bool  permanent = false 
)
inline

Inserts a fixed width text label into status bar.

The width will be set according to text, but will remain fixed even if you change text. You can change fixed width by calling setItemFixed.

Parameters
textThe label's text string
idid of item
permanentpermanent flag passed to TQStatusBar::addWidget

Definition at line 138 of file kstatusbar.h.

◆ insertItem()

void KStatusBar::insertItem ( const TQString &  text,
int  id,
int  stretch = 0,
bool  permanent = false 
)

Inserts a text label into the status bar.

Parameters stretch and permanent are passed to TQStatusBar::addWidget .

If permanent is true, then item will be placed on the far right of the statusbar and will never be hidden by TQStatusBar::message.

Parameters
textThe label's text string.
idid of item
stretchstretch passed to TQStatusBar::addWidget
permanentis item permanent or not (passed to TQStatusBar::addWidget )
See also
QStatusbar::addWidget

Definition at line 78 of file kstatusbar.cpp.

◆ pressed

void KStatusBar::pressed ( int  )
signal

Emitted when mouse is pressed over item id.

Connect to this signal if you want to respond to mouse press events.

◆ released

void KStatusBar::released ( int  )
signal

Emitted when mouse is released over item id.

Connect to this signal if you want to respond to mouse release events (clicks).

◆ removeItem()

void KStatusBar::removeItem ( int  id)

Removes an item.

Parameters
idThe item to remove.

Definition at line 90 of file kstatusbar.cpp.

◆ setItemAlignment()

void KStatusBar::setItemAlignment ( int  id,
int  align 
)

Sets the alignment of item id.

By default all fields are aligned AlignHCenter | AlignVCenter. See TQLabel::setAlignment for details.

Definition at line 127 of file kstatusbar.cpp.

◆ setItemFixed()

void KStatusBar::setItemFixed ( int  id,
int  width = -1 
)

Sets item id to have fixed width.

This cannot be undone, but you can always set new fixed width.

Parameters
idid of item
widthfixed width in pixels. Default -1 is to adapt to text width.

Definition at line 138 of file kstatusbar.cpp.


The documentation for this class was generated from the following files:
  • kstatusbar.h
  • kstatusbar.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.