2006-03-05 17:24:44 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
2007-08-31 05:53:55 +00:00
|
|
|
* \file GuiPrefs.h
|
2006-03-05 17:24:44 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author John Levon
|
2007-10-23 03:48:02 +00:00
|
|
|
* \author Bo Peng
|
|
|
|
* \author Edwin Leuven
|
2006-03-05 17:24:44 +00:00
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
2007-08-31 22:16:11 +00:00
|
|
|
#ifndef GUIPREFS_H
|
|
|
|
#define GUIPREFS_H
|
2006-03-05 17:24:44 +00:00
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
#include "GuiDialog.h"
|
2007-10-07 09:47:12 +00:00
|
|
|
|
2007-10-25 12:41:02 +00:00
|
|
|
#include "ColorCode.h"
|
2007-10-07 09:47:12 +00:00
|
|
|
#include "Converter.h"
|
2007-09-15 17:09:57 +00:00
|
|
|
#include "Format.h"
|
2008-03-15 01:20:36 +00:00
|
|
|
#include "FuncCode.h"
|
2007-10-20 20:50:56 +00:00
|
|
|
#include "KeyMap.h"
|
2007-10-07 09:47:12 +00:00
|
|
|
#include "LyXRC.h"
|
|
|
|
#include "Mover.h"
|
2007-04-25 07:13:54 +00:00
|
|
|
|
2007-08-11 15:48:15 +00:00
|
|
|
#include "ui_PrefsUi.h"
|
2006-10-21 00:16:43 +00:00
|
|
|
|
2007-08-11 15:48:15 +00:00
|
|
|
#include "ui_PrefPlaintextUi.h"
|
|
|
|
#include "ui_PrefDateUi.h"
|
2008-01-30 21:20:56 +00:00
|
|
|
#include "ui_PrefInputUi.h"
|
2007-08-11 15:48:15 +00:00
|
|
|
#include "ui_PrefLatexUi.h"
|
|
|
|
#include "ui_PrefScreenFontsUi.h"
|
2008-03-18 17:31:17 +00:00
|
|
|
#include "ui_PrefCompletionUi.h"
|
2007-08-11 15:48:15 +00:00
|
|
|
#include "ui_PrefColorsUi.h"
|
|
|
|
#include "ui_PrefDisplayUi.h"
|
2008-03-15 22:12:19 +00:00
|
|
|
#include "ui_PrefEditUi.h"
|
2007-08-11 15:48:15 +00:00
|
|
|
#include "ui_PrefPathsUi.h"
|
2007-10-16 14:41:46 +00:00
|
|
|
#include "ui_PrefShortcutsUi.h"
|
2007-08-11 15:48:15 +00:00
|
|
|
#include "ui_PrefSpellcheckerUi.h"
|
|
|
|
#include "ui_PrefConvertersUi.h"
|
|
|
|
#include "ui_PrefFileformatsUi.h"
|
|
|
|
#include "ui_PrefLanguageUi.h"
|
|
|
|
#include "ui_PrefPrinterUi.h"
|
|
|
|
#include "ui_PrefUi.h"
|
|
|
|
#include "ui_PrefIdentityUi.h"
|
2007-10-18 16:47:31 +00:00
|
|
|
#include "ui_ShortcutUi.h"
|
2007-04-25 07:13:54 +00:00
|
|
|
|
2007-10-07 09:47:12 +00:00
|
|
|
#include <string>
|
2007-08-31 22:16:11 +00:00
|
|
|
#include <vector>
|
|
|
|
|
2007-10-07 09:47:12 +00:00
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
namespace lyx {
|
|
|
|
|
2006-03-05 17:24:44 +00:00
|
|
|
class Converters;
|
|
|
|
class Formats;
|
|
|
|
class Movers;
|
|
|
|
|
|
|
|
namespace frontend {
|
|
|
|
|
2008-05-19 20:52:24 +00:00
|
|
|
class PrefModule;
|
|
|
|
|
|
|
|
class GuiPreferences : public GuiDialog, public Ui::PrefsUi
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
GuiPreferences(GuiView & lv);
|
|
|
|
|
|
|
|
void apply(LyXRC & rc) const;
|
|
|
|
void updateRc(LyXRC const & rc);
|
|
|
|
|
|
|
|
public Q_SLOTS:
|
|
|
|
void change_adaptor();
|
|
|
|
|
|
|
|
public:
|
|
|
|
/// Apply changes
|
|
|
|
void applyView();
|
|
|
|
|
|
|
|
std::vector<PrefModule *> modules_;
|
|
|
|
|
|
|
|
///
|
|
|
|
bool initialiseParams(std::string const &);
|
|
|
|
///
|
|
|
|
void clearParams() {}
|
|
|
|
///
|
|
|
|
void dispatchParams();
|
|
|
|
///
|
|
|
|
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;
|
|
|
|
|
|
|
|
/// 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();
|
|
|
|
|
|
|
|
/// adjust the prefs paper sizes
|
|
|
|
PAPER_SIZE toPaperSize(int i) const;
|
|
|
|
/// adjust the prefs paper sizes
|
|
|
|
int fromPaperSize(PAPER_SIZE papersize) const;
|
|
|
|
|
|
|
|
LyXRC & rc() { return rc_; }
|
|
|
|
Converters & converters() { return converters_; }
|
|
|
|
Formats & formats() { return formats_; }
|
|
|
|
Movers & movers() { return movers_; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
///
|
|
|
|
void addModule(PrefModule * module);
|
|
|
|
|
|
|
|
/// temporary lyxrc
|
|
|
|
LyXRC rc_;
|
|
|
|
/// temporary converters
|
|
|
|
Converters converters_;
|
|
|
|
/// temporary formats
|
|
|
|
Formats formats_;
|
|
|
|
/// temporary movers
|
|
|
|
Movers movers_;
|
|
|
|
|
|
|
|
/// A list of colors to be dispatched
|
|
|
|
std::vector<std::string> colors_;
|
|
|
|
|
|
|
|
bool redraw_gui_;
|
|
|
|
bool update_screen_font_;
|
|
|
|
};
|
|
|
|
|
2007-04-25 07:13:54 +00:00
|
|
|
|
|
|
|
class PrefModule : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2008-03-19 13:11:14 +00:00
|
|
|
PrefModule(QString const & cat, QString const & t,
|
2008-05-19 20:52:24 +00:00
|
|
|
GuiPreferences * form)
|
|
|
|
: QWidget(form), category_(cat), title_(t), form_(form)
|
2007-04-25 10:57:54 +00:00
|
|
|
{}
|
2007-04-25 07:13:54 +00:00
|
|
|
|
|
|
|
virtual void apply(LyXRC & rc) const = 0;
|
|
|
|
virtual void update(LyXRC const & rc) = 0;
|
|
|
|
|
2008-03-19 13:11:14 +00:00
|
|
|
QString const & category() const { return category_; }
|
2008-03-05 23:10:53 +00:00
|
|
|
QString const & title() const { return title_; }
|
2007-04-25 07:13:54 +00:00
|
|
|
|
|
|
|
protected:
|
2008-03-19 13:11:14 +00:00
|
|
|
QString category_;
|
2008-03-05 23:10:53 +00:00
|
|
|
QString title_;
|
2007-10-07 09:47:12 +00:00
|
|
|
GuiPreferences * form_;
|
2007-04-25 07:13:54 +00:00
|
|
|
|
|
|
|
Q_SIGNALS:
|
|
|
|
void changed();
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
class PrefPlaintext : public PrefModule, public Ui::PrefPlaintextUi
|
2007-04-25 07:13:54 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2008-05-19 20:52:24 +00:00
|
|
|
PrefPlaintext(GuiPreferences * form);
|
2007-04-25 07:13:54 +00:00
|
|
|
|
|
|
|
virtual void apply(LyXRC & rc) const;
|
|
|
|
virtual void update(LyXRC const & rc);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
class PrefDate : public PrefModule, public Ui::PrefDateUi
|
2007-04-25 07:13:54 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2008-05-19 20:52:24 +00:00
|
|
|
PrefDate(GuiPreferences * form);
|
2007-04-25 07:13:54 +00:00
|
|
|
|
|
|
|
virtual void apply(LyXRC & rc) const;
|
|
|
|
virtual void update(LyXRC const & rc);
|
2009-03-27 11:22:54 +00:00
|
|
|
|
|
|
|
private Q_SLOTS:
|
|
|
|
void on_DateED_textChanged(const QString &);
|
2007-04-25 07:13:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2008-01-30 21:20:56 +00:00
|
|
|
class PrefInput : public PrefModule, public Ui::PrefInputUi
|
2007-04-25 07:13:54 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2008-05-19 20:52:24 +00:00
|
|
|
PrefInput(GuiPreferences * form);
|
2007-04-25 07:13:54 +00:00
|
|
|
|
|
|
|
virtual void apply(LyXRC & rc) const;
|
|
|
|
virtual void update(LyXRC const & rc);
|
|
|
|
|
|
|
|
private Q_SLOTS:
|
|
|
|
void on_firstKeymapPB_clicked(bool);
|
|
|
|
void on_secondKeymapPB_clicked(bool);
|
|
|
|
void on_keymapCB_toggled(bool);
|
|
|
|
|
|
|
|
private:
|
2008-05-19 20:52:24 +00:00
|
|
|
QString testKeymap(QString const & keymap);
|
2007-04-25 07:13:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2008-03-18 17:31:17 +00:00
|
|
|
class PrefCompletion : public PrefModule, public Ui::PrefCompletionUi
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2008-05-19 20:52:24 +00:00
|
|
|
PrefCompletion(GuiPreferences * form);
|
2008-03-18 17:31:17 +00:00
|
|
|
|
|
|
|
virtual void apply(LyXRC & rc) const;
|
|
|
|
virtual void update(LyXRC const & rc);
|
2009-05-22 21:35:18 +00:00
|
|
|
virtual void enableCB();
|
2009-05-20 20:00:31 +00:00
|
|
|
private Q_SLOTS:
|
|
|
|
void on_popupTextCB_clicked();
|
|
|
|
void on_inlineTextCB_clicked();
|
2008-03-18 17:31:17 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
class PrefLatex : public PrefModule, public Ui::PrefLatexUi
|
2007-04-25 07:13:54 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2008-05-19 20:52:24 +00:00
|
|
|
PrefLatex(GuiPreferences * form);
|
2007-04-25 07:13:54 +00:00
|
|
|
|
|
|
|
virtual void apply(LyXRC & rc) const;
|
|
|
|
virtual void update(LyXRC const & rc);
|
2009-05-08 10:07:32 +00:00
|
|
|
|
|
|
|
private Q_SLOTS:
|
|
|
|
void on_latexBibtexCO_activated(int n);
|
|
|
|
void on_latexIndexCO_activated(int n);
|
|
|
|
|
|
|
|
private:
|
|
|
|
///
|
2009-05-28 12:49:41 +00:00
|
|
|
std::set<std::string> bibtex_alternatives;
|
2009-05-08 10:07:32 +00:00
|
|
|
///
|
2009-05-28 12:49:41 +00:00
|
|
|
std::set<std::string> index_alternatives;
|
2007-04-25 07:13:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
class PrefScreenFonts : public PrefModule, public Ui::PrefScreenFontsUi
|
2007-04-25 07:13:54 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2008-05-19 20:52:24 +00:00
|
|
|
PrefScreenFonts(GuiPreferences * form);
|
2007-04-25 07:13:54 +00:00
|
|
|
|
|
|
|
virtual void apply(LyXRC & rc) const;
|
|
|
|
virtual void update(LyXRC const & rc);
|
|
|
|
|
|
|
|
private Q_SLOTS:
|
2009-05-23 10:15:18 +00:00
|
|
|
void selectRoman(const QString&);
|
|
|
|
void selectSans(const QString&);
|
|
|
|
void selectTypewriter(const QString&);
|
2007-04-25 07:13:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
class PrefColors : public PrefModule, public Ui::PrefColorsUi
|
2007-04-25 07:13:54 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2008-05-19 20:52:24 +00:00
|
|
|
PrefColors(GuiPreferences * form);
|
2007-04-25 07:13:54 +00:00
|
|
|
|
|
|
|
void apply(LyXRC & rc) const;
|
|
|
|
void update(LyXRC const & rc);
|
|
|
|
|
|
|
|
private Q_SLOTS:
|
2009-05-23 10:15:24 +00:00
|
|
|
void changeColor();
|
|
|
|
void changeLyxObjectsSelection();
|
2007-04-25 07:13:54 +00:00
|
|
|
|
|
|
|
private:
|
2007-10-25 12:41:02 +00:00
|
|
|
std::vector<ColorCode> lcolors_;
|
2007-05-09 20:16:31 +00:00
|
|
|
std::vector<QString> curcolors_;
|
2007-04-25 07:13:54 +00:00
|
|
|
std::vector<QString> newcolors_;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
class PrefDisplay : public PrefModule, public Ui::PrefDisplayUi
|
2007-04-25 07:13:54 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2008-05-19 20:52:24 +00:00
|
|
|
PrefDisplay(GuiPreferences * form);
|
2007-04-25 07:13:54 +00:00
|
|
|
|
|
|
|
void apply(LyXRC & rc) const;
|
|
|
|
void update(LyXRC const & rc);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
class PrefPaths : public PrefModule, public Ui::PrefPathsUi
|
2007-04-25 07:13:54 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2008-05-19 20:52:24 +00:00
|
|
|
PrefPaths(GuiPreferences * form);
|
2007-04-25 07:13:54 +00:00
|
|
|
|
|
|
|
void apply(LyXRC & rc) const;
|
|
|
|
void update(LyXRC const & rc);
|
|
|
|
|
|
|
|
private Q_SLOTS:
|
2009-05-23 10:30:47 +00:00
|
|
|
void selectExampledir();
|
|
|
|
void selectTemplatedir();
|
|
|
|
void selectTempdir();
|
|
|
|
void selectBackupdir();
|
|
|
|
void selectWorkingdir();
|
|
|
|
void selectThesaurusdir();
|
|
|
|
void selectLyxPipe();
|
2007-04-25 07:13:54 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
class PrefSpellchecker : public PrefModule, public Ui::PrefSpellcheckerUi
|
2007-04-25 07:13:54 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2008-05-19 20:52:24 +00:00
|
|
|
PrefSpellchecker(GuiPreferences * form);
|
2007-04-25 07:13:54 +00:00
|
|
|
|
|
|
|
void apply(LyXRC & rc) const;
|
|
|
|
void update(LyXRC const & rc);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
class PrefConverters : public PrefModule, public Ui::PrefConvertersUi
|
2007-04-25 07:13:54 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2008-05-19 20:52:24 +00:00
|
|
|
PrefConverters(GuiPreferences * form);
|
2007-04-25 07:13:54 +00:00
|
|
|
|
|
|
|
void apply(LyXRC & rc) const;
|
|
|
|
void update(LyXRC const & rc);
|
|
|
|
|
|
|
|
public Q_SLOTS:
|
|
|
|
void updateGui();
|
|
|
|
|
|
|
|
private Q_SLOTS:
|
2009-05-23 10:30:52 +00:00
|
|
|
void updateConverter();
|
|
|
|
void switchConverter();
|
|
|
|
void removeConverter();
|
2009-05-23 12:52:23 +00:00
|
|
|
void changeConverter();
|
2007-04-25 07:13:54 +00:00
|
|
|
void on_cacheCB_stateChanged(int state);
|
|
|
|
|
|
|
|
private:
|
|
|
|
void updateButtons();
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
class PrefFileformats : public PrefModule, public Ui::PrefFileformatsUi
|
2007-04-25 07:13:54 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2008-05-19 20:52:24 +00:00
|
|
|
PrefFileformats(GuiPreferences * form);
|
2007-04-25 07:13:54 +00:00
|
|
|
|
|
|
|
void apply(LyXRC & rc) const;
|
|
|
|
void update(LyXRC const & rc);
|
2007-09-03 20:28:26 +00:00
|
|
|
void updateView();
|
2007-09-15 17:09:57 +00:00
|
|
|
|
2007-04-25 07:13:54 +00:00
|
|
|
Q_SIGNALS:
|
|
|
|
void formatsChanged();
|
|
|
|
|
|
|
|
private Q_SLOTS:
|
2007-09-15 17:09:57 +00:00
|
|
|
void on_copierED_textEdited(const QString & s);
|
|
|
|
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:
|
|
|
|
Format & currentFormat();
|
2007-04-25 07:13:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
class PrefLanguage : public PrefModule, public Ui::PrefLanguageUi
|
2007-04-25 07:13:54 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2008-05-19 20:52:24 +00:00
|
|
|
PrefLanguage(GuiPreferences * form);
|
2007-04-25 07:13:54 +00:00
|
|
|
|
|
|
|
void apply(LyXRC & rc) const;
|
|
|
|
void update(LyXRC const & rc);
|
2008-06-25 13:32:27 +00:00
|
|
|
|
|
|
|
private Q_SLOTS:
|
|
|
|
void on_uiLanguageCO_currentIndexChanged(int);
|
2007-04-25 07:13:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
class PrefPrinter : public PrefModule, public Ui::PrefPrinterUi
|
2007-04-25 07:13:54 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2008-05-19 20:52:24 +00:00
|
|
|
PrefPrinter(GuiPreferences * form);
|
2007-04-25 07:13:54 +00:00
|
|
|
|
|
|
|
void apply(LyXRC & rc) const;
|
|
|
|
void update(LyXRC const & rc);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
class PrefUserInterface : public PrefModule, public Ui::PrefUi
|
2007-04-25 07:13:54 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2008-05-19 20:52:24 +00:00
|
|
|
PrefUserInterface(GuiPreferences * form);
|
2007-04-25 07:13:54 +00:00
|
|
|
|
|
|
|
void apply(LyXRC & rc) const;
|
|
|
|
void update(LyXRC const & rc);
|
|
|
|
|
|
|
|
public Q_SLOTS:
|
2009-05-23 10:48:22 +00:00
|
|
|
void selectUi();
|
2008-09-22 07:14:30 +00:00
|
|
|
void on_clearSessionPB_clicked();
|
2007-04-25 07:13:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2008-03-15 22:12:19 +00:00
|
|
|
class PrefEdit : public PrefModule, public Ui::PrefEditUi
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2008-05-19 20:52:24 +00:00
|
|
|
PrefEdit(GuiPreferences * form);
|
2008-03-15 22:12:19 +00:00
|
|
|
|
|
|
|
void apply(LyXRC & rc) const;
|
|
|
|
void update(LyXRC const & rc);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-10-23 03:48:02 +00:00
|
|
|
class GuiShortcutDialog : public QDialog, public Ui::shortcutUi
|
2007-10-18 16:47:31 +00:00
|
|
|
{
|
|
|
|
public:
|
2007-10-23 03:48:02 +00:00
|
|
|
GuiShortcutDialog(QWidget * parent);
|
2007-10-18 16:47:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2007-10-16 14:41:46 +00:00
|
|
|
class PrefShortcuts : public PrefModule, public Ui::PrefShortcuts
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2008-05-19 20:52:24 +00:00
|
|
|
PrefShortcuts(GuiPreferences * form);
|
2007-10-16 14:41:46 +00:00
|
|
|
|
|
|
|
void apply(LyXRC & rc) const;
|
|
|
|
void update(LyXRC const & rc);
|
2007-10-20 20:50:56 +00:00
|
|
|
void updateShortcutsTW();
|
2008-04-21 10:10:12 +00:00
|
|
|
void modifyShortcut();
|
2008-07-22 09:35:46 +00:00
|
|
|
void removeShortcut();
|
2007-10-20 20:50:56 +00:00
|
|
|
///
|
2008-09-23 13:53:38 +00:00
|
|
|
void setItemType(QTreeWidgetItem * item, KeyMap::ItemType tag);
|
2007-10-20 20:50:56 +00:00
|
|
|
QTreeWidgetItem * insertShortcutItem(FuncRequest const & lfun,
|
2008-09-23 13:53:38 +00:00
|
|
|
KeySequence const & shortcut, KeyMap::ItemType tag);
|
2007-10-16 14:41:46 +00:00
|
|
|
|
|
|
|
public Q_SLOTS:
|
2009-05-23 10:48:30 +00:00
|
|
|
void selectBind();
|
2008-04-21 10:10:12 +00:00
|
|
|
void on_modifyPB_pressed();
|
2007-10-18 16:47:31 +00:00
|
|
|
void on_newPB_pressed();
|
|
|
|
void on_removePB_pressed();
|
2007-10-29 08:56:30 +00:00
|
|
|
void on_searchLE_textEdited();
|
2007-10-19 03:09:14 +00:00
|
|
|
///
|
|
|
|
void on_shortcutsTW_itemSelectionChanged();
|
|
|
|
void on_shortcutsTW_itemDoubleClicked();
|
2009-05-23 10:48:30 +00:00
|
|
|
///
|
|
|
|
void shortcutOkPressed();
|
|
|
|
void shortcutCancelPressed();
|
|
|
|
void shortcutClearPressed();
|
|
|
|
void shortcutRemovePressed();
|
2007-10-20 20:50:56 +00:00
|
|
|
|
2007-10-18 16:47:31 +00:00
|
|
|
private:
|
2007-10-19 03:09:14 +00:00
|
|
|
///
|
2007-10-18 16:47:31 +00:00
|
|
|
GuiShortcutDialog * shortcut_;
|
2007-10-19 03:09:14 +00:00
|
|
|
///
|
|
|
|
ButtonController shortcut_bc_;
|
2007-10-20 20:50:56 +00:00
|
|
|
/// category items
|
|
|
|
QTreeWidgetItem * editItem_;
|
|
|
|
QTreeWidgetItem * mathItem_;
|
|
|
|
QTreeWidgetItem * bufferItem_;
|
|
|
|
QTreeWidgetItem * layoutItem_;
|
|
|
|
QTreeWidgetItem * systemItem_;
|
|
|
|
// system_bind_ holds bindings from rc.bind_file
|
|
|
|
// user_bind_ holds \bind bindings from user.bind
|
|
|
|
// 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
|
|
|
|
// deleted (unbind)
|
|
|
|
KeyMap system_bind_;
|
|
|
|
KeyMap user_bind_;
|
|
|
|
KeyMap user_unbind_;
|
2008-07-22 09:35:46 +00:00
|
|
|
///
|
|
|
|
QString save_lfun_;
|
2007-10-16 14:41:46 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
class PrefIdentity : public PrefModule, public Ui::PrefIdentityUi
|
2007-04-25 07:13:54 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2008-05-19 20:52:24 +00:00
|
|
|
PrefIdentity(GuiPreferences * form);
|
2007-04-25 07:13:54 +00:00
|
|
|
|
|
|
|
void apply(LyXRC & rc) const;
|
|
|
|
void update(LyXRC const & rc);
|
|
|
|
};
|
|
|
|
|
2007-10-07 09:47:12 +00:00
|
|
|
|
2006-03-05 17:24:44 +00:00
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|
|
|
|
|
2007-08-31 22:16:11 +00:00
|
|
|
#endif // GUIPREFS_H
|