mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-28 03:50:00 +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)
|
bool FindAndReplaceWidget::eventFilter(QObject * obj, QEvent * event)
|
||||||
{
|
{
|
||||||
if (event->type() != QEvent::KeyPress
|
if (event->type() != QEvent::KeyPress
|
||||||
@ -555,6 +565,9 @@ FindAndReplace::FindAndReplace(GuiView & parent,
|
|||||||
widget_ = new FindAndReplaceWidget(parent);
|
widget_ = new FindAndReplaceWidget(parent);
|
||||||
setWidget(widget_);
|
setWidget(widget_);
|
||||||
setFocusProxy(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);
|
bool initialiseParams(std::string const & params);
|
||||||
void updateGUI();
|
void updateGUI();
|
||||||
|
|
||||||
|
public Q_SLOTS:
|
||||||
|
///
|
||||||
|
void dockLocationChanged(Qt::DockWidgetArea area);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
///
|
///
|
||||||
GuiView & view_;
|
GuiView & view_;
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>FindAndReplaceUi</class>
|
<class>FindAndReplaceUi</class>
|
||||||
<widget class="QTabWidget" name="FindAndReplaceUi">
|
<widget class="QTabWidget" name="FindAndReplaceUi">
|
||||||
@ -5,10 +6,16 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>279</width>
|
<width>276</width>
|
||||||
<height>300</height>
|
<height>291</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Ignored" vsizetype="Ignored">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>TabWidget</string>
|
<string>TabWidget</string>
|
||||||
</property>
|
</property>
|
||||||
@ -19,9 +26,11 @@
|
|||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Sear&ch</string>
|
<string>Sear&ch</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QGridLayout" name="gridLayout" >
|
<layout class="QVBoxLayout" name="dynamicLayout_">
|
||||||
<item row="0" column="0" >
|
<item>
|
||||||
<widget class="QLabel" name="label" >
|
<layout class="QVBoxLayout" name="findLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="findLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Find:</string>
|
<string>&Find:</string>
|
||||||
</property>
|
</property>
|
||||||
@ -30,18 +39,22 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0" colspan="2" >
|
<item>
|
||||||
<widget class="lyx::frontend::EmbeddedWorkArea" native="1" name="find_work_area_" >
|
<widget class="lyx::frontend::EmbeddedWorkArea" name="find_work_area_" native="true">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy vsizetype="MinimumExpanding" hsizetype="MinimumExpanding" >
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0" >
|
</layout>
|
||||||
<widget class="QLabel" name="label_2" >
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="replaceLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="replaceLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Replace &with:</string>
|
<string>Replace &with:</string>
|
||||||
</property>
|
</property>
|
||||||
@ -50,20 +63,24 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0" colspan="2" >
|
<item>
|
||||||
<widget class="lyx::frontend::EmbeddedWorkArea" native="1" name="replace_work_area_" >
|
<widget class="lyx::frontend::EmbeddedWorkArea" name="replace_work_area_" native="true">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy vsizetype="MinimumExpanding" hsizetype="MinimumExpanding" >
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0" >
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<item row="0" column="0">
|
||||||
<widget class="QCheckBox" name="caseCB">
|
<widget class="QCheckBox" name="caseCB">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
@ -76,13 +93,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1" >
|
<item row="0" column="1">
|
||||||
<widget class="QPushButton" name="findNextPB">
|
<widget class="QPushButton" name="findNextPB">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<horstretch>100</horstretch>
|
<horstretch>100</horstretch>
|
||||||
<verstretch>32</verstretch>
|
<verstretch>32</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
@ -98,7 +115,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="0" >
|
<item row="1" column="0">
|
||||||
<widget class="QCheckBox" name="wordsCB">
|
<widget class="QCheckBox" name="wordsCB">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@ -111,13 +128,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="1" >
|
<item row="1" column="1">
|
||||||
<widget class="QPushButton" name="replacePB">
|
<widget class="QPushButton" name="replacePB">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<horstretch>100</horstretch>
|
<horstretch>100</horstretch>
|
||||||
<verstretch>32</verstretch>
|
<verstretch>32</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
@ -130,7 +147,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="0" >
|
<item row="2" column="0">
|
||||||
<widget class="QCheckBox" name="searchbackCB">
|
<widget class="QCheckBox" name="searchbackCB">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Shift+Enter search backwards directly</string>
|
<string>Shift+Enter search backwards directly</string>
|
||||||
@ -140,13 +157,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="1" >
|
<item row="2" column="1">
|
||||||
<widget class="QPushButton" name="replaceallPB">
|
<widget class="QPushButton" name="replaceallPB">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<horstretch>100</horstretch>
|
<horstretch>100</horstretch>
|
||||||
<verstretch>32</verstretch>
|
<verstretch>32</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
@ -160,6 +177,8 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="advancedTab">
|
<widget class="QWidget" name="advancedTab">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
@ -171,12 +190,6 @@
|
|||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</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>
|
<string>The scope to which the search horizon is restricted</string>
|
||||||
</property>
|
</property>
|
||||||
@ -209,7 +222,7 @@
|
|||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy vsizetype="Minimum" hsizetype="Minimum" >
|
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user