]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt2/iconpalette.h
better selection and scrolling behaviour
[lyx.git] / src / frontends / qt2 / iconpalette.h
index f3a737c1acace6cecaff53639b9eb4f3f8e96359..7f1b9d9ee935e42a2f354ea9fa20b18699a9d6ec 100644 (file)
@@ -1,21 +1,25 @@
+// -*- C++ -*-
 /**
  * \file iconpalette.h
- * Copyright 2001 the LyX Team
- * Read the file COPYING
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
  * \author John Levon
+ *
+ * Full author contact details are available in file CREDITS
  */
 
 #ifndef ICONPALETTE_H
 #define ICONPALETTE_H
 
-#include <config.h>
+#ifdef __GNUG__
+#pragma interface
+#endif
 
-#include "LString.h"
 #include <qwidget.h>
-
-#include <map>
+#include "LString.h"
+#include <utility>
+#include <vector>
 
 class QPixmap;
 class QPushButton;
@@ -31,25 +35,20 @@ public:
 
        /// add a button
        void add(QPixmap const & pixmap, string name, string tooltip);
-
 signals:
-       void button_clicked(string);
-
+       void button_clicked(string const &);
 protected:
        virtual void resizeEvent(QResizeEvent * e);
 protected slots:
        virtual void clicked();
-
 private:
-       typedef std::map<QPushButton *, string> ButtonMap;
+       int maxcol_;
 
-       int crow_;
-       int ccol_;
        QGridLayout * layout_;
-       ButtonMap button_map_;
+
+       typedef std::pair<QPushButton *, string> Button;
+
+       std::vector<Button> buttons_;
 };
 
 #endif // ICONPALETTE_H