]> git.lyx.org Git - lyx.git/blob - src/frontends/qt/GuiCounter.h
Implement sane UI for switching tristate toolbars (#6364)
[lyx.git] / src / frontends / qt / GuiCounter.h
1 // -*- C++ -*-
2 /**
3  * \file GuiCounter.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Richard Kimberly Heck
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef GUICOUNTER_H
13 #define GUICOUNTER_H
14
15 #include "InsetParamsWidget.h"
16 #include "ui_CounterUi.h"
17
18 namespace lyx {
19 class InsetCommandParams;
20
21 namespace frontend {
22
23 class GuiView;
24
25 class GuiCounter : public InsetParamsWidget, public Ui::CounterUi
26 {
27         Q_OBJECT
28
29 public:
30         ///
31         GuiCounter(GuiView & lv, QWidget * parent = nullptr);
32
33 private:
34         /// \name InsetParamsWidget inherited methods
35         //@{
36         InsetCode insetCode() const override { return COUNTER_CODE; }
37         FuncCode creationCode() const override { return LFUN_INSET_INSERT; }
38         QString dialogTitle() const override { return qt_("Counters"); }
39         void paramsToDialog(Inset const *) override;
40         docstring dialogToParams() const override;
41         bool checkWidgets(bool readonly) const override;
42         bool initialiseParams(std::string const & data) override;
43         //@}
44         void processParams(InsetCommandParams const & params);
45         ///
46         void fillCombos();
47         ///
48         GuiView & guiview;
49 };
50
51 } // namespace frontend
52 } // namespace lyx
53
54 #endif // GUICOUNTER_H