• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • KDevelop Widgets Library
 

KDevelop Widgets Library

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

#include <qcomboview.h>

Inherits TQWidget.

Inherited by KComboView.

Public Types

enum  Policy {
  NoInsertion, AtTop, AtCurrent, AtBottom,
  AfterCurrent, BeforeCurrent
}
 

Public Slots

virtual void clear ()
 
void clearValidator ()
 
void clearEdit ()
 
virtual void setEditText (const TQString &)
 

Signals

void activated (TQListViewItem *item)
 
void highlighted (TQListViewItem *item)
 
void activated (const TQString &)
 
void highlighted (const TQString &)
 
void textChanged (const TQString &)
 
void focusGranted ()
 
void focusLost ()
 

Public Member Functions

 QComboView (bool rw, TQWidget *parent=0, const char *name=0)
 
 ~QComboView ()
 
int childCount () const
 
TQListViewItem * currentItem () const
 
virtual void setCurrentItem (TQListViewItem *)
 
virtual void setCurrentActiveItem (TQListViewItem *)
 
bool autoResize () const
 
virtual void setAutoResize (bool)
 
TQSize sizeHint () const
 
void setPalette (const TQPalette &)
 
void setFont (const TQFont &)
 
void setEnabled (bool)
 
virtual void setSizeLimit (int)
 
int sizeLimit () const
 
virtual void setInsertionPolicy (Policy policy)
 
Policy insertionPolicy () const
 
virtual void setValidator (const TQValidator *)
 
const TQValidator * validator () const
 
virtual void setListView (TQListView *)
 
TQListView * listView () const
 
virtual void setLineEdit (TQLineEdit *edit)
 
TQLineEdit * lineEdit () const
 
virtual void setAutoCompletion (bool)
 
bool autoCompletion () const
 
bool eventFilter (TQObject *object, TQEvent *event)
 
void setDuplicatesEnabled (bool enable)
 
bool duplicatesEnabled () const
 
bool editable () const
 
void setEditable (bool)
 
virtual void popup ()
 
TQString currentText () const
 
void setCurrentText (const TQString &)
 

Protected Member Functions

void paintEvent (TQPaintEvent *)
 
void resizeEvent (TQResizeEvent *)
 
void mousePressEvent (TQMouseEvent *)
 
void mouseMoveEvent (TQMouseEvent *)
 
void mouseReleaseEvent (TQMouseEvent *)
 
void mouseDoubleClickEvent (TQMouseEvent *)
 
void keyPressEvent (TQKeyEvent *e)
 
void focusInEvent (TQFocusEvent *e)
 
void focusOutEvent (TQFocusEvent *e)
 
void wheelEvent (TQWheelEvent *e)
 
void styleChange (TQStyle &)
 
void updateMask ()
 

Detailed Description

QComboView - a combo with a TQListView as a popup widget.

This means that you can have a treeview inside of a combo. Otherwise it works in the same way as TQComboBox and have similar API.

Definition at line 41 of file qcomboview.h.

Constructor & Destructor Documentation

◆ QComboView()

QComboView::QComboView ( bool  rw,
TQWidget *  parent = 0,
const char *  name = 0 
)

Constructs a combobox with a maximum size and either Motif 2.0 or Windows look and feel.

The input field can be edited if rw is TRUE, otherwise the user may only choose one of the items in the combobox.

The parent and name arguments are passed on to the TQWidget constructor.

Definition at line 141 of file qcomboview.cpp.

◆ ~QComboView()

QComboView::~QComboView ( )

Destroys the combobox.

Definition at line 175 of file qcomboview.cpp.

Member Function Documentation

◆ clear

void QComboView::clear ( )
virtualslot

Removes all comboview items.

Definition at line 200 of file qcomboview.cpp.

◆ clearEdit

void QComboView::clearEdit ( )
slot

Clears the line edit without changing the combobox's contents. Does nothing if the combobox isn't editable.

This is particularly useful when using a combobox as a line edit with history. For example you can connect the combobox's activated() signal to clearEdit() in order to present the user with a new, empty line as soon as Enter is pressed.

See also
setEditText()

Definition at line 1294 of file qcomboview.cpp.

◆ clearValidator

void QComboView::clearValidator ( )
slot

This slot is equivalent to setValidator( 0 ).

Definition at line 1191 of file qcomboview.cpp.

◆ eventFilter()

bool QComboView::eventFilter ( TQObject *  object,
TQEvent *  event 
)

reimp

Definition at line 849 of file qcomboview.cpp.

◆ focusInEvent()

void QComboView::focusInEvent ( TQFocusEvent *  e)
protected

reimp

Definition at line 613 of file qcomboview.cpp.

◆ focusOutEvent()

void QComboView::focusOutEvent ( TQFocusEvent *  e)
protected

reimp

Definition at line 625 of file qcomboview.cpp.

◆ keyPressEvent()

void QComboView::keyPressEvent ( TQKeyEvent *  e)
protected

reimp

Definition at line 525 of file qcomboview.cpp.

◆ lineEdit()

TQLineEdit * QComboView::lineEdit ( ) const

Returns the line edit, or 0 if there is no line edit.

Only editable listboxes have a line editor.

Definition at line 1275 of file qcomboview.cpp.

◆ listView()

TQListView * QComboView::listView ( ) const

Returns the current list box, or 0 if there is no list box. (QComboView can use TQPopupMenu instead of TQListBox.) Provided to match setlistView().

See also
setlistView()

Definition at line 1265 of file qcomboview.cpp.

◆ mouseDoubleClickEvent()

void QComboView::mouseDoubleClickEvent ( TQMouseEvent *  e)
protected

reimp

Definition at line 516 of file qcomboview.cpp.

◆ mouseMoveEvent()

void QComboView::mouseMoveEvent ( TQMouseEvent *  )
protected

reimp

Definition at line 502 of file qcomboview.cpp.

◆ mousePressEvent()

void QComboView::mousePressEvent ( TQMouseEvent *  e)
protected

reimp

Definition at line 467 of file qcomboview.cpp.

◆ mouseReleaseEvent()

void QComboView::mouseReleaseEvent ( TQMouseEvent *  )
protected

reimp

Definition at line 509 of file qcomboview.cpp.

◆ paintEvent()

void QComboView::paintEvent ( TQPaintEvent *  )
protected

reimp

Definition at line 412 of file qcomboview.cpp.

◆ popup()

void QComboView::popup ( )
virtual

Pops up the combobox popup list.

If the list is empty, no items appear.

Definition at line 719 of file qcomboview.cpp.

◆ resizeEvent()

void QComboView::resizeEvent ( TQResizeEvent *  e)
protected

reimp

Definition at line 401 of file qcomboview.cpp.

◆ setEditText

void QComboView::setEditText ( const TQString &  newText)
virtualslot

Sets the text in the line edit to newText without changing the combobox's contents. Does nothing if the combobox isn't editable.

This is useful e.g. for providing a good starting point for the user's editing and entering the change in the combobox only when the user presses Enter.

See also
clearEdit() insertItem()

Definition at line 1312 of file qcomboview.cpp.

◆ setEnabled()

void QComboView::setEnabled ( bool  enable)

reimp

Definition at line 1151 of file qcomboview.cpp.

◆ setFont()

void QComboView::setFont ( const TQFont &  font)

Sets the font for both the combobox button and the combobox popup list to font.

Definition at line 386 of file qcomboview.cpp.

◆ setLineEdit()

void QComboView::setLineEdit ( TQLineEdit *  edit)
virtual

Sets the line edit to use edit instead of the current line edit.

Definition at line 1412 of file qcomboview.cpp.

◆ setListView()

void QComboView::setListView ( TQListView *  newListView)
virtual

Sets the combobox to use newListBox instead of the current list box or popup. As a side effect, it clears the combobox of its current contents.

Warning
QComboView assumes that newListBox->text(n) returns non-null for 0 <= n < newListbox->count(). This assumption is necessary because of the line edit in QComboView.

Definition at line 1208 of file qcomboview.cpp.

◆ setPalette()

void QComboView::setPalette ( const TQPalette &  palette)

Sets the palette for both the combobox button and the combobox popup list to palette.

Definition at line 372 of file qcomboview.cpp.

◆ setValidator()

void QComboView::setValidator ( const TQValidator *  v)
virtual

Applies the validator v to the combobox so that only text which is valid according to v is accepted.

This function does nothing if the combobox is not editable.

See also
validator() clearValidator() TQValidator

Definition at line 1167 of file qcomboview.cpp.

◆ sizeHint()

TQSize QComboView::sizeHint ( ) const

reimp

This implementation caches the size hint to avoid resizing when the contents change dynamically. To invalidate the cached value call setFont().

Definition at line 275 of file qcomboview.cpp.

◆ styleChange()

void QComboView::styleChange ( TQStyle &  s)
protected

reimp

Definition at line 1334 of file qcomboview.cpp.

◆ updateMask()

void QComboView::updateMask ( )
protected

reimp

Definition at line 786 of file qcomboview.cpp.

◆ validator()

const TQValidator * QComboView::validator ( ) const

Returns the validator which constrains editing for this combobox if there is one; otherwise returns 0.

See also
setValidator() clearValidator() TQValidator

Definition at line 1181 of file qcomboview.cpp.

◆ wheelEvent()

void QComboView::wheelEvent ( TQWheelEvent *  e)
protected

reimp

Definition at line 637 of file qcomboview.cpp.


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

KDevelop Widgets Library

Skip menu "KDevelop Widgets Library"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members

KDevelop Widgets Library

Skip menu "KDevelop Widgets Library"
  • buildtools
  •   lib
  •     base
  •     parsers
  •       autotools
  •       qmake
  •     widgets
  •   api
  • languages
  •   lib
  •     debugger
  •     designer_integration
  •     interfaces
  • lib
  •   catalog
  •   interfaces
  •     extensions
  •     external
  •     extras
  •   util
  •   widgets
  •     propeditor
  • parts
  •   documentation
  •     interfaces
  • src
  •   profileengine
  •     lib
Generated for KDevelop Widgets Library by doxygen 1.8.13
This website is maintained by Timothy Pearson.