コード例 #1
0
ファイル: WebImport.cpp プロジェクト: nttputus/MLvisualdemos
void WebImport::Start()
{
    gui = new Ui::WebImportDialog();
    gui->setupUi(guiDialog = new QDialog());
    inputParser = new CSVParser();
    connect(gui->closeButton, SIGNAL(clicked()), this, SLOT(Closing()));
    //connect(gui->spinE1, SIGNAL(valueChanged(int)), this, SLOT(Updating()));
    //connect(gui->spinE2, SIGNAL(valueChanged(int)), this, SLOT(Updating()));
    connect(gui->loadFile, SIGNAL(clicked()), this, SLOT(Updating()));

    guiDialog->show();
}
コード例 #2
0
eOSState cInstallManager::ProcessInstallationStatus(void) {
    if (Installing()) {
        if (Finished()) {
            if (SuccessfullyInstalled()) {
                config.AddNewSkinRef(currentSkin);
                Skins.Message(mtStatus, tr("Skin successfully installed"));
            } else {
                Skins.Message(mtError, tr("Skin NOT successfully installed"));
            }
            cCondWait::SleepMs(1000);
            return osEnd;
        } else {
            int duration = Duration();
            if (duration > timeout) {
                Skins.Message(mtError, tr("Timeout"));
                cCondWait::SleepMs(1000);
                return osEnd;
            } else if (duration != lastInstallDuration) {
                Skins.Message(mtStatus, *cString::sprintf("%s (%d %s)...", tr("Installing Skin"), duration, tr("sec")));
                lastInstallDuration = duration;
            }
        }
    } else if (Updating()) {
        if (Finished()) {
            if (SuccessfullyUpdated()) {
                Skins.Message(mtStatus, tr("Skin successfully updated"));
                cCondWait::SleepMs(1000);
                return osEnd;
            } else {
                Skins.Message(mtStatus, tr("Skin already up to date"));
                return osContinue;
            }            
        } else {
            int duration = Duration();
            if (duration > timeout) {
                Skins.Message(mtError, tr("Timeout"));
                cCondWait::SleepMs(1000);
                return osEnd;
            } else if (duration != lastInstallDuration) {
                Skins.Message(mtStatus, *cString::sprintf("%s (%d %s)...", tr("Updating Skin from Git"), duration, tr("sec")));
                lastInstallDuration = duration;
            }
        }        
    }
    return osContinue;    
}