35
35
iAmActivated = true;
37
37
myResizeWindow = 0L;
38
myResizeString = i18nc("Window geometry display, %1 and %2 are the new size,"
39
" %3 and %4 are pixel increments - avoid reformatting or suffixes like 'px'",
40
"Width: %1 (%3)\nHeight: %2 (%4)");
41
myCoordString[0] = i18nc("Window geometry display, %1 and %2 are the cartesian x and y coordinates"
42
" - avoid reformatting or suffixes like 'px'",
44
myCoordString[1] = i18nc("Window geometry display, %1 and %2 are the cartesian x and y coordinates,"
45
" %3 and %4 are the resp. increments - avoid reformatting or suffixes like 'px'",
46
"X: %1 (%3)\nY: %2 (%4)");
38
#define myResizeString "Window geometry display, %1 and %2 are the new size," \
39
" %3 and %4 are pixel increments - avoid reformatting or suffixes like 'px'", \
40
"Width: %1 (%3)\nHeight: %2 (%4)"
41
#define myCoordString_0 "Window geometry display, %1 and %2 are the cartesian x and y coordinates" \
42
" - avoid reformatting or suffixes like 'px'", \
44
#define myCoordString_1 "Window geometry display, %1 and %2 are the cartesian x and y coordinates," \
45
" %3 and %4 are the resp. increments - avoid reformatting or suffixes like 'px'", \
46
"X: %1 (%3)\nY: %2 (%4)"
47
47
reconfigure( ReconfigureAll );
48
48
QFont fnt; fnt.setBold(true); fnt.setPointSize(12);
49
49
for ( int i = 0; i < 3; ++i )
142
142
// upper left ----------------------
143
143
if ( w->isUserResize() )
144
myMeasure[0]->setText( myCoordString[1].arg( r.x() ).arg( r.y() ).arg( number(dx) ).arg( number(dy) ) );
144
myMeasure[0]->setText( i18nc(myCoordString_1, r.x(), r.y(), number(dx), number(dy) ) );
146
myMeasure[0]->setText( myCoordString[0].arg( r.x() ).arg( r.y() ) );
146
myMeasure[0]->setText( i18nc(myCoordString_0, r.x(), r.y() ) );
147
147
myMeasure[0]->setPosition( geometry.topLeft() );
149
149
// center ----------------------
156
156
// TODO: i hate this. anyone got a nice idea to invoke the stringbuilder or otherwise avoid
157
157
// dogslow QString::arg() system here?
158
myMeasure[1]->setText( myResizeString.arg( r.width() ).arg( r.height() ).arg( number(dx) ).arg( number(dy) ) );
158
// I think is better than using QString:arg(), right?
159
myMeasure[1]->setText( i18nc(myResizeString, r.width(), r.height(), number(dx), number(dy) ) );
160
161
// calc width for bottomright element, superflous otherwise
161
162
dx = r.right() - r2.right();
162
163
dy = r.bottom() - r2.bottom();
165
myMeasure[1]->setText( myCoordString[0].arg( number(dx) ).arg( number(dy) ) );
166
myMeasure[1]->setText( i18nc(myCoordString_0, number(dx), number(dy) ) );
167
168
myMeasure[1]->setPosition( geometry.center() );
169
170
// lower right ----------------------
170
171
if ( w->isUserResize() )
171
myMeasure[2]->setText( myCoordString[1].arg( r.right() ).arg( r.bottom() ).arg( number(dx) ).arg( number(dy) ) );
172
myMeasure[2]->setText( i18nc(myCoordString_1, r.right(), r.bottom(), number(dx), number(dy) ) );
173
myMeasure[2]->setText( myCoordString[0].arg( r.right() ).arg( r.bottom() ) );
174
myMeasure[2]->setText( i18nc(myCoordString_0, r.right(), r.bottom() ) );
174
175
myMeasure[2]->setPosition( geometry.bottomRight() );
176
177
effects->addRepaint( geometry.adjusted(-20, -20, 20, 20) );