]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiListings.cpp
cosmetics;
[lyx.git] / src / frontends / qt4 / GuiListings.cpp
1 /**
2  * \file GuiListings.cpp
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Bo Peng
7  * \author Jürgen Spitzmüller
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #include <config.h>
13
14 #include "GuiListings.h"
15
16 #include "qt_helpers.h"
17
18 #include "FuncRequest.h"
19
20 #include "insets/InsetListings.h"
21 #include "insets/InsetListingsParams.h"
22
23 #include "support/debug.h"
24 #include "support/gettext.h"
25 #include "support/lstrings.h"
26
27 #include <QLineEdit>
28 #include <QPushButton>
29 #include <QValidator>
30 #include <QRegExpValidator>
31
32 using namespace std;
33 using namespace lyx::support;
34
35 namespace lyx {
36 namespace frontend {
37
38
39 /////////////////////////////////////////////////////////////////////
40 //
41 // GuiListings
42 //
43 /////////////////////////////////////////////////////////////////////
44
45
46 char const * languages[] =
47 { "no language", "ABAP", "ACSL", "Ada", "ALGOL", "Assembler", "Awk", "bash", "Basic", "C",
48   "C++", "Caml", "Clean", "Cobol", "Comal 80", "command.com", "Comsol", "csh", "Delphi",
49   "Eiffel", "Elan", "erlang", "Euphoria", "Fortran", "Gnuplot", "Haskell", "HTML", "IDL", "inform",
50   "Java", "JVMIS", "ksh", "Lingo", "Lisp", "Logo", "make", "Mathematica", "Matlab", "Mercury",
51   "MetaPost", "Miranda", "ML", "Modula-2", "MuPAD", "NASTRAN", "Oberon-2", "OCL", "Octave",
52   "Oz", "Pascal", "Perl", "PHP", "PL/I", "Plasm", "PostScript", "POV", "Prolog", "Promela",
53   "PSTricks", "Python", "R", "Reduce", "Rexx", "RSL", "Ruby", "S", "SAS", "Scilab", "sh",
54   "SHELXL", "Simula", "tcl", "SPARQL", "SQL", "tcl", "TeX", "VBScript", "Verilog", "VHDL",
55   "VRML", "XML", "XSLT", "" };
56
57
58 char const * languages_gui[] =
59 { N_("No language"), "ABAP", "ACSL", "Ada", "ALGOL", "Assembler", "Awk", "bash", "Basic",
60   "C", "C++", "Caml", "Clean", "Cobol", "Comal 80", "command.com", "Comsol", "csh", "Delphi",
61   "Eiffel", "Elan", "Erlang", "Euphoria", "Fortran", "Gnuplot", "Haskell", "HTML", "IDL", "inform",
62   "Java", "JVMIS", "ksh", "Lingo", "Lisp", "Logo", "make", "Mathematica", "Matlab", "Mercury",
63   "MetaPost", "Miranda", "ML", "Modula-2", "MuPAD", "NASTRAN", "Oberon-2", "OCL", "Octave",
64   "Oz", "Pascal", "Perl", "PHP", "PL/I", "Plasm", "PostScript", "POV", "Prolog", "Promela",
65   "PSTricks", "Python", "R", "Reduce", "Rexx", "RSL", "Ruby", "S", "SAS", "Scilab", "sh",
66   "SHELXL", "Simula", "tcl", "SPARQL", "SQL", "tcl", "TeX", "VBScript", "Verilog", "VHDL",
67   "VRML", "XML", "XSLT", "" };
68
69
70 struct dialect_info {
71         /// the dialect
72         char const * dialect;
73         /// the associated language
74         char const * language;
75         /// representation of the dialect in the gui
76         char const * gui;
77         /// is this the default dialect?
78         bool is_default;
79 };
80
81
82 dialect_info const dialects[] = {
83         { "R/2 4.3", "ABAP", "R/2 4.3", false },
84         { "R/2 5.0", "ABAP", "R/2 5.0", false },
85         { "R/3 3.1", "ABAP", "R/3 3.1", false },
86         { "R/3 4.6C", "ABAP", "R/3 4.6C", false },
87         { "R/3 6.10", "ABAP", "R/3 6.10", true },
88         { "2005", "Ada", "2005", true },
89         { "83", "Ada", "83", false },
90         { "95", "Ada", "95", false },
91         { "60", "Algol", "60", false },
92         { "68", "Algol", "68", true },
93         { "Motorola68k", "Assembler", "Motorola 68xxx", false },
94         { "x86masm", "Assembler", "x86 (MASM)", false },
95         { "gnu", "Awk", "gnu", true },
96         { "POSIX", "Awk", "POSIX", false },
97         { "Visual", "Basic", "Visual", false },
98         { "ANSI", "C", "ANSI", true },
99         { "Handel", "C", "Handel", false },
100         { "Objective", "C", "Objective", false },
101         { "Sharp", "C", "Sharp", false },
102         { "ANSI", "C++", "ANSI", false },
103         { "GNU", "C++", "GNU", false },
104         { "ISO", "C++", "ISO", true },
105         { "Visual", "C++", "Visual", false },
106         { "light", "Caml", "light", true },
107         { "Objective", "Caml", "Objective", false },
108         { "1974", "Cobol", "1974", false },
109         { "1985", "Cobol", "1985", true },
110         { "ibm", "Cobol", "IBM", false },
111         { "WinXP", "command.com", "Windows XP", true },
112         { "77", "Fortran", "77", false },
113         { "90", "Fortran", "90", false },
114         { "95", "Fortran", "95", true },
115         { "CORBA", "IDL", "CORBA", false },
116         { "AspectJ", "Java", "Aspect J", false },
117         { "Auto", "Lisp", "Auto", false },
118         { "gnu", "make", "gnu", false },
119         { "1.0", "Mathematica", "1.0", false },
120         { "3.0", "Mathematica", "3.0", false },
121         { "5.2", "Mathematica", "5.2", true },
122         { "decorative", "OCL", "decorative", false },
123         { "OMG", "OCL", "OMG", true },
124         { "Borland6", "Pascal", "Borland 6", false },
125         { "Standard", "Pascal", "Standard", true },
126         { "XSC", "Pascal", "XSC", false },
127         { "PLUS", "S", "PLUS", false },
128         { "67", "Simula", "67", true },
129         { "CII", "Simula", "CII", false },
130         { "DEC", "Simula", "DEC", false },
131         { "IBM", "Simula", "IBM", false },
132         { "tk", "tcl", "tk", false },
133         { "AlLaTeX", "TeX", "AlLaTeX", false },
134         { "common", "TeX", "common", false },
135         { "LaTeX", "TeX", "LaTeX", false },
136         { "plain", "TeX", "plain", true },
137         { "primitive", "TeX", "primitive", false },
138         { "AMS", "VHDL", "AMS", false },
139         { "97", "VRML", "97", true }
140 };
141
142
143 size_t const nr_dialects = sizeof(dialects) / sizeof(dialect_info);
144
145
146 char const * font_sizes[] =
147 { "default", "tiny", "scriptsize", "footnotesize", "small", "normalsize", "large",
148   "Large", "" };
149
150 char const * font_sizes_gui[] =
151 { N_("Default"), N_("Tiny"), N_("Smallest"), N_("Smaller"), N_("Small"), N_("Normal"),
152   N_("Large"), N_("Larger"), "" };
153
154 char const * font_styles[] =
155 { "default", "rmfamily", "ttfamily", "sffamily", "" };
156
157 char const * font_styles_gui[] =
158 { N_("Default"), N_("Roman"), N_("Typewriter"), N_("Sans Serif"), "" };
159
160
161
162 GuiListings::GuiListings(GuiView & lv)
163         : GuiDialog(lv, "listings", qt_("Program Listing Settings"))
164 {
165         setupUi(this);
166
167         connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
168         connect(applyPB, SIGNAL(clicked()), this, SLOT(slotApply()));
169         connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
170
171         connect(languageCO, SIGNAL(currentIndexChanged(int)),
172                 this, SLOT(change_adaptor()));
173         connect(dialectCO, SIGNAL(currentIndexChanged(int)),
174                 this, SLOT(change_adaptor()));
175         connect(inlineCB, SIGNAL(clicked()),
176                 this, SLOT(change_adaptor()));
177         connect(floatCB, SIGNAL(clicked()),
178                 this, SLOT(change_adaptor()));
179         connect(placementLE, SIGNAL(textChanged(QString)),
180                 this, SLOT(change_adaptor()));
181         connect(numberSideCO, SIGNAL(currentIndexChanged(int)),
182                 this, SLOT(change_adaptor()));
183         connect(numberStepLE, SIGNAL(textChanged(QString)),
184                 this, SLOT(change_adaptor()));
185         connect(numberFontSizeCO, SIGNAL(currentIndexChanged(int)),
186                 this, SLOT(change_adaptor()));
187         connect(firstlineLE, SIGNAL(textChanged(QString)),
188                 this, SLOT(change_adaptor()));
189         connect(lastlineLE, SIGNAL(textChanged(QString)),
190                 this, SLOT(change_adaptor()));
191         connect(fontsizeCO, SIGNAL(currentIndexChanged(int)),
192                 this, SLOT(change_adaptor()));
193         connect(fontstyleCO, SIGNAL(currentIndexChanged(int)),
194                 this, SLOT(change_adaptor()));
195         connect(breaklinesCB, SIGNAL(clicked()),
196                 this, SLOT(change_adaptor()));
197         connect(spaceCB, SIGNAL(clicked()),
198                 this, SLOT(change_adaptor()));
199         connect(spaceInStringCB, SIGNAL(clicked()),
200                 this, SLOT(change_adaptor()));
201         connect(extendedcharsCB, SIGNAL(clicked()),
202                 this, SLOT(change_adaptor()));
203
204         connect(listingsED,  SIGNAL(textChanged()),
205                 this, SLOT(change_adaptor()));
206         connect(listingsED,  SIGNAL(textChanged()),
207                 this, SLOT(set_listings_msg()));
208         connect(bypassCB, SIGNAL(clicked()),
209                 this, SLOT(change_adaptor()));
210         connect(bypassCB, SIGNAL(clicked()),
211                 this, SLOT(set_listings_msg()));
212
213         for (int n = 0; languages[n][0]; ++n)
214                 languageCO->addItem(qt_(languages_gui[n]));
215
216         for (int n = 0; font_styles[n][0]; ++n)
217                 fontstyleCO->addItem(qt_(font_styles_gui[n]));
218
219         for (int n = 0; font_sizes[n][0]; ++n) {
220                 QString font = qt_(font_sizes_gui[n]);
221                 fontsizeCO->addItem(font);
222                 numberFontSizeCO->addItem(font);
223         }
224
225         // set validators
226         numberStepLE->setValidator(new QIntValidator(0, 1000000, this));
227         firstlineLE->setValidator(new QIntValidator(0, 1000000, this));
228         lastlineLE->setValidator(new QIntValidator(0, 1000000, this));
229         placementLE->setValidator(new QRegExpValidator(QRegExp("[\\*tbph]*"), this));
230
231         bc().setPolicy(ButtonPolicy::NoRepeatedApplyReadOnlyPolicy);
232         bc().setOK(okPB);
233         bc().setApply(applyPB);
234         bc().setCancel(closePB);
235         listingsTB->setPlainText(
236                 qt_("Input listing parameters on the right. Enter ? for a list of parameters."));
237
238         updateContents();
239
240 }
241
242
243 void GuiListings::change_adaptor()
244 {
245         changed();
246 }
247
248
249 string GuiListings::construct_params()
250 {
251         string language = languages[qMax(0, languageCO->currentIndex())];
252         string dialect;
253         string const dialect_gui = fromqstr(dialectCO->currentText());
254         if (dialectCO->currentIndex() > 0) {
255                 for (size_t i = 0; i != nr_dialects; ++i) {
256                         if (dialect_gui == dialects[i].gui
257                         && dialects[i].language == language
258                         && !dialects[i].is_default) {
259                                 dialect = dialects[i].dialect;
260                                 break;
261                         }
262                 }
263         }
264
265         bool float_ = floatCB->isChecked();
266         string placement;
267         if (placementLE->isEnabled())
268                 placement = fromqstr(placementLE->text());
269
270         string numberSide;
271         switch (qMax(0, numberSideCO->currentIndex())) {
272         case 0:
273                 numberSide = "none";
274                 break;
275         case 1:
276                 numberSide = "left";
277                 break;
278         case 2:
279                 numberSide = "right";
280                 break;
281         default:
282                 numberSide = "none";
283                 break;
284         }
285         string stepnumber = fromqstr(numberStepLE->text());
286         string numberfontsize = font_sizes[qMax(0, numberFontSizeCO->currentIndex())];
287         string firstline = fromqstr(firstlineLE->text());
288         string lastline = fromqstr(lastlineLE->text());
289
290         string fontsize = font_sizes[qMax(0, fontsizeCO->currentIndex())];
291         string fontstyle = font_styles[qMax(0, fontstyleCO->currentIndex())];
292         string basicstyle;
293         if (fontsize != "default")
294                 basicstyle = "\\" + fontsize;
295         if (fontstyle != "default")
296                 basicstyle += "\\" + fontstyle;
297         bool breakline = breaklinesCB->isChecked();
298         bool space = spaceCB->isChecked();
299         bool spaceInString = spaceInStringCB->isChecked();
300         bool extendedchars = extendedcharsCB->isChecked();
301         string extra = fromqstr(listingsED->toPlainText());
302
303         // compose a string
304         InsetListingsParams par;
305         if (language != "no language" && !contains(extra, "language=")) {
306                 if (dialect.empty())
307                         par.addParam("language", language);
308                 else
309                         par.addParam("language", "{[" + dialect + "]" + language + "}");
310         }
311         // this dialog uses float=placement instead of float,floatplacement=placement
312         // because float accepts *tbph and floatplacement accepts bph.
313         // our placement textedit is actually for the float parameter
314         if (float_)
315                 par.addParam("float", placement);
316         if (numberSide != "none")
317                 par.addParam("numbers", numberSide);
318         if (numberfontsize != "default" && numberSide != "none")
319                 par.addParam("numberstyle", "\\" + numberfontsize);
320         if (!stepnumber.empty() && numberSide != "none")
321                 par.addParam("stepnumber", stepnumber);
322         if (!firstline.empty())
323                 par.addParam("firstline", firstline);
324         if (!lastline.empty())
325                 par.addParam("lastline", lastline);
326         if (!basicstyle.empty())
327                 par.addParam("basicstyle", basicstyle);
328         if (breakline)
329                 par.addParam("breaklines", "true");
330         if (space)
331                 par.addParam("showspaces", "true");
332         if (!spaceInString)
333                 par.addParam("showstringspaces", "false");
334         if (extendedchars)
335                 par.addParam("extendedchars", "true");
336         par.addParams(extra);
337         return par.params();
338 }
339
340
341 docstring GuiListings::validate_listings_params()
342 {
343         // use a cache here to avoid repeated validation
344         // of the same parameters
345         static string param_cache;
346         static docstring msg_cache;
347         
348         if (bypassCB->isChecked())
349                 return docstring();
350
351         string params = construct_params();
352         if (params != param_cache) {
353                 param_cache = params;
354                 msg_cache = InsetListingsParams(params).validate();
355         }
356         return msg_cache;
357 }
358
359
360 void GuiListings::set_listings_msg()
361 {
362         static bool isOK = true;
363         docstring msg = validate_listings_params();
364         if (msg.empty()) {
365                 if (isOK)
366                         return;
367                 isOK = true;
368                 listingsTB->setPlainText(
369                         qt_("Input listing parameters on the right. Enter ? for a list of parameters."));
370         } else {
371                 isOK = false;
372                 listingsTB->setPlainText(toqstr(msg));
373         }
374 }
375
376
377 void GuiListings::on_floatCB_stateChanged(int state)
378 {
379         if (state == Qt::Checked) {
380                 inlineCB->setChecked(false);
381                 placementLE->setEnabled(true);
382         } else
383                 placementLE->setEnabled(false);
384 }
385
386
387 void GuiListings::on_inlineCB_stateChanged(int state)
388 {
389         if (state == Qt::Checked) {
390                 floatCB->setChecked(false);
391                 placementLE->setEnabled(false);
392         }
393 }
394
395
396 void GuiListings::on_numberSideCO_currentIndexChanged(int index)
397 {
398         numberStepLE->setEnabled(index > 0);
399         numberFontSizeCO->setEnabled(index > 0);
400 }
401
402
403 void GuiListings::on_languageCO_currentIndexChanged(int index)
404 {
405         dialectCO->clear();
406         // 0 is "no dialect"
407         int default_dialect = 0;
408         dialectCO->addItem(qt_("No dialect"));
409         string const language = languages[index];
410
411         for (size_t i = 0; i != nr_dialects; ++i) {
412                 if (language == dialects[i].language) {
413                         dialectCO->addItem(qt_(dialects[i].gui));
414                         if (dialects[i].is_default)
415                                 default_dialect =
416                                         dialectCO->findText(qt_(dialects[i].gui));
417                 }
418         }
419         dialectCO->setCurrentIndex(default_dialect);
420         dialectCO->setEnabled(dialectCO->count() > 1);
421 }
422
423
424 void GuiListings::applyView()
425 {
426         params_.setInline(inlineCB->isChecked());
427         params_.setParams(construct_params());
428 }
429
430
431 static string plainParam(string const & par)
432 {
433         // remove enclosing braces
434         if (prefixIs(par, "{") && suffixIs(par, "}"))
435                 return par.substr(1, par.size() - 2);
436         return par;
437 }
438
439
440 void GuiListings::updateContents()
441 {
442         // set default values
443         listingsTB->setPlainText(
444                 qt_("Input listing parameters on the right. Enter ? for a list of parameters."));
445         languageCO->setCurrentIndex(findToken(languages, "no language"));
446         dialectCO->setCurrentIndex(0);
447         floatCB->setChecked(false);
448         placementLE->clear();
449         numberSideCO->setCurrentIndex(0);
450         numberStepLE->clear();
451         numberFontSizeCO->setCurrentIndex(findToken(font_sizes, "default"));
452         firstlineLE->clear();
453         lastlineLE->clear();
454         fontstyleCO->setCurrentIndex(findToken(font_styles, "default"));
455         fontsizeCO->setCurrentIndex(findToken(font_sizes, "default"));
456         breaklinesCB->setChecked(false);
457         spaceCB->setChecked(false);
458         spaceInStringCB->setChecked(true);
459         extendedcharsCB->setChecked(false);
460
461         // set values from param string
462         inlineCB->setChecked(params_.isInline());
463         if (params_.isInline()) {
464                 floatCB->setChecked(false);
465                 placementLE->setEnabled(false);
466         }
467         // break other parameters and set values
468         vector<string> pars = getVectorFromString(params_.separatedParams(), "\n");
469         // process each of them
470         for (vector<string>::iterator it = pars.begin();
471             it != pars.end(); ++it) {
472                 if (prefixIs(*it, "language=")) {
473                         string arg = plainParam(it->substr(9));
474                         // has dialect?
475                         string language;
476                         string dialect;
477                         bool in_gui = false;
478                         if (prefixIs(arg, "[") && contains(arg, "]")) {
479                                 size_t end_dialect = arg.find("]");
480                                 dialect = arg.substr(1, end_dialect - 1);
481                                 language = arg.substr(end_dialect + 1);
482                         } else {
483                                 language = arg;
484                         }
485                         int n = findToken(languages, language);
486                         if (n >= 0) {
487                                 languageCO->setCurrentIndex(n);
488                                 in_gui = true;
489                         }
490                         // on_languageCO_currentIndexChanged should have set dialects
491                         if (!dialect.empty()) {
492                                 string dialect_gui;
493                                 for (size_t i = 0; i != nr_dialects; ++i) {
494                                         if (dialect == dialects[i].dialect
495                                             && dialects[i].language == language) {
496                                                 dialect_gui = dialects[i].gui;
497                                                 break;
498                                         }
499                                 }
500                                 n = dialectCO->findText(qt_(dialect_gui));
501                                 if (n >= 0)
502                                         dialectCO->setCurrentIndex(n);
503                                 else
504                                         in_gui = false;
505                         }
506                         if (in_gui)
507                                 *it = "";
508                         languageCO->setEnabled(in_gui);
509                         dialectCO->setEnabled(
510                                 in_gui && dialectCO->count() > 1);
511                 } else if (prefixIs(*it, "float")) {
512                         floatCB->setChecked(true);
513                         inlineCB->setChecked(false);
514                         placementLE->setEnabled(true);
515                         if (prefixIs(*it, "float="))
516                                 placementLE->setText(
517                                         toqstr(plainParam(it->substr(6))));
518                         *it = "";
519                 } else if (prefixIs(*it, "numbers=")) {
520                         string s = plainParam(it->substr(8));
521                         int n = 0;
522                         if (s == "left")
523                                 n = 1;
524                         else if (s == "right")
525                                 n = 2;
526                         numberSideCO->setCurrentIndex(n);
527                         *it = "";
528                 } else if (prefixIs(*it, "stepnumber=")) {
529                         numberStepLE->setText(
530                                 toqstr(plainParam(it->substr(11))));
531                         *it = "";
532                 } else if (prefixIs(*it, "numberstyle=")) {
533                         string par = plainParam(it->substr(12));
534                         int n = findToken(font_sizes, par.substr(1));
535                         if (n >= 0)
536                                 numberFontSizeCO->setCurrentIndex(n);
537                         *it = "";
538                 } else if (prefixIs(*it, "firstline=")) {
539                         firstlineLE->setText(
540                                 toqstr(plainParam(it->substr(10))));
541                         *it = "";
542                 } else if (prefixIs(*it, "lastline=")) {
543                         lastlineLE->setText(
544                                 toqstr(plainParam(it->substr(9))));
545                         *it = "";
546                 } else if (prefixIs(*it, "basicstyle=")) {
547                         string style;
548                         string size;
549                         for (int n = 0; font_styles[n][0]; ++n) {
550                                 string const s = font_styles[n];
551                                 if (contains(*it, "\\" + s)) {
552                                         style = "\\" + s;
553                                         break;
554                                 }
555                         }
556                         for (int n = 0; font_sizes[n][0]; ++n) {
557                                 string const s = font_sizes[n];
558                                 if (contains(*it, "\\" + s)) {
559                                         size = "\\" + s;
560                                         break;
561                                 }
562                         }
563                         if (plainParam(it->substr(11)) == style + size
564                             || plainParam(it->substr(11)) == size + style) {
565                                 if (!style.empty()) {
566                                         int n = findToken(font_styles, style.substr(1));
567                                         if (n >= 0)
568                                                 fontstyleCO->setCurrentIndex(n);
569                                 }
570                                 if (!size.empty()) {
571                                         int n = findToken(font_sizes, size.substr(1));
572                                         if (n >= 0)
573                                                 fontsizeCO->setCurrentIndex(n);
574                                 }
575                                 *it = "";
576                         }
577                 } else if (prefixIs(*it, "breaklines=")) {
578                         breaklinesCB->setChecked(contains(*it, "true"));
579                         *it = "";
580                 } else if (prefixIs(*it, "showspaces=")) {
581                         spaceCB->setChecked(contains(*it, "true"));
582                         *it = "";
583                 } else if (prefixIs(*it, "showstringspaces=")) {
584                         spaceInStringCB->setChecked(contains(*it, "true"));
585                         *it = "";
586                 } else if (prefixIs(*it, "extendedchars=")) {
587                         extendedcharsCB->setChecked(contains(*it, "true"));
588                         *it = "";
589                 }
590         }
591
592         numberStepLE->setEnabled(numberSideCO->currentIndex() > 0);
593         numberFontSizeCO->setEnabled(numberSideCO->currentIndex() > 0);
594         // parameters that can be handled by widgets are cleared
595         // the rest is put to the extra edit box.
596         string extra = getStringFromVector(pars);
597         listingsED->setPlainText(toqstr(InsetListingsParams(extra).separatedParams()));
598 }
599
600
601 bool GuiListings::isValid()
602 {
603         return validate_listings_params().empty();
604 }
605
606
607 bool GuiListings::initialiseParams(string const & data)
608 {
609         InsetListings::string2params(data, params_);
610         return true;
611 }
612
613
614 void GuiListings::clearParams()
615 {
616         params_.clear();
617 }
618
619
620 void GuiListings::dispatchParams()
621 {
622         string const lfun = InsetListings::params2string(params_);
623         dispatch(FuncRequest(getLfun(), lfun));
624 }
625
626
627 void GuiListings::setParams(InsetListingsParams const & params)
628 {
629         params_ = params;
630 }
631
632
633 Dialog * createGuiListings(GuiView & lv) { return new GuiListings(lv); }
634
635
636 } // namespace frontend
637 } // namespace lyx
638
639
640 #include "GuiListings_moc.cpp"