On Mon, Jun 18, 2007 at 06:20:07PM +0200, Leuven, E. wrote: > > Tried it (qt 4.2.3 here). Doesn't seem to work well: > > the panel gets a decoration like normal windows when opened (so it's > > already detached) > >, and moreover closes itself when clicking on a symbol. > > no! no! no! ;-) > > the idea is the following: > > "detaching" makes the panel stay on top so that you can enter multple symbols > in a row > > so on popup the panel is "attached" (after clicking it disappears) > > to "detach" it you can *move* the panel. for this you need the title bar. try > it, you will see that now it stays on top. > > i hope i am clearer now....
What about the attached patch, instead? I tested it with Qt 4.1.4 and 4.2.2. Something similar can be done with scons. -- Enrico
Index: src/frontends/qt4/Makefile.am =================================================================== --- src/frontends/qt4/Makefile.am (revision 18815) +++ src/frontends/qt4/Makefile.am (working copy) @@ -11,6 +11,11 @@ libqt4_la_DEPENDENCIES = $(MOCEDFILES) MOCEDFILES = $(MOCFILES:.cpp=_moc.cpp) +IconPalette_moc.cpp: $(srcdir)/IconPalette.h + sed -e "s/QT4_VERSION/%%$(QT4_VERSION)%%/" \ + -e "s|%%\(.\)\.\(.\)\.\(.\)%%|0x0\10\20\3|" $< > IconPalette_moc.h + $(MOC4) -o IconPalette_moc.cpp IconPalette_moc.h + %_moc.cpp: %.h $(MOC4) -o $@ $< Index: src/frontends/qt4/IconPalette.h =================================================================== --- src/frontends/qt4/IconPalette.h (revision 18815) +++ src/frontends/qt4/IconPalette.h (working copy) @@ -17,10 +17,11 @@ #include <QLayout> #include "Action.h" -// FIXME: this can go when we move to Qt 4.3 -#define QT_VERSION_CHECK(major, minor, patch) ((major<<16)|(minor<<8)|(patch)) +#ifndef QT_VERSION +#define QT_VERSION QT4_VERSION +#endif -#if QT_VERSION >= QT_VERSION_CHECK(4, 2, 0) +#if QT_VERSION >= 0x040200 #include <QWidgetAction> #endif @@ -30,7 +31,7 @@ namespace frontend { /** * For holding an arbitrary set of icons. */ -#if QT_VERSION >= QT_VERSION_CHECK(4, 2, 0) +#if QT_VERSION >= 0x040200 class IconPalette : public QWidgetAction { Q_OBJECT @@ -77,7 +78,7 @@ private: QList<QAction *> actions_; }; -#endif // QT_VERSION >= QT_VERSION_CHECK(4, 2, 0) +#endif // QT_VERSION >= 0x040200 /** * Popup menu for a toolbutton.