⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qcanvasview.3qt

📁 Linux 下的图形编程环境。
💻 3QT
字号:
'\" t.TH QCanvasView 3qt "5 March 2001" "Trolltech AS" \" -*- nroff -*-.\" Copyright 1992-2001 Trolltech AS.  All rights reserved.  See the.\" license file included in the distribution for a complete license.\" statement..\".ad l.nh.SH NAMEQCanvasView \- A.br.PP\fC#include <qcanvas.h>\fR.PPInherits QScrollView..PP.SS "Public Members".in +1c.ti -1c.BI "\fBQCanvasView\fR ( QCanvas * " "viewing" "=0, QWidget * " "parent" "=0, const char * " "name" "=0, WFlags " "f" "=0 ) ".br.ti -1c.BI "\fB~QCanvasView\fR () ".br.ti -1c.BI "QCanvas* \fBcanvas\fR () const".br.ti -1c.BI "void \fBsetCanvas\fR ( QCanvas * v ) ".br.in -1c.SS "Protected Members".in +1c.ti -1c.BI "virtual void \fBdrawContents\fR ( QPainter *, int " "cx" ", int " "cy" ", int " "cw" ", int ch ) ".br.ti -1c.BI "virtual QSize \fBsizeHint\fR () const".br.in -1c.SH DESCRIPTIONA QWidget which views a QCanvas..PPDisplays a view of a QCanvas, with scrollbars available if desired. There can be more than one view of a canvas..PPThe view of a canvas is the object which the user can see and interact with, hence any interactivity will be based on events from a view. For example, by subclassing QCanvasView and overriding QScrollView::contentsMousePressEvent(), an application can provide a canvas where the user can interact with items on the canvas..PP.nf.br  void MyCanvasView::contentsMousePressEvent(QMouseEvent* e).br  {.br      QCanvasItemList list = canvas()->collisions(e->pos());.br      if ( !list.isEmpty() ) {.br          QCanvasItem* item = list.first();.br.br          // Process the top item.br          ....br      }.br  }.fi.PPMost of the functionality of QCanvasView is the functionality available for all QScrollView subclasses..SH MEMBER FUNCTION DOCUMENTATION.SH "QCanvasView::QCanvasView ( QCanvas * canvas=0, QWidget * parent=0, const char * name=0, WFlags f=0 )"Constructs a QCanvasView which views \fIcanvas.\fR The usual QWidget parameters may also be supplied..SH "QCanvasView::~QCanvasView ()"Destructs the view. The associated canvas is \fInot\fR deleted..SH "QCanvas* QCanvasView::canvas () const"Returns the canvas which the view is currently viewing..SH "void QCanvasView::drawContents ( QPainter * p, int cx, int cy, int cw, int ch ) \fC[virtual protected]\fR"Repaints the appropriate area of the QCanvas which this QCanvasView is viewing..PPReimplemented from QScrollView..SH "void QCanvasView::setCanvas ( QCanvas * canvas )"Changes the QCanvas which the QCanvasView is viewing to \fIcanvas.\fR.SH "QSize QCanvasView::sizeHint () const \fC[virtual protected]\fR"Suggests a size sufficient to view the entire canvas..PPReimplemented from QWidget..SH "SEE ALSO".BR http://doc.trolltech.com/qcanvasview.html.BR http://www.trolltech.com/faq/tech.html.SH COPYRIGHTCopyright 1992-2001 Trolltech AS, http://www.trolltech.com.  See thelicense file included in the distribution for a complete licensestatement..SH AUTHORGenerated automatically from the source code..SH BUGSIf you find a bug in Qt, please report it as described in.BR http://doc.trolltech.com/bughowto.html .Good bug reports make our job much simpler. Thank you..PIn case of content or formattting problems with this manual page, pleasereport them to.BR qt-bugs@trolltech.com .Please include the name of the manual page (qcanvasview.3qt) and the Qtversion (2.3.0).

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -