mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 11:16:55 +00:00
PrefShortcuts: add a simple shortcut dialog (does nothing now), adjust prefShortcuts panel
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21037 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
94776982b2
commit
0780a505eb
@ -982,6 +982,7 @@ src_frontends_qt4_ui_files = Split('''
|
||||
RefUi.ui
|
||||
SearchUi.ui
|
||||
SendtoUi.ui
|
||||
ShortcutUi.ui
|
||||
ShowFileUi.ui
|
||||
SpellcheckerUi.ui
|
||||
TabularCreateUi.ui
|
||||
|
@ -1698,6 +1698,8 @@ PrefShortcuts::PrefShortcuts(GuiPreferences * form, QWidget * parent)
|
||||
this, SLOT(select_bind()));
|
||||
connect(bindFileED, SIGNAL(textChanged(const QString &)),
|
||||
this, SIGNAL(changed()));
|
||||
|
||||
shortcut_ = new GuiShortcutDialog(this);
|
||||
}
|
||||
|
||||
|
||||
@ -1793,6 +1795,32 @@ void PrefShortcuts::select_bind()
|
||||
}
|
||||
|
||||
|
||||
void PrefShortcuts::on_newPB_pressed()
|
||||
{
|
||||
// FIXME
|
||||
shortcut_->exec();
|
||||
}
|
||||
|
||||
|
||||
void PrefShortcuts::on_modifyPB_pressed()
|
||||
{
|
||||
// FIXME
|
||||
shortcut_->exec();
|
||||
}
|
||||
|
||||
|
||||
void PrefShortcuts::on_removePB_pressed()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
|
||||
void PrefShortcuts::on_searchPB_pressed()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
|
||||
PrefIdentity::PrefIdentity(QWidget * parent)
|
||||
: PrefModule(_("Identity"), 0, parent)
|
||||
{
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include "ui_PrefPrinterUi.h"
|
||||
#include "ui_PrefUi.h"
|
||||
#include "ui_PrefIdentityUi.h"
|
||||
#include "ui_ShortcutUi.h"
|
||||
|
||||
#include <QDialog>
|
||||
#include <QValidator>
|
||||
@ -344,6 +345,17 @@ public Q_SLOTS:
|
||||
};
|
||||
|
||||
|
||||
class GuiShortcutDialog : public QDialog, public Ui::ShortcutUi
|
||||
{
|
||||
public:
|
||||
GuiShortcutDialog(QWidget * parent) : QDialog(parent)
|
||||
{
|
||||
Ui::ShortcutUi::setupUi(this);
|
||||
QDialog::setModal(true);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class PrefShortcuts : public PrefModule, public Ui::PrefShortcuts
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -355,7 +367,12 @@ public:
|
||||
|
||||
public Q_SLOTS:
|
||||
void select_bind();
|
||||
|
||||
void on_newPB_pressed();
|
||||
void on_modifyPB_pressed();
|
||||
void on_removePB_pressed();
|
||||
void on_searchPB_pressed();
|
||||
private:
|
||||
GuiShortcutDialog * shortcut_;
|
||||
};
|
||||
|
||||
|
||||
|
@ -284,6 +284,7 @@ UIFILES = \
|
||||
RefUi.ui \
|
||||
SearchUi.ui \
|
||||
SendtoUi.ui \
|
||||
ShortcutUi.ui \
|
||||
ShowFileUi.ui \
|
||||
SpellcheckerUi.ui \
|
||||
TabularCreateUi.ui \
|
||||
|
@ -27,12 +27,6 @@
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="1" >
|
||||
<widget class="QLineEdit" name="bindFileED" />
|
||||
</item>
|
||||
<item rowspan="7" row="2" column="0" colspan="2" >
|
||||
<widget class="QTreeWidget" name="shortcutsTW" />
|
||||
</item>
|
||||
<item row="8" column="2" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
@ -49,28 +43,7 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="7" column="2" >
|
||||
<widget class="QPushButton" name="modifyPB" >
|
||||
<property name="text" >
|
||||
<string>Modify</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="2" >
|
||||
<widget class="QPushButton" name="removePB" >
|
||||
<property name="text" >
|
||||
<string>Remove</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2" >
|
||||
<widget class="QPushButton" name="editNew" >
|
||||
<property name="text" >
|
||||
<string>New</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
@ -80,21 +53,14 @@
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>21</width>
|
||||
<width>51</width>
|
||||
<height>83</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="3" column="2" >
|
||||
<widget class="QPushButton" name="editSearch" >
|
||||
<property name="text" >
|
||||
<string>Search</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2" >
|
||||
<widget class="QLineEdit" name="lineEdit" >
|
||||
<item row="6" column="2" >
|
||||
<widget class="QLineEdit" name="searchLE" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>1</hsizetype>
|
||||
@ -105,6 +71,26 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" >
|
||||
<widget class="QLineEdit" name="bindFileED" />
|
||||
</item>
|
||||
<item rowspan="7" row="2" column="0" colspan="2" >
|
||||
<widget class="QTreeWidget" name="shortcutsTW" />
|
||||
</item>
|
||||
<item row="3" column="2" >
|
||||
<widget class="QPushButton" name="removePB" >
|
||||
<property name="text" >
|
||||
<string>Remove</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2" >
|
||||
<widget class="QPushButton" name="newPB" >
|
||||
<property name="text" >
|
||||
<string>New</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2" >
|
||||
<widget class="QPushButton" name="bindFilePB" >
|
||||
<property name="text" >
|
||||
@ -129,6 +115,20 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="2" >
|
||||
<widget class="QPushButton" name="searchPB" >
|
||||
<property name="text" >
|
||||
<string>Search</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2" >
|
||||
<widget class="QPushButton" name="modifyPB" >
|
||||
<property name="text" >
|
||||
<string>Modify</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<tabstops>
|
||||
|
138
src/frontends/qt4/ui/ShortcutUi.ui
Normal file
138
src/frontends/qt4/ui/ShortcutUi.ui
Normal file
@ -0,0 +1,138 @@
|
||||
<ui version="4.0" >
|
||||
<class>ShortcutUi</class>
|
||||
<widget class="QDialog" name="shortcutUi" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>221</width>
|
||||
<height>147</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>1</hsizetype>
|
||||
<vsizetype>1</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<string>Edit shortcut</string>
|
||||
</property>
|
||||
<property name="sizeGripEnabled" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="margin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="2" column="0" colspan="2" >
|
||||
<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::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="okPB" >
|
||||
<property name="text" >
|
||||
<string>&OK</string>
|
||||
</property>
|
||||
<property name="autoDefault" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="default" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="cancelPB" >
|
||||
<property name="text" >
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
<property name="autoDefault" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="lfunLBL" >
|
||||
<property name="text" >
|
||||
<string>Function:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="shortcutLBL" >
|
||||
<property name="text" >
|
||||
<string>Shortcut</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QLineEdit" name="shortcutED" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>7</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<string>Enter BibTeX database name</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" >
|
||||
<widget class="QLineEdit" name="lfunED" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>7</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<string>Enter BibTeX database name</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>lfunED</tabstop>
|
||||
<tabstop>okPB</tabstop>
|
||||
<tabstop>cancelPB</tabstop>
|
||||
</tabstops>
|
||||
<includes>
|
||||
<include location="local" >qt_helpers.h</include>
|
||||
</includes>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
Loading…
Reference in New Issue
Block a user