head 1.2; access; symbols; locks; strict; comment @ * @; 1.2 date 2005.08.19.20.37.33; author behdad; state Exp; branches; next 1.1; commitid 68a54306430a4567; 1.1 date 2005.07.01.19.49.07; author cworth; state Exp; branches; next ; commitid 3eec42c59e334567; desc @@ 1.2 log @2005-08-19 Behdad Esfahbod * Updated to latest Cairo interface. Patch from Mauricio Piacentini. @ text @#ifndef QCAIROWIDGET_H #define QCAIROWIDGET_H #include #include #include #include class QCairoWidget : public QWidget { Q_OBJECT public: QCairoWidget( QWidget *parent, const char *name=0 ); ~QCairoWidget(); bool doubleBuffered() const; void setDoubleBuffered( bool db ); protected: virtual void cairoPaint( cairo_t *cr, const QRect &invalidatedArea ); protected: void paintEvent( QPaintEvent *e ); private: cairo_t *m_cr; cairo_surface_t * m_surf; QPixmap m_buffer; bool m_doubleBuffer; }; inline bool QCairoWidget::doubleBuffered() const { return m_doubleBuffer; } #endif @ 1.1 log @ From 2005-01-25 Zack Rusin : * .cvsignore: * controlwidgetbase.ui: * mainwindow.cpp: * mainwindow.h: * qcairo.cpp: * qcairo.h: * qcairo.pro: * qcairowidget.cpp: * qcairowidget.h: * qkapow.cpp: * qkapow.h: 1) I created a QCairoWidget which has a virtual void cairoPaint(cairo_t *) method which essentially replaces the QWidget::paintEvent. It's done essentially to enable people to just take the widget, stick it in their app and just use Cairo (either duble-buffered or not). 2) Instead of the old demo code it uses now kapow. It's a little bit more attractive and nicely shows how to use QCairoWidget. @ text @d28 1 @