2006-03-05 17:24:44 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
2007-08-31 05:53:55 +00:00
|
|
|
* \file GuiCharacter.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.
|
|
|
|
*
|
2007-10-06 11:17:57 +00:00
|
|
|
* \author Angus Leeming
|
2006-03-05 17:24:44 +00:00
|
|
|
* \author Edwin Leuven
|
|
|
|
* \author John Levon
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
2007-08-31 22:16:11 +00:00
|
|
|
#ifndef GUICHARACTER_H
|
|
|
|
#define GUICHARACTER_H
|
2006-03-05 17:24:44 +00:00
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
#include "GuiDialog.h"
|
2007-08-11 15:48:15 +00:00
|
|
|
#include "ui_CharacterUi.h"
|
2007-10-06 11:17:57 +00:00
|
|
|
#include "Font.h"
|
2007-02-13 18:27:46 +00:00
|
|
|
|
2008-04-20 20:32:00 +00:00
|
|
|
#include <utility>
|
|
|
|
|
2008-05-24 21:58:56 +00:00
|
|
|
#ifdef IGNORE
|
|
|
|
#undef IGNORE
|
|
|
|
#endif
|
2007-10-06 11:17:57 +00:00
|
|
|
|
2006-03-05 17:24:44 +00:00
|
|
|
namespace lyx {
|
|
|
|
namespace frontend {
|
|
|
|
|
2007-10-06 11:17:57 +00:00
|
|
|
enum FontState {
|
|
|
|
///
|
|
|
|
IGNORE,
|
|
|
|
///
|
2018-05-04 17:34:09 +00:00
|
|
|
UNDERBAR,
|
2007-10-06 11:17:57 +00:00
|
|
|
///
|
2018-05-04 17:34:09 +00:00
|
|
|
STRIKEOUT,
|
2007-10-06 11:17:57 +00:00
|
|
|
///
|
2018-05-04 17:34:09 +00:00
|
|
|
XOUT,
|
2007-10-06 11:17:57 +00:00
|
|
|
///
|
2018-05-04 17:34:09 +00:00
|
|
|
UULINE,
|
2009-05-03 22:45:14 +00:00
|
|
|
///
|
2018-05-04 17:34:09 +00:00
|
|
|
UWAVE,
|
2017-04-04 22:01:19 +00:00
|
|
|
///
|
2018-05-04 17:34:09 +00:00
|
|
|
INHERIT,
|
2009-05-05 09:26:28 +00:00
|
|
|
///
|
2018-05-04 17:34:09 +00:00
|
|
|
NONE
|
2007-10-06 11:17:57 +00:00
|
|
|
};
|
|
|
|
|
2008-03-08 07:59:47 +00:00
|
|
|
typedef std::pair<QString, FontFamily> FamilyPair;
|
2007-10-28 18:51:54 +00:00
|
|
|
typedef std::pair<QString, FontFamily> FamilyPair;
|
|
|
|
typedef std::pair<QString, FontSeries> SeriesPair;
|
|
|
|
typedef std::pair<QString, FontShape> ShapePair;
|
|
|
|
typedef std::pair<QString, FontSize> SizePair;
|
2008-03-08 07:59:47 +00:00
|
|
|
typedef std::pair<QString, FontState> BarPair;
|
2008-05-07 22:42:44 +00:00
|
|
|
typedef std::pair<QString, QString> LanguagePair;
|
2007-09-11 21:27:57 +00:00
|
|
|
|
2007-10-09 19:34:27 +00:00
|
|
|
class GuiCharacter : public GuiDialog, public Ui::CharacterUi
|
2007-09-05 20:33:29 +00:00
|
|
|
{
|
2007-04-25 10:57:54 +00:00
|
|
|
Q_OBJECT
|
2007-09-05 20:33:29 +00:00
|
|
|
|
2007-04-25 10:57:54 +00:00
|
|
|
public:
|
2007-11-23 09:44:02 +00:00
|
|
|
GuiCharacter(GuiView & lv);
|
2007-09-05 20:33:29 +00:00
|
|
|
|
2007-04-25 10:57:54 +00:00
|
|
|
protected Q_SLOTS:
|
|
|
|
void change_adaptor();
|
2018-05-04 17:34:09 +00:00
|
|
|
void on_emphCB_clicked();
|
|
|
|
void on_nounCB_clicked();
|
2007-04-25 10:57:54 +00:00
|
|
|
|
2006-03-05 17:24:44 +00:00
|
|
|
private:
|
2010-01-27 18:10:33 +00:00
|
|
|
/// \name Dialog inherited methods
|
2008-05-07 18:53:48 +00:00
|
|
|
//@{
|
2007-09-05 20:33:29 +00:00
|
|
|
void applyView();
|
2007-09-11 18:33:42 +00:00
|
|
|
void updateContents();
|
2008-05-07 18:53:48 +00:00
|
|
|
bool initialiseParams(std::string const & data);
|
|
|
|
void clearParams() {}
|
|
|
|
void dispatchParams();
|
|
|
|
bool isBufferDependent() const { return true; }
|
2008-06-11 08:35:15 +00:00
|
|
|
FuncCode getLfun() const { return LFUN_TEXTSTYLE_UPDATE; }
|
2017-10-18 11:12:20 +00:00
|
|
|
void saveSession(QSettings & settings) const;
|
2008-05-14 12:03:12 +00:00
|
|
|
void restoreSession();
|
2008-05-07 18:53:48 +00:00
|
|
|
//@}
|
|
|
|
|
|
|
|
///
|
|
|
|
void paramsToDialog(Font const & font);
|
2018-05-04 17:34:09 +00:00
|
|
|
///
|
|
|
|
void setBar(FontInfo & fi, FontState val);
|
|
|
|
///
|
|
|
|
void setStrike(FontInfo & fi, FontState val);
|
2006-03-05 17:24:44 +00:00
|
|
|
|
2008-03-08 07:59:47 +00:00
|
|
|
QList<FamilyPair> family;
|
|
|
|
QList<SeriesPair> series;
|
|
|
|
QList<ShapePair> shape;
|
|
|
|
QList<SizePair> size;
|
|
|
|
QList<BarPair> bar;
|
2018-05-04 17:34:09 +00:00
|
|
|
QList<BarPair> strike;
|
2015-05-17 15:15:01 +00:00
|
|
|
QList<ColorCode> color;
|
2008-03-08 07:59:47 +00:00
|
|
|
QList<LanguagePair> language;
|
2007-10-06 11:17:57 +00:00
|
|
|
|
|
|
|
///
|
|
|
|
Font font_;
|
|
|
|
///
|
2018-05-04 17:34:09 +00:00
|
|
|
bool emph_;
|
|
|
|
///
|
|
|
|
bool noun_;
|
2006-03-05 17:24:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|
|
|
|
|
2007-08-31 22:16:11 +00:00
|
|
|
#endif // GUICHARACTER_H
|