Back to index

im-sdk  12.3.91
Public Types | Public Slots | Public Member Functions | Private Member Functions
IIIMStatusWidget Class Reference

#include <IIIMStatus.hh>

List of all members.

Public Types

enum  LOCATION_REFERENCE { TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT }

Public Slots

void ref_change ()

Public Member Functions

void update_im ()
void place (QWidget *plocation_reference, enum LOCATION_REFERENCE ref)
 IIIMStatusWidget (IIIMCF_context ctx, QWidget *parent=0, const char *name=0, WFlags f=0)
 ~IIIMStatusWidget ()

Private Member Functions

enum LOCATION_REFERENCE
QWidget *pwlocref QSize
currentsize IIIMCF_context ctx
void 
drawContents (QPainter *p)
QSize sizeHint () const
QSize minimumSizeHint () const
void adjust_location (const QSize &size)
void resizeEvent (QResizeEvent *pre)

Detailed Description

Definition at line 7 of file IIIMStatus.hh.


Member Enumeration Documentation

Enumerator:
TOP_LEFT 
TOP_RIGHT 
BOTTOM_LEFT 
BOTTOM_RIGHT 

Definition at line 12 of file IIIMStatus.hh.


Constructor & Destructor Documentation

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

Definition at line 118 of file IIIMStatus.cpp.

  : QFrame(parent, name, f)
{
    ctx = x_ctx;
    //setBackgroundMode(Qt::PaletteBase);
    setFrameShape(QFrame::WinPanel);
    setSizePolicy(QSizePolicy(QSizePolicy::Minimum,
                           QSizePolicy::Minimum));
    pwlocref = NULL;
}

Definition at line 133 of file IIIMStatus.cpp.

{
}

Member Function Documentation

void IIIMStatusWidget::adjust_location ( const QSize &  size) [private]

Definition at line 23 of file IIIMStatus.cpp.

{
    if (pwlocref) {
       QPoint pt;
       QRect wrec = pwlocref->frameGeometry();
       switch (locref) {
         case TOP_LEFT:
          pt = wrec.topLeft();
          pt.setY(pt.y() - size.height());
          move(pt);
          break;
         case TOP_RIGHT:
          pt = wrec.topRight();
          pt.setX(pt.x() - size.width());
          pt.setY(pt.y() - size.height());
          move(pt);
          break;
         case BOTTOM_LEFT:
          pt = wrec.bottomLeft();
          move(pt);
          break;
         case BOTTOM_RIGHT:
          pt = wrec.bottomRight();
          pt.setX(pt.x() - size.width());
          move(pt);
          break;
       }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void IIIMStatusWidget::drawContents ( QPainter *  p) [abstract, private]

Definition at line 6 of file IIIMStatus.cpp.

{
    IIIMCF_text text;
    IIIMF_status st;

    if (!ctx) return;
    st = iiimcf_get_status_text(ctx, &text);
    if (st != IIIMF_STATUS_SUCCESS) return;
    IIIMText imt(text);
    currentsize = imt.draw(p, this, contentsRect());

    adjustSize();
}

Here is the call graph for this function:

QSize IIIMStatusWidget::minimumSizeHint ( ) const [private]

Definition at line 92 of file IIIMStatus.cpp.

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

Here is the caller graph for this function:

void IIIMStatusWidget::place ( QWidget *  plocation_reference,
enum LOCATION_REFERENCE  ref 
)

Definition at line 73 of file IIIMStatus.cpp.

{
    pwlocref = plocation_reference;
    locref = ref;
    if (isShown()) {
       adjust_location(size());
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 67 of file IIIMStatus.cpp.

{
    adjust_location(size());
}

Here is the call graph for this function:

void IIIMStatusWidget::resizeEvent ( QResizeEvent *  pre) [private]

Definition at line 56 of file IIIMStatus.cpp.

{
    adjust_location(pre->size());

    QWidget::resizeEvent(pre);
    return;
}

Here is the call graph for this function:

QSize IIIMStatusWidget::sizeHint ( ) const [private]

Definition at line 86 of file IIIMStatus.cpp.

{
    return minimumSizeHint();
}

Here is the call graph for this function:

Definition at line 99 of file IIIMStatus.cpp.

{
    IIIMF_status st;
    IIIMCF_text text;

    st = iiimcf_get_status_text(ctx, &text);
    if (st == IIIMF_STATUS_SUCCESS) {
       if (!currentsize.isValid()) {
           IIIMText imt(text);
           QPainter painter(this);
           currentsize = imt.get_size(&painter, this);
       }
       repaint();
       show();
    } else {
       hide();
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:


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