[QGIS Commit] r8468 - in trunk/qgis/src: app gui ui

svn_qgis at osgeo.org svn_qgis at osgeo.org
Mon May 19 09:43:37 EDT 2008


Author: timlinux
Date: 2008-05-19 09:43:37 -0400 (Mon, 19 May 2008)
New Revision: 8468

Added:
   trunk/qgis/src/ui/qgsdetaileditemwidgetbase.ui
Modified:
   trunk/qgis/src/app/qgspluginmanager.cpp
   trunk/qgis/src/app/qgspluginmanager.h
   trunk/qgis/src/gui/CMakeLists.txt
   trunk/qgis/src/ui/CMakeLists.txt
   trunk/qgis/src/ui/qgspluginmanagerbase.ui
Log:
Reimplemented plugin manager to use a list view rather than a table view and to use the custom qgsdetaileditemdelegate for display of available plugins


Modified: trunk/qgis/src/app/qgspluginmanager.cpp
===================================================================
--- trunk/qgis/src/app/qgspluginmanager.cpp	2008-05-19 13:37:53 UTC (rev 8467)
+++ trunk/qgis/src/app/qgspluginmanager.cpp	2008-05-19 13:43:37 UTC (rev 8468)
@@ -25,15 +25,22 @@
 #include <QMessageBox>
 #include <QLibrary>
 #include <QSettings>
-#include "qgisplugin.h"
-#include "qgslogger.h"
+#include <QStandardItem>
+#include <QPushButton>
+#include <QRegExp>
+
 #include "qgspluginmanager.h"
-#include "qgspluginitem.h"
-#include "qgsproviderregistry.h"
-#include "qgspluginregistry.h"
+#include <qgisplugin.h>
+#include <qgslogger.h>
+#include <qgspluginitem.h>
+#include <qgsproviderregistry.h>
+#include <qgspluginregistry.h>
+#include <qgsdetaileditemdelegate.h>
+#include <qgsdetaileditemwidget.h>
+#include <qgsdetaileditemdata.h>
 
 #ifdef HAVE_PYTHON
-#include "qgspythonutils.h"
+#include <qgspythonutils.h>
 #endif
 
 #define TESTLIB
@@ -58,37 +65,47 @@
      QString baseDir = appDir.left(bin);
      QString libDir = baseDir + "/lib"; */
 
-  txtPluginDir->setText(pr->libraryDirectory().path());
+  lblPluginDir->setText(pr->libraryDirectory().path());
   setTable();
   getPluginDescriptions();
   getPythonPluginDescriptions();
+  //
+  // Create the select all and clear all buttons and add them to the 
+  // buttonBox
+  //
+  QPushButton * btnSelectAll = new QPushButton(tr("&Select All"));
+  QPushButton * btnClearAll = new QPushButton(tr("&Clear All"));
+  btnSelectAll->setDefault(true);
+  buttonBox->addButton(btnSelectAll, QDialogButtonBox::ActionRole);
+  buttonBox->addButton(btnClearAll, QDialogButtonBox::ActionRole);
+  // connect the slot up to catch when a bookmark is deleted 
+  connect(btnSelectAll, SIGNAL(clicked()), this, SLOT(selectAll()));
+  // connect the slot up to catch when a bookmark is zoomed to
+  connect(btnClearAll, SIGNAL(clicked()), this, SLOT(clearAll()));
+  
 }
 
 
 QgsPluginManager::~QgsPluginManager()
 {
+  delete mModelProxy;
+  delete mModelPlugins;
 }
 
 void QgsPluginManager::setTable()
 {
-  lstPlugins->setAlternatingRowColors(true);
-  mModelPlugins= new QStandardItemModel(0,4);
-  mModelPlugins->setHorizontalHeaderItem(0,new QStandardItem(tr("Name")));
-  mModelPlugins->setHorizontalHeaderItem(1,new QStandardItem(tr("Version")));
-  mModelPlugins->setHorizontalHeaderItem(2,new QStandardItem(tr("Description")));
-  mModelPlugins->setHorizontalHeaderItem(3,new QStandardItem(tr("Library name")));
-  
-  lstPlugins->setModel(mModelPlugins);
-  // No vertical headers
-  lstPlugins->verticalHeader()->hide();
-  lstPlugins->setSelectionBehavior(QAbstractItemView::SelectRows);
-  lstPlugins->setFocus();
+  mModelPlugins= new QStandardItemModel(0,1);
+  mModelProxy = new QSortFilterProxyModel(this);
+  mModelProxy->setSourceModel(mModelPlugins);
+  //mModelProxy->setFilterKeyColumn(0);
+  vwPlugins->setModel(mModelProxy);
+  vwPlugins->setFocus();
+  vwPlugins->setItemDelegateForColumn(0,new QgsDetailedItemDelegate());
 }
 
 void QgsPluginManager::resizeColumnsToContents()
 {
   // Resize columns to contents.
-  lstPlugins->resizeColumnsToContents();
   QgsDebugMsg("QgsPluginManager::resizeColumnsToContents\n");
 }
 
@@ -124,18 +141,24 @@
     if (pluginName == "???" || description == "???" || version == "???")
       continue;
 
-    //create the items
-    QStandardItem *myName=new QStandardItem(pluginName);
-    QStandardItem *myVersion=new QStandardItem(version);
-    QStandardItem *myDesc=new QStandardItem(description);
-    QStandardItem *myDir=new QStandardItem("python:" + packageName);
+    // We will create two items for each row:
+    // The first has the following roles :
+    // - DisplayRole : the name and version of the version of the plugin e.g. Plugin Foo (version 1.0)
+    // - UserRole : the description of the plugin.
+    // And the second has these roles :
+    // - DisplayRole : the library name (without path) for the plugin e.g. libfoo.so
+    // - UserRole : the name of the plugin without version e.g. plugin foor
+    // The plugin name without version is used elsewhere in this class to match
+    // aganst plugins loaded in the plugin registry
+    QStandardItem * mypDetailItem = new QStandardItem(
+        pluginName + " (" + version + ")");
+    mypDetailItem->setData(description,Qt::UserRole);
+    QString myLibraryName = "python:" + packageName;;
+    QStandardItem * mypLibraryNameItem = new QStandardItem(myLibraryName);
+    mypLibraryNameItem->setData(pluginName,Qt::UserRole);
     // myName have a checkbox
-    myName->setCheckable(true);
-    //read only
-    myName->setEditable(false);
-    myVersion->setEditable(false);
-    myDesc->setEditable(false);
-    myDir->setEditable(false);
+    mypDetailItem->setCheckable(true);
+    mypDetailItem->setEditable(false);
 
     // check to see if the plugin is loaded and set the checkbox accordingly
     QgsPluginRegistry *pRegistry = QgsPluginRegistry::instance();
@@ -151,12 +174,12 @@
       if (libName == packageName)
       {
         // set the checkbox
-        myName->setCheckState(Qt::Checked);
+        mypDetailItem->setCheckState(Qt::Checked);
       }
     }
     // Add items to model
     QList<QStandardItem *> myItems;
-    myItems << myName << myVersion << myDesc << myDir;
+    myItems << mypDetailItem << mypLibraryNameItem;
     mModelPlugins->appendRow(myItems);
   }
 #endif
@@ -173,18 +196,18 @@
 #endif
 
 // check all libs in the current plugin directory and get name and descriptions
-  QDir pluginDir(txtPluginDir->text(), sharedLibExtension, QDir::Name | QDir::IgnoreCase, QDir::Files | QDir::NoSymLinks);
+  QDir pluginDir(lblPluginDir->text(), sharedLibExtension, QDir::Name | QDir::IgnoreCase, QDir::Files | QDir::NoSymLinks);
 
   if (pluginDir.count() == 0)
   {
-      QMessageBox::information(this, tr("No Plugins"), tr("No QGIS plugins found in ") + txtPluginDir->text());
+      QMessageBox::information(this, tr("No Plugins"), tr("No QGIS plugins found in ") + lblPluginDir->text());
       return;
   }
 
   QgsDebugMsg("PLUGIN MANAGER:");
   for (uint i = 0; i < pluginDir.count(); i++)
   {
-    QString lib = QString("%1/%2").arg(txtPluginDir->text()).arg(pluginDir[i]);
+    QString lib = QString("%1/%2").arg(lblPluginDir->text()).arg(pluginDir[i]);
 
 #ifdef TESTLIB
           // This doesn't work on WIN32 and causes problems with plugins
@@ -263,18 +286,40 @@
       continue;
     }
 
-    //create the items
-    QStandardItem *myName=new QStandardItem(pName());
-    QStandardItem *myVersion=new QStandardItem(pVersion());
-    QStandardItem *myDesc=new QStandardItem(pDesc());
-    QStandardItem *myDir=new QStandardItem(pluginDir[i]);
+    // We will create two items for each row:
+    // The first has the following roles :
+    // - DisplayRole : the name and version of the version of the plugin e.g. Plugin Foo (version 1.0)
+    // - UserRole : the description of the plugin.
+    // And the second has these roles :
+    // - DisplayRole : the library name (without path) for the plugin e.g. libfoo.so
+    // - UserRole : the name of the plugin without version e.g. plugin foor
+    // The plugin name without version is used elsewhere in this class to match
+    // aganst plugins loaded in the plugin registry
+        
+    QStandardItem * mypDetailItem = new QStandardItem(
+        pName() + " (" + pVersion() + ")");
+    //
+    // Uncommnet this block to render item using simple painter technique
+    // 
+    mypDetailItem->setData(pDesc(),Qt::UserRole);
+    //
+    //Uncomment this block to used widget based detail items (experimental)
+    //
+    //QgsDetailedItemData myData;
+    //myData.setTitle(pName());
+    //myData.setDetail(pDesc());
+    //QVariant myVariant = qVariantFromValue(myData);
+    //round trip test - delete this...no need to uncomment
+    //QgsDetailedItemData myData2 = qVariantValue<QgsDetailedItemData>(myVariant);
+    //Q_ASSERT(myData.title() == myData2.title());
+    //round trip test ends
+    //mypDetailItem->setData(myVariant,Qt::UserRole);
+    QString myLibraryName = pluginDir[i];
+    QStandardItem * mypLibraryNameItem = new QStandardItem(myLibraryName);
+    mypLibraryNameItem->setData(pName(),Qt::UserRole);
     // myName have a checkbox
-    myName->setCheckable(true);
-    //read only
-    myName->setEditable(false);
-    myVersion->setEditable(false);
-    myDesc->setEditable(false);
-    myDir->setEditable(false);
+    mypDetailItem->setCheckable(true);
+    mypDetailItem->setEditable(false);
 
     QgsDebugMsg("Getting an instance of the QgsPluginRegistry");
 
@@ -293,22 +338,22 @@
       if (libName == myLib->library())
       {
         // set the checkbox
-        myName->setCheckState(Qt::Checked);
+        mypDetailItem->setCheckState(Qt::Checked);
       }
     }
     // Add items to model
     QList<QStandardItem *> myItems;
-    myItems << myName << myVersion << myDesc << myDir;
+    myItems << mypDetailItem << mypLibraryNameItem;
     mModelPlugins->appendRow(myItems);
 
     delete myLib;
   }
 }
 
-void QgsPluginManager::on_btnOk_clicked()
+void QgsPluginManager::accept()
 {
   unload();
-  accept();
+  done(1);
 }
 
 void QgsPluginManager::unload()
@@ -323,12 +368,15 @@
     QModelIndex myIndex=mModelPlugins->index(row,0);
     if (mModelPlugins->data(myIndex,Qt::CheckStateRole).toInt() == 0)
     {
+      // Get the second col index now since it stores the 
+      // plugin name without version string in its data UserRole [ts]
+      myIndex=mModelPlugins->index(row,1);
       // its off -- see if it is loaded and if so, unload it
       QgsPluginRegistry *pRegistry = QgsPluginRegistry::instance();
 #ifdef QGISDEBUG
-      std::cout << "Checking to see if " << mModelPlugins->data(myIndex).toString().toLocal8Bit().data() << " is loaded" << std::endl;
+      std::cout << "Checking to see if " << mModelPlugins->data(myIndex, Qt::UserRole).toString().toLocal8Bit().data() << " is loaded" << std::endl;
 #endif
-      QString pluginName = mModelPlugins->data(myIndex).toString();
+      QString pluginName = mModelPlugins->data(myIndex,Qt::UserRole).toString();
       if (pRegistry->isPythonPlugin(pluginName))
       {
 #ifdef HAVE_PYTHON
@@ -362,10 +410,10 @@
   {
     if (mModelPlugins->item(row,0)->checkState() == Qt::Checked)
     {
-      QString pluginName = mModelPlugins->item(row,0)->text();
+      QString pluginName = mModelPlugins->item(row,1)->data(Qt::UserRole).toString();
       bool pythonic = false;
 
-      QString library = mModelPlugins->item(row,3)->text();
+      QString library = mModelPlugins->item(row,1)->text();
       if (library.left(7) == "python:")
       {
         library = library.mid(7);
@@ -373,16 +421,16 @@
       }
       else // C++ plugin
       {
-        library = txtPluginDir->text() + "/" + library;
+        library = lblPluginDir->text() + QDir::separator() + library;
       }
-      pis.push_back(QgsPluginItem(pluginName, mModelPlugins->item(row,2)->text(), library, 0, pythonic));
+      pis.push_back(QgsPluginItem(pluginName, mModelPlugins->item(row,0)->text(), library, 0, pythonic));
     }
 
   }
   return pis;
 }
 
-void QgsPluginManager::on_btnSelectAll_clicked()
+void QgsPluginManager::selectAll()
 {
   // select all plugins
   for (int row=0;row < mModelPlugins->rowCount();row++)
@@ -392,7 +440,7 @@
   }
 }
 
-void QgsPluginManager::on_btnClearAll_clicked()
+void QgsPluginManager::clearAll()
 {
   // clear all selection checkboxes
   for (int row=0;row < mModelPlugins->rowCount();row++)
@@ -402,8 +450,33 @@
   }
 }
 
-void QgsPluginManager::on_btnClose_clicked()
+void QgsPluginManager::on_vwPlugins_clicked(const QModelIndex &theIndex )
 {
-  reject();
+  if (theIndex.column() == 0)
+  {
+    //
+    // If the model has been filtered, the index row in the proxy wont match 
+    // the index row in the underlying model so we need to jump through this 
+    // little hoop to get the correct item
+    //
+    QStandardItem * mypItem = 
+      mModelPlugins->findItems(theIndex.data(Qt::DisplayRole).toString()).first();
+    if ( mypItem->checkState() == Qt::Checked )
+    {
+      mypItem->setCheckState(Qt::Unchecked);
+    } 
+    else 
+    {
+      mypItem->setCheckState(Qt::Checked);
+    }
+  }
 }
 
+void QgsPluginManager::on_leFilter_textChanged(QString theText)
+{
+  QgsDebugMsg("PluginManager filter changed to :" + theText);
+  QRegExp::PatternSyntax mySyntax = QRegExp::PatternSyntax(QRegExp::RegExp);
+  Qt::CaseSensitivity myCaseSensitivity = Qt::CaseInsensitive;
+  QRegExp myRegExp(theText, myCaseSensitivity, mySyntax);
+  mModelProxy->setFilterRegExp(myRegExp);
+}

Modified: trunk/qgis/src/app/qgspluginmanager.h
===================================================================
--- trunk/qgis/src/app/qgspluginmanager.h	2008-05-19 13:37:53 UTC (rev 8467)
+++ trunk/qgis/src/app/qgspluginmanager.h	2008-05-19 13:43:37 UTC (rev 8468)
@@ -21,6 +21,7 @@
 #include <vector>
 #include <QTableView>
 #include <QStandardItemModel>
+#include <QSortFilterProxyModel>
 #include <QStandardItem>
 #include <QHeaderView>
 #include "ui_qgspluginmanagerbase.h"
@@ -56,16 +57,19 @@
     //! Sort model by column ascending
     void sortModel(int );
   public slots:
+    //! Enable disable checkbox
+    void on_vwPlugins_clicked(const QModelIndex & );
     //! Load selected plugins and close the dialog
-    void on_btnOk_clicked();
+    void accept();
     //! Select all plugins by setting their checkbox on
-    void on_btnSelectAll_clicked();
+    void selectAll();
     //! Clear all selections by clearing the plugins checkbox
-    void on_btnClearAll_clicked();
-    //! Close the dialog
-    void on_btnClose_clicked();
+    void clearAll();
+    //! Update the filter when user changes the filter expression
+    void on_leFilter_textChanged(QString theText);
   private:
     QStandardItemModel *mModelPlugins;
+    QSortFilterProxyModel * mModelProxy;
 };
 
 #endif

Modified: trunk/qgis/src/gui/CMakeLists.txt
===================================================================
--- trunk/qgis/src/gui/CMakeLists.txt	2008-05-19 13:37:53 UTC (rev 8467)
+++ trunk/qgis/src/gui/CMakeLists.txt	2008-05-19 13:43:37 UTC (rev 8468)
@@ -4,6 +4,9 @@
 qgisinterface.cpp
 qgscolorbutton.cpp
 qgscursors.cpp
+qgsdetaileditemdelegate.cpp
+qgsdetaileditemwidget.cpp
+qgsdetaileditemdata.cpp
 qgsencodingfiledialog.cpp
 qgsfiledropedit.cpp
 qgslayerprojectionselector.cpp
@@ -12,6 +15,7 @@
 qgsmapcanvasmap.cpp
 qgsmapcanvassnapper.cpp
 qgsmapoverviewcanvas.cpp
+qgsmaptip.cpp
 qgsmaptool.cpp
 qgsmaptoolemitpoint.cpp
 qgsmaptoolpan.cpp
@@ -21,17 +25,19 @@
 qgsquickprint.cpp
 qgsrubberband.cpp
 qgsvertexmarker.cpp
-qgsmaptip.cpp
 )
 
 SET(QGIS_GUI_MOC_HDRS
+qgsdetaileditemdelegate.h
+qgsdetaileditemwidget.h
+qgsdetaileditemdata.h
 qgisinterface.h
 qgsencodingfiledialog.h
 qgslayerprojectionselector.h
 qgsmapcanvas.h
 qgsmapoverviewcanvas.h
+qgsmaptoolemitpoint.h
 qgsmessageviewer.h
-qgsmaptoolemitpoint.h
 qgsprojectionselector.h
 qgsquickprint.h
 )

Modified: trunk/qgis/src/ui/CMakeLists.txt
===================================================================
--- trunk/qgis/src/ui/CMakeLists.txt	2008-05-19 13:37:53 UTC (rev 8467)
+++ trunk/qgis/src/ui/CMakeLists.txt	2008-05-19 13:43:37 UTC (rev 8468)
@@ -26,6 +26,7 @@
   qgscustomprojectiondialogbase.ui
   qgsdbsourceselectbase.ui
   qgsdelattrdialogbase.ui
+  qgsdetaileditemwidgetbase.ui
   qgsfillstylewidgetbase.ui
   qgsgeomtypedialogbase.ui
   qgsgraduatedsymboldialogbase.ui

Added: trunk/qgis/src/ui/qgsdetaileditemwidgetbase.ui
===================================================================
--- trunk/qgis/src/ui/qgsdetaileditemwidgetbase.ui	                        (rev 0)
+++ trunk/qgis/src/ui/qgsdetaileditemwidgetbase.ui	2008-05-19 13:43:37 UTC (rev 8468)
@@ -0,0 +1,115 @@
+<ui version="4.0" >
+ <class>QgsDetailedItemWidgetBase</class>
+ <widget class="QWidget" name="QgsDetailedItemWidgetBase" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>299</width>
+    <height>159</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Form</string>
+  </property>
+  <layout class="QGridLayout" >
+   <property name="leftMargin" >
+    <number>3</number>
+   </property>
+   <property name="topMargin" >
+    <number>3</number>
+   </property>
+   <property name="rightMargin" >
+    <number>3</number>
+   </property>
+   <property name="bottomMargin" >
+    <number>3</number>
+   </property>
+   <property name="horizontalSpacing" >
+    <number>3</number>
+   </property>
+   <property name="verticalSpacing" >
+    <number>3</number>
+   </property>
+   <item row="0" column="0" >
+    <layout class="QHBoxLayout" >
+     <item>
+      <widget class="QCheckBox" name="cbx" >
+       <property name="sizePolicy" >
+        <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="text" >
+        <string/>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QLabel" name="lblIcon" >
+       <property name="sizePolicy" >
+        <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="minimumSize" >
+        <size>
+         <width>0</width>
+         <height>0</height>
+        </size>
+       </property>
+       <property name="maximumSize" >
+        <size>
+         <width>80</width>
+         <height>80</height>
+        </size>
+       </property>
+       <property name="text" >
+        <string/>
+       </property>
+       <property name="pixmap" >
+        <pixmap>../../images/icons/qgis-icon-16x16.png</pixmap>
+       </property>
+       <property name="alignment" >
+        <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QLabel" name="lblTitle" >
+       <property name="sizePolicy" >
+        <sizepolicy vsizetype="Minimum" hsizetype="Expanding" >
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="font" >
+        <font>
+         <pointsize>15</pointsize>
+         <weight>75</weight>
+         <bold>true</bold>
+        </font>
+       </property>
+       <property name="text" >
+        <string>Heading Label</string>
+       </property>
+       <property name="alignment" >
+        <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+       </property>
+       <property name="wordWrap" >
+        <bool>true</bool>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item row="1" column="0" >
+    <widget class="QTextBrowser" name="tbDetail" />
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>


Property changes on: trunk/qgis/src/ui/qgsdetaileditemwidgetbase.ui
___________________________________________________________________
Name: svn:executable
   + *

Modified: trunk/qgis/src/ui/qgspluginmanagerbase.ui
===================================================================
--- trunk/qgis/src/ui/qgspluginmanagerbase.ui	2008-05-19 13:37:53 UTC (rev 8467)
+++ trunk/qgis/src/ui/qgspluginmanagerbase.ui	2008-05-19 13:43:37 UTC (rev 8468)
@@ -5,8 +5,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>564</width>
-    <height>368</height>
+    <width>551</width>
+    <height>377</height>
    </rect>
   </property>
   <property name="mouseTracking" >
@@ -19,147 +19,113 @@
    <bool>true</bool>
   </property>
   <layout class="QGridLayout" >
-   <property name="margin" >
-    <number>11</number>
-   </property>
-   <property name="spacing" >
-    <number>6</number>
-   </property>
-   <item row="0" column="0" >
-    <layout class="QHBoxLayout" >
-     <property name="margin" >
-      <number>11</number>
-     </property>
-     <property name="spacing" >
-      <number>6</number>
-     </property>
-     <item>
-      <widget class="QLabel" name="textLabel1" >
-       <property name="text" >
-        <string>Plugin Directory</string>
-       </property>
-       <property name="buddy" >
-        <cstring>txtPluginDir</cstring>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QLineEdit" name="txtPluginDir" >
-       <property name="windowModality" >
-        <enum>Qt::NonModal</enum>
-       </property>
-       <property name="readOnly" >
-        <bool>true</bool>
-       </property>
-      </widget>
-     </item>
-    </layout>
-   </item>
-   <item row="1" column="0" >
+   <item row="0" column="0" colspan="3" >
     <widget class="QLabel" name="textLabel1_2" >
      <property name="text" >
-      <string>To load a plugin, click the checkbox next to the plugin and click Ok</string>
+      <string>To enable / disable a plugin, click its checkbox or description</string>
      </property>
     </widget>
    </item>
-   <item row="4" column="0" >
-    <layout class="QHBoxLayout" >
-     <property name="margin" >
-      <number>11</number>
+   <item row="1" column="0" colspan="3" >
+    <widget class="QListView" name="vwPlugins" >
+     <property name="selectionMode" >
+      <enum>QAbstractItemView::SingleSelection</enum>
      </property>
-     <property name="spacing" >
-      <number>6</number>
+     <property name="selectionBehavior" >
+      <enum>QAbstractItemView::SelectItems</enum>
      </property>
-     <item>
-      <spacer>
-       <property name="orientation" >
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeType" >
-        <enum>QSizePolicy::Expanding</enum>
-       </property>
-       <property name="sizeHint" >
-        <size>
-         <width>100</width>
-         <height>21</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
-     <item>
-      <widget class="QPushButton" name="btnSelectAll" >
-       <property name="text" >
-        <string>&amp;Select All</string>
-       </property>
-       <property name="shortcut" >
-        <string>Alt+S</string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QPushButton" name="btnClearAll" >
-       <property name="text" >
-        <string>C&amp;lear All</string>
-       </property>
-       <property name="shortcut" >
-        <string>Alt+L</string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QPushButton" name="btnOk" >
-       <property name="text" >
-        <string>&amp;Ok</string>
-       </property>
-       <property name="shortcut" >
-        <string>Alt+O</string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QPushButton" name="btnClose" >
-       <property name="text" >
-        <string>&amp;Close</string>
-       </property>
-       <property name="shortcut" >
-        <string>Alt+C</string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <spacer>
-       <property name="orientation" >
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeType" >
-        <enum>QSizePolicy::Expanding</enum>
-       </property>
-       <property name="sizeHint" >
-        <size>
-         <width>100</width>
-         <height>21</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
-    </layout>
+     <property name="wordWrap" >
+      <bool>true</bool>
+     </property>
+    </widget>
    </item>
    <item row="2" column="0" >
-    <widget class="QTableView" name="lstPlugins" >
-     <property name="alternatingRowColors" >
-      <bool>true</bool>
+    <widget class="QLabel" name="lblFilter" >
+     <property name="text" >
+      <string>&amp;Filter</string>
      </property>
-     <property name="selectionMode" >
-      <enum>QAbstractItemView::NoSelection</enum>
+     <property name="buddy" >
+      <cstring>leFilter</cstring>
      </property>
-     <property name="sortingEnabled" >
+    </widget>
+   </item>
+   <item row="2" column="1" colspan="2" >
+    <widget class="QLineEdit" name="leFilter" />
+   </item>
+   <item row="3" column="0" colspan="2" >
+    <widget class="QLabel" name="textLabel1" >
+     <property name="text" >
+      <string>Plugin Directory:</string>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="2" >
+    <widget class="QLabel" name="lblPluginDir" >
+     <property name="sizePolicy" >
+      <sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text" >
+      <string>Directory</string>
+     </property>
+     <property name="alignment" >
+      <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+     </property>
+     <property name="wordWrap" >
       <bool>true</bool>
      </property>
     </widget>
    </item>
+   <item row="4" column="0" colspan="3" >
+    <widget class="QDialogButtonBox" name="buttonBox" >
+     <property name="standardButtons" >
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
   </layout>
  </widget>
  <layoutdefault spacing="6" margin="11" />
+ <tabstops>
+  <tabstop>vwPlugins</tabstop>
+  <tabstop>leFilter</tabstop>
+  <tabstop>buttonBox</tabstop>
+ </tabstops>
  <resources/>
- <connections/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>QgsPluginManagerBase</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>511</x>
+     <y>305</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>561</x>
+     <y>271</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>QgsPluginManagerBase</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>447</x>
+     <y>304</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>479</x>
+     <y>341</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
 </ui>



More information about the QGIS-commit mailing list