namespace frontend {
+string const catOutput = N_("Output");
+string const catLookAndFeel = N_("Look & Feel");
+string const catLanguage = N_("Language Settings");
+string const catFiles = N_("File Handling");
+
static int findPos_helper(QStringList const & vec, QString const & val)
{
for (int i = 0; i != vec.size(); ++i)
/////////////////////////////////////////////////////////////////////
PrefPlaintext::PrefPlaintext(QWidget * parent)
- : PrefModule(qt_("Plain text"), 0, parent)
+ : PrefModule(qt_(catOutput), qt_("Plain text"), 0, parent)
{
setupUi(this);
connect(plaintextLinelengthSB, SIGNAL(valueChanged(int)),
/////////////////////////////////////////////////////////////////////
PrefDate::PrefDate(QWidget * parent)
- : PrefModule(qt_("Date format"), 0, parent)
+ : PrefModule(qt_(catOutput), qt_("Date format"), 0, parent)
{
setupUi(this);
connect(DateED, SIGNAL(textChanged(QString)),
/////////////////////////////////////////////////////////////////////
PrefInput::PrefInput(GuiPreferences * form, QWidget * parent)
- : PrefModule(qt_("Keyboard/Mouse"), form, parent)
+ : PrefModule(qt_(catLookAndFeel), qt_("Keyboard/Mouse"), form, parent)
{
setupUi(this);
/////////////////////////////////////////////////////////////////////
PrefCompletion::PrefCompletion(GuiPreferences * form, QWidget * parent)
- : PrefModule(qt_("Input Completion"), form, parent)
+ : PrefModule(qt_(catLookAndFeel), qt_("Input Completion"), form, parent)
{
setupUi(this);
/////////////////////////////////////////////////////////////////////
PrefLatex::PrefLatex(GuiPreferences * form, QWidget * parent)
- : PrefModule(qt_("LaTeX"), form, parent)
+ : PrefModule(qt_(catOutput), qt_("LaTeX"), form, parent)
{
setupUi(this);
connect(latexEncodingED, SIGNAL(textChanged(QString)),
/////////////////////////////////////////////////////////////////////
PrefScreenFonts::PrefScreenFonts(GuiPreferences * form, QWidget * parent)
- : PrefModule(qt_("Screen fonts"), form, parent)
+ : PrefModule(qt_(catLookAndFeel), qt_("Screen fonts"), form, parent)
{
setupUi(this);
} // namespace anon
PrefColors::PrefColors(GuiPreferences * form, QWidget * parent)
- : PrefModule(qt_("Colors"), form, parent)
+ : PrefModule(qt_(catLookAndFeel), qt_("Colors"), form, parent)
{
setupUi(this);
/////////////////////////////////////////////////////////////////////
PrefDisplay::PrefDisplay(QWidget * parent)
- : PrefModule(qt_("Graphics"), 0, parent)
+ : PrefModule(qt_(catLookAndFeel), qt_("Graphics"), 0, parent)
{
setupUi(this);
connect(instantPreviewCO, SIGNAL(activated(int)),
/////////////////////////////////////////////////////////////////////
PrefPaths::PrefPaths(GuiPreferences * form, QWidget * parent)
- : PrefModule(qt_("Paths"), form, parent)
+ : PrefModule(QString(), qt_("Paths"), form, parent)
{
setupUi(this);
connect(exampleDirPB, SIGNAL(clicked()), this, SLOT(select_exampledir()));
/////////////////////////////////////////////////////////////////////
PrefSpellchecker::PrefSpellchecker(GuiPreferences * form, QWidget * parent)
- : PrefModule(qt_("Spellchecker"), form, parent)
+ : PrefModule(qt_(catLanguage), qt_("Spellchecker"), form, parent)
{
setupUi(this);
PrefConverters::PrefConverters(GuiPreferences * form, QWidget * parent)
- : PrefModule(qt_("Converters"), form, parent)
+ : PrefModule(qt_(catFiles), qt_("Converters"), form, parent)
{
setupUi(this);
PrefFileformats::PrefFileformats(GuiPreferences * form, QWidget * parent)
- : PrefModule(qt_("File formats"), form, parent)
+ : PrefModule(qt_(catFiles), qt_("File formats"), form, parent)
{
setupUi(this);
formatED->setValidator(new FormatNameValidator(formatsCB, form_->formats()));
/////////////////////////////////////////////////////////////////////
PrefLanguage::PrefLanguage(QWidget * parent)
- : PrefModule(qt_("Language"), 0, parent)
+ : PrefModule(qt_(catLanguage), qt_("Language"), 0, parent)
{
setupUi(this);
/////////////////////////////////////////////////////////////////////
PrefPrinter::PrefPrinter(QWidget * parent)
- : PrefModule(qt_("Printer"), 0, parent)
+ : PrefModule(qt_(catOutput), qt_("Printer"), 0, parent)
{
setupUi(this);
/////////////////////////////////////////////////////////////////////
PrefUserInterface::PrefUserInterface(GuiPreferences * form, QWidget * parent)
- : PrefModule(qt_("User interface"), form, parent)
+ : PrefModule(qt_(catLookAndFeel), qt_("User interface"), form, parent)
{
setupUi(this);
/////////////////////////////////////////////////////////////////////
PrefEdit::PrefEdit(GuiPreferences * form, QWidget * parent)
- : PrefModule(qt_("Editing"), form, parent)
+ : PrefModule(qt_(catLookAndFeel), qt_("Editing"), form, parent)
{
setupUi(this);
PrefShortcuts::PrefShortcuts(GuiPreferences * form, QWidget * parent)
- : PrefModule(qt_("Shortcuts"), form, parent)
+ : PrefModule(qt_(catLookAndFeel), qt_("Shortcuts"), form, parent)
{
setupUi(this);
/////////////////////////////////////////////////////////////////////
PrefIdentity::PrefIdentity(QWidget * parent)
- : PrefModule(qt_("Identity"), 0, parent)
+ : PrefModule(QString(), qt_("Identity"), 0, parent)
{
setupUi(this);
void GuiPreferences::add(PrefModule * module)
{
BOOST_ASSERT(module);
- prefsPS->addPanel(module, module->title());
+ if (module->category().isEmpty())
+ prefsPS->addPanel(module, module->title());
+ else
+ prefsPS->addPanel(module, module->title(), module->category());
connect(module, SIGNAL(changed()), this, SLOT(change_adaptor()));
modules_.push_back(module);
}