On 17-5-2011 20:15, venom00 wrote: >> Hi Venom, >> Sorry for not responding earlier. >> It feels like it's a bit too much to include a pair of files from another > project just to add a "rubber button" to your search box. >> Can you point at the code that you want to use. Maybe there is a simpler > solution ? >> >> Vincent > > Maybe we can reuse it also in other situations. I think it's simple and does a > good work, otherwise we have to manage by ourselves the painting inside the > QLineEdit, which isn't hard, but it would be basically the same thing as > fancylinedit.
Except that it might be a small class inside GuiPrefs. If we would add such a class for each small feature of each control in LyX, we would really end up with a monstrous project. But... I think there are quite some places where we can pimp LyX a bit and maybe we can use it in more places as you say. > Is there a reason for which the moc_ file is included at the end? I've spent > an > hour (in cmake's lyx_automoc & friends) to understand why the moc_ file was > not > created for the new file. In my little experience (with qmake) you don't need > to > do that. Maybe we should write it to /src/frontends/qt4/README. The moc file is not created because you put the code in support. Classes in support are not moc'ed by default by autotools. There is only an exception for SystemcallPrivate.h: src/support/Makefile.am: MOCHEADER = SystemcallPrivate.h MOCEDFILES = $(MOCHEADER:%.h=moc_%.cpp) CLEANFILES += $(MOCEDFILES) BUILT_SOURCES += $(MOCEDFILES) moc_%.cpp: %.h $(MOC4) -o $@ $< liblyxsupport_a_DEPENDENCIES = $(MOCEDFILES) > > I've added to Makefile.am the two files, I don't know whether it's correct or > completely useless. > Also: I've edited the header of the two files, take a look at the originals > [1] > [2] and tell me if it's OK or if we should credit Nokia in some other way. > The image for the X (attached) on the textbox is taken from Qt Creator too, > but > maybe we can replace it. I've no idea how to handle the license and credits. Vincent