Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

DrawPad Class Reference

#include </home/clem/local/src/opie/noncore/graphics/drawpad/drawpad.h>

Collaboration diagram for DrawPad:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 DrawPad (QWidget *parent=0, const char *name=0, WFlags fl=0)
 ~DrawPad ()
Tooltool ()
QPen pen ()
QBrush brush ()
bool antiAliasing ()

Static Public Member Functions

static QString appName ()

Private Slots

void finishStartup ()
void newPage ()
void clearPage ()
void deletePage ()
void slotAppMessage (const QCString &, const QByteArray &)
void setPointTool ()
void setLineTool ()
void setRectangleTool ()
void setFilledRectangleTool ()
void setEllipseTool ()
void setFilledEllipseTool ()
void setTextTool ()
void setFillTool ()
void setEraseTool ()
void changePenWidth (int value)
void changePenColor (const QColor &color)
void changeBrushColor (const QColor &color)
void updateView ()
void deleteAll ()
void importPage ()
void exportPage ()
void thumbnailView ()
void pageInformation ()

Private Member Functions

void loadConfig ()
void saveConfig ()

Private Attributes

DrawPadCanvasm_pDrawPadCanvas
Toolm_pTool
QPen m_pen
QBrush m_brush
QAction * m_pAntiAliasingAction
QAction * m_pUndoAction
QAction * m_pRedoAction
QAction * m_pFirstPageAction
QAction * m_pPreviousPageAction
QAction * m_pNextPageAction
QAction * m_pLastPageAction
QAction * m_pPointToolAction
QAction * m_pLineToolAction
QAction * m_pRectangleToolAction
QAction * m_pFilledRectangleToolAction
QAction * m_pEllipseToolAction
QAction * m_pFilledEllipseToolAction
QAction * m_pTextToolAction
QAction * m_pFillToolAction
QAction * m_pEraseToolAction
QToolButton * m_pLineToolButton
QToolButton * m_pRectangleToolButton
QToolButton * m_pEllipseToolButton
QToolButton * m_pPenColorToolButton
QToolButton * m_pBrushColorToolButton
QSpinBox * m_pPenWidthSpinBox

Constructor & Destructor Documentation

DrawPad::DrawPad QWidget *  parent = 0,
const char *  name = 0,
WFlags  fl = 0
 

Definition at line 52 of file drawpad.cpp.

References add, Qt::black, changeBrushColor(), changePenColor(), changePenWidth(), clearPage(), deleteAll(), deletePage(), exportPage(), finishStartup(), importPage(), Opie::Core::OResource::loadPixmap(), m_pAntiAliasingAction, m_pBrushColorToolButton, m_pDrawPadCanvas, m_pEllipseToolAction, m_pEllipseToolButton, m_pEraseToolAction, m_pFilledEllipseToolAction, m_pFilledRectangleToolAction, m_pFillToolAction, m_pFirstPageAction, m_pLastPageAction, m_pLineToolAction, m_pLineToolButton, m_pNextPageAction, m_pPenColorToolButton, m_pPenWidthSpinBox, m_pPointToolAction, m_pPreviousPageAction, m_pRectangleToolAction, m_pRectangleToolButton, m_pRedoAction, m_pTextToolAction, m_pTool, m_pUndoAction, newPage(), QString::null, pageInformation(), qApp, setEllipseTool(), setEraseTool(), setFilledEllipseTool(), setFilledRectangleTool(), setFillTool(), setLineTool(), setPointTool(), setRectangleTool(), setTextTool(), slotAppMessage(), Opie::Core::OResource::SmallIcon, thumbnailView(), tr, updateView(), and Qt::white.

DrawPad::~DrawPad  ) 
 

Definition at line 344 of file drawpad.cpp.

References Global::applicationFileName(), IO_WriteOnly, m_pDrawPadCanvas, QFile::open(), DrawPadCanvas::save(), and saveConfig().


Member Function Documentation

bool DrawPad::antiAliasing  ) 
 

Definition at line 356 of file drawpad.cpp.

References m_pAntiAliasingAction.

Referenced by LineTool::drawFinalShape(), FilledEllipseTool::drawFinalShape(), EllipseTool::drawFinalShape(), PointTool::mouseMoveEvent(), FillTool::mousePressEvent(), and saveConfig().

static QString DrawPad::appName  )  [inline, static]
 

Definition at line 37 of file drawpad.h.

References QString::fromLatin1().

QBrush DrawPad::brush  )  [inline]
 

Definition at line 41 of file drawpad.h.

References m_brush.

Referenced by FilledRectangleTool::drawFinalShape(), FilledEllipseTool::drawFinalShape(), FillTool::mousePressEvent(), and ThumbnailView::newPage().

void DrawPad::changeBrushColor const QColor &  color  )  [private, slot]
 

Definition at line 601 of file drawpad.cpp.

References m_brush, m_pBrushColorToolButton, size, and AppLnk::smallIconSize().

Referenced by DrawPad(), and loadConfig().

void DrawPad::changePenColor const QColor &  color  )  [private, slot]
 

Definition at line 588 of file drawpad.cpp.

References m_pen, m_pPenColorToolButton, size, and AppLnk::smallIconSize().

Referenced by DrawPad(), and loadConfig().

void DrawPad::changePenWidth int  value  )  [private, slot]
 

Definition at line 583 of file drawpad.cpp.

References m_pen.

Referenced by DrawPad().

void DrawPad::clearPage  )  [private, slot]
 

Definition at line 373 of file drawpad.cpp.

References DrawPadCanvas::clearPage(), Escape, m_pDrawPadCanvas, and tr.

Referenced by DrawPad().

void DrawPad::deleteAll  )  [private, slot]
 

Definition at line 630 of file drawpad.cpp.

References DrawPadCanvas::deleteAll(), Escape, m_pDrawPadCanvas, and tr.

Referenced by DrawPad().

void DrawPad::deletePage  )  [private, slot]
 

Definition at line 388 of file drawpad.cpp.

References DrawPadCanvas::deletePage(), Escape, m_pDrawPadCanvas, and tr.

Referenced by DrawPad().

void DrawPad::exportPage  )  [private, slot]
 

Definition at line 659 of file drawpad.cpp.

References QPEApplication::execDialog(), DrawPadCanvas::exportPage(), m_pDrawPadCanvas, DrawPadCanvas::pageCount(), and DrawPadCanvas::pagePosition().

Referenced by DrawPad().

void DrawPad::finishStartup  )  [private, slot]
 

Definition at line 327 of file drawpad.cpp.

References Global::applicationFileName(), DrawPadCanvas::initialPage(), IO_ReadOnly, DrawPadCanvas::load(), loadConfig(), m_pDrawPadCanvas, and QFile::open().

Referenced by DrawPad().

void DrawPad::importPage  )  [private, slot]
 

Definition at line 645 of file drawpad.cpp.

References QPEApplication::execDialog(), DrawPadCanvas::importPage(), and m_pDrawPadCanvas.

Referenced by DrawPad().

void DrawPad::loadConfig  )  [private]
 

Definition at line 686 of file drawpad.cpp.

References Qt::black, changeBrushColor(), changePenColor(), m_pAntiAliasingAction, m_pDrawPadCanvas, m_pPenWidthSpinBox, Config::readBoolEntry(), Config::readEntry(), Config::readNumEntry(), DrawPadCanvas::selectPage(), Config::setGroup(), and Qt::white.

Referenced by finishStartup().

void DrawPad::newPage  )  [private, slot]
 

Definition at line 361 of file drawpad.cpp.

References m_brush, m_pDrawPadCanvas, m_pen, DrawPadCanvas::newPage(), NewPageDialog::selectedColor(), NewPageDialog::selectedHeight(), NewPageDialog::selectedTitle(), and NewPageDialog::selectedWidth().

Referenced by DrawPad().

void DrawPad::pageInformation  )  [private, slot]
 

Definition at line 677 of file drawpad.cpp.

References DrawPadCanvas::currentPage(), m_pDrawPadCanvas, and PageInformationDialog::selectedTitle().

Referenced by DrawPad().

QPen DrawPad::pen  )  [inline]
 

Definition at line 40 of file drawpad.h.

References m_pen.

Referenced by RectangleTool::drawFinalShape(), LineTool::drawFinalShape(), FilledRectangleTool::drawFinalShape(), FilledEllipseTool::drawFinalShape(), EllipseTool::drawFinalShape(), ShapeTool::mouseMoveEvent(), PointTool::mouseMoveEvent(), EraseTool::mouseMoveEvent(), TextTool::mousePressEvent(), ShapeTool::mouseReleaseEvent(), and ThumbnailView::newPage().

void DrawPad::saveConfig  )  [private]
 

Definition at line 698 of file drawpad.cpp.

References antiAliasing(), m_brush, m_pDrawPadCanvas, m_pen, DrawPadCanvas::pagePosition(), Config::setGroup(), and Config::writeEntry().

Referenced by ~DrawPad().

void DrawPad::setEllipseTool  )  [private, slot]
 

Definition at line 491 of file drawpad.cpp.

References add, m_pDrawPadCanvas, m_pEllipseToolAction, m_pEllipseToolButton, m_pEraseToolAction, m_pFillToolAction, m_pLineToolButton, m_pRectangleToolButton, m_pTextToolAction, and m_pTool.

Referenced by DrawPad().

void DrawPad::setEraseTool  )  [private, slot]
 

Definition at line 567 of file drawpad.cpp.

References m_pDrawPadCanvas, m_pEllipseToolButton, m_pEraseToolAction, m_pFillToolAction, m_pLineToolButton, m_pRectangleToolButton, m_pTextToolAction, and m_pTool.

Referenced by DrawPad().

void DrawPad::setFilledEllipseTool  )  [private, slot]
 

Definition at line 513 of file drawpad.cpp.

References add, m_pDrawPadCanvas, m_pEllipseToolButton, m_pEraseToolAction, m_pFilledEllipseToolAction, m_pFillToolAction, m_pLineToolButton, m_pRectangleToolButton, m_pTextToolAction, and m_pTool.

Referenced by DrawPad().

void DrawPad::setFilledRectangleTool  )  [private, slot]
 

Definition at line 469 of file drawpad.cpp.

References add, m_pDrawPadCanvas, m_pEllipseToolButton, m_pEraseToolAction, m_pFilledRectangleToolAction, m_pFillToolAction, m_pLineToolButton, m_pRectangleToolButton, m_pTextToolAction, and m_pTool.

Referenced by DrawPad().

void DrawPad::setFillTool  )  [private, slot]
 

Definition at line 551 of file drawpad.cpp.

References m_pDrawPadCanvas, m_pEllipseToolButton, m_pEraseToolAction, m_pFillToolAction, m_pLineToolButton, m_pRectangleToolButton, m_pTextToolAction, and m_pTool.

Referenced by DrawPad().

void DrawPad::setLineTool  )  [private, slot]
 

Definition at line 425 of file drawpad.cpp.

References add, m_pDrawPadCanvas, m_pEllipseToolButton, m_pEraseToolAction, m_pFillToolAction, m_pLineToolAction, m_pLineToolButton, m_pRectangleToolButton, m_pTextToolAction, and m_pTool.

Referenced by DrawPad().

void DrawPad::setPointTool  )  [private, slot]
 

Definition at line 403 of file drawpad.cpp.

References add, m_pDrawPadCanvas, m_pEllipseToolButton, m_pEraseToolAction, m_pFillToolAction, m_pLineToolButton, m_pPointToolAction, m_pRectangleToolButton, m_pTextToolAction, and m_pTool.

Referenced by DrawPad().

void DrawPad::setRectangleTool  )  [private, slot]
 

Definition at line 447 of file drawpad.cpp.

References add, m_pDrawPadCanvas, m_pEllipseToolButton, m_pEraseToolAction, m_pFillToolAction, m_pLineToolButton, m_pRectangleToolAction, m_pRectangleToolButton, m_pTextToolAction, and m_pTool.

Referenced by DrawPad().

void DrawPad::setTextTool  )  [private, slot]
 

Definition at line 535 of file drawpad.cpp.

References m_pDrawPadCanvas, m_pEllipseToolButton, m_pEraseToolAction, m_pFillToolAction, m_pLineToolButton, m_pRectangleToolButton, m_pTextToolAction, and m_pTool.

Referenced by DrawPad().

void DrawPad::slotAppMessage const QCString ,
const QByteArray
[private, slot]
 

Definition at line 714 of file drawpad.cpp.

References DrawPadCanvas::importPixmap(), IO_ReadOnly, m_pDrawPadCanvas, pix, QPEApplication::setKeepRunning(), and stream.

Referenced by DrawPad().

void DrawPad::thumbnailView  )  [private, slot]
 

Definition at line 669 of file drawpad.cpp.

References ThumbnailView::exec(), m_pDrawPadCanvas, and QPEApplication::showWidget().

Referenced by DrawPad().

Tool* DrawPad::tool  )  [inline]
 

Definition at line 39 of file drawpad.h.

References m_pTool.

Referenced by DrawPadCanvas::contentsMouseMoveEvent(), DrawPadCanvas::contentsMousePressEvent(), and DrawPadCanvas::contentsMouseReleaseEvent().

void DrawPad::updateView  )  [private, slot]
 

Definition at line 614 of file drawpad.cpp.

References DrawPadCanvas::currentPage(), DrawPadCanvas::goNextPageEnabled(), DrawPadCanvas::goPreviousPageEnabled(), m_pDrawPadCanvas, m_pFirstPageAction, m_pLastPageAction, m_pNextPageAction, m_pPreviousPageAction, m_pRedoAction, m_pUndoAction, DrawPadCanvas::pageCount(), DrawPadCanvas::pagePosition(), and tr.

Referenced by DrawPad().


Member Data Documentation

QBrush DrawPad::m_brush [private]
 

Definition at line 84 of file drawpad.h.

Referenced by brush(), changeBrushColor(), newPage(), and saveConfig().

QAction* DrawPad::m_pAntiAliasingAction [private]
 

Definition at line 86 of file drawpad.h.

Referenced by antiAliasing(), DrawPad(), and loadConfig().

QToolButton* DrawPad::m_pBrushColorToolButton [private]
 

Definition at line 110 of file drawpad.h.

Referenced by changeBrushColor(), and DrawPad().

DrawPadCanvas* DrawPad::m_pDrawPadCanvas [private]
 

Definition at line 80 of file drawpad.h.

Referenced by clearPage(), deleteAll(), deletePage(), DrawPad(), exportPage(), finishStartup(), importPage(), loadConfig(), newPage(), pageInformation(), saveConfig(), setEllipseTool(), setEraseTool(), setFilledEllipseTool(), setFilledRectangleTool(), setFillTool(), setLineTool(), setPointTool(), setRectangleTool(), setTextTool(), slotAppMessage(), thumbnailView(), updateView(), and ~DrawPad().

QAction* DrawPad::m_pEllipseToolAction [private]
 

Definition at line 100 of file drawpad.h.

Referenced by DrawPad(), and setEllipseTool().

QToolButton* DrawPad::m_pEllipseToolButton [private]
 

Definition at line 108 of file drawpad.h.

Referenced by DrawPad(), setEllipseTool(), setEraseTool(), setFilledEllipseTool(), setFilledRectangleTool(), setFillTool(), setLineTool(), setPointTool(), setRectangleTool(), and setTextTool().

QPen DrawPad::m_pen [private]
 

Definition at line 83 of file drawpad.h.

Referenced by changePenColor(), changePenWidth(), newPage(), pen(), and saveConfig().

QAction* DrawPad::m_pEraseToolAction [private]
 

Definition at line 104 of file drawpad.h.

Referenced by DrawPad(), setEllipseTool(), setEraseTool(), setFilledEllipseTool(), setFilledRectangleTool(), setFillTool(), setLineTool(), setPointTool(), setRectangleTool(), and setTextTool().

QAction* DrawPad::m_pFilledEllipseToolAction [private]
 

Definition at line 101 of file drawpad.h.

Referenced by DrawPad(), and setFilledEllipseTool().

QAction* DrawPad::m_pFilledRectangleToolAction [private]
 

Definition at line 99 of file drawpad.h.

Referenced by DrawPad(), and setFilledRectangleTool().

QAction* DrawPad::m_pFillToolAction [private]
 

Definition at line 103 of file drawpad.h.

Referenced by DrawPad(), setEllipseTool(), setEraseTool(), setFilledEllipseTool(), setFilledRectangleTool(), setFillTool(), setLineTool(), setPointTool(), setRectangleTool(), and setTextTool().

QAction* DrawPad::m_pFirstPageAction [private]
 

Definition at line 91 of file drawpad.h.

Referenced by DrawPad(), and updateView().

QAction* DrawPad::m_pLastPageAction [private]
 

Definition at line 94 of file drawpad.h.

Referenced by DrawPad(), and updateView().

QAction* DrawPad::m_pLineToolAction [private]
 

Definition at line 97 of file drawpad.h.

Referenced by DrawPad(), and setLineTool().

QToolButton* DrawPad::m_pLineToolButton [private]
 

Definition at line 106 of file drawpad.h.

Referenced by DrawPad(), setEllipseTool(), setEraseTool(), setFilledEllipseTool(), setFilledRectangleTool(), setFillTool(), setLineTool(), setPointTool(), setRectangleTool(), and setTextTool().

QAction* DrawPad::m_pNextPageAction [private]
 

Definition at line 93 of file drawpad.h.

Referenced by DrawPad(), and updateView().

QToolButton* DrawPad::m_pPenColorToolButton [private]
 

Definition at line 109 of file drawpad.h.

Referenced by changePenColor(), and DrawPad().

QSpinBox* DrawPad::m_pPenWidthSpinBox [private]
 

Definition at line 112 of file drawpad.h.

Referenced by DrawPad(), and loadConfig().

QAction* DrawPad::m_pPointToolAction [private]
 

Definition at line 96 of file drawpad.h.

Referenced by DrawPad(), and setPointTool().

QAction* DrawPad::m_pPreviousPageAction [private]
 

Definition at line 92 of file drawpad.h.

Referenced by DrawPad(), and updateView().

QAction* DrawPad::m_pRectangleToolAction [private]
 

Definition at line 98 of file drawpad.h.

Referenced by DrawPad(), and setRectangleTool().

QToolButton* DrawPad::m_pRectangleToolButton [private]
 

Definition at line 107 of file drawpad.h.

Referenced by DrawPad(), setEllipseTool(), setEraseTool(), setFilledEllipseTool(), setFilledRectangleTool(), setFillTool(), setLineTool(), setPointTool(), setRectangleTool(), and setTextTool().

QAction* DrawPad::m_pRedoAction [private]
 

Definition at line 89 of file drawpad.h.

Referenced by DrawPad(), and updateView().

QAction* DrawPad::m_pTextToolAction [private]
 

Definition at line 102 of file drawpad.h.

Referenced by DrawPad(), setEllipseTool(), setEraseTool(), setFilledEllipseTool(), setFilledRectangleTool(), setFillTool(), setLineTool(), setPointTool(), setRectangleTool(), and setTextTool().

Tool* DrawPad::m_pTool [private]
 

Definition at line 82 of file drawpad.h.

Referenced by DrawPad(), setEllipseTool(), setEraseTool(), setFilledEllipseTool(), setFilledRectangleTool(), setFillTool(), setLineTool(), setPointTool(), setRectangleTool(), setTextTool(), and tool().

QAction* DrawPad::m_pUndoAction [private]
 

Definition at line 88 of file drawpad.h.

Referenced by DrawPad(), and updateView().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:31:36 2005 for OPIE by  doxygen 1.4.2