Example #1
0
AuthenticationWizard::AuthenticationWizard(
        KTp::ChannelAdapter *chAdapter,
        const QString &contact,
        QWidget *parent,
        bool initiate,
        const QString &question)
    : QWizard(parent),
    chAdapter(chAdapter),
    contact(contact),
    question(question),
    initiate(initiate)
{

	wizardList.append(this);
	setAttribute(Qt::WA_DeleteOnClose);

	setPage(Page_SelectMethod, createIntroPage());
	setPage(Page_QuestionAnswer, createQAPage());
	setPage(Page_SharedSecret, createSSPage());
	setPage(Page_ManualVerification, createMVPage());
	setPage(Page_Wait1, new WaitPage(i18n("Waiting for <b>%1</b>...", contact)));
	setPage(Page_Wait2, new WaitPage(i18n("Checking if answers match...")));
	setPage(Page_Final, createFinalPage());

	if(!initiate) {
		if(question.isEmpty()) {
			setStartId(Page_SharedSecret);
		} else {
			setStartId(Page_QuestionAnswer);
		}
	}

	connect(this, SIGNAL(rejected()), this, SLOT(cancelVerification()));
	connect(rbQA, SIGNAL(clicked()), this, SLOT(updateInfoBox()));
	connect(rbSS, SIGNAL(clicked()), this, SLOT(updateInfoBox()));
	connect(rbMV, SIGNAL(clicked()), this, SLOT(updateInfoBox()));

	updateInfoBox();

	resize(rbMV->width() * 1.05, rbMV->width() * 0.5);
	show();
}
bool Simulation::frameRenderingQueued(const Ogre::FrameEvent& evt) {
    if(!BaseApplication::frameRenderingQueued(evt)) {
        return false;
	}

    mWorld->update(int(evt.timeSinceLastFrame * 1000));

    // Make sure mSelectedLifeForm hasn't been deleted
    if(!mWorld->hasLifeForm(mSelectedLifeForm)) {
        mSelectedLifeForm = NULL;
        selectLifeForm(NULL);
	}

    calculateCameraMovement();
    mCamera->setPosition(mCamera->getPosition() + mCameraMovement * evt.timeSinceLastFrame);

    updateInfoBox();

    return true;
}
Example #3
0
void ModelFramesWidget::selectedModelChanged(const QModelIndex& n,
                                             const QModelIndex&) {
    updateInfoBox(gmodel, (ModelFrame*)n.internalPointer());
    selectedFrameChanged((ModelFrame*)n.internalPointer());
}