Ejemplo n.º 1
0
bool QWidget::qt_invoke( int _id, QUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: setEnabled((bool)static_QUType_bool.get(_o+1)); break;
    case 1: setDisabled((bool)static_QUType_bool.get(_o+1)); break;
    case 2: setCaption((const QString&)static_QUType_QString.get(_o+1)); break;
    case 3: setIcon((const QPixmap&)*((const QPixmap*)static_QUType_ptr.get(_o+1))); break;
    case 4: setIconText((const QString&)static_QUType_QString.get(_o+1)); break;
    case 5: setMouseTracking((bool)static_QUType_bool.get(_o+1)); break;
    case 6: setFocus(); break;
    case 7: clearFocus(); break;
    case 8: setUpdatesEnabled((bool)static_QUType_bool.get(_o+1)); break;
    case 9: update(); break;
    case 10: update((int)static_QUType_int.get(_o+1),(int)static_QUType_int.get(_o+2),(int)static_QUType_int.get(_o+3),(int)static_QUType_int.get(_o+4)); break;
    case 11: update((const QRect&)*((const QRect*)static_QUType_ptr.get(_o+1))); break;
    case 12: repaint(); break;
    case 13: repaint((bool)static_QUType_bool.get(_o+1)); break;
    case 14: repaint((int)static_QUType_int.get(_o+1),(int)static_QUType_int.get(_o+2),(int)static_QUType_int.get(_o+3),(int)static_QUType_int.get(_o+4)); break;
    case 15: repaint((int)static_QUType_int.get(_o+1),(int)static_QUType_int.get(_o+2),(int)static_QUType_int.get(_o+3),(int)static_QUType_int.get(_o+4),(bool)static_QUType_bool.get(_o+5)); break;
    case 16: repaint((const QRect&)*((const QRect*)static_QUType_ptr.get(_o+1))); break;
    case 17: repaint((const QRect&)*((const QRect*)static_QUType_ptr.get(_o+1)),(bool)static_QUType_bool.get(_o+2)); break;
    case 18: repaint((const QRegion&)*((const QRegion*)static_QUType_ptr.get(_o+1))); break;
    case 19: repaint((const QRegion&)*((const QRegion*)static_QUType_ptr.get(_o+1)),(bool)static_QUType_bool.get(_o+2)); break;
    case 20: show(); break;
    case 21: hide(); break;
    case 22: setShown((bool)static_QUType_bool.get(_o+1)); break;
    case 23: setHidden((bool)static_QUType_bool.get(_o+1)); break;
    case 24: iconify(); break;
    case 25: showMinimized(); break;
    case 26: showMaximized(); break;
    case 27: showFullScreen(); break;
    case 28: showNormal(); break;
    case 29: polish(); break;
    case 30: constPolish(); break;
    case 31: static_QUType_bool.set(_o,close()); break;
    case 32: raise(); break;
    case 33: lower(); break;
    case 34: stackUnder((QWidget*)static_QUType_ptr.get(_o+1)); break;
    case 35: move((int)static_QUType_int.get(_o+1),(int)static_QUType_int.get(_o+2)); break;
    case 36: move((const QPoint&)*((const QPoint*)static_QUType_ptr.get(_o+1))); break;
    case 37: resize((int)static_QUType_int.get(_o+1),(int)static_QUType_int.get(_o+2)); break;
    case 38: resize((const QSize&)*((const QSize*)static_QUType_ptr.get(_o+1))); break;
    case 39: setGeometry((int)static_QUType_int.get(_o+1),(int)static_QUType_int.get(_o+2),(int)static_QUType_int.get(_o+3),(int)static_QUType_int.get(_o+4)); break;
    case 40: setGeometry((const QRect&)*((const QRect*)static_QUType_ptr.get(_o+1))); break;
    case 41: adjustSize(); break;
    case 42: focusProxyDestroyed(); break;
    default:
	return QObject::qt_invoke( _id, _o );
    }
    return TRUE;
}
Ejemplo n.º 2
0
//-----------------------------------------------------------------------------
// Function: ColumnFreezableTable::init()
//-----------------------------------------------------------------------------
void ColumnFreezableTable::init()
{
    frozenColumns_->horizontalHeader()->setSectionsClickable(true);
    frozenColumns_->horizontalHeader()->setStretchLastSection(true);
    frozenColumns_->setSortingEnabled(true);
    frozenColumns_->setItemsDraggable(false);
    frozenColumns_->sortByColumn(0, Qt::AscendingOrder);

    frozenColumns_->setMinimumHeight(minimumHeight() - horizontalScrollBar()->height());

    frozenColumns_->setModel(model());
    
    resizeColumnsToContents();
    frozenColumns_->resizeColumnsToContents();

    frozenColumns_->horizontalHeader()->setMinimumHeight(horizontalHeader()->height());
    frozenColumns_->horizontalHeader()->setSectionResizeMode(QHeaderView::Fixed);

    frozenColumns_->setFocusPolicy(Qt::NoFocus);

    stackUnder(frozenColumns_.data());

    frozenColumns_->setSelectionModel(selectionModel());
    for (int col=numberOfFrozenColumns_; col < model()->columnCount(); col++)
    {
        frozenColumns_->setColumnHidden(col, true);
    }

    frozenColumns_->setColumnWidth(0, columnWidth(0));

    frozenColumns_->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    frozenColumns_->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    frozenColumns_->show();

    updateColumnFreezableTableGeometry();
}