示例#1
0
    void timerCallback()
    {
        long peak=0;
        String notifyStr;

        if (m_mainWindow->m_dpc.getDPCPeak(peak)==DPC_NO_ERROR)
        {
            meter->setValue(peak);
            if (peak > maxval)
            {
                maxval=peak;
                String str;
                str << maxval << " us";
                m_max->setText(str,false);

                if (maxval < maxDpcUs_LowLatency)
                    setInfoMessage (0);
                else if (maxval < maxDpcUs_Normal)
                    setInfoMessage (1);
                else if (maxval < maxDpcUs_Safe1)
                    setInfoMessage (2);
                else
                    setInfoMessage (3);
            }
        }
        else
        {
            setInfoMessage (4);
        }
    }
示例#2
0
void QtAddWengoAccount::load(const SipAccount & sipAccount) {
	if (sipAccount.getType() == SipAccount::SipAccountTypeWengo) {
		const WengoAccount & wengoAccount = dynamic_cast<const WengoAccount &>(sipAccount);
		_ui->email->setText(QString::fromStdString(wengoAccount.getWengoLogin()));
		_ui->password->setText(QString::fromStdString(wengoAccount.getWengoPassword()));
		setInfoMessage();
	} else {
		LOG_DEBUG("SIP getType() = SipAccount::SipAccountTypeBasic");
		//_loginDialog->changePage(QtLoginDialog::AddSIPAccount, sipAccount);
	}
}
MessageViewAdapter::MessageViewAdapter()
: d(new MessageViewAdapterPrivate)
{
    QWidget* widget = new QWidget;
    widget->installEventFilter(this);
    d->setupUi(widget);
    d->mMessageWidget->setCloseButtonVisible(false);
    d->mMessageWidget->setWordWrap(true);

    setInfoMessage(i18n("No document selected"));

    widget->setAutoFillBackground(true);
    widget->setBackgroundRole(QPalette::Base);
    widget->setForegroundRole(QPalette::Text);

    QGraphicsProxyWidget* proxy = new QGraphicsProxyWidget;
    proxy->setWidget(widget);
    setWidget(proxy);
}
示例#4
0
void QtAddWengoAccount::load(std::string sipAccountName) {
	//load userprofile
	UserProfile * userProfile = _cUserProfileHandler.getUserProfileHandler().getUserProfile(sipAccountName);
	if (userProfile && userProfile->hasSipAccount()) {
		//tests account type
		if (userProfile->hasWengoAccount()) {
			//loads the wengo acccount
			WengoAccount * wengoAccount = userProfile->getWengoAccount();
			_ui->email->setText(QString::fromStdString(wengoAccount->getWengoLogin()));
			_ui->password->setText(QString::fromStdString(wengoAccount->getWengoPassword()));
			setInfoMessage();
		} else {
			//should be loaded as a sip account
			//_loginDialog->changePage(QtLoginDialog::AddSIPAccount, sipAccountName);//VOXOX CHANGE by Rolando 02-25-09
			_loginDialog->changePage(QtLoginDialog::AddVoxOxAccount, sipAccountName);//VOXOX CHANGE by Rolando 02-25-09

		}
	} else {
		//_loginDialog->changePage(QtLoginDialog::AddAccount);//VOXOX CHANGE by Rolando 02-25-09
		_loginDialog->changePage(QtLoginDialog::AddVoxOxAccount, sipAccountName);//VOXOX CHANGE by Rolando 02-25-09

	}
	OWSAFE_DELETE(userProfile);
}
示例#5
0
void QtAddWengoAccount::initPage() {
	_ui->email->setFocus();
	_ui->loginButton->setDefault(true);
	setInfoMessage();
}