PageView::PageView( QWidget* parent, const char* name ) : QScrollView( parent, name, WStaticContents | WNoAutoErase) { moveTool = true; widgetList = 0; viewport()->setFocusPolicy(QWidget::StrongFocus); setResizePolicy(QScrollView::Manual); setVScrollBarMode(QScrollView::Auto); setHScrollBarMode(QScrollView::Auto); viewport()->setBackgroundMode(Qt::NoBackground); setResizePolicy(Manual); setDragAutoScroll(false); enableClipper(true); nrCols = 1; nrRows = 1; continuousViewmode = true; fullScreen = false; connect(this, SIGNAL(contentsMoving(int, int)), this, SLOT(calculateCurrentPageNumber(int, int))); }
EvaListView::EvaListView(TQWidget *parent, const char *name, WFlags f) : TQListView(parent, name, f) { setItemMargin(EVA_LV_LEFT_MARGIN); addColumn("1"); setColumnWidthMode( 0, Manual); // addColumn("2"); // setColumnWidthMode( 1, Manual); header()->hide(); setSorting(0); setRootIsDecorated( false ); setTreeStepSize( 8 ); setDragAutoScroll(true); setHScrollBarMode(TQScrollView::AlwaysOff); setFrameShape( TQFrame::NoFrame ); setAcceptDrops( true ); setSelectionMode( TQListView::Extended ); setSelectionMode(TQListView::Single); m_tooltip = new EvaLVToolTip(this); clearWFlags( WStaticContents ); setWFlags( WNoAutoErase ); static_cast<EvaListView*>(viewport())->clearWFlags( WStaticContents ); static_cast<EvaListView*>(viewport())->setWFlags( WNoAutoErase ); codec = TQTextCodec::codecForName("GB18030"); }
int Q3ScrollView::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 < 23) qt_static_metacall(this, _c, _id, _a); _id -= 23; } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< ResizePolicy*>(_v) = resizePolicy(); break; case 1: *reinterpret_cast< ScrollBarMode*>(_v) = vScrollBarMode(); break; case 2: *reinterpret_cast< ScrollBarMode*>(_v) = hScrollBarMode(); break; case 3: *reinterpret_cast< int*>(_v) = visibleWidth(); break; case 4: *reinterpret_cast< int*>(_v) = visibleHeight(); break; case 5: *reinterpret_cast< int*>(_v) = contentsWidth(); break; case 6: *reinterpret_cast< int*>(_v) = contentsHeight(); break; case 7: *reinterpret_cast< int*>(_v) = contentsX(); break; case 8: *reinterpret_cast< int*>(_v) = contentsY(); break; case 9: *reinterpret_cast< bool*>(_v) = dragAutoScroll(); break; } _id -= 10; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setResizePolicy(*reinterpret_cast< ResizePolicy*>(_v)); break; case 1: setVScrollBarMode(*reinterpret_cast< ScrollBarMode*>(_v)); break; case 2: setHScrollBarMode(*reinterpret_cast< ScrollBarMode*>(_v)); break; case 9: setDragAutoScroll(*reinterpret_cast< bool*>(_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; }
QTodoList::QTodoList(QWidget* parent) : QScrollView(parent) { setResizePolicy(QScrollView::AutoOneFit); setDragAutoScroll(true); vbox = new QVBox(viewport()); vbox->setMargin(5); vbox->setSpacing(5); vbox->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Minimum); dynamic_cast<QBoxLayout*>(vbox->layout())->setAutoAdd(false); addChild(vbox); spacer = 0; refreshSpacer(); }
RosegardenScrollView::RosegardenScrollView(QWidget* parent) : QAbstractScrollArea(parent), m_bottomWidget(0), m_currentBottomWidgetHeight( -1), m_smoothScroll(true), m_smoothScrollTimeInterval(DefaultSmoothScrollTimeInterval), m_minDeltaScroll(DefaultMinDeltaScroll), m_autoScrollTime(InitialScrollTime), m_autoScrollShortcut(InitialScrollShortcut), m_autoScrollXMargin(0), m_autoScrollYMargin(0), m_currentScrollDirection(None), m_scrollDirectionConstraint(NoFollow), m_autoScrolling(false) { setDragAutoScroll(true); //&&& could not find replacement connect( &m_autoScrollTimer, SIGNAL( timeout() ), this, SLOT( doAutoScroll() ) ); }
ThumbnailList::ThumbnailList( QWidget *parent, KPDFDocument *document ) : QScrollView( parent, "KPDF::Thumbnails", WNoAutoErase | WStaticContents ), m_document( document ), m_selected( 0 ), m_delayTimer( 0 ), m_bookmarkOverlay( 0 ) { // set scrollbars setHScrollBarMode( QScrollView::AlwaysOff ); setVScrollBarMode( QScrollView::AlwaysOn ); // dealing with large areas so enable clipper enableClipper( true ); // widget setup: can be focused by tab and mouse click (not wheel) viewport()->setFocusProxy( this ); viewport()->setFocusPolicy( StrongFocus ); setResizePolicy( Manual ); setAcceptDrops( true ); setDragAutoScroll( false ); // set contents background to the 'base' color viewport()->setPaletteBackgroundColor( palette().active().base() ); setFrameStyle( StyledPanel | Raised ); connect( this, SIGNAL(contentsMoving(int, int)), this, SLOT(slotRequestVisiblePixmaps(int, int)) ); }
bool QScrollView::qt_property( int id, int f, QVariant* v) { switch ( id - staticMetaObject()->propertyOffset() ) { case 0: switch( f ) { case 0: setResizePolicy((ResizePolicy&)v->asInt()); break; case 1: *v = QVariant( (int)this->resizePolicy() ); break; case 3: case 4: case 5: break; default: return FALSE; } break; case 1: switch( f ) { case 0: setVScrollBarMode((ScrollBarMode&)v->asInt()); break; case 1: *v = QVariant( (int)this->vScrollBarMode() ); break; case 3: case 4: case 5: break; default: return FALSE; } break; case 2: switch( f ) { case 0: setHScrollBarMode((ScrollBarMode&)v->asInt()); break; case 1: *v = QVariant( (int)this->hScrollBarMode() ); break; case 3: case 4: case 5: break; default: return FALSE; } break; case 3: switch( f ) { case 1: *v = QVariant( this->visibleWidth() ); break; case 3: case 4: case 5: break; default: return FALSE; } break; case 4: switch( f ) { case 1: *v = QVariant( this->visibleHeight() ); break; case 3: case 4: case 5: break; default: return FALSE; } break; case 5: switch( f ) { case 1: *v = QVariant( this->contentsWidth() ); break; case 3: case 4: case 5: break; default: return FALSE; } break; case 6: switch( f ) { case 1: *v = QVariant( this->contentsHeight() ); break; case 3: case 4: case 5: break; default: return FALSE; } break; case 7: switch( f ) { case 1: *v = QVariant( this->contentsX() ); break; case 3: case 4: case 5: break; default: return FALSE; } break; case 8: switch( f ) { case 1: *v = QVariant( this->contentsY() ); break; case 3: case 4: case 5: break; default: return FALSE; } break; case 9: switch( f ) { case 0: setDragAutoScroll(v->asBool()); break; case 1: *v = QVariant( this->dragAutoScroll(), 0 ); break; case 3: case 4: case 5: break; default: return FALSE; } break; default: return QFrame::qt_property( id, f, v ); } return TRUE; }
DrawZone::DrawZone(QWidget *parent,KImageMapEditor* _imageMapEditor) : QScrollView(parent) { imageMapEditor=_imageMapEditor; // setPicture(QImage()); currentAction=None; currentArea=0L; oldArea=0L; _zoom=1; if (imageMapEditor->isReadWrite()) { viewport()->setMouseTracking(true); viewport()->setAcceptDrops(true); this->setAcceptDrops(true); } else viewport()->setMouseTracking(false); setDragAutoScroll(true); // The cross rectangle cursor QBitmap b(32,32,true); QBitmap b2(32,32,true); QPainter p(&b); // the cross p.drawLine(0,8,6,8); p.drawLine(10,8,16,8); p.drawLine(8,0,8,6); p.drawLine(8,10,8,16); // the rectangle p.drawRect(17,17,8,6); p.end(); p.begin(&b2); // the cross black lines p.drawLine(0,8,6,8); p.drawLine(10,8,16,8); p.drawLine(8,0,8,6); p.drawLine(8,10,8,16); // the cross white lines p.drawLine(0,7,6,7); p.drawLine(10,7,16,7); p.drawLine(7,0,7,6); p.drawLine(7,10,7,16); // the cross white lines p.drawLine(0,9,6,9); p.drawLine(10,9,16,9); p.drawLine(9,0,9,6); p.drawLine(9,10,9,16); // the rectangles p.drawRect(17,17,8,6); // black p.drawRect(18,18,6,4); // white p.drawRect(16,16,10,8); // white p.end(); RectangleCursor = QCursor(b,b2,8,8); // The cross circle cursor b = QBitmap(32,32,true); b2 = QBitmap(32,32,true); p.begin(&b); // the cross p.drawLine(0,8,6,8); p.drawLine(10,8,16,8); p.drawLine(8,0,8,6); p.drawLine(8,10,8,16); // the circle p.drawEllipse(17,17,8,8); p.end(); p.begin(&b2); // the cross black lines p.drawLine(0,8,6,8); p.drawLine(10,8,16,8); p.drawLine(8,0,8,6); p.drawLine(8,10,8,16); // the cross white lines p.drawLine(0,7,6,7); p.drawLine(10,7,16,7); p.drawLine(7,0,7,6); p.drawLine(7,10,7,16); // the cross white lines p.drawLine(0,9,6,9); p.drawLine(10,9,16,9); p.drawLine(9,0,9,6); p.drawLine(9,10,9,16); // the circles p.drawEllipse(17,17,8,8); // black p.drawEllipse(16,16,10,10); // white p.drawEllipse(18,18,6,6); // white p.end(); CircleCursor = QCursor(b,b2,8,8); QString path = KGlobal::dirs()->findResourceDir( "data", "kimagemapeditor/polygoncursor.png" ) + "kimagemapeditor/polygoncursor.png"; PolygonCursor = QCursor(QPixmap(path),8,8); path = KGlobal::dirs()->findResourceDir( "data", "kimagemapeditor/freehandcursor.png" ) + "kimagemapeditor/freehandcursor.png"; FreehandCursor = QCursor(QPixmap(path),8,8); path = KGlobal::dirs()->findResourceDir( "data", "kimagemapeditor/addpointcursor.png" ) + "kimagemapeditor/addpointcursor.png"; AddPointCursor = QCursor(QPixmap(path),8,8); path = KGlobal::dirs()->findResourceDir( "data", "kimagemapeditor/removepointcursor.png" ) + "kimagemapeditor/removepointcursor.png"; RemovePointCursor = QCursor(QPixmap(path),8,8); }