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

tdeui

Classes | Public Types | Signals | Public Member Functions | Protected Slots | Protected Member Functions | List of all members
KEditListBox Class Reference

#include <keditlistbox.h>

Inherits TQGroupBox.

Classes

class  CustomEditor
 

Public Types

enum  Button { Add = 1 , Remove = 2 , UpDown = 4 }
 
enum  { All = Add|Remove|UpDown }
 

Signals

void changed ()
 
void added (const TQString &text)
 
void added (int item, const TQString &text)
 
void removed (const TQString &text)
 
void removed (int item, const TQString &text)
 
void renamed (const TQString &from, const TQString &to)
 
void renamed (int item, const TQString &from, const TQString &to)
 

Public Member Functions

 KEditListBox (TQWidget *parent=0, const char *name=0, bool checkAtEntering=false, int buttons=All)
 
 KEditListBox (const TQString &title, TQWidget *parent=0, const char *name=0, bool checkAtEntering=false, int buttons=All)
 
 KEditListBox (const TQString &title, const CustomEditor &customEditor, TQWidget *parent=0, const char *name=0, bool checkAtEntering=false, int buttons=All)
 
TQListBox * listBox () const
 
KLineEdit * lineEdit () const
 
TQPushButton * addButton () const
 
TQPushButton * removeButton () const
 
TQPushButton * upButton () const
 
TQPushButton * downButton () const
 
int count () const
 
void insertStringList (const TQStringList &list, int index=-1)
 
void insertStrList (const TQStrList *list, int index=-1)
 
void insertStrList (const TQStrList &list, int index=-1)
 
void insertStrList (const char **list, int numStrings=-1, int index=-1)
 
void insertItem (const TQString &text, int index=-1)
 
void clear ()
 
TQString text (int index) const
 
int currentItem () const
 
TQString currentText () const
 
TQStringList items () const
 
void setItems (const TQStringList &items)
 
int buttons () const
 
Button buttonsProp () const
 
void setButtons (uint buttons)
 
void setButtonsProp (Button buttons)
 

Protected Slots

void moveItemUp ()
 
void moveItemDown ()
 
void addItem ()
 
void removeItem ()
 
void enableMoveButtons (int index)
 
void typedSomething (const TQString &text)
 

Protected Member Functions

virtual void virtual_hook (int id, void *data)
 

Detailed Description

An editable listbox.

This class provides an editable listbox ;-), this means a listbox which is accompanied by a line edit to enter new items into the listbox and pushbuttons to add and remove items from the listbox and two buttons to move items up and down.

KDE Edit List Box Widget

Definition at line 44 of file keditlistbox.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Definition at line 63 of file keditlistbox.h.

◆ Button

enum KEditListBox::Button

Enumeration of the buttons, the listbox offers.

Specify them in the constructor in the buttons parameter, or in setButtons.

Definition at line 62 of file keditlistbox.h.

Constructor & Destructor Documentation

◆ KEditListBox() [1/3]

KEditListBox::KEditListBox ( TQWidget *  parent = 0,
const char *  name = 0,
bool  checkAtEntering = false,
int  buttons = All 
)

Create an editable listbox.

If checkAtEntering is true, after every character you type in the line edit KEditListBox will enable or disable the Add-button, depending whether the current content of the line edit is already in the listbox. Maybe this can become a performance hit with large lists on slow machines. If checkAtEntering is false, it will be checked if you press the Add-button. It is not possible to enter items twice into the listbox.

Definition at line 48 of file keditlistbox.cpp.

◆ KEditListBox() [2/3]

KEditListBox::KEditListBox ( const TQString &  title,
TQWidget *  parent = 0,
const char *  name = 0,
bool  checkAtEntering = false,
int  buttons = All 
)

Create an editable listbox.

The same as the other constructor, additionally it takes title, which will be the title of the frame around the listbox.

Definition at line 55 of file keditlistbox.cpp.

◆ KEditListBox() [3/3]

KEditListBox::KEditListBox ( const TQString &  title,
const CustomEditor &  customEditor,
TQWidget *  parent = 0,
const char *  name = 0,
bool  checkAtEntering = false,
int  buttons = All 
)

Another constructor, which allows to use a custom editing widget instead of the standard KLineEdit widget.

E.g. you can use a KURLRequester or a KComboBox as input widget. The custom editor must consist of a lineedit and optionally another widget that is used as representation. A KComboBox or a KURLRequester have a KLineEdit as child-widget for example, so the KComboBox is used as the representation widget.

See also
KURLRequester::customEditor()
Since
3.1

Definition at line 62 of file keditlistbox.cpp.

◆ ~KEditListBox()

KEditListBox::~KEditListBox ( )
virtual

Definition at line 71 of file keditlistbox.cpp.

Member Function Documentation

◆ addButton()

TQPushButton * KEditListBox::addButton ( ) const
inline

Return a pointer to the Add button.

Definition at line 119 of file keditlistbox.h.

◆ added [1/2]

void KEditListBox::added ( const TQString &  text)
signal

This signal is emitted when the user adds a new string to the list.

Parameters
textis the added string.
Since
3.2
See also
added( int item, const TQString & text )

◆ added [2/2]

void KEditListBox::added ( int  item,
const TQString &  text 
)
signal

This signal is emitted when the user adds a new string to the list.

Parameters
itemis the added item's position in the list.
textis the added string.
Since
R14.1.0
See also
added( const TQString & text )

◆ addItem

void KEditListBox::addItem ( )
protectedslot

Definition at line 254 of file keditlistbox.cpp.

◆ buttons()

int KEditListBox::buttons ( ) const

Returns which buttons are visible.

Definition at line 406 of file keditlistbox.cpp.

◆ buttonsProp()

Button KEditListBox::buttonsProp ( ) const
inline

Definition at line 190 of file keditlistbox.h.

◆ clear()

void KEditListBox::clear ( )

Clears both the listbox and the line edit.

Definition at line 364 of file keditlistbox.cpp.

◆ count()

int KEditListBox::count ( ) const
inline

See TQListBox::count()

Definition at line 136 of file keditlistbox.h.

◆ currentItem()

int KEditListBox::currentItem ( ) const

See TQListBox::currentItem()

Definition at line 300 of file keditlistbox.cpp.

◆ currentText()

TQString KEditListBox::currentText ( ) const
inline

See TQListBox::currentText()

Definition at line 172 of file keditlistbox.h.

◆ downButton()

TQPushButton * KEditListBox::downButton ( ) const
inline

Return a pointer to the Down button.

Definition at line 131 of file keditlistbox.h.

◆ enableMoveButtons

void KEditListBox::enableMoveButtons ( int  index)
protectedslot

Definition at line 328 of file keditlistbox.cpp.

◆ insertItem()

void KEditListBox::insertItem ( const TQString &  text,
int  index = -1 
)
inline

See TQListBox::insertItem()

Definition at line 156 of file keditlistbox.h.

◆ insertStringList()

void KEditListBox::insertStringList ( const TQStringList &  list,
int  index = -1 
)

See TQListBox::insertStringList()

Definition at line 371 of file keditlistbox.cpp.

◆ insertStrList() [1/3]

void KEditListBox::insertStrList ( const char **  list,
int  numStrings = -1,
int  index = -1 
)

See TQListBox::insertStrList()

Definition at line 386 of file keditlistbox.cpp.

◆ insertStrList() [2/3]

void KEditListBox::insertStrList ( const TQStrList &  list,
int  index = -1 
)

See TQListBox::insertStrList()

Definition at line 381 of file keditlistbox.cpp.

◆ insertStrList() [3/3]

void KEditListBox::insertStrList ( const TQStrList *  list,
int  index = -1 
)

See TQListBox::insertStringList()

Definition at line 376 of file keditlistbox.cpp.

◆ items()

TQStringList KEditListBox::items ( ) const
Returns
a stringlist of all items in the listbox

Definition at line 391 of file keditlistbox.cpp.

◆ lineEdit()

KLineEdit * KEditListBox::lineEdit ( ) const
inline

Return a pointer to the embedded TQLineEdit.

Definition at line 115 of file keditlistbox.h.

◆ listBox()

TQListBox * KEditListBox::listBox ( ) const
inline

Return a pointer to the embedded TQListBox.

Definition at line 111 of file keditlistbox.h.

◆ moveItemDown

void KEditListBox::moveItemDown ( )
protectedslot

Definition at line 231 of file keditlistbox.cpp.

◆ moveItemUp

void KEditListBox::moveItemUp ( )
protectedslot

Definition at line 208 of file keditlistbox.cpp.

◆ removeButton()

TQPushButton * KEditListBox::removeButton ( ) const
inline

Return a pointer to the Remove button.

Definition at line 123 of file keditlistbox.h.

◆ removed [1/2]

void KEditListBox::removed ( const TQString &  text)
signal

This signal is emitted when the user removes a string from the list.

Parameters
textis the removed string.
Since
3.2
See also
removed( int item, const TQString & text )

◆ removed [2/2]

void KEditListBox::removed ( int  item,
const TQString &  text 
)
signal

This signal is emitted when the user removes a string from the list.

Parameters
itemis the removed item's position in the list.
textis the removed string.
Since
R14.1.0
See also
removed( const TQString & text )

◆ removeItem

void KEditListBox::removeItem ( )
protectedslot

Definition at line 307 of file keditlistbox.cpp.

◆ renamed [1/2]

void KEditListBox::renamed ( const TQString &  from,
const TQString &  to 
)
signal

This signal is emitted when the user renames a list item.

Parameters
fromis the original item's text.
tois the new text of the item.
Since
R14.1.0
See also
renamed( int item, const TQString &from, const TQString &to )

◆ renamed [2/2]

void KEditListBox::renamed ( int  item,
const TQString &  from,
const TQString &  to 
)
signal

This signal is emitted when the user renames a list item.

Parameters
itemis the renamed item's position in the list.
fromis the original item's text.
tois the new text of the item.
Since
R14.1.0
See also
renamed( const TQString &from, const TQString &to )

◆ setButtons()

void KEditListBox::setButtons ( uint  buttons)

Specifies which buttons should be visible.

Definition at line 117 of file keditlistbox.cpp.

◆ setButtonsProp()

void KEditListBox::setButtonsProp ( Button  buttons)
inline

Definition at line 196 of file keditlistbox.h.

◆ setItems()

void KEditListBox::setItems ( const TQStringList &  items)

Clears the listbox and sets the contents to items.

Since
3.4

Definition at line 400 of file keditlistbox.cpp.

◆ text()

TQString KEditListBox::text ( int  index) const
inline

See TQListBox::text()

Definition at line 164 of file keditlistbox.h.

◆ typedSomething

void KEditListBox::typedSomething ( const TQString &  text)
protectedslot

Definition at line 168 of file keditlistbox.cpp.

◆ upButton()

TQPushButton * KEditListBox::upButton ( ) const
inline

Return a pointer to the Up button.

Definition at line 127 of file keditlistbox.h.

◆ virtual_hook()

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

Definition at line 411 of file keditlistbox.cpp.


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