本文整理汇总了C++中Allocation::getBottom方法的典型用法代码示例。如果您正苦于以下问题:C++ Allocation::getBottom方法的具体用法?C++ Allocation::getBottom怎么用?C++ Allocation::getBottom使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Allocation
的用法示例。
在下文中一共展示了Allocation::getBottom方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getViewArea
void SpinLineView2::draw( Canvas& v, const Allocation& a )
{
Canvas& c = v;
ViewAreaMdl* area = getViewArea();
SpinSpace::Iterator pos, _end = d_model->end();
SpinSpace::Element e;
Twips y, x;
char buf[ 16 ];
for( pos = d_model->begin(); pos != _end; ++pos )
{
d_model->fetch( pos, e );
if( !e.isGhost() )
{
y = area->toTwip( e.d_point[DimY]->getShift( d_model->getSpec() ),
a.getTop(), DimY );
c.drawLine( a.getLeft(), y, a.getRight(), y, d_clr );
e.d_point[DimY]->getLabel().format( buf, sizeof(buf) );
QFont f;
f.setPointSize( s_ps / TwipsPerPoint );
c.drawText( a.getLeft(), y, buf, &f, d_clr );
if( d_verti )
{
x = area->toTwip( e.d_point[DimX]->getShift( d_model->getSpec() ),
a.getLeft(), DimX );
c.drawLine( x, a.getTop(), x, a.getBottom(), d_clr );
e.d_point[DimX]->getLabel().format( buf, sizeof(buf) );
c.drawText( x + g_w, a.getBottom() - g_w, buf, &f, d_clr );
}
}
}
}
示例2: draw
void draw(Canvas & c, const Allocation & a)
{
Lexi::Twips x = a.getLeft() + a.getWidth() / 10;
c.drawLine( x, a.getTop(), x, a.getBottom(), g_color );
Lexi::Twips y = a.getTop() + a.getHeight() / 10;
c.drawLine( x, y, a.getRight(), y, g_color );
}
示例3: execute
void execute()
{
Allocation rect;
getAllocation( rect );
try
{
Allocation a = d_model->getAllocation();
Viewport* v = getHandler()->getViewport();
assert( v );
Viewport::pushCursor( Viewport::CurWait );
if( rect.getWidth() != 0 && rect.getHeight() != 0 )
{
v->captureDamage();
PpmRange rx, ry;
rx.first = d_model->toPpm( rect.getLeft(), a.getLeft(), DimX );
rx.second = d_model->toPpm( rect.getRight(), a.getLeft(), DimX );
ry.first = d_model->toPpm( rect.getTop(), a.getTop(), DimY );
ry.second = d_model->toPpm( rect.getBottom(), a.getTop(), DimY );
d_target->setRange( rx, ry );
v->commitDamage();
}else
{
d_target->centerPoint( d_model->toPpm( rect.getLeft(), a.getLeft(), DimX ),
d_model->toPpm( rect.getTop(), a.getTop(), DimY ) );
}
v->damageAll();
Viewport::popCursor();
}catch( ... )
{
qDebug( "Exception in _OverviewCmd" );
}
Command::execute();
}
示例4: execute
void execute()
{
Allocation rect;
getAllocation( rect );
if( rect.getWidth() != 0 && rect.getHeight() != 0 )
{
Allocation a = d_model->getAllocation();
Viewport* p = getController()->getViewport();
assert( p );
p->pushCursor( Viewport::CurWait );
p->captureDamage();
if( d_do[ DimY ] && d_model->inUse( DimY ) &&
d_do[ DimX ] && d_model->inUse( DimX ) )
{
PpmRange rx;
rx.first = d_model->toPpm( rect.getLeft(), a.getLeft(), DimX );
rx.second = d_model->toPpm( rect.getRight(), a.getLeft(), DimX );
PpmRange ry;
ry.first = d_model->toPpm( rect.getTop(), a.getTop(), DimY );
ry.second = d_model->toPpm( rect.getBottom(), a.getTop(), DimY );
d_model->setRange( rx, ry );
}else if( d_do[ DimX ] && d_model->inUse( DimX ) )
{
PpmRange rx;
rx.first = d_model->toPpm( rect.getLeft(), a.getLeft(), DimX );
rx.second = d_model->toPpm( rect.getRight(), a.getLeft(), DimX );
d_model->setRange( DimX, rx );
}else if( d_do[ DimY ] && d_model->inUse( DimY ) )
{
PpmRange ry;
ry.first = d_model->toPpm( rect.getTop(), a.getTop(), DimY );
ry.second = d_model->toPpm( rect.getBottom(), a.getTop(), DimY );
d_model->setRange( DimY, ry );
}
p->commitDamage();
p->popCursor();
d_model->redraw(p);
}
Command::execute();
}
示例5: execute
void execute()
{
Allocation r;
getAllocation( r );
ViewAreaMdl* mdl = d_view->getBuf()->getViewArea();
Allocation a = mdl->getAllocation();
PpmCube c;
c.assign( 2, PpmRange() );
c[ DimX ].first = mdl->toPpm( r.getLeft(), a.getLeft(), DimX );
c[ DimX ].second = mdl->toPpm( r.getRight(), a.getLeft(), DimX );
c[ DimY ].first = mdl->toPpm( r.getTop(), a.getTop(), DimY );
c[ DimY ].second = mdl->toPpm( r.getBottom(), a.getTop(), DimY );
d_view->selectPeak( c );
notifySelection( d_view );
Command::execute();
}