Expanding frame with action list and comment.

Public Member Functions | |
| ListFrame (QtxListAction *, QWidget *parent) | |
| Constructor. | |
| virtual | ~ListFrame () |
| Destructor. | |
| void | clear () |
| Clear list of names. | |
| const QStringList | names () const |
| Get list of names. | |
| void | addNames (const QStringList &) |
| Add names to the list. | |
| void | setSingleComment (const QString &) |
| Set comment which is displayed when single name is selected. | |
| void | setMultipleComment (const QString &) |
| Set comment which is displayed when multiple names are selected. | |
| int | selected () const |
| Get number of selected names. | |
| void | setSelected (const int) |
| Set number of selected names. | |
| int | linesNumber () const |
| Get maximum numer of lines shown without activation of vertical scroll bar. | |
| int | charsNumber () const |
| Get maximum numer of characters in the line. | |
| void | setLinesNumber (const int) |
| Set maximum numer of lines shown without activation of vertical scroll bar. | |
| void | setCharsNumber (const int) |
| Set maximum numer of characters in the line. | |
| virtual QSize | sizeHint () const |
| Get preferable size for the list widget. | |
| virtual QSize | minimumSizeHint () const |
| Get preferable minimum size for the list widget. | |
| virtual bool | eventFilter (QObject *, QEvent *) |
| Process mouse events on the viewport of the list widget. | |
| virtual void | setVisible (bool) |
| Called when list widget is shown/hidden. | |
Protected Member Functions | |
| virtual void | keyPressEvent (QKeyEvent *) |
| Process key press event. | |
Private Member Functions | |
| void | accept () |
| Validate the action. | |
| void | updateComment () |
| Update displayed comment. | |
| void | setNames (const QStringList &) |
| Set names to the list. | |
| void | removePostedEvens (QObject *, int) |
| Filter all events of specified type sent to specified object. | |
Private Attributes | |
| QListWidget * | myList |
| QStringList | myNames |
| QtxListAction * | myAction |
| QLabel * | myComment |
| int | myLines |
| int | myChars |
| QString | mySingleComment |
| QString | myMultipleComment |
| QtxListAction.ListFrame::ListFrame | ( | QtxListAction * | a, |
| QWidget * | parent | ||
| ) |
| a | list action |
| parent | parent widget |
References main(), QtxListAction.ListFrame.myComment, QtxListAction.ListFrame.myList, and QtxListAction.ListFrame.myMultipleComment.
| QtxListAction.ListFrame::~ListFrame | ( | ) | [virtual] |
| void QtxListAction.ListFrame::clear | ( | ) |
| const QStringList QtxListAction.ListFrame::names | ( | ) | const |
| void QtxListAction.ListFrame::addNames | ( | const QStringList & | names | ) |
Truncates each name to fit the frame width. Method QtxListAction.setCharsNumber(int) can be used to change the frame width (in characters).
| names | list of names to be added |
| void QtxListAction.ListFrame::setSingleComment | ( | const QString & | comment | ) |
| comment | comment format |
| void QtxListAction.ListFrame::setMultipleComment | ( | const QString & | comment | ) |
| comment | comment format |
| int QtxListAction.ListFrame::selected | ( | ) | const |
| void QtxListAction.ListFrame::setSelected | ( | const int | lastSel | ) |
| lastSel | number of items to be selected |
References QtxListAction.ScrollEvent.Scroll.
| int QtxListAction.ListFrame::linesNumber | ( | ) | const |
| int QtxListAction.ListFrame::charsNumber | ( | ) | const |
If the name length is greater than this value, it will be truncated.
| void QtxListAction.ListFrame::setLinesNumber | ( | const int | maxLines | ) |
| maxLines | number of lines |
| void QtxListAction.ListFrame::setCharsNumber | ( | const int | maxChars | ) |
If the name length is greater than this value, it will be truncated.
| maxChars | number of characters |
| QSize QtxListAction.ListFrame::sizeHint | ( | ) | const [virtual] |
References QtxListAction.charsNumber(), and QtxListAction.linesNumber().
| QSize QtxListAction.ListFrame::minimumSizeHint | ( | ) | const [virtual] |
References QtxListAction.charsNumber(), and QtxListAction.linesNumber().
| o | object recieving event (viewport) |
| e | event |
true if further event processing should be stopped. References QtxAction.eventFilter(), QtxListAction.ScrollEvent.isDown(), and QtxListAction.ScrollEvent.Scroll.
| void QtxListAction.ListFrame::setVisible | ( | bool | on | ) | [virtual] |
| on | if true, widget is shown, otherswise it is hidden |
| void QtxListAction.ListFrame::keyPressEvent | ( | QKeyEvent * | e | ) | [protected, virtual] |
The following keys are supported:
| e | key press event |
References QtxListAction.linesNumber().
| void QtxListAction.ListFrame::accept | ( | ) | [private] |
| void QtxListAction.ListFrame::updateComment | ( | ) | [private] |
| void QtxListAction.ListFrame::setNames | ( | const QStringList & | names | ) | [private] |
Truncates each name to fit the frame width. Method QtxListAction.setCharsNumber(int) can be used to change the frame width (in characters).
| names | list of names to be set |
References QtxListAction.charsNumber().
| void QtxListAction.ListFrame::removePostedEvens | ( | QObject * | o, |
| int | type | ||
| ) | [private] |
| o | object |
| type | event type to be filtered |
References QtxAction.eventFilter().
QListWidget* QtxListAction.ListFrame.myList [private] |
QStringList QtxListAction.ListFrame.myNames [private] |
QtxListAction* QtxListAction.ListFrame.myAction [private] |
QLabel* QtxListAction.ListFrame.myComment [private] |
int QtxListAction.ListFrame.myLines [private] |
int QtxListAction.ListFrame.myChars [private] |
QString QtxListAction.ListFrame.mySingleComment [private] |
QString QtxListAction.ListFrame.myMultipleComment [private] |