コード例 #1
0
ToolPage::ToolPage(QWidget *parent) :
        QStackedWidget(parent),
        ui(new Ui::ToolPage)
{
    ui->setupUi(this);

    //Connect pages
    connectPages();

    //Connect help buttons
    connectHelpButtons();

    //Connect other signals and slots
    connect(ui->converterResetBtn, SIGNAL(clicked()),
            this, SLOT(resetConverterPage()));
    connect(ui->chalRespResetBtn, SIGNAL(clicked()),
            this, SLOT(resetChalRespPage()));
    connect(ui->chalRespPerformBtn, SIGNAL(clicked()),
            this, SLOT(performChallengeResponse()));
    connect(ui->chalRespChallenge, SIGNAL(editingFinished()),
            this, SLOT(on_chalRespChallenge_editingFinished()));
    connect(ui->ndefResetBtn, SIGNAL(clicked()),
            this, SLOT(resetNdefPage()));
    connect(ui->ndefProgramBtn, SIGNAL(clicked()),
            this, SLOT(programNdef()));

    connect(YubiKeyFinder::getInstance(), SIGNAL(keyFound(bool, bool*)),
            this, SLOT(keyFound(bool, bool*)));
}
コード例 #2
0
void ToolPage::setCurrentPage(int pageIndex) {
    //Page changed...

    m_currentPage = pageIndex;

    switch(pageIndex){
    case Page_Converter:
        resetConverterPage();
        break;
    }

    setCurrentIndex(pageIndex);
}