PDFSupportUi.ui
PreambleUi.ui
PrefColorsUi.ui
+ PrefCompletionUi.ui
PrefConvertersUi.ui
PrefDateUi.ui
PrefDisplayUi.ui
this, SIGNAL(changed()));
connect(secondKeymapED, SIGNAL(textChanged(QString)),
this, SIGNAL(changed()));
- connect(inlineDelaySB, SIGNAL(valueChanged(double)),
- this, SIGNAL(changed()));
- connect(inlineMathCB, SIGNAL(clicked()),
- this, SIGNAL(changed()));
- connect(inlineTextCB, SIGNAL(clicked()),
- this, SIGNAL(changed()));
- connect(inlineDotsCB, SIGNAL(clicked()),
- this, SIGNAL(changed()));
- connect(popupDelaySB, SIGNAL(valueChanged(double)),
- this, SIGNAL(changed()));
- connect(popupMathCB, SIGNAL(clicked()),
- this, SIGNAL(changed()));
- connect(popupTextCB, SIGNAL(clicked()),
- this, SIGNAL(changed()));
- connect(popupAfterCompleteCB, SIGNAL(clicked()),
- this, SIGNAL(changed()));
- connect(cursorTextCB, SIGNAL(clicked()),
- this, SIGNAL(changed()));
connect(mouseWheelSpeedSB, SIGNAL(valueChanged(double)),
this, SIGNAL(changed()));
}
rc.use_kbmap = keymapCB->isChecked();
rc.primary_kbmap = internal_path(fromqstr(firstKeymapED->text()));
rc.secondary_kbmap = internal_path(fromqstr(secondKeymapED->text()));
- rc.completion_inline_delay = inlineDelaySB->value();
- rc.completion_inline_math = inlineMathCB->isChecked();
- rc.completion_inline_text = inlineTextCB->isChecked();
- rc.completion_inline_dots = inlineDotsCB->isChecked() ? 13 : -1;
- rc.completion_popup_delay = popupDelaySB->value();
- rc.completion_popup_math = popupMathCB->isChecked();
- rc.completion_popup_text = popupTextCB->isChecked();
- rc.completion_cursor_text = cursorTextCB->isChecked();
- rc.completion_popup_after_complete
- = popupAfterCompleteCB->isChecked();
rc.mouse_wheel_speed = mouseWheelSpeedSB->value();
}
keymapCB->setChecked(rc.use_kbmap);
firstKeymapED->setText(toqstr(external_path(rc.primary_kbmap)));
secondKeymapED->setText(toqstr(external_path(rc.secondary_kbmap)));
- inlineDelaySB->setValue(rc.completion_inline_delay);
- inlineMathCB->setChecked(rc.completion_inline_math);
- inlineTextCB->setChecked(rc.completion_inline_text);
- inlineDotsCB->setChecked(rc.completion_inline_dots != -1);
- popupDelaySB->setValue(rc.completion_popup_delay);
- popupMathCB->setChecked(rc.completion_popup_math);
- popupTextCB->setChecked(rc.completion_popup_text);
- cursorTextCB->setChecked(rc.completion_cursor_text);
- popupAfterCompleteCB->setChecked(rc.completion_popup_after_complete);
mouseWheelSpeedSB->setValue(rc.mouse_wheel_speed);
}
}
+/////////////////////////////////////////////////////////////////////
+//
+// PrefCompletion
+//
+/////////////////////////////////////////////////////////////////////
+
+PrefCompletion::PrefCompletion(GuiPreferences * form, QWidget * parent)
+ : PrefModule(qt_("Input Completion"), form, parent)
+{
+ setupUi(this);
+
+ connect(inlineDelaySB, SIGNAL(valueChanged(double)),
+ this, SIGNAL(changed()));
+ connect(inlineMathCB, SIGNAL(clicked()),
+ this, SIGNAL(changed()));
+ connect(inlineTextCB, SIGNAL(clicked()),
+ this, SIGNAL(changed()));
+ connect(inlineDotsCB, SIGNAL(clicked()),
+ this, SIGNAL(changed()));
+ connect(popupDelaySB, SIGNAL(valueChanged(double)),
+ this, SIGNAL(changed()));
+ connect(popupMathCB, SIGNAL(clicked()),
+ this, SIGNAL(changed()));
+ connect(popupTextCB, SIGNAL(clicked()),
+ this, SIGNAL(changed()));
+ connect(popupAfterCompleteCB, SIGNAL(clicked()),
+ this, SIGNAL(changed()));
+ connect(cursorTextCB, SIGNAL(clicked()),
+ this, SIGNAL(changed()));
+}
+
+
+void PrefCompletion::apply(LyXRC & rc) const
+{
+ rc.completion_inline_delay = inlineDelaySB->value();
+ rc.completion_inline_math = inlineMathCB->isChecked();
+ rc.completion_inline_text = inlineTextCB->isChecked();
+ rc.completion_inline_dots = inlineDotsCB->isChecked() ? 13 : -1;
+ rc.completion_popup_delay = popupDelaySB->value();
+ rc.completion_popup_math = popupMathCB->isChecked();
+ rc.completion_popup_text = popupTextCB->isChecked();
+ rc.completion_cursor_text = cursorTextCB->isChecked();
+ rc.completion_popup_after_complete =
+ popupAfterCompleteCB->isChecked();
+}
+
+
+void PrefCompletion::update(LyXRC const & rc)
+{
+ inlineDelaySB->setValue(rc.completion_inline_delay);
+ inlineMathCB->setChecked(rc.completion_inline_math);
+ inlineTextCB->setChecked(rc.completion_inline_text);
+ inlineDotsCB->setChecked(rc.completion_inline_dots != -1);
+ popupDelaySB->setValue(rc.completion_popup_delay);
+ popupMathCB->setChecked(rc.completion_popup_math);
+ popupTextCB->setChecked(rc.completion_popup_text);
+ cursorTextCB->setChecked(rc.completion_cursor_text);
+ popupAfterCompleteCB->setChecked(rc.completion_popup_after_complete);
+}
+
+
+
/////////////////////////////////////////////////////////////////////
//
// PrefLatex
add(new PrefColors(this));
add(new PrefDisplay);
add(new PrefInput(this));
+ add(new PrefCompletion(this));
add(new PrefPaths(this));
#include "ui_PrefInputUi.h"
#include "ui_PrefLatexUi.h"
#include "ui_PrefScreenFontsUi.h"
+#include "ui_PrefCompletionUi.h"
#include "ui_PrefColorsUi.h"
#include "ui_PrefDisplayUi.h"
#include "ui_PrefEditUi.h"
};
+class PrefCompletion : public PrefModule, public Ui::PrefCompletionUi
+{
+ Q_OBJECT
+public:
+ PrefCompletion(GuiPreferences * form, QWidget * parent = 0);
+
+ virtual void apply(LyXRC & rc) const;
+ virtual void update(LyXRC const & rc);
+};
+
+
class PrefLatex : public PrefModule, public Ui::PrefLatexUi
{
Q_OBJECT
PDFSupportUi.ui \
PreambleUi.ui \
PrefColorsUi.ui \
+ PrefCompletionUi.ui \
PrefConvertersUi.ui \
PrefDateUi.ui \
PrefDisplayUi.ui \
--- /dev/null
+<ui version="4.0" >
+ <class>PrefCompletionUi</class>
+ <widget class="QWidget" name="PrefCompletionUi" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>480</width>
+ <height>404</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string/>
+ </property>
+ <layout class="QGridLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="1" column="0" >
+ <widget class="QGroupBox" name="groupBox_3" >
+ <property name="title" >
+ <string>In Math</string>
+ </property>
+ <property name="flat" >
+ <bool>true</bool>
+ </property>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QCheckBox" name="inlineMathCB" >
+ <property name="toolTip" >
+ <string>Show the grey inline completion behind the cursor in math mode after the delay.</string>
+ </property>
+ <property name="text" >
+ <string>Automatic in&line completion</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="popupMathCB" >
+ <property name="toolTip" >
+ <string>Show the popup in math mode after the delay.</string>
+ </property>
+ <property name="text" >
+ <string>Automatic p&opup</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="0" column="0" >
+ <widget class="QGroupBox" name="groupBox_2" >
+ <property name="title" >
+ <string>In Text</string>
+ </property>
+ <property name="flat" >
+ <bool>true</bool>
+ </property>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QCheckBox" name="inlineTextCB" >
+ <property name="toolTip" >
+ <string>Show the grey inline completion behind the cursor in text mode after the delay.</string>
+ </property>
+ <property name="text" >
+ <string>Automatic &inline completion</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="popupTextCB" >
+ <property name="toolTip" >
+ <string>Show the popup after the set delay in text mode.</string>
+ </property>
+ <property name="text" >
+ <string>Automatic &popup</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="cursorTextCB" >
+ <property name="toolTip" >
+ <string>Show a small triangle on the cursor if a completion is available in text mode.</string>
+ </property>
+ <property name="text" >
+ <string>Cursor i&ndicator</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="2" column="0" >
+ <widget class="QGroupBox" name="groupBox_4" >
+ <property name="title" >
+ <string>General</string>
+ </property>
+ <property name="flat" >
+ <bool>true</bool>
+ </property>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QDoubleSpinBox" name="inlineDelaySB" >
+ <property name="toolTip" >
+ <string>After the cursor has not moved for this time, the inline completion is shown if it is available.</string>
+ </property>
+ <property name="maximum" >
+ <double>10.000000000000000</double>
+ </property>
+ <property name="singleStep" >
+ <double>0.100000000000000</double>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_4" >
+ <property name="text" >
+ <string>s inline completion dela&y</string>
+ </property>
+ <property name="buddy" >
+ <cstring>inlineDelaySB</cstring>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QDoubleSpinBox" name="popupDelaySB" >
+ <property name="toolTip" >
+ <string>After the cursor has not moved for this time, the completion popup is shown if it is available.</string>
+ </property>
+ <property name="maximum" >
+ <double>10.000000000000000</double>
+ </property>
+ <property name="singleStep" >
+ <double>0.100000000000000</double>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_3" >
+ <property name="text" >
+ <string>s popup d&elay</string>
+ </property>
+ <property name="buddy" >
+ <cstring>popupDelaySB</cstring>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="popupAfterCompleteCB" >
+ <property name="toolTip" >
+ <string>When the TAB completion is not unique, there won't be a delay of the popup. It will be shown right away.</string>
+ </property>
+ <property name="text" >
+ <string>Sho&w popup without delay for non-unique completions</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="inlineDotsCB" >
+ <property name="toolTip" >
+ <string>Long completions are cut-off and shown with "...".</string>
+ </property>
+ <property name="text" >
+ <string>&Use "..." to shorten long completions</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="3" column="0" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::Expanding</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>462</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ <includes>
+ <include location="local" >qt_helpers.h</include>
+ </includes>
+ <resources/>
+ <connections/>
+</ui>
<x>0</x>
<y>0</y>
<width>480</width>
- <height>609</height>
+ <height>228</height>
</rect>
</property>
<property name="windowTitle" >
<string/>
</property>
<layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
<item>
<widget class="QGroupBox" name="keyboardGB" >
<property name="title" >
<bool>true</bool>
</property>
<layout class="QGridLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
<item row="0" column="0" colspan="3" >
<widget class="QCheckBox" name="keymapCB" >
<property name="text" >
<bool>false</bool>
</property>
<property name="text" >
- <string>Bro&wse...</string>
+ <string>B&rowse...</string>
</property>
<property name="autoDefault" >
<bool>false</bool>
</layout>
</widget>
</item>
- <item>
- <widget class="QGroupBox" name="groupBox" >
- <property name="title" >
- <string>Completion</string>
- </property>
- <property name="flat" >
- <bool>true</bool>
- </property>
- <layout class="QVBoxLayout" >
- <item>
- <widget class="QGroupBox" name="groupBox_2" >
- <property name="title" >
- <string>In Text</string>
- </property>
- <property name="flat" >
- <bool>false</bool>
- </property>
- <layout class="QVBoxLayout" >
- <item>
- <widget class="QCheckBox" name="inlineTextCB" >
- <property name="toolTip" >
- <string>Show the grey inline completion behind the cursor in text mode after the delay.</string>
- </property>
- <property name="text" >
- <string>Automatic inline completion</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="popupTextCB" >
- <property name="toolTip" >
- <string>Show the popup after the set delay in text mode.</string>
- </property>
- <property name="text" >
- <string>Automatic popup</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="cursorTextCB" >
- <property name="toolTip" >
- <string>Show a small triangle on the cursor if a completion is available in text mode.</string>
- </property>
- <property name="text" >
- <string>Cursor indicator</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="groupBox_3" >
- <property name="title" >
- <string>In Math</string>
- </property>
- <property name="flat" >
- <bool>false</bool>
- </property>
- <layout class="QVBoxLayout" >
- <item>
- <widget class="QCheckBox" name="inlineMathCB" >
- <property name="toolTip" >
- <string>Show the grey inline completion behind the cursor in math mode after the delay.</string>
- </property>
- <property name="text" >
- <string>Automatic inline completion</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="popupMathCB" >
- <property name="toolTip" >
- <string>Show the popup in math mode after the delay.</string>
- </property>
- <property name="text" >
- <string>Automatic popup</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="groupBox_4" >
- <property name="title" >
- <string>General</string>
- </property>
- <layout class="QVBoxLayout" >
- <item>
- <layout class="QHBoxLayout" >
- <item>
- <widget class="QDoubleSpinBox" name="inlineDelaySB" >
- <property name="toolTip" >
- <string>After the cursor has not moved for this time, the inline completion is shown if it is available.</string>
- </property>
- <property name="maximum" >
- <double>10.000000000000000</double>
- </property>
- <property name="singleStep" >
- <double>0.100000000000000</double>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="label_4" >
- <property name="text" >
- <string>s inline completion delay</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" >
- <item>
- <widget class="QDoubleSpinBox" name="popupDelaySB" >
- <property name="toolTip" >
- <string>After the cursor has not moved for this time, the completion popup is shown if it is available.</string>
- </property>
- <property name="maximum" >
- <double>10.000000000000000</double>
- </property>
- <property name="singleStep" >
- <double>0.100000000000000</double>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="label_3" >
- <property name="text" >
- <string>s popup delay</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- <item>
- <widget class="QCheckBox" name="popupAfterCompleteCB" >
- <property name="toolTip" >
- <string>When the TAB completion is not unique, there won't be a delay of the popup. It will be shown right away.</string>
- </property>
- <property name="text" >
- <string>Show popup without delay for non-unique completions</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="inlineDotsCB" >
- <property name="toolTip" >
- <string>Long completions are cut-off and shown with "...".</string>
- </property>
- <property name="text" >
- <string>Use "..." to shorten long completions</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
<item>
<widget class="QGroupBox" name="mouseGB" >
<property name="title" >
<bool>true</bool>
</property>
<layout class="QGridLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
<item row="0" column="0" >
<widget class="QLabel" name="scrollingSpeedLA" >
<property name="text" >
- <string>Wheel scrolling speed:</string>
+ <string>&Wheel scrolling speed:</string>
</property>
<property name="buddy" >
<cstring>mouseWheelSpeedSB</cstring>
<property name="decimals" >
<number>1</number>
</property>
- <property name="minimum" >
- <double>0.100000000000000</double>
- </property>
<property name="maximum" >
<double>10.000000000000000</double>
</property>
+ <property name="minimum" >
+ <double>0.100000000000000</double>
+ </property>
<property name="singleStep" >
<double>0.100000000000000</double>
</property>