#include "ui_PrefConvertersUi.h"
#include "ui_PrefFileformatsUi.h"
#include "ui_PrefLanguageUi.h"
-#include "ui_PrefPrinterUi.h"
#include "ui_PrefUi.h"
#include "ui_PrefIdentityUi.h"
#include "ui_ShortcutUi.h"
/// update the screen fonts after change
void updateScreenFonts();
+ /// update the previews after change
+ void updatePreviews();
+
LyXRC & rc() { return rc_; }
Converters & converters() { return converters_; }
Formats & formats() { return formats_; }
std::vector<std::string> colors_;
bool update_screen_font_;
+ bool update_previews_;
};
private Q_SLOTS:
void on_latexEncodingCB_stateChanged(int state);
void on_latexBibtexCO_activated(int n);
+ void on_latexJBibtexCO_activated(int n);
void on_latexIndexCO_activated(int n);
private:
///
std::set<std::string> bibtex_alternatives;
///
+ std::set<std::string> jbibtex_alternatives;
+ ///
std::set<std::string> index_alternatives;
};
void removeConverter();
void changeConverter();
void on_cacheCB_stateChanged(int state);
+ void on_needauthForbiddenCB_toggled(bool);
private:
void updateButtons();
};
-class PrefPrinter : public PrefModule, public Ui::PrefPrinterUi
-{
- Q_OBJECT
-public:
- PrefPrinter(GuiPreferences * form);
-
- void applyRC(LyXRC & rc) const;
- void updateRC(LyXRC const & rc);
-};
-
-
class PrefUserInterface : public PrefModule, public Ui::PrefUi
{
Q_OBJECT
void applyRC(LyXRC & rc) const;
void updateRC(LyXRC const & rc);
void updateShortcutsTW();
- void modifyShortcut();
- void removeShortcut();
- ///
- void setItemType(QTreeWidgetItem * item, KeyMap::ItemType tag);
- QTreeWidgetItem * insertShortcutItem(FuncRequest const & lfun,
- KeySequence const & shortcut, KeyMap::ItemType tag);
public Q_SLOTS:
void selectBind();
void shortcutRemovePressed();
private:
+ void modifyShortcut();
+ /// remove selected binding, restore default value
+ void removeShortcut();
+ /// remove bindings, do not restore default values
+ void deactivateShortcuts(QList<QTreeWidgetItem*> const & items);
+ /// check the new binding k->func, and remove existing bindings to k after
+ /// asking the user. We exclude lfun_to_modify from this test: we assume
+ /// that if the user clicked "modify" then they agreed to modify the
+ /// binding. Returns false if the shortcut is invalid or the user cancels.
+ bool validateNewShortcut(FuncRequest const & func,
+ KeySequence const & k,
+ QString const & lfun_to_modify);
+ /// compute current active shortcut
+ FuncRequest currentBinding(KeySequence const & k);
+ ///
+ void setItemType(QTreeWidgetItem * item, KeyMap::ItemType tag);
+ ///
+ static KeyMap::ItemType itemType(QTreeWidgetItem & item);
+ /// some items need to be always hidden, for instance empty rebound
+ /// system keys
+ static bool isAlwaysHidden(QTreeWidgetItem & item);
+ /// unhide an empty system binding that may have been hidden
+ /// returns either null or the unhidden shortcut
+ void unhideEmpty(QString const & lfun, bool select);
+ ///
+ QTreeWidgetItem * insertShortcutItem(FuncRequest const & lfun,
+ KeySequence const & shortcut, KeyMap::ItemType tag);
///
GuiShortcutDialog * shortcut_;
///