FrameWidget Class Reference

#include <FrameWidget.h>

Inheritance diagram for FrameWidget:

ImageWidget LegendWidget RectangleWidget TexWidget PieLabel

List of all members.

Public Types

enum  FrameStyle { None = 0, Line = 1, Shadow = 2 }
 The kinds of frame a FrameWidget can draw around. More...
enum  Unit {
  Inch, Millimeter, Centimeter, Point,
  Pixel, Scale
}

Signals

void changedCoordinates (const QRectF &)
void showDialog ()
void showMenu ()

Public Member Functions

int angle ()
QColor backgroundColor ()
double bottom ()
QRectF boundingRect () const
 Return bounding rectangle in plot coordinates.
QBrush brush ()
QColor frameColor ()
Qt::PenStyle frameLineStyle ()
QPen framePen ()
int frameStyle ()
 FrameWidget (Graph *)
QColor frameWidth ()
void move (const QPoint &pos)
Graphplot ()
virtual void print (QPainter *p, const QwtScaleMap map[QwtPlot::axisCnt])
void resetCoordinates ()
void resetOrigin ()
double right ()
virtual QString saveToString ()
void setAngle (int ang)
void setBackgroundColor (const QColor &c)
void setBrush (const QBrush &b)
void setCoordinates (double left, double top, double right, double bottom)
 Set position (xValue() and yValue()), right and bottom values giving everything in plot coordinates.
void setFrameColor (const QColor &c)
void setFrameLineStyle (const Qt::PenStyle &s)
void setFramePen (const QPen &p)
void setFrameStyle (int style)
void setFrameWidth (int w)
void setOrigin (int x, int y)
 Sets the position of the top left corner in paint coordinates.
void setOriginCoord (double x, double y)
 Sets the position of the top left corner in axis coordinates.
void setRect (int x, int y, int w, int h)
 Set geometry, giving everything in paint coordinates.
void setSize (const QSize &newSize)
 Set size in paint coordinates.
void setSize (int w, int h)
 Set size in paint coordinates (pixels).
void showContextMenu ()
void showPropertiesDialog ()
virtual void updateCoordinates ()
double xValue ()
 Returns the x axis coordiante of the top left corner.
double yValue ()
 Returns the y axis coordiante of the top left corner.

Static Public Member Functions

static double heightIn (QWidget *w, Unit unit)
static void setRect (QWidget *, double x, double y, double w, double h, Unit unit=Pixel)
 Set geometry of a widget in arbitrary units.
static double widthIn (QWidget *w, Unit unit)
static double xIn (QWidget *w, Unit unit)
static double yIn (QWidget *w, Unit unit)

Protected Member Functions

double calculateBottomValue ()
 Returns the y axis coordinate of the bottom right corner based on the pixel value.
double calculateRightValue ()
 Returns the x axis coordinate of the bottom right corner based on the pixel value.
double calculateXValue ()
 Returns the x axis coordinate of the top left corner based on the pixel value.
double calculateYValue ()
 Returns the y axis coordinate of the top left corner based on the pixel value.
void contextMenuEvent (QContextMenuEvent *)
void drawFrame (QPainter *p, const QRect &rect)
void mousePressEvent (QMouseEvent *)
virtual void paintEvent (QPaintEvent *e)

Protected Attributes

int d_angle
 Rotation angle: not implemented yet.
QBrush d_brush
 Background brush.
int d_frame
 Frame type.
QPen d_frame_pen
 Pen used to draw the frame.
Graphd_plot
 Parent plot.
int d_shadow_width
 Frame width in pixels.
double d_x
 X axis coordinate of the top left corner.
double d_x_right
 The right side position in scale coordinates.
double d_y
 Y axis coordinate of the top left corner.
double d_y_bottom
 The bottom side position in scale coordinates.


Member Enumeration Documentation

The kinds of frame a FrameWidget can draw around.

Enumerator:
None 
Line 
Shadow 

Enumerator:
Inch 
Millimeter 
Centimeter 
Point 
Pixel 
Scale 


Constructor & Destructor Documentation

FrameWidget::FrameWidget ( Graph plot  ) 


Member Function Documentation

int FrameWidget::angle (  )  [inline]

Reimplemented in LegendWidget.

References d_angle.

QColor FrameWidget::backgroundColor (  )  [inline]

double FrameWidget::bottom (  )  [inline]

QRectF FrameWidget::boundingRect (  )  const

Return bounding rectangle in plot coordinates.

References d_x, d_x_right, d_y, and d_y_bottom.

Referenced by RectangleWidget::updateCoordinates(), and ApplicationWindow::zoomRectanglePlot().

QBrush FrameWidget::brush (  )  [inline]

double FrameWidget::calculateBottomValue (  )  [protected]

Returns the y axis coordinate of the bottom right corner based on the pixel value.

References MultiLayer::canvas(), d_plot, and Graph::multiLayer().

Referenced by ImageWidget::print(), print(), setFrameStyle(), setSize(), and updateCoordinates().

double FrameWidget::calculateRightValue (  )  [protected]

Returns the x axis coordinate of the bottom right corner based on the pixel value.

References MultiLayer::canvas(), d_plot, and Graph::multiLayer().

Referenced by ImageWidget::print(), print(), setFrameStyle(), setSize(), and updateCoordinates().

double FrameWidget::calculateXValue (  )  [protected]

Returns the x axis coordinate of the top left corner based on the pixel value.

References MultiLayer::canvas(), d_plot, and Graph::multiLayer().

Referenced by TexWidget::print(), LegendWidget::print(), ImageWidget::print(), print(), and updateCoordinates().

double FrameWidget::calculateYValue (  )  [protected]

Returns the y axis coordinate of the top left corner based on the pixel value.

References MultiLayer::canvas(), d_plot, and Graph::multiLayer().

Referenced by TexWidget::print(), LegendWidget::print(), ImageWidget::print(), print(), and updateCoordinates().

void FrameWidget::changedCoordinates ( const QRectF &   )  [signal]

void FrameWidget::contextMenuEvent ( QContextMenuEvent *   )  [inline, protected]

void FrameWidget::drawFrame ( QPainter *  p,
const QRect &  rect 
) [protected]

QColor FrameWidget::frameColor (  )  [inline]

References d_frame_pen.

Referenced by EnrichmentDialog::setWidget().

Qt::PenStyle FrameWidget::frameLineStyle (  )  [inline]

References d_frame_pen.

QPen FrameWidget::framePen (  )  [inline]

int FrameWidget::frameStyle (  )  [inline]

QColor FrameWidget::frameWidth (  )  [inline]

References d_frame_pen.

double FrameWidget::heightIn ( QWidget *  w,
Unit  unit 
) [static]

void FrameWidget::mousePressEvent ( QMouseEvent *   )  [protected]

void FrameWidget::move ( const QPoint &  pos  ) 

void FrameWidget::paintEvent ( QPaintEvent *  e  )  [protected, virtual]

Reimplemented in ImageWidget, LegendWidget, and TexWidget.

References drawFrame().

Graph* FrameWidget::plot (  )  [inline]

void FrameWidget::print ( QPainter *  p,
const QwtScaleMap  map[QwtPlot::axisCnt] 
) [virtual]

void FrameWidget::resetCoordinates (  )  [inline]

References d_x, d_x_right, d_y, d_y_bottom, and setCoordinates().

Referenced by Graph::resizeEvent().

void FrameWidget::resetOrigin (  )  [inline]

References d_x, d_y, and setOriginCoord().

Referenced by Graph::resizeEvent().

double FrameWidget::right (  )  [inline]

QString FrameWidget::saveToString (  )  [virtual]

void FrameWidget::setAngle ( int  ang  )  [inline]

Reimplemented in LegendWidget.

References d_angle.

void FrameWidget::setBackgroundColor ( const QColor &  c  )  [inline]

void FrameWidget::setBrush ( const QBrush &  b  )  [inline]

void FrameWidget::setCoordinates ( double  left,
double  top,
double  right,
double  bottom 
)

void FrameWidget::setFrameColor ( const QColor &  c  )  [inline]

void FrameWidget::setFrameLineStyle ( const Qt::PenStyle &  s  )  [inline]

void FrameWidget::setFramePen ( const QPen &  p  )  [inline]

void FrameWidget::setFrameStyle ( int  style  ) 

void FrameWidget::setFrameWidth ( int  w  )  [inline]

void FrameWidget::setOrigin ( int  x,
int  y 
) [inline]

Sets the position of the top left corner in paint coordinates.

References move().

Referenced by Graph::insertImageMarker().

void FrameWidget::setOriginCoord ( double  x,
double  y 
)

void FrameWidget::setRect ( QWidget *  widget,
double  x,
double  y,
double  w,
double  h,
Unit  unit = Pixel 
) [static]

Set geometry of a widget in arbitrary units.

References Centimeter, Inch, Millimeter, Pixel, Point, Scale, setCoordinates(), and setRect().

void FrameWidget::setRect ( int  x,
int  y,
int  w,
int  h 
)

Set geometry, giving everything in paint coordinates.

References move().

Referenced by PlotDialog::acceptParams(), EnrichmentDialog::setCoordinates(), setRect(), and ApplicationWindow::zoomRectanglePlot().

void FrameWidget::setSize ( const QSize &  newSize  ) 

Set size in paint coordinates.

References calculateBottomValue(), calculateRightValue(), d_x_right, and d_y_bottom.

void FrameWidget::setSize ( int  w,
int  h 
) [inline]

void FrameWidget::showContextMenu (  )  [inline]

void FrameWidget::showDialog (  )  [signal]

void FrameWidget::showMenu (  )  [signal]

Referenced by FrameWidget(), and showContextMenu().

void FrameWidget::showPropertiesDialog (  )  [inline]

void FrameWidget::updateCoordinates (  )  [virtual]

double FrameWidget::widthIn ( QWidget *  w,
Unit  unit 
) [static]

double FrameWidget::xIn ( QWidget *  w,
Unit  unit 
) [static]

double FrameWidget::xValue (  )  [inline]

Returns the x axis coordiante of the top left corner.

References d_x.

Referenced by Graph::addImage(), TexWidget::clone(), RectangleWidget::clone(), LegendWidget::clone(), ImageWidget::clone(), widthIn(), and xIn().

double FrameWidget::yIn ( QWidget *  w,
Unit  unit 
) [static]

double FrameWidget::yValue (  )  [inline]

Returns the y axis coordiante of the top left corner.

References d_y.

Referenced by Graph::addImage(), TexWidget::clone(), RectangleWidget::clone(), LegendWidget::clone(), ImageWidget::clone(), heightIn(), and yIn().


Member Data Documentation

int FrameWidget::d_angle [protected]

Rotation angle: not implemented yet.

Reimplemented in LegendWidget.

Referenced by angle(), and setAngle().

QBrush FrameWidget::d_brush [protected]

Background brush.

Referenced by brush(), drawFrame(), RectangleWidget::saveToString(), and setBrush().

int FrameWidget::d_frame [protected]

QPen FrameWidget::d_frame_pen [protected]

Graph* FrameWidget::d_plot [protected]

int FrameWidget::d_shadow_width [protected]

double FrameWidget::d_x [protected]

double FrameWidget::d_x_right [protected]

The right side position in scale coordinates.

Referenced by boundingRect(), resetCoordinates(), right(), saveToString(), setCoordinates(), setFrameStyle(), setSize(), and updateCoordinates().

double FrameWidget::d_y [protected]

double FrameWidget::d_y_bottom [protected]

The bottom side position in scale coordinates.

Referenced by bottom(), boundingRect(), resetCoordinates(), saveToString(), setCoordinates(), setFrameStyle(), setSize(), and updateCoordinates().


The documentation for this class was generated from the following files:

Generated on Fri Nov 7 03:36:55 2008 for QtiPlot by  doxygen 1.5.6