void Timer::updateTimers() { for (std::list<InternalTimer *>::iterator i = m_lstTimers.begin(); i != m_lstTimers.end(); ++i) { InternalTimer *pTimer = *i; if (GetTickCount() > pTimer->dwNextTick) { onTimer((DWORD) pTimer, pTimer->pUserData); if (pTimer->iRepeatsLeft - 1 == 0) { delete pTimer; i = m_lstTimers.erase(i); if (i == m_lstTimers.end()) break; } else { if (pTimer->iRepeatsLeft > 0) --pTimer->iRepeatsLeft; pTimer->dwNextTick += pTimer->dwInterval; } } } }
void QueryConnectionDialog::onMessageRecieved(UINT uMsg, WPARAM wParam, LPARAM lParam) { if (uMsg == WM_TIMER) { onTimer(); } }
bool TimingTaskDlg::DlgProc(UINT message, WPARAM wParam, LPARAM lParam, LRESULT* lResult) { HWND hWnd = m_hWnd; switch (message) { case WM_COMMAND: { int wmId, wmEvent; wmId = LOWORD(wParam); wmEvent = HIWORD(wParam); // 分析菜单选择: switch (wmId) { case IDOK: { onBtnOk(); break; } case ID_CancelTask: { resetState(); break; } case IDCANCEL: { close(); break; } case IDC_RADIO_FixTime: case IDC_RADIO_COUNTDOWN: case IDC_RADIO_RepeatYes: case IDC_RADIO_RepeatNo: { setHourState(); break; } default: break; } break; } case WM_TIMER: { onTimer(message, wParam, lParam); break; } case WM_CLOSE: { close(); *lResult = TRUE; return true; } case WM_INITDIALOG: { m_hRadioCountDown = GetDlgItem(m_hWnd, IDC_RADIO_COUNTDOWN); m_hRadioFixTime = GetDlgItem(m_hWnd, IDC_RADIO_FixTime); m_hEditHour = GetDlgItem(m_hWnd, IDC_EDIT_HOUR); m_hEditMin = GetDlgItem(m_hWnd, IDC_EDIT_MIN); m_hEditSec = GetDlgItem(m_hWnd, IDC_EDIT_SEC); m_hRadioRepeatYes = GetDlgItem(m_hWnd, IDC_RADIO_RepeatYes); m_hRadioRepeatNo = GetDlgItem(m_hWnd, IDC_RADIO_RepeatNo); m_hEditBoxText = GetDlgItem(m_hWnd, IDC_EDIT_TaskBoxText); m_hStaRemainTime = GetDlgItem(m_hWnd, IDC_STATIC_RemainTime); m_hBtnCancelTask = GetDlgItem(m_hWnd, ID_CancelTask); m_hBtnOK = GetDlgItem(m_hWnd, IDOK); initControl(); break; } default: break; } return __super::DlgProc(message, wParam, lParam, lResult); }
CWinMain::CWinMain( QWidget* parent ) : QMainWindow( parent ), ui( new Ui::CWinMain ) { ui->setupUi( this ); //Initialize vaiables bypassCloseEvent = false; interfaceLoaded = false; ui->actionAres->setChecked( quazaaSettings.Ares.Enable ); ui->actionEDonkey->setChecked( quazaaSettings.EDonkey.Enable ); ui->actionGnutella2->setChecked( quazaaSettings.Gnutella2.Enable ); //Load And Set Up User Interface quazaaSettings.loadWindowSettings( this ); restoreState( quazaaSettings.WinMain.MainToolbar ); //Set up the status bar labelIPAddress = new QLabel( tr( "Current IP:" ) ); ui->statusbar->addWidget( labelIPAddress ); labelCurrentIPAddress = new QLabel( tr( "Unknown" ) ); ui->statusbar->addWidget( labelCurrentIPAddress ); toolButtonAddressToClipboard = new QToolButton( this ); toolButtonAddressToClipboard->setText( tr( "Copy Address" ) ); toolButtonAddressToClipboard->setAutoRaise( true ); connect( toolButtonAddressToClipboard, SIGNAL( clicked() ), this, SLOT( onCopyIP() ) ); ui->statusbar->addWidget( toolButtonAddressToClipboard ); tcpFirewalled = ":/Resource/Network/ShieldRed.png"; udpFirewalled = ":/Resource/Network/ShieldRed.png"; labelFirewallStatus = new QLabel( tr( "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\"> <html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">p, li { white-space: pre-wrap; }</style></head><body style=\" font-family:'Segoe UI'; font-size:10pt; font-weight:400; font-style:normal;\"><p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">TCP: <img src=\":/Resource/Network/ShieldRed.png\" /> UDP: <img src=\":/Resource/Network/ShieldRed.png\" /></p></body></html>" ) ); ui->statusbar->addPermanentWidget( labelFirewallStatus ); labelBandwidthTotals = new QLabel(); ui->statusbar->addPermanentWidget( labelBandwidthTotals ); //Add the tabs pageHome = new CWidgetHome(); ui->stackedWidgetMain->addWidget( pageHome ); pageLibrary = new CWidgetLibrary(); ui->stackedWidgetMain->addWidget( pageLibrary ); pageMedia = new CWidgetMedia(); ui->stackedWidgetMain->addWidget( pageMedia ); pageSearch = new WidgetSearch(); ui->stackedWidgetMain->addWidget( pageSearch ); pageTransfers = new CWidgetTransfers(); ui->stackedWidgetMain->addWidget( pageTransfers ); pageSecurity = new CWidgetSecurity(); ui->stackedWidgetMain->addWidget( pageSecurity ); pageActivity = new WidgetActivity(); ui->stackedWidgetMain->addWidget( pageActivity ); pageIrcMain = new CWidgetIrcMain(); ui->stackedWidgetMain->addWidget( pageIrcMain ); pageHostCache = new WidgetHostCache; ui->stackedWidgetMain->addWidget( pageHostCache ); pageDiscovery = new CWidgetDiscovery; ui->stackedWidgetMain->addWidget( pageDiscovery ); pageScheduler = new CWidgetScheduler; ui->stackedWidgetMain->addWidget( pageScheduler ); pageGraph = new CWidgetGraph; ui->stackedWidgetMain->addWidget( pageGraph ); pagePacketDump = new CWidgetPacketDump; ui->stackedWidgetMain->addWidget( pagePacketDump ); pageSearchMonitor = new CWidgetSearchMonitor; ui->stackedWidgetMain->addWidget( pageSearchMonitor ); pageHitMonitor = new CWidgetHitMonitor; ui->stackedWidgetMain->addWidget( pageHitMonitor ); dlgPrivateMessages = 0; // Set up the navigation toolbar actionGroupMainNavigation = new QActionGroup( this ); actionGroupMainNavigation->addAction( ui->actionHome ); actionGroupMainNavigation->addAction( ui->actionLibrary ); actionGroupMainNavigation->addAction( ui->actionMedia ); actionGroupMainNavigation->addAction( ui->actionSearch ); actionGroupMainNavigation->addAction( ui->actionTransfers ); actionGroupMainNavigation->addAction( ui->actionSecurity ); actionGroupMainNavigation->addAction( ui->actionActivity ); actionGroupMainNavigation->addAction( ui->actionChat ); actionGroupMainNavigation->addAction( ui->actionHostCache ); actionGroupMainNavigation->addAction( ui->actionDiscovery ); actionGroupMainNavigation->addAction( ui->actionScheduler ); actionGroupMainNavigation->addAction( ui->actionGraph ); actionGroupMainNavigation->addAction( ui->actionPacketDump ); actionGroupMainNavigation->addAction( ui->actionSearchMonitor ); actionGroupMainNavigation->addAction( ui->actionHitMonitor ); ui->stackedWidgetMain->setCurrentIndex( quazaaSettings.WinMain.ActiveTab ); switch ( quazaaSettings.WinMain.ActiveTab ) { case 0: ui->actionHome->setChecked( true ); break; case 1: ui->actionLibrary->setChecked( true ); break; case 2: ui->actionMedia->setChecked( true ); break; case 3: ui->actionSearch->setChecked( true ); pageSearch->focusSearchInput(); break; case 4: ui->actionTransfers->setChecked( true ); break; case 5: ui->actionSecurity->setChecked( true ); break; case 6: ui->actionActivity->setChecked( true ); break; case 7: ui->actionChat->setChecked( true ); break; case 8: ui->actionHostCache->setChecked( true ); break; case 9: ui->actionDiscovery->setChecked( true ); break; case 10: ui->actionScheduler->setChecked( true ); break; case 11: ui->actionGraph->setChecked( true ); break; case 12: ui->actionPacketDump->setChecked( true ); break; case 13: ui->actionSearchMonitor->setChecked( true ); break; case 14: ui->actionHitMonitor->setChecked( true ); break; default: ui->actionHome->setChecked( true ); break; } connect( ui->actionNewSearch, SIGNAL( triggered() ), pageSearch, SLOT( on_toolButtonNewSearch_clicked() ) ); connect( pageHome, SIGNAL( requestSearch( QString* ) ), this, SLOT( startNewSearch( QString* ) ) ); connect( pageHome, SIGNAL( triggerLibrary() ), this, SLOT( on_actionLibrary_triggered() ) ); connect( pageHome, SIGNAL( triggerSecurity() ), this, SLOT( on_actionSecurity_triggered() ) ); connect( pageHome, SIGNAL( triggerTransfers() ), this, SLOT( on_actionTransfers_triggered() ) ); neighboursRefresher = new QTimer( this ); connect( neighboursRefresher, SIGNAL( timeout() ), this, SLOT( updateStatusBar() ) ); connect( neighboursRefresher, SIGNAL( timeout() ), pageActivity->panelNeighbours, SLOT( onTimer() ) ); update(); qApp->processEvents(); interfaceLoaded = true; connect( &chatCore, SIGNAL( openChatWindow( ChatSession* ) ), this, SLOT( OpenChat( ChatSession* ) ) ); connect( &networkG2, SIGNAL( localAddressChanged() ), this, SLOT( localAddressChanged() ) ); connect( &shareManager, SIGNAL( hasherStarted( int ) ), this, SLOT( onHasherStarted( int ) ) ); setSkin(); }
void MainWindow::onLancerThreads() { // instanciation des objets threads de lecture des mesures T_Mes *data = (T_Mes *)mShm->data(); mNbMesure=0; for(int i=0 ; i<10 ; i++) { bool inconnu=true; // le capteur par défaut n'est pas reconnu if (!strncmp(data->nomClasse, "CCapteurI2cLm76_Temp", sizeof("CCapteurI2cLm76_Temp"))) { qDebug("Capteur LM76 Temp reconnu !"); mCapteurs.append(new CCapteurI2cLm76_Temp(this, data->noMes, data->adrCapteur)); // le thread est créé mais n'est pas lancé connect(this, SIGNAL(arretThreadsCapteur()), (CCapteurI2cLm76_Temp *)mCapteurs.at(i), SLOT(stop())); mCapteurs.at(i)->start(); // lancement du thread, les mesures se mettent en mémoire inconnu = false; // la mesure est connue mNbMesure++; } // if LM76 if (!strncmp(data->nomClasse, "CCapteurI2cHmc5883_Comp", sizeof("CCapteurI2cHmc5883_Comp"))) { qDebug("Capteur Compas HMC5883 reconnu !"); mCapteurs.append(new CCapteurI2cHmc5883_Comp(this, data->noMes, data->adrCapteur)); // le thread est créé mais n'est pas lancé connect(this, SIGNAL(arretThreadsCapteur()), (CCapteurI2cHmc5883_Comp *)mCapteurs.at(i), SLOT(stop())); mCapteurs.at(i)->start(); // lancement du thread inconnu = false; // la mesure est connue mNbMesure++; } // if 5883 if (!strncmp(data->nomClasse, "CCapteurI2cHtu21d_HumTemp", sizeof("CCapteurI2cHtu21d_HumTemp"))) { qDebug("Capteur Humidité et température HTU21D reconnu !"); mCapteurs.append(new CCapteurI2cHtu21d_HumTemp(this, data->noMes, data->adrCapteur)); // le thread est créé mais n'est pas lancé connect(this, SIGNAL(arretThreadsCapteur()), (CCapteurI2cHtu21d_HumTemp *)mCapteurs.at(i), SLOT(stop())); mCapteurs.at(i)->start(); // lancement du thread inconnu = false; // la mesure est connue mNbMesure++; } // if 5883 if (!strncmp(data->nomClasse, "CCapteurGpioPing_Dist", sizeof("CCapteurGpioPing_Dist"))) { qDebug("Capteur de distance reconnu !"); mCapteurs.append(new CCapteurGpioPing_Dist(this, data->noMes, data->adrCapteur)); // le thread est créé mais n'est pas lancé connect(this, SIGNAL(arretThreadsCapteur()), (CCapteurGpioPing_Dist *)mCapteurs.at(i), SLOT(stop())); mCapteurs.at(i)->start(); // lancement du thread inconnu = false; // la mesure est connue mNbMesure++; } // if Ping if (!strncmp(data->nomClasse, "CCapteurSerialGps", sizeof("CCapteurSerialGps"))) { qDebug("Capteur GPS reconnu !"); mCapteurs.append(new CCapteurSerialGps(this, "/dev/ttyAMA0", data->noMes, 9600, 'N', 8)); // le thread est créé mais n'est pas lancé connect(this, SIGNAL(arretThreadsCapteur()), (CCapteurSerialGps *)mCapteurs.at(i), SLOT(stop())); mCapteurs.at(i)->start(); // lancement du thread inconnu = false; // la mesure est connue mNbMesure++; } // if GPS // TO DO Here : autre définition de capteur if (inconnu==true) qDebug() << "MainWindow: Pas de mesure à cette position ou mauvais capteur ! Position : " << i; data++; // on passe à l'espace mémoire suivant } // for // lancement du timer de mise à jour des mesures dans l'IHM de l'EDD // optionnel !!! seulement pour test mTimer = new QTimer(this); mTimer->setInterval(500); connect(mTimer, SIGNAL(timeout()), this, SLOT(onTimer())); mTimer->start(); // creation de l'objet incrustation mCInc = new CIncruster(this, mMsg, 1000); // 1000ms d'actualisation de l'incrustation connect(mMsg, SIGNAL(mailReady(long)), mCInc, SLOT(onMessReady(long))); } // onTimer
// virtual void BoffinRqlRequest::issuePoll(unsigned msDelay) { QTimer::singleShot(msDelay, this, SLOT(onTimer())); }
void SceniXQGLSceneRendererWidget::timerEvent( QTimerEvent * event ) { onTimer( getElapsedTime() ); }
unsigned int __stdcall Thread_Update_Message(void *data) { unsigned int counter = TIMER_START_VALUE; while(1) { uint64 vehicleId; messageProcessClass updateMessage; //wait for dataBase access thread to get modificaiton signal WaitForSingleObject(g_readySema_readDb,INFINITE); if(!databaseQueue_gp->empty()) { int idx; diffRptMsg_t* updateMsgPtr; databaseQueue_gp->front(&updateMessage); databaseQueue_gp->pop(); updateMsgPtr = updateMessage.getUpdateRptMsg(); updateMessage.getVehicleIDInMsg((uint32*)&updateMessage,&vehicleId); sendMsgLen[counter - TIMER_START_VALUE] = 0; bool timeFlag = false; switch(updateMsgPtr->msgHeader.msgTypeID) { case STATUS_UPDATE_RPT_MSG: { updateMessage.setMsgHeader((uint32*)updateMsgPtr,STATUS_UPDATE_RPT_MSG,vehicleId,lowLevel_e,updateMsgPtr->msgHeader.length,updateMsgPtr->msgHeader.numPDUs); updateMessage.packedStatusRptMsg((uint32*)sendBuff[counter - TIMER_START_VALUE]); sendMsgLen[counter - TIMER_START_VALUE] = sendMsgLen[counter - TIMER_START_VALUE] + sizeof(diffMsgHeader_t) + updateMsgPtr->msgHeader.numPDUs*4; timeFlag = true; } break; case DIFF_RPT_MSG: { updateMessage.setMsgHeader((uint32*)updateMsgPtr,UPDATE_REQ_MSG,vehicleId,lowLevel_e,updateMsgPtr->msgHeader.length,updateMsgPtr->msgHeader.numPDUs); updateMessage.packedUpdateRptMsg((uint32*)sendBuff[counter - TIMER_START_VALUE]); for(idx = 0;idx < updateMsgPtr->msgHeader.numPDUs;idx++) { diffRptPduHeader_t pduMsg = updateMsgPtr->payloadHeader.pduHeader[idx]; sendMsgLen[counter - TIMER_START_VALUE] += 8; switch(pduMsg.pduType) { case furnitureElement_e: case furnitureSign_e: //updateMessage.setUpdateRptPduFntHeader(pduCounter,pduMsg.pduDiffTypeHeader.fntHeader.segMentID,pduMsgPtr.pduDiffTypeHeader.fntHeader.furnitureID); sendMsgLen[counter - TIMER_START_VALUE] += 8; break; case vectorElement_e: //updateMessage.setUpdateRptPduVectorHeader(pduCounter,pduMsgPtr.pduDiffTypeHeader.vectorHeader.segMentID,pduMsgPtr.pduDiffTypeHeader.vectorHeader.vectorID); sendMsgLen[counter - TIMER_START_VALUE] += 8; break; case dynamicData_e: break; //default: //printf("PDU type is:%d\n",pduMsg.pduType); } } sendMsgLen[counter - TIMER_START_VALUE] = sendMsgLen[counter - TIMER_START_VALUE] + sizeof(diffMsgHeader_t) + updateMsgPtr->msgHeader.length; timeFlag = true; } break; case UPDATE_REQ_MSG: char sendTempBuff[SEND_MAX_BYTE_NUM]; int sendLen = 8; updateMessage.packedUpdateRptMsg((uint32*)sendTempBuff); diffRptPduHeader_t pduMsg = updateMsgPtr->payloadHeader.pduHeader[0]; sendLen += (sizeof(diffMsgHeader_t) + updateMsgPtr->msgHeader.length + updateMsgPtr->msgHeader.numPDUs*8);//8 = sizeof(pduType + operate + pduOffset) list<portToVehi_t>::iterator portListIdx = portToVehiList.begin(); SOCKADDR_IN toAddr; bool existVehiIdFlag = false; while(portListIdx != portToVehiList.end()) { if(portListIdx->vehicleId == vehicleId) { toAddr = portListIdx->client; existVehiIdFlag = true; break; } } if(!existVehiIdFlag) { logPrintf(logLevelError_e,"UPDATE_MSG","not find this vehicle port!"); } else { int sendRet = sendto(sockClient,sendTempBuff,sendLen,0,(SOCKADDR*)&toAddr,sizeof(struct sockaddr)); if ((sendRet == INVALID_SOCKET)|| (sendRet == 0)) { logPrintf(logLevelError_e,"UPDATE_MSG","Send message to client failed!"); } else { logPrintf(logLevelInfo_e,"UPDATE_MSG","<<<< Send message to client OK"); } } break; } // start a time to delay the update message for demo if(timeFlag) { onTimer(counter++); //glutTimerFunc((unsigned int)(TIMER_INTERVAL),&onTimer,counter++); if(counter >= TIMER_NUMBER) { counter = TIMER_START_VALUE; } } } } return 0; }
SharedPainter::SharedPainter(CSharedPainterScene *canvas, QWidget *parent, Qt::WFlags flags) : QMainWindow(parent, flags), canvas_(canvas), currPaintItemId_(1), currPacketId_(-1), resizeFreezingFlag_(false), screenShotMode_(false), wroteProgressBar_(NULL) { ui.setupUi(this); ui.painterView->setScene( canvas ); canvas_->setEvent( this ); SharePaintManagerPtr()->registerObserver( this ); SharePaintManagerPtr()->setCanvas( canvas_ ); QMenuBar *menuBar = ui.menuBar; // Create Menu bar item { // File Menu QMenu* file = new QMenu( "&File", menuBar ); file->addAction( "&Connect", this, SLOT(actionConnect()), Qt::CTRL+Qt::Key_N ); file->addAction( "&Broadcast Channel", this, SLOT(actionBroadcastChannel()), Qt::CTRL+Qt::Key_H ); QMenu* broadCastTypeMenu = file->addMenu( "BroadCast Type" ); broadCastTypeMenu->addAction( "&Server", this, SLOT(actionServerType()), Qt::CTRL+Qt::Key_1 ); broadCastTypeMenu->addAction( "&Client", this, SLOT(actionClientType()), Qt::CTRL+Qt::Key_2 ); file->addSeparator(); file->addAction( "E&xit", this, SLOT(actionExit()), Qt::CTRL+Qt::Key_Q ); menuBar->addMenu( file ); // Edit Menu QMenu* edit = new QMenu( "&Edit", menuBar ); QMenu* penMenu = edit->addMenu( "Pen Setting" ); penMenu->addAction( "Pen &Width", this, SLOT(actionPenWidth()), Qt::CTRL+Qt::Key_V ); penMenu->addAction( "Pen &Color", this, SLOT(actionPenColor()), Qt::CTRL+Qt::Key_C ); penModeAction_ = edit->addAction( "Pen Mode", this, SLOT(actionPenMode()), Qt::CTRL+Qt::Key_A ); penModeAction_->setCheckable( true ); edit->addAction( "&Text", this, SLOT(actionAddText()), Qt::Key_Enter|Qt::Key_Return ); edit->addAction( "&Screen Shot", this, SLOT(actionScreenShot()), Qt::CTRL+Qt::Key_S ); edit->addSeparator(); edit->addAction( "Clear &Background Image", this, SLOT(actionClearBGImage()), Qt::CTRL+Qt::Key_B ); edit->addAction( "Cl&ear Screen", this, SLOT(actionClearScreen()), Qt::CTRL+Qt::Key_X ); edit->addSeparator(); edit->addAction( "&Undo", this, SLOT(actionUndo()), Qt::CTRL+Qt::Key_Z ); menuBar->addMenu( edit ); } // create status bar { statusBarLabel_ = new QLabel(); broadCastTypeLabel_ = new QLabel(); joinerCountLabel_ = new QLabel(); wroteProgressBar_ = new QProgressBar(); ui.statusBar->addPermanentWidget( broadCastTypeLabel_ ); ui.statusBar->addPermanentWidget( joinerCountLabel_, 1 ); ui.statusBar->addPermanentWidget( wroteProgressBar_ ); ui.statusBar->addPermanentWidget( statusBarLabel_ ); setStatusBar_Network( tr("Not Connected") ); setStatusBar_BroadCastType( tr("None Type") ); setStatusBar_JoinerCnt( 1 ); // my self } ui.painterView->setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff ); ui.painterView->setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOff ); setCursor( Qt::ArrowCursor ); // Pen mode activated.. penModeAction_->setChecked( true ); actionPenMode(); // Key Hooking Timer keyHookTimer_ = new QTimer(this); keyHookTimer_->start(20); connect(keyHookTimer_, SIGNAL(timeout()),this, SLOT(onTimer())); installEventFilter(this); // Title QString orgTitle = windowTitle(); QString newTitle = orgTitle; newTitle += " Ver "; newTitle += VERSION_TEXT; newTitle += ", "; newTitle += AUTHOR_TEXT; setWindowTitle( newTitle ); }
void SmHwBattery::onWake(uint32_t wakeSource) { ADC1->CR2 |= ADC_CR2_ADON; mMeasStep = 0; onTimer(0); }
WinMain::WinMain(QWidget* parent) : QMainWindow(parent), ui(new Ui::WinMain) { ui->setupUi(this); //Initialize vaiables bypassCloseEvent = false; interfaceLoaded = false; ui->actionAres->setChecked(quazaaSettings.Ares.Enable); ui->actionEDonkey->setChecked(quazaaSettings.EDonkey.Enable); ui->actionGnutella2->setChecked(quazaaSettings.Gnutella2.Enable); //Load And Set Up User Interface quazaaSettings.loadWindowSettings(this); restoreState(quazaaSettings.WinMain.MainToolbar); //Set up the menu toolbar ui->toolBarMainMenu->addWidget(ui->menubarMain); //Set up the status bar tcpFirewalled = ":/Resource/Network/ShieldRed.png"; udpFirewalled = ":/Resource/Network/ShieldRed.png"; labelFirewallStatus = new QLabel(tr("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\"> <html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">p, li { white-space: pre-wrap; }</style></head><body style=\" font-family:'Segoe UI'; font-size:10pt; font-weight:400; font-style:normal;\"><p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">TCP: <img src=\":/Resource/Network/ShieldRed.png\" /> UDP: <img src=\":/Resource/Network/ShieldRed.png\" /></p></body></html>")); ui->statusbar->addPermanentWidget(labelFirewallStatus); labelBandwidthTotals = new QLabel(); ui->statusbar->addPermanentWidget(labelBandwidthTotals); //Add the tabs pageHome = new WidgetHome(); ui->stackedWidgetMain->addWidget(pageHome); pageLibrary = new WidgetLibrary(); ui->stackedWidgetMain->addWidget(pageLibrary); pageMedia = new WidgetMedia(); ui->stackedWidgetMain->addWidget(pageMedia); pageSearch = new WidgetSearch(); ui->stackedWidgetMain->addWidget(pageSearch); pageTransfers = new WidgetTransfers(); ui->stackedWidgetMain->addWidget(pageTransfers); pageSecurity = new WidgetSecurity(); ui->stackedWidgetMain->addWidget(pageSecurity); pageActivity = new WidgetActivity(); ui->stackedWidgetMain->addWidget(pageActivity); pageChat = new WidgetChat(); ui->stackedWidgetMain->addWidget(pageChat); pageHostCache = new WidgetHostCache; ui->stackedWidgetMain->addWidget(pageHostCache); pageDiscovery = new WidgetDiscovery; ui->stackedWidgetMain->addWidget(pageDiscovery); pageScheduler = new WidgetScheduler; ui->stackedWidgetMain->addWidget(pageScheduler); pageGraph = new WidgetGraph; ui->stackedWidgetMain->addWidget(pageGraph); pagePacketDump = new WidgetPacketDump; ui->stackedWidgetMain->addWidget(pagePacketDump); pageSearchMonitor = new WidgetSearchMonitor; ui->stackedWidgetMain->addWidget(pageSearchMonitor); pageHitMonitor = new WidgetHitMonitor; ui->stackedWidgetMain->addWidget(pageHitMonitor); dlgPrivateMessages = 0; // Set up the navigation toolbar actionGroupMainNavigation = new QActionGroup(this); actionGroupMainNavigation->addAction(ui->actionHome); actionGroupMainNavigation->addAction(ui->actionLibrary); actionGroupMainNavigation->addAction(ui->actionMedia); actionGroupMainNavigation->addAction(ui->actionSearch); actionGroupMainNavigation->addAction(ui->actionTransfers); actionGroupMainNavigation->addAction(ui->actionSecurity); actionGroupMainNavigation->addAction(ui->actionActivity); actionGroupMainNavigation->addAction(ui->actionChat); actionGroupMainNavigation->addAction(ui->actionHostCache); actionGroupMainNavigation->addAction(ui->actionDiscovery); actionGroupMainNavigation->addAction(ui->actionScheduler); actionGroupMainNavigation->addAction(ui->actionGraph); actionGroupMainNavigation->addAction(ui->actionPacketDump); actionGroupMainNavigation->addAction(ui->actionSearchMonitor); actionGroupMainNavigation->addAction(ui->actionHitMonitor); ui->stackedWidgetMain->setCurrentIndex(quazaaSettings.WinMain.ActiveTab); switch(quazaaSettings.WinMain.ActiveTab) { case 0: ui->labelMainHeaderLogo->setPixmap(QPixmap(":/Resource/Generic/Home.png")); ui->labelMainHeaderText->setText(tr("Quazaa Home")); ui->actionHome->setChecked(true); break; case 1: ui->labelMainHeaderLogo->setPixmap(QPixmap(":/Resource/Library/Library.png")); ui->labelMainHeaderText->setText(tr("Library")); ui->actionLibrary->setChecked(true); break; case 2: ui->labelMainHeaderLogo->setPixmap(QPixmap(":/Resource/Media/Media.png")); ui->labelMainHeaderText->setText(tr("Media")); ui->actionMedia->setChecked(true); break; case 3: ui->labelMainHeaderLogo->setPixmap(QPixmap(":/Resource/Generic/Search.png")); ui->labelMainHeaderText->setText(tr("Search")); ui->actionSearch->setChecked(true); break; case 4: ui->labelMainHeaderLogo->setPixmap(QPixmap(":/Resource/Generic/Transfers.png")); ui->labelMainHeaderText->setText(tr("Transfers")); ui->actionTransfers->setChecked(true); break; case 5: ui->labelMainHeaderLogo->setPixmap(QPixmap(":/Resource/Security/Security.png")); ui->labelMainHeaderText->setText(tr("Security")); ui->actionSecurity->setChecked(true); break; case 6: ui->labelMainHeaderLogo->setPixmap(QPixmap(":/Resource/Generic/Globe.png")); ui->labelMainHeaderText->setText(tr("Activity")); ui->actionActivity->setChecked(true); break; case 7: ui->labelMainHeaderLogo->setPixmap(QPixmap(":/Resource/Chat/Chat.png")); ui->labelMainHeaderText->setText(tr("Chat")); ui->actionChat->setChecked(true); break; case 8: ui->labelMainHeaderLogo->setPixmap(QPixmap(":/Resource/Network/HostCache.png")); ui->labelMainHeaderText->setText(tr("Host Cache")); ui->actionHostCache->setChecked(true); break; case 9: ui->labelMainHeaderLogo->setPixmap(QPixmap(":/Resource/Network/Discovery.png")); ui->labelMainHeaderText->setText(tr("Discovery")); ui->actionDiscovery->setChecked(true); break; case 10: ui->labelMainHeaderLogo->setPixmap(QPixmap(":/Resource/Generic/Scheduler.png")); ui->labelMainHeaderText->setText(tr("Scheduler")); ui->actionScheduler->setChecked(true); break; case 11: ui->labelMainHeaderLogo->setPixmap(QPixmap(":/Resource/Generic/Graph.png")); ui->labelMainHeaderText->setText(tr("Graph")); ui->actionGraph->setChecked(true); break; case 12: ui->labelMainHeaderLogo->setPixmap(QPixmap(":/Resource/Network/PacketDump.png")); ui->labelMainHeaderText->setText(tr("Packet Dump")); ui->actionPacketDump->setChecked(true); break; case 13: ui->labelMainHeaderLogo->setPixmap(QPixmap(":/Resource/Network/SearchMonitor.png")); ui->labelMainHeaderText->setText(tr("Search Monitor")); ui->actionSearchMonitor->setChecked(true); break; case 14: ui->labelMainHeaderLogo->setPixmap(QPixmap(":/Resource/Network/HitMonitor.png")); ui->labelMainHeaderText->setText(tr("Hit Monitor")); ui->actionHitMonitor->setChecked(true); break; default: ui->labelMainHeaderLogo->setPixmap(QPixmap(":/Resource/Generic/Home.png")); ui->labelMainHeaderText->setText(tr("Quazaa Home")); ui->actionHome->setChecked(true); break; } ui->menubarMain->setStyleSheet("QMenuBar::item:!selected, QMenuBar::item:!pressed { color: " + qApp->palette().buttonText().color().name() + "; background: transparent; }"); connect(ui->actionNewSearch, SIGNAL(triggered()), pageSearch, SLOT(on_toolButtonNewSearch_clicked())); connect(pageHome, SIGNAL(requestSearch(QString*)), this, SLOT(startNewSearch(QString*))); connect(pageHome, SIGNAL(triggerLibrary()), this, SLOT(on_actionLibrary_triggered())); connect(pageHome, SIGNAL(triggerSecurity()), this, SLOT(on_actionSecurity_triggered())); connect(pageHome, SIGNAL(triggerTransfers()), this, SLOT(on_actionTransfers_triggered())); neighboursRefresher = new QTimer(this); connect(neighboursRefresher, SIGNAL(timeout()), this, SLOT(updateStatusBar())); connect(neighboursRefresher, SIGNAL(timeout()), pageActivity->panelNeighbours, SLOT(onTimer())); update(); qApp->processEvents(); interfaceLoaded = true; connect(&ChatCore, SIGNAL(openChatWindow(CChatSession*)), this, SLOT(OpenChat(CChatSession*))); }
bool ViewerWindow::onMessage(UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { case WM_SIZING: m_sizeIsChanged = true; return false; case WM_NCDESTROY: m_stopped = true; return true; case WM_USER_STOP: SendMessage(m_hWnd, WM_DESTROY, 0, 0); return true; case WM_USER_FS_WARNING: return onFsWarning(); case WM_CLOSE: return onClose(); case WM_DESTROY: return onDestroy(); case WM_CREATE: return onCreate((LPCREATESTRUCT)lParam); case WM_SIZE: return onSize(wParam, lParam); case WM_USER_AUTH_ERROR: return onAuthError(wParam); case WM_USER_ERROR: return onError(); case WM_USER_DISCONNECT: return onDisconnect(); case WM_ACTIVATE: if ((LOWORD(wParam) == WA_ACTIVE || LOWORD(wParam) == WA_CLICKACTIVE) && m_isFullScr) { try { // Registration of keyboard hook. m_winHooks.registerKeyboardHook(this); // Switching off ignoring win key. m_dsktWnd.setWinKeyIgnore(false); } catch (Exception &e) { m_logWriter.error(_T("%s"), e.getMessage()); } } else if (LOWORD(wParam) == WA_INACTIVE && m_isFullScr) { // Unregistration of keyboard hook. m_winHooks.unregisterKeyboardHook(this); // Switching on ignoring win key. m_dsktWnd.setWinKeyIgnore(true); } return true; case WM_SETFOCUS: return onFocus(wParam); case WM_ERASEBKGND: return onEraseBackground((HDC)wParam); case WM_KILLFOCUS: return onKillFocus(wParam); case WM_TIMER: return onTimer(wParam); case WM_DISPLAYCHANGE: adjustWindowSize(); } return false; }
int main(int argc, char *argv[]) { SDL_Event event; SDL_TimerID timer = 0; /* nacteni modelu */ polymodel = modLoad((argc == 2) ? argv[1] : DEFAULT_MODEL); IZG_CHECK(polymodel, "Failed to read input model"); /* vytvoreni default SW rendereru */ #ifdef USE_STUDENT_RENDERER renderer = studrenCreate(); #else renderer = renCreate(); #endif /* USE_STUDENT_RENDERER */ /* pocatecni velikost bufferu */ renderer->createBuffersFunc(renderer, DEFAULT_WIDTH, DEFAULT_HEIGHT); /* inicializace SDL knihovny */ if( SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER) == -1 ) { IZG_SDL_ERROR("Could not initialize SDL library"); } /* nastaveni titulku okna */ #ifdef USE_STUDENT_RENDERER SDL_WM_SetCaption(PROGRAM_TITLE_STUDENT, 0); #else SDL_WM_SetCaption(PROGRAM_TITLE, 0); #endif // USE_STUDENT_RENDERER /* screen */ screen = SDL_SetVideoMode(DEFAULT_WIDTH, DEFAULT_HEIGHT, 32, SDL_HWSURFACE | SDL_DOUBLEBUF | SDL_RESIZABLE); /* enable Unicode translation */ SDL_EnableUNICODE(1); /* dalsi inicializace */ onInit(renderer, polymodel); /* nastavime timer, ktery bude volat zadanou callback fci */ timer = SDL_AddTimer(TIMER_INTERVAL, timerCallback, NULL); /* kreslime dokud nenarazime na SDL_QUIT event */ while( !quit ) { /* vycteni udalosti */ while( SDL_PollEvent(&event) ) { switch( event.type ) { /* udalost klavesnice */ case SDL_KEYDOWN: onKeyboard(&event.key); break; /* zmena velikosti okna */ case SDL_VIDEORESIZE: onResize(&event.resize); break; /* udalost mysi - pohyb */ case SDL_MOUSEMOTION: onMouseMotion(&event.motion); break; /* udalost mysi - tlacitka */ case SDL_MOUSEBUTTONDOWN: case SDL_MOUSEBUTTONUP: onMouseButton(&event.button); break; /* tiknuti timeru */ case SDL_USEREVENT: if( event.user.code == IZG_TIMER_EVENT ) { onTimer((int)SDL_GetTicks()); } break; /* SDL_QUIT event */ case SDL_QUIT: quit = 1; break; default: break; } } /* vykresleni pres SDL knihovnu */ draw(); } /* ukonceni timeru */ SDL_RemoveTimer(timer); /* ukonceni SDL */ SDL_FreeSurface(screen); /* shutdown all SDL subsystems */ SDL_Quit(); /* zrusime co jsme vytvorili a ukoncime program */ modRelease(&polymodel); renderer->releaseFunc(&renderer); return 0; }
// enter here at loop scan rate, but action controlled by element timers, many flags bool ttMorse::mmsend( ) { if( !sending ) ttMorse::msendSet( ); // first time in, do setup // if( !eltOn && sending && (elementStart < millis( )) ) { if( !eltOn && sending && onTimer( ) ) { elementStart += 2*dotDur; // at least one dot duration and space if( getBit( ) ) { elementStart += 2*dotDur; // if element is dash, add two more } // if dash elementEnd = elementStart - dotDur; if( opinvert ) { digitalWrite( mlpin, LOW ); } else { digitalWrite( mlpin, HIGH ); } // send the element as level // if( toneon ) tone( mtpin, mtfreq ); // and as tone, if on if( toneon ) toneOn( ); // and as tone, if on eltOn = true; if( endCode ) { if( !prosign ) elementStart += 2*dotDur; // letter space cidx++; if( mstr[cidx] == '*' ) { prosign = !prosign; cidx++; } if( cidx >= tabsiz ) { lastelt = true; //str exhausted, prepare to stop when elt over prosign = false; // cancel possible isolated prosign entry } else { // codeChar = morseTable[(mstr[cidx]&0x7f)-0x20]; mtidx = ((mstr[cidx]-0x20)>0x3f) ? mstr[cidx]-0x40 : mstr[cidx]-0x20; codeChar = morseTable[mtidx]; if( codeChar == 0 ) { // word space(s) elementStart += 4*dotDur; // finish space started with last letter sendingsp = true; cidx++; if( mstr[cidx] == '*' ) { prosign = !prosign; cidx++; } if( cidx >= tabsiz ) { lastelt = true; prosign = false; } else { // codeChar = morseTable[(mstr[cidx]&0x7f)-0x20]; mtidx = ((mstr[cidx]-0x20)>0x3f) ? mstr[cidx]-0x40 : mstr[cidx]-0x20; codeChar = morseTable[mtidx]; while( codeChar == 0 ) { elementStart += 7*dotDur; // sendingsp = true; cidx++; if( cidx >= tabsiz ) { lastelt = true; break; //watch for trailing spaces } // codeChar = morseTable[(mstr[cidx]&0x7f)-0x20]; mtidx = ((mstr[cidx]-0x20)>0x3f) ? mstr[cidx]-0x40 : mstr[cidx]-0x20; codeChar = morseTable[mtidx]; } // while more word spaces } // if end table and spacing } // if word space setGetBit( ); endCode = false; } // if end of string } // if end of code character } // if elementStart if( eltOn && offTimer( ) ) { if( opinvert ) { digitalWrite( mlpin, HIGH ); } else { digitalWrite( mlpin, LOW ); } // end the element as level // noTone( mtpin ); // toneOff( mtpin ); toneOff( ); if( sendingsp ) { elementEnd = elementStart - dotDur; // 'element' continues for space(s) sendingsp = false; } else { eltOn = false; if( lastelt ) { sending = false; lastelt = false; } // if last elt finished } } // if end of element return sending; } // msend( )
// --------------------------------------------------------------------- LRESULT WinSkinWindow::wndProc( HWND hWnd, // ウィンドウハンドル UINT uMsg, // メッセージ WPARAM wParam, // メッセージの WPARAM LPARAM lParam // メッセージの LPARAM ) { LRESULT ret = 0; bool isProcessed = false; if (uiManager != NULL) { WinCCSAppearance* appearance = static_cast<WinCCSAppearance*>(uiManager->GetSkinAppearance()); if (appearance != NULL) { isProcessed = appearance->RelayWndProc(hWnd, uMsg, wParam, lParam, &ret); } } mousePositionAvailable = false; try { // ツールチップウィンドウへのリレー switch (uMsg) { case WM_LBUTTONDOWN: case WM_LBUTTONUP: case WM_MBUTTONDOWN: case WM_MBUTTONUP: case WM_MOUSEMOVE: case WM_RBUTTONDOWN: case WM_RBUTTONUP: { DWORD posVal; MSG msg; posVal = GetMessagePos(); msg.hwnd = hWnd; msg.message = uMsg; msg.wParam = wParam; msg.lParam = lParam; msg.time = GetMessageTime(); msg.pt.x = LOWORD(posVal); msg.pt.y = HIWORD(posVal); ::SendMessage(hToolTipWnd, TTM_RELAYEVENT, 0, reinterpret_cast<LPARAM>(&msg)); } break; } // 各メッセージのハンドリング switch (uMsg) { case WM_CREATE: return onCreate(hWnd, uMsg, wParam, lParam); break; case WM_DESTROY: return onDestroy(hWnd, uMsg, wParam, lParam); break; case WM_MOUSEMOVE: return onMouseMove(hWnd, uMsg, wParam, lParam); break; case WM_LBUTTONDOWN: return onLButtonDown(hWnd, uMsg, wParam, lParam); break; case WM_LBUTTONUP: return onLButtonUp(hWnd, uMsg, wParam, lParam); break; case WM_RBUTTONDOWN: return onRButtonDown(hWnd, uMsg, wParam, lParam); break; case WM_RBUTTONUP: return onRButtonUp(hWnd, uMsg, wParam, lParam); break; case WM_ACTIVATE: return onActivate(hWnd, uMsg, wParam, lParam); break; case UM_ACTIVATED: return onUMActivated(hWnd, uMsg, wParam, lParam); break; case WM_KEYUP: case WM_SYSKEYUP: return onKeyUp(hWnd, uMsg, wParam, lParam); break; case WM_TIMER: return onTimer(hWnd, uMsg, wParam, lParam); break; case UM_REREAD_SKIN: return onRereadSkin(hWnd, uMsg, wParam, lParam); break; case WM_COMMAND: return onCommand(hWnd, uMsg, wParam, lParam); break; default: if (isProcessed) { return ret; } else { return base::wndProc(hWnd, uMsg, wParam, lParam); } } } catch (Exception* ex) { ExceptionMessageUtils::DoExceptionMessageBox(CoveredCalcApp::GetInstance(), ex); ex->Delete(); } return 0; }
BlogEventView::BlogEventView(QWidget *parent, Qt::WindowFlags f) : QWidget(parent, f), m_eventId(-1) { m_editSubject = new QLineEdit(this); m_editLocation = new QLineEdit(this); m_dtEdit = new QDateTimeEdit(this); m_dtEdit->setDisplayFormat("MMMM d, yyyy, h:mm AP"); m_dtEdit->setCalendarPopup(true); m_chkOutOrder = new QCheckBox("Date Out of Order", this); m_cmbPostTo = new QComboBox(this); m_cmbUserPic = new QComboBox(this); connect(m_cmbUserPic, SIGNAL(activated(const QString &)), this, SLOT(onPicChanged(const QString &))); m_cmbTags = new ComboBox(this); m_cmbTags->setEditable(true); m_cmbMoods = new QComboBox(this); m_cmbMoods->setEditable(true); m_btnSecurity = new QPushButton("Public", this); m_menuSecurity = new StaticMenu(this); connect(m_menuSecurity, SIGNAL(triggered(QAction *)), this, SLOT(onSecurityActionTrigerred(QAction *))); m_menuCustomSecurity = new StaticMenu("Custom", this); connect(m_menuCustomSecurity, SIGNAL(triggered(QAction *)), this, SLOT(onCustomSecurityActionTrigerred(QAction *))); m_btnSecurity->setMenu(m_menuSecurity); m_lblUserpic = new QLabel(this); m_lblUserpic->setMinimumSize(QSize(64, 64)); m_lblUserpic->setAlignment(Qt::AlignTop); QHBoxLayout *timeLayout = new QHBoxLayout; timeLayout->addWidget(m_dtEdit); timeLayout->addWidget(m_chkOutOrder); QFormLayout *formLayout1 = new QFormLayout; formLayout1->addRow("Subject:", m_editSubject); formLayout1->addRow("Time:", timeLayout); formLayout1->addRow("Tags:", m_cmbTags); formLayout1->addRow("Location:", m_editLocation); QFormLayout *formLayout2 = new QFormLayout; formLayout2->addRow("Post to:", m_cmbPostTo); formLayout2->addRow("Userpic:", m_cmbUserPic); formLayout2->addRow("Access:", m_btnSecurity); formLayout2->addRow("Moods:", m_cmbMoods); QHBoxLayout *headerLayout = new QHBoxLayout; headerLayout->addLayout(formLayout1); headerLayout->addLayout(formLayout2); headerLayout->addWidget(m_lblUserpic); m_htmlEditor = new HtmlEditor(this); QVBoxLayout *mainLayout = new QVBoxLayout; mainLayout->addLayout(headerLayout); mainLayout->addWidget(m_htmlEditor); setLayout(mainLayout); m_timer.setInterval(10000); connect(&m_timer, SIGNAL(timeout()), this, SLOT(onTimer())); m_timer.start(); }
TransferApi::TransferApi(Session* aSession) : ApiModule(aSession, Access::ANY), timer(WebServerManager::getInstance()->addTimer([this] { onTimer(); }, 1000)) { DownloadManager::getInstance()->addListener(this); UploadManager::getInstance()->addListener(this); METHOD_HANDLER("stats", Access::ANY, ApiRequest::METHOD_GET, (), false, TransferApi::handleGetStats); createSubscription("statistics"); timer->start(); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { ui.setupUi(this); QSettings settings; libraryWidget_ = new LibraryWidget; setCentralWidget(libraryWidget_); { outputDock_ = new QDockWidget(tr("Output"), this); outputDock_->setObjectName("output"); outputWidget_ = new QTextEditEx(outputDock_); connect(outputWidget_, SIGNAL(mouseDoubleClick(QMouseEvent*)), this, SLOT(outputMouseDoubleClick(QMouseEvent*))); outputWidget_->setReadOnly(true); outputDock_->setWidget(outputWidget_); addDockWidget(Qt::BottomDockWidgetArea, outputDock_); } ui.actionStart_Player->setIcon(IconLibrary::instance().icon("gamepad")); connect(ui.actionStart_Player, SIGNAL(triggered()), this, SLOT(startPlayer())); ui.actionStart->setIcon(IconLibrary::instance().icon("start")); ui.actionStart->setEnabled(false); connect(ui.actionStart, SIGNAL(triggered()), this, SLOT(start())); ui.actionStop->setIcon(IconLibrary::instance().icon("stop")); ui.actionStop->setEnabled(false); connect(ui.actionStop, SIGNAL(triggered()), this, SLOT(stop())); connect(ui.actionNew_Project, SIGNAL(triggered()), this, SLOT(newProject())); connect(ui.actionClose_Project, SIGNAL(triggered()), this, SLOT(closeProject())); connect(ui.actionSave_Project, SIGNAL(triggered()), this, SLOT(saveProject())); connect(ui.actionOpen_Project, SIGNAL(triggered()), this, SLOT(openProject())); connect(ui.actionExport_Project, SIGNAL(triggered()), this, SLOT(exportProject())); connect(ui.actionProject1, SIGNAL(triggered()), this, SLOT(openRecentProject())); connect(ui.actionProject2, SIGNAL(triggered()), this, SLOT(openRecentProject())); connect(ui.actionProject3, SIGNAL(triggered()), this, SLOT(openRecentProject())); connect(ui.actionProject4, SIGNAL(triggered()), this, SLOT(openRecentProject())); connect(ui.actionProject5, SIGNAL(triggered()), this, SLOT(openRecentProject())); connect(ui.actionExit, SIGNAL(triggered()), this, SLOT(close())); connect(ui.actionPlayer_Settings, SIGNAL(triggered()), this, SLOT(playerSettings())); connect(ui.actionFile_Associations, SIGNAL(triggered()), this, SLOT(fileAssociations())); connect(libraryWidget_, SIGNAL(openRequest(const QString&, const QString&)), this, SLOT(onOpenRequest(const QString&, const QString&))); QString playerip = settings.value("player ip", QString("127.0.0.1")).toString(); client_ = new GiderosNetworkClient(playerip, 15000); connect(client_, SIGNAL(connected()), this, SLOT(connected())); connect(client_, SIGNAL(disconnected()), this, SLOT(disconnected())); connect(client_, SIGNAL(dataReceived(const QByteArray&)), this, SLOT(dataReceived(const QByteArray&))); connect(client_, SIGNAL(ackReceived(unsigned int)), this, SLOT(ackReceived(unsigned int))); updateUI(); setWindowTitle(tr("Gideros")); updateRecentProjectActions(); QTimer* timer = new QTimer(this); connect(timer, SIGNAL(timeout()), this, SLOT(onTimer())); timer->start(1); isTransferring_ = false; QList<QVariant> v = settings.value("fileAssociations", QList<QVariant>()).toList(); for (int i = 0; i < v.size(); ++i) fileAssociations_.push_back(v[i].toStringList()); localServer_.listen("GiderosProjectManager"); connect(&localServer_, SIGNAL(newConnection()), this, SLOT(onLocalServerNewConnection())); restoreGeometry(settings.value("geometry").toByteArray()); restoreState(settings.value("windowState").toByteArray()); }
bool RepayView::init(){ if (!PopupBaseView::init()) { return false; } setIsHDPanel(true); CCLoadSprite::doResourceByCommonIndex(8, true); CCLoadSprite::doResourceByCommonIndex(11, true); CCLoadSprite::doResourceByCommonIndex(101, true); CCLoadSprite::doResourceByCommonIndex(305, true); CCLoadSprite::doResourceByCommonIndex(502, true); setCleanFunction([](){ CCLoadSprite::doResourceByCommonIndex(8, false); CCLoadSprite::doResourceByCommonIndex(11, false); CCLoadSprite::doResourceByCommonIndex(101, false); CCLoadSprite::doResourceByCommonIndex(305, false); CCLoadSprite::doResourceByCommonIndex(502, false); CCLoadSprite::releaseDynamicResourceByType(CCLoadSpriteType_GOODS); }); m_dataCount = RepayController::getInstance()->repayRewards.size(); setTitleName(""); auto tmpCCB = CCBLoadFile("RepayView",this,this); setContentSize(tmpCCB->getContentSize()); auto size = CCDirector::sharedDirector()->getWinSize(); float extH = getExtendHeight(); float add = size.height - 852; if (CCCommonUtils::isIosAndroidPad()) { add = size.height - 2048; add = add / 2.4; } m_bgNode->setPositionY(m_bgNode->getPositionY()-extH); auto tbg = CCLoadSprite::loadResource("Bottom frame04.png"); auto tBatchNode = CCSpriteBatchNode::createWithTexture(tbg->getTexture()); int maxHight = ceil(size.height*1.0/90); for (int j = 0; j<maxHight; j++) { for (int i=0; i<8; i++) { auto bg = CCLoadSprite::createSprite("Bottom frame04.png"); bg->setAnchorPoint(ccp(0, 0)); bg->setPosition(ccp(i*90, j*90)); tBatchNode->addChild(bg); } } m_bgNode->addChild(tBatchNode); CCSize nodeRewardSize = m_nodeRewards->getContentSize(); nodeRewardSize.height += extH; m_nodeRewards->setContentSize(nodeRewardSize); m_nodeRewards->setPositionY(m_nodeRewards->getPositionY()-extH); m_tabRewards = CCTableView::create(this, nodeRewardSize); m_tabRewards->setDirection(kCCScrollViewDirectionVertical); m_tabRewards->setVerticalFillOrder(kCCTableViewFillTopDown); m_tabRewards->setTouchPriority(Touch_Default); m_tabRewards->setDelegate(this); m_nodeRewards->addChild(m_tabRewards); // m_scrollPoints = CCScrollView::create(m_nodePoints->getContentSize()); // m_scrollPoints->setDirection(kCCScrollViewDirectionHorizontal); // m_scrollPoints->setTouchEnabled(false); // m_nodePoints->addChild(m_scrollPoints); // m_scrollPoints->setPosition(ccp(0, 0)); auto clipNode = CCClipNode::create(m_nodePoints->getContentSize().width, m_nodePoints->getContentSize().height); clipNode->setAnchorPoint(CCPointZero); m_nodePoints->addChild(clipNode); clipNode->setTag(REPAY_CLIP_NODE_TAG); CCNode *node = CCNode::create(); clipNode->addChild(node); node->setTag(REPAY_CLIP_NODE_TAG); auto clipNode1 = CCClipNode::create(m_nodePoints->getContentSize().width - 45, m_nodePoints->getContentSize().height); m_nodePoints->addChild(clipNode1); clipNode1->setPosition(ccp(23,0)); clipNode1->setTag(REPAY_CLIP_NODE_BAR_TAG); auto progress = CCLoadSprite::createScale9Sprite("01_03.png"); progress->setAnchorPoint(ccp(0, 0.5)); progress->setTag(REPAY_CLIP_NODE_BAR_TAG); clipNode1->addChild(progress); progress->setPreferredSize(CCSize(1, 26)); progress->setPosition(ccp(2.5, 60)); // setTitleName(_lang("133246")); m_lblTitle->setString(_lang("101100"));//距离累计充值大反馈结束还有 // setButtonTitle(m_btnGoBuy, _lang("101221").c_str()); m_lblPointTitle->setString(_lang("133247")); m_lblRewardTitle->setString(_lang("105848")); m_lblPointOrgW = m_lblPointTitle->getContentSize().width * m_lblPointTitle->getOriginScaleX(); m_lblPointOrgX = m_lblPointTitle->getPositionX(); onTimer(0); this->schedule(schedule_selector(RepayView::onTimer),1.0); initPointNode(true); CCPoint offset = m_tabRewards->getContentOffset(); int newPoint = RepayController::getInstance()->getNewPayPoint(); int lv = RepayController::getInstance()->getLVIndexByPoint(newPoint) - 3; float changeH = 0; while (lv>-1) { changeH += tableCellSizeForIndex(m_tabRewards, lv).height; lv--; } offset.y += changeH; m_tabRewards->setContentOffset(offset); return true; }
VoiceMessagesFader::VoiceMessagesFader(QThread *thread) : _timer(this) { moveToThread(thread); _timer.moveToThread(thread); _timer.setSingleShot(true); connect(&_timer, SIGNAL(timeout()), this, SLOT(onTimer())); }
SystemApi::SystemApi(Session* aSession) : ApiModule(aSession, Access::ANY), timer(aSession->getServer()->addTimer([this] { onTimer(); }, 500)) { METHOD_HANDLER("stats", Access::ANY, ApiRequest::METHOD_GET, (), false, SystemApi::handleGetStats); METHOD_HANDLER("away", Access::ANY, ApiRequest::METHOD_GET, (), false, SystemApi::handleGetAwayState); METHOD_HANDLER("away", Access::ANY, ApiRequest::METHOD_POST, (), true, SystemApi::handleSetAway); createSubscription("away_state"); timer->start(true); }
interpreter::interpreter(screen *_myScreen) { EXTERN_myInterpreter = this; myScreen = _myScreen; my_mainwindow = 0; my_qapplication = 0; myStack = new stack(); myData = new data(); // DATA, READ, RESTORE myFunction = new function(myScreen, this); memset(&lpFunc, 0, sizeof(lpFunc)); my_ontimer = new _ontimer(this); my_ontimer->connect( my_ontimer, SIGNAL(timeout()), my_ontimer, SLOT(onTimer()) ); bOnTimer = false; nOnTimerPos = -1; nOnTimerIntervall = 0; lpFunc[pcode__CONNECT] = &interpreter::fCONNECT; lpFunc[pcode__DISCONNECT] = &interpreter::fDISCONNECT; lpFunc[pcode__BREAKPOINT] = &interpreter::fBREAKPOINT; lpFunc[pcode__OPTION_KBASIC] = &interpreter::fOPTION_KBASIC; lpFunc[pcode__NOP] = &interpreter::fNOP; lpFunc[pcode__AND] = &interpreter::fAND; lpFunc[pcode__OR] = &interpreter::fOR; lpFunc[pcode__NOT] = &interpreter::fNOT; lpFunc[pcode__POWER] = &interpreter::fPOWER; lpFunc[pcode__XOR] = &interpreter::fXOR; lpFunc[pcode__IMP] = &interpreter::fIMP; lpFunc[pcode__EQV] = &interpreter::fEQV; lpFunc[pcode__ADD] = &interpreter::fADD; lpFunc[pcode__LIKE] = &interpreter::fLIKE; lpFunc[pcode__SUB] = &interpreter::fSUB; lpFunc[pcode__MUL] = &interpreter::fMUL; lpFunc[pcode__DIV] = &interpreter::fDIV; lpFunc[pcode__IDIV] = &interpreter::fIDIV; lpFunc[pcode__MOD] = &interpreter::fMOD; lpFunc[pcode__EQUAL] = &interpreter::fEQUAL; lpFunc[pcode__IS] = &interpreter::fIS; lpFunc[pcode__UNEQUAL] = &interpreter::fUNEQUAL; lpFunc[pcode__GREATER] = &interpreter::fGREATER; lpFunc[pcode__LESSER] = &interpreter::fLESSER; lpFunc[pcode__GREATER_EQUAL] = &interpreter::fGREATER_EQUAL; lpFunc[pcode__FOR_GREATER_EQUAL] = &interpreter::fFOR_GREATER_EQUAL; lpFunc[pcode__LESSER_EQUAL] = &interpreter::fLESSER_EQUAL; lpFunc[pcode__TRY] = &interpreter::fTRY; lpFunc[pcode__ENDCATCH] = &interpreter::fENDCATCH; lpFunc[pcode__KBASICDIR] = &interpreter::fKBASICDIR; lpFunc[pcode__PRINTSCREEN] = &interpreter::fPRINTSCREEN; //lpFunc[pcode__ADDDATE] = &interpreter::fADDDATE; lpFunc[pcode__ADDDAYS] = &interpreter::fADDDAYS; lpFunc[pcode__ADDMONTHS] = &interpreter::fADDMONTHS; lpFunc[pcode__ADDYEARS] = &interpreter::fADDYEARS; //lpFunc[pcode__SUBDATE] = &interpreter::fSUBDATE; lpFunc[pcode__SUBDAYS] = &interpreter::fSUBDAYS; lpFunc[pcode__SUBMONTHS] = &interpreter::fSUBMONTHS; lpFunc[pcode__SUBYEARS] = &interpreter::fSUBYEARS; //lpFunc[pcode__ADDTIME] = &interpreter::fADDTIME; lpFunc[pcode__ADDHOURS] = &interpreter::fADDHOURS; lpFunc[pcode__ADDMINUTES] = &interpreter::fADDMINUTES; lpFunc[pcode__ADDSECONDS] = &interpreter::fADDSECONDS; //lpFunc[pcode__SUBTIME] = &interpreter::fSUBTIME; lpFunc[pcode__SUBHOURS] = &interpreter::fSUBHOURS; lpFunc[pcode__SUBMINUTES] = &interpreter::fSUBMINUTES; lpFunc[pcode__SUBSECONDS] = &interpreter::fSUBSECONDS; lpFunc[pcode__DAYOFWEEK] = &interpreter::fDAYOFWEEK; lpFunc[pcode__DAYOFYEAR] = &interpreter::fDAYOFYEAR; lpFunc[pcode__DAYSINMONTH] = &interpreter::fDAYSINMONTH; lpFunc[pcode__DAYSINYEAR] = &interpreter::fDAYSINYEAR; lpFunc[pcode__WEEKNUMBER] = &interpreter::fWEEKNUMBER; lpFunc[pcode__ISLEAPYEAR] = &interpreter::fISLEAPYEAR; lpFunc[pcode__DIFFSECONDS] = &interpreter::fDIFFSECONDS; lpFunc[pcode__ISDATEVALID] = &interpreter::fISDATEVALID; lpFunc[pcode__ISTIMEVALID] = &interpreter::fISTIMEVALID; lpFunc[pcode__ISDATETIMEVALID] = &interpreter::fISDATETIMEVALID; lpFunc[pcode__DAYNAME] = &interpreter::fDAYNAME; lpFunc[pcode__READBINARY] = &interpreter::fREADBINARY; lpFunc[pcode__WRITEBINARY] = &interpreter::fWRITEBINARY; lpFunc[pcode__SEEKBINARY] = &interpreter::fSEEKBINARY; lpFunc[pcode__TRANSLATION] = &interpreter::fTRANSLATION; lpFunc[pcode__SQL] = &interpreter::fSQL; lpFunc[pcode__MENU] = &interpreter::fMENU; lpFunc[pcode__MOV_ENUM] = &interpreter::fMOV_ENUM; lpFunc[pcode__MOV_CONST] = &interpreter::fMOV_CONST; lpFunc[pcode__MOV] = &interpreter::fMOV; lpFunc[pcode__MOV_LCSTRING] = &interpreter::fMOV_LCSTRING; lpFunc[pcode__MOV_RCSTRING] = &interpreter::fMOV_RCSTRING; lpFunc[pcode__MOV_LQSTRING] = &interpreter::fMOV_LQSTRING; lpFunc[pcode__MOV_RQSTRING] = &interpreter::fMOV_RQSTRING; lpFunc[pcode__MOV_TYPE] = &interpreter::fMOV_TYPE; lpFunc[pcode__STOP] = &interpreter::fSTOP; lpFunc[pcode__END] = &interpreter::fEND; lpFunc[pcode__DOEVENTS] = &interpreter::fDOEVENTS; lpFunc[pcode__ENTER_LOCAL] = &interpreter::fENTER_LOCAL; lpFunc[pcode__ENTER_PROPERTYGET] = &interpreter::fENTER_PROPERTYGET; lpFunc[pcode__ENTER_PROPERTYSET] = &interpreter::fENTER_PROPERTYSET; lpFunc[pcode__EXIT_LOCAL] = &interpreter::fEXIT_LOCAL; lpFunc[pcode__DIM] = &interpreter::fDIM; lpFunc[pcode__REDIM] = &interpreter::fREDIM; lpFunc[pcode__DIM_STATIC] = &interpreter::fDIM_STATIC; lpFunc[pcode__CONST] = &interpreter::fCONST; lpFunc[pcode___DYNAMIC] = &interpreter::f_DYNAMIC; lpFunc[pcode___STATIC] = &interpreter::f_STATIC; lpFunc[pcode__DATA] = &interpreter::fDATA; lpFunc[pcode__RESTORE] = &interpreter::fRESTORE; lpFunc[pcode__READ] = &interpreter::fREAD; lpFunc[pcode__ONERRORGOTO] = &interpreter::fONERRORGOTO; lpFunc[pcode__ONERRORGOTORESUMENEXT] = &interpreter::fONERRORGOTORESUMENEXT; lpFunc[pcode__RESUME] = &interpreter::fRESUME; lpFunc[pcode__PUSH_POINTERPOINTER] = &interpreter::fPUSH_POINTERPOINTER; lpFunc[pcode__STRCOMP] = &interpreter::fSTRCOMP; lpFunc[pcode__STATEMENT] = &interpreter::fSTATEMENT; lpFunc[pcode__STATEMENT_OUT] = &interpreter::fSTATEMENT_OUT; lpFunc[pcode__STATEMENT_OVER] = &interpreter::fSTATEMENT_OVER; lpFunc[pcode__STATEMENT_CURSOR] = &interpreter::fSTATEMENT_CURSOR; lpFunc[pcode__CATCH] = &interpreter::fCATCH; lpFunc[pcode__JMP] = &interpreter::fJMP; lpFunc[pcode__LIBCALL] = &interpreter::fLIBCALL; //lpFunc[pcode__CALL] = &interpreter::fCALL; lpFunc[pcode__RETURN] = &interpreter::fRETURN; //lpFunc[pcode__CALL_RETURN] = &interpreter::fCALL_RETURN; lpFunc[pcode__CALLMETHOD] = &interpreter::fCALLMETHOD; lpFunc[pcode__PUSH_NULL] = &interpreter::fPUSH_NULL; lpFunc[pcode__PUSH_EMPTY] = &interpreter::fPUSH_EMPTY; lpFunc[pcode__PUSH_ERROR] = &interpreter::fPUSH_ERROR; lpFunc[pcode__PUSH_BOOLEAN] = &interpreter::fPUSH_BOOLEAN; lpFunc[pcode__PUSH_QSTRING] = &interpreter::fPUSH_QSTRING; lpFunc[pcode__PUSH_CSTRING] = &interpreter::fPUSH_CSTRING; lpFunc[pcode__PUSH_BYTE] = &interpreter::fPUSH_BYTE; lpFunc[pcode__PUSH_SHORT] = &interpreter::fPUSH_SHORT; lpFunc[pcode__PUSH_INTEGER] = &interpreter::fPUSH_INTEGER; lpFunc[pcode__PUSH_LONG] = &interpreter::fPUSH_LONG; lpFunc[pcode__PUSH_SINGLE] = &interpreter::fPUSH_SINGLE; lpFunc[pcode__PUSH_DOUBLE] = &interpreter::fPUSH_DOUBLE; lpFunc[pcode__PUSH_CURRENCY] = &interpreter::fPUSH_CURRENCY; lpFunc[pcode__PUSH_DATE] = &interpreter::fPUSH_DATE; lpFunc[pcode__PUSH_ENUM] = &interpreter::fPUSH_ENUM; lpFunc[pcode__PUSH_RETURNVAR] = &interpreter::fPUSH_RETURNVAR; lpFunc[pcode__PROJECTFILE] = &interpreter::fPROJECTFILE; lpFunc[pcode__PUSH_CONST] = &interpreter::fPUSH_CONST; lpFunc[pcode__PUSH__binding_ME] = &interpreter::fPUSH__binding_ME; lpFunc[pcode__PUSH__binding_PARENT] = &interpreter::fPUSH__binding_PARENT; lpFunc[pcode__PUSH_ME] = &interpreter::fPUSH_ME; lpFunc[pcode__PUSH_PARENT] = &interpreter::fPUSH_PARENT; lpFunc[pcode__SET_ME] = &interpreter::fSET_ME; lpFunc[pcode__binding_SET_ME] = &interpreter::fbinding_SET_ME; lpFunc[pcode__MOV_ME] = &interpreter::fMOV_ME; lpFunc[pcode__MOV_PARENT] = &interpreter::fMOV_PARENT; lpFunc[pcode__binding_PUSH_ID] = &interpreter::fbinding_PUSH_ID; lpFunc[pcode__PUSH_ID] = &interpreter::fPUSH_ID; lpFunc[pcode__PUSH_BOOLEAN_ID] = &interpreter::fPUSH_BOOLEAN_ID; lpFunc[pcode__PUSH_QSTRING_ID] = &interpreter::fPUSH_QSTRING_ID; lpFunc[pcode__PUSH_LQSTRING_ID] = &interpreter::fPUSH_LQSTRING_ID; lpFunc[pcode__PUSH_CSTRING_ID] = &interpreter::fPUSH_CSTRING_ID; lpFunc[pcode__PUSH_LCSTRING_ID] = &interpreter::fPUSH_LCSTRING_ID; lpFunc[pcode__PUSH_BYTE_ID] = &interpreter::fPUSH_BYTE_ID; lpFunc[pcode__PUSH_SHORT_ID] = &interpreter::fPUSH_SHORT_ID; lpFunc[pcode__PUSH_INTEGER_ID] = &interpreter::fPUSH_INTEGER_ID; lpFunc[pcode__PUSH_LONG_ID] = &interpreter::fPUSH_LONG_ID; lpFunc[pcode__PUSH_SINGLE_ID] = &interpreter::fPUSH_SINGLE_ID; lpFunc[pcode__PUSH_DOUBLE_ID] = &interpreter::fPUSH_DOUBLE_ID; lpFunc[pcode__PUSH_VARIANT_ID] = &interpreter::fPUSH_VARIANT_ID; // lpFunc[pcode__PUSH_IDREF] = &interpreter::fPUSH_IDREF; lpFunc[pcode__PUSH_IDREFVAL] = &interpreter::fPUSH_IDREFVAL; /* // lpFunc[pcode__PUSH_IDPOINTER] = &interpreter::fPUSH_IDPOINTER; lpFunc[pcode__PUSH_BOOLEAN_IDPOINTER] = &interpreter::fPUSH_BOOLEAN_IDPOINTER; lpFunc[pcode__PUSH_CSTRING_IDPOINTER] = &interpreter::fPUSH_CSTRING_IDPOINTER; lpFunc[pcode__PUSH_INTEGER_IDPOINTER] = &interpreter::fPUSH_INTEGER_IDPOINTER; lpFunc[pcode__PUSH_LONG_IDPOINTER] = &interpreter::fPUSH_LONG_IDPOINTER; lpFunc[pcode__PUSH_SINGLE_IDPOINTER] = &interpreter::fPUSH_SINGLE_IDPOINTER; lpFunc[pcode__PUSH_DOUBLE_IDPOINTER] = &interpreter::fPUSH_DOUBLE_IDPOINTER; */ lpFunc[pcode__CJMP] = &interpreter::fCJMP; lpFunc[pcode__CJMP2] = &interpreter::fCJMP2; lpFunc[pcode__CJMP3] = &interpreter::fCJMP3; lpFunc[pcode__SYSTEM] = &interpreter::fSYSTEM; lpFunc[pcode__SILENTMODE] = &interpreter::fSILENTMODE; lpFunc[pcode__SEPARATOR] = &interpreter::fSEPARATOR; lpFunc[pcode__OPTION_RANGE] = &interpreter::fOPTION_RANGE; //lpFunc[pcode__OPTION_BASE] = &interpreter::fOPTION_BASE; // lpFunc[pcode__OPTION_COMPARE] = &interpreter::fOPTION_COMPARE; lpFunc[pcode__MOV_ISMISSING] = &interpreter::fMOV_ISMISSING; lpFunc[pcode__MOV_BOOLEAN] = &interpreter::fMOV_BOOLEAN; lpFunc[pcode__MOV_QSTRING] = &interpreter::fMOV_QSTRING; lpFunc[pcode__MOV_CSTRING] = &interpreter::fMOV_CSTRING; lpFunc[pcode__MOV_SINGLE] = &interpreter::fMOV_SINGLE; lpFunc[pcode__MOV_DOUBLE] = &interpreter::fMOV_DOUBLE; lpFunc[pcode__MOV_BYTE] = &interpreter::fMOV_BYTE; lpFunc[pcode__MOV_SHORT] = &interpreter::fMOV_SHORT; lpFunc[pcode__MOV_INTEGER] = &interpreter::fMOV_INTEGER; lpFunc[pcode__MOV_LONG] = &interpreter::fMOV_LONG; lpFunc[pcode__MOV_IDREF] = &interpreter::fMOV_IDREF; lpFunc[pcode__MOV_IDREFVAL] = &interpreter::fMOV_IDREFVAL; lpFunc[pcode__LBOUND] = &interpreter::fLBOUND; lpFunc[pcode__UBOUND] = &interpreter::fUBOUND; lpFunc[pcode__CHOOSE] = &interpreter::fCHOOSE; lpFunc[pcode__SWITCH] = &interpreter::fSWITCH; lpFunc[pcode__IIF] = &interpreter::fIIF; lpFunc[pcode__MID2] = &interpreter::fMID2; lpFunc[pcode__ONTIMERGOSUB] = &interpreter::fONTIMERGOSUB; lpFunc[pcode__TIMER_ON] = &interpreter::fTIMER_ON; lpFunc[pcode__TIMER_OFF] = &interpreter::fTIMER_OFF; lpFunc[pcode__TIMER_STOP] = &interpreter::fTIMER_STOP; lpFunc[pcode__BUILTIN] = &interpreter::fBUILTIN; lpFunc[pcode__UTF8] = &interpreter::fUTF8; lpFunc[pcode__UTF16] = &interpreter::fUTF16; lpFunc[pcode__EOF_] = &interpreter::fEOF; lpFunc[pcode__CLS] = &interpreter::fCLS; lpFunc[pcode__LOCATE] = &interpreter::fLOCATE; lpFunc[pcode__INPUT] = &interpreter::fINPUT; lpFunc[pcode__INPUT2] = &interpreter::fINPUT2; lpFunc[pcode__PRINT] = &interpreter::fPRINT; lpFunc[pcode__LEN] = &interpreter::fLEN; lpFunc[pcode__MID] = &interpreter::fMID; lpFunc[pcode__MID2] = &interpreter::fMID2; lpFunc[pcode__FRE] = &interpreter::fFRE; lpFunc[pcode__VAL] = &interpreter::fVAL; lpFunc[pcode__INT] = &interpreter::fINT; lpFunc[pcode__RANDOMIZE] = &interpreter::fRANDOMIZE; lpFunc[pcode__RND] = &interpreter::fRND; lpFunc[pcode__CSRLIN] = &interpreter::fCSRLIN; lpFunc[pcode__POS] = &interpreter::fPOS; lpFunc[pcode__COLOR] = &interpreter::fCOLOR; lpFunc[pcode__ABS] = &interpreter::fABS; lpFunc[pcode__DATE] = &interpreter::fDATE; lpFunc[pcode__TIME] = &interpreter::fTIME; lpFunc[pcode__STRING2] = &interpreter::fSTRING2; lpFunc[pcode__SPACE] = &interpreter::fSPACE; lpFunc[pcode__INSTR] = &interpreter::fINSTR; lpFunc[pcode__ENCODE] = &interpreter::fENCODE; lpFunc[pcode__DECODE] = &interpreter::fDECODE; lpFunc[pcode__LEFT] = &interpreter::fLEFT; lpFunc[pcode__RIGHT] = &interpreter::fRIGHT; lpFunc[pcode__UCASE] = &interpreter::fUCASE; lpFunc[pcode__LCASE] = &interpreter::fLCASE; lpFunc[pcode__LTRIM] = &interpreter::fLTRIM; lpFunc[pcode__RTRIM] = &interpreter::fRTRIM; lpFunc[pcode__TRIM] = &interpreter::fTRIM; lpFunc[pcode__ASC] = &interpreter::fASC; lpFunc[pcode__STR] = &interpreter::fSTR; lpFunc[pcode__HEX] = &interpreter::fHEX; lpFunc[pcode__OCT] = &interpreter::fOCT; lpFunc[pcode__BIN] = &interpreter::fBIN; lpFunc[pcode__CHR] = &interpreter::fCHR; lpFunc[pcode__INKEY] = &interpreter::fINKEY; lpFunc[pcode__SLEEP] = &interpreter::fSLEEP; lpFunc[pcode__SHELL] = &interpreter::fSHELL; lpFunc[pcode__CAST] = &interpreter::fCAST; lpFunc[pcode__CLNG] = &interpreter::fCLNG; lpFunc[pcode__CINT] = &interpreter::fCINT; lpFunc[pcode__CSNG] = &interpreter::fCSNG; lpFunc[pcode__CDBL] = &interpreter::fCDBL; lpFunc[pcode__CCUR] = &interpreter::fCCUR; lpFunc[pcode__CVAR] = &interpreter::fCVAR; lpFunc[pcode__CBOOL] = &interpreter::fCBOOL; lpFunc[pcode__CBYTE] = &interpreter::fCBYTE; lpFunc[pcode__CDATE] = &interpreter::fCDATE; lpFunc[pcode__RAD] = &interpreter::fRAD; lpFunc[pcode__DEG] = &interpreter::fDEG; lpFunc[pcode__ACS] = &interpreter::fACS; lpFunc[pcode__ASN] = &interpreter::fASN; lpFunc[pcode__ATN] = &interpreter::fATN; lpFunc[pcode__COS] = &interpreter::fCOS; lpFunc[pcode__EXP] = &interpreter::fEXP; lpFunc[pcode__LOG] = &interpreter::fLOG; lpFunc[pcode__LN] = &interpreter::fLN; lpFunc[pcode__SGN] = &interpreter::fSGN; lpFunc[pcode__FIX] = &interpreter::fFIX; lpFunc[pcode__SIN] = &interpreter::fSIN; lpFunc[pcode__SQR] = &interpreter::fSQR; lpFunc[pcode__TAN] = &interpreter::fTAN; lpFunc[pcode__FACT] = &interpreter::fFACT; lpFunc[pcode__LOGB] = &interpreter::fLOGB; lpFunc[pcode__FRAC] = &interpreter::fFRAC; lpFunc[pcode__HYPOT] = &interpreter::fHYPOT; lpFunc[pcode__MAX] = &interpreter::fMAX; lpFunc[pcode__MIN] = &interpreter::fMIN; lpFunc[pcode__SEC] = &interpreter::fSEC; lpFunc[pcode__CHDIR] = &interpreter::fCHDIR; lpFunc[pcode__RMDIR] = &interpreter::fRMDIR; lpFunc[pcode__MKDIR] = &interpreter::fMKDIR; lpFunc[pcode__BEEP] = &interpreter::fBEEP; lpFunc[pcode__RESET] = &interpreter::fRESET; lpFunc[pcode__FILES] = &interpreter::fFILES; lpFunc[pcode__NAME] = &interpreter::fNAME; lpFunc[pcode__KILL] = &interpreter::fKILL; lpFunc[pcode__SEEK] = &interpreter::fSEEK; lpFunc[pcode__SEEK2] = &interpreter::fSEEK2; lpFunc[pcode__OPEN] = &interpreter::fOPEN; lpFunc[pcode__OPEN2] = &interpreter::fOPEN2; lpFunc[pcode__CLOSE] = &interpreter::fCLOSE; lpFunc[pcode__CLOSEALL] = &interpreter::fCLOSEALL; lpFunc[pcode__WRITE] = &interpreter::fWRITE; lpFunc[pcode__LOF] = &interpreter::fLOF; lpFunc[pcode__DATE2] = &interpreter::fDATE2; lpFunc[pcode__SCREEN] = &interpreter::fSCREEN; lpFunc[pcode__LINEINPUT] = &interpreter::fLINEINPUT; lpFunc[pcode__NZ] = &interpreter::fNZ; lpFunc[pcode__GET] = &interpreter::fGET; lpFunc[pcode__GET2] = &interpreter::fGET2; lpFunc[pcode__PEEK] = &interpreter::fPEEK; lpFunc[pcode__POKE] = &interpreter::fPOKE; lpFunc[pcode__COMPARE] = &interpreter::fCOMPARE; lpFunc[pcode__CONTAINS] = &interpreter::fCONTAINS; lpFunc[pcode__COUNT] = &interpreter::fCOUNT; lpFunc[pcode__ENDSWITH] = &interpreter::fENDSWITH; lpFunc[pcode__STARTSWITH] = &interpreter::fSTARTSWITH; lpFunc[pcode__LEFTJUSTIFIED] = &interpreter::fLEFTJUSTIFIED; lpFunc[pcode__RIGHTJUSTIFIED] = &interpreter::fRIGHTJUSTIFIED; lpFunc[pcode__SECTION] = &interpreter::fSECTION; lpFunc[pcode__SIMPLIFIED] = &interpreter::fSIMPLIFIED; lpFunc[pcode__TRIMMED] = &interpreter::fTRIMMED; lpFunc[pcode__REVERSED] = &interpreter::fREVERSED; lpFunc[pcode__UNICODE] = &interpreter::fUNICODE; lpFunc[pcode__PREPEND] = &interpreter::fPREPEND; lpFunc[pcode__APPEND2] = &interpreter::fAPPEND; lpFunc[pcode__REMOVE] = &interpreter::fREMOVE; lpFunc[pcode__TRUNCATE] = &interpreter::fTRUNCATE; lpFunc[pcode__INSERT] = &interpreter::fINSERT; lpFunc[pcode__FILL] = &interpreter::fFILL; lpFunc[pcode__PUT] = &interpreter::fPUT; lpFunc[pcode__PUT2] = &interpreter::fPUT2; lpFunc[pcode__INSTREV] = &interpreter::fINSTREV; lpFunc[pcode__REPLACE] = &interpreter::fREPLACE; lpFunc[pcode__SPLIT] = &interpreter::fSPLIT; lpFunc[pcode__ROUND] = &interpreter::fROUND; lpFunc[pcode__STRREVERSE] = &interpreter::fSTRREVERSE; lpFunc[pcode__FIELD] = &interpreter::fFIELD; lpFunc[pcode__SPC] = &interpreter::fSPC; lpFunc[pcode__FILECOPY] = &interpreter::fFILECOPY; lpFunc[pcode__CHDRIVE] = &interpreter::fCHDRIVE; lpFunc[pcode__SETATTR] = &interpreter::fSETATTR; lpFunc[pcode__ISDATE] = &interpreter::fISDATE; lpFunc[pcode__ISEMPTY] = &interpreter::fISEMPTY; lpFunc[pcode__ISNULL] = &interpreter::fISNULL; lpFunc[pcode__ISNUMERIC] = &interpreter::fISNUMERIC; lpFunc[pcode__ISMISSING] = &interpreter::fISMISSING; lpFunc[pcode__ISARRAY] = &interpreter::fISARRAY; lpFunc[pcode__ISOBJECT] = &interpreter::fISOBJECT; lpFunc[pcode__ISERROR] = &interpreter::fISERROR; lpFunc[pcode__ISBOOLEAN] = &interpreter::fISBOOLEAN; lpFunc[pcode__ISSTRING] = &interpreter::fISSTRING; lpFunc[pcode__ISSINGLE] = &interpreter::fISSINGLE; lpFunc[pcode__ISDOUBLE] = &interpreter::fISDOUBLE; lpFunc[pcode__ISBYTE] = &interpreter::fISBYTE; lpFunc[pcode__ISSHORT] = &interpreter::fISSHORT; lpFunc[pcode__ISINTEGER] = &interpreter::fISINTEGER; lpFunc[pcode__ISLONG] = &interpreter::fISLONG; /* lpFunc[pcode__ISINT16] = &interpreter::fISINT16; lpFunc[pcode__ISINT32] = &interpreter::fISINT32; lpFunc[pcode__ISINT64] = &interpreter::fISINT64; lpFunc[pcode__ISUINT16] = &interpreter::fISUINT16; lpFunc[pcode__ISUINT32] = &interpreter::fISUINT32; lpFunc[pcode__ISUINT64] = &interpreter::fISUINT64; */ lpFunc[pcode__ISVARIANT] = &interpreter::fISVARIANT; lpFunc[pcode__ISCURRENCY] = &interpreter::fISCURRENCY; lpFunc[pcode__LOC] = &interpreter::fLOC; lpFunc[pcode__MINUTE] = &interpreter::fMINUTE; lpFunc[pcode__MONTH] = &interpreter::fMONTH; lpFunc[pcode__MSGBOX] = &interpreter::fMSGBOX; lpFunc[pcode__NOW] = &interpreter::fNOW; lpFunc[pcode__RGB] = &interpreter::fRGB; lpFunc[pcode__SECOND] = &interpreter::fSECOND; lpFunc[pcode__TIMER] = &interpreter::fTIMER; lpFunc[pcode__ARRAY2] = &interpreter::fARRAY2; lpFunc[pcode__COMMAND] = &interpreter::fCOMMAND; lpFunc[pcode__CURDIR] = &interpreter::fCURDIR; lpFunc[pcode__CVERR] = &interpreter::fCVERR; lpFunc[pcode__DATEADD] = &interpreter::fDATEADD; lpFunc[pcode__DATEDIFF] = &interpreter::fDATEDIFF; lpFunc[pcode__DATEPART] = &interpreter::fDATEPART; lpFunc[pcode__DATESERIAL] = &interpreter::fDATESERIAL; lpFunc[pcode__DATEVALUE] = &interpreter::fDATEVALUE; lpFunc[pcode__DAY] = &interpreter::fDAY; lpFunc[pcode__DIR] = &interpreter::fDIR; lpFunc[pcode__FILEATTR] = &interpreter::fFILEATTR; lpFunc[pcode__FILEDATETIME] = &interpreter::fFILEDATETIME; lpFunc[pcode__FILELEN] = &interpreter::fFILELEN; lpFunc[pcode__FORMAT] = &interpreter::fFORMAT; lpFunc[pcode__FREEFILE] = &interpreter::fFREEFILE; lpFunc[pcode__GETATTR] = &interpreter::fGETATTR; lpFunc[pcode__HOUR] = &interpreter::fHOUR; lpFunc[pcode__INPUTBOX] = &interpreter::fINPUTBOX; lpFunc[pcode__FORMATCURRENCY] = &interpreter::fFORMATCURRENCY; lpFunc[pcode__FORMATDATETIME] = &interpreter::fFORMATDATETIME; lpFunc[pcode__FORMATNUMBER] = &interpreter::fFORMATNUMBER; lpFunc[pcode__FORMATPERCENT] = &interpreter::fFORMATPERCENT; lpFunc[pcode__WEEKDAYNAME] = &interpreter::fWEEKDAYNAME; lpFunc[pcode__MONTHNAME] = &interpreter::fMONTHNAME; lpFunc[pcode__TIMESERIAL] = &interpreter::fTIMESERIAL; lpFunc[pcode__TIMEVALUE] = &interpreter::fTIMEVALUE; lpFunc[pcode__TYPENAME] = &interpreter::fTYPENAME; lpFunc[pcode__WEEKDAY] = &interpreter::fWEEKDAY; lpFunc[pcode__YEAR] = &interpreter::fYEAR; lpFunc[pcode__POINT] = &interpreter::fPOINT; lpFunc[pcode__SCREEN2] = &interpreter::fSCREEN2; lpFunc[pcode__CIRCLE] = &interpreter::fCIRCLE; lpFunc[pcode__DRAW] = &interpreter::fDRAW; lpFunc[pcode__PCOPY] = &interpreter::fPCOPY; lpFunc[pcode__PMAP] = &interpreter::fPMAP; lpFunc[pcode__WIDTH] = &interpreter::fWIDTH; lpFunc[pcode__PRESET] = &interpreter::fPRESET; lpFunc[pcode__PSET] = &interpreter::fPSET; lpFunc[pcode__PAINT] = &interpreter::fPAINT; lpFunc[pcode__WINDOW] = &interpreter::fWINDOW; lpFunc[pcode__LINE] = &interpreter::fLINE; lpFunc[pcode__VIEWPRINT] = &interpreter::fVIEWPRINT; lpFunc[pcode__VIEW] = &interpreter::fVIEW; lpFunc[pcode__ARRAY] = &interpreter::fARRAY; lpFunc[pcode__REGISTER_ARRAY] = &interpreter::fREGISTER_ARRAY; lpFunc[pcode__TYPE] = &interpreter::fTYPE; // lpFunc[pcode__STRUCTURE] = &interpreter::fSTRUCTURE; lpFunc[pcode__ENUM] = &interpreter::fENUM; lpFunc[pcode__ENUM_ELEMENT] = &interpreter::fENUM_ELEMENT; lpFunc[pcode__CLASS] = &interpreter::fCLASS; lpFunc[pcode__ERROR] = &interpreter::fERROR; lpFunc[pcode__ERR] = &interpreter::fERR; lpFunc[pcode__ERL] = &interpreter::fERL; lpFunc[pcode__VARTYPE] = &interpreter::fVARTYPE; lpFunc[pcode__TYPEOF] = &interpreter::fTYPEOF; lpFunc[pcode__ERASE] = &interpreter::fERASE; lpFunc[pcode__CLEAR] = &interpreter::fCLEAR; lpFunc[pcode__STACKPOP] = &interpreter::fSTACKPOP; lpFunc[pcode__binding_CLASSMETHOD] = &interpreter::binding_callMethod; lpFunc[pcode__binding_CLASSPROPERTY] = &interpreter::binding_callProperty; lpFunc[pcode__binding_CLASSSTATICPROPERTY] = &interpreter::binding_callStaticProperty; lpFunc[pcode__binding_CLASSOPERATOR] = &interpreter::binding_callOperator; lpFunc[pcode__binding_FUNCTIONOPERATOR] = &interpreter::binding_callFunctionOperator; lpFunc[pcode__binding_FUNCTION] = &interpreter::binding_callFunction; lpFunc[pcode__binding_CLASSSTATICMETHOD] = &interpreter::binding_callStaticMethod; // lpFunc[pcode__CLASSMETHOD] = &interpreter::callMethod;//bConstructor lpFunc[pcode__CLASSSTATICMETHOD] = &interpreter::callStaticMethod; lpFunc[pcode__CLASS_BINDINGPARAM] = &interpreter::fCLASS_BINDINGPARAM; }