connect(uiModule->bindFilePB, SIGNAL(clicked()), this, SLOT(select_bind()));
connect(uiModule->uiFileED, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor()));
connect(uiModule->bindFileED, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor()));
+ connect(uiModule->restoreCursorCB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
+ connect(uiModule->loadSessionCB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
connect(uiModule->cursorFollowsCB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
connect(uiModule->autoSaveSB, SIGNAL(valueChanged(int)), this, SLOT(change_adaptor()));
connect(uiModule->autoSaveCB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
rc.ui_file = internal_path(uiModule->uiFileED->text());
rc.bind_file = internal_path(uiModule->bindFileED->text());
+ rc.use_lastfilepos = uiModule->restoreCursorCB->isChecked();
+ rc.load_session = uiModule->loadSessionCB->isChecked();
rc.cursor_follows_scrollbar = uiModule->cursorFollowsCB->isChecked();
rc.autosave = uiModule->autoSaveSB->value() * 60;
rc.make_backup = uiModule->autoSaveCB->isChecked();
uiModule->uiFileED->setText(external_path(rc.ui_file));
uiModule->bindFileED->setText(external_path(rc.bind_file));
+ uiModule->restoreCursorCB->setChecked(rc.use_lastfilepos);
+ uiModule->loadSessionCB->setChecked(rc.load_session);
uiModule->cursorFollowsCB->setChecked(rc.cursor_follows_scrollbar);
// convert to minutes
int mins(rc.autosave / 60);
<x>0</x>
<y>0</y>
<width>416</width>
- <height>441</height>
+ <height>513</height>
</rect>
</property>
<property name="sizePolicy" >
<property name="windowTitle" >
<string/>
</property>
- <layout class="QVBoxLayout" >
+ <layout class="QGridLayout" >
<property name="margin" >
- <number>11</number>
+ <number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
- <item>
+ <item row="2" column="0" >
+ <widget class="QGroupBox" name="sessionGB" >
+ <property name="title" >
+ <string>Session</string>
+ </property>
+ <layout class="QGridLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="0" column="0" >
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QCheckBox" name="restoreCursorCB" >
+ <property name="text" >
+ <string>Restore cursor positions</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="loadSessionCB" >
+ <property name="text" >
+ <string>Load opened files from last session</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="3" column="0" >
+ <widget class="QGroupBox" name="scrollGB" >
+ <property name="title" >
+ <string>Scrolling</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>11</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>
+ </layout>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QGroupBox" name="documentsGB" >
+ <property name="title" >
+ <string>Documents</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>11</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QCheckBox" name="autoSaveCB" >
+ <property name="text" >
+ <string>B&ackup documents </string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>21</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QLabel" name="autoSaveLA" >
+ <property name="text" >
+ <string> every</string>
+ </property>
+ <property name="buddy" >
+ <cstring>autoSaveSB</cstring>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="autoSaveSB" >
+ <property name="maximum" >
+ <number>300</number>
+ </property>
+ <property name="minimum" >
+ <number>1</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="TextLabel1" >
+ <property name="text" >
+ <string>minutes</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="lastfilesLA" >
+ <property name="text" >
+ <string>&Maximum last files:</string>
+ </property>
+ <property name="buddy" >
+ <cstring>lastfilesSB</cstring>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="lastfilesSB" >
+ <property name="maximum" >
+ <number>9</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item rowspan="2" row="1" column="1" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::Expanding</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>51</width>
+ <height>258</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="4" column="0" colspan="2" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::Expanding</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>394</width>
+ <height>21</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="0" column="0" colspan="2" >
<layout class="QGridLayout" >
<property name="margin" >
<number>0</number>
</item>
</layout>
</item>
- <item>
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <layout class="QVBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QGroupBox" name="documentsGB" >
- <property name="title" >
- <string>Documents</string>
- </property>
- <layout class="QVBoxLayout" >
- <property name="margin" >
- <number>11</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QCheckBox" name="autoSaveCB" >
- <property name="text" >
- <string>B&ackup documents </string>
- </property>
- </widget>
- </item>
- <item>
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType" >
- <enum>QSizePolicy::Fixed</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>21</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QLabel" name="autoSaveLA" >
- <property name="text" >
- <string> every</string>
- </property>
- <property name="buddy" >
- <cstring>autoSaveSB</cstring>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QSpinBox" name="autoSaveSB" >
- <property name="maximum" >
- <number>300</number>
- </property>
- <property name="minimum" >
- <number>1</number>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="TextLabel1" >
- <property name="text" >
- <string>minutes</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QLabel" name="lastfilesLA" >
- <property name="text" >
- <string>&Maximum last files:</string>
- </property>
- <property name="buddy" >
- <cstring>lastfilesSB</cstring>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QSpinBox" name="lastfilesSB" >
- <property name="maximum" >
- <number>9</number>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="scrollGB" >
- <property name="title" >
- <string>Scrolling</string>
- </property>
- <layout class="QVBoxLayout" >
- <property name="margin" >
- <number>11</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>
- </layout>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType" >
- <enum>QSizePolicy::Expanding</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeType" >
- <enum>QSizePolicy::Expanding</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
</layout>
</widget>
<pixmapfunction>qPixmapFromMimeSource</pixmapfunction>