本文整理汇总了C++中Lang::getNadiName方法的典型用法代码示例。如果您正苦于以下问题:C++ Lang::getNadiName方法的具体用法?C++ Lang::getNadiName怎么用?C++ Lang::getNadiName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Lang
的用法示例。
在下文中一共展示了Lang::getNadiName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: writeCustomDataEntry
//.........这里部分代码省略.........
table->setEntry( col, row, _( "Universal Time" ));
table->setEntry( col + 1, row, f->getTimeFormatted( getTimeFromJD( h->getJD() )));
break;
case TAB_CELL_SIDEREAL_TIME:
table->setEntry( col, row, _( "Sidereal Time" ));
table->setEntry( col + 1, row, f->getTimeFormatted( h->getSiderealTime()));
break;
case TAB_CELL_JULIAN_DATE:
table->setEntry( col, row, _( "Julian Date" ));
table->setEntry( col + 1, row, wxString::Format( wxT( "%8.5f" ), h->getJD()));
break;
case TAB_CELL_SUNRISE:
{
table->setEntry( col, row, _( "Sunrise" ));
Location *loc = h->getLocation();
if ( h->getSunrise() != 0 )
{
s = f->getTimeFormatted( getTimeFromJD( h->getSunrise() + ( loc->getTimeZone() + loc->getDST()) / 24.0 ));
}
else s = _( "n.a." );
table->setEntry( col + 1, row, s );
}
break;
case TAB_CELL_SUNSET:
{
table->setEntry( col, row, _( "Sunset" ));
Location *loc = h->getLocation();
if ( h->getSunset() != 0 )
{
s = f->getTimeFormatted( getTimeFromJD( h->getSunset() + ( loc->getTimeZone() + loc->getDST()) / 24.0 ));
}
else s = _( "n.a." );
table->setEntry( col + 1, row, s );
}
break;
case TAB_CELL_VEDIC_AYANAMSA:
table->setEntry( col, row, _( "Vedic Ayanamsa" ));
table->setEntry( col + 1, row, f->getAyanamsaNameAndValue( h->getAyanamsaType( true ), h->getAyanamsa( true )));
break;
case TAB_CELL_WESTERN_AYANAMSA:
table->setEntry( col, row, _( "Western Ayanamsa" ));
table->setEntry( col + 1, row, f->getAyanamsaNameAndValue( h->getAyanamsaType( false ), h->getAyanamsa( false )));
break;
case TAB_CELL_VARNA:
table->setEntry( col, row, _( "Varna" ));
table->setEntry( col + 1, row, lang.getVarnaName( getVarna( h->getVedicLongitude( OMOON ))));
break;
case TAB_CELL_GANA:
table->setEntry( col, row, _( "Gana" ));
table->setEntry( col + 1, row, lang.getGanaName( NakshatraExpert().getGana( h->getVedicLongitude( OMOON ))));
break;
case TAB_CELL_YONI:
{
Yoni yoni = NakshatraExpert().getYoni( h->getVedicLongitude( OMOON ));
table->setEntry( col, row, _( "Yoni" ));
table->setEntry( col + 1, row, yoni.name );
}
break;
case TAB_CELL_NADI:
table->setEntry( col, row, _( "Nadi" ));
table->setEntry( col + 1, row, lang.getNadiName( NakshatraExpert().getNadi( h->getVedicLongitude( OMOON ))));
break;
case TAB_CELL_RAJJU:
{
Rajju rajju = NakshatraExpert().getRajju( getNakshatra27( h->getVedicLongitude( OMOON )));
table->setEntry( col, row, _( "Rajju" ));
table->setEntry( col + 1, row, lang.getRajjuName( rajju.aroha, rajju.type ));
}
break;
case TAB_CELL_INCFLUENCE_TIME:
{
DasaExpert *expert = DasaExpertFactory().getDasaExpert( D_VIMSOTTARI, h );
table->setEntry( col, row, _( "Influence" ));
table->setEntry( col + 1, row, expert->getDasaLordNameF( expert->getBirthMahaDasaLord(), TF_LONG ));
}
break;
case TAB_CELL_LUNAR_TITHI:
{
double angle = red_deg( h->getVedicLongitude( OMOON ) - h->getVedicLongitude( OSUN ));
table->setEntry( col, row, _( "Lunar Tithi" ));
table->setEntry( col + 1, row, lang.getTithiName( angle / 12 ));
}
break;
case TAB_CELL_WEEKDAY:
table->setEntry( col, row, _( "Weekday" ));
table->setEntry( col + 1, row, lang.getWeekdayName( h->getDataSet()->getWeekDay() ));
break;
case TAB_CELL_HORA_LORD:
case TAB_CELL_DINA_LORD:
case TAB_CELL_MASA_LORD:
case TAB_CELL_VARSHA_LORD:
writeHoraEntry( col, row, type );
break;
default:
table->setEntry( col, row, wxString::Format( wxT( "Error, wrong custom data entry id %d" ), (int)type ));
break;
};
}
示例2: writeVedicPlanetReport
/*****************************************************
**
** TextHelper --- writeVedicPlanetReport
**
******************************************************/
int TextHelper::writeVedicPlanetReport()
{
VargaExpert expert;
int i, j;
Lang lang;
Calculator *calculator = CalculatorFactory().getCalculator();
wxString s1;
double len;
int ret = 0;
VargaHoroscope chart( horoscope, 0 );
VargaHoroscope nchart( horoscope, 1 );
JaiminiExpert jexpert( &nchart );
jexpert.calcCharaKarakas();
NakshatraExpert nexpert;
if ( show_header ) writer->writeHeader1( _( "Vedic Planets" ));
vector<int> obs = chartprops->getVedicPlanetList();
Table table( 5, obs.size() + 1 );
table.setHeader( 0, _( "Planet" ));
table.setHeader( 1, _( "Length" ));
table.setHeader( 2, _( "Karaka" ));
table.setHeader( 3, _( "Navamsa" ));
table.setHeader( 4, _( "Nakshatra" ));
table.col_alignment[0] = Align::Center;
table.col_alignment[1] = Align::Right;
table.col_alignment[3] = Align::Center;
//const int inode = config->iLunarNodeMode == LUNAR_NODE_TRUE ? OTRUENODE : OMEANNODE;
int line = 1;
for ( unsigned int p = 0; p < obs.size(); p++ )
{
i = obs[p];
len = horoscope->getVedicLength( i );
if ( len == 0 ) ret++;
table.setEntry( 0, line, writer->getObjectName( i, TLARGE, true ));
table.setEntry( 1, line, writer->getPosFormatted( len, horoscope->isRetrograde( i )));
if ( i <= OSATURN ) j = i;
else if ( i == OMEANNODE || i == OTRUENODE ) j = 7;
else j = -1;
if ( j != -1 ) table.setEntry( 2, line, lang.getKarakaName( jexpert.getCharaKarakaProperty( j )));
table.setEntry( 3, line, writer->getSignName(nchart.getRasi( i ), config->signPrecision ));
table.setEntry( 4, line, lang.getNakshatraName( getNakshatra( len, N27), N27, TLARGE ) );
line++;
}
writer->writeTable( table );
writer->writeHeader2( _( "Qualities" ));
Table t4( 2, 5 );
t4.setHeader( 0, _( "Quality" ));
t4.setHeader( 1, _( "Value" ));
double mlen = horoscope->getVedicLength( OMOON );
line = 1;
t4.setEntry( 0, line, _( "Varna" ) );
t4.setEntry( 1, line++, lang.getVarnaName( getVarna( mlen )));
t4.setEntry( 0, line, _( "Yoni" ) );
t4.setEntry( 1, line++, lang.getYoniName( nexpert.getYoni( mlen )));
t4.setEntry( 0, line, _( "Gana" ) );
t4.setEntry( 1, line++, lang.getGanaName( nexpert.getGana( mlen )));
t4.setEntry( 0, line, _( "Nadi" ) );
t4.setEntry( 1, line++, lang.getNadiName( nexpert.getNadi( mlen )));
writer->writeTable( t4 );
writer->writeHeader2( _( "Moon's Nakshatra and Pada Portions" ));
Table t5( 3, 3 );
t5.setHeader( 0, _( "Quality" ));
t5.setHeader( 1, _( "Value" ));
t5.setHeader( 2, _( "Value (Percent)" ));
t5.setEntry( 0, 1, _( "Nakshatra" ) );
double nportion = calculator->calcNakshatraPortion( horoscope->getDataSet(), mlen, false );
s1.Printf( wxT( "%1.6f" ), nportion );
t5.setEntry( 1, 1, s1 );
s1.Printf( wxT( "%01.2f%%" ), 100.0 * nportion );
t5.setEntry( 2, 1, s1 );
t5.setEntry( 0, 2, _( "Pada" ) );
double pportion = calculator->calcNakshatraPortion( horoscope->getDataSet(), mlen, true );
s1.Printf( wxT( "%1.6f" ), pportion );
t5.setEntry( 1, 2, s1 );
s1.Printf( wxT( "%01.2f%%" ), 100.0 * pportion );
t5.setEntry( 2, 2, s1 );
writer->writeTable( t5 );
return ret;
}