OSDN Git Service

Maemo: Make it possible to filter remote process list by name.
authorChristian Kandeler <christian.kandeler@nokia.com>
Thu, 25 Nov 2010 10:52:08 +0000 (11:52 +0100)
committerChristian Kandeler <christian.kandeler@nokia.com>
Thu, 25 Nov 2010 10:52:55 +0000 (11:52 +0100)
src/plugins/qt4projectmanager/qt-maemo/maemoremoteprocessesdialog.cpp
src/plugins/qt4projectmanager/qt-maemo/maemoremoteprocessesdialog.ui

index a2b45dd..a4bd624 100644 (file)
@@ -60,7 +60,11 @@ MaemoRemoteProcessesDialog::MaemoRemoteProcessesDialog(const Core::SshConnection
     m_ui->tableView->setSelectionBehavior(QAbstractItemView::SelectRows);
     m_proxyModel->setSourceModel(m_processList);
     m_proxyModel->setDynamicSortFilter(true);
+    m_proxyModel->setFilterKeyColumn(1);
     m_ui->tableView->setModel(m_proxyModel);
+    connect(m_ui->processFilterLineEdit, SIGNAL(textChanged(QString)),
+        m_proxyModel, SLOT(setFilterRegExp(QString)));
+    m_ui->processFilterLineEdit->setText(QLatin1String("[^ ]+"));
     connect(m_ui->tableView->selectionModel(),
         SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
         SLOT(handleSelectionChanged()));
index 6b02f22..1a142eb 100644 (file)
    </rect>
   </property>
   <property name="windowTitle">
-   <string>Dialog</string>
+   <string>List of Remote Processes</string>
   </property>
   <layout class="QVBoxLayout" name="verticalLayout_2">
    <item>
-    <widget class="QLabel" name="label">
-     <property name="text">
-      <string>Processes running on remote host:</string>
-     </property>
-    </widget>
+    <layout class="QHBoxLayout" name="horizontalLayout_2">
+     <item>
+      <widget class="QLabel" name="filterLabel">
+       <property name="text">
+        <string>Filter by process name:</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QLineEdit" name="processFilterLineEdit"/>
+     </item>
+     <item>
+      <spacer name="horizontalSpacer">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+    </layout>
    </item>
    <item>
     <layout class="QHBoxLayout" name="horizontalLayout">