Commit 84d9069d authored by hluk's avatar hluk Committed by hjk

FakeVim: Widgets in preferences for 'scrolloff' and 'passnewline'

Change-Id: I257b1d01fa8c016c1680ee266cf87ce6298bea12
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent b2705f6d
......@@ -2,14 +2,6 @@
<ui version="4.0">
<class>FakeVim::Internal::FakeVimOptionPage</class>
<widget class="QWidget" name="FakeVim::Internal::FakeVimOptionPage">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>513</width>
<height>468</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QCheckBox" name="checkBoxUseFakeVim">
......@@ -23,70 +15,141 @@
<property name="title">
<string>Vim Behavior</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="11" column="0">
<widget class="QLabel" name="labelIsKeyword">
<property name="text">
<string>Keyword characters:</string>
</property>
</widget>
</item>
<item row="12" column="0">
<widget class="QLabel" name="labelVimRcPath">
<property name="text">
<string>Location of .vimrc:</string>
</property>
</widget>
</item>
<item row="7" column="2">
<widget class="QCheckBox" name="checkBoxReadVimRc">
<property name="text">
<string>Read .vimrc</string>
</property>
</widget>
</item>
<item row="11" column="1" colspan="2">
<widget class="QLineEdit" name="lineEditIsKeyword"/>
</item>
<item row="4" column="2">
<widget class="QCheckBox" name="checkBoxWrapScan">
<property name="text">
<string>Use wrapscan</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<widget class="QCheckBox" name="checkBoxAutoIndent">
<property name="text">
<string>Automatic indentation</string>
</property>
</widget>
</item>
<item row="13" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>17</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="2">
<widget class="QCheckBox" name="checkBoxUseCoreSearch">
<property name="text">
<string>Use search dialog</string>
</property>
</widget>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QGridLayout" name="gridLayout_3">
<item row="6" column="0">
<widget class="QCheckBox" name="checkBoxStartOfLine">
<property name="text">
<string>Start of line</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QCheckBox" name="checkBoxHlSearch">
<property name="text">
<string>Highlight search results</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="checkBoxSmartIndent">
<property name="text">
<string>Smart indentation</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="checkBoxSmartTab">
<property name="text">
<string>Smart tabulators</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="checkBoxExpandTab">
<property name="text">
<string>Expand tabulators</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="checkBoxIncSearch">
<property name="text">
<string>Incremental search</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="checkBoxUseCoreSearch">
<property name="text">
<string>Use search dialog</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="checkBoxSmartCase">
<property name="text">
<string>Use smartcase</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QCheckBox" name="checkBoxWrapScan">
<property name="text">
<string>Use wrapscan</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QCheckBox" name="checkBoxPassControlKey">
<property name="toolTip">
<string>Pass key sequences like Ctrl-S to Qt Creator core instead of interpreting them in FakeVim. This gives easier access to Qt Creator core functionality at the price of losing some features of FakeVim.</string>
</property>
<property name="text">
<string>Pass control key</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="checkBoxAutoIndent">
<property name="text">
<string>Automatic indentation</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="checkBoxIgnoreCase">
<property name="text">
<string>Use ignorecase</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QCheckBox" name="checkBoxShowCmd">
<property name="text">
<string>Show partial command</string>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QCheckBox" name="checkBoxPassNewLine">
<property name="toolTip">
<string>Let Qt Creator handle new lines so that comments or code blocks can be properly completed and expanded.</string>
</property>
<property name="text">
<string>Pass new line</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QCheckBox" name="checkBoxShowMarks">
<property name="text">
<string>Show position of text marks</string>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QCheckBox" name="checkBoxReadVimRc">
<property name="text">
<string>Read .vimrc</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="8" column="1" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QLabel" name="labelShiftWidth">
<property name="text">
<string>Shift width:</string>
</property>
<property name="buddy">
<cstring>spinBoxShiftWidth</cstring>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBoxShiftWidth">
<property name="minimum">
......@@ -98,7 +161,7 @@
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
......@@ -110,10 +173,19 @@
</property>
</spacer>
</item>
</layout>
</item>
<item row="9" column="1" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QLabel" name="labelTabulator">
<property name="toolTip">
<string>Vim tabstop option</string>
</property>
<property name="text">
<string>Tabulator size:</string>
</property>
<property name="buddy">
<cstring>spinBoxTabStop</cstring>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBoxTabStop">
<property name="minimum">
......@@ -125,7 +197,33 @@
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="labelScrollOff">
<property name="text">
<string>Scroll offset:</string>
</property>
<property name="buddy">
<cstring>spinBoxScrollOff</cstring>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBoxScrollOff"/>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
......@@ -139,59 +237,68 @@
</item>
</layout>
</item>
<item row="10" column="1" colspan="2">
<widget class="QLineEdit" name="lineEditBackspace"/>
</item>
<item row="10" column="0">
<widget class="QLabel" name="labelBackspace">
<property name="text">
<string>Backspace:</string>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="labelShiftWidth">
<property name="text">
<string>Shift width:</string>
</property>
</widget>
</item>
<item row="9" column="0">
<widget class="QLabel" name="labelTabulator">
<property name="toolTip">
<string>Vim tabstop option</string>
</property>
<property name="text">
<string>Tabulator size:</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QCheckBox" name="checkBoxSmartCase">
<property name="text">
<string>Use smartcase</string>
<item>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
</widget>
</item>
<item row="12" column="1" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayoutVimRcPath">
<item>
<widget class="QLineEdit" name="lineEditVimRcPath">
<property name="toolTip">
<string>Keep empty to use the default path, i.e. %USERPROFILE%\_vimrc on Windows, ~/.vimrc otherwise.</string>
<item row="1" column="0">
<widget class="QLabel" name="labelBackspace">
<property name="text">
<string>Backspace:</string>
</property>
<property name="buddy">
<cstring>lineEditBackspace</cstring>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonVimRcPath">
<item row="1" column="1">
<widget class="QLineEdit" name="lineEditBackspace"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="labelIsKeyword">
<property name="text">
<string>Browse...</string>
<string>Keyword characters:</string>
</property>
<property name="buddy">
<cstring>lineEditIsKeyword</cstring>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="lineEditIsKeyword"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="labelVimRcPath">
<property name="text">
<string>Location of .vimrc:</string>
</property>
<property name="buddy">
<cstring>lineEditVimRcPath</cstring>
</property>
</widget>
</item>
<item row="3" column="1">
<layout class="QHBoxLayout" name="horizontalLayoutVimRcPath">
<item>
<widget class="QLineEdit" name="lineEditVimRcPath">
<property name="toolTip">
<string>Keep empty to use the default path, i.e. %USERPROFILE%\_vimrc on Windows, ~/.vimrc otherwise.</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonVimRcPath">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item row="14" column="0" colspan="3">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="pushButtonCopyTextEditorSettings">
......@@ -229,95 +336,22 @@
</item>
</layout>
</item>
<item row="5" column="2">
<widget class="QCheckBox" name="checkBoxShowMarks">
<property name="text">
<string>Show position of text marks</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="QCheckBox" name="checkBoxSmartIndent">
<property name="text">
<string>Smart indentation</string>
</property>
</widget>
</item>
<item row="6" column="2">
<widget class="QCheckBox" name="checkBoxPassControlKey">
<property name="toolTip">
<string>Pass key sequences like Ctrl-S to Qt Creator core instead of interpreting them in FakeVim. This gives easier access to Qt Creator core functionality at the price of losing some features of FakeVim.</string>
</property>
<property name="text">
<string>Pass control key</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QCheckBox" name="checkBoxIgnoreCase">
<property name="text">
<string>Use ignorecase</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="checkBoxExpandTab">
<property name="text">
<string>Expand tabulators</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="checkBoxSmartTab">
<property name="text">
<string>Smart tabulators</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QCheckBox" name="checkBoxHlSearch">
<property name="text">
<string>Highlight search results</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QCheckBox" name="checkBoxIncSearch">
<property name="text">
<string>Incremental search</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QCheckBox" name="checkBoxShowCmd">
<property name="text">
<string>Show partial command</string>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QCheckBox" name="checkBoxStartOfLine">
<property name="text">
<string>Start of line</string>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</widget>
</spacer>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<tabstops>
......@@ -329,6 +363,7 @@
<tabstop>checkBoxHlSearch</tabstop>
<tabstop>checkBoxShowCmd</tabstop>
<tabstop>checkBoxStartOfLine</tabstop>
<tabstop>checkBoxPassNewLine</tabstop>
<tabstop>checkBoxIncSearch</tabstop>
<tabstop>checkBoxUseCoreSearch</tabstop>
<tabstop>checkBoxIgnoreCase</tabstop>
......@@ -339,6 +374,7 @@
<tabstop>checkBoxReadVimRc</tabstop>
<tabstop>spinBoxShiftWidth</tabstop>
<tabstop>spinBoxTabStop</tabstop>
<tabstop>spinBoxScrollOff</tabstop>
<tabstop>lineEditBackspace</tabstop>
<tabstop>lineEditIsKeyword</tabstop>
<tabstop>lineEditVimRcPath</tabstop>
......
......@@ -292,8 +292,12 @@ QWidget *FakeVimOptionPage::createPage(QWidget *parent)
m_ui.checkBoxSmartTab);
m_group.insert(theFakeVimSetting(ConfigStartOfLine),
m_ui.checkBoxStartOfLine);
m_group.insert(theFakeVimSetting(ConfigPassNewLine),
m_ui.checkBoxPassNewLine);
m_group.insert(theFakeVimSetting(ConfigTabStop),
m_ui.spinBoxTabStop);
m_group.insert(theFakeVimSetting(ConfigScrollOff),
m_ui.spinBoxScrollOff);
m_group.insert(theFakeVimSetting(ConfigBackspace),
m_ui.lineEditBackspace);
m_group.insert(theFakeVimSetting(ConfigIsKeyword),
......@@ -348,10 +352,16 @@ QWidget *FakeVimOptionPage::createPage(QWidget *parent)
<< sep << m_ui.checkBoxSmartCase->text()
<< sep << m_ui.checkBoxShowMarks->text()
<< sep << m_ui.checkBoxPassControlKey->text()
<< sep << m_ui.checkBoxPassNewLine->text()
<< sep << m_ui.checkBoxIgnoreCase->text()
<< sep << m_ui.checkBoxWrapScan->text()
<< sep << m_ui.checkBoxShowCmd->text()
<< sep << m_ui.labelShiftWidth->text()
<< sep << m_ui.labelTabulator->text()
<< sep << m_ui.labelBackspace->text()
<< sep << m_ui.labelIsKeyword->text();
<< sep << m_ui.labelIsKeyword->text()
<< sep << m_ui.labelScrollOff->text()
<< sep << m_ui.lineEditVimRcPath->text();
m_searchKeywords.remove(QLatin1Char('&'));
}
return w;
......@@ -381,6 +391,7 @@ void FakeVimOptionPage::setQtStyle()
m_ui.checkBoxSmartIndent->setChecked(true);
m_ui.checkBoxIncSearch->setChecked(true);
m_ui.lineEditBackspace->setText(_("indent,eol,start"));
m_ui.checkBoxPassNewLine->setChecked(true);
}
void FakeVimOptionPage::setPlainStyle()
......@@ -393,6 +404,7 @@ void FakeVimOptionPage::setPlainStyle()
m_ui.checkBoxSmartIndent->setChecked(false);
m_ui.checkBoxIncSearch->setChecked(false);
m_ui.lineEditBackspace->setText(QString());
m_ui.checkBoxPassNewLine->setChecked(false);
}
void FakeVimOptionPage::openVimRc()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment