summaryrefslogtreecommitdiffstats
path: root/installerbuilder/libinstaller
diff options
context:
space:
mode:
authorkh1 <qt-info@nokia.com>2011-03-18 10:22:02 +0100
committerkh1 <qt-info@nokia.com>2011-03-18 10:22:02 +0100
commit66aad9f9d73c6ba57579a7e90706f4ea50422b5b (patch)
treee59e19323576407644e876e58954e9c9c2b8c826 /installerbuilder/libinstaller
parent9417642f3a11195c63a6364b5922bede52478dfb (diff)
parent1b8e428f2964db3cb80f6ed344d1d264c2c65af7 (diff)
Merge branch 'master' into refactor
Conflicts: installerbuilder/libinstaller/qinstallergui.h
Diffstat (limited to 'installerbuilder/libinstaller')
-rw-r--r--installerbuilder/libinstaller/qinstallergui.cpp10
-rw-r--r--installerbuilder/libinstaller/qinstallergui.h29
2 files changed, 34 insertions, 5 deletions
diff --git a/installerbuilder/libinstaller/qinstallergui.cpp b/installerbuilder/libinstaller/qinstallergui.cpp
index 4b3a074bc..5d0695bb3 100644
--- a/installerbuilder/libinstaller/qinstallergui.cpp
+++ b/installerbuilder/libinstaller/qinstallergui.cpp
@@ -726,17 +726,23 @@ LicenseAgreementPage::LicenseAgreementPage(Installer *inst)
#endif
m_acceptRadioButton = new QRadioButton(this);
- QLabel *acceptLabel = new QLabel(tr("I have read and agree to the following terms contained in "
+ m_acceptRadioButton->setShortcut(QKeySequence(tr("Alt+A", "agree license")));
+ QLabel *acceptLabel = new QLabel(tr("I h<u>a</u>ve read and agree to the following terms contained in "
"the license agreements accompanying the Qt SDK and additional items. I agree that my use of "
"the Qt SDK is governed by the terms and conditions contained in these license agreements."));
acceptLabel->setWordWrap(true);
+ ClickForwarder* acceptClickForwarder = new ClickForwarder(m_acceptRadioButton);
+ acceptLabel->installEventFilter(acceptClickForwarder);
m_rejectRadioButton = new QRadioButton(this);
- QLabel *rejectLabel = new QLabel(tr("I do not accept the terms and conditions of the above "
+ m_rejectRadioButton->setShortcut(QKeySequence(tr("Alt+N", "do not agree license")));
+ QLabel *rejectLabel = new QLabel(tr("I do <u>n</u>ot accept the terms and conditions of the above "
"listed license agreements. Please note by checking the box, you must cancel the "
"installation or downloading the Qt SDK and must destroy all copies, or portions thereof, "
"of the Qt SDK in your possessions."));
rejectLabel->setWordWrap(true);
+ ClickForwarder* rejectClickForwarder = new ClickForwarder(m_rejectRadioButton);
+ rejectLabel->installEventFilter(rejectClickForwarder);
QSizePolicy sizePolicy3(QSizePolicy::Preferred, QSizePolicy::Minimum);
sizePolicy3.setHeightForWidth(rejectLabel->sizePolicy().hasHeightForWidth());
diff --git a/installerbuilder/libinstaller/qinstallergui.h b/installerbuilder/libinstaller/qinstallergui.h
index 0962d6cd8..ea5a35ce5 100644
--- a/installerbuilder/libinstaller/qinstallergui.h
+++ b/installerbuilder/libinstaller/qinstallergui.h
@@ -26,12 +26,15 @@
#ifndef QINSTALLER_GUI_H
#define QINSTALLER_GUI_H
-#include <QtGui/QWizard>
-#include <QtCore/QMetaType>
-
#include "qinstaller.h"
#include "messageboxhandler.h"
+#include <QtCore/QEvent>
+#include <QtCore/QMetaType>
+
+#include <QtGui/QAbstractButton>
+#include <QtGui/QWizard>
+
// FIXME: move to private classes
QT_BEGIN_NAMESPACE
class QCheckBox;
@@ -426,4 +429,24 @@ Q_SIGNALS:
} //namespace QInstaller
+class ClickForwarder : public QObject
+{
+ Q_OBJECT
+public:
+ explicit ClickForwarder(QAbstractButton* button) : m_abstractButton(button) {}
+
+protected:
+ bool eventFilter(QObject *object, QEvent *event)
+ {
+ if (event->type() == QEvent::MouseButtonRelease) {
+ m_abstractButton->click();
+ return true;
+ }
+ // standard event processing
+ return QObject::eventFilter(object, event);
+ }
+private:
+ QAbstractButton* m_abstractButton;
+};
+
#endif // QINSTALLER_GUI_H