예제 #1
0
ScanController::Advice ScanController::databaseInitialization()
{
    d->advice = Success;
    createProgressDialog();
    setInitializationMessage();
    {
        QMutexLocker lock(&d->mutex);
        d->needsInitialization = true;
        d->condVar.wakeAll();
    }
    // loop is quit by signal
    d->eventLoop->exec();

    // setup file watch service for LoadingCache - now that we are sure we have a DatabaseWatch
    if (!d->fileWatchInstalled)
    {
        d->fileWatchInstalled = true; // once per application lifetime only
        LoadingCache* cache = LoadingCache::cache();
        LoadingCache::CacheLock lock(cache);
        cache->setFileWatch(new ScanControllerLoadingCacheFileWatch);
    }

    delete d->progressDialog;
    d->progressDialog = 0;

    return d->advice;
}
예제 #2
0
void ZLDialogManager::wait(const ZLResourceKey &key, ZLRunnable &runnable) const {
	shared_ptr<ZLProgressDialog> dialog = createProgressDialog(key);
	if (!dialog.isNull()) {
		dialog->run(runnable);
	} else {
		runnable.run();
	}
}
예제 #3
0
void ExportAkregatorJob::start()
{
    Q_EMIT title(i18n("Start export Akregator settings..."));
    createProgressDialog(i18n("Export Akregator settings"));
    if (mTypeSelected & Utils::Config) {
        QTimer::singleShot(0, this, &ExportAkregatorJob::slotCheckBackupConfig);
    } else if (mTypeSelected & Utils::Data) {
        QTimer::singleShot(0, this, &ExportAkregatorJob::slotCheckBackupData);
    } else {
        Q_EMIT jobFinished();
    }
}
예제 #4
0
파일: app.cpp 프로젝트: jscissr/qlcplus
void App::startup()
{
#if defined(__APPLE__) || defined(Q_OS_MAC)
    createProgressDialog();
#endif

    init();
    slotModeDesign();
    slotDocModified(false);

#if defined(__APPLE__) || defined(Q_OS_MAC)
    destroyProgressDialog();
#endif

    // Activate FixtureManager
    setActiveWindow(FixtureManager::staticMetaObject.className());
}
예제 #5
0
void ScanController::updateUniqueHash()
{
    createProgressDialog();
    // we only need to count the files in advance
    //if we show a progress percentage in progress dialog
    d->needTotalFiles = true;

    {
        QMutexLocker lock(&d->mutex);
        d->needsUpdateUniqueHash = true;
        d->condVar.wakeAll();
    }
    // loop is quit by signal
    d->eventLoop->exec();

    delete d->progressDialog;
    d->progressDialog = 0;
    d->needTotalFiles = false;
}
예제 #6
0
App::App()
    : QMainWindow()
    , m_tab(NULL)
    , m_progressDialog(NULL)
    , m_doc(NULL)

    , m_fileNewAction(NULL)
    , m_fileOpenAction(NULL)
    , m_fileSaveAction(NULL)
    , m_fileSaveAsAction(NULL)

    , m_modeToggleAction(NULL)
    , m_controlMonitorAction(NULL)
    , m_controlFullScreenAction(NULL)
    , m_controlBlackoutAction(NULL)
    , m_controlPanicAction(NULL)

    , m_helpIndexAction(NULL)
    , m_helpAboutAction(NULL)

    , m_toolbar(NULL)
{
    QCoreApplication::setOrganizationName("qlcplus");
    QCoreApplication::setOrganizationDomain("sf.net");
    QCoreApplication::setApplicationName(APPNAME);

#ifdef __APPLE__
    createProgressDialog();
#endif

    init();
    slotModeDesign();
    slotDocModified(false);

#ifdef __APPLE__
    destroyProgressDialog();
#endif

    // Activate FixtureManager
    setActiveWindow(FixtureManager::staticMetaObject.className());
}
예제 #7
0
void ScanController::completeCollectionScan(SplashScreen* splash)
{
    d->splash = splash;
    createProgressDialog();
    // we only need to count the files in advance
    //if we show a progress percentage in progress dialog
    d->needTotalFiles = (!d->splash || !CollectionScanner::databaseInitialScanDone());

    {
        QMutexLocker lock(&d->mutex);
        d->needsCompleteScan = true;
        d->condVar.wakeAll();
    }
    // loop is quit by signal
    d->eventLoop->exec();

    delete d->progressDialog;
    d->progressDialog = 0;
    // We do not delete Splashscreen here.
    d->splash         = 0;
    d->needTotalFiles = false;
}
예제 #8
0
/// Configuration  : TESTING
/// Function name  : runScriptTranslationTestCase
// Description     : Initiate a MSCI Script Translation TestCase. This will complete asynchronously
// 
// MAIN_WINDOW_DATA*  pMainWindowData : [in] Main window data
// CONST UINT        iTestCaseID     : [in] ID of the TestCase to run
// 
VOID  runScriptTranslationTestCase(MAIN_WINDOW_DATA*  pMainWindowData, CONST UINT  iTestCaseID)
{
   OPERATION_DATA*  pOperationData;  // Translation operation data
   TCHAR*        szScriptPath;    // Full path of the TestCase script

   // [CHECK] Ensure TestCase ID is valid
   ASSERT(identifyTestCaseType(iTestCaseID) == TCT_SCRIPT_TRANSLATION);

   // Print TestCase title
   CONSOLE("Beginning Script Translation Test Case %03u...", iTestCaseID);
   CONSOLE("----------------------------------------------");

   // Generate Script path
   szScriptPath = generateTestCaseFolder(iTestCaseID);
   StringCchCat(szScriptPath, MAX_PATH, TEXT("TestScript.xml"));

   // Launch script translation thread
   printOperationNameToOutputDialog(pMainWindowData->hOutputDlg, OT_LOAD_SCRIPT_FILE, szScriptPath);
   pOperationData = commandLoadScript(pMainWindowData->hMainWnd, szScriptPath, iTestCaseID);
   createProgressDialog(pMainWindowData, pOperationData);

   // Cleanup
   utilDeleteString(szScriptPath);
}
PProgressDialog::PProgressDialog( const QString & title , QDialog *parent )
    : QDialog(parent)
{
  setWindowTitle( title );
  createProgressDialog();
}
PProgressDialog::PProgressDialog( QDialog *parent )
    : QDialog(parent)
{
  setWindowTitle( tr("Подождите, выполняется работа приложения") );
  createProgressDialog();
}