QtiPlot  0.9.8.2
Public Types | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
FrameWidget Class Reference

#include <FrameWidget.h>

Inheritance diagram for FrameWidget:
EllipseWidget ImageWidget LegendWidget RectangleWidget TexWidget PieLabel

Public Types

enum  AttachPolicy { Page, Scales }
 The attach to policy. More...
 
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
}
 Length units. More...
 

Signals

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

Public Member Functions

int angle ()
 
AttachPolicy attachPolicy ()
 
QColor backgroundColor ()
 
double bottom ()
 
QRectF boundingRect () const
 Return bounding rectangle in plot coordinates. More...
 
QBrush brush ()
 
QColor frameColor ()
 
Qt::PenStyle frameLineStyle ()
 
QPen framePen ()
 
int frameStyle ()
 
 FrameWidget (Graph *)
 
double frameWidth ()
 
bool isOnTop ()
 
void mousePressEvent (QMouseEvent *)
 
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 setAttachPolicy (AttachPolicy attachTo)
 
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. More...
 
void setFrameColor (const QColor &c)
 
void setFrameLineStyle (const Qt::PenStyle &s)
 
void setFramePen (const QPen &p)
 
void setFrameStyle (int style)
 
void setFrameWidth (double w)
 
void setOnTop (bool on=true)
 
void setOrigin (int x, int y)
 Sets the position of the top left corner in paint coordinates. More...
 
void setOriginCoord (double x, double y)
 Sets the position of the top left corner in axis coordinates. More...
 
void setRect (int x, int y, int w, int h)
 Set geometry, giving everything in paint coordinates. More...
 
void setSize (int w, int h)
 Set size in paint coordinates (pixels). More...
 
void setSize (const QSize &newSize)
 Set size in paint coordinates. More...
 
void showContextMenu ()
 
void showPropertiesDialog ()
 
virtual void updateCoordinates ()
 
double xValue ()
 Returns the x axis coordiante of the top left corner. More...
 
double yValue ()
 Returns the y axis coordiante of the top left corner. More...
 

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. More...
 
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. More...
 
double calculateRightValue ()
 Returns the x axis coordinate of the bottom right corner based on the pixel value. More...
 
double calculateXValue ()
 Returns the x axis coordinate of the top left corner based on the pixel value. More...
 
double calculateYValue ()
 Returns the y axis coordinate of the top left corner based on the pixel value. More...
 
void contextMenuEvent (QContextMenuEvent *)
 
virtual void drawFrame (QPainter *p, const QRect &rect)
 
virtual void paintEvent (QPaintEvent *e)
 

Protected Attributes

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

Member Enumeration Documentation

§ AttachPolicy

The attach to policy.

Enumerator
Page 
Scales 

§ FrameStyle

The kinds of frame a FrameWidget can draw around.

Enumerator
None 
Line 
Shadow 

§ Unit

Length units.

Enumerator
Inch 
Millimeter 
Centimeter 
Point 
Pixel 
Scale 

Constructor & Destructor Documentation

§ FrameWidget()

FrameWidget::FrameWidget ( Graph plot)

Member Function Documentation

§ angle()

int FrameWidget::angle ( )
inline

References d_angle.

§ attachPolicy()

AttachPolicy FrameWidget::attachPolicy ( )
inline

§ backgroundColor()

QColor FrameWidget::backgroundColor ( )
inline

§ bottom()

double FrameWidget::bottom ( )
inline

§ boundingRect()

QRectF FrameWidget::boundingRect ( ) const

Return bounding rectangle in plot coordinates.

References d_x, d_x_right, d_y, and d_y_bottom.

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

§ brush()

QBrush FrameWidget::brush ( )
inline

§ calculateBottomValue()

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 isOnTop(), TexWidget::print(), ImageWidget::print(), print(), setFrameStyle(), setSize(), and updateCoordinates().

§ calculateRightValue()

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 isOnTop(), TexWidget::print(), ImageWidget::print(), print(), setFrameStyle(), setSize(), and updateCoordinates().

§ calculateXValue()

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 isOnTop(), TexWidget::print(), ImageWidget::print(), LegendWidget::print(), print(), and updateCoordinates().

§ calculateYValue()

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 isOnTop(), TexWidget::print(), ImageWidget::print(), LegendWidget::print(), print(), and updateCoordinates().

§ changedCoordinates

void FrameWidget::changedCoordinates ( const QRectF &  )
signal

§ contextMenuEvent()

void FrameWidget::contextMenuEvent ( QContextMenuEvent *  )
inlineprotected

§ drawFrame()

void FrameWidget::drawFrame ( QPainter *  p,
const QRect &  rect 
)
protectedvirtual

§ frameColor()

QColor FrameWidget::frameColor ( )
inline

References d_frame_pen.

Referenced by EnrichmentDialog::setWidget().

§ frameLineStyle()

Qt::PenStyle FrameWidget::frameLineStyle ( )
inline

References d_frame_pen.

§ framePen()

QPen FrameWidget::framePen ( )
inline

§ frameStyle()

int FrameWidget::frameStyle ( )
inline

§ frameWidth()

double FrameWidget::frameWidth ( )
inline

§ heightIn()

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

§ isOnTop()

bool FrameWidget::isOnTop ( )
inline

§ mousePressEvent()

void FrameWidget::mousePressEvent ( QMouseEvent *  )

§ move()

void FrameWidget::move ( const QPoint &  pos)

§ paintEvent()

void FrameWidget::paintEvent ( QPaintEvent *  e)
protectedvirtual

Reimplemented in LegendWidget, ImageWidget, and TexWidget.

References drawFrame().

Referenced by isOnTop().

§ plot()

Graph* FrameWidget::plot ( )
inline

§ print()

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

§ resetCoordinates()

void FrameWidget::resetCoordinates ( )
inline

§ resetOrigin()

void FrameWidget::resetOrigin ( )
inline

§ right()

double FrameWidget::right ( )
inline

§ saveToString()

QString FrameWidget::saveToString ( )
virtual

§ setAngle()

void FrameWidget::setAngle ( int  ang)
inline

References d_angle.

§ setAttachPolicy()

void FrameWidget::setAttachPolicy ( AttachPolicy  attachTo)

§ setBackgroundColor()

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

§ setBrush()

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

§ setCoordinates()

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

§ setFrameColor()

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

§ setFrameLineStyle()

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

§ setFramePen()

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

§ setFrameStyle()

void FrameWidget::setFrameStyle ( int  style)

§ setFrameWidth()

void FrameWidget::setFrameWidth ( double  w)
inline

§ setOnTop()

void FrameWidget::setOnTop ( bool  on = true)

§ setOrigin()

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

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

References bottom(), boundingRect(), move(), right(), and setCoordinates().

Referenced by Graph::insertImageMarker().

§ setOriginCoord()

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

§ setRect() [1/2]

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

Set geometry, giving everything in paint coordinates.

References move().

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

§ setRect() [2/2]

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().

§ setSize() [1/2]

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

§ setSize() [2/2]

void FrameWidget::setSize ( const QSize &  newSize)

Set size in paint coordinates.

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

§ showContextMenu()

void FrameWidget::showContextMenu ( )
inline

§ showDialog

void FrameWidget::showDialog ( )
signal

§ showMenu

void FrameWidget::showMenu ( )
signal

§ showPropertiesDialog()

void FrameWidget::showPropertiesDialog ( )
inline

§ updateCoordinates()

void FrameWidget::updateCoordinates ( )
virtual

§ widthIn()

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

§ xIn()

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

§ xValue()

double FrameWidget::xValue ( )
inline

Returns the x axis coordiante of the top left corner.

References d_x.

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

§ yIn()

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

§ yValue()

double FrameWidget::yValue ( )
inline

Returns the y axis coordiante of the top left corner.

References d_y, and setOriginCoord().

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

Member Data Documentation

§ d_angle

int FrameWidget::d_angle
protected

Rotation angle: not implemented yet.

Referenced by angle(), and setAngle().

§ d_attach_policy

AttachPolicy FrameWidget::d_attach_policy
protected

The attach to policy.

Referenced by attachPolicy(), saveToString(), and setAttachPolicy().

§ d_brush

QBrush FrameWidget::d_brush
protected

§ d_frame

int FrameWidget::d_frame
protected

§ d_frame_pen

QPen FrameWidget::d_frame_pen
protected

§ d_on_top

bool FrameWidget::d_on_top
protected

Referenced by isOnTop(), saveToString(), and setOnTop().

§ d_plot

Graph* FrameWidget::d_plot
protected

§ d_shadow_width

int FrameWidget::d_shadow_width
protected

§ d_x

double FrameWidget::d_x
protected

§ d_x_right

double FrameWidget::d_x_right
protected

The right side position in scale coordinates.

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

§ d_y

double FrameWidget::d_y
protected

§ d_y_bottom

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: