]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt2/Toolbar_pimpl.h
Some string(widget->text()) fixes. Weirdness
[lyx.git] / src / frontends / qt2 / Toolbar_pimpl.h
index 7e21028cf42a7ca200f90774b166a6b815ecb5a5..e914fe9589c0aab333bcb3abb5866bc201438b92 100644 (file)
@@ -1,59 +1,46 @@
 // -*- C++ -*-
 /**
- * \file Toolbar_pimpl.h
- * Copyright 2002 the LyX Team
- * Copyright 1996-2001 Lars Gullik Bjønnes
- * Read the file COPYING
+ * \file qt2/Toolbar_pimpl.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- * \author Lars Gullik Bjønnes, larsbj@lyx.org
+ * \author Lars Gullik Bjønnes
+ *
+ * Full author contact details are available in file CREDITS
  */
 
 #ifndef TOOLBAR_PIMPL_H
 #define TOOLBAR_PIMPL_H
 
-#include <config.h>
-#include <map>
-#include <vector>
-
-#include <boost/smart_ptr.hpp>
-#include "frontends/Toolbar.h"
-
 #ifdef __GNUG__
 #pragma interface
 #endif
 
+#include "frontends/Toolbar.h"
+
+#include <boost/scoped_ptr.hpp>
+#include <map>
+#include <vector>
+
 #include <qobject.h>
 #include <qtoolbutton.h>
+
 class QtView;
 class QToolBar;
-class QComboBox;
+class QLComboBox;
 class ToolbarProxy;
 
 struct Toolbar::Pimpl {
-       friend class ToolbarProxy;
 public:
-       ///
-       Pimpl(LyXView * o, Dialogs &, int x, int y);
-       ///
+       friend class ToolbarProxy;
+
+       Pimpl(LyXView * o, int x, int y);
+
        ~Pimpl();
-       
-       /// (re)sets the toolbar
-       void set(bool doingmain = false);
-
-       void reset() { }
-       /** this is to be the entry point to the toolbar
-           frame, where you can change the toolbar realtime.
-       */
-       void edit();
+
        /// add a new button to the toolbar.
-       void add(int, bool doclean = true);
-       /// invokes the n'th icon in the toolbar
-       void push(int);
+       void add(int action);
+
        /// update the state of the icons
        void update();
 
@@ -65,37 +52,33 @@ public:
        void openLayoutList();
        /// Erase the layout list
        void clearLayoutList();
-
 private:
        void changed_layout(string const & sel);
 
        void button_selected(QToolButton * button);
-       QtView * owner_; 
+
+       QtView * owner_;
 
        boost::scoped_ptr<ToolbarProxy> proxy_;
 
        std::vector<QToolBar *> toolbars_;
 
-       QComboBox * combo_;
+       QLComboBox * combo_;
 
        typedef std::map<QToolButton *, int> ButtonMap;
 
        ButtonMap map_;
 };
 
+
 // moc is mind-numbingly stupid
 class ToolbarProxy : public QObject {
        Q_OBJECT
-
 public:
        ToolbarProxy(Toolbar::Pimpl & owner)
-               : owner_(owner) { };
+               : owner_(owner) {}
 public slots:
+
        void layout_selected(const QString & str) {
                owner_.changed_layout(str.latin1());
        }
@@ -106,9 +89,8 @@ public slots:
                        static_cast<QToolButton const *>(sender()))
                );
        }
-
 private:
        Toolbar::Pimpl & owner_;
 };
+
 #endif