QSuperList Class Reference
[main.h Index] [main.h Hierarchy]
[Headers]
#include <qsuperlist.h>
Inherits: QFrame
Public Members
QSuperList is a port of TSuperList for Delphi/C++ Builder on Win32. It has been rewritten for Qt. The goal of this widget
is to create a listbox that requires little or no coding to use. If you are constantly writing code to validate
listbox additions and deletions then this widget is for you. It also adds code-free editing of listbox items. The
interface for entering and editing to the listbox is received through a QInputBox.
QSuperList :: QSuperList (QWidget* parent=0, const char * name=0, WFlags f=0)
Creates a QSuperList widget. The parameters are that of the QFrame (QSuperList's ancestor) that houses the controls.
QSuperList :: ~QSuperList ()
Dstructor. Nothing special here.
void QSuperList :: alignButtons( QDirection d)
Aligns buttons in one of four positions:
baRight - the buttons are on the right. The listbox is on the left
baLeft - the buttons are on the left. The listbox is on the right
baTop - the buttons are on the top. The listbox is on the bottom
baBottom - the buttons are on the bottom. The listbox is on the top
void QSuperList :: addItem ( QString str)
Adds str to the listbox directly as opposed to using the buttons. The current rules on length, blank values,
and maximum number of values is still enforced.
bool QSuperList :: getAllowBlanks()
Returns whether blanks are allowed in the listbox. Default is FALSE.
unsigned int QSuperList :: getButtonSize()
Returns the size of the plus and minus buttons.
QListBox* QSuperList :: getListBox()
Returns the QListBox* part of the widget. This allows direct access to the listbox, and means that all of the input and
editing constraints can be bypassed. This is also convienent for getting to parts of the listbox not yet extracted
through the parent widget.
int QSuperList :: getMaxLength()
Returns the maximium allowable length of a string in the listbox.
int QSuperList :: getMaxValues()
Returns the maximum number of items allowed in the listbox
void QSuperList :: setAllowBlanks(bool b)
Tells the widget to allow blanks in the listbox control.
void QSuperList :: setButtonSize(unsigned int size)
Sets the size of the buttons. The listbox will get smaller as the buttons get bigger. DEFAULT is 30
void QSuperList :: setMaxLength(int maxLength)
Sets the maximum length of an entry in the listbox. 0 means no limit. DEFAULT is 0.
void QSuperList :: setMaxValues(int maxValues)
Set the maximum number of values allowed in the listbox. 0 means no limit. The add button will
beome disabled after the maximum number of entries has been reached. DEFAULT is 0.
void QSuperList :: clear()
New in 1.1. Clears all of the items in the listbox. Hey, it beats calling QSuperList::listbox->clear().
Public Slots
void QSuperList :: AddClicked()
The add button (+) was clicked.
void QSuperList :: DeleteClicked()
The delete button (-) was clicked.
void QSuperList :: ListBoxDoubleClicked()
The QListBox control was double clicked. This slot is used internally to bring up the QInputBox for editing items.
void QSuperList :: show()
New in 1.1. Internally, this calls QSuperList::alignButtons(QDirection d) to force a repaint right after construction.
Documentation generated by root@rustycage.newdamage.com on Tue Jun 13 23:08:33 EDT 2000
|
Kdoc
|