Package com.trolltech.qt

Examples of com.trolltech.qt.QThread


       
    logger.log(logger.EXTREME, "Building index runners & timers");
        indexRunner = new IndexRunner("indexRunner.log",
            Global.getDatabaseUrl(), Global.getIndexDatabaseUrl(), Global.getResourceDatabaseUrl(),
            Global.getDatabaseUserid(), Global.getDatabaseUserPassword(), Global.cipherPassword);
    indexThread = new QThread(indexRunner, "Index Thread");
        indexRunner.indexAttachmentsLocally = Global.indexAttachmentsLocally();
        indexRunner.indexImageRecognition = Global.indexImageRecognition();
        indexRunner.indexNoteBody = Global.indexNoteBody();
        indexRunner.indexNoteTitle = Global.indexNoteTitle();
        indexRunner.specialIndexCharacters = Global.getSpecialIndexCharacters();
    indexThread.start();
   
        synchronizeAnimationTimer = new QTimer();
        synchronizeAnimationTimer.timeout.connect(this, "updateSyncButton()");
       
    indexTimer = new QTimer();
    indexTime = 1000*Global.getIndexThreadSleepInterval()
    indexTimer.start(indexTime)// Start indexing timer
    indexTimer.timeout.connect(this, "indexTimer()");
    indexDisabled = false;
    indexRunning = false;
       
    logger.log(logger.EXTREME, "Setting sync thread & timers");
    syncThreadsReady=1;
    syncRunner = new SyncRunner("syncRunner.log",
        Global.getDatabaseUrl(), Global.getIndexDatabaseUrl(), Global.getResourceDatabaseUrl(),
        Global.getDatabaseUserid(), Global.getDatabaseUserPassword(), Global.cipherPassword);
    syncTime = new SyncTimes().timeValue(Global.getSyncInterval());
    syncTimer = new QTimer();
    syncTimer.timeout.connect(this, "syncTimer()");
        syncRunner.status.message.connect(this, "setMessage(String)");
        syncRunner.syncSignal.finished.connect(this, "syncThreadComplete(Boolean)");
        syncRunner.syncSignal.errorDisconnect.connect(this, "remoteErrorDisconnect()");
        syncRunning = false
    if (syncTime > 0) {
      automaticSync = true;
      syncTimer.start(syncTime*60*1000);
    } else {
      automaticSync = false;
      syncTimer.stop();
    }
    syncRunner.setEvernoteUpdateCount(Global.getEvernoteUpdateCount());
    syncThread = new QThread(syncRunner, "Synchronization Thread");
    syncThread.start();
   
   
    logger.log(logger.EXTREME, "Starting thumnail thread");
    pdfReadyQueue = new ArrayList<String>();
    thumbnailRunner = new ThumbnailRunner("thumbnailRunner.log",
        Global.getDatabaseUrl(), Global.getIndexDatabaseUrl(), Global.getResourceDatabaseUrl(),
        Global.getDatabaseUserid(), Global.getDatabaseUserPassword(), Global.cipherPassword);
    thumbnailThread = new QThread(thumbnailRunner, "Thumbnail Thread");
    thumbnailRunner.noteSignal.thumbnailPageReady.connect(this, "thumbnailHTMLReady(String,QByteArray,Integer)");
    thumbnailThread.start();
    thumbGenerators = new ArrayList<Thumbnailer>();
    thumbnailTimer = new QTimer();
    thumbnailTimer.timeout.connect(this, "thumbnailTimer()");
View Full Code Here


     notebookCounterRunner = new CounterRunner("notebook_counter.log", CounterRunner.NOTEBOOK,
             Global.getDatabaseUrl(), Global.getIndexDatabaseUrl(), Global.getResourceDatabaseUrl(),
             Global.getDatabaseUserid(), Global.getDatabaseUserPassword(), Global.cipherPassword);
     notebookCounterRunner.setNoteIndex(getNoteIndex());
     notebookCounterRunner.notebookSignal.countsChanged.connect(this, "setNotebookCounter(List)");
    notebookThread = new QThread(notebookCounterRunner, "Notebook Counter Thread");
    notebookThread.start();
   
     tagSignal = new TagSignal();
     tagCounterRunner = new CounterRunner("tag_counter.log", CounterRunner.TAG,
         Global.getDatabaseUrl(), Global.getIndexDatabaseUrl(), Global.getResourceDatabaseUrl(),
         Global.getDatabaseUserid(), Global.getDatabaseUserPassword(), Global.cipherPassword);
     tagCounterRunner.setNoteIndex(getNoteIndex());
     tagCounterRunner.tagSignal.countsChanged.connect(this, "setTagCounter(List)");
    tagThread = new QThread(tagCounterRunner, "Tag Counter Thread");
    tagThread.start();
   
     trashSignal = new TrashSignal();
     trashCounterRunner = new CounterRunner("trash_counter.log", CounterRunner.TRASH,
         Global.getDatabaseUrl(), Global.getIndexDatabaseUrl(), Global.getResourceDatabaseUrl(),
         Global.getDatabaseUserid(), Global.getDatabaseUserPassword(), Global.cipherPassword);
     trashCounterRunner.trashSignal.countChanged.connect(this, "trashSignalReceiver(Integer)");
    trashThread = new QThread(trashCounterRunner, "Trash Counter Thread");
    trashThread.start();
//     reloadTrashCount();
    
    wordMap = new HashMap<String, String>();
    tagSignal = new TagSignal();
   
    logger.log(logger.EXTREME, "Setting save thread");
    saveRunner = new SaveRunner("saveRunner.log",
        Global.getDatabaseUrl(), Global.getIndexDatabaseUrl(), Global.getResourceDatabaseUrl(),
        Global.getDatabaseUserid(), Global.getDatabaseUserPassword(), Global.cipherPassword);
    saveThread = new QThread(saveRunner, "Save Runner Thread");
    saveThread.start();
   
//    thumbnailList = conn.getNoteTable().getThumbnails();
//    thumbnailList = new HashMap<String,QImage>();
   
View Full Code Here

   * This creates new thread runner for solver thread and connects its
   * events with sweeper logic.
   * @return New thread runner for the solver thread.
   */
  QThread createSolverThreadRunner() {
    QThread threadRunner = new QThread(mSolverThread);
   
    threadRunner.starting.connect(this, "onSolverThreadStart()");
    threadRunner.finished.connect(this, "onSolverThreadFinish()");
   
    return threadRunner;
View Full Code Here

   */
  void runSolver() {
    mSolverThread.setMode(MineSolverThread.MODE.SOLVE_ONLY);
    mSolverThread.setContent(mRealMinefield, mViewedMinefield, mSolver);

    QThread threadRunner = createSolverThreadRunner();
    threadRunner.start();
  }
View Full Code Here

      // prepare the thread data
      mSolverThread.setMode(MineSolverThread.MODE.SOLVE_AND_REVEAL);
      mSolverThread.setContent(mRealMinefield, mViewedMinefield, mSolver);

      // create new thread runner
      QThread threadRunner = createSolverThreadRunner();
      threadRunner.finished.connect(this, "startNextMeasuring()");

      // remember the initial conditions
      mLastMeasureStartTime = System.currentTimeMillis();

      MinesUtils.MineSweeperData data = new MinesUtils.MineSweeperData();
      data.mRealContent = mRealMinefield;
      data.mViewedContent = mViewedMinefield;

      mLastMeasuredData = new MeasurrerData();
      mLastMeasuredData.mSweeperData = data;

      // run the measurement
      threadRunner.start();
    }   
View Full Code Here

TOP

Related Classes of com.trolltech.qt.QThread

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.