From 8b092599961f173855f123fbf9b7e9147869c03a Mon Sep 17 00:00:00 2001 From: duplo Date: Mon, 22 Dec 2008 16:11:31 +0000 Subject: [PATCH] Add the toolchain selection page stub git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2118 38d2e660-2303-0410-9eaa-f027e97ec537 --- wizard/BToolchainPage.py | 65 +++++++ wizard/toolchain_select.ui | 351 +++++++++++++++++++++++++++++++++++++ 2 files changed, 416 insertions(+) create mode 100644 wizard/BToolchainPage.py create mode 100644 wizard/toolchain_select.ui diff --git a/wizard/BToolchainPage.py b/wizard/BToolchainPage.py new file mode 100644 index 00000000..e052db27 --- /dev/null +++ b/wizard/BToolchainPage.py @@ -0,0 +1,65 @@ +#!/usr/bin/env python +# encoding: utf-8 +# +# Copyright 2008 Develer S.r.l. (http://www.develer.com/) +# All rights reserved. +# +# $Id:$ +# +# Author: Lorenzo Berni +# + +from BWizardPage import * + +class BToolchainPage(BWizardPage): + + def __init__(self): + BWizardPage.__init__(self, "toolchain_select.ui") + self.setTitle(self.tr("Select toolchain")) + self._setupUi() + self._connectSignals() + + def _setupUi(self): + path = self._settingsRetrieve("path_search").toBool() + if not path is None: + self.pageContent.pathBox.setChecked(path) + else: + self.pageContent.pathBox.setChecked(False) + customPath = self._settingsRetrieve("custom_dir").toBool() + if not customPath is None: + self.pageContent.customDirBox.setChecked(customPath) + else: + self.pageContent.customDirBox.setChecked(False) + self._updateUi() + + def _updateUi(self): + if self.pageContent.customDirBox.isChecked(): + self._enableCustomDir() + else: + self._disableCustomDir() + if self.pageContent.pathBox.isChecked() or (self.pageContent.customDirBox.isChecked() and self.pageContent.customDirList.count() != 0): + self.pageContent.doSearchButton.setEnabled(True) + else: + self.pageContent.doSearchButton.setEnabled(False) + + def _disableCustomDir(self): + self.pageContent.customDirList.setEnabled(False) + self.pageContent.addDirButton.setEnabled(False) + self.pageContent.removeDirButton.setEnabled(False) + + def _enableCustomDir(self): + self.pageContent.customDirList.setEnabled(True) + self.pageContent.addDirButton.setEnabled(True) + self.pageContent.removeDirButton.setEnabled(True) + + def _toSearchSubpage(self): + self.pageContent.pageSelector.setCurrentIndex(1) + + def _toSelectionSubpage(self): + self.pageContent.pageSelector.setCurrentIndex(0) + + def _connectSignals(self): + self.connect(self.pageContent.pathBox, SIGNAL("clicked()"), self._updateUi) + self.connect(self.pageContent.customDirBox, SIGNAL("clicked()"), self._updateUi) + self.connect(self.pageContent.searchButton, SIGNAL("clicked()"), self._toSearchSubpage) + self.connect(self.pageContent.cancelButton, SIGNAL("clicked()"), self._toSelectionSubpage) \ No newline at end of file diff --git a/wizard/toolchain_select.ui b/wizard/toolchain_select.ui new file mode 100644 index 00000000..79a64b27 --- /dev/null +++ b/wizard/toolchain_select.ui @@ -0,0 +1,351 @@ + + Form + + + + 0 + 0 + 428 + 367 + + + + + 0 + 0 + + + + Form + + + + + + + 0 + 0 + + + + 0 + + + + + + + + + + + + + 26 + 26 + + + + + 26 + 26 + + + + + + + + :/images/listadd.png:/images/listadd.png + + + + 16 + 16 + + + + + + + + + 26 + 26 + + + + + 26 + 26 + + + + + + + + :/images/listremove.png:/images/listremove.png + + + + 16 + 16 + + + + + + + + + 26 + 26 + + + + + 26 + 26 + + + + + + + + :/images/ok.png:/images/ok.png + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 26 + 26 + + + + + 16777215 + 26 + + + + Search + + + + + + + + + + + + + + + + + + 0 + 0 + + + + Search in PATH + + + + + + + Search in custom directories + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 26 + + + + + 16777215 + 26 + + + + Cancel + + + + + + + + 0 + 26 + + + + + 16777215 + 26 + + + + Search + + + + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 20 + + + + + + + + + + + + + + + + + + + + + + 26 + 26 + + + + + 26 + 26 + + + + + + + + :/images/listadd.png:/images/listadd.png + + + + + + + + 26 + 26 + + + + + 26 + 26 + + + + + + + + :/images/listremove.png:/images/listremove.png + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + + + + + + + + + + -- 2.25.1