Version: 6.3.1
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

QtxListAction.ListFrame Class Reference

Expanding frame with action list and comment.

Inheritance diagram for QtxListAction.ListFrame:
Inheritance graph

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

QListWidgetmyList
QStringList myNames
QtxListActionmyAction
QLabelmyComment
int myLines
int myChars
QString mySingleComment
QString myMultipleComment

Constructor & Destructor Documentation

QtxListAction.ListFrame::ListFrame ( QtxListAction a,
QWidget parent 
)
QtxListAction.ListFrame::~ListFrame ( ) [virtual]

Member Function Documentation

void QtxListAction.ListFrame::clear ( )
const QStringList QtxListAction.ListFrame::names ( ) const
Returns:
list of names
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).

Parameters:
nameslist of names to be added
See also:
setNames(), QtxListAction.setCharsNumber(int)
void QtxListAction.ListFrame::setSingleComment ( const QString &  comment)
Parameters:
commentcomment format
void QtxListAction.ListFrame::setMultipleComment ( const QString &  comment)
Parameters:
commentcomment format
int QtxListAction.ListFrame::selected ( ) const
Returns:
number of selected items
void QtxListAction.ListFrame::setSelected ( const int  lastSel)
Parameters:
lastSelnumber of items to be selected

References QtxListAction.ScrollEvent.Scroll.

int QtxListAction.ListFrame::linesNumber ( ) const
Returns:
number of lines
See also:
setLinesNumber(), charsNumber(), setCharsNumber()
int QtxListAction.ListFrame::charsNumber ( ) const

If the name length is greater than this value, it will be truncated.

Returns:
number of characters
See also:
setCharsNumber(), linesNumber(), setLinesNumber()
void QtxListAction.ListFrame::setLinesNumber ( const int  maxLines)
Parameters:
maxLinesnumber of lines
See also:
linesNumber(), charsNumber(), setCharsNumber()
void QtxListAction.ListFrame::setCharsNumber ( const int  maxChars)

If the name length is greater than this value, it will be truncated.

Parameters:
maxCharsnumber of characters
See also:
charsNumber(), linesNumber(), setLinesNumber()
QSize QtxListAction.ListFrame::sizeHint ( ) const [virtual]
Returns:
preferable size

References QtxListAction.charsNumber(), and QtxListAction.linesNumber().

QSize QtxListAction.ListFrame::minimumSizeHint ( ) const [virtual]
Returns:
preferable minimum size

References QtxListAction.charsNumber(), and QtxListAction.linesNumber().

bool QtxListAction.ListFrame::eventFilter ( QObject o,
QEvent e 
) [virtual]
Parameters:
oobject recieving event (viewport)
eevent
Returns:
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]
Parameters:
onif true, widget is shown, otherswise it is hidden
void QtxListAction.ListFrame::keyPressEvent ( QKeyEvent *  e) [protected, virtual]

The following keys are supported:

  • Up/Down
  • PageUp/PageDown
  • Enter
  • Escape
Parameters:
ekey 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).

Parameters:
nameslist of names to be set
See also:
addNames(), QtxListAction.setCharsNumber(int)

References QtxListAction.charsNumber().

void QtxListAction.ListFrame::removePostedEvens ( QObject o,
int  type 
) [private]
Parameters:
oobject
typeevent type to be filtered

References QtxAction.eventFilter().


Field Documentation

QStringList QtxListAction.ListFrame.myNames [private]
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS