summarylogtreecommitdiffstats
path: root/openmv-ide.qs
diff options
context:
space:
mode:
authoryjun1232020-08-01 21:23:30 +0800
committeryjun1232020-08-01 21:23:30 +0800
commit310bf7b6b0e033de51c2a4a655209a8a1bf5faca (patch)
tree570f3f1590ef70a8def7aaa63cb82071a255dc5e /openmv-ide.qs
downloadaur-310bf7b6b0e033de51c2a4a655209a8a1bf5faca.tar.gz
initial commit
Diffstat (limited to 'openmv-ide.qs')
-rw-r--r--openmv-ide.qs81
1 files changed, 81 insertions, 0 deletions
diff --git a/openmv-ide.qs b/openmv-ide.qs
new file mode 100644
index 000000000000..9af4bd48fc2f
--- /dev/null
+++ b/openmv-ide.qs
@@ -0,0 +1,81 @@
+function Controller() {
+ installer.autoRejectMessageBoxes();
+ installer.setMessageBoxAutomaticAnswer("installationError", QMessageBox.Retry);
+ installer.setMessageBoxAutomaticAnswer("installationErrorWithRetry", QMessageBox.Retry);
+ installer.setMessageBoxAutomaticAnswer("DownloadError", QMessageBox.Retry);
+ installer.setMessageBoxAutomaticAnswer("archiveDownloadError", QMessageBox.Retry);
+ installer.installationFinished.connect(function() {
+ gui.clickButton(buttons.NextButton);
+ })
+}
+
+Controller.prototype.WelcomePageCallback = function() {
+ // click delay here because the next button is initially disabled for ~1 second
+ gui.clickButton(buttons.NextButton, 3000);
+}
+
+Controller.prototype.CredentialsPageCallback = function() {
+ gui.clickButton(buttons.NextButton);
+}
+
+Controller.prototype.IntroductionPageCallback = function() {
+ gui.clickButton(buttons.NextButton);
+}
+
+Controller.prototype.TargetDirectoryPageCallback = function()
+{
+ //dev is the user in our docker image
+ gui.currentPageWidget().TargetDirectoryLineEdit.setText("/tmp/QT");
+ gui.clickButton(buttons.NextButton);
+}
+
+Controller.prototype.PerformInstallationPageCallback = function() {
+ gui.clickButton(buttons.CommitButton);
+}
+
+Controller.prototype.ComponentSelectionPageCallback = function() {
+ function list_packages() {
+ var components = installer.components();
+ console.log("Available components: " + components.length);
+ var packages = ["Packages: "];
+ for (var i = 0 ; i < components.length ;i++) {
+ packages.push(components[i].name);
+ }
+ console.log(packages.join(" "));
+ }
+
+ list_packages();
+
+ var widget = gui.currentPageWidget();
+
+ console.log(widget);
+
+ widget.deselectAll();
+ widget.selectComponent("qt.qt5.5130");
+ widget.selectComponent("qt.qt5.5130.gcc_64");
+ // widget.deselectComponent("");
+
+ gui.clickButton(buttons.NextButton);
+}
+
+Controller.prototype.LicenseAgreementPageCallback = function() {
+ gui.currentPageWidget().AcceptLicenseRadioButton.setChecked(true);
+ gui.clickButton(buttons.NextButton);
+}
+
+Controller.prototype.StartMenuDirectoryPageCallback = function() {
+ gui.clickButton(buttons.NextButton);
+}
+
+Controller.prototype.ReadyForInstallationPageCallback = function()
+{
+ gui.clickButton(buttons.NextButton);
+}
+
+Controller.prototype.FinishedPageCallback = function() {
+ var checkBoxForm = gui.currentPageWidget().LaunchQtCreatorCheckBoxForm;
+ if (checkBoxForm && checkBoxForm.launchQtCreatorCheckBox) {
+ checkBoxForm.launchQtCreatorCheckBox.checked = false;
+ }
+ gui.clickButton(buttons.FinishButton);
+}