ok guys, i had a go at cleaning up the file formats interface in the preferences dialog.
it was more work than i had hoped for, but i think that what i have now is an improvement. first iteration of the patch is attached and i am seeking comments on the ui and code. a second question concerns the copiers. for each file format there can be one copier. so i am planning to simply add a copiers line edit to the file formats panel and get rid of the copiers panel. opinions?
Index: src/Format.h =================================================================== --- src/Format.h (revision 20277) +++ src/Format.h (working copy) @@ -47,45 +47,35 @@ /// Name fo the parent format std::string const parentFormat() const; /// - std::string const & name() const { - return name_; - } + std::string const & name() const { return name_; } /// - std::string const & extension() const { - return extension_; - } + void setName(std::string const & v) { name_ = v; } /// - std::string const & prettyname() const { - return prettyname_; - } + std::string const & extension() const { return extension_; } /// - std::string const & shortcut() const { - return shortcut_; - } + void setExtension(std::string const & v) { extension_ = v; } /// - std::string const & viewer() const { - return viewer_; - } + std::string const & prettyname() const { return prettyname_; } /// - void setViewer(std::string const & v) { - viewer_ = v; - } + void setPrettyname(std::string const & v) { prettyname_ = v; } /// - std::string const & editor() const { - return editor_; - } + std::string const & shortcut() const { return shortcut_; } /// - void setEditor(std::string const & v) { - editor_ = v; - } + void setShortcut(std::string const & v) { shortcut_ = v; } /// - bool documentFormat() const { - return flags_ & document; - } + std::string const & viewer() const { return viewer_; } /// - bool vectorFormat() const { - return flags_ & vector; - } + void setViewer(std::string const & v) { viewer_ = v; } + /// + std::string const & editor() const { return editor_; } + /// + void setEditor(std::string const & v) { editor_ = v; } + /// + bool documentFormat() const { return flags_ & document; } + /// + bool vectorFormat() const { return flags_ & vector; } + /// + void setFlags(int v) { flags_ = v; } private: /// Internal name. Needs to be unique. std::string name_; @@ -121,9 +111,9 @@ /// typedef FormatList::const_iterator const_iterator; /// - Format const & get(FormatList::size_type i) const { - return formatlist[i]; - } + Format const & get(FormatList::size_type i) const { return formatlist[i]; } + /// + Format & get(FormatList::size_type i) { return formatlist[i]; } /// \returns format named \p name if it exists, otherwise 0 Format const * getFormat(std::string const & name) const; /*! Index: src/frontends/qt4/GuiPrefs.cpp =================================================================== --- src/frontends/qt4/GuiPrefs.cpp (revision 20277) +++ src/frontends/qt4/GuiPrefs.cpp (working copy) @@ -42,6 +42,7 @@ #include <QString> #include <QValidator> #include <QCloseEvent> +#include <QMessageBox> #include <iomanip> #include <sstream> @@ -1362,47 +1363,97 @@ // PrefFileformats // ///////////////////////////////////////////////////////////////////// +FormatValidator::FormatValidator(QWidget * parent, Formats const & f) + : QValidator(parent), formats_(f) +{ +} + +void FormatValidator::fixup(QString & input) const +{ + Formats::const_iterator cit = formats_.begin(); + Formats::const_iterator end = formats_.end(); + for (; cit != end; ++cit) { + string const name = str(cit); + if (distance(formats_.begin(), cit) == nr()) { + input = toqstr(name); + return; + + } + } +} + + +QValidator::State FormatValidator::validate(QString & input, int & pos) const +{ + Formats::const_iterator cit = formats_.begin(); + Formats::const_iterator end = formats_.end(); + bool unknown = true; + for (; unknown && cit != end; ++cit) { + string const name = str(cit); + if (distance(formats_.begin(), cit) != nr()) + unknown = toqstr(name) != input; + } + + if (unknown && !input.isEmpty()) + return QValidator::Acceptable; + else + return QValidator::Intermediate; +} + + +int FormatValidator::nr() const +{ + QComboBox * p = qobject_cast<QComboBox *>(parent()); + return p->itemData(p->currentIndex()).toInt(); +} + + +FormatNameValidator::FormatNameValidator(QWidget * parent, Formats const & f) + : FormatValidator(parent, f) +{ +} + +std::string FormatNameValidator::str(Formats::const_iterator it) const +{ + return it->name(); +} + + +FormatPrettynameValidator::FormatPrettynameValidator(QWidget * parent, Formats const & f) + : FormatValidator(parent, f) +{ +} + + +std::string FormatPrettynameValidator::str(Formats::const_iterator it) const +{ + return it->prettyname(); +} + + PrefFileformats::PrefFileformats(GuiPrefsDialog * form, QWidget * parent) : PrefModule(_("File formats"), form, parent) { setupUi(this); + formats_ = lyx::formats; + formatED->setValidator(new FormatNameValidator(formatsCB, formats_)); + formatsCB->setValidator(new FormatPrettynameValidator(formatsCB, formats_)); - connect(formatNewPB, SIGNAL(clicked()), - this, SLOT(new_format())); - connect(formatRemovePB, SIGNAL(clicked()), - this, SLOT(remove_format())); - connect(formatModifyPB, SIGNAL(clicked()), - this, SLOT(modify_format())); - connect(formatsLW, SIGNAL(currentRowChanged(int)), - this, SLOT(switch_format(int))); - connect(formatED, SIGNAL(textChanged(const QString&)), - this, SLOT(fileformat_changed())); - connect(guiNameED, SIGNAL(textChanged(const QString&)), - this, SLOT(fileformat_changed())); - connect(shortcutED, SIGNAL(textChanged(const QString&)), - this, SLOT(fileformat_changed())); - connect(extensionED, SIGNAL(textChanged(const QString&)), - this, SLOT(fileformat_changed())); - connect(viewerED, SIGNAL(textChanged(const QString&)), - this, SLOT(fileformat_changed())); - connect(editorED, SIGNAL(textChanged(const QString&)), - this, SLOT(fileformat_changed())); connect(documentCB, SIGNAL(clicked()), - this, SLOT(fileformat_changed())); + this, SLOT(setFlags())); connect(vectorCB, SIGNAL(clicked()), - this, SLOT(fileformat_changed())); - connect(formatNewPB, SIGNAL(clicked()), + this, SLOT(setFlags())); + connect(formatsCB->lineEdit(), SIGNAL(editingFinished()), + this, SLOT(updatePrettyname())); + connect(formatsCB->lineEdit(), SIGNAL(textEdited(const QString &)), this, SIGNAL(changed())); - connect(formatRemovePB, SIGNAL(clicked()), - this, SIGNAL(changed())); - connect(formatModifyPB, SIGNAL(clicked()), - this, SIGNAL(changed())); } void PrefFileformats::apply(LyXRC & /*rc*/) const { + form_->formats() = formats_; } @@ -1414,147 +1465,157 @@ void PrefFileformats::updateView() { - // save current selection - QString current = guiNameED->text(); + QString const current = formatsCB->currentText(); - // update listwidget with formats - formatsLW->blockSignals(true); - formatsLW->clear(); - Formats::const_iterator cit = form_->formats().begin(); - Formats::const_iterator end = form_->formats().end(); - for (; cit != end; ++cit) { - new QListWidgetItem(toqstr(cit->prettyname()), - formatsLW, - form_->formats().getNumber(cit->name()) ); - } - formatsLW->sortItems(Qt::AscendingOrder); - formatsLW->blockSignals(false); + // update combobox with formats + formatsCB->blockSignals(true); + formatsCB->clear(); + formats_.sort(); + Formats::const_iterator cit = formats_.begin(); + Formats::const_iterator end = formats_.end(); + for (; cit != end; ++cit) + formatsCB->addItem(toqstr(cit->prettyname()), + QVariant(formats_.getNumber(cit->name())) ); // restore selection - if (!current.isEmpty()) { - QList<QListWidgetItem *> item = formatsLW->findItems(current, Qt::MatchExactly); - if (item.size()>0) - formatsLW->setCurrentItem(item.at(0)); - } - // select first element if restoring failed - if (formatsLW->currentRow() == -1) - formatsLW->setCurrentRow(0); + int const item = formatsCB->findText(current, Qt::MatchExactly); + formatsCB->setCurrentIndex(item < 0 ? 0 : item); + on_formatsCB_currentIndexChanged(item < 0 ? 0 : item); + formatsCB->blockSignals(false); } -void PrefFileformats::switch_format(int nr) +void PrefFileformats::on_formatsCB_currentIndexChanged(int i) { - int const ftype = formatsLW->item(nr)->type(); - Format const f = form_->formats().get(ftype); + int const nr = formatsCB->itemData(i).toInt(); + Format const f = formats_.get(nr); formatED->setText(toqstr(f.name())); - guiNameED->setText(toqstr(f.prettyname())); extensionED->setText(toqstr(f.extension())); shortcutED->setText(toqstr(f.shortcut())); viewerED->setText(toqstr(f.viewer())); editorED->setText(toqstr(f.editor())); documentCB->setChecked((f.documentFormat())); vectorCB->setChecked((f.vectorFormat())); +} - updateButtons(); + +void PrefFileformats::setFlags() +{ + int flags = Format::none; + if (documentCB->isChecked()) + flags |= Format::document; + if (vectorCB->isChecked()) + flags |= Format::vector; + currentFormat().setFlags(flags); + changed(); } -void PrefFileformats::fileformat_changed() +void PrefFileformats::on_extensionED_textEdited(const QString & s) { - updateButtons(); + currentFormat().setExtension(fromqstr(s)); + changed(); } -void PrefFileformats::updateButtons() +void PrefFileformats::on_viewerED_textEdited(const QString & s) { - QString const format = formatED->text(); - QString const gui_name = guiNameED->text(); - int const sel = form_->formats().getNumber(fromqstr(format)); - bool gui_name_known = false; - int where = sel; - for (int i = 0; i < formatsLW->count(); ++i) { - if (formatsLW->item(i)->text() == gui_name) { - gui_name_known = true; - where = formatsLW->item(i)->type(); - } - } + currentFormat().setViewer(fromqstr(s)); + changed(); +} - // assure that a gui name cannot be chosen twice - bool const known_otherwise = gui_name_known && (where != sel); - bool const known = !(sel < 0); - bool const valid = (!formatED->text().isEmpty() - && !guiNameED->text().isEmpty()); +void PrefFileformats::on_editorED_textEdited(const QString & s) +{ + currentFormat().setEditor(fromqstr(s)); + changed(); +} - int const ftype = formatsLW->currentItem()->type(); - Format const & f(form_->formats().get(ftype)); - string const old_pretty(f.prettyname()); - string const old_shortcut(f.shortcut()); - string const old_extension(f.extension()); - string const old_viewer(f.viewer()); - string const old_editor(f.editor()); - bool const old_document(f.documentFormat()); - bool const old_vector(f.vectorFormat()); - string const new_pretty(fromqstr(gui_name)); - string const new_shortcut(fromqstr(shortcutED->text())); - string const new_extension(fromqstr(extensionED->text())); - string const new_viewer(fromqstr(viewerED->text())); - string const new_editor(fromqstr(editorED->text())); - bool const new_document(documentCB->isChecked()); - bool const new_vector(vectorCB->isChecked()); +void PrefFileformats::on_shortcutED_textEdited(const QString & s) +{ + currentFormat().setShortcut(fromqstr(s)); + changed(); +} - bool modified = ((old_pretty != new_pretty) || (old_shortcut != new_shortcut) - || (old_extension != new_extension) || (old_viewer != new_viewer) - || old_editor != new_editor || old_document != new_document - || old_vector != new_vector); - formatModifyPB->setEnabled(valid && known && modified && !known_otherwise); - formatNewPB->setEnabled(valid && !known && !gui_name_known); - formatRemovePB->setEnabled(known); +void PrefFileformats::on_formatED_editingFinished() +{ + string const newname = fromqstr(formatED->displayText()); + if (newname == currentFormat().name()) + return; + + currentFormat().setName(newname); + changed(); } +// FIXME: move to qt_helpers ? +void PrefFileformats::setValid(QWidget * widget, bool valid) +{ + if (valid) { + widget->setPalette(QPalette()); + } else { + QPalette pal = widget->palette(); + pal.setColor(QPalette::Active, QPalette::Foreground, QColor(255, 0, 0)); + widget->setPalette(pal); + } +} -void PrefFileformats::new_format() + +void PrefFileformats::on_formatED_textChanged(const QString &) { - string const name = fromqstr(formatED->text()); - string const prettyname = fromqstr(guiNameED->text()); - string const extension = fromqstr(extensionED->text()); - string const shortcut = fromqstr(shortcutED->text()); - string const viewer = fromqstr(viewerED->text()); - string const editor = fromqstr(editorED->text()); - int flags = Format::none; - if (documentCB->isChecked()) - flags |= Format::document; - if (vectorCB->isChecked()) - flags |= Format::vector; + QString t = formatED->text(); + int p = 0; + bool valid = formatED->validator()->validate(t, p) == QValidator::Acceptable; + setValid(formatLA, valid); +} - form_->formats().add(name, extension, prettyname, shortcut, viewer, - editor, flags); - form_->formats().sort(); - form_->converters().update(form_->formats()); +void PrefFileformats::on_formatsCB_editTextChanged(const QString &) +{ + QString t = formatsCB->currentText(); + int p = 0; + bool valid = formatsCB->validator()->validate(t, p) == QValidator::Acceptable; + setValid(formatsLA, valid); +} + + +void PrefFileformats::updatePrettyname() +{ + string const newname = fromqstr(formatsCB->currentText()); + if (newname == currentFormat().prettyname()) + return; + + currentFormat().setPrettyname(newname); updateView(); - updateButtons(); formatsChanged(); + changed(); } -void PrefFileformats::modify_format() +Format & PrefFileformats::currentFormat() { - int const current_item = formatsLW->currentItem()->type(); - Format const & oldformat = form_->formats().get(current_item); - form_->formats().erase(oldformat.name()); + int const i = formatsCB->currentIndex(); + int const nr = formatsCB->itemData(i).toInt(); + return formats_.get(nr); +} - new_format(); + +void PrefFileformats::on_formatNewPB_clicked() +{ + formats_.add("", "", "", "", "", "", Format::none); + updateView(); + formatsCB->setCurrentIndex(0); + formatsCB->setFocus(Qt::OtherFocusReason); } -void PrefFileformats::remove_format() +void PrefFileformats::on_formatRemovePB_clicked() { - int const nr = formatsLW->currentItem()->type(); - string const current_text = form_->formats().get(nr).name(); + int const i = formatsCB->currentIndex(); + int const nr = formatsCB->itemData(i).toInt(); + string const current_text = formats_.get(nr).name(); if (form_->converters().formatIsUsed(current_text)) { Alert::error(_("Format in use"), _("Cannot remove a Format used by a Converter. " @@ -1562,12 +1623,13 @@ return; } - form_->formats().erase(current_text); - form_->converters().update(form_->formats()); + formats_.erase(current_text); + form_->converters().update(formats_); updateView(); - updateButtons(); + on_formatsCB_editTextChanged(formatsCB->currentText()); formatsChanged(); + changed(); } Index: src/frontends/qt4/GuiPrefs.h =================================================================== --- src/frontends/qt4/GuiPrefs.h (revision 20277) +++ src/frontends/qt4/GuiPrefs.h (working copy) @@ -16,6 +16,7 @@ #include "ControlPrefs.h" #include "Color.h" #include "LyXRC.h" +#include "Format.h" #include "ui_PrefsUi.h" @@ -37,6 +38,7 @@ #include "ui_PrefIdentityUi.h" #include <QDialog> +#include <QValidator> #include <vector> @@ -257,6 +259,36 @@ }; +class FormatValidator : public QValidator +{ +public: + FormatValidator(QWidget *, Formats const & f); + void fixup(QString & input) const; + QValidator::State validate(QString & input, int & pos) const; +private: + virtual std::string str(Formats::const_iterator it) const = 0; + int nr() const; + Formats const & formats_; +}; + + +class FormatNameValidator : public FormatValidator +{ +public: + FormatNameValidator(QWidget *, Formats const & f); +private: + std::string str(Formats::const_iterator it) const; +}; + +class FormatPrettynameValidator : public FormatValidator +{ +public: + FormatPrettynameValidator(QWidget *, Formats const & f); +private: + std::string str(Formats::const_iterator it) const; +}; + + class PrefFileformats : public PrefModule, public Ui::PrefFileformatsUi { Q_OBJECT @@ -265,19 +297,29 @@ void apply(LyXRC & rc) const; void update(LyXRC const & rc); + void updateView(); - void updateView(); Q_SIGNALS: void formatsChanged(); -private: - void updateButtons(); private Q_SLOTS: - void switch_format(int); - void fileformat_changed(); - void new_format(); - void modify_format(); - void remove_format(); + void on_extensionED_textEdited(const QString &); + void on_viewerED_textEdited(const QString &); + void on_editorED_textEdited(const QString &); + void on_shortcutED_textEdited(const QString &); + void on_formatED_editingFinished(); + void on_formatED_textChanged(const QString &); + void on_formatsCB_currentIndexChanged(int); + void on_formatsCB_editTextChanged(const QString &); + void on_formatNewPB_clicked(); + void on_formatRemovePB_clicked(); + void setFlags(); + void updatePrettyname(); + +private: + void setValid(QWidget * widget, bool valid); + Format & currentFormat(); + Formats formats_; }; Index: src/frontends/qt4/ui/PrefFileformatsUi.ui =================================================================== --- src/frontends/qt4/ui/PrefFileformatsUi.ui (revision 20277) +++ src/frontends/qt4/ui/PrefFileformatsUi.ui (working copy) @@ -5,253 +5,170 @@ <rect> <x>0</x> <y>0</y> - <width>459</width> - <height>410</height> + <width>414</width> + <height>322</height> </rect> </property> <property name="windowTitle" > <string/> </property> - <layout class="QVBoxLayout" > + <layout class="QGridLayout" > <property name="margin" > - <number>0</number> + <number>9</number> </property> <property name="spacing" > <number>6</number> </property> - <item> + <item row="6" column="1" > + <widget class="QLineEdit" name="editorED" /> + </item> + <item row="0" column="2" > + <widget class="QPushButton" name="formatNewPB" > + <property name="text" > + <string>&New...</string> + </property> + </widget> + </item> + <item row="0" column="3" > + <widget class="QPushButton" name="formatRemovePB" > + <property name="text" > + <string>&Remove</string> + </property> + </widget> + </item> + <item row="5" column="1" > + <widget class="QLineEdit" name="shortcutED" /> + </item> + <item row="3" column="1" > + <widget class="QLineEdit" name="formatED" /> + </item> + <item row="3" column="0" > + <widget class="QLabel" name="formatLA" > + <property name="text" > + <string>S&hort Name:</string> + </property> + <property name="buddy" > + <cstring>formatED</cstring> + </property> + </widget> + </item> + <item row="0" column="1" > + <widget class="QComboBox" name="formatsCB" > + <property name="sizePolicy" > + <sizepolicy> + <hsizetype>7</hsizetype> + <vsizetype>0</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="editable" > + <bool>true</bool> + </property> + <property name="insertPolicy" > + <enum>QComboBox::InsertAtCurrent</enum> + </property> + <property name="minimumContentsLength" > + <number>1</number> + </property> + </widget> + </item> + <item row="2" column="1" colspan="3" > + <widget class="QCheckBox" name="vectorCB" > + <property name="text" > + <string>Vector graphi&cs format</string> + </property> + </widget> + </item> + <item row="0" column="0" > <widget class="QLabel" name="formatsLA" > <property name="text" > - <string>&File formats</string> + <string>&Format:</string> </property> <property name="buddy" > - <cstring>formatsLW</cstring> + <cstring>formatsCB</cstring> </property> </widget> </item> - <item> - <layout class="QHBoxLayout" > - <property name="margin" > - <number>0</number> + <item row="1" column="1" colspan="3" > + <widget class="QCheckBox" name="documentCB" > + <property name="text" > + <string>&Document format</string> </property> - <property name="spacing" > - <number>6</number> + </widget> + </item> + <item row="8" column="1" > + <spacer> + <property name="orientation" > + <enum>Qt::Vertical</enum> </property> - <item> - <widget class="QListWidget" name="formatsLW" /> - </item> - <item> - <layout class="QVBoxLayout" > - <property name="margin" > - <number>0</number> - </property> - <property name="spacing" > - <number>6</number> - </property> - <item> - <widget class="QPushButton" name="formatNewPB" > - <property name="text" > - <string>&Add</string> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="formatModifyPB" > - <property name="text" > - <string>&Modify</string> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="formatRemovePB" > - <property name="text" > - <string>&Remove</string> - </property> - </widget> - </item> - <item> - <spacer> - <property name="orientation" > - <enum>Qt::Vertical</enum> - </property> - <property name="sizeHint" > - <size> - <width>20</width> - <height>40</height> - </size> - </property> - </spacer> - </item> - </layout> - </item> - </layout> + <property name="sizeHint" > + <size> + <width>20</width> + <height>31</height> + </size> + </property> + </spacer> </item> - <item> - <layout class="QHBoxLayout" > - <property name="margin" > - <number>0</number> + <item row="7" column="0" > + <widget class="QLabel" name="viewerLA" > + <property name="text" > + <string>&Viewer:</string> </property> - <property name="spacing" > - <number>6</number> + <property name="buddy" > + <cstring>viewerED</cstring> </property> - <item> - <widget class="QCheckBox" name="documentCB" > - <property name="text" > - <string>&Document format</string> - </property> - </widget> - </item> - <item> - <widget class="QCheckBox" name="vectorCB" > - <property name="text" > - <string>Vector graphi&cs format</string> - </property> - </widget> - </item> - </layout> + </widget> </item> - <item> - <layout class="QHBoxLayout" > - <property name="margin" > - <number>0</number> + <item row="7" column="1" > + <widget class="QLineEdit" name="viewerED" /> + </item> + <item row="6" column="0" > + <widget class="QLabel" name="editorLA" > + <property name="text" > + <string>Ed&itor:</string> </property> - <property name="spacing" > - <number>6</number> + <property name="buddy" > + <cstring>editorED</cstring> </property> - <item> - <layout class="QVBoxLayout" > - <property name="margin" > - <number>0</number> - </property> - <property name="spacing" > - <number>6</number> - </property> - <item> - <widget class="QLabel" name="formatLA" > - <property name="text" > - <string>F&ormat:</string> - </property> - <property name="buddy" > - <cstring>formatED</cstring> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="shortcutLA" > - <property name="text" > - <string>S&hortcut:</string> - </property> - <property name="buddy" > - <cstring>shortcutED</cstring> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="viewerLA" > - <property name="text" > - <string>&Viewer:</string> - </property> - <property name="buddy" > - <cstring>viewerED</cstring> - </property> - </widget> - </item> - </layout> - </item> - <item> - <layout class="QVBoxLayout" > - <property name="margin" > - <number>0</number> - </property> - <property name="spacing" > - <number>6</number> - </property> - <item> - <widget class="QLineEdit" name="formatED" /> - </item> - <item> - <widget class="QLineEdit" name="shortcutED" /> - </item> - <item> - <widget class="QLineEdit" name="viewerED" /> - </item> - </layout> - </item> - <item> - <layout class="QVBoxLayout" > - <property name="margin" > - <number>0</number> - </property> - <property name="spacing" > - <number>6</number> - </property> - <item> - <widget class="QLabel" name="guiNameLA" > - <property name="text" > - <string>&GUI name:</string> - </property> - <property name="buddy" > - <cstring>guiNameED</cstring> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="extensionLA" > - <property name="text" > - <string>E&xtension:</string> - </property> - <property name="buddy" > - <cstring>extensionED</cstring> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="editorLA" > - <property name="text" > - <string>Ed&itor:</string> - </property> - <property name="buddy" > - <cstring>editorED</cstring> - </property> - </widget> - </item> - </layout> - </item> - <item> - <layout class="QVBoxLayout" > - <property name="margin" > - <number>0</number> - </property> - <property name="spacing" > - <number>6</number> - </property> - <item> - <widget class="QLineEdit" name="guiNameED" /> - </item> - <item> - <widget class="QLineEdit" name="extensionED" /> - </item> - <item> - <widget class="QLineEdit" name="editorED" /> - </item> - </layout> - </item> - </layout> + </widget> </item> + <item row="5" column="0" > + <widget class="QLabel" name="shortcutLA" > + <property name="text" > + <string>S&hortcut:</string> + </property> + <property name="buddy" > + <cstring>shortcutED</cstring> + </property> + </widget> + </item> + <item row="4" column="0" > + <widget class="QLabel" name="extensionLA" > + <property name="text" > + <string>E&xtension:</string> + </property> + <property name="buddy" > + <cstring>extensionED</cstring> + </property> + </widget> + </item> + <item row="4" column="1" > + <widget class="QLineEdit" name="extensionED" /> + </item> </layout> </widget> <tabstops> - <tabstop>formatsLW</tabstop> + <tabstop>formatsCB</tabstop> <tabstop>documentCB</tabstop> <tabstop>vectorCB</tabstop> <tabstop>formatED</tabstop> - <tabstop>guiNameED</tabstop> - <tabstop>shortcutED</tabstop> - <tabstop>extensionED</tabstop> <tabstop>viewerED</tabstop> <tabstop>editorED</tabstop> + <tabstop>extensionED</tabstop> + <tabstop>shortcutED</tabstop> + <tabstop>formatRemovePB</tabstop> <tabstop>formatNewPB</tabstop> - <tabstop>formatModifyPB</tabstop> </tabstops> <includes> <include location="local" >qt_helpers.h</include>