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
|
|
|
|
2010-04-15 14:25:25 +00:00
|
|
|
#include "ui_PrefOutputUi.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();
|
|
|
|
|
2010-12-29 13:50:22 +00:00
|
|
|
Q_SIGNALS:
|
|
|
|
void prefsApplied(LyXRC const & rc);
|
|
|
|
|
2008-05-19 20:52:24 +00:00
|
|
|
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();
|
|
|
|
|
|
|
|
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();
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2010-04-15 14:25:25 +00:00
|
|
|
class PrefOutput : public PrefModule, public Ui::PrefOutputUi
|
2007-04-25 07:13:54 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2010-04-15 14:25:25 +00:00
|
|
|
PrefOutput(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);
|
2010-07-17 22:29:42 +00:00
|
|
|
void on_scrollzoomEnableCB_toggled(bool);
|
2007-04-25 07:13:54 +00:00
|
|
|
|
|
|
|
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:
|
2009-11-29 13:29:36 +00:00
|
|
|
void on_latexEncodingCB_stateChanged(int state);
|
2009-05-08 10:07:32 +00:00
|
|
|
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&);
|
2010-12-29 13:50:22 +00:00
|
|
|
|
|
|
|
public Q_SLOTS:
|
|
|
|
void updateScreenFontSizes(LyXRC const & rc);
|
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();
|
2010-08-09 12:15:02 +00:00
|
|
|
void changeSysColor();
|
2009-05-23 10:15:24 +00:00
|
|
|
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);
|
2009-09-21 00:44:43 +00:00
|
|
|
|
|
|
|
private Q_SLOTS:
|
|
|
|
void on_instantPreviewCO_currentIndexChanged(int);
|
2011-01-03 17:21:22 +00:00
|
|
|
void on_displayGraphicsCB_toggled(bool);
|
2007-04-25 07:13:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
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();
|
2009-08-08 17:05:31 +00:00
|
|
|
void selectHunspelldir();
|
2009-05-23 10:30:47 +00:00
|
|
|
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);
|
|
|
|
|
2010-09-29 19:05:28 +00:00
|
|
|
private Q_SLOTS:
|
|
|
|
void on_spellcheckerCB_currentIndexChanged(int);
|
2007-04-25 07:13:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
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);
|
2011-09-13 20:42:23 +00:00
|
|
|
void on_extensionsED_textEdited(const QString &);
|
2007-09-15 17:09:57 +00:00
|
|
|
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();
|
2009-09-05 15:11:43 +00:00
|
|
|
void on_viewerCO_currentIndexChanged(int i);
|
|
|
|
void on_editorCO_currentIndexChanged(int i);
|
2007-09-15 17:09:57 +00:00
|
|
|
void setFlags();
|
|
|
|
void updatePrettyname();
|
|
|
|
|
|
|
|
private:
|
|
|
|
Format & currentFormat();
|
2009-09-05 15:11:43 +00:00
|
|
|
///
|
|
|
|
void updateViewers();
|
|
|
|
///
|
|
|
|
void updateEditors();
|
|
|
|
///
|
2009-10-17 22:52:16 +00:00
|
|
|
LyXRC::Alternatives viewer_alternatives;
|
2009-09-05 15:11:43 +00:00
|
|
|
///
|
2009-10-17 22:52:16 +00:00
|
|
|
LyXRC::Alternatives editor_alternatives;
|
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);
|
2010-11-20 13:34:14 +00:00
|
|
|
void on_languagePackageCO_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
|