• 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>

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.

Member Enumeration Documentation

◆ Policy

enum QComboView::Policy

Definition at line 83 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 140 of file qcomboview.cpp.

◆ ~QComboView()

QComboView::~QComboView ( )

Destroys the combobox.

Definition at line 174 of file qcomboview.cpp.

Member Function Documentation

◆ autoCompletion()

bool QComboView::autoCompletion ( ) const

Definition at line 1326 of file qcomboview.cpp.

◆ autoResize()

bool QComboView::autoResize ( ) const

Definition at line 252 of file qcomboview.cpp.

◆ childCount()

int QComboView::childCount ( ) const

Definition at line 189 of file qcomboview.cpp.

◆ clear

void QComboView::clear ( )
virtualslot

Removes all comboview items.

Definition at line 199 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 1293 of file qcomboview.cpp.

◆ clearValidator

void QComboView::clearValidator ( )
slot

This slot is equivalent to setValidator( 0 ).

Definition at line 1190 of file qcomboview.cpp.

◆ currentItem()

TQListViewItem * QComboView::currentItem ( ) const

Definition at line 212 of file qcomboview.cpp.

◆ currentText()

TQString QComboView::currentText ( ) const

Definition at line 599 of file qcomboview.cpp.

◆ duplicatesEnabled()

bool QComboView::duplicatesEnabled ( ) const

Definition at line 184 of file qcomboview.cpp.

◆ editable()

bool QComboView::editable ( ) const

Definition at line 1341 of file qcomboview.cpp.

◆ eventFilter()

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

reimp

Definition at line 848 of file qcomboview.cpp.

◆ focusInEvent()

void QComboView::focusInEvent ( TQFocusEvent * e)
protected

reimp

Definition at line 612 of file qcomboview.cpp.

◆ focusOutEvent()

void QComboView::focusOutEvent ( TQFocusEvent * e)
protected

reimp

Definition at line 624 of file qcomboview.cpp.

◆ insertionPolicy()

QComboView::Policy QComboView::insertionPolicy ( ) const

Definition at line 1061 of file qcomboview.cpp.

◆ keyPressEvent()

void QComboView::keyPressEvent ( TQKeyEvent * e)
protected

reimp

Definition at line 524 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 1274 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 1264 of file qcomboview.cpp.

◆ mouseDoubleClickEvent()

void QComboView::mouseDoubleClickEvent ( TQMouseEvent * e)
protected

reimp

Definition at line 515 of file qcomboview.cpp.

◆ mouseMoveEvent()

void QComboView::mouseMoveEvent ( TQMouseEvent * )
protected

reimp

Definition at line 501 of file qcomboview.cpp.

◆ mousePressEvent()

void QComboView::mousePressEvent ( TQMouseEvent * e)
protected

reimp

Definition at line 466 of file qcomboview.cpp.

◆ mouseReleaseEvent()

void QComboView::mouseReleaseEvent ( TQMouseEvent * )
protected

reimp

Definition at line 508 of file qcomboview.cpp.

◆ paintEvent()

void QComboView::paintEvent ( TQPaintEvent * )
protected

reimp

Definition at line 411 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 718 of file qcomboview.cpp.

◆ resizeEvent()

void QComboView::resizeEvent ( TQResizeEvent * e)
protected

reimp

Definition at line 400 of file qcomboview.cpp.

◆ setAutoCompletion()

void QComboView::setAutoCompletion ( bool enable)
virtual

Definition at line 1319 of file qcomboview.cpp.

◆ setAutoResize()

void QComboView::setAutoResize ( bool enable)
virtual

Definition at line 257 of file qcomboview.cpp.

◆ setCurrentActiveItem()

void QComboView::setCurrentActiveItem ( TQListViewItem * item)
virtual

Definition at line 1473 of file qcomboview.cpp.

◆ setCurrentItem()

void QComboView::setCurrentItem ( TQListViewItem * item)
virtual

Definition at line 217 of file qcomboview.cpp.

◆ setCurrentText()

void QComboView::setCurrentText ( const TQString & txt)

Definition at line 1456 of file qcomboview.cpp.

◆ setDuplicatesEnabled()

void QComboView::setDuplicatesEnabled ( bool enable)

Definition at line 179 of file qcomboview.cpp.

◆ setEditable()

void QComboView::setEditable ( bool y)

Definition at line 1346 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 1311 of file qcomboview.cpp.

◆ setEnabled()

void QComboView::setEnabled ( bool enable)

reimp

Definition at line 1150 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 385 of file qcomboview.cpp.

◆ setInsertionPolicy()

void QComboView::setInsertionPolicy ( Policy policy)
virtual

Definition at line 1066 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 1411 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 1207 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 371 of file qcomboview.cpp.

◆ setSizeLimit()

void QComboView::setSizeLimit ( int lines)
virtual

Definition at line 1042 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 1166 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 274 of file qcomboview.cpp.

◆ sizeLimit()

int QComboView::sizeLimit ( ) const

Definition at line 1037 of file qcomboview.cpp.

◆ styleChange()

void QComboView::styleChange ( TQStyle & s)
protected

reimp

Definition at line 1333 of file qcomboview.cpp.

◆ updateMask()

void QComboView::updateMask ( )
protected

reimp

Definition at line 785 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 1180 of file qcomboview.cpp.

◆ wheelEvent()

void QComboView::wheelEvent ( TQWheelEvent * e)
protected

reimp

Definition at line 636 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.15.0
This website is maintained by Timothy Pearson.