Example #1
0
LogsWidget::LogsWidget(QWidget *parent):
        QWidget(parent),ui(new Ui::LogsWidget)
{
    ui->setupUi(this);
    logsTitle = "سجل الخدمة للمستخدم ";
    ui->logsGroupBox->setTitle(logsTitle);

    ui->tabWidget->setCurrentIndex(0);
    createModel();
    initView();
    int index = ui->userNameComboBox->findText(getCurrentUserName());
    if (index == -1)
        index = 0 ;
    ui->userNameComboBox->setCurrentIndex(index);
    readUserLog(index);
}
Example #2
0
bool KStarsData::initialize() {
    //Initialize CatalogDB//
    KStars::Instance()->data()->catalogdb()->Initialize();

    //Load Time Zone Rules//
    emit progressText( i18n("Reading time zone rules") );
    if( !readTimeZoneRulebook( ) ) {
        fatalErrorMessage( "TZrules.dat" );
        return false;
    }

    //Load Cities//
    emit progressText( i18n("Loading city data") );
    if ( !readCityData( ) ) {
        fatalErrorMessage( "Cities.dat" );
        return false;
    }

    //Initialize SkyMapComposite//
    emit progressText(i18n("Loading sky objects" ) );
    m_SkyComposite = new SkyMapComposite(0);

    //Load Image URLs//
    emit progressText( i18n("Loading Image URLs" ) );
    if( !readURLData( "image_url.dat", 0 ) && !nonFatalErrorMessage( "image_url.dat" ) )
        return false;

    //Load Information URLs//
    emit progressText( i18n("Loading Information URLs" ) );
    if( !readURLData( "info_url.dat", 1 ) && !nonFatalErrorMessage( "info_url.dat" ) )
        return false;

    emit progressText( i18n("Loading Variable Stars" ) );

    //Initialize User Database//
    emit progressText( i18n("Loading User Information" ) );
    m_ksuserdb.Initialize();

    readUserLog();

    readADVTreeData();

    return true;
}