37 map.insert( 0.0, QString::fromLatin1(
"N" ) );
38 map.insert( 45.0, QString::fromLatin1(
"NE" ) );
39 map.insert( 90.0, QString::fromLatin1(
"E" ) );
40 map.insert( 135.0, QString::fromLatin1(
"SE" ) );
41 map.insert( 180.0, QString::fromLatin1(
"S" ) );
42 map.insert( 225.0, QString::fromLatin1(
"SW" ) );
43 map.insert( 270.0, QString::fromLatin1(
"W" ) );
44 map.insert( 315.0, QString::fromLatin1(
"NW" ) );
47 map.insert( 22.5, QString::fromLatin1(
"NNE" ) );
48 map.insert( 67.5, QString::fromLatin1(
"NEE" ) );
49 map.insert( 112.5, QString::fromLatin1(
"SEE" ) );
50 map.insert( 157.5, QString::fromLatin1(
"SSE" ) );
51 map.insert( 202.5, QString::fromLatin1(
"SSW" ) );
52 map.insert( 247.5, QString::fromLatin1(
"SWW" ) );
53 map.insert( 292.5, QString::fromLatin1(
"NWW" ) );
54 map.insert( 337.5, QString::fromLatin1(
"NNW" ) );
118 if ( qFuzzyCompare( value + 1.0, 1.0 ) )
190 const QPointF& center,
double radius )
const
192 QPalette::ColorGroup cg;
194 cg = hasFocus() ? QPalette::Active : QPalette::Inactive;
196 cg = QPalette::Disabled;
205 const int margin = 4;
206 drawRose( painter, center, radius - margin, 360.0 - north, cg );
219 double radius,
double north, QPalette::ColorGroup cg )
const
277 if ( kev->key() == Key_5 )
284 double newValue =
value();
286 if ( kev->key() >= Qt::Key_1 && kev->key() <= Qt::Key_9 )
291 switch ( kev->key() )
294 newValue = 180.0 * 0.0;
297 newValue = 180.0 * 0.25;
300 newValue = 180.0 * 0.5;
303 newValue = 180.0 * 0.75;
306 newValue = 180.0 * 1.0;
309 newValue = 180.0 * 1.25;
312 newValue = 180.0 * 1.5;
315 newValue = 180.0 * 1.75;
328 #include "moc_qwt_compass.cpp"