]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiBox.h
Account for old versions of Pygments
[lyx.git] / src / frontends / qt4 / GuiBox.h
index d3513cf7ab5d553cec208256de0f512fbd7f7207..4c32dcf8fa81b42d189fa3a818091c586c3a444c 100644 (file)
@@ -4,8 +4,8 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author Jürgen Spitzmüller
- * \ author Martin Vermeer
+ * \author Jürgen Spitzmüller
+ * \author Martin Vermeer (with useful hints from Angus Leeming)
  *
  * Full author contact details are available in file CREDITS.
  */
 #ifndef GUIBOX_H
 #define GUIBOX_H
 
-#include "GuiDialog.h"
-#include "ControlBox.h"
+#include "InsetParamsWidget.h"
 #include "ui_BoxUi.h"
-
-#include <vector>
+#include "Font.h"
 
 namespace lyx {
 namespace frontend {
 
-class GuiBoxDialog : public GuiDialog, public Ui::BoxUi
+class GuiBox : public InsetParamsWidget, public Ui::BoxUi
 {
        Q_OBJECT
 
 public:
-       GuiBoxDialog(LyXView & lv);
+       GuiBox(QWidget * parent = 0);
 
 private Q_SLOTS:
-       void change_adaptor();
-       void innerBoxChanged(const QString &);
-       void typeChanged(int);
-       void heightChecked(int);
-       void restoreClicked();
+       void on_innerBoxCO_activated(int);
+       void on_typeCO_activated(int);
+       void on_frameColorCO_currentIndexChanged(int);
+       void initDialog();
+       void on_widthCB_stateChanged(int state);
+       void on_heightCB_stateChanged(int state);
+       void on_pagebreakCB_stateChanged();
 
 private:
-       void closeEvent(QCloseEvent * e);
+       /// \name DialogView inherited methods
+       //@{
+       InsetCode insetCode() const { return BOX_CODE; }
+       FuncCode creationCode() const { return LFUN_BOX_INSERT; }
+       QString dialogTitle() const { return qt_("Box Settings"); }
+       void paramsToDialog(Inset const *);
+       docstring dialogToParams() const;
+       bool checkWidgets(bool readonly) const;
+       //@}
 
-       /// parent controller
-       ControlBox & controller();
+       /// Fill the color combos
+       void fillComboColor(QComboBox * combo, bool const is_none);
        /// add and remove special lengths
        void setSpecial(bool ibox);
        /// only show valid inner box items
-       void setInnerType(bool frameless, int i);
-
-       /// Apply changes
-       void applyView();
-       /// update
-       void updateContents();
+       void setInnerType(bool frameless, QString const & type);
 
+       QStringList ids_;
        ///
-       std::vector<std::string> ids_;
+       QStringList gui_names_;
        ///
-       std::vector<docstring> gui_names_;
+       QStringList ids_spec_;
        ///
-       std::vector<std::string> ids_spec_;
+       QStringList gui_names_spec_;
        ///
-       std::vector<docstring> gui_names_spec_;
+       QList<ColorCode> color_codes_;
 };
 
 } // namespace frontend