MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / initWidget

Method initWidget

3rdparty/qwt/src/qwt_plot_axis.cpp:41–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39 }
40
41 void initWidget( QwtScaleDraw::Alignment align, const QString& name, QwtPlot* plot )
42 {
43 scaleWidget = new QwtScaleWidget( align, plot );
44 scaleWidget->setObjectName( name );
45
46 #if 1
47 // better find the font sizes from the application font
48 const QFont fscl( plot->fontInfo().family(), 10 );
49 const QFont fttl( plot->fontInfo().family(), 12, QFont::Bold );
50 #endif
51
52 scaleWidget->setTransformation( scaleEngine->transformation() );
53
54 scaleWidget->setFont( fscl );
55 scaleWidget->setMargin( 2 );
56
57 QwtText text = scaleWidget->title();
58 text.setFont( fttl );
59 scaleWidget->setTitle( text );
60 }
61
62 bool isVisible;
63 bool doAutoScale;

Callers 1

ScaleDataMethod · 0.80

Calls 6

setTransformationMethod · 0.45
transformationMethod · 0.45
setFontMethod · 0.45
setMarginMethod · 0.45
titleMethod · 0.45
setTitleMethod · 0.45

Tested by

no test coverage detected