Exemple #1
0
int Q3DockWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = Q3Frame::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        if (_id < 8)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 8;
    }
#ifndef QT_NO_PROPERTIES
      else if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast< int*>(_v) = closeMode(); break;
        case 1: *reinterpret_cast< bool*>(_v) = isResizeEnabled(); break;
        case 2: *reinterpret_cast< bool*>(_v) = isMovingEnabled(); break;
        case 3: *reinterpret_cast< bool*>(_v) = isHorizontallyStretchable(); break;
        case 4: *reinterpret_cast< bool*>(_v) = isVerticallyStretchable(); break;
        case 5: *reinterpret_cast< bool*>(_v) = isStretchable(); break;
        case 6: *reinterpret_cast< bool*>(_v) = newLine(); break;
        case 7: *reinterpret_cast< bool*>(_v) = opaqueMoving(); break;
        case 8: *reinterpret_cast< int*>(_v) = offset(); break;
        case 9: *reinterpret_cast< Place*>(_v) = place(); break;
        }
        _id -= 10;
    } else if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: setCloseMode(*reinterpret_cast< int*>(_v)); break;
        case 1: setResizeEnabled(*reinterpret_cast< bool*>(_v)); break;
        case 2: setMovingEnabled(*reinterpret_cast< bool*>(_v)); break;
        case 3: setHorizontallyStretchable(*reinterpret_cast< bool*>(_v)); break;
        case 4: setVerticallyStretchable(*reinterpret_cast< bool*>(_v)); break;
        case 6: setNewLine(*reinterpret_cast< bool*>(_v)); break;
        case 7: setOpaqueMoving(*reinterpret_cast< bool*>(_v)); break;
        case 8: setOffset(*reinterpret_cast< int*>(_v)); break;
        }
        _id -= 10;
    } else if (_c == QMetaObject::ResetProperty) {
        _id -= 10;
    } else if (_c == QMetaObject::QueryPropertyDesignable) {
        _id -= 10;
    } else if (_c == QMetaObject::QueryPropertyScriptable) {
        _id -= 10;
    } else if (_c == QMetaObject::QueryPropertyStored) {
        _id -= 10;
    } else if (_c == QMetaObject::QueryPropertyEditable) {
        _id -= 10;
    } else if (_c == QMetaObject::QueryPropertyUser) {
        _id -= 10;
    }
#endif // QT_NO_PROPERTIES
    return _id;
}
Exemple #2
0
SEQWindow::SEQWindow(const QString prefName, const QString caption,
		     QWidget* parent, const char* name, WFlags f)
  : QDockWindow(parent, name, f),
    m_preferenceName(prefName)
{
  // set the windows caption
  QDockWindow::setCaption(pSEQPrefs->getPrefString("Caption", preferenceName(),
					       caption));

  // windows default to resizable
  setResizeEnabled(true);

  // windows default to be closable when not docked
  setCloseMode(Always);

  // restore the font
  restoreFont();
}
/**
 * Constructs the window.
 */
LibraryWindow::LibraryWindow(Place p, QWidget* parent, const char* name,
                             WFlags f)
    : QDockWindow(p, parent, name, f)
{
    modified_ = false;

    setCloseMode(Never);
    setMovingEnabled(TRUE);
    setResizeEnabled(TRUE);

    splitter_ = new QSplitter(Qt::Vertical, this);
    setWidget(splitter_);

    modelListView_ = new LibraryListView(splitter_);
    modelListView_->addColumn(tr("Module"));
    modelListView_->setDefaultRenameAction(QListView::Accept);

    descriptionTextBrowser_ = new QTextBrowser(splitter_);
    QPalette palette = QApplication::palette();
    descriptionTextBrowser_->setFrameStyle(QFrame::NoFrame);
    descriptionTextBrowser_->setPaper
            (palette.brush(QPalette::Normal, QColorGroup::Background));

    popupMenu_ = new QPopupMenu();
    popupMenu_->insertItem(tr("Rename"), this, SLOT(renameSelected()));
    popupMenu_->insertItem(tr("Change Type"),
                           this, SLOT(changeTypeOfSelected()));
    popupMenu_->insertSeparator();
    popupMenu_->insertItem(QPixmap(Util::findIcon("editdelete.png")),
                           tr("Remove"), this, SLOT(removeSelected()));

    connect(modelListView_, SIGNAL(selectionChanged(QListViewItem *)),
            this, SLOT(setDescription(QListViewItem *)));
    connect(this, SIGNAL(orientationChanged(Orientation)),
            this, SLOT(setOrientation(Orientation)));
    connect(modelListView_,
            SIGNAL(contextMenuRequested(QListViewItem *, const QPoint &, int)),
            this, SLOT(showPopup(QListViewItem *, const QPoint &, int)));
    connect(modelListView_, SIGNAL(selectionChanged(QListViewItem *)),
            this, SLOT(selectionChanged(QListViewItem *)));

    // load items
    initialize();
}
void CTableFieldChooser::init()
{
  setMovingEnabled (true);
  setResizeEnabled (true);
  setHorizontallyStretchable (true);
  setVerticallyStretchable (true);
  setOpaqueMoving (false);
  setCloseMode(QDockWindow::Always);

  setCaption(tr("Table Columns" ));

  columnsListView = new CTableFieldChooserListView(this, "Columns");
  columnsListView->addColumn(tr("Columns"));
  columnsListView->header()->setResizeEnabled(false, columnsListView->header()->count() - 1);
  columnsListView->setFrameShape(QListView::Box);
  columnsListView->setLineWidth(1);
  columnsListView->setShowSortIndicator(true);
  columnsListView->setResizeMode(QListView::AllColumns);

  QWhatsThis::add(columnsListView, tr("Select the columns that you want visible in the grid."));
  setWidget(columnsListView);
  is_first = true;
}
bool QDockWindow::qt_property( int id, int f, QVariant* v)
{
    switch ( id - staticMetaObject()->propertyOffset() ) {
    case 0: switch( f ) {
	case 0: setCloseMode(v->asInt()); break;
	case 1: *v = QVariant( this->closeMode() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 1: switch( f ) {
	case 0: setResizeEnabled(v->asBool()); break;
	case 1: *v = QVariant( this->isResizeEnabled(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 2: switch( f ) {
	case 0: setMovingEnabled(v->asBool()); break;
	case 1: *v = QVariant( this->isMovingEnabled(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 3: switch( f ) {
	case 0: setHorizontallyStretchable(v->asBool()); break;
	case 1: *v = QVariant( this->isHorizontallyStretchable(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 4: switch( f ) {
	case 0: setVerticallyStretchable(v->asBool()); break;
	case 1: *v = QVariant( this->isVerticallyStretchable(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 5: switch( f ) {
	case 1: *v = QVariant( this->isStretchable(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 6: switch( f ) {
	case 0: setNewLine(v->asBool()); break;
	case 1: *v = QVariant( this->newLine(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 7: switch( f ) {
	case 0: setOpaqueMoving(v->asBool()); break;
	case 1: *v = QVariant( this->opaqueMoving(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 8: switch( f ) {
	case 0: setOffset(v->asInt()); break;
	case 1: *v = QVariant( this->offset() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 9: switch( f ) {
	case 1: *v = QVariant( (int)this->place() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    default:
	return QFrame::qt_property( id, f, v );
    }
    return TRUE;
}
Exemple #6
0
VTabbedDockWidget::VTabbedDockWidget(Place p, QWidget* parent, const char* name): Q3DockWindow(p, parent, name)
{
  setOrientation(Qt::Vertical);
  m_tabWidget = 0l;
  setCloseMode(Q3DockWindow::Always);
}