PSQt/src/brushes.cpp

Go to the documentation of this file.
00001 //---------------------------------------------------------------------
00002 // File and Version Information:
00003 //   $Id: brushes.cpp 9841 2015-03-26 18:35:44Z dubrovin@SLAC.STANFORD.EDU $
00004 //
00005 // Author: Mikhail S. Dubrovin
00006 //---------------------------------------------------------------------
00007 
00008 #include "PSQt/brushes.h"
00009 #include <QApplication>
00010 #include <QPainter>
00011 
00012 namespace PSQt {
00013 
00014 Brushes::Brushes(QWidget *parent)
00015     : QWidget(parent)
00016 {
00017 
00018 }
00019 
00020 void Brushes::paintEvent(QPaintEvent *event)
00021 {
00022   QPainter painter(this);
00023   painter.setPen(Qt::NoPen);
00024 
00025   painter.setBrush(Qt::HorPattern);
00026   painter.drawRect(10, 15, 90, 60);
00027 
00028   painter.setBrush(Qt::VerPattern);
00029   painter.drawRect(130, 15, 90, 60);
00030 
00031   painter.setBrush(Qt::CrossPattern);
00032   painter.drawRect(250, 15, 90, 60);
00033 
00034   painter.setBrush(Qt::Dense7Pattern);
00035   painter.drawRect(10, 105, 90, 60);
00036 
00037   painter.setBrush(Qt::Dense6Pattern);
00038   painter.drawRect(130, 105, 90, 60);
00039 
00040   painter.setBrush(Qt::Dense5Pattern);
00041   painter.drawRect(250, 105, 90, 60);
00042 
00043   painter.setBrush(Qt::BDiagPattern);
00044   painter.drawRect(10, 195, 90, 60);
00045 
00046   painter.setBrush(Qt::FDiagPattern);
00047   painter.drawRect(130, 195, 90, 60);
00048 
00049   painter.setBrush(Qt::DiagCrossPattern);
00050   painter.drawRect(250, 195, 90, 60);
00051 
00052 }
00053 
00054 } // namespace PSQt

Generated on 19 Dec 2016 for PSANAmodules by  doxygen 1.4.7