示例#1
0
void SettingDlg::buttonClicked()
{
    QString regType = regcb->currentText();
    QString title = lng->tr("FT_CONFIRM_REG");
    QString text = QString("%1:%2 \n").arg(lng->tr("FT_REGTYPE")).arg(regType);
    if( regType == "IMEI" )
        text += QString("IMEI:%1").arg(imei);
    else
        text += QString("IMSI:%1").arg(imsi);

    ZSingleCaptureDlg* dlg = new ZSingleCaptureDlg(title, text,
            (ZSingleCaptureDlg::CaptureDlgType)0, NULL, "ZSingleCaptureDlg", true, 0, 0);

    if( dlg->exec() == ZPopup::Accepted )  {
        cfg->reg_key = dlg->getResultText().stripWhiteSpace();
        delete dlg;
        dlg = NULL;

        cfg->reg_type = regType;
        cfg->saveCfg();

        if( codeComp->cpcp() )  {
            showNotify("", QString("Register Successfully !!") );
            tabWidget->setCurrentPage(0);
        } else {
            showNotify("", QString("Register Error !!"), 1);
        }
    } else {
        delete dlg;
        dlg = NULL;
    }
}
示例#2
0
void TinyMainWindow::on_action_network_reconnect_triggered()
{
	connectToMPD(pv->host);
	update(false);

	showNotify(tr("Reconnected"));
}
示例#3
0
mainView::mainView(QWidget *parent)
    : QWidget(parent), ui(new Ui::mainView)
{
    ui->setupUi(this);

    ui->lineEdit->setEmptyMessage("Type 'mibit' to see what happens");

    tip1 = new MibitTip(this, ui->lineEdit, "tip.svg",QPixmap("important.png") );
    tip3 = new MibitTip(this, ui->btnTest3, "tip.svg", QPixmap("important.png"), tpAbove );

    dialog1 = new MibitDialog(this,"Nothing","dialog-theme.opaque.svg",QPixmap("face-smile.png"), atSlideDown );
    dialog1->setSize(300,150);


    floatPanel = new MibitFloatPanel(this,"rotated_panel.svg", Bottom);
    floatPanel->setSize(350,200);
    floatPanel->addWidget(ui->toFloat);
    QTimer::singleShot(3000,floatPanel,SLOT(showPanel()));

    notifier = new MibitNotifier(this,"notifier.svg",QPixmap("information.png"));//onTop = true

    connect(ui->btnClosePanel, SIGNAL(clicked()), floatPanel, SLOT(hideOnUserRequest()));
    connect(ui->btnQuit, SIGNAL(clicked()),qApp, SLOT(quit()));
    ui->slider->setRange(0,100);
    connect(ui->slider, SIGNAL(valueChanged(int)), ui->progressBar, SLOT(setValue(int)));

    connect(ui->btnTest1, SIGNAL(clicked()), SLOT(showTip1()));
    connect(ui->btnTest3, SIGNAL(clicked()), SLOT(showTip3()));

    connect(ui->btnDialog1, SIGNAL(clicked()), SLOT(showDialog1()));
    connect(ui->btnDialog2, SIGNAL(clicked()), SLOT(showDialog2()));
    connect(ui->btnDialog3, SIGNAL(clicked()), SLOT(showDialog3()));
    connect(ui->btnDialog4, SIGNAL(clicked()), SLOT(showDialog4()));

    connect(ui->btnNotify, SIGNAL(clicked()), this, SLOT(showNotify()) );
    connect(ui->btnNotify2, SIGNAL(clicked()), this, SLOT(showNotify2()) );
    connect(ui->lineEdit,SIGNAL(textEdited(QString)), this, SLOT(checkText(QString)));

    QTimer::singleShot(700,this,SLOT(showDialog1()));
    QTimer::singleShot(0,this,SLOT(centerWindow()));

}
示例#4
0
/** @todo Move this part in VbglR3 and just provide a callback for the platform-specific
          notification stuff, since this is very similar to the VBoxTray code. */
static int run(struct VBCLSERVICE **ppInterface, bool fDaemonised)
{
    int rc;
    LogFlowFunc(("\n"));

    NOREF(ppInterface);
    /* Initialise the guest library. */
    rc = VbglR3InitUser();
    if (RT_FAILURE(rc))
        VBClFatalError(("Failed to connect to the VirtualBox kernel service, rc=%Rrc\n", rc));
    /* Because we need desktop notifications to be displayed, wait
     * some time to make the desktop environment load (as a work around). */
    if (fDaemonised)
        RTThreadSleep(30 * 1000 /* Wait 30 seconds */);

# ifdef VBOX_WITH_DBUS
    rc = RTDBusLoadLib();
    if (RT_FAILURE(rc))
        LogRel(("VBoxClient: D-Bus seems not to be installed; no host version check/notification done.\n"));
# else
    rc = VERR_NOT_IMPLEMENTED;
# endif /* VBOX_WITH_DBUS */

# ifdef VBOX_WITH_GUEST_PROPS
    uint32_t uGuestPropSvcClientID;
    if (RT_SUCCESS(rc))
    {
        rc = VbglR3GuestPropConnect(&uGuestPropSvcClientID);
        if (RT_FAILURE(rc))
            LogRel(("VBoxClient: Cannot connect to guest property service while chcking for host version! rc = %Rrc\n", rc));
    }

    if (RT_SUCCESS(rc))
    {
        char *pszHostVersion;
        char *pszGuestVersion;
        bool bUpdate;

        rc = VbglR3HostVersionCheckForUpdate(uGuestPropSvcClientID, &bUpdate, &pszHostVersion, &pszGuestVersion);
        if (RT_SUCCESS(rc))
        {
            if (bUpdate)
            {
                char szMsg[1024];
                char szTitle[64];

                /** @todo add some translation macros here */
                RTStrPrintf(szTitle, sizeof(szTitle), "VirtualBox Guest Additions update available!");
#ifndef VBOX_OSE
                RTStrPrintf(szMsg, sizeof(szMsg), "Your guest is currently running the Guest Additions version %s. "
                                                  "We recommend updating to the latest version (%s) by choosing the "
                                                  "install option from the Devices menu.", pszGuestVersion, pszHostVersion);
#else
/* This is the message which appears for non-Oracle builds of the
* Guest Additions.  Distributors are encouraged to customise this. */
                RTStrPrintf(szMsg, sizeof(szMsg), "Your virtual machine is currently running the Guest Additions version %s. Since you are running a version of the Guest Additions provided by the operating system you installed in the virtual machine we recommend that you update it to at least version %s using that system's update features, or alternatively that you remove this version and then install the " VBOX_VENDOR_SHORT " Guest Additions package using the install option from the Devices menu. Please consult the documentation for the operating system you are running to find out how to update or remove the current Guest Additions package.", pszGuestVersion, pszHostVersion);
#endif
                rc = showNotify(szTitle, szMsg);
                LogRel(("VBoxClient: VirtualBox Guest Additions update available!"));
                if (RT_FAILURE(rc))
                    LogRel(("VBoxClient: Could not show version notifier tooltip! rc = %d\n", rc));
            }

            /* Store host version to not notify again */
            rc = VbglR3HostVersionLastCheckedStore(uGuestPropSvcClientID, pszHostVersion);

            VbglR3GuestPropReadValueFree(pszHostVersion);
            VbglR3GuestPropReadValueFree(pszGuestVersion);
        }
        VbglR3GuestPropDisconnect(uGuestPropSvcClientID);
    }
# endif /* VBOX_WITH_GUEST_PROPS */
    VbglR3Term();
    LogFlowFunc(("returning %Rrc\n", rc));
    return rc;
}
示例#5
0
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),contactModel(parent)
{

  QWidget *centralWidget = new QWidget(this);
  setCentralWidget(centralWidget);
  createActions();

  createMenus();
  const QString mainQmlApp = QLatin1String("qrc:///qml/main.qml");
  view =new QDeclarativeView(this);
  view->rootContext()->setContextProperty("Main", this);
  view->rootContext()->setContextProperty("contactModel", &contactModel);

  view->setSource(QUrl(mainQmlApp));
  // view->setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
  view->setResizeMode(QDeclarativeView::SizeRootObjectToView);
  view->engine()->addImportPath(QString("/opt/qtm12/imports"));
  view->engine()->addPluginPath(QString("/opt/qtm12/plugins"));

  /*test*/

  //  QSharedPointer<Contact> co = QSharedPointer<Contact>(new Contact("piter88", "Petja"));
  //  co->setLastDataMark(QSharedPointer<DataMark>(new DataMark(0, 59.938994,30.315857, "QString label",
  //                                                                 "QString description", "QString url", QDateTime::currentDateTime())));
  //  contactModel.addContact(co);

  //  QSharedPointer<Contact> con = QSharedPointer<Contact>(new Contact("marja", "Mother"));
  //  con->setLastDataMark(QSharedPointer<DataMark>(new DataMark(0,59.925657,30.296165, "QString label",
  //                                                                 "QString description", "QString url", QDateTime::currentDateTime().addSecs(-3800))));
  //  contactModel.addContact(con);

  //  QSharedPointer<Contact> contact = QSharedPointer<Contact>(new Contact("vred", "Vasja"));
  //  contact->setLastDataMark(QSharedPointer<DataMark>(new DataMark(0,59.945152,31.371842, "QString label",
  //                                                                 "QString description", "QString url", QDateTime::currentDateTime().addSecs(-9600))));
  //  contactModel.addContact(contact);
  //  QSharedPointer<Contact> cont= QSharedPointer<Contact>(new Contact("quen", "daughter"));
  //  cont->setLastDataMark(QSharedPointer<DataMark>(new DataMark(0,59.94376,30.368825, "QString label",
  //                                                                 "QString description", "QString url", QDateTime::currentDateTime())));
  //  contactModel.addContact(cont);

  /*test*/

  client =new Client(&contactModel, this);
  //   view->rootContext()->setContextProperty("Client", client);

  //qmlRegisterType<ContactModel>();

  QObject* rootObject = dynamic_cast<QObject*>(view->rootObject());
  QObject::connect(authAction, SIGNAL(triggered()), rootObject, SLOT(showLoginView()));
  QObject::connect(client, SIGNAL(error(QVariant)), rootObject, SLOT(incorrect(QVariant)));
  QObject::connect(client, SIGNAL(authentificated(QVariant)), rootObject, SLOT(entered(QVariant)));

  QObject::connect(trackingAction, SIGNAL(triggered()), rootObject, SLOT(showTrackSettings()));
  connect(client, SIGNAL(registrationRequestConfirm()),rootObject,SLOT(showNotify()));

  #if defined(Q_WS_MAEMO_5)
  view->setGeometry(QRect(0,0,800,480));
  view->showFullScreen();
  #elif defined(Q_WS_S60)
  view->setGeometry(QRect(0,0,640,360));
  view->showFullScreen();
  #else
  view->setGeometry(QRect(100,100,800, 480));
  view->show();
  #endif
  QVBoxLayout *mainLayout = new QVBoxLayout();
  mainLayout->addWidget(view);
  centralWidget->setLayout(mainLayout);

}
示例#6
0
void TinyMainWindow::on_action_playlist_quick_save_2_triggered()
{
	if (savePlaylist("_quick_save_2_", true)) {
		showNotify(tr("Quick Save 2 was completed"));
	}
}
示例#7
0
void CEngine::handleEvents()
{
	while ( SDL_PollEvent( &event ) ) 
	{
		switch ( event.type ) 
		{
		case SDL_KEYDOWN:			 
			keyPressed( event.key.keysym.sym );
			break;
 
		case SDL_KEYUP:
			keyReleased( event.key.keysym.sym );
			break;
 
		case SDL_QUIT:
			isRunning = true;
			break;
 
		case SDL_MOUSEMOTION:
			if(m_showCursor)
				mouseMoved(
					event.button.button, 
					event.motion.x, 
					event.motion.y, 
					event.motion.xrel, 
					event.motion.yrel);
			break;
 
		case SDL_MOUSEBUTTONUP:
			if(m_showCursor)
				mouseButtonUp(
					event.button.button, 
					event.motion.x, 
					event.motion.y, 
					event.motion.xrel, 
					event.motion.yrel);
			break;
 
		case SDL_MOUSEBUTTONDOWN:
			if(m_showCursor)
				mouseButtonDown(
					event.button.button, 
					event.motion.x, 
					event.motion.y, 
					event.motion.xrel, 
					event.motion.yrel);
			break;
 
		case SDL_ACTIVEEVENT:
			if ( event.active.state & SDL_APPACTIVE ) 
			{
				if ( event.active.gain ) 
				{
					/* Gain focus */

					m_bMinimized = false;
					showNotify();
				} else 
				{
					/* Lost focus */

					m_bMinimized = true;
					hideNotify();
				}
			}
			
			break;
		} 
	}	
}
示例#8
0
void SettingDlg::accept()
{
    //qDebug("========== setting dlg accept ===============\n");

    cfg->cfg_refreshWhenTabChg = refreshWhenTabChg->isChecked();
    cfg->cfg_cKeyToKill = cKeyToKill->isChecked();
#ifndef ZN5
    cfg->cfg_shortMKeyToOpen = shortMKeyToOpen->isChecked();
#endif
    cfg->cfg_timeHeader = timeHeader->isChecked();
    cfg->cfg_hideAfterRunApp = hideAfterRunApp->isChecked();
    //cfg->cfg_fullScreenStatus = fullScreenStatus->isChecked();
    // task
    cfg->cfg_procFilter = procFilter->isChecked();
    cfg->cfg_showNativeIcon = showNativeIcon->isChecked();
    cfg->cfg_showJavaIcon = showJavaIcon->isChecked();
    cfg->cfg_showJavaName = showJavaName->isChecked();
    cfg->cfg_sendReturnToIdle = sendReturnToIdle->isChecked();
    cfg->cfg_showNativeMgxInfo = showNativeMgxInfo->isChecked();
#ifndef NEW_JAVA_LIST
    cfg->cfg_markItem = markItem->isChecked();
#endif

    // app
    //bool cfg_showFavBigIcon;
    cfg->cfg_showMgxBigIcon = showMgxBigIcon->isChecked();
    cfg->cfg_showMpkgBigIcon = showMpkgBigIcon->isChecked();
#ifndef NEW_JAVA_LIST
    cfg->cfg_runJavaInMult = runJavaInMult->isChecked();
#endif

    //fm
    cfg->cfg_clearBufEveryMultModeInCut = clearBufEveryMultModeInCut->isChecked();
    cfg->cfg_clearBufEveryMultModeInCopy = 	clearBufEveryMultModeInCopy->isChecked();
    cfg->cfg_showHideObj = showHideObj->isChecked();
    cfg->cfg_showMimeType = showMimeType->isChecked();
    cfg->cfg_usrMultiWindow = showMultiWindow->isChecked();

    cfg->lngStr = lngcb->currentText();

    QString octmp = occb->currentText();

    if(octmp != "399" && octmp != "532")
        cfg->cpuLockType = "0";
    else
        cfg->cpuLockType = octmp;
#ifndef NEW_JAVA_LIST
    if(!codeComp->cpcp() && (!refreshWhenTabChg->isChecked() || cKeyToKill->isChecked() || shortMKeyToOpen->isChecked() || procFilter->isChecked() || sendReturnToIdle->isChecked() || markItem->isChecked() ) )
#else
#ifdef ZN5
    if(!codeComp->cpcp() && (!refreshWhenTabChg->isChecked() || cKeyToKill->isChecked() || procFilter->isChecked() || sendReturnToIdle->isChecked() ) )
#else
    if(!codeComp->cpcp() && (!refreshWhenTabChg->isChecked() || cKeyToKill->isChecked() || shortMKeyToOpen->isChecked() || procFilter->isChecked() || sendReturnToIdle->isChecked() ) )
#endif
#endif
    {
        QString text = lng->tr("POP_THIS_FUNCTION_NEED_DONATE")+"\n";
        if( !refreshWhenTabChg->isChecked() )
            text += lng->tr("refreshWhenTabChg")+"::";
        if( cKeyToKill->isChecked() )
            text += lng->tr("cKeyToKill")+"::";
#ifndef ZN5
        if( shortMKeyToOpen->isChecked() )
            text +=	lng->tr("shortMKeyToOpen")+"::";
#endif
        if( procFilter->isChecked() )
            text += lng->tr("procFilter")+"::";
        if(	sendReturnToIdle->isChecked() )
            text += lng->tr("sendReturnToIdle")+"::";
#ifndef NEW_JAVA_LIST
        if(	markItem->isChecked() )
            text += lng->tr("markItem")+"::";
#endif

        showNotify( lng->tr("POP_DONATE"), text, 0, 5 );
    }

    cfg->saveCfg();

    if(cfg->cpuLockType == "0")
        system("pmtool -d 1");

    isCancel = false;

    //qDebug("========== setting dlg accept end ===============\n");

    MyBaseDlg::reject();
}