Back to index

im-sdk  12.3.91
Public Member Functions | Private Member Functions | Private Attributes
IIIMLookupChoiceItemWidget Class Reference

#include <IIIMLookupChoice.hh>

Collaboration diagram for IIIMLookupChoiceItemWidget:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 IIIMLookupChoiceItemWidget (IIIMCF_text label, IIIMCF_text choice, QWidget *parent=0, const char *name=0, WFlags f=0)
 ~IIIMLookupChoiceItemWidget ()

Private Member Functions

void drawContents (QPainter *p)
QSize sizeHint () const
QSize minimumSizeHint () const

Private Attributes

QSize currentsize
IIIMTextplabel
IIIMTextpchoice

Detailed Description

Definition at line 10 of file IIIMLookupChoice.hh.


Constructor & Destructor Documentation

IIIMLookupChoiceItemWidget::IIIMLookupChoiceItemWidget ( IIIMCF_text  label,
IIIMCF_text  choice,
QWidget *  parent = 0,
const char *  name = 0,
WFlags  f = 0 
)

Definition at line 42 of file IIIMLookupChoice.cpp.

  : QFrame(parent, name, f)
{
    plabel = new IIIMText(label);
    pchoice = new IIIMText(choice);
    setFrameStyle(QFrame::PopupPanel | QFrame::Sunken);
    setMargin(1);
    setSizePolicy(QSizePolicy(QSizePolicy::Preferred,
                           QSizePolicy::Preferred));
}

Definition at line 59 of file IIIMLookupChoice.cpp.

{
    delete plabel;
    delete pchoice;
}

Member Function Documentation

void IIIMLookupChoiceItemWidget::drawContents ( QPainter *  p) [private]

Definition at line 9 of file IIIMLookupChoice.cpp.

{
    QRect r = contentsRect();
    QSize s1, s2;

    s1 = plabel->draw(p, this, r);
    r.moveBy(s1.width() + margin(), 0);
    s2 = pchoice->draw(p, this, r);
    currentsize = QSize(s1.width() + s2.width() + margin(),
                     MAX(s1.height(), s2.height()));
    updateGeometry();
}

Here is the call graph for this function:

Definition at line 34 of file IIIMLookupChoice.cpp.

{
    int plus = (frameWidth() + margin()) * 2;
    if (!currentsize.isValid()) return currentsize;
    return QSize(currentsize.width() + plus, currentsize.height() + plus);
}

Here is the caller graph for this function:

QSize IIIMLookupChoiceItemWidget::sizeHint ( ) const [private]

Definition at line 25 of file IIIMLookupChoice.cpp.

{
    QSize s = minimumSizeHint();
    if (s.isValid()) return s;
    int plus = (frameWidth() + margin()) * 2 + 1;
    return QSize(plus, plus);
}

Here is the call graph for this function:


Member Data Documentation

Definition at line 12 of file IIIMLookupChoice.hh.

Definition at line 15 of file IIIMLookupChoice.hh.

Definition at line 14 of file IIIMLookupChoice.hh.


The documentation for this class was generated from the following files: