本文整理汇总了C++中Sheet::addItem方法的典型用法代码示例。如果您正苦于以下问题:C++ Sheet::addItem方法的具体用法?C++ Sheet::addItem怎么用?C++ Sheet::addItem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sheet
的用法示例。
在下文中一共展示了Sheet::addItem方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: write
/**************************************************************
***
** EphemView --- write
***
***************************************************************/
void EphemView::write()
{
//printf( "EphemView::write mode %d widget %ld swidget %ld twidget %ld\n", mode, (long)widget, (long)swidget, (long)twidget );
//printf( "EphemView::write mode %d month %d year %d\n", mode, month, year );
assert( mode >= 0 && mode < MAX_EPHEM_VIEWTYPES );
int ret = 0;
expert->prepareMonth( month, year, isLocaltime );
if ( mode == 1 )
{
assert( swidget );
Sheet *sheet = swidget->getSheet();
assert( sheet );
sheet->clear();
ret = expert->calcMonth();
SheetWidgetGrid *grid = new SheetWidgetGrid( 1, .5, 100, 100, 1600, 800 );
SheetWidgetItem *w = new GraphicalEphemWidgetItem( props, expert, max_deg, isLocaltime );
grid->addItem( w );
sheet->addItem( grid );
swidget->OnDataChanged();
}
else
{
assert( twidget );
Sheet *sheet = twidget->getSheet();
sheet->clear();
switch ( mode )
{
case 2:
expert->writeDetails( sheet );
break;
case 3:
ret = expert->writeIngress( sheet );
break;
case 4:
expert->writeLunar( sheet );
break;
case 5:
expert->writeKp( sheet, dasaId );
break;
default:
ret = expert->writeLongitudes( sheet );
break;
}
twidget->OnDataChanged();
}
Refresh();
if ( ret )
{
wxCommandEvent event( SHOW_EPHEM_FILE_WARNING );
event.SetEventObject( (wxWindow*)this );
wxPostEvent( GetParent(), event );
}
}