PrefConvertersUi.ui
PrefDateUi.ui
PrefDisplayUi.ui
+ PrefEditUi.ui
PrefFileformatsUi.ui
PrefIdentityUi.ui
PrefInputUi.ui
this, SIGNAL(changed()));
connect(allowGeometrySessionCB, SIGNAL(clicked()),
this, SIGNAL(changed()));
- connect(cursorFollowsCB, SIGNAL(clicked()),
- this, SIGNAL(changed()));
- connect(sortEnvironmentsCB, SIGNAL(clicked()),
- this, SIGNAL(changed()));
- connect(groupEnvironmentsCB, SIGNAL(clicked()),
- this, SIGNAL(changed()));
- connect(macroEditStyleCO, SIGNAL(activated(int)),
- this, SIGNAL(changed()));
connect(autoSaveSB, SIGNAL(valueChanged(int)),
this, SIGNAL(changed()));
connect(autoSaveCB, SIGNAL(clicked()),
this, SIGNAL(changed()));
connect(tooltipCB, SIGNAL(toggled(bool)),
this, SIGNAL(changed()));
- connect(fullscreenLimitGB, SIGNAL(clicked()),
- this, SIGNAL(changed()));
- connect(fullscreenWidthSB, SIGNAL(valueChanged(int)),
- this, SIGNAL(changed()));
- connect(toggleTabbarCB, SIGNAL(toggled(bool)),
- this, SIGNAL(changed()));
- connect(toggleScrollbarCB, SIGNAL(toggled(bool)),
- this, SIGNAL(changed()));
- connect(toggleToolbarsCB, SIGNAL(toggled(bool)),
- this, SIGNAL(changed()));
lastfilesSB->setMaximum(maxlastfiles);
}
rc.use_lastfilepos = restoreCursorCB->isChecked();
rc.load_session = loadSessionCB->isChecked();
rc.allow_geometry_session = allowGeometrySessionCB->isChecked();
- rc.cursor_follows_scrollbar = cursorFollowsCB->isChecked();
- rc.sort_layouts = sortEnvironmentsCB->isChecked();
- rc.group_layouts = groupEnvironmentsCB->isChecked();
- switch (macroEditStyleCO->currentIndex()) {
- case 0: rc.macro_edit_style = LyXRC::MACRO_EDIT_INLINE_BOX; break;
- case 1: rc.macro_edit_style = LyXRC::MACRO_EDIT_INLINE; break;
- case 2: rc.macro_edit_style = LyXRC::MACRO_EDIT_LIST; break;
- }
rc.autosave = autoSaveSB->value() * 60;
rc.make_backup = autoSaveCB->isChecked();
rc.num_lastfiles = lastfilesSB->value();
rc.use_tooltip = tooltipCB->isChecked();
- rc.full_screen_toolbars = toggleToolbarsCB->isChecked();
- rc.full_screen_scrollbar = toggleScrollbarCB->isChecked();
- rc.full_screen_tabbar = toggleTabbarCB->isChecked();
- rc.full_screen_width = fullscreenWidthSB->value();
- rc.full_screen_limit = fullscreenLimitGB->isChecked();
rc.open_buffers_in_tabs = openDocumentsInTabsCB->isChecked();
}
restoreCursorCB->setChecked(rc.use_lastfilepos);
loadSessionCB->setChecked(rc.load_session);
allowGeometrySessionCB->setChecked(rc.allow_geometry_session);
- cursorFollowsCB->setChecked(rc.cursor_follows_scrollbar);
- sortEnvironmentsCB->setChecked(rc.sort_layouts);
- groupEnvironmentsCB->setChecked(rc.group_layouts);
- macroEditStyleCO->setCurrentIndex(rc.macro_edit_style);
// convert to minutes
int mins(rc.autosave / 60);
if (rc.autosave && !mins)
autoSaveCB->setChecked(rc.make_backup);
lastfilesSB->setValue(rc.num_lastfiles);
tooltipCB->setChecked(rc.use_tooltip);
- toggleScrollbarCB->setChecked(rc.full_screen_scrollbar);
- toggleToolbarsCB->setChecked(rc.full_screen_toolbars);
- toggleTabbarCB->setChecked(rc.full_screen_tabbar);
- fullscreenWidthSB->setValue(rc.full_screen_width);
- fullscreenLimitGB->setChecked(rc.full_screen_limit);
openDocumentsInTabsCB->setChecked(rc.open_buffers_in_tabs);
}
uiFileED->setText(file);
}
+/////////////////////////////////////////////////////////////////////
+//
+// PrefEdit
+//
+/////////////////////////////////////////////////////////////////////
+
+PrefEdit::PrefEdit(GuiPreferences * form, QWidget * parent)
+ : PrefModule(qt_("Editing"), form, parent)
+{
+ setupUi(this);
+
+ connect(cursorFollowsCB, SIGNAL(clicked()),
+ this, SIGNAL(changed()));
+ connect(sortEnvironmentsCB, SIGNAL(clicked()),
+ this, SIGNAL(changed()));
+ connect(groupEnvironmentsCB, SIGNAL(clicked()),
+ this, SIGNAL(changed()));
+ connect(macroEditStyleCO, SIGNAL(activated(int)),
+ this, SIGNAL(changed()));
+ connect(fullscreenLimitGB, SIGNAL(clicked()),
+ this, SIGNAL(changed()));
+ connect(fullscreenWidthSB, SIGNAL(valueChanged(int)),
+ this, SIGNAL(changed()));
+ connect(toggleTabbarCB, SIGNAL(toggled(bool)),
+ this, SIGNAL(changed()));
+ connect(toggleScrollbarCB, SIGNAL(toggled(bool)),
+ this, SIGNAL(changed()));
+ connect(toggleToolbarsCB, SIGNAL(toggled(bool)),
+ this, SIGNAL(changed()));
+}
+
+
+void PrefEdit::apply(LyXRC & rc) const
+{
+ rc.cursor_follows_scrollbar = cursorFollowsCB->isChecked();
+ rc.sort_layouts = sortEnvironmentsCB->isChecked();
+ rc.group_layouts = groupEnvironmentsCB->isChecked();
+ switch (macroEditStyleCO->currentIndex()) {
+ case 0: rc.macro_edit_style = LyXRC::MACRO_EDIT_INLINE_BOX; break;
+ case 1: rc.macro_edit_style = LyXRC::MACRO_EDIT_INLINE; break;
+ case 2: rc.macro_edit_style = LyXRC::MACRO_EDIT_LIST; break;
+ }
+ rc.full_screen_toolbars = toggleToolbarsCB->isChecked();
+ rc.full_screen_scrollbar = toggleScrollbarCB->isChecked();
+ rc.full_screen_tabbar = toggleTabbarCB->isChecked();
+ rc.full_screen_width = fullscreenWidthSB->value();
+ rc.full_screen_limit = fullscreenLimitGB->isChecked();
+}
+
+
+void PrefEdit::update(LyXRC const & rc)
+{
+ cursorFollowsCB->setChecked(rc.cursor_follows_scrollbar);
+ sortEnvironmentsCB->setChecked(rc.sort_layouts);
+ groupEnvironmentsCB->setChecked(rc.group_layouts);
+ macroEditStyleCO->setCurrentIndex(rc.macro_edit_style);
+ toggleScrollbarCB->setChecked(rc.full_screen_scrollbar);
+ toggleToolbarsCB->setChecked(rc.full_screen_toolbars);
+ toggleTabbarCB->setChecked(rc.full_screen_tabbar);
+ fullscreenWidthSB->setValue(rc.full_screen_width);
+ fullscreenLimitGB->setChecked(rc.full_screen_limit);
+}
+
/////////////////////////////////////////////////////////////////////
//
connect(restorePB, SIGNAL(clicked()), this, SLOT(slotRestore()));
add(new PrefUserInterface(this));
+ add(new PrefEdit(this));
add(new PrefShortcuts(this));
add(new PrefScreenFonts(this));
add(new PrefColors(this));
#include "ui_PrefScreenFontsUi.h"
#include "ui_PrefColorsUi.h"
#include "ui_PrefDisplayUi.h"
+#include "ui_PrefEditUi.h"
#include "ui_PrefPathsUi.h"
#include "ui_PrefShortcutsUi.h"
#include "ui_PrefSpellcheckerUi.h"
};
+class PrefEdit : public PrefModule, public Ui::PrefEditUi
+{
+ Q_OBJECT
+public:
+ PrefEdit(GuiPreferences * form, QWidget * parent = 0);
+
+ void apply(LyXRC & rc) const;
+ void update(LyXRC const & rc);
+};
+
+
+
class GuiShortcutDialog : public QDialog, public Ui::shortcutUi
{
public:
PrefConvertersUi.ui \
PrefDateUi.ui \
PrefDisplayUi.ui \
+ PrefEditUi.ui \
PrefFileformatsUi.ui \
PrefIdentityUi.ui \
PrefInputUi.ui \
--- /dev/null
+<ui version="4.0" >
+ <class>PrefEditUi</class>
+ <widget class="QWidget" name="PrefEditUi" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>459</width>
+ <height>406</height>
+ </rect>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </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="scrollGB" >
+ <property name="title" >
+ <string>Editing</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+ </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="cursorFollowsCB" >
+ <property name="text" >
+ <string>Cursor follows &scrollbar</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="sortEnvironmentsCB" >
+ <property name="text" >
+ <string>Sort &environments alphabetically</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="groupEnvironmentsCB" >
+ <property name="text" >
+ <string>&Group environments by their category</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QComboBox" name="macroEditStyleCO" >
+ <item>
+ <property name="text" >
+ <string>Edit Math Macros inline with a box around</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Edit Math Macros inline with the name in the status bar</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Edit Math Macros with a parameter list (like in LyX < 1.6)</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="fullscreenGB" >
+ <property name="title" >
+ <string>Fullscreen</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+ </property>
+ <property name="flat" >
+ <bool>true</bool>
+ </property>
+ <layout class="QGridLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item rowspan="3" row="0" column="2" >
+ <widget class="QGroupBox" name="fullscreenLimitGB" >
+ <property name="title" >
+ <string>&Limit text width</string>
+ </property>
+ <property name="checkable" >
+ <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="1" >
+ <widget class="QSpinBox" name="fullscreenWidthSB" >
+ <property name="maximum" >
+ <number>10000</number>
+ </property>
+ <property name="minimum" >
+ <number>0</number>
+ </property>
+ <property name="singleStep" >
+ <number>10</number>
+ </property>
+ <property name="value" >
+ <number>700</number>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0" >
+ <widget class="QLabel" name="label_2" >
+ <property name="text" >
+ <string>Screen us&ed (pixels):</string>
+ </property>
+ <property name="buddy" >
+ <cstring>fullscreenWidthSB</cstring>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="2" column="0" >
+ <widget class="QCheckBox" name="toggleTabbarCB" >
+ <property name="text" >
+ <string>Toggle tabba&r</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QCheckBox" name="toggleScrollbarCB" >
+ <property name="text" >
+ <string>To&ggle scrollbar</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0" >
+ <widget class="QCheckBox" name="toggleToolbarsCB" >
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>T&oggle toolbars</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>395</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ <layoutdefault spacing="4" margin="9" />
+ <tabstops>
+ <tabstop>cursorFollowsCB</tabstop>
+ <tabstop>sortEnvironmentsCB</tabstop>
+ <tabstop>groupEnvironmentsCB</tabstop>
+ <tabstop>macroEditStyleCO</tabstop>
+ </tabstops>
+ <includes>
+ <include location="local" >qt_helpers.h</include>
+ </includes>
+ <resources/>
+ <connections/>
+</ui>
<x>0</x>
<y>0</y>
<width>459</width>
- <height>596</height>
+ <height>459</height>
</rect>
</property>
<property name="sizePolicy" >
</layout>
</widget>
</item>
- <item row="5" column="0" colspan="3" >
- <widget class="QGroupBox" name="fullscreenGB" >
- <property name="title" >
- <string>Fullscreen</string>
- </property>
- <property name="alignment" >
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
- </property>
- <property name="flat" >
- <bool>true</bool>
- </property>
- <layout class="QGridLayout" >
- <property name="margin" >
- <number>9</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item rowspan="3" row="0" column="2" >
- <widget class="QGroupBox" name="fullscreenLimitGB" >
- <property name="title" >
- <string>&Limit text width</string>
- </property>
- <property name="checkable" >
- <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="1" >
- <widget class="QSpinBox" name="fullscreenWidthSB" >
- <property name="maximum" >
- <number>10000</number>
- </property>
- <property name="minimum" >
- <number>0</number>
- </property>
- <property name="singleStep" >
- <number>10</number>
- </property>
- <property name="value" >
- <number>700</number>
- </property>
- </widget>
- </item>
- <item row="0" column="0" >
- <widget class="QLabel" name="label_2" >
- <property name="text" >
- <string>Screen us&ed (pixels):</string>
- </property>
- <property name="buddy" >
- <cstring>fullscreenWidthSB</cstring>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item row="1" column="1" >
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="2" column="0" >
- <widget class="QCheckBox" name="toggleTabbarCB" >
- <property name="text" >
- <string>Toggle tabba&r</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0" >
- <widget class="QCheckBox" name="toggleScrollbarCB" >
- <property name="text" >
- <string>To&ggle scrollbar</string>
- </property>
- </widget>
- </item>
- <item row="0" column="0" >
- <widget class="QCheckBox" name="toggleToolbarsCB" >
- <property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>0</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text" >
- <string>T&oggle toolbars</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item row="4" column="0" colspan="3" >
- <widget class="QGroupBox" name="scrollGB" >
- <property name="title" >
- <string>Editing</string>
- </property>
- <property name="alignment" >
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
- </property>
- <property name="flat" >
- <bool>true</bool>
- </property>
- <layout class="QGridLayout" >
- <property name="margin" >
- <number>9</number>
- </property>
- <property name="spacing" >
- <number>4</number>
- </property>
- <item row="0" column="0" >
- <widget class="QCheckBox" name="cursorFollowsCB" >
- <property name="text" >
- <string>Cursor follows &scrollbar</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0" >
- <widget class="QCheckBox" name="sortEnvironmentsCB" >
- <property name="text" >
- <string>Sort &environments alphabetically</string>
- </property>
- </widget>
- </item>
- <item row="3" column="0" >
- <widget class="QComboBox" name="macroEditStyleCO" >
- <item>
- <property name="text" >
- <string>Edit Math Macros inline with a box around</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Edit Math Macros inline with the name in the status bar</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Edit Math Macros with a parameter list (like in LyX < 1.6)</string>
- </property>
- </item>
- </widget>
- </item>
- <item row="2" column="0" >
- <widget class="QCheckBox" name="groupEnvironmentsCB" >
- <property name="text" >
- <string>&Group environments by their category</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
<item row="3" column="0" colspan="3" >
<widget class="QGroupBox" name="documentsGB" >
<property name="title" >
</property>
</widget>
</item>
- <item row="2" column="0" colspan="4">
+ <item row="2" column="0" colspan="4" >
<widget class="QCheckBox" name="openDocumentsInTabsCB" >
<property name="text" >
<string>Open documents in &tabs</string>
<tabstop>autoSaveSB</tabstop>
<tabstop>lastfilesSB</tabstop>
<tabstop>openDocumentsInTabsCB</tabstop>
- <tabstop>cursorFollowsCB</tabstop>
- <tabstop>sortEnvironmentsCB</tabstop>
- <tabstop>groupEnvironmentsCB</tabstop>
- <tabstop>macroEditStyleCO</tabstop>
</tabstops>
<includes>
<include location="local" >qt_helpers.h</include>