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; }
int Q3Header::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { if (_id < 10) qt_static_metacall(this, _c, _id, _a); _id -= 10; } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< Qt::Orientation*>(_v) = orientation(); break; case 1: *reinterpret_cast< bool*>(_v) = tracking(); break; case 2: *reinterpret_cast< int*>(_v) = count(); break; case 3: *reinterpret_cast< int*>(_v) = offset(); break; case 4: *reinterpret_cast< bool*>(_v) = isMovingEnabled(); break; case 5: *reinterpret_cast< bool*>(_v) = isStretchEnabled(); break; } _id -= 6; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setOrientation(*reinterpret_cast< Qt::Orientation*>(_v)); break; case 1: setTracking(*reinterpret_cast< bool*>(_v)); break; case 3: setOffset(*reinterpret_cast< int*>(_v)); break; case 4: setMovingEnabled(*reinterpret_cast< bool*>(_v)); break; case 5: setStretchEnabled(*reinterpret_cast< bool*>(_v)); break; } _id -= 6; } else if (_c == QMetaObject::ResetProperty) { _id -= 6; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 6; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 6; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 6; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 6; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 6; } #endif // QT_NO_PROPERTIES return _id; }
ThumbnailController::ThumbnailController( QWidget * parent, ThumbnailList * list ) : KToolBar( parent, "ThumbsControlBar" ) { // change toolbar appearance setMargin( 3 ); setFlat( true ); setIconSize( 16 ); setMovingEnabled( false ); // insert a togglebutton [show only bookmarked pages] //insertSeparator(); insertButton( "bookmark", FILTERB_ID, SIGNAL( toggled( bool ) ), list, SLOT( slotFilterBookmarks( bool ) ), true, i18n( "Show bookmarked pages only" ) ); setToggle( FILTERB_ID ); setButton( FILTERB_ID, KpdfSettings::filterBookmarks() ); //insertLineSeparator(); }
/** * 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 PsiToolBar::initialize( Options::ToolbarPrefs &tbPref, bool createUniqueActions ) { d->uniqueActions.clear(); setHorizontallyStretchable( tbPref.stretchable ); setVerticallyStretchable( tbPref.stretchable ); setMovingEnabled ( !tbPref.locked ); if ( d->psi ) { ActionList actions = d->psi->actionList()->suitableActions( d->type ); QStringList keys = tbPref.keys; for (int j = 0; j < keys.size(); j++) { IconAction *action = actions.action( keys[j] ); if ( action && action->isSeparator() ) { addSeparator(); } else if ( action ) { if ( createUniqueActions ) { action = action->copy(); d->uniqueActions.append( action ); } action->addTo( this ); emit registerAction( action ); } else qWarning("PsiToolBar::initialize(): action %s not found!", keys[j].latin1()); } } else qWarning("PsiToolBar::initialize(): psi is NULL!"); if ( tbPref.on ) show(); else hide(); tbPref.dirty = false; }
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; }
FlexHandler(QWidget* parent, QWidget* widget) : QWidgetResizeHandler(parent, widget) { setMovingEnabled(false); }
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; }