#define GUIPREFS_H
#include "GuiDialog.h"
+#include "GuiLyXFiles.h"
#include "Converter.h"
#include "Format.h"
public Q_SLOTS:
void change_adaptor();
+ void slotFileSelected(QString);
Q_SIGNALS:
void prefsApplied(LyXRC const & rc);
bool isBufferDependent() const { return false; }
/// various file pickers
- QString browsebind(QString const & file) const;
- QString browseUI(QString const & file) const;
- QString browsekbmap(QString const & file) const;
+ QString browsebind(QString const & file);
+ QString browseUI(QString const & file);
+ QString browsekbmap(QString const & file);
/// general browse
QString browse(QString const & file, QString const & title) const;
/// set a color
void setColor(ColorCode col, QString const & hex);
- /// 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_; }
private:
///
void addModule(PrefModule * module);
+ ///
+ QString browseLibFile(QString const & dir,
+ QString const & name, QString const & ext);
/// temporary lyxrc
LyXRC rc_;
/// A list of colors to be dispatched
std::vector<std::string> colors_;
-
- bool update_screen_font_;
- bool update_previews_;
+ /// UI file selector
+ GuiLyXFiles * guilyxfiles_;
+ /// Selected UI file
+ QString uifile_;
};
virtual void applyRC(LyXRC & rc) const;
virtual void updateRC(LyXRC const & rc);
-
-private Q_SLOTS:
- void on_DateED_textChanged(const QString &);
};
virtual void updateRC(LyXRC const & rc);
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;
};
private Q_SLOTS:
void changeColor();
+ void resetColor();
+ void resetAllColor();
void changeSysColor();
void changeLyxObjectsSelection();
+ bool setColor(int const row, QColor const new_color,
+ QString const old_color);
+ bool isDefaultColor(int const row, QString const color);
+ void setDisabledResets();
private:
+ ///
+ QColor getDefaultColorByRow(int const row);
+ ///
std::vector<ColorCode> lcolors_;
+ ///
std::vector<QString> curcolors_;
+ ///
std::vector<QString> newcolors_;
};
void removeConverter();
void changeConverter();
void on_cacheCB_stateChanged(int state);
+ void on_needauthForbiddenCB_toggled(bool);
+ void on_needauthCB_toggled(bool);
private:
void updateButtons();
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_;
///
// user_unbind_ holds \unbind bindings from user.bind
// When an item is inserted, it is added to user_bind_
// When an item from system_bind_ is deleted, it is added to user_unbind_
- // When an item in user_bind_ or user_unbind_ is deleted, it is
+ // When an item in user_bind_ or user_unbind_ is deleted, it is
// deleted (unbind)
KeyMap system_bind_;
KeyMap user_bind_;