Commit 7ba778db authored by Simon Josefsson's avatar Simon Josefsson

Imported Upstream version 3.1.13

parent 08a31e66
Copyright (C) 2011-2013 Yubico AB. All rights reserved.
Copyright (C) 2011-2014 Yubico AB. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
......
2014-01-10 Klas Lindfors <klas@yubico.com>
* NEWS: NEWS for 3.1.13
2014-01-10 Klas Lindfors <klas@yubico.com>
* : commit be3540fa8b3c5e9dc45b5587b4b427f28dde9fd8 Author:
mistertoh <mralvintoh@gmail.com> Date: Fri Jan 10 11:20:10 2014
+0100
2014-01-10 Klas Lindfors <klas@yubico.com>
* src/ui/toolpage.cpp, src/ui/toolpage.ui: don't use placeholder for
the default neo url, just set it as text and improve reset on Ndef page
2014-01-07 Klas Lindfors <klas@yubico.com>
* src/ui/toolpage.cpp, src/ui/toolpage.ui: change the NDEF example
to be the default string
2014-01-07 Klas Lindfors <klas@yubico.com>
* COPYING, resources/win/resources.rc, src/ui/chalresppage.cpp,
src/ui/chalresppage.h, src/ui/mainwindow.cpp, src/ui/mainwindow.h,
src/ui/oathpage.cpp, src/ui/oathpage.h, src/ui/otppage.cpp,
src/ui/otppage.h, src/ui/settingpage.cpp, src/ui/settingpage.h,
src/ui/staticpage.cpp, src/ui/staticpage.h, src/ui/toolpage.cpp,
src/ui/toolpage.h, src/ui/yubiaccbox.cpp, src/ui/yubiaccbox.h,
src/version.h, src/yubikeyfinder.cpp, src/yubikeyfinder.h,
src/yubikeywriter.cpp, src/yubikeywriter.h: bump copyright
2014-01-07 Klas Lindfors <klas@yubico.com>
* src/ui/chalresppage.cpp, src/ui/chalresppage.h,
src/ui/helpbox.ui, src/ui/mainwindow.cpp, src/ui/mainwindow.h,
src/ui/oathpage.cpp, src/ui/oathpage.h, src/ui/otppage.cpp,
src/ui/otppage.h, src/ui/settingpage.cpp, src/ui/settingpage.h,
src/ui/staticpage.cpp, src/ui/staticpage.h, src/ui/toolpage.cpp,
src/ui/toolpage.h, src/ui/yubiaccbox.cpp, src/ui/yubiaccbox.h: make
the help pages non-modal and make it a child of mainwindow and just send signals there when
we want it shown.
2014-01-07 Klas Lindfors <klas@yubico.com>
* src/ui/diagnostics.ui, src/ui/mainwindow.cpp: make the diagnostics
window non-modal
2014-01-03 Klas Lindfors <klas@yubico.com>
* src/yubikeyfinder.cpp: clear touchLevel when initing
2014-01-03 Klas Lindfors <klas@yubico.com>
* src/yubikeyfinder.cpp: add touch level to key diagnostics
2014-01-03 Klas Lindfors <klas@yubico.com>
* src/yubikeywriter.cpp: more diagnostics for successful write-key
operations
2014-01-03 Klas Lindfors <klas@yubico.com>
* src/ui/diagnostics.cpp, src/ui/diagnostics.h: add an info
diagnostics message with varios versions
2014-01-03 Klas Lindfors <klas@yubico.com>
* src/yubikeyfinder.cpp: force serial to a string in diagnostic
message otherwise we will call the wrong arg()
2014-01-03 Klas Lindfors <klas@yubico.com>
* src/yubikeyfinder.cpp, src/yubikeywriter.cpp: add qualifier to usb
errors.
2014-01-03 Klas Lindfors <klas@yubico.com>
* src/ui/diagnostics.cpp: add date to the diagnostic messages
2014-01-03 Klas Lindfors <klas@yubico.com>
* src/yubikeyfinder.cpp: add diagnostic message when a key is
inserted
2014-01-03 Klas Lindfors <klas@yubico.com>
* YKPersonalization.pro, src/ui/diagnostics.cpp,
src/ui/diagnostics.h, src/ui/diagnostics.ui, src/ui/mainwindow.cpp,
src/ui/mainwindow.h, src/ui/mainwindow.ui, src/yubikeyfinder.cpp,
src/yubikeyfinder.h, src/yubikeywriter.cpp, src/yubikeywriter.h: add
a diagnostics view with more complete error messages
2014-01-02 Klas Lindfors <klas@yubico.com>
* src/ui/settingpage.ui: try to make version compability on
settingpage clearer
2013-12-30 Klas Lindfors <klas@yubico.com>
* NEWS, YKPersonalization.pro: bump versions after release
2013-12-30 Klas Lindfors <klas@yubico.com>
* NEWS: NEWS for 3.1.12
......
yubikey-personalization-gui NEWS -- History of user-visible changes. -*- outline -*-
* Version 3.1.13 (released 2014-01-10)
** Add a diagnostics view by right-clicking the Yubico logo
shows a window with info about what's happening.
** Make the help window non-modal so it can be open while interacting with
the interface.
** Change the NDEF-URL placeholder to a default string.
* Version 3.1.12 (released 2013-12-30)
** Text fixes.
......
......@@ -3,7 +3,7 @@
#
VERSION_MAJOR = 3
VERSION_MINOR = 1
VERSION_BUILD = 12
VERSION_BUILD = 13
VERSION = "$${VERSION_MAJOR}.$${VERSION_MINOR}.$${VERSION_BUILD}"
APP_NAME = $$quote(YubiKey Personalization Tool)
......@@ -64,6 +64,7 @@ FORMS += \
src/ui/confirmbox.ui \
src/ui/chalresppage.ui \
src/ui/aboutpage.ui \
src/ui/diagnostics.ui \
src/ui/yubiaccbox.ui
HEADERS += \
......@@ -78,6 +79,7 @@ HEADERS += \
src/ui/confirmbox.h \
src/ui/chalresppage.h \
src/ui/aboutpage.h \
src/ui/diagnostics.h \
src/ui/yubiaccbox.h \
src/yubikeywriter.h \
src/yubikeyutil.h \
......@@ -103,6 +105,7 @@ SOURCES += \
src/ui/chalresppage.cpp \
src/ui/aboutpage.cpp \
src/ui/yubiaccbox.cpp \
src/ui/diagnostics.cpp \
src/yubikeywriter.cpp \
src/yubikeyutil.cpp \
src/yubikeylogger.cpp \
......
......@@ -14,7 +14,7 @@ BEGIN
VALUE "FileDescription", VER_FILEDESCRIPTION_STR
VALUE "FileVersion", VERSION_WIN_STR
VALUE "InternalName", VER_INTERNALNAME_STR
VALUE "LegalCopyright", "Copyright 2011-2013 Yubico"
VALUE "LegalCopyright", "Copyright 2011-2014 Yubico"
VALUE "OriginalFilename", VER_ORIGINALFILENAME_STR
VALUE "ProductName", VER_PRODUCTNAME_STR
VALUE "ProductVersion", VERSION_WIN_STR
......
......@@ -122,7 +122,7 @@ enum AccMode {
//Warnings
#define OVERWRITE_CONF_SLOT1 tr("Overwrite configuration slot 1?")
#define WARN_OVERWRITE_CONF_SLOT1 tr("By re-programming Slot 1 of your YubiKey, you will lose ALL abilities to authenticate against Yubico online severs, forum, Wiki, etc. (unless you upload your new configuration to Yubico server)\n\nAre you sure you want to overwrite the configuration slot 1?")
#define WARN_OVERWRITE_CONF_SLOT1 tr("If you have a YubiKey VIP, this slot should contain a Symantec VIP credential by default. You should refrain from rewriting this Slot as a Symantec VIP credential can only be programmed during manufacture - you will thus not be able to get a new one.\n\nIf you have any other YubiKey, this slot should contain a Yubico OTP credential by default. This credential is required for using the YubiKey with many of our services and that of our partners. If you overwrite this and want to use it again later, you will need to reprogram it and upload the new one to our YubiCloud validation service.\n\nAre you sure you want to overwrite the configuration slot 1?")
#define RESTORE_SETTING tr("Restore default settings?")
#define WARN_RESTORE_SETTING tr("Are you sure you want to restore the default settings?")
......
/*
Copyright (C) 2011-2013 Yubico AB. All rights reserved.
Copyright (C) 2011-2014 Yubico AB. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
......@@ -194,13 +194,9 @@ void ChalRespPage::connectHelpButtons() {
mapper->setMapping(ui->advSecretKeyHelpBtn, HelpBox::Help_SecretKey);
//Connect the mapper
connect(mapper, SIGNAL(mapped(int)), this, SLOT(helpBtn_pressed(int)));
}
void ChalRespPage::helpBtn_pressed(int helpIndex) {
HelpBox help(this);
help.setHelpIndex((HelpBox::Help)helpIndex);
help.exec();
connect(mapper, SIGNAL(mapped(int)), this, SIGNAL(showHelp(int)));
connect(ui->quickConfigProtectionBox, SIGNAL(showHelp(int)), this, SIGNAL(showHelp(int)));
connect(ui->advConfigProtectionBox, SIGNAL(showHelp(int)), this, SIGNAL(showHelp(int)));
}
void ChalRespPage::keyFound(bool found, bool* featuresMatrix) {
......
/*
Copyright (C) 2011-2013 Yubico AB. All rights reserved.
Copyright (C) 2011-2014 Yubico AB. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
......@@ -75,7 +75,6 @@ private:
private slots:
void connectPages();
void connectHelpButtons();
void helpBtn_pressed(int helpIndex);
void keyFound(bool found, bool* featuresMatrix);
void clearState();
......@@ -135,6 +134,7 @@ private slots:
signals:
void showStatusMessage(const QString &text, int status = 0);
void showHelp(int helpIndex);
};
#endif // CHALRESPPAGE_H
/*
Copyright (C) 2014 Yubico AB. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "ui/diagnostics.h"
#include "ui_diagnostics.h"
#include "yubikeywriter.h"
#include "yubikeyfinder.h"
#include "version.h"
#include <ykpers-version.h>
Diagnostics::Diagnostics(QWidget *parent) :
QDialog(parent),
ui(new Ui::Diagnostics)
{
ui->setupUi(this);
ui->txtBrowser->clear();
connect(YubiKeyWriter::getInstance(), SIGNAL(errorOccurred(QString)),
this, SLOT(addDiagnostic(QString)));
connect(YubiKeyWriter::getInstance(), SIGNAL(diagnostics(QString)),
this, SLOT(addDiagnostic(QString)));
connect(YubiKeyFinder::getInstance(), SIGNAL(errorOccurred(QString)),
this, SLOT(addDiagnostic(QString)));
connect(YubiKeyFinder::getInstance(), SIGNAL(diagnostics(QString)),
this, SLOT(addDiagnostic(QString)));
connect(ui->buttonBox, SIGNAL(clicked(QAbstractButton*)),
this, SLOT(clicked(QAbstractButton*)));
setup();
}
Diagnostics::~Diagnostics() {
delete ui;
}
void Diagnostics::addDiagnostic(QString text) {
QDateTime ts = QDateTime::currentDateTime();
ui->txtBrowser->append(ts.toString("yyyy-MM-ddThh:mm:ss; ") + text);
}
void Diagnostics::clicked(QAbstractButton *button) {
if(ui->buttonBox->buttonRole(button) == QDialogButtonBox::ResetRole) {
setup();
}
}
void Diagnostics::setup() {
ui->txtBrowser->clear();
addDiagnostic(QString("App_version: %1; Lib_version: %2; QT_version: %3; OS_version: %4; Word_size: %5")
.arg(VER_PRODUCTVERSION_STR, ykpers_check_version(NULL), qVersion(), osVersion(), QString::number(QSysInfo::WordSize)));
}
QString Diagnostics::osVersion() {
#ifdef Q_OS_LINUX
return "Linux";
#elif defined(Q_OS_MAC)
QString mac = "OS X ";
switch(QSysInfo::MacintoshVersion) {
case QSysInfo::MV_LEOPARD:
mac += "Leopard";
break;
case QSysInfo::MV_SNOWLEOPAD:
mac += "SnowLeopard";
break;
case QSysInfo::MV_LION:
mac += "Lion";
break;
case QSysInfo::MV_MOUNTAINLION:
mac += "MountainLion";
break;
case QSysInfo::MV_MAVERICKS:
mac += "Mavericks";
break;
default:
mac += "unknown";
break;
}
return mac;
#elif defined(Q_OS_WIN32)
QString win = "Windows ";
switch(QSysInfo::WindowsVersion) {
case QSysInfo::WV_2000:
win += "2000";
break;
case QSysInfo::WV_XP:
win += "XP";
break;
case QSysInfo::WV_2003:
win += "2003";
break;
case QSysInfo::WV_VISTA:
win += "Vista";
break;
case QSysInfo::WV_WINDOWS7:
win += "7";
break;
case QSysInfo::WV_WINDOWS8:
win += "8";
break;
default:
win += "unknown";
break;
}
return win;
#endif
return "Unknown OS";
}
/*
Copyright (C) 2014 Yubico AB. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef DIAGNOSTICS_H
#define DIAGNOSTICS_H
#include <QDialog>
#include <QAbstractButton>
namespace Ui {
class Diagnostics;
}
class Diagnostics : public QDialog {
Q_OBJECT
public:
explicit Diagnostics(QWidget *parent = 0);
~Diagnostics();
private:
Ui::Diagnostics *ui;
QString osVersion();
void setup();
private slots:
void addDiagnostic(QString text);
void clicked(QAbstractButton *button);
};
#endif // DIAGNOSTICS_H
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Diagnostics</class>
<widget class="QDialog" name="Diagnostics">
<property name="windowModality">
<enum>Qt::NonModal</enum>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>500</width>
<height>260</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>500</width>
<height>100</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>500</width>
<height>260</height>
</size>
</property>
<property name="windowTitle">
<string>YubiKey Diagnostics</string>
</property>
<property name="styleSheet">
<string notr="true">font: 11px &quot;Verdana&quot;;
color: rgb(0, 0, 0);</string>
</property>
<property name="sizeGripEnabled">
<bool>false</bool>
</property>
<widget class="QWidget" name="verticalLayoutWidget">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>481</width>
<height>241</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QTextBrowser" name="txtBrowser">
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true">font: 11px &quot;Verdana&quot;;</string>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="autoFormatting">
<set>QTextEdit::AutoBulletList</set>
</property>
<property name="undoRedoEnabled">
<bool>false</bool>
</property>
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Verdana'; font-size:11px; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Close|QDialogButtonBox::Reset</set>
</property>
<property name="centerButtons">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>Diagnostics</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>Diagnostics</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>
......@@ -3,7 +3,7 @@
<class>HelpBox</class>
<widget class="QDialog" name="HelpBox">
<property name="windowModality">
<enum>Qt::ApplicationModal</enum>
<enum>Qt::NonModal</enum>
</property>
<property name="geometry">
<rect>
......
/*
Copyright (C) 2011-2013 Yubico AB. All rights reserved.
Copyright (C) 2011-2014 Yubico AB. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
......@@ -38,6 +38,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "ui/toolpage.h"
#include "ui/settingpage.h"
#include "ui/aboutpage.h"
#include "ui/diagnostics.h"
#include "ui/helpbox.h"
#include "common.h"
#include "version.h"
......@@ -81,6 +83,13 @@ MainWindow::MainWindow(QWidget *parent) :
connect(m_aboutPage, SIGNAL(changePage(int)),
this, SLOT(setCurrentPage(int)));
connect(m_otpPage, SIGNAL(showHelp(int)), this, SLOT(triggerHelp(int)));
connect(m_oathPage, SIGNAL(showHelp(int)), this, SLOT(triggerHelp(int)));
connect(m_staticPage, SIGNAL(showHelp(int)), this, SLOT(triggerHelp(int)));
connect(m_chalRespPage, SIGNAL(showHelp(int)), this, SLOT(triggerHelp(int)));
connect(m_settingPage, SIGNAL(showHelp(int)), this, SLOT(triggerHelp(int)));
connect(m_toolPage, SIGNAL(showHelp(int)), this, SLOT(triggerHelp(int)));
connect(m_settingPage, SIGNAL(settingsChanged()),
m_otpPage, SLOT(loadSettings()));
connect(m_settingPage, SIGNAL(settingsChanged()),
......@@ -111,6 +120,12 @@ MainWindow::MainWindow(QWidget *parent) :
connect(animationAction, SIGNAL(triggered(bool)), this, SLOT(toggleAnimation(bool)));
ui->deviceImage->addAction(animationAction);
// add action for diagnostics
diagnosticsAction = new QAction(this);
diagnosticsAction->setText("Show detailed diagnostics");
connect(diagnosticsAction, SIGNAL(triggered()), this, SLOT(triggerDiagnostics()));
ui->logoImg->addAction(diagnosticsAction);
QSettings settings;
if(settings.value(SG_ANIMATIONS_PREFERENCE, true).toBool()) {
animationAction->setChecked(true);
......@@ -132,7 +147,11 @@ MainWindow::~MainWindow()
delete m_toolPage;
delete m_aboutPage;
delete m_diagnostics;
delete m_help;
delete animationAction;
delete diagnosticsAction;
delete ui;
}
......@@ -151,6 +170,9 @@ void MainWindow::createPages() {
m_toolPage = new ToolPage(this);
m_aboutPage = new AboutPage(this);
m_diagnostics = new Diagnostics(this);
m_help = new HelpBox(this);
//Add pages to the pages widget
ui->pagesWidget->addWidget(m_otpPage);
ui->pagesWidget->addWidget(m_oathPage);
......@@ -604,3 +626,12 @@ void MainWindow::toggleAnimation(bool checked) {
}
}
}
void MainWindow::triggerDiagnostics() {
m_diagnostics->show();
}
void MainWindow::triggerHelp(int index) {
m_help->setHelpIndex((HelpBox::Help)index);
m_help->show();
}
/*
Copyright (C) 2011-2013 Yubico AB. All rights reserved.
Copyright (C) 2011-2014 Yubico AB. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
......@@ -40,6 +40,9 @@ class ChalRespPage;
class SettingPage;
class AboutPage;
class Diagnostics;
class HelpBox;
class QStackedWidget;
namespace Ui {
......@@ -76,9 +79,13 @@ private:
ToolPage *m_toolPage;
AboutPage *m_aboutPage;
Diagnostics *m_diagnostics;
HelpBox *m_help;
QTimer *m_timer;
QAction *animationAction;
QAction *diagnosticsAction;
void createPages();
......@@ -99,6 +106,8 @@ private slots:
void on_serialNoModhexCopyBtn_clicked();
void toggleAnimation(bool checked);
void triggerDiagnostics();
void triggerHelp(int index);
};
#endif // MAINWINDOW_H
......@@ -515,6 +515,9 @@ background-color: rgb(255, 255, 255);</string>
<height>60</height>
</rect>
</property>
<property name="contextMenuPolicy">
<enum>Qt::ActionsContextMenu</enum>
</property>
<property name="styleSheet">
<string notr="true">font-weight: normal;</string>
</property>
......
/*
Copyright (C) 2011-2013 Yubico AB. All rights reserved.
Copyright (C) 2011-2014 Yubico AB. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
......@@ -187,13 +187,8 @@ void OathPage::connectHelpButtons() {
mapper->setMapping(ui->advSecretKeyHelpBtn, HelpBox::Help_SecretKey);
//Connect the mapper
connect(mapper, SIGNAL(mapped(int)), this, SLOT(helpBtn_pressed(int)));
}
void OathPage::helpBtn_pressed(int helpIndex) {
HelpBox help(this);
help.setHelpIndex((HelpBox::Help)helpIndex);
help.exec();
connect(mapper, SIGNAL(mapped(int)), this, SIGNAL(showHelp(int)));
connect(ui->advConfigProtectionBox, SIGNAL(showHelp(int)), this, SIGNAL(showHelp(int)));
}
void OathPage::keyFound(bool found, bool* featuresMatrix) {
......
/*
Copyright (C) 2011-2013 Yubico AB. All rights reserved.
Copyright (C) 2011-2014 Yubico AB. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
......@@ -82,7 +82,6 @@ public slots:
private slots:
void connectPages();
void connectHelpButtons();
void helpBtn_pressed(int helpIndex);
void keyFound(bool found, bool* featuresMatrix);
void updatePrefix();
......@@ -145,6 +144,7 @@ private slots:
signals:
void showStatusMessage(const QString &text, int status = 0);
void showHelp(int helpIndex);
};
#endif // OATHPAGE_H
/*
Copyright (C) 2011-2013 Yubico AB. All rights reserved.
Copyright (C) 2011-2014 Yubico AB. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
......@@ -169,13 +169,8 @@ void OtpPage::connectHelpButtons() {
mapper->setMapping(ui->advSecretKeyHelpBtn, HelpBox::Help_SecretKey);
//Connect the mapper
connect(mapper, SIGNAL(mapped(int)), this, SLOT(helpBtn_pressed(int)));