mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-26 22:17:41 +00:00
Automatic horiz/vert switch of layout when docking Advanced F&R pane top-bottom/left-right (copying 49c2450f
).
This commit is contained in:
parent
49c2450f3f
commit
e36779755e
@ -65,6 +65,16 @@ FindAndReplaceWidget::FindAndReplaceWidget(GuiView & view)
|
||||
}
|
||||
|
||||
|
||||
void FindAndReplaceWidget::dockLocationChanged(Qt::DockWidgetArea area)
|
||||
{
|
||||
if (area == Qt::RightDockWidgetArea || area == Qt::LeftDockWidgetArea) {
|
||||
dynamicLayout_->setDirection(QBoxLayout::TopToBottom);
|
||||
} else {
|
||||
dynamicLayout_->setDirection(QBoxLayout::LeftToRight);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool FindAndReplaceWidget::eventFilter(QObject * obj, QEvent * event)
|
||||
{
|
||||
if (event->type() != QEvent::KeyPress
|
||||
@ -555,6 +565,9 @@ FindAndReplace::FindAndReplace(GuiView & parent,
|
||||
widget_ = new FindAndReplaceWidget(parent);
|
||||
setWidget(widget_);
|
||||
setFocusProxy(widget_);
|
||||
|
||||
connect(this, SIGNAL(dockLocationChanged(Qt::DockWidgetArea)),
|
||||
widget_, SLOT(dockLocationChanged(Qt::DockWidgetArea)));
|
||||
}
|
||||
|
||||
|
||||
|
@ -39,6 +39,10 @@ public:
|
||||
bool initialiseParams(std::string const & params);
|
||||
void updateGUI();
|
||||
|
||||
public Q_SLOTS:
|
||||
///
|
||||
void dockLocationChanged(Qt::DockWidgetArea area);
|
||||
|
||||
private:
|
||||
///
|
||||
GuiView & view_;
|
||||
|
@ -1,246 +1,259 @@
|
||||
<ui version="4.0" >
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>FindAndReplaceUi</class>
|
||||
<widget class="QTabWidget" name="FindAndReplaceUi" >
|
||||
<property name="geometry" >
|
||||
<widget class="QTabWidget" name="FindAndReplaceUi">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>279</width>
|
||||
<height>300</height>
|
||||
<width>276</width>
|
||||
<height>291</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Ignored" vsizetype="Ignored">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>TabWidget</string>
|
||||
</property>
|
||||
<property name="currentIndex" >
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="basicTab" >
|
||||
<attribute name="title" >
|
||||
<widget class="QWidget" name="basicTab">
|
||||
<attribute name="title">
|
||||
<string>Sear&ch</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="label" >
|
||||
<property name="text" >
|
||||
<layout class="QVBoxLayout" name="dynamicLayout_">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="findLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="findLabel">
|
||||
<property name="text">
|
||||
<string>&Find:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<property name="buddy">
|
||||
<cstring>find_work_area_</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2" >
|
||||
<widget class="lyx::frontend::EmbeddedWorkArea" native="1" name="find_work_area_" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="MinimumExpanding" hsizetype="MinimumExpanding" >
|
||||
<item>
|
||||
<widget class="lyx::frontend::EmbeddedWorkArea" name="find_work_area_" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="label_2" >
|
||||
<property name="text" >
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="replaceLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="replaceLabel">
|
||||
<property name="text">
|
||||
<string>Replace &with:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<property name="buddy">
|
||||
<cstring>replace_work_area_</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2" >
|
||||
<widget class="lyx::frontend::EmbeddedWorkArea" native="1" name="replace_work_area_" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="MinimumExpanding" hsizetype="MinimumExpanding" >
|
||||
<item>
|
||||
<widget class="lyx::frontend::EmbeddedWorkArea" name="replace_work_area_" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" >
|
||||
<widget class="QCheckBox" name="caseCB" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="caseCB">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<property name="toolTip">
|
||||
<string>Perform a case-sensitive search</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<property name="text">
|
||||
<string>Case &sensitive</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1" >
|
||||
<widget class="QPushButton" name="findNextPB" >
|
||||
<property name="enabled" >
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="findNextPB">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>100</horstretch>
|
||||
<verstretch>32</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<property name="toolTip">
|
||||
<string>Find next occurrence [Enter]</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<property name="text">
|
||||
<string>Find &Next</string>
|
||||
</property>
|
||||
<property name="default" >
|
||||
<property name="default">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" >
|
||||
<widget class="QCheckBox" name="wordsCB" >
|
||||
<property name="enabled" >
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="wordsCB">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<property name="toolTip">
|
||||
<string>Restrict search to whole words only</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<property name="text">
|
||||
<string>W&hole words</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1" >
|
||||
<widget class="QPushButton" name="replacePB" >
|
||||
<property name="enabled" >
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="replacePB">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>100</horstretch>
|
||||
<verstretch>32</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<property name="toolTip">
|
||||
<string>Replace and find next occurrence [Enter]</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<property name="text">
|
||||
<string>&Replace</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" >
|
||||
<widget class="QCheckBox" name="searchbackCB" >
|
||||
<property name="toolTip" >
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="searchbackCB">
|
||||
<property name="toolTip">
|
||||
<string>Shift+Enter search backwards directly</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<property name="text">
|
||||
<string>Search &backwards</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1" >
|
||||
<widget class="QPushButton" name="replaceallPB" >
|
||||
<property name="enabled" >
|
||||
<item row="2" column="1">
|
||||
<widget class="QPushButton" name="replaceallPB">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>100</horstretch>
|
||||
<verstretch>32</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<property name="toolTip">
|
||||
<string>Replace all occurences at once</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<property name="text">
|
||||
<string>Replace &All</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="advancedTab" >
|
||||
<attribute name="title" >
|
||||
<widget class="QWidget" name="advancedTab">
|
||||
<attribute name="title">
|
||||
<string>S&ettings</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_2" >
|
||||
<item row="0" column="0" colspan="2" >
|
||||
<widget class="QGroupBox" name="groupBox_2" >
|
||||
<property name="enabled" >
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="minimumSize" >
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<property name="toolTip">
|
||||
<string>The scope to which the search horizon is restricted</string>
|
||||
</property>
|
||||
<property name="autoFillBackground" >
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="title" >
|
||||
<property name="title">
|
||||
<string>Sco&pe</string>
|
||||
</property>
|
||||
<property name="flat" >
|
||||
<property name="flat">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout" >
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="CurrentDocument" >
|
||||
<property name="enabled" >
|
||||
<widget class="QRadioButton" name="CurrentDocument">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<property name="text">
|
||||
<string>Current &document</string>
|
||||
</property>
|
||||
<property name="checked" >
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="MasterDocument" >
|
||||
<property name="enabled" >
|
||||
<widget class="QRadioButton" name="MasterDocument">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Minimum" hsizetype="Minimum" >
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<property name="toolTip">
|
||||
<string>Current document and all related documents belonging to the same master document</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<property name="text">
|
||||
<string>&Master document</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="OpenDocuments" >
|
||||
<property name="enabled" >
|
||||
<widget class="QRadioButton" name="OpenDocuments">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<property name="toolTip">
|
||||
<string>All open documents</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<property name="text">
|
||||
<string>&Open documents</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="AllManualsRB" >
|
||||
<property name="enabled" >
|
||||
<widget class="QRadioButton" name="AllManualsRB">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<property name="text">
|
||||
<string>All ma&nuals</string>
|
||||
</property>
|
||||
</widget>
|
||||
@ -248,48 +261,48 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QCheckBox" name="ignoreFormatCB" >
|
||||
<property name="enabled" >
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="ignoreFormatCB">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<property name="toolTip">
|
||||
<string>If unchecked, the search will be limited to occurrences of the selected text and paragraph style</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<property name="text">
|
||||
<string>Ignore &format</string>
|
||||
</property>
|
||||
<property name="checked" >
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2" >
|
||||
<widget class="QCheckBox" name="keepCaseCB" >
|
||||
<property name="toolTip" >
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="keepCaseCB">
|
||||
<property name="toolTip">
|
||||
<string>Keep the case of the replacement's first letter as in each matching text first letter</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<property name="text">
|
||||
<string>&Preserve first case on replace</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" >
|
||||
<widget class="QCheckBox" name="expandMacrosCB" >
|
||||
<property name="enabled" >
|
||||
<item row="3" column="0">
|
||||
<widget class="QCheckBox" name="expandMacrosCB">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<property name="text">
|
||||
<string>&Expand macros</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1" >
|
||||
<spacer name="verticalSpacer" >
|
||||
<property name="orientation" >
|
||||
<item row="4" column="1">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>105</width>
|
||||
<height>2</height>
|
||||
|
Loading…
Reference in New Issue
Block a user