]> git.lyx.org Git - features.git/commitdiff
Advanced Search GUI enhancements (tooltips, navigation, shorter labels)
authorTommaso Cucinotta <tommaso@lyx.org>
Fri, 21 Aug 2009 16:51:07 +0000 (16:51 +0000)
committerTommaso Cucinotta <tommaso@lyx.org>
Fri, 21 Aug 2009 16:51:07 +0000 (16:51 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31179 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/FindAndReplace.cpp
src/frontends/qt4/ui/FindAndReplaceUi.ui

index 05600feb961e06065b489166b1a6403180882e3d..8c0f4ec4ada0aa99cc608a6b8fb7735ad1bbd365 100644 (file)
@@ -59,7 +59,7 @@ FindAndReplaceWidget::FindAndReplaceWidget(GuiView & view)
 
 bool FindAndReplaceWidget::eventFilter(QObject *obj, QEvent *event)
 {
-       LYXERR(Debug::FIND, "FindAndReplace::eventFilter()");
+  LYXERR(Debug::FIND, "FindAndReplace::eventFilter(): obj=" << obj << ", fwa=" << find_work_area_ << ", rwa=" << replace_work_area_ << "fsa=" << find_scroll_area_ << ", rsa=" << replace_scroll_area_);
        if (obj == find_work_area_ && event->type() == QEvent::KeyPress) {
                QKeyEvent *e = static_cast<QKeyEvent *> (event);
                if (e->key() == Qt::Key_Escape && e->modifiers() == Qt::NoModifier) {
@@ -73,6 +73,29 @@ bool FindAndReplaceWidget::eventFilter(QObject *obj, QEvent *event)
                                on_findNextPB_clicked();
                                return true;
                        }
+               } else if (e->key() == Qt::Key_Tab && e->modifiers() == Qt::NoModifier) {
+                       LYXERR(Debug::FIND, "Focusing replace WA");
+                       replace_work_area_->setFocus();
+                       return true;
+               }
+       }
+       if (obj == replace_work_area_ && event->type() == QEvent::KeyPress) {
+               QKeyEvent *e = static_cast<QKeyEvent *> (event);
+               if (e->key() == Qt::Key_Escape && e->modifiers() == Qt::NoModifier) {
+                       on_closePB_clicked();
+                       return true;
+               } else if (e->key() == Qt::Key_Enter || e->key() == Qt::Key_Return) {
+                       if (e->modifiers() == Qt::ShiftModifier) {
+                               on_replacePrevPB_clicked();
+                               return true;
+                       } else if (e->modifiers() == Qt::NoModifier) {
+                               on_replaceNextPB_clicked();
+                               return true;
+                       }
+               } else if (e->key() == Qt::Key_Backtab) {
+                       LYXERR(Debug::FIND, "Focusing find WA");
+                       find_work_area_->setFocus();
+                       return true;
                }
        }
        // standard event processing
@@ -158,7 +181,6 @@ void FindAndReplaceWidget::findAndReplace(bool backwards, bool replace)
 {
        // FIXME: create a Dialog::returnFocus() or something instead of this:
        view_.setCurrentWorkArea(view_.currentMainWorkArea());
-       // FIXME: This should be an LFUN.
        findAndReplace(caseCB->isChecked(),
                wordsCB->isChecked(),
                backwards,
@@ -167,7 +189,6 @@ void FindAndReplaceWidget::findAndReplace(bool backwards, bool replace)
                replace,
                keepCaseCB->isChecked());
        view_.currentMainWorkArea()->redraw();
-       find_work_area_->setFocus();
 }
 
 
@@ -196,45 +217,51 @@ void FindAndReplaceWidget::on_closePB_clicked()
 
 void FindAndReplaceWidget::on_findNextPB_clicked() {
        findAndReplace(false, false);
+       find_work_area_->setFocus();
 }
 
 
 void FindAndReplaceWidget::on_findPrevPB_clicked() {
        findAndReplace(true, false);
+       find_work_area_->setFocus();
 }
 
 
 void FindAndReplaceWidget::on_replaceNextPB_clicked()
 {
        findAndReplace(false, true);
+       replace_work_area_->setFocus();
 }
 
 
 void FindAndReplaceWidget::on_replacePrevPB_clicked()
 {
        findAndReplace(true, true);
+       replace_work_area_->setFocus();
 }
 
 
 void FindAndReplaceWidget::on_replaceallPB_clicked()
 {
+       replace_work_area_->setFocus();
 }
 
 
 void FindAndReplaceWidget::showEvent(QShowEvent * /* ev */)
 {
-       replace_work_area_->setEnabled(true);
        replace_work_area_->redraw();
        find_work_area_->setFocus();
        dispatch(FuncRequest(LFUN_BUFFER_BEGIN));
        dispatch(FuncRequest(LFUN_BUFFER_END_SELECT));
        find_work_area_->redraw();
        find_work_area_->installEventFilter(this);
+       replace_work_area_->installEventFilter(this);
 }
 
 
 void FindAndReplaceWidget::hideEvent(QHideEvent *ev)
 {
+       replace_work_area_->removeEventFilter(this);
        find_work_area_->removeEventFilter(this);
        this->QWidget::hideEvent(ev);
 }
@@ -243,7 +270,6 @@ void FindAndReplaceWidget::hideEvent(QHideEvent *ev)
 bool FindAndReplaceWidget::initialiseParams(std::string const & /* params */)
 {
        find_work_area_->redraw();
-       replace_work_area_->setEnabled(true);
        replace_work_area_->redraw();
        find_work_area_->setFocus();
        dispatch(FuncRequest(LFUN_BUFFER_BEGIN));
index 2d9ef2b398e7e1e961c4a0de7b6c1004e4c67c47..c13bde6372eff136330579f9b7ff3a87cf8389db 100644 (file)
@@ -6,32 +6,32 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>269</width>
-    <height>421</height>
+    <width>303</width>
+    <height>496</height>
    </rect>
   </property>
   <property name="sizePolicy">
-   <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
+   <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
     <horstretch>0</horstretch>
     <verstretch>0</verstretch>
    </sizepolicy>
   </property>
   <property name="minimumSize">
    <size>
-    <width>220</width>
-    <height>360</height>
+    <width>0</width>
+    <height>0</height>
    </size>
   </property>
   <property name="maximumSize">
    <size>
     <width>16777215</width>
-    <height>500</height>
+    <height>496</height>
    </size>
   </property>
   <property name="baseSize">
    <size>
-    <width>300</width>
-    <height>400</height>
+    <width>0</width>
+    <height>0</height>
    </size>
   </property>
   <property name="windowTitle">
    <item>
     <widget class="QTabWidget" name="tabWidget">
      <property name="sizePolicy">
-      <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
        <horstretch>0</horstretch>
        <verstretch>0</verstretch>
       </sizepolicy>
      </property>
+     <property name="toolTip">
+      <string/>
+     </property>
+     <property name="statusTip">
+      <string/>
+     </property>
      <property name="autoFillBackground">
       <bool>false</bool>
      </property>
         <verstretch>0</verstretch>
        </sizepolicy>
       </property>
+      <property name="toolTip">
+       <string/>
+      </property>
+      <property name="statusTip">
+       <string/>
+      </property>
       <attribute name="title">
        <string>Basic</string>
       </attribute>
       <layout class="QGridLayout" name="gridLayout_3">
-       <item row="0" column="0">
-        <layout class="QGridLayout" name="gridLayout">
-         <property name="sizeConstraint">
-          <enum>QLayout::SetNoConstraint</enum>
+       <item row="2" column="0">
+        <widget class="QFrame" name="replace_frame">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
          </property>
-         <item row="0" column="0" colspan="2">
-          <widget class="QGroupBox" name="groupBox">
-           <property name="sizePolicy">
-            <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-             <horstretch>0</horstretch>
-             <verstretch>0</verstretch>
-            </sizepolicy>
-           </property>
-           <property name="minimumSize">
-            <size>
-             <width>0</width>
-             <height>60</height>
-            </size>
-           </property>
-           <property name="maximumSize">
-            <size>
-             <width>16777215</width>
-             <height>16777215</height>
-            </size>
-           </property>
-           <property name="baseSize">
-            <size>
-             <width>0</width>
-             <height>128</height>
-            </size>
-           </property>
-           <property name="toolTip">
-            <string>Enter the text to search for in this full-featured LyX editing area</string>
-           </property>
-           <property name="title">
-            <string>&amp;Find...</string>
-           </property>
-           <layout class="QGridLayout" name="gridLayout_5">
-            <property name="leftMargin">
-             <number>0</number>
+         <property name="accessibleName">
+          <string/>
+         </property>
+         <property name="frameShape">
+          <enum>QFrame::Box</enum>
+         </property>
+         <property name="frameShadow">
+          <enum>QFrame::Raised</enum>
+         </property>
+         <layout class="QGridLayout" name="gridLayout_7">
+          <property name="leftMargin">
+           <number>4</number>
+          </property>
+          <property name="topMargin">
+           <number>0</number>
+          </property>
+          <property name="rightMargin">
+           <number>4</number>
+          </property>
+          <property name="bottomMargin">
+           <number>4</number>
+          </property>
+          <property name="spacing">
+           <number>0</number>
+          </property>
+          <item row="1" column="0">
+           <widget class="QGroupBox" name="groupBox_3">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
             </property>
-            <property name="topMargin">
-             <number>4</number>
+            <property name="minimumSize">
+             <size>
+              <width>0</width>
+              <height>0</height>
+             </size>
             </property>
-            <property name="rightMargin">
-             <number>4</number>
+            <property name="maximumSize">
+             <size>
+              <width>16777215</width>
+              <height>16777215</height>
+             </size>
             </property>
-            <property name="bottomMargin">
-             <number>4</number>
+            <property name="toolTip">
+             <string>Enter the text to replace in this full-featured LyX editing area</string>
             </property>
-            <item row="0" column="0" colspan="2">
-             <widget class="lyx::frontend::EmbeddedWorkArea" name="find_work_area_">
-              <property name="minimumSize">
-               <size>
-                <width>0</width>
-                <height>0</height>
-               </size>
-              </property>
-              <property name="baseSize">
-               <size>
-                <width>0</width>
-                <height>48</height>
-               </size>
-              </property>
-              <property name="toolTip">
-               <string>Enter the text to search for in this full-featured LyX editing area</string>
-              </property>
-              <property name="widgetResizable">
-               <bool>true</bool>
-              </property>
-              <widget class="QWidget" name="scrollAreaWidgetContents">
-               <property name="geometry">
-                <rect>
-                 <x>0</x>
-                 <y>0</y>
-                 <width>211</width>
-                 <height>43</height>
-                </rect>
+            <property name="title">
+             <string>&amp;Replace with...</string>
+            </property>
+            <layout class="QGridLayout" name="gridLayout_6">
+             <property name="leftMargin">
+              <number>0</number>
+             </property>
+             <property name="topMargin">
+              <number>4</number>
+             </property>
+             <property name="rightMargin">
+              <number>4</number>
+             </property>
+             <property name="bottomMargin">
+              <number>0</number>
+             </property>
+             <item row="0" column="0" colspan="2">
+              <widget class="lyx::frontend::EmbeddedWorkArea" name="replace_work_area_">
+               <property name="minimumSize">
+                <size>
+                 <width>0</width>
+                 <height>0</height>
+                </size>
+               </property>
+               <property name="baseSize">
+                <size>
+                 <width>0</width>
+                 <height>0</height>
+                </size>
+               </property>
+               <property name="toolTip">
+                <string>Enter the text to replace in this full-featured LyX editing area</string>
+               </property>
+               <property name="widgetResizable">
+                <bool>true</bool>
+               </property>
+               <widget class="QWidget" name="replace_scroll_area_">
+                <property name="geometry">
+                 <rect>
+                  <x>0</x>
+                  <y>0</y>
+                  <width>237</width>
+                  <height>79</height>
+                 </rect>
+                </property>
+                <property name="sizePolicy">
+                 <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+                  <horstretch>0</horstretch>
+                  <verstretch>0</verstretch>
+                 </sizepolicy>
+                </property>
+               </widget>
+              </widget>
+             </item>
+             <item row="1" column="0">
+              <widget class="QPushButton" name="replaceNextPB">
+               <property name="enabled">
+                <bool>true</bool>
                </property>
                <property name="sizePolicy">
-                <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-                 <horstretch>0</horstretch>
+                <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
+                 <horstretch>1</horstretch>
                  <verstretch>0</verstretch>
                 </sizepolicy>
                </property>
-              </widget>
-             </widget>
-            </item>
-            <item row="1" column="0">
-             <widget class="QCheckBox" name="caseCB">
-              <property name="sizePolicy">
-               <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
-                <horstretch>0</horstretch>
-                <verstretch>0</verstretch>
-               </sizepolicy>
-              </property>
-              <property name="text">
-               <string>Case &amp;sensitive</string>
-              </property>
-             </widget>
-            </item>
-            <item row="2" column="0" colspan="2">
-             <widget class="QComboBox" name="regexpInsertCombo">
-              <property name="enabled">
-               <bool>true</bool>
-              </property>
-              <property name="sizePolicy">
-               <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
-                <horstretch>0</horstretch>
-                <verstretch>0</verstretch>
-               </sizepolicy>
-              </property>
-              <item>
+               <property name="toolTip">
+                <string>Find next occurrence and replace it [Enter]</string>
+               </property>
                <property name="text">
-                <string>Match...</string>
+                <string>Ne&amp;xt</string>
+               </property>
+              </widget>
+             </item>
+             <item row="1" column="1">
+              <widget class="QPushButton" name="replacePrevPB">
+               <property name="enabled">
+                <bool>true</bool>
+               </property>
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
+                 <horstretch>1</horstretch>
+                 <verstretch>0</verstretch>
+                </sizepolicy>
+               </property>
+               <property name="toolTip">
+                <string>Find previous occurrence and replace it [Enter]</string>
                </property>
-              </item>
-              <item>
                <property name="text">
-                <string>Anything</string>
+                <string>Pr&amp;ev</string>
+               </property>
+              </widget>
+             </item>
+             <item row="2" column="0" colspan="2">
+              <widget class="QPushButton" name="replaceallPB">
+               <property name="enabled">
+                <bool>false</bool>
+               </property>
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
+                 <horstretch>0</horstretch>
+                 <verstretch>0</verstretch>
+                </sizepolicy>
                </property>
-              </item>
-              <item>
                <property name="text">
-                <string>Any non-empty</string>
+                <string>Replace &amp;All</string>
+               </property>
+              </widget>
+             </item>
+             <item row="3" column="0">
+              <widget class="QCheckBox" name="keepCaseCB">
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
+                 <horstretch>1</horstretch>
+                 <verstretch>0</verstretch>
+                </sizepolicy>
+               </property>
+               <property name="toolTip">
+                <string>Keep the case of the replacement first letter as in each matching text first letter</string>
                </property>
-              </item>
-              <item>
                <property name="text">
-                <string>Any word</string>
+                <string>&amp;Keep case</string>
+               </property>
+              </widget>
+             </item>
+             <item row="3" column="1">
+              <widget class="QPushButton" name="closePB">
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
+                 <horstretch>1</horstretch>
+                 <verstretch>0</verstretch>
+                </sizepolicy>
+               </property>
+               <property name="toolTip">
+                <string>Close this panel</string>
                </property>
-              </item>
-              <item>
                <property name="text">
-                <string>Any number</string>
+                <string>&amp;Close</string>
                </property>
-              </item>
-             </widget>
-            </item>
-            <item row="3" column="0">
-             <widget class="QPushButton" name="findNextPB">
-              <property name="enabled">
-               <bool>true</bool>
-              </property>
-              <property name="sizePolicy">
-               <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
-                <horstretch>0</horstretch>
-                <verstretch>0</verstretch>
-               </sizepolicy>
-              </property>
-              <property name="text">
-               <string>&amp;Next</string>
-              </property>
-              <property name="default">
-               <bool>true</bool>
-              </property>
-             </widget>
-            </item>
-            <item row="3" column="1">
-             <widget class="QPushButton" name="findPrevPB">
-              <property name="enabled">
-               <bool>true</bool>
-              </property>
-              <property name="sizePolicy">
-               <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
-                <horstretch>0</horstretch>
-                <verstretch>0</verstretch>
-               </sizepolicy>
-              </property>
-              <property name="text">
-               <string>&amp;Prev</string>
-              </property>
-              <property name="default">
-               <bool>true</bool>
-              </property>
-             </widget>
-            </item>
-            <item row="1" column="1">
-             <widget class="QCheckBox" name="wordsCB">
-              <property name="enabled">
-               <bool>false</bool>
-              </property>
-              <property name="sizePolicy">
-               <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
-                <horstretch>0</horstretch>
-                <verstretch>0</verstretch>
-               </sizepolicy>
-              </property>
-              <property name="text">
-               <string>Whole &amp;words</string>
-              </property>
-             </widget>
-            </item>
-           </layout>
-          </widget>
-         </item>
-         <item row="4" column="0" colspan="2">
-          <widget class="QGroupBox" name="groupBox_3">
-           <property name="sizePolicy">
-            <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-             <horstretch>0</horstretch>
-             <verstretch>0</verstretch>
-            </sizepolicy>
-           </property>
-           <property name="minimumSize">
-            <size>
-             <width>0</width>
-             <height>60</height>
-            </size>
-           </property>
-           <property name="maximumSize">
-            <size>
-             <width>16777215</width>
-             <height>16777215</height>
-            </size>
-           </property>
-           <property name="toolTip">
-            <string>Enter the text to replace in this full-featured LyX editing area</string>
-           </property>
-           <property name="title">
-            <string>&amp;Replace with...</string>
-           </property>
-           <layout class="QGridLayout" name="gridLayout_6">
-            <property name="leftMargin">
-             <number>0</number>
+              </widget>
+             </item>
+            </layout>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item row="0" column="0">
+        <widget class="QFrame" name="find_frame">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="frameShape">
+          <enum>QFrame::Box</enum>
+         </property>
+         <property name="frameShadow">
+          <enum>QFrame::Raised</enum>
+         </property>
+         <layout class="QGridLayout" name="gridLayout_8">
+          <property name="leftMargin">
+           <number>4</number>
+          </property>
+          <property name="topMargin">
+           <number>0</number>
+          </property>
+          <property name="rightMargin">
+           <number>4</number>
+          </property>
+          <property name="bottomMargin">
+           <number>4</number>
+          </property>
+          <item row="0" column="0">
+           <widget class="QGroupBox" name="groupBox">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
             </property>
-            <property name="topMargin">
-             <number>4</number>
+            <property name="minimumSize">
+             <size>
+              <width>0</width>
+              <height>0</height>
+             </size>
             </property>
-            <property name="rightMargin">
-             <number>4</number>
+            <property name="maximumSize">
+             <size>
+              <width>16777215</width>
+              <height>16777215</height>
+             </size>
             </property>
-            <property name="bottomMargin">
-             <number>4</number>
+            <property name="baseSize">
+             <size>
+              <width>0</width>
+              <height>0</height>
+             </size>
             </property>
-            <item row="0" column="0" colspan="2">
-             <widget class="lyx::frontend::EmbeddedWorkArea" name="replace_work_area_">
-              <property name="minimumSize">
-               <size>
-                <width>0</width>
-                <height>0</height>
-               </size>
-              </property>
-              <property name="baseSize">
-               <size>
-                <width>0</width>
-                <height>48</height>
-               </size>
-              </property>
-              <property name="toolTip">
-               <string>Enter the text to replace in this full-featured LyX editing area</string>
-              </property>
-              <property name="widgetResizable">
-               <bool>true</bool>
-              </property>
-              <widget class="QWidget" name="scrollAreaWidgetContents_2">
-               <property name="geometry">
-                <rect>
-                 <x>0</x>
-                 <y>0</y>
-                 <width>211</width>
-                 <height>43</height>
-                </rect>
+            <property name="toolTip">
+             <string>Enter the text to search for in this full-featured LyX editing area</string>
+            </property>
+            <property name="title">
+             <string>&amp;Find...</string>
+            </property>
+            <layout class="QGridLayout" name="gridLayout_5">
+             <property name="leftMargin">
+              <number>0</number>
+             </property>
+             <property name="topMargin">
+              <number>4</number>
+             </property>
+             <property name="rightMargin">
+              <number>4</number>
+             </property>
+             <property name="bottomMargin">
+              <number>0</number>
+             </property>
+             <item row="0" column="0" colspan="2">
+              <widget class="lyx::frontend::EmbeddedWorkArea" name="find_work_area_">
+               <property name="minimumSize">
+                <size>
+                 <width>0</width>
+                 <height>0</height>
+                </size>
+               </property>
+               <property name="baseSize">
+                <size>
+                 <width>0</width>
+                 <height>0</height>
+                </size>
                </property>
+               <property name="toolTip">
+                <string>Enter the text to search for in this full-featured LyX editing area</string>
+               </property>
+               <property name="widgetResizable">
+                <bool>true</bool>
+               </property>
+               <widget class="QWidget" name="find_scroll_area_">
+                <property name="geometry">
+                 <rect>
+                  <x>0</x>
+                  <y>0</y>
+                  <width>237</width>
+                  <height>80</height>
+                 </rect>
+                </property>
+                <property name="sizePolicy">
+                 <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+                  <horstretch>0</horstretch>
+                  <verstretch>0</verstretch>
+                 </sizepolicy>
+                </property>
+               </widget>
+              </widget>
+             </item>
+             <item row="1" column="0">
+              <widget class="QCheckBox" name="caseCB">
                <property name="sizePolicy">
-                <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+                <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
                  <horstretch>0</horstretch>
                  <verstretch>0</verstretch>
                 </sizepolicy>
                </property>
+               <property name="toolTip">
+                <string>Perform a case-sensitive search</string>
+               </property>
+               <property name="text">
+                <string>Case &amp;sensitive</string>
+               </property>
               </widget>
-             </widget>
-            </item>
-            <item row="1" column="0">
-             <widget class="QPushButton" name="replaceNextPB">
-              <property name="enabled">
-               <bool>true</bool>
-              </property>
-              <property name="sizePolicy">
-               <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
-                <horstretch>1</horstretch>
-                <verstretch>0</verstretch>
-               </sizepolicy>
-              </property>
-              <property name="text">
-               <string>Ne&amp;xt</string>
-              </property>
-             </widget>
-            </item>
-            <item row="1" column="1">
-             <widget class="QPushButton" name="replacePrevPB">
-              <property name="enabled">
-               <bool>true</bool>
-              </property>
-              <property name="sizePolicy">
-               <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
-                <horstretch>1</horstretch>
-                <verstretch>0</verstretch>
-               </sizepolicy>
-              </property>
-              <property name="text">
-               <string>P&amp;rev</string>
-              </property>
-             </widget>
-            </item>
-            <item row="2" column="0" colspan="2">
-             <widget class="QPushButton" name="replaceallPB">
-              <property name="enabled">
-               <bool>false</bool>
-              </property>
-              <property name="sizePolicy">
-               <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
-                <horstretch>0</horstretch>
-                <verstretch>0</verstretch>
-               </sizepolicy>
-              </property>
-              <property name="text">
-               <string>Replace &amp;All</string>
-              </property>
-             </widget>
-            </item>
-            <item row="3" column="0">
-             <widget class="QCheckBox" name="keepCaseCB">
-              <property name="sizePolicy">
-               <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
-                <horstretch>1</horstretch>
-                <verstretch>0</verstretch>
-               </sizepolicy>
-              </property>
-              <property name="toolTip">
-               <string>Keep the case of the replacement first letter as in each matching text first letter</string>
-              </property>
-              <property name="text">
-               <string>&amp;Keep case</string>
-              </property>
-             </widget>
-            </item>
-            <item row="3" column="1">
-             <widget class="QPushButton" name="closePB">
-              <property name="sizePolicy">
-               <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
-                <horstretch>1</horstretch>
-                <verstretch>0</verstretch>
-               </sizepolicy>
-              </property>
-              <property name="text">
-               <string>&amp;Close</string>
-              </property>
-             </widget>
-            </item>
-           </layout>
-          </widget>
-         </item>
-        </layout>
+             </item>
+             <item row="2" column="0" colspan="2">
+              <widget class="QComboBox" name="regexpInsertCombo">
+               <property name="enabled">
+                <bool>true</bool>
+               </property>
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
+                 <horstretch>0</horstretch>
+                 <verstretch>0</verstretch>
+                </sizepolicy>
+               </property>
+               <property name="toolTip">
+                <string>Choose one of the pre-arranged regular expressions.</string>
+               </property>
+               <item>
+                <property name="text">
+                 <string>Match...</string>
+                </property>
+               </item>
+               <item>
+                <property name="text">
+                 <string>Anything</string>
+                </property>
+               </item>
+               <item>
+                <property name="text">
+                 <string>Any non-empty</string>
+                </property>
+               </item>
+               <item>
+                <property name="text">
+                 <string>Any word</string>
+                </property>
+               </item>
+               <item>
+                <property name="text">
+                 <string>Any number</string>
+                </property>
+               </item>
+              </widget>
+             </item>
+             <item row="3" column="0">
+              <widget class="QPushButton" name="findNextPB">
+               <property name="enabled">
+                <bool>true</bool>
+               </property>
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
+                 <horstretch>0</horstretch>
+                 <verstretch>0</verstretch>
+                </sizepolicy>
+               </property>
+               <property name="toolTip">
+                <string>Find next occurrence [Enter]</string>
+               </property>
+               <property name="text">
+                <string>&amp;Next</string>
+               </property>
+               <property name="default">
+                <bool>true</bool>
+               </property>
+              </widget>
+             </item>
+             <item row="3" column="1">
+              <widget class="QPushButton" name="findPrevPB">
+               <property name="enabled">
+                <bool>true</bool>
+               </property>
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
+                 <horstretch>0</horstretch>
+                 <verstretch>0</verstretch>
+                </sizepolicy>
+               </property>
+               <property name="toolTip">
+                <string>Find previous occurrence [Shift+Enter]</string>
+               </property>
+               <property name="text">
+                <string>&amp;Prev</string>
+               </property>
+               <property name="default">
+                <bool>true</bool>
+               </property>
+              </widget>
+             </item>
+             <item row="1" column="1">
+              <widget class="QCheckBox" name="wordsCB">
+               <property name="enabled">
+                <bool>false</bool>
+               </property>
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
+                 <horstretch>0</horstretch>
+                 <verstretch>0</verstretch>
+                </sizepolicy>
+               </property>
+               <property name="toolTip">
+                <string>Restrict search to whole words only</string>
+               </property>
+               <property name="text">
+                <string>Whole &amp;words</string>
+               </property>
+              </widget>
+             </item>
+            </layout>
+           </widget>
+          </item>
+         </layout>
+        </widget>
        </item>
       </layout>
      </widget>
      <widget class="QWidget" name="tab_4">
       <property name="sizePolicy">
-       <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
+       <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
         <horstretch>0</horstretch>
         <verstretch>0</verstretch>
        </sizepolicy>
       </property>
+      <property name="toolTip">
+       <string/>
+      </property>
+      <property name="statusTip">
+       <string/>
+      </property>
       <attribute name="title">
        <string>Advanced</string>
       </attribute>
          <item row="0" column="0">
           <widget class="QGroupBox" name="groupBox_2">
            <property name="enabled">
-            <bool>false</bool>
+            <bool>true</bool>
            </property>
            <property name="sizePolicy">
             <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
            <property name="minimumSize">
             <size>
              <width>0</width>
-             <height>112</height>
+             <height>0</height>
             </size>
            </property>
+           <property name="toolTip">
+            <string>Restrict the search horizon to:</string>
+           </property>
            <property name="autoFillBackground">
             <bool>false</bool>
            </property>
              <number>0</number>
             </property>
             <item row="0" column="0">
-             <widget class="QRadioButton" name="scopeRB_2">
+             <widget class="QRadioButton" name="CurrentParagraph">
+              <property name="enabled">
+               <bool>false</bool>
+              </property>
+              <property name="sizePolicy">
+               <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+                <horstretch>0</horstretch>
+                <verstretch>0</verstretch>
+               </sizepolicy>
+              </property>
               <property name="toolTip">
-               <string>Current paragraph only</string>
+               <string>Current paragraph</string>
               </property>
               <property name="text">
                <string>Current &amp;Paragraph</string>
              </widget>
             </item>
             <item row="1" column="0">
-             <widget class="QRadioButton" name="scopeRB">
+             <widget class="QRadioButton" name="CurrentDocument">
+              <property name="enabled">
+               <bool>true</bool>
+              </property>
+              <property name="sizePolicy">
+               <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+                <horstretch>0</horstretch>
+                <verstretch>0</verstretch>
+               </sizepolicy>
+              </property>
               <property name="toolTip">
-               <string>Current buffer only</string>
+               <string>Document in current file</string>
               </property>
               <property name="text">
-               <string>Buffer</string>
+               <string>Current Document</string>
               </property>
               <property name="checked">
                <bool>true</bool>
              </widget>
             </item>
             <item row="2" column="0">
-             <widget class="QRadioButton" name="scopeRB_3">
+             <widget class="QRadioButton" name="MasterDocument">
+              <property name="enabled">
+               <bool>false</bool>
+              </property>
+              <property name="sizePolicy">
+               <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+                <horstretch>0</horstretch>
+                <verstretch>0</verstretch>
+               </sizepolicy>
+              </property>
               <property name="toolTip">
-               <string>Current file and all included files</string>
+               <string>Current file and all other files belonging to the same Master Document</string>
               </property>
               <property name="text">
-               <string>Document</string>
+               <string>Master Document</string>
               </property>
              </widget>
             </item>
             <item row="3" column="0">
-             <widget class="QRadioButton" name="scopeRB_4">
+             <widget class="QRadioButton" name="OpenDocuments">
+              <property name="enabled">
+               <bool>false</bool>
+              </property>
+              <property name="sizePolicy">
+               <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+                <horstretch>0</horstretch>
+                <verstretch>0</verstretch>
+               </sizepolicy>
+              </property>
               <property name="toolTip">
-               <string>All open buffers</string>
+               <string>All open documents</string>
+              </property>
+              <property name="text">
+               <string>Open Documents</string>
+              </property>
+             </widget>
+            </item>
+            <item row="4" column="0">
+             <widget class="QRadioButton" name="AllManualsRB">
+              <property name="enabled">
+               <bool>false</bool>
+              </property>
+              <property name="sizePolicy">
+               <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+                <horstretch>0</horstretch>
+                <verstretch>0</verstretch>
+               </sizepolicy>
               </property>
               <property name="text">
-               <string>Open buffers</string>
+               <string>All Manuals</string>
               </property>
              </widget>
             </item>
            </property>
            <property name="sizeHint" stdset="0">
             <size>
-             <width>20</width>
-             <height>40</height>
+             <width>0</width>
+             <height>0</height>
             </size>
            </property>
           </spacer>