Engauge Digitizer 2
Loading...
Searching...
No Matches
ViewProfile Class Reference

Class that modifies QGraphicsView to present a two-dimensional profile, with movable dividers for selecting a range. More...

#include <ViewProfile.h>

Inheritance diagram for ViewProfile:
Inheritance graph
Collaboration diagram for ViewProfile:
Collaboration graph

Public Member Functions

 ViewProfile (QGraphicsScene *scene, int minimumWidth, QWidget *parent=0)
 Single constructor.
virtual void resizeEvent (QResizeEvent *event)
 Intercept resize events so the geometry can be scaled to perfectly fit into the window.

Detailed Description

Class that modifies QGraphicsView to present a two-dimensional profile, with movable dividers for selecting a range.

Definition at line 15 of file ViewProfile.h.

Constructor & Destructor Documentation

◆ ViewProfile()

ViewProfile::ViewProfile ( QGraphicsScene * scene,
int minimumWidth,
QWidget * parent = 0 )

Single constructor.

Definition at line 17 of file ViewProfile.cpp.

19 :
20 QGraphicsView (scene, parent)
21{
22 setRenderHint (QPainter::Antialiasing);
23 setHorizontalScrollBarPolicy (Qt::ScrollBarAlwaysOff);
24 setVerticalScrollBarPolicy (Qt::ScrollBarAlwaysOff);
25
26 setMinimumHeight (160);
27 setMaximumHeight (160);
28 setMinimumWidth (minimumWidth);
29
30 createFrame ();
31 refit ();
32}

Member Function Documentation

◆ resizeEvent()

void ViewProfile::resizeEvent ( QResizeEvent * event)
virtual

Intercept resize events so the geometry can be scaled to perfectly fit into the window.

Definition at line 53 of file ViewProfile.cpp.

54{
55 refit ();
56
57 QGraphicsView::resizeEvent (event);
58}

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