Back to index

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

#include <IIIMLookupChoice.hh>

Collaboration diagram for IIIMLookupChoiceWidget:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void update_im ()
 IIIMLookupChoiceWidget (IIIMCF_context ctx, QWidget *parent=0, const char *name=0, WFlags f=0)
 ~IIIMLookupChoiceWidget ()

Private Types

typedef QValueList
< IIIMLookupChoiceItemWidget * > 
IIIMLookupChoiceItemWidgetList

Private Member Functions

void erase_all_items ()
void set_layout (IIIMCF_lookup_choice ilc)
void update_items (IIIMCF_lookup_choice ilc)

Private Attributes

QBoxLayout * playout
IIIMCF_context ctx
IIIMLookupChoiceItemWidgetList itemlist
int choices_per_window
int number_of_rows
int number_of_columns
int direction

Detailed Description

Definition at line 35 of file IIIMLookupChoice.hh.


Member Typedef Documentation

Definition at line 39 of file IIIMLookupChoice.hh.


Constructor & Destructor Documentation

IIIMLookupChoiceWidget::IIIMLookupChoiceWidget ( IIIMCF_context  ctx,
QWidget *  parent = 0,
const char *  name = 0,
WFlags  f = 0 
)

Definition at line 147 of file IIIMLookupChoice.cpp.

  : QHBox(parent, name, f)
{
    ctx = x_ctx;
    playout = NULL;
    setMargin(1);
    setFrameStyle(QFrame::GroupBoxPanel | QFrame::Raised);
}

Definition at line 160 of file IIIMLookupChoice.cpp.

{
}

Member Function Documentation

Definition at line 66 of file IIIMLookupChoice.cpp.

{
    IIIMLookupChoiceItemWidgetList::iterator it;
    for (it = itemlist.begin(); it != itemlist.end(); it++) {
       delete *it;
    }
    itemlist.erase(itemlist.begin(), itemlist.end());
}

Here is the caller graph for this function:

Definition at line 76 of file IIIMLookupChoice.cpp.

{
    IIIMF_status st;
    int ndir;

    st = iiimcf_get_lookup_choice_configuration(ilc,
                                          &choices_per_window,
                                          &number_of_rows,
                                          &number_of_columns,
                                          &ndir);
    if (st != IIIMF_STATUS_SUCCESS) return;
#if 0
    if ((direction == IIIMCF_LOOKUP_CHOICE_HORIZONTAL_DIRECTION)
       && (ndir != direction)) {
       playout = new QBoxLayout(this, QBoxLayout::LeftToRight,
                             frameWidth(), frameWidth(), name());
       playout->setAutoAdd(true);
    } else if (!playout || ((direction == IIIMCF_LOOKUP_CHOICE_VERTICAL_DIRECTION)
                         && (ndir != direction))) {
       playout = new QBoxLayout(this, QBoxLayout::Down,
                             frameWidth(), frameWidth(), name());
       playout->setAutoAdd(true);
    }
#endif
    direction = ndir;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 132 of file IIIMLookupChoice.cpp.

{
    IIIMF_status st;
    IIIMCF_lookup_choice ilc;

    st = iiimcf_get_lookup_choice(ctx, &ilc);
    if (st == IIIMF_STATUS_SUCCESS) {
       set_layout(ilc);
       update_items(ilc);
       show();
    } else {
       hide();
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 106 of file IIIMLookupChoice.cpp.

{
    IIIMF_status st;
    IIIMCF_text cand, label;
    int i, flag;
    int size, idx_first, idx_last, idx_current;
    IIIMLookupChoiceItemWidget *piw;

    st = iiimcf_get_lookup_choice_size(ilc, &size,
                                   &idx_first, &idx_last, &idx_current);
    if (st != IIIMF_STATUS_SUCCESS) return;

    erase_all_items();
    for (i = 0; i < size; i++) {
       st = iiimcf_get_lookup_choice_item(ilc, i, &cand, &label, &flag);
       if ((st == IIIMF_STATUS_SUCCESS)
           && (flag & IIIMCF_LOOKUP_CHOICE_ITEM_ENABLED)) {
           piw = new IIIMLookupChoiceItemWidget(label, cand, this);
           itemlist.push_back(piw);
       }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 42 of file IIIMLookupChoice.hh.

Definition at line 38 of file IIIMLookupChoice.hh.

Definition at line 45 of file IIIMLookupChoice.hh.

Definition at line 40 of file IIIMLookupChoice.hh.

Definition at line 44 of file IIIMLookupChoice.hh.

Definition at line 43 of file IIIMLookupChoice.hh.

QBoxLayout* IIIMLookupChoiceWidget::playout [private]

Definition at line 37 of file IIIMLookupChoice.hh.


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