PSQt/src/text.cpp

Go to the documentation of this file.
00001 //---------------------------------------------------------------------
00002 // File and Version Information:
00003 //   $Id: text.cpp 9841 2015-03-26 18:35:44Z dubrovin@SLAC.STANFORD.EDU $
00004 //
00005 // Author: Mikhail S. Dubrovin
00006 //---------------------------------------------------------------------
00007 
00008 #include "PSQt/text.h"
00009 #include <QApplication>
00010 #include <QPainter>
00011 
00012 namespace PSQt {
00013 
00014 Text::Text(QWidget *parent)
00015     : QWidget(parent)
00016 {
00017 }
00018 
00019 void Text::paintEvent(QPaintEvent *event)
00020 {
00021      QPainter painter(this);
00022      painter.setPen(Qt::blue);
00023      painter.setFont(QFont("Arial", 30));
00024      painter.drawText(rect(), Qt::AlignCenter, "Qt");
00025 }
00026 
00027 } // namespace PSQt

Generated on 19 Dec 2016 for PSANAmodules by  doxygen 1.4.7