[QGIS Commit] r10261 -
branches/vector_overlay_branch/python/plugins/plugin_installer
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Tue Mar 3 17:09:19 EST 2009
Author: mhugent
Date: 2009-03-03 17:09:19 -0500 (Tue, 03 Mar 2009)
New Revision: 10261
Added:
branches/vector_overlay_branch/python/plugins/plugin_installer/qgsplugininstallerbase.py
branches/vector_overlay_branch/python/plugins/plugin_installer/qgsplugininstallerbase.ui
branches/vector_overlay_branch/python/plugins/plugin_installer/qgsplugininstallerfetchingbase.py
branches/vector_overlay_branch/python/plugins/plugin_installer/qgsplugininstallerfetchingbase.ui
branches/vector_overlay_branch/python/plugins/plugin_installer/qgsplugininstallerinstallingbase.py
branches/vector_overlay_branch/python/plugins/plugin_installer/qgsplugininstallerinstallingbase.ui
branches/vector_overlay_branch/python/plugins/plugin_installer/qgsplugininstallerpluginerrorbase.py
branches/vector_overlay_branch/python/plugins/plugin_installer/qgsplugininstallerpluginerrorbase.ui
branches/vector_overlay_branch/python/plugins/plugin_installer/qgsplugininstallerrepositorybase.py
branches/vector_overlay_branch/python/plugins/plugin_installer/qgsplugininstallerrepositorybase.ui
branches/vector_overlay_branch/python/plugins/plugin_installer/version_compare.py
Modified:
branches/vector_overlay_branch/python/plugins/plugin_installer/installer_gui.py
Log:
merged revisions 9630 to 9631 from trunk to avoid installer error
Modified: branches/vector_overlay_branch/python/plugins/plugin_installer/installer_gui.py
===================================================================
--- branches/vector_overlay_branch/python/plugins/plugin_installer/installer_gui.py 2009-03-03 21:27:27 UTC (rev 10260)
+++ branches/vector_overlay_branch/python/plugins/plugin_installer/installer_gui.py 2009-03-03 22:09:19 UTC (rev 10261)
@@ -537,6 +537,10 @@
if plugin["status"] == "newer" and not plugin["error"]: # ask for confirmation if user downgrades an usable plugin
if QMessageBox.warning(self, self.tr("QGIS Python Plugin Installer"), self.tr("Are you sure you want to downgrade the plugin to the latest available version? The installed one is newer!"), QMessageBox.Yes, QMessageBox.No) == QMessageBox.No:
return
+ if plugin["status"] == "newer":
+ if QMessageBox.warning(self, self.tr("QGIS Python Plugin Installer"), self.tr("Are you sure you want to downgrade the plugin to the latest available version? The installed one is newer!"), QMessageBox.Yes, QMessageBox.No) == QMessageBox.No:
+ return
+
dlg = QgsPluginInstallerInstallingDialog(self,plugin)
dlg.exec_()
@@ -548,58 +552,38 @@
self.getAllAvailablePlugins()
QApplication.restoreOverrideCursor()
else:
- try:
- exec ("sys.path_importer_cache.clear()")
- exec ("import %s" % plugin["localdir"])
- exec ("reload (%s)" % plugin["localdir"])
- except:
- pass
- plugins.updatePlugin(key, False)
- plugin = plugins.all()[key]
- if not plugin["error"]:
- if previousStatus in ["not installed", "new"]:
- infoString = (self.tr("Plugin installed successfully"),
- self.tr("Python plugin installed.\nNow you need to enable it in Plugin Manager."))
- else:
- infoString = (self.tr("Plugin reinstalled successfully"),
- self.tr("Python plugin reinstalled.\nYou need to restart Quantum GIS in order to reload it."))
+
+ path = QDir.cleanPath(QgsApplication.qgisSettingsDirPath() + "/python/plugins/" + key)
+ if not QDir(path).exists():
+ infoString = (self.tr("Plugin has disappeared"), self.tr("The plugin seems to have been installed but I don't know where. Probably the plugin package contained a wrong named directory.\nPlease search the list of installed plugins. I'm nearly sure you'll find the plugin there, but I just can't determine which of them it is. It also means that I won't be able to determine if this plugin is installed and inform you about available updates. However the plugin may work. Please contact the plugin author and submit this issue."))
+ QApplication.setOverrideCursor(Qt.WaitCursor)
+ self.getAllAvailablePlugins()
+ QApplication.restoreOverrideCursor()
else:
- if plugin["error"] == "incompatible":
- message = self.tr("The plugin is designed for a newer version of Quantum GIS. The minimum required version is:")
- message += " <b>" + plugin["error_details"] + "</b>"
- elif plugin["error"] == "dependent":
- message = self.tr("The plugin depends on some components missing on your system. You need to install the following Python module in order to enable it:")
- message += "<b> " + plugin["error_details"] + "</b>"
- else:
- message = self.tr("The plugin is broken. Python said:")
- message += "<br><b>" + plugin["error_details"] + "</b>"
- dlg = QgsPluginInstallerPluginErrorDialog(self,message)
- dlg.exec_()
- if dlg.result():
- # revert installation
- plugins.setPluginData(key, "status", "not installed")
- plugins.setPluginData(key, "version_inst", "")
- plugins.setPluginData(key, "desc_local", "")
- plugins.setPluginData(key, "error", "")
- plugins.setPluginData(key, "error_details", "")
- pluginDir = QFileInfo(QgsApplication.qgisUserDbFilePath()).path() + "/python/plugins/" + plugin["localdir"]
- removeDir(pluginDir)
- if QDir(pluginDir).exists():
- infoString = (self.tr("Plugin uninstall failed"), result)
- try:
- exec ("sys.path_importer_cache.clear()")
- exec ("import %s" % plugin["localdir"])
- exec ("reload (%s)" % plugin["localdir"])
- except:
- pass
- plugins.updatePlugin(key, False)
+ try:
+ exec ("sys.path_importer_cache.clear()")
+ exec ("del sys.modules[%s]" % plugin["localdir"]) # remove old version if exist
+ except:
+ pass
+ try:
+ exec ("import %s" % plugin["localdir"])
+ exec ("reload (%s)" % plugin["localdir"])
+ if plugin["status"] == "not installed" or plugin["status"] == "new":
+ infoString = (self.tr("Plugin installed successfully"), self.tr("Python plugin installed.\nYou have to enable it in the Plugin Manager."))
else:
- try:
- exec ("del sys.modules[%s]" % plugin["localdir"])
- except:
- pass
- if not plugin["repository"]:
- plugins.remove(key)
+ infoString = (self.tr("Plugin installed successfully"),self.tr("Python plugin reinstalled.\nYou have to restart Quantum GIS to reload it."))
+ except Exception, error:
+ dlg = QgsPluginInstallerPluginErrorDialog(self,error.message)
+ dlg.exec_()
+ if dlg.result():
+ pluginDir = unicode(QFileInfo(QgsApplication.qgisUserDbFilePath()).path()+"/python/plugins/"+ str(plugin["localdir"]))
+ result = removeDir(pluginDir)
+ if result:
+ QMessageBox.warning(self, self.tr("Plugin uninstall failed"), result)
+ plugins.updatePlugin(key, False)
+ self.populatePluginTree()
+ return
+ plugins.updatePlugin(key, False)
self.populatePluginTree()
if infoString[0]:
QMessageBox.information(self, infoString[0], infoString[1])
Copied: branches/vector_overlay_branch/python/plugins/plugin_installer/qgsplugininstallerbase.py (from rev 9631, trunk/qgis/python/plugins/plugin_installer/qgsplugininstallerbase.py)
===================================================================
--- branches/vector_overlay_branch/python/plugins/plugin_installer/qgsplugininstallerbase.py (rev 0)
+++ branches/vector_overlay_branch/python/plugins/plugin_installer/qgsplugininstallerbase.py 2009-03-03 22:09:19 UTC (rev 10261)
@@ -0,0 +1,226 @@
+# -*- coding: utf-8 -*-
+
+# Form implementation generated from reading ui file 'qgsplugininstallerbase.ui'
+#
+# Created: Wed Nov 12 23:21:49 2008
+# by: PyQt4 UI code generator 4.3.3
+#
+# WARNING! All changes made in this file will be lost!
+
+from PyQt4 import QtCore, QtGui
+
+class Ui_QgsPluginInstallerDialogBase(object):
+ def setupUi(self, QgsPluginInstallerDialogBase):
+ QgsPluginInstallerDialogBase.setObjectName("QgsPluginInstallerDialogBase")
+ QgsPluginInstallerDialogBase.resize(QtCore.QSize(QtCore.QRect(0,0,769,395).size()).expandedTo(QgsPluginInstallerDialogBase.minimumSizeHint()))
+ QgsPluginInstallerDialogBase.setWindowIcon(QtGui.QIcon(":/plugins/installer/qgis-icon.png"))
+
+ self.gridlayout = QtGui.QGridLayout(QgsPluginInstallerDialogBase)
+ self.gridlayout.setObjectName("gridlayout")
+
+ self.tabWidget = QtGui.QTabWidget(QgsPluginInstallerDialogBase)
+ self.tabWidget.setObjectName("tabWidget")
+
+ self.tab = QtGui.QWidget()
+ self.tab.setObjectName("tab")
+
+ self.vboxlayout = QtGui.QVBoxLayout(self.tab)
+ self.vboxlayout.setObjectName("vboxlayout")
+
+ self.hboxlayout = QtGui.QHBoxLayout()
+ self.hboxlayout.setObjectName("hboxlayout")
+
+ self.label_5 = QtGui.QLabel(self.tab)
+ self.label_5.setEnabled(True)
+ self.label_5.setObjectName("label_5")
+ self.hboxlayout.addWidget(self.label_5)
+
+ self.lineFilter = QtGui.QLineEdit(self.tab)
+ self.lineFilter.setEnabled(True)
+ self.lineFilter.setObjectName("lineFilter")
+ self.hboxlayout.addWidget(self.lineFilter)
+
+ self.comboFilter1 = QtGui.QComboBox(self.tab)
+ self.comboFilter1.setEnabled(True)
+
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Fixed)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.comboFilter1.sizePolicy().hasHeightForWidth())
+ self.comboFilter1.setSizePolicy(sizePolicy)
+ self.comboFilter1.setObjectName("comboFilter1")
+ self.hboxlayout.addWidget(self.comboFilter1)
+
+ self.comboFilter2 = QtGui.QComboBox(self.tab)
+ self.comboFilter2.setEnabled(True)
+
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred,QtGui.QSizePolicy.Fixed)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.comboFilter2.sizePolicy().hasHeightForWidth())
+ self.comboFilter2.setSizePolicy(sizePolicy)
+ self.comboFilter2.setObjectName("comboFilter2")
+ self.hboxlayout.addWidget(self.comboFilter2)
+ self.vboxlayout.addLayout(self.hboxlayout)
+
+ self.treePlugins = QtGui.QTreeWidget(self.tab)
+ self.treePlugins.setAlternatingRowColors(True)
+ self.treePlugins.setRootIsDecorated(False)
+ self.treePlugins.setItemsExpandable(False)
+ self.treePlugins.setSortingEnabled(True)
+ self.treePlugins.setAllColumnsShowFocus(True)
+ self.treePlugins.setObjectName("treePlugins")
+ self.vboxlayout.addWidget(self.treePlugins)
+
+ self.hboxlayout1 = QtGui.QHBoxLayout()
+ self.hboxlayout1.setObjectName("hboxlayout1")
+
+ spacerItem = QtGui.QSpacerItem(40,20,QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Minimum)
+ self.hboxlayout1.addItem(spacerItem)
+
+ self.buttonInstall = QtGui.QPushButton(self.tab)
+
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed,QtGui.QSizePolicy.Fixed)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.buttonInstall.sizePolicy().hasHeightForWidth())
+ self.buttonInstall.setSizePolicy(sizePolicy)
+ self.buttonInstall.setMinimumSize(QtCore.QSize(160,0))
+ self.buttonInstall.setObjectName("buttonInstall")
+ self.hboxlayout1.addWidget(self.buttonInstall)
+
+ self.buttonUninstall = QtGui.QPushButton(self.tab)
+ self.buttonUninstall.setEnabled(True)
+ self.buttonUninstall.setObjectName("buttonUninstall")
+ self.hboxlayout1.addWidget(self.buttonUninstall)
+ self.vboxlayout.addLayout(self.hboxlayout1)
+ self.tabWidget.addTab(self.tab,"")
+
+ self.tab_2 = QtGui.QWidget()
+ self.tab_2.setObjectName("tab_2")
+
+ self.gridlayout1 = QtGui.QGridLayout(self.tab_2)
+ self.gridlayout1.setObjectName("gridlayout1")
+
+ self.treeRepositories = QtGui.QTreeWidget(self.tab_2)
+ self.treeRepositories.setRootIsDecorated(False)
+ self.treeRepositories.setItemsExpandable(False)
+ self.treeRepositories.setObjectName("treeRepositories")
+ self.gridlayout1.addWidget(self.treeRepositories,0,0,1,7)
+
+ self.checkUpdates = QtGui.QCheckBox(self.tab_2)
+ self.checkUpdates.setObjectName("checkUpdates")
+ self.gridlayout1.addWidget(self.checkUpdates,1,0,1,1)
+
+ spacerItem1 = QtGui.QSpacerItem(30,20,QtGui.QSizePolicy.Preferred,QtGui.QSizePolicy.Minimum)
+ self.gridlayout1.addItem(spacerItem1,1,1,1,1)
+
+ self.buttonFetchRepositories = QtGui.QPushButton(self.tab_2)
+ self.buttonFetchRepositories.setEnabled(True)
+ self.buttonFetchRepositories.setObjectName("buttonFetchRepositories")
+ self.gridlayout1.addWidget(self.buttonFetchRepositories,1,2,1,1)
+
+ spacerItem2 = QtGui.QSpacerItem(40,20,QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Minimum)
+ self.gridlayout1.addItem(spacerItem2,1,3,1,1)
+
+ self.buttonAddRep = QtGui.QPushButton(self.tab_2)
+ self.buttonAddRep.setObjectName("buttonAddRep")
+ self.gridlayout1.addWidget(self.buttonAddRep,1,4,1,1)
+
+ self.buttonEditRep = QtGui.QPushButton(self.tab_2)
+ self.buttonEditRep.setObjectName("buttonEditRep")
+ self.gridlayout1.addWidget(self.buttonEditRep,1,5,1,1)
+
+ self.buttonDeleteRep = QtGui.QPushButton(self.tab_2)
+ self.buttonDeleteRep.setObjectName("buttonDeleteRep")
+ self.gridlayout1.addWidget(self.buttonDeleteRep,1,6,1,1)
+ self.tabWidget.addTab(self.tab_2,"")
+ self.gridlayout.addWidget(self.tabWidget,0,0,1,1)
+
+ self.hboxlayout2 = QtGui.QHBoxLayout()
+ self.hboxlayout2.setObjectName("hboxlayout2")
+
+ self.label_3 = QtGui.QLabel(QgsPluginInstallerDialogBase)
+ self.label_3.setObjectName("label_3")
+ self.hboxlayout2.addWidget(self.label_3)
+
+ self.buttonClose = QtGui.QPushButton(QgsPluginInstallerDialogBase)
+
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed,QtGui.QSizePolicy.Fixed)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.buttonClose.sizePolicy().hasHeightForWidth())
+ self.buttonClose.setSizePolicy(sizePolicy)
+ self.buttonClose.setObjectName("buttonClose")
+ self.hboxlayout2.addWidget(self.buttonClose)
+ self.gridlayout.addLayout(self.hboxlayout2,1,0,1,1)
+
+ self.retranslateUi(QgsPluginInstallerDialogBase)
+ self.tabWidget.setCurrentIndex(0)
+ QtCore.QObject.connect(self.buttonClose,QtCore.SIGNAL("released()"),QgsPluginInstallerDialogBase.close)
+ QtCore.QMetaObject.connectSlotsByName(QgsPluginInstallerDialogBase)
+ QgsPluginInstallerDialogBase.setTabOrder(self.tabWidget,self.lineFilter)
+ QgsPluginInstallerDialogBase.setTabOrder(self.lineFilter,self.comboFilter1)
+ QgsPluginInstallerDialogBase.setTabOrder(self.comboFilter1,self.comboFilter2)
+ QgsPluginInstallerDialogBase.setTabOrder(self.comboFilter2,self.treePlugins)
+ QgsPluginInstallerDialogBase.setTabOrder(self.treePlugins,self.buttonInstall)
+ QgsPluginInstallerDialogBase.setTabOrder(self.buttonInstall,self.buttonUninstall)
+ QgsPluginInstallerDialogBase.setTabOrder(self.buttonUninstall,self.buttonClose)
+ QgsPluginInstallerDialogBase.setTabOrder(self.buttonClose,self.treeRepositories)
+ QgsPluginInstallerDialogBase.setTabOrder(self.treeRepositories,self.buttonFetchRepositories)
+ QgsPluginInstallerDialogBase.setTabOrder(self.buttonFetchRepositories,self.checkUpdates)
+ QgsPluginInstallerDialogBase.setTabOrder(self.checkUpdates,self.buttonAddRep)
+ QgsPluginInstallerDialogBase.setTabOrder(self.buttonAddRep,self.buttonEditRep)
+ QgsPluginInstallerDialogBase.setTabOrder(self.buttonEditRep,self.buttonDeleteRep)
+
+ def retranslateUi(self, QgsPluginInstallerDialogBase):
+ QgsPluginInstallerDialogBase.setWindowTitle(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "QGIS Python Plugin Installer", None, QtGui.QApplication.UnicodeUTF8))
+ QgsPluginInstallerDialogBase.setWhatsThis(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "QGIS Python Plugin Installer", None, QtGui.QApplication.UnicodeUTF8))
+ self.label_5.setText(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Filter:", None, QtGui.QApplication.UnicodeUTF8))
+ self.lineFilter.setToolTip(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Display only plugins containing this word in their metadata", None, QtGui.QApplication.UnicodeUTF8))
+ self.lineFilter.setWhatsThis(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Display only plugins containing this word in their metadata", None, QtGui.QApplication.UnicodeUTF8))
+ self.comboFilter1.setToolTip(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Display only plugins from given repository", None, QtGui.QApplication.UnicodeUTF8))
+ self.comboFilter1.setWhatsThis(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Display only plugins from given repository", None, QtGui.QApplication.UnicodeUTF8))
+ self.comboFilter1.addItem(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "all repositories", None, QtGui.QApplication.UnicodeUTF8))
+ self.comboFilter2.setToolTip(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Display only plugins with matching status", None, QtGui.QApplication.UnicodeUTF8))
+ self.comboFilter2.setWhatsThis(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Display only plugins with matching status", None, QtGui.QApplication.UnicodeUTF8))
+ self.treePlugins.headerItem().setText(0,QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Status", None, QtGui.QApplication.UnicodeUTF8))
+ self.treePlugins.headerItem().setText(1,QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Name", None, QtGui.QApplication.UnicodeUTF8))
+ self.treePlugins.headerItem().setText(2,QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Version", None, QtGui.QApplication.UnicodeUTF8))
+ self.treePlugins.headerItem().setText(3,QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Description", None, QtGui.QApplication.UnicodeUTF8))
+ self.treePlugins.headerItem().setText(4,QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Author", None, QtGui.QApplication.UnicodeUTF8))
+ self.treePlugins.headerItem().setText(5,QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Repository", None, QtGui.QApplication.UnicodeUTF8))
+ self.buttonInstall.setToolTip(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Install, reinstall or upgrade the selected plugin", None, QtGui.QApplication.UnicodeUTF8))
+ self.buttonInstall.setWhatsThis(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Install, reinstall or upgrade the selected plugin", None, QtGui.QApplication.UnicodeUTF8))
+ self.buttonInstall.setText(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Install/upgrade plugin", None, QtGui.QApplication.UnicodeUTF8))
+ self.buttonUninstall.setToolTip(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Uninstall the selected plugin", None, QtGui.QApplication.UnicodeUTF8))
+ self.buttonUninstall.setWhatsThis(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Uninstall the selected plugin", None, QtGui.QApplication.UnicodeUTF8))
+ self.buttonUninstall.setText(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Uninstall plugin", None, QtGui.QApplication.UnicodeUTF8))
+ self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Plugins", None, QtGui.QApplication.UnicodeUTF8))
+ self.tabWidget.setTabToolTip(self.tabWidget.indexOf(self.tab),QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "List of available and installed plugins", None, QtGui.QApplication.UnicodeUTF8))
+ self.treeRepositories.headerItem().setText(0,QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Status", None, QtGui.QApplication.UnicodeUTF8))
+ self.treeRepositories.headerItem().setText(1,QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Name", None, QtGui.QApplication.UnicodeUTF8))
+ self.treeRepositories.headerItem().setText(2,QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "URL", None, QtGui.QApplication.UnicodeUTF8))
+ self.checkUpdates.setToolTip(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Allow the Installer to look for updates and news in enabled repositories on QGIS startup", None, QtGui.QApplication.UnicodeUTF8))
+ self.checkUpdates.setWhatsThis(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Allow the Installer to look for updates and news in enabled repositories on QGIS startup", None, QtGui.QApplication.UnicodeUTF8))
+ self.checkUpdates.setText(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Check for updates on startup", None, QtGui.QApplication.UnicodeUTF8))
+ self.buttonFetchRepositories.setToolTip(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Add third party plugin repositories to the list", None, QtGui.QApplication.UnicodeUTF8))
+ self.buttonFetchRepositories.setWhatsThis(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Add third party plugin repositories to the list", None, QtGui.QApplication.UnicodeUTF8))
+ self.buttonFetchRepositories.setText(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Add 3rd party repositories", None, QtGui.QApplication.UnicodeUTF8))
+ self.buttonAddRep.setToolTip(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Add a new plugin repository", None, QtGui.QApplication.UnicodeUTF8))
+ self.buttonAddRep.setWhatsThis(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Add a new plugin repository", None, QtGui.QApplication.UnicodeUTF8))
+ self.buttonAddRep.setText(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Add...", None, QtGui.QApplication.UnicodeUTF8))
+ self.buttonEditRep.setToolTip(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Edit the selected repository", None, QtGui.QApplication.UnicodeUTF8))
+ self.buttonEditRep.setWhatsThis(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Edit the selected repository", None, QtGui.QApplication.UnicodeUTF8))
+ self.buttonEditRep.setText(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Edit...", None, QtGui.QApplication.UnicodeUTF8))
+ self.buttonDeleteRep.setToolTip(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Remove the selected repository", None, QtGui.QApplication.UnicodeUTF8))
+ self.buttonDeleteRep.setWhatsThis(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Remove the selected repository", None, QtGui.QApplication.UnicodeUTF8))
+ self.buttonDeleteRep.setText(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Delete", None, QtGui.QApplication.UnicodeUTF8))
+ self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Repositories", None, QtGui.QApplication.UnicodeUTF8))
+ self.tabWidget.setTabToolTip(self.tabWidget.indexOf(self.tab_2),QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "List of plugin repositories", None, QtGui.QApplication.UnicodeUTF8))
+ self.label_3.setText(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "The plugins will be installed to ~/.qgis/python/plugins", None, QtGui.QApplication.UnicodeUTF8))
+ self.buttonClose.setToolTip(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Close the Installer window", None, QtGui.QApplication.UnicodeUTF8))
+ self.buttonClose.setWhatsThis(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Close the Installer window", None, QtGui.QApplication.UnicodeUTF8))
+ self.buttonClose.setText(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Close", None, QtGui.QApplication.UnicodeUTF8))
+
+import resources_rc
Copied: branches/vector_overlay_branch/python/plugins/plugin_installer/qgsplugininstallerbase.ui (from rev 9631, trunk/qgis/python/plugins/plugin_installer/qgsplugininstallerbase.ui)
===================================================================
--- branches/vector_overlay_branch/python/plugins/plugin_installer/qgsplugininstallerbase.ui (rev 0)
+++ branches/vector_overlay_branch/python/plugins/plugin_installer/qgsplugininstallerbase.ui 2009-03-03 22:09:19 UTC (rev 10261)
@@ -0,0 +1,433 @@
+<ui version="4.0" >
+ <author>Matthew Perry, Borys Jurgiel</author>
+ <class>QgsPluginInstallerDialogBase</class>
+ <widget class="QDialog" name="QgsPluginInstallerDialogBase" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>769</width>
+ <height>395</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>QGIS Python Plugin Installer</string>
+ </property>
+ <property name="windowIcon" >
+ <iconset resource="resources.qrc" >:/plugins/installer/qgis-icon.png</iconset>
+ </property>
+ <property name="whatsThis" >
+ <string>QGIS Python Plugin Installer</string>
+ </property>
+ <layout class="QGridLayout" >
+ <item row="0" column="0" >
+ <widget class="QTabWidget" name="tabWidget" >
+ <property name="toolTip" >
+ <string/>
+ </property>
+ <property name="whatsThis" >
+ <string/>
+ </property>
+ <property name="currentIndex" >
+ <number>0</number>
+ </property>
+ <widget class="QWidget" name="tab" >
+ <attribute name="title" >
+ <string>Plugins</string>
+ </attribute>
+ <attribute name="toolTip" >
+ <string>List of available and installed plugins</string>
+ </attribute>
+ <layout class="QVBoxLayout" >
+ <item>
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="QLabel" name="label_5" >
+ <property name="enabled" >
+ <bool>true</bool>
+ </property>
+ <property name="text" >
+ <string>Filter:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="lineFilter" >
+ <property name="enabled" >
+ <bool>true</bool>
+ </property>
+ <property name="toolTip" >
+ <string>Display only plugins containing this word in their metadata</string>
+ </property>
+ <property name="whatsThis" >
+ <string>Display only plugins containing this word in their metadata</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QComboBox" name="comboFilter1" >
+ <property name="enabled" >
+ <bool>true</bool>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip" >
+ <string>Display only plugins from given repository</string>
+ </property>
+ <property name="statusTip" >
+ <string/>
+ </property>
+ <property name="whatsThis" >
+ <string>Display only plugins from given repository</string>
+ </property>
+ <item>
+ <property name="text" >
+ <string>all repositories</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item>
+ <widget class="QComboBox" name="comboFilter2" >
+ <property name="enabled" >
+ <bool>true</bool>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip" >
+ <string>Display only plugins with matching status</string>
+ </property>
+ <property name="whatsThis" >
+ <string>Display only plugins with matching status</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QTreeWidget" name="treePlugins" >
+ <property name="alternatingRowColors" >
+ <bool>true</bool>
+ </property>
+ <property name="rootIsDecorated" >
+ <bool>false</bool>
+ </property>
+ <property name="itemsExpandable" >
+ <bool>false</bool>
+ </property>
+ <property name="sortingEnabled" >
+ <bool>true</bool>
+ </property>
+ <property name="allColumnsShowFocus" >
+ <bool>true</bool>
+ </property>
+ <column>
+ <property name="text" >
+ <string>Status</string>
+ </property>
+ </column>
+ <column>
+ <property name="text" >
+ <string>Name</string>
+ </property>
+ </column>
+ <column>
+ <property name="text" >
+ <string>Version</string>
+ </property>
+ </column>
+ <column>
+ <property name="text" >
+ <string>Description</string>
+ </property>
+ </column>
+ <column>
+ <property name="text" >
+ <string>Author</string>
+ </property>
+ </column>
+ <column>
+ <property name="text" >
+ <string>Repository</string>
+ </property>
+ </column>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" >
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="buttonInstall" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize" >
+ <size>
+ <width>160</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="toolTip" >
+ <string>Install, reinstall or upgrade the selected plugin</string>
+ </property>
+ <property name="whatsThis" >
+ <string>Install, reinstall or upgrade the selected plugin</string>
+ </property>
+ <property name="text" >
+ <string>Install/upgrade plugin</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="buttonUninstall" >
+ <property name="enabled" >
+ <bool>true</bool>
+ </property>
+ <property name="toolTip" >
+ <string>Uninstall the selected plugin</string>
+ </property>
+ <property name="whatsThis" >
+ <string>Uninstall the selected plugin</string>
+ </property>
+ <property name="text" >
+ <string>Uninstall plugin</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="tab_2" >
+ <attribute name="title" >
+ <string>Repositories</string>
+ </attribute>
+ <attribute name="toolTip" >
+ <string>List of plugin repositories</string>
+ </attribute>
+ <layout class="QGridLayout" >
+ <item row="0" column="0" colspan="7" >
+ <widget class="QTreeWidget" name="treeRepositories" >
+ <property name="rootIsDecorated" >
+ <bool>false</bool>
+ </property>
+ <property name="itemsExpandable" >
+ <bool>false</bool>
+ </property>
+ <column>
+ <property name="text" >
+ <string>Status</string>
+ </property>
+ </column>
+ <column>
+ <property name="text" >
+ <string>Name</string>
+ </property>
+ </column>
+ <column>
+ <property name="text" >
+ <string>URL</string>
+ </property>
+ </column>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QCheckBox" name="checkUpdates" >
+ <property name="toolTip" >
+ <string>Allow the Installer to look for updates and news in enabled repositories on QGIS startup</string>
+ </property>
+ <property name="statusTip" >
+ <string/>
+ </property>
+ <property name="whatsThis" >
+ <string>Allow the Installer to look for updates and news in enabled repositories on QGIS startup</string>
+ </property>
+ <property name="text" >
+ <string>Check for updates on startup</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::Preferred</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>30</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="1" column="2" >
+ <widget class="QPushButton" name="buttonFetchRepositories" >
+ <property name="enabled" >
+ <bool>true</bool>
+ </property>
+ <property name="toolTip" >
+ <string>Add third party plugin repositories to the list</string>
+ </property>
+ <property name="whatsThis" >
+ <string>Add third party plugin repositories to the list</string>
+ </property>
+ <property name="text" >
+ <string>Add 3rd party repositories</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="3" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="1" column="4" >
+ <widget class="QPushButton" name="buttonAddRep" >
+ <property name="toolTip" >
+ <string>Add a new plugin repository</string>
+ </property>
+ <property name="whatsThis" >
+ <string>Add a new plugin repository</string>
+ </property>
+ <property name="text" >
+ <string>Add...</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="5" >
+ <widget class="QPushButton" name="buttonEditRep" >
+ <property name="toolTip" >
+ <string>Edit the selected repository</string>
+ </property>
+ <property name="whatsThis" >
+ <string>Edit the selected repository</string>
+ </property>
+ <property name="text" >
+ <string>Edit...</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="6" >
+ <widget class="QPushButton" name="buttonDeleteRep" >
+ <property name="toolTip" >
+ <string>Remove the selected repository</string>
+ </property>
+ <property name="whatsThis" >
+ <string>Remove the selected repository</string>
+ </property>
+ <property name="text" >
+ <string>Delete</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="QLabel" name="label_3" >
+ <property name="whatsThis" >
+ <string/>
+ </property>
+ <property name="text" >
+ <string>The plugins will be installed to ~/.qgis/python/plugins</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="buttonClose" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip" >
+ <string>Close the Installer window</string>
+ </property>
+ <property name="whatsThis" >
+ <string>Close the Installer window</string>
+ </property>
+ <property name="text" >
+ <string>Close</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <tabstops>
+ <tabstop>tabWidget</tabstop>
+ <tabstop>lineFilter</tabstop>
+ <tabstop>comboFilter1</tabstop>
+ <tabstop>comboFilter2</tabstop>
+ <tabstop>treePlugins</tabstop>
+ <tabstop>buttonInstall</tabstop>
+ <tabstop>buttonUninstall</tabstop>
+ <tabstop>buttonClose</tabstop>
+ <tabstop>treeRepositories</tabstop>
+ <tabstop>buttonFetchRepositories</tabstop>
+ <tabstop>checkUpdates</tabstop>
+ <tabstop>buttonAddRep</tabstop>
+ <tabstop>buttonEditRep</tabstop>
+ <tabstop>buttonDeleteRep</tabstop>
+ </tabstops>
+ <resources>
+ <include location="resources.qrc" />
+ </resources>
+ <connections>
+ <connection>
+ <sender>buttonClose</sender>
+ <signal>released()</signal>
+ <receiver>QgsPluginInstallerDialogBase</receiver>
+ <slot>close()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>710</x>
+ <y>447</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>380</x>
+ <y>235</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
Copied: branches/vector_overlay_branch/python/plugins/plugin_installer/qgsplugininstallerfetchingbase.py (from rev 9631, trunk/qgis/python/plugins/plugin_installer/qgsplugininstallerfetchingbase.py)
===================================================================
--- branches/vector_overlay_branch/python/plugins/plugin_installer/qgsplugininstallerfetchingbase.py (rev 0)
+++ branches/vector_overlay_branch/python/plugins/plugin_installer/qgsplugininstallerfetchingbase.py 2009-03-03 22:09:19 UTC (rev 10261)
@@ -0,0 +1,85 @@
+# -*- coding: utf-8 -*-
+
+# Form implementation generated from reading ui file 'qgsplugininstallerfetchingbase.ui'
+#
+# Created: Wed Nov 12 23:21:49 2008
+# by: PyQt4 UI code generator 4.3.3
+#
+# WARNING! All changes made in this file will be lost!
+
+from PyQt4 import QtCore, QtGui
+
+class Ui_QgsPluginInstallerFetchingDialogBase(object):
+ def setupUi(self, QgsPluginInstallerFetchingDialogBase):
+ QgsPluginInstallerFetchingDialogBase.setObjectName("QgsPluginInstallerFetchingDialogBase")
+ QgsPluginInstallerFetchingDialogBase.resize(QtCore.QSize(QtCore.QRect(0,0,521,332).size()).expandedTo(QgsPluginInstallerFetchingDialogBase.minimumSizeHint()))
+ QgsPluginInstallerFetchingDialogBase.setWindowIcon(QtGui.QIcon(":/plugins/installer/qgis-icon.png"))
+
+ self.gridlayout = QtGui.QGridLayout(QgsPluginInstallerFetchingDialogBase)
+ self.gridlayout.setObjectName("gridlayout")
+
+ spacerItem = QtGui.QSpacerItem(249,10,QtGui.QSizePolicy.Minimum,QtGui.QSizePolicy.Fixed)
+ self.gridlayout.addItem(spacerItem,1,0,1,1)
+
+ self.label1 = QtGui.QLabel(QgsPluginInstallerFetchingDialogBase)
+ self.label1.setObjectName("label1")
+ self.gridlayout.addWidget(self.label1,2,0,1,1)
+
+ self.progressBar = QtGui.QProgressBar(QgsPluginInstallerFetchingDialogBase)
+ self.progressBar.setProperty("value",QtCore.QVariant(24))
+ self.progressBar.setAlignment(QtCore.Qt.AlignHCenter)
+ self.progressBar.setTextDirection(QtGui.QProgressBar.TopToBottom)
+ self.progressBar.setObjectName("progressBar")
+ self.gridlayout.addWidget(self.progressBar,3,0,1,1)
+
+ spacerItem1 = QtGui.QSpacerItem(248,10,QtGui.QSizePolicy.Minimum,QtGui.QSizePolicy.Fixed)
+ self.gridlayout.addItem(spacerItem1,4,0,1,1)
+
+ self.hboxlayout = QtGui.QHBoxLayout()
+ self.hboxlayout.setObjectName("hboxlayout")
+
+ spacerItem2 = QtGui.QSpacerItem(140,27,QtGui.QSizePolicy.MinimumExpanding,QtGui.QSizePolicy.Minimum)
+ self.hboxlayout.addItem(spacerItem2)
+
+ self.buttonSkip = QtGui.QPushButton(QgsPluginInstallerFetchingDialogBase)
+
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed,QtGui.QSizePolicy.Fixed)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.buttonSkip.sizePolicy().hasHeightForWidth())
+ self.buttonSkip.setSizePolicy(sizePolicy)
+ self.buttonSkip.setMinimumSize(QtCore.QSize(180,0))
+ self.buttonSkip.setFocusPolicy(QtCore.Qt.NoFocus)
+ self.buttonSkip.setAutoDefault(False)
+ self.buttonSkip.setDefault(False)
+ self.buttonSkip.setFlat(False)
+ self.buttonSkip.setObjectName("buttonSkip")
+ self.hboxlayout.addWidget(self.buttonSkip)
+
+ spacerItem3 = QtGui.QSpacerItem(140,27,QtGui.QSizePolicy.MinimumExpanding,QtGui.QSizePolicy.Minimum)
+ self.hboxlayout.addItem(spacerItem3)
+ self.gridlayout.addLayout(self.hboxlayout,5,0,1,1)
+
+ self.treeWidget = QtGui.QTreeWidget(QgsPluginInstallerFetchingDialogBase)
+ self.treeWidget.setEnabled(True)
+ self.treeWidget.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAsNeeded)
+ self.treeWidget.setProperty("showDropIndicator",QtCore.QVariant(False))
+ self.treeWidget.setSelectionMode(QtGui.QAbstractItemView.NoSelection)
+ self.treeWidget.setHorizontalScrollMode(QtGui.QAbstractItemView.ScrollPerItem)
+ self.treeWidget.setRootIsDecorated(False)
+ self.treeWidget.setItemsExpandable(False)
+ self.treeWidget.setObjectName("treeWidget")
+ self.gridlayout.addWidget(self.treeWidget,0,0,1,1)
+
+ self.retranslateUi(QgsPluginInstallerFetchingDialogBase)
+ QtCore.QObject.connect(self.buttonSkip,QtCore.SIGNAL("clicked()"),QgsPluginInstallerFetchingDialogBase.reject)
+ QtCore.QMetaObject.connectSlotsByName(QgsPluginInstallerFetchingDialogBase)
+
+ def retranslateUi(self, QgsPluginInstallerFetchingDialogBase):
+ QgsPluginInstallerFetchingDialogBase.setWindowTitle(QtGui.QApplication.translate("QgsPluginInstallerFetchingDialogBase", "Fetching repositories", None, QtGui.QApplication.UnicodeUTF8))
+ self.label1.setText(QtGui.QApplication.translate("QgsPluginInstallerFetchingDialogBase", "Overall progress:", None, QtGui.QApplication.UnicodeUTF8))
+ self.buttonSkip.setText(QtGui.QApplication.translate("QgsPluginInstallerFetchingDialogBase", "Abort fetching", None, QtGui.QApplication.UnicodeUTF8))
+ self.treeWidget.headerItem().setText(0,QtGui.QApplication.translate("QgsPluginInstallerFetchingDialogBase", "Repository", None, QtGui.QApplication.UnicodeUTF8))
+ self.treeWidget.headerItem().setText(1,QtGui.QApplication.translate("QgsPluginInstallerFetchingDialogBase", "State", None, QtGui.QApplication.UnicodeUTF8))
+
+import resources_rc
Copied: branches/vector_overlay_branch/python/plugins/plugin_installer/qgsplugininstallerfetchingbase.ui (from rev 9631, trunk/qgis/python/plugins/plugin_installer/qgsplugininstallerfetchingbase.ui)
===================================================================
--- branches/vector_overlay_branch/python/plugins/plugin_installer/qgsplugininstallerfetchingbase.ui (rev 0)
+++ branches/vector_overlay_branch/python/plugins/plugin_installer/qgsplugininstallerfetchingbase.ui 2009-03-03 22:09:19 UTC (rev 10261)
@@ -0,0 +1,200 @@
+<ui version="4.0" >
+ <author>Borys Jurgiel</author>
+ <class>QgsPluginInstallerFetchingDialogBase</class>
+ <widget class="QDialog" name="QgsPluginInstallerFetchingDialogBase" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>521</width>
+ <height>332</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Fetching repositories</string>
+ </property>
+ <property name="windowIcon" >
+ <iconset resource="resources.qrc" >:/plugins/installer/qgis-icon.png</iconset>
+ </property>
+ <layout class="QGridLayout" >
+ <item row="1" column="0" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>249</width>
+ <height>10</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="2" column="0" >
+ <widget class="QLabel" name="label1" >
+ <property name="text" >
+ <string>Overall progress:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" >
+ <widget class="QProgressBar" name="progressBar" >
+ <property name="value" >
+ <number>24</number>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignHCenter</set>
+ </property>
+ <property name="textDirection" >
+ <enum>QProgressBar::TopToBottom</enum>
+ </property>
+ <property name="format" >
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>248</width>
+ <height>10</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="5" column="0" >
+ <layout class="QHBoxLayout" >
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::MinimumExpanding</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>140</width>
+ <height>27</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="buttonSkip" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize" >
+ <size>
+ <width>180</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="focusPolicy" >
+ <enum>Qt::NoFocus</enum>
+ </property>
+ <property name="text" >
+ <string>Abort fetching</string>
+ </property>
+ <property name="autoDefault" >
+ <bool>false</bool>
+ </property>
+ <property name="default" >
+ <bool>false</bool>
+ </property>
+ <property name="flat" >
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::MinimumExpanding</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>140</width>
+ <height>27</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item row="0" column="0" >
+ <widget class="QTreeWidget" name="treeWidget" >
+ <property name="enabled" >
+ <bool>true</bool>
+ </property>
+ <property name="horizontalScrollBarPolicy" >
+ <enum>Qt::ScrollBarAsNeeded</enum>
+ </property>
+ <property name="showDropIndicator" stdset="0" >
+ <bool>false</bool>
+ </property>
+ <property name="selectionMode" >
+ <enum>QAbstractItemView::NoSelection</enum>
+ </property>
+ <property name="horizontalScrollMode" >
+ <enum>QAbstractItemView::ScrollPerItem</enum>
+ </property>
+ <property name="rootIsDecorated" >
+ <bool>false</bool>
+ </property>
+ <property name="itemsExpandable" >
+ <bool>false</bool>
+ </property>
+ <column>
+ <property name="text" >
+ <string>Repository</string>
+ </property>
+ </column>
+ <column>
+ <property name="text" >
+ <string>State</string>
+ </property>
+ </column>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources>
+ <include location="resources.qrc" />
+ </resources>
+ <connections>
+ <connection>
+ <sender>buttonSkip</sender>
+ <signal>clicked()</signal>
+ <receiver>QgsPluginInstallerFetchingDialogBase</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>350</x>
+ <y>321</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>250</x>
+ <y>76</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
Copied: branches/vector_overlay_branch/python/plugins/plugin_installer/qgsplugininstallerinstallingbase.py (from rev 9631, trunk/qgis/python/plugins/plugin_installer/qgsplugininstallerinstallingbase.py)
===================================================================
--- branches/vector_overlay_branch/python/plugins/plugin_installer/qgsplugininstallerinstallingbase.py (rev 0)
+++ branches/vector_overlay_branch/python/plugins/plugin_installer/qgsplugininstallerinstallingbase.py 2009-03-03 22:09:19 UTC (rev 10261)
@@ -0,0 +1,73 @@
+# -*- coding: utf-8 -*-
+
+# Form implementation generated from reading ui file 'qgsplugininstallerinstallingbase.ui'
+#
+# Created: Wed Nov 12 23:21:49 2008
+# by: PyQt4 UI code generator 4.3.3
+#
+# WARNING! All changes made in this file will be lost!
+
+from PyQt4 import QtCore, QtGui
+
+class Ui_QgsPluginInstallerInstallingDialogBase(object):
+ def setupUi(self, QgsPluginInstallerInstallingDialogBase):
+ QgsPluginInstallerInstallingDialogBase.setObjectName("QgsPluginInstallerInstallingDialogBase")
+ QgsPluginInstallerInstallingDialogBase.resize(QtCore.QSize(QtCore.QRect(0,0,520,175).size()).expandedTo(QgsPluginInstallerInstallingDialogBase.minimumSizeHint()))
+ QgsPluginInstallerInstallingDialogBase.setWindowIcon(QtGui.QIcon(":/plugins/installer/qgis-icon.png"))
+
+ self.gridlayout = QtGui.QGridLayout(QgsPluginInstallerInstallingDialogBase)
+ self.gridlayout.setObjectName("gridlayout")
+
+ spacerItem = QtGui.QSpacerItem(502,16,QtGui.QSizePolicy.Minimum,QtGui.QSizePolicy.MinimumExpanding)
+ self.gridlayout.addItem(spacerItem,0,0,1,1)
+
+ self.hboxlayout = QtGui.QHBoxLayout()
+ self.hboxlayout.setObjectName("hboxlayout")
+
+ self.label = QtGui.QLabel(QgsPluginInstallerInstallingDialogBase)
+ self.label.setObjectName("label")
+ self.hboxlayout.addWidget(self.label)
+
+ self.labelName = QtGui.QLabel(QgsPluginInstallerInstallingDialogBase)
+
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Preferred)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.labelName.sizePolicy().hasHeightForWidth())
+ self.labelName.setSizePolicy(sizePolicy)
+ self.labelName.setObjectName("labelName")
+ self.hboxlayout.addWidget(self.labelName)
+ self.gridlayout.addLayout(self.hboxlayout,1,0,1,1)
+
+ self.labelState = QtGui.QLabel(QgsPluginInstallerInstallingDialogBase)
+ self.labelState.setObjectName("labelState")
+ self.gridlayout.addWidget(self.labelState,2,0,1,1)
+
+ self.progressBar = QtGui.QProgressBar(QgsPluginInstallerInstallingDialogBase)
+ self.progressBar.setMaximum(100)
+ self.progressBar.setProperty("value",QtCore.QVariant(0))
+ self.progressBar.setAlignment(QtCore.Qt.AlignHCenter)
+ self.progressBar.setTextDirection(QtGui.QProgressBar.TopToBottom)
+ self.progressBar.setObjectName("progressBar")
+ self.gridlayout.addWidget(self.progressBar,3,0,1,1)
+
+ spacerItem1 = QtGui.QSpacerItem(502,16,QtGui.QSizePolicy.Minimum,QtGui.QSizePolicy.Fixed)
+ self.gridlayout.addItem(spacerItem1,4,0,1,1)
+
+ self.buttonBox = QtGui.QDialogButtonBox(QgsPluginInstallerInstallingDialogBase)
+ self.buttonBox.setFocusPolicy(QtCore.Qt.NoFocus)
+ self.buttonBox.setContextMenuPolicy(QtCore.Qt.NoContextMenu)
+ self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Abort)
+ self.buttonBox.setCenterButtons(True)
+ self.buttonBox.setObjectName("buttonBox")
+ self.gridlayout.addWidget(self.buttonBox,5,0,1,1)
+
+ self.retranslateUi(QgsPluginInstallerInstallingDialogBase)
+ QtCore.QMetaObject.connectSlotsByName(QgsPluginInstallerInstallingDialogBase)
+
+ def retranslateUi(self, QgsPluginInstallerInstallingDialogBase):
+ QgsPluginInstallerInstallingDialogBase.setWindowTitle(QtGui.QApplication.translate("QgsPluginInstallerInstallingDialogBase", "QGIS Python Plugin Installer", None, QtGui.QApplication.UnicodeUTF8))
+ self.label.setText(QtGui.QApplication.translate("QgsPluginInstallerInstallingDialogBase", "Installing plugin:", None, QtGui.QApplication.UnicodeUTF8))
+ self.labelState.setText(QtGui.QApplication.translate("QgsPluginInstallerInstallingDialogBase", "Connecting...", None, QtGui.QApplication.UnicodeUTF8))
+
+import resources_rc
Copied: branches/vector_overlay_branch/python/plugins/plugin_installer/qgsplugininstallerinstallingbase.ui (from rev 9631, trunk/qgis/python/plugins/plugin_installer/qgsplugininstallerinstallingbase.ui)
===================================================================
--- branches/vector_overlay_branch/python/plugins/plugin_installer/qgsplugininstallerinstallingbase.ui (rev 0)
+++ branches/vector_overlay_branch/python/plugins/plugin_installer/qgsplugininstallerinstallingbase.ui 2009-03-03 22:09:19 UTC (rev 10261)
@@ -0,0 +1,124 @@
+<ui version="4.0" >
+ <author>Borys Jurgiel</author>
+ <class>QgsPluginInstallerInstallingDialogBase</class>
+ <widget class="QDialog" name="QgsPluginInstallerInstallingDialogBase" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>520</width>
+ <height>175</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>QGIS Python Plugin Installer</string>
+ </property>
+ <property name="windowIcon" >
+ <iconset resource="resources.qrc" >:/plugins/installer/qgis-icon.png</iconset>
+ </property>
+ <layout class="QGridLayout" >
+ <item row="0" column="0" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::MinimumExpanding</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>502</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="1" column="0" >
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>Installing plugin:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="labelName" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="2" column="0" >
+ <widget class="QLabel" name="labelState" >
+ <property name="text" >
+ <string>Connecting...</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" >
+ <widget class="QProgressBar" name="progressBar" >
+ <property name="maximum" >
+ <number>100</number>
+ </property>
+ <property name="value" >
+ <number>0</number>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignHCenter</set>
+ </property>
+ <property name="textDirection" >
+ <enum>QProgressBar::TopToBottom</enum>
+ </property>
+ <property name="format" >
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>502</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="5" column="0" >
+ <widget class="QDialogButtonBox" name="buttonBox" >
+ <property name="focusPolicy" >
+ <enum>Qt::NoFocus</enum>
+ </property>
+ <property name="contextMenuPolicy" >
+ <enum>Qt::NoContextMenu</enum>
+ </property>
+ <property name="standardButtons" >
+ <set>QDialogButtonBox::Abort</set>
+ </property>
+ <property name="centerButtons" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources>
+ <include location="resources.qrc" />
+ </resources>
+ <connections/>
+</ui>
Copied: branches/vector_overlay_branch/python/plugins/plugin_installer/qgsplugininstallerpluginerrorbase.py (from rev 9631, trunk/qgis/python/plugins/plugin_installer/qgsplugininstallerpluginerrorbase.py)
===================================================================
--- branches/vector_overlay_branch/python/plugins/plugin_installer/qgsplugininstallerpluginerrorbase.py (rev 0)
+++ branches/vector_overlay_branch/python/plugins/plugin_installer/qgsplugininstallerpluginerrorbase.py 2009-03-03 22:09:19 UTC (rev 10261)
@@ -0,0 +1,68 @@
+# -*- coding: utf-8 -*-
+
+# Form implementation generated from reading ui file 'qgsplugininstallerpluginerrorbase.ui'
+#
+# Created: Wed Nov 12 23:21:49 2008
+# by: PyQt4 UI code generator 4.3.3
+#
+# WARNING! All changes made in this file will be lost!
+
+from PyQt4 import QtCore, QtGui
+
+class Ui_QgsPluginInstallerPluginErrorDialogBase(object):
+ def setupUi(self, QgsPluginInstallerPluginErrorDialogBase):
+ QgsPluginInstallerPluginErrorDialogBase.setObjectName("QgsPluginInstallerPluginErrorDialogBase")
+ QgsPluginInstallerPluginErrorDialogBase.resize(QtCore.QSize(QtCore.QRect(0,0,521,383).size()).expandedTo(QgsPluginInstallerPluginErrorDialogBase.minimumSizeHint()))
+ QgsPluginInstallerPluginErrorDialogBase.setMinimumSize(QtCore.QSize(480,300))
+ QgsPluginInstallerPluginErrorDialogBase.setWindowIcon(QtGui.QIcon(":/plugins/installer/qgis-icon.png"))
+
+ self.gridlayout = QtGui.QGridLayout(QgsPluginInstallerPluginErrorDialogBase)
+ self.gridlayout.setObjectName("gridlayout")
+
+ self.label = QtGui.QLabel(QgsPluginInstallerPluginErrorDialogBase)
+
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Preferred)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
+ self.label.setSizePolicy(sizePolicy)
+ self.label.setWordWrap(True)
+ self.label.setOpenExternalLinks(True)
+ self.label.setObjectName("label")
+ self.gridlayout.addWidget(self.label,1,0,1,1)
+
+ self.textBrowser = QtGui.QTextBrowser(QgsPluginInstallerPluginErrorDialogBase)
+ self.textBrowser.setMinimumSize(QtCore.QSize(0,0))
+ self.textBrowser.setFocusPolicy(QtCore.Qt.NoFocus)
+ self.textBrowser.setObjectName("textBrowser")
+ self.gridlayout.addWidget(self.textBrowser,2,0,1,1)
+
+ spacerItem = QtGui.QSpacerItem(503,10,QtGui.QSizePolicy.Minimum,QtGui.QSizePolicy.Fixed)
+ self.gridlayout.addItem(spacerItem,3,0,1,1)
+
+ self.label1 = QtGui.QLabel(QgsPluginInstallerPluginErrorDialogBase)
+ self.label1.setFrameShape(QtGui.QFrame.NoFrame)
+ self.label1.setFrameShadow(QtGui.QFrame.Plain)
+ self.label1.setWordWrap(True)
+ self.label1.setObjectName("label1")
+ self.gridlayout.addWidget(self.label1,4,0,1,1)
+
+ self.buttonBox = QtGui.QDialogButtonBox(QgsPluginInstallerPluginErrorDialogBase)
+ self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.No|QtGui.QDialogButtonBox.NoButton|QtGui.QDialogButtonBox.Yes)
+ self.buttonBox.setObjectName("buttonBox")
+ self.gridlayout.addWidget(self.buttonBox,6,0,1,1)
+
+ spacerItem1 = QtGui.QSpacerItem(10,10,QtGui.QSizePolicy.Minimum,QtGui.QSizePolicy.Fixed)
+ self.gridlayout.addItem(spacerItem1,0,0,1,1)
+
+ self.retranslateUi(QgsPluginInstallerPluginErrorDialogBase)
+ QtCore.QObject.connect(self.buttonBox,QtCore.SIGNAL("rejected()"),QgsPluginInstallerPluginErrorDialogBase.reject)
+ QtCore.QObject.connect(self.buttonBox,QtCore.SIGNAL("accepted()"),QgsPluginInstallerPluginErrorDialogBase.accept)
+ QtCore.QMetaObject.connectSlotsByName(QgsPluginInstallerPluginErrorDialogBase)
+
+ def retranslateUi(self, QgsPluginInstallerPluginErrorDialogBase):
+ QgsPluginInstallerPluginErrorDialogBase.setWindowTitle(QtGui.QApplication.translate("QgsPluginInstallerPluginErrorDialogBase", "Error loading plugin", None, QtGui.QApplication.UnicodeUTF8))
+ self.label.setText(QtGui.QApplication.translate("QgsPluginInstallerPluginErrorDialogBase", "The plugin seems to be invalid or have unfulfilled dependencies. It has been installed, but can\'t be loaded. If you really need this plugin, you can contact its author or <a href=\"http://lists.osgeo.org/mailman/listinfo/qgis-user\">QGIS users group</a> and try to solve the problem. If not, you can just uninstall it. Here is the error message below:", None, QtGui.QApplication.UnicodeUTF8))
+ self.label1.setText(QtGui.QApplication.translate("QgsPluginInstallerPluginErrorDialogBase", "Do you want to uninstall this plugin now? If you\'re unsure, probably you would like to do this.", None, QtGui.QApplication.UnicodeUTF8))
+
+import resources_rc
Copied: branches/vector_overlay_branch/python/plugins/plugin_installer/qgsplugininstallerpluginerrorbase.ui (from rev 9631, trunk/qgis/python/plugins/plugin_installer/qgsplugininstallerpluginerrorbase.ui)
===================================================================
--- branches/vector_overlay_branch/python/plugins/plugin_installer/qgsplugininstallerpluginerrorbase.ui (rev 0)
+++ branches/vector_overlay_branch/python/plugins/plugin_installer/qgsplugininstallerpluginerrorbase.ui 2009-03-03 22:09:19 UTC (rev 10261)
@@ -0,0 +1,155 @@
+<ui version="4.0" >
+ <author>Borys Jurgiel</author>
+ <class>QgsPluginInstallerPluginErrorDialogBase</class>
+ <widget class="QDialog" name="QgsPluginInstallerPluginErrorDialogBase" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>521</width>
+ <height>383</height>
+ </rect>
+ </property>
+ <property name="minimumSize" >
+ <size>
+ <width>480</width>
+ <height>300</height>
+ </size>
+ </property>
+ <property name="windowTitle" >
+ <string>Error loading plugin</string>
+ </property>
+ <property name="windowIcon" >
+ <iconset resource="resources.qrc" >:/plugins/installer/qgis-icon.png</iconset>
+ </property>
+ <layout class="QGridLayout" >
+ <item row="1" column="0" >
+ <widget class="QLabel" name="label" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>The plugin seems to be invalid or have unfulfilled dependencies. It has been installed, but can't be loaded. If you really need this plugin, you can contact its author or <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user">QGIS users group</a> and try to solve the problem. If not, you can just uninstall it. Here is the error message below:</string>
+ </property>
+ <property name="wordWrap" >
+ <bool>true</bool>
+ </property>
+ <property name="openExternalLinks" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" >
+ <widget class="QTextBrowser" name="textBrowser" >
+ <property name="minimumSize" >
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="focusPolicy" >
+ <enum>Qt::NoFocus</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>503</width>
+ <height>10</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="4" column="0" >
+ <widget class="QLabel" name="label1" >
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="text" >
+ <string>Do you want to uninstall this plugin now? If you're unsure, probably you would like to do this.</string>
+ </property>
+ <property name="wordWrap" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="0" >
+ <widget class="QDialogButtonBox" name="buttonBox" >
+ <property name="standardButtons" >
+ <set>QDialogButtonBox::No|QDialogButtonBox::NoButton|QDialogButtonBox::Yes</set>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>10</width>
+ <height>10</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ <tabstops>
+ <tabstop>textBrowser</tabstop>
+ </tabstops>
+ <resources>
+ <include location="resources.qrc" />
+ </resources>
+ <connections>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>rejected()</signal>
+ <receiver>QgsPluginInstallerPluginErrorDialogBase</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>266</x>
+ <y>428</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>266</x>
+ <y>226</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>accepted()</signal>
+ <receiver>QgsPluginInstallerPluginErrorDialogBase</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>266</x>
+ <y>428</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>266</x>
+ <y>226</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
Copied: branches/vector_overlay_branch/python/plugins/plugin_installer/qgsplugininstallerrepositorybase.py (from rev 9631, trunk/qgis/python/plugins/plugin_installer/qgsplugininstallerrepositorybase.py)
===================================================================
--- branches/vector_overlay_branch/python/plugins/plugin_installer/qgsplugininstallerrepositorybase.py (rev 0)
+++ branches/vector_overlay_branch/python/plugins/plugin_installer/qgsplugininstallerrepositorybase.py 2009-03-03 22:09:19 UTC (rev 10261)
@@ -0,0 +1,122 @@
+# -*- coding: utf-8 -*-
+
+# Form implementation generated from reading ui file 'qgsplugininstallerrepositorybase.ui'
+#
+# Created: Wed Nov 12 23:21:49 2008
+# by: PyQt4 UI code generator 4.3.3
+#
+# WARNING! All changes made in this file will be lost!
+
+from PyQt4 import QtCore, QtGui
+
+class Ui_QgsPluginInstallerRepositoryDetailsDialogBase(object):
+ def setupUi(self, QgsPluginInstallerRepositoryDetailsDialogBase):
+ QgsPluginInstallerRepositoryDetailsDialogBase.setObjectName("QgsPluginInstallerRepositoryDetailsDialogBase")
+ QgsPluginInstallerRepositoryDetailsDialogBase.resize(QtCore.QSize(QtCore.QRect(0,0,522,191).size()).expandedTo(QgsPluginInstallerRepositoryDetailsDialogBase.minimumSizeHint()))
+
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred,QtGui.QSizePolicy.Preferred)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(QgsPluginInstallerRepositoryDetailsDialogBase.sizePolicy().hasHeightForWidth())
+ QgsPluginInstallerRepositoryDetailsDialogBase.setSizePolicy(sizePolicy)
+ QgsPluginInstallerRepositoryDetailsDialogBase.setWindowIcon(QtGui.QIcon(":/plugins/installer/qgis-icon.png"))
+
+ self.gridlayout = QtGui.QGridLayout(QgsPluginInstallerRepositoryDetailsDialogBase)
+ self.gridlayout.setObjectName("gridlayout")
+
+ self.label = QtGui.QLabel(QgsPluginInstallerRepositoryDetailsDialogBase)
+
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed,QtGui.QSizePolicy.Preferred)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
+ self.label.setSizePolicy(sizePolicy)
+ self.label.setObjectName("label")
+ self.gridlayout.addWidget(self.label,0,0,1,1)
+
+ spacerItem = QtGui.QSpacerItem(16,27,QtGui.QSizePolicy.Fixed,QtGui.QSizePolicy.Minimum)
+ self.gridlayout.addItem(spacerItem,0,1,1,1)
+
+ self.editName = QtGui.QLineEdit(QgsPluginInstallerRepositoryDetailsDialogBase)
+ self.editName.setObjectName("editName")
+ self.gridlayout.addWidget(self.editName,0,2,1,2)
+
+ self.label_2 = QtGui.QLabel(QgsPluginInstallerRepositoryDetailsDialogBase)
+ self.label_2.setObjectName("label_2")
+ self.gridlayout.addWidget(self.label_2,1,0,1,1)
+
+ self.editURL = QtGui.QLineEdit(QgsPluginInstallerRepositoryDetailsDialogBase)
+ self.editURL.setObjectName("editURL")
+ self.gridlayout.addWidget(self.editURL,1,2,1,2)
+
+ self.checkBoxEnabled = QtGui.QCheckBox(QgsPluginInstallerRepositoryDetailsDialogBase)
+ self.checkBoxEnabled.setEnabled(True)
+
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed,QtGui.QSizePolicy.Fixed)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.checkBoxEnabled.sizePolicy().hasHeightForWidth())
+ self.checkBoxEnabled.setSizePolicy(sizePolicy)
+ self.checkBoxEnabled.setChecked(False)
+ self.checkBoxEnabled.setObjectName("checkBoxEnabled")
+ self.gridlayout.addWidget(self.checkBoxEnabled,2,2,1,1)
+
+ spacerItem1 = QtGui.QSpacerItem(351,23,QtGui.QSizePolicy.Fixed,QtGui.QSizePolicy.Minimum)
+ self.gridlayout.addItem(spacerItem1,2,3,1,1)
+
+ self.labelInfo = QtGui.QLabel(QgsPluginInstallerRepositoryDetailsDialogBase)
+ self.labelInfo.setEnabled(True)
+
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Fixed)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.labelInfo.sizePolicy().hasHeightForWidth())
+ self.labelInfo.setSizePolicy(sizePolicy)
+
+ palette = QtGui.QPalette()
+
+ brush = QtGui.QBrush(QtGui.QColor(175,0,0))
+ brush.setStyle(QtCore.Qt.SolidPattern)
+ palette.setBrush(QtGui.QPalette.Active,QtGui.QPalette.WindowText,brush)
+
+ brush = QtGui.QBrush(QtGui.QColor(175,0,0))
+ brush.setStyle(QtCore.Qt.SolidPattern)
+ palette.setBrush(QtGui.QPalette.Inactive,QtGui.QPalette.WindowText,brush)
+
+ brush = QtGui.QBrush(QtGui.QColor(128,128,128))
+ brush.setStyle(QtCore.Qt.SolidPattern)
+ palette.setBrush(QtGui.QPalette.Disabled,QtGui.QPalette.WindowText,brush)
+ self.labelInfo.setPalette(palette)
+
+ font = QtGui.QFont()
+ font.setWeight(75)
+ font.setBold(True)
+ self.labelInfo.setFont(font)
+ self.labelInfo.setFrameShape(QtGui.QFrame.NoFrame)
+ self.labelInfo.setObjectName("labelInfo")
+ self.gridlayout.addWidget(self.labelInfo,3,2,1,2)
+
+ self.buttonBox = QtGui.QDialogButtonBox(QgsPluginInstallerRepositoryDetailsDialogBase)
+ self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
+ self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.NoButton|QtGui.QDialogButtonBox.Ok)
+ self.buttonBox.setObjectName("buttonBox")
+ self.gridlayout.addWidget(self.buttonBox,5,0,1,4)
+
+ self.retranslateUi(QgsPluginInstallerRepositoryDetailsDialogBase)
+ QtCore.QObject.connect(self.buttonBox,QtCore.SIGNAL("accepted()"),QgsPluginInstallerRepositoryDetailsDialogBase.accept)
+ QtCore.QObject.connect(self.buttonBox,QtCore.SIGNAL("rejected()"),QgsPluginInstallerRepositoryDetailsDialogBase.reject)
+ QtCore.QMetaObject.connectSlotsByName(QgsPluginInstallerRepositoryDetailsDialogBase)
+
+ def retranslateUi(self, QgsPluginInstallerRepositoryDetailsDialogBase):
+ QgsPluginInstallerRepositoryDetailsDialogBase.setWindowTitle(QtGui.QApplication.translate("QgsPluginInstallerRepositoryDetailsDialogBase", "Repository details", None, QtGui.QApplication.UnicodeUTF8))
+ self.label.setText(QtGui.QApplication.translate("QgsPluginInstallerRepositoryDetailsDialogBase", "Name:", None, QtGui.QApplication.UnicodeUTF8))
+ self.editName.setToolTip(QtGui.QApplication.translate("QgsPluginInstallerRepositoryDetailsDialogBase", "Enter a name for the repository", None, QtGui.QApplication.UnicodeUTF8))
+ self.editName.setWhatsThis(QtGui.QApplication.translate("QgsPluginInstallerRepositoryDetailsDialogBase", "Enter a name for the repository", None, QtGui.QApplication.UnicodeUTF8))
+ self.label_2.setText(QtGui.QApplication.translate("QgsPluginInstallerRepositoryDetailsDialogBase", "URL:", None, QtGui.QApplication.UnicodeUTF8))
+ self.editURL.setToolTip(QtGui.QApplication.translate("QgsPluginInstallerRepositoryDetailsDialogBase", "Enter the repository URL, beginning with \"http://\"", None, QtGui.QApplication.UnicodeUTF8))
+ self.editURL.setWhatsThis(QtGui.QApplication.translate("QgsPluginInstallerRepositoryDetailsDialogBase", "Enter the repository URL, beginning with \"http://\"", None, QtGui.QApplication.UnicodeUTF8))
+ self.checkBoxEnabled.setToolTip(QtGui.QApplication.translate("QgsPluginInstallerRepositoryDetailsDialogBase", "Enable or disable the repository (disabled repositories will be omitted)", None, QtGui.QApplication.UnicodeUTF8))
+ self.checkBoxEnabled.setWhatsThis(QtGui.QApplication.translate("QgsPluginInstallerRepositoryDetailsDialogBase", "Enable or disable the repository (disabled repositories will be omitted)", None, QtGui.QApplication.UnicodeUTF8))
+ self.checkBoxEnabled.setText(QtGui.QApplication.translate("QgsPluginInstallerRepositoryDetailsDialogBase", "Enabled", None, QtGui.QApplication.UnicodeUTF8))
+
+import resources_rc
Copied: branches/vector_overlay_branch/python/plugins/plugin_installer/qgsplugininstallerrepositorybase.ui (from rev 9631, trunk/qgis/python/plugins/plugin_installer/qgsplugininstallerrepositorybase.ui)
===================================================================
--- branches/vector_overlay_branch/python/plugins/plugin_installer/qgsplugininstallerrepositorybase.ui (rev 0)
+++ branches/vector_overlay_branch/python/plugins/plugin_installer/qgsplugininstallerrepositorybase.ui 2009-03-03 22:09:19 UTC (rev 10261)
@@ -0,0 +1,243 @@
+<ui version="4.0" >
+ <author>Borys Jurgiel</author>
+ <class>QgsPluginInstallerRepositoryDetailsDialogBase</class>
+ <widget class="QDialog" name="QgsPluginInstallerRepositoryDetailsDialogBase" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>522</width>
+ <height>191</height>
+ </rect>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="windowTitle" >
+ <string>Repository details</string>
+ </property>
+ <property name="windowIcon" >
+ <iconset resource="resources.qrc" >:/plugins/installer/qgis-icon.png</iconset>
+ </property>
+ <property name="statusTip" >
+ <string/>
+ </property>
+ <property name="whatsThis" >
+ <string/>
+ </property>
+ <layout class="QGridLayout" >
+ <item row="0" column="0" >
+ <widget class="QLabel" name="label" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Preferred" hsizetype="Fixed" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>Name:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>16</width>
+ <height>27</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="0" column="2" colspan="2" >
+ <widget class="QLineEdit" name="editName" >
+ <property name="toolTip" >
+ <string>Enter a name for the repository</string>
+ </property>
+ <property name="whatsThis" >
+ <string>Enter a name for the repository</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="label_2" >
+ <property name="text" >
+ <string>URL:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2" colspan="2" >
+ <widget class="QLineEdit" name="editURL" >
+ <property name="toolTip" >
+ <string>Enter the repository URL, beginning with "http://"</string>
+ </property>
+ <property name="whatsThis" >
+ <string>Enter the repository URL, beginning with "http://"</string>
+ </property>
+ <property name="text" >
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="2" >
+ <widget class="QCheckBox" name="checkBoxEnabled" >
+ <property name="enabled" >
+ <bool>true</bool>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip" >
+ <string>Enable or disable the repository (disabled repositories will be omitted)</string>
+ </property>
+ <property name="whatsThis" >
+ <string>Enable or disable the repository (disabled repositories will be omitted)</string>
+ </property>
+ <property name="text" >
+ <string>Enabled</string>
+ </property>
+ <property name="checked" >
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="3" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>351</width>
+ <height>23</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="3" column="2" colspan="2" >
+ <widget class="QLabel" name="labelInfo" >
+ <property name="enabled" >
+ <bool>true</bool>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="palette" >
+ <palette>
+ <active>
+ <colorrole role="WindowText" >
+ <brush brushstyle="SolidPattern" >
+ <color alpha="255" >
+ <red>175</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </brush>
+ </colorrole>
+ </active>
+ <inactive>
+ <colorrole role="WindowText" >
+ <brush brushstyle="SolidPattern" >
+ <color alpha="255" >
+ <red>175</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </brush>
+ </colorrole>
+ </inactive>
+ <disabled>
+ <colorrole role="WindowText" >
+ <brush brushstyle="SolidPattern" >
+ <color alpha="255" >
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ </brush>
+ </colorrole>
+ </disabled>
+ </palette>
+ </property>
+ <property name="font" >
+ <font>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="text" >
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="0" colspan="4" >
+ <widget class="QDialogButtonBox" name="buttonBox" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="standardButtons" >
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources>
+ <include location="resources.qrc" />
+ </resources>
+ <connections>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>accepted()</signal>
+ <receiver>QgsPluginInstallerRepositoryDetailsDialogBase</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>257</x>
+ <y>207</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>157</x>
+ <y>216</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>rejected()</signal>
+ <receiver>QgsPluginInstallerRepositoryDetailsDialogBase</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>325</x>
+ <y>207</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>286</x>
+ <y>216</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
Added: branches/vector_overlay_branch/python/plugins/plugin_installer/version_compare.py
===================================================================
--- branches/vector_overlay_branch/python/plugins/plugin_installer/version_compare.py (rev 0)
+++ branches/vector_overlay_branch/python/plugins/plugin_installer/version_compare.py 2009-03-03 22:09:19 UTC (rev 10261)
@@ -0,0 +1,140 @@
+"""
+This is a Python module to compare version numbers. It's case insensitive
+and recognizes all major notations, prefixes (ver. and version), delimiters
+(. - and _) and suffixes (alpha, beta, rc, preview and trunk).
+
+Usage: compareVersions(version1, version2)
+
+The function accepts arguments of any type convertable to unicode string
+and returns integer value:
+0 - the versions are equal
+1 - version 1 is higher
+2 - version 2 is higher
+
+-----------------------------------------------------------------------------
+HOW IT WORKS...
+First, both arguments are converted to uppercase unicode and stripped of
+'VERSION' or 'VER.' prefix. Then they are chopped into a list of particular
+numeric and alphabetic elements. The dots, dashes and underlines are recognized
+as delimiters. Also numbers and non numbers are separated. See example below:
+
+'Ver 0.03-120_rc7foo' is converted to ['0','03','120','RC','7','FOO']
+
+Then every pair of elements, from left to right, is compared as string
+or as number to provide the best result (you know, 11>9 but also '03'>'007').
+The comparing stops when one of elements is greater. If comparing achieves
+the end of the shorter list and the matter is still unresolved, the longer
+list is usually recognized as higher, except following suffixes:
+ALPHA, BETA, RC, PREVIEW and TRUNK which make the version number lower.
+
+/***************************************************************************
+ * *
+ * Copyright (C) 2008-11-24 Borys Jurgiel *
+ * *
+ ***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+"""
+
+# ------------------------------------------------------------------------ #
+def normalizeVersion(s):
+ """ remove possible prefix from given string and convert to uppercase """
+ prefixes = ['VERSION','VER.','VER','V.','V','REVISION','REV.','REV','R.','R']
+ if not s:
+ return unicode()
+ s = unicode(s).upper()
+ for i in prefixes:
+ if s[:len(i)] == i:
+ s = s.replace(i,'')
+ s = s.strip()
+ return s
+
+
+# ------------------------------------------------------------------------ #
+def classifyCharacter(c):
+ """ return 0 for delimiter, 1 for digit and 2 for alphabetic character """
+ if c in [".","-","_"," "]:
+ return 0
+ if c.isdigit():
+ return 1
+ else:
+ return 2
+
+
+# ------------------------------------------------------------------------ #
+def chopString(s):
+ """ convert string to list of numbers and words """
+ l = [s[0]]
+ for i in range(1,len(s)):
+ if classifyCharacter(s[i]) == 0:
+ pass
+ elif classifyCharacter(s[i]) == classifyCharacter(s[i-1]):
+ l[len(l)-1] += s[i]
+ else:
+ l += [s[i]]
+ return l
+
+
+# ------------------------------------------------------------------------ #
+def compareElements(s1,s2):
+ """ compare two particular elements """
+ # check if the matter is easy solvable:
+ if s1 == s2:
+ return 0
+ # try to compare as numeric values (but only if the first character is not 0):
+ if s1 and s2 and s1.isnumeric() and s2.isnumeric() and s1[0] != '0' and s2[0] != '0':
+ if float(s1) == float(s2):
+ return 0
+ elif float(s1) > float(s2):
+ return 1
+ else:
+ return 2
+ # if the strings aren't numeric or start from 0, compare them as a strings:
+ # but first, set ALPHA < BETA < PREVIEW < RC < TRUNK < [NOTHING] < [ANYTHING_ELSE]
+ if not s1 in ['ALPHA','BETA','PREVIEW','RC','TRUNK']:
+ s1 = 'Z' + s1
+ if not s2 in ['ALPHA','BETA','PREVIEW','RC','TRUNK']:
+ s2 = 'Z' + s2
+ # the final test:
+ if s1 > s2:
+ return 1
+ else:
+ return 2
+
+
+# ------------------------------------------------------------------------ #
+def compareVersions(a,b):
+ """ Compare two version numbers. Return 0 if a==b or error, 1 if a<b and 2 if b>a """
+ if not a or not b:
+ return 0
+ a = normalizeVersion(a)
+ b = normalizeVersion(b)
+ if a == b:
+ return 0
+ # convert the strings to the lists
+ v1 = chopString(a)
+ v2 = chopString(b)
+ # set the shorter string as a base
+ l = len(v1)
+ if l > len(v2):
+ l = len(v2)
+ # try to determine within the common length
+ for i in range(l):
+ if compareElements(v1[i],v2[i]):
+ return compareElements(v1[i],v2[i])
+ # if the lists are identical till the end of the shorther string, try to compare the odd tail
+ #with the simple space (because the 'alpha', 'beta', 'preview' and 'rc' are LESS then nothing)
+ if len(v1) > l:
+ return compareElements(v1[l],u' ')
+ if len(v2) > l:
+ return compareElements(u' ',v2[l])
+ # if everything else fails...
+ if a > b:
+ return 1
+ else:
+ return 2
More information about the QGIS-commit
mailing list