draw.hxx
来自「基于网络编程的例子」· HXX 代码 · 共 41 行
HXX
41 行
// Draw.hxx//// Simple example showing Qt's event methods that are inhereted from QWidget//// This example is derived from the QT connect.cpp example, so the following// copyright is in effect:/****************************************************************************** $Id: qt/examples/drawlines/connect.cpp 2.2.0 edited 2000-08-31 $**** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.**** This file is part of an example program for Qt. This example** program may be used, distributed and modified without limitation.*******************************************************************************/#ifndef __DRAW_HXX#define __DRAW_HXX#include <qwidget.h>#include <qpainter.h>#include <qapplication.h>class DrawWidget : public QWidget{public: DrawWidget(QWidget *parent=0, const char *name=0); ~DrawWidget();protected: void paintEvent(QPaintEvent *); void mousePressEvent(QMouseEvent *); void mouseMoveEvent(QMouseEvent *);private: QPoint *points; // point array QColor *color; // color value int count; // count = number of points};#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?